From 9dd13ed7b3e228d972dc57c652cb6552da71294c Mon Sep 17 00:00:00 2001 From: “2926542760@qq.com” <2926542760@qq.com> Date: Sun, 25 Jun 2023 23:12:33 +0800 Subject: [PATCH] 备份 --- antis-ncc-admin/.env.production | 4 ++-- antis-ncc-admin/src/assets/images/ncc1.png | Bin 6669 -> 0 bytes antis-ncc-admin/src/assets/images/ncc2.png | Bin 11420 -> 0 bytes antis-ncc-admin/src/utils/define.js | 3 ++- antis-ncc-admin/src/views/permission/user/Form.vue | 12 ++++++++++++ antis-ncc-admin/src/views/permission/user/index.vue | 12 ++++++++++++ antis-ncc-admin/src/views/tbArea/Form.vue | 6 +++--- antis-ncc-admin/src/views/tbArea/index.vue | 8 ++++---- antis-ncc-admin/src/views/tbAreaLine/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbAreaLine/Form.vue | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbAreaLine/index.vue | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbAreaLineNode/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbAreaLineNode/Form.vue | 201 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbAreaLineNode/index.vue | 292 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbBoxLog/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbBoxLog/Form.vue | 260 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbBoxLog/index.vue | 385 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbBoxOrder/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbBoxOrder/Form.vue | 311 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbBoxOrder/index.vue | 486 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMbtCharacter/Form.vue | 6 +++--- antis-ncc-admin/src/views/tbMbtCharacter/index.vue | 8 ++++---- antis-ncc-admin/src/views/tbMbtLine/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMbtLine/Form.vue | 178 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMbtLine/index.vue | 242 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMbtLineNode/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMbtLineNode/Form.vue | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMbtLineNode/index.vue | 294 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMyBoxCoupon/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMyBoxCoupon/Form.vue | 209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbMyBoxCoupon/index.vue | 335 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbRecommend/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbRecommend/Form.vue | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbRecommend/index.vue | 186 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbSettingPrice/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbSettingPrice/Form.vue | 148 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbSettingPrice/index.vue | 221 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbTicketsOrder/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbTicketsOrder/Form.vue | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbTicketsOrder/index.vue | 290 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbTravelSpot/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbTravelSpot/Form.vue | 223 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbTravelSpot/index.vue | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbUserAgreement/ExportBox.vue | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbUserAgreement/Form.vue | 127 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbUserAgreement/index.vue | 206 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-admin/src/views/tbVideo/Form.vue | 4 ++-- antis-ncc-admin/src/views/tbVideo/index.vue | 8 ++++---- antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineCrInput.cs | 43 +++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineInfoOutput.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListOutput.cs | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListQueryInput.cs | 38 ++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Entity/TbMbtLineEntity.cs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Mapper/TbMbtLineMapper.cs | 21 +++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeCrInput.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeInfoOutput.cs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListOutput.cs | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListQueryInput.cs | 43 +++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Entity/TbMbtLineNodeEntity.cs | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Mapper/TbMbtLineNodeMapper.cs | 21 +++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/NCC.BlindBox.Entitys.csproj | 4 +++- antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceCrInput.cs | 32 ++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceInfoOutput.cs | 37 +++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListOutput.cs | 36 ++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListQueryInput.cs | 28 ++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Entity/TbSettingPriceEntity.cs | 45 +++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Mapper/TbSettingPriceMapper.cs | 14 ++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineCrInput.cs | 43 +++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineInfoOutput.cs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListOutput.cs | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListQueryInput.cs | 38 ++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Entity/TbAreaLineEntity.cs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Mapper/TbAreaLineMapper.cs | 21 +++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeCrInput.cs | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeInfoOutput.cs | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListOutput.cs | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListQueryInput.cs | 43 +++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Entity/TbAreaLineNodeEntity.cs | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Mapper/TbAreaLineNodeMapper.cs | 21 +++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogCrInput.cs | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogInfoOutput.cs | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListOutput.cs | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListQueryInput.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Entity/TbBoxLogEntity.cs | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Mapper/TbBoxLogMapper.cs | 14 ++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotCrInput.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotInfoOutput.cs | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListOutput.cs | 93 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListQueryInput.cs | 33 +++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Entity/TbTravelSpotEntity.cs | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Mapper/TbTravelSpotMapper.cs | 23 +++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementCrInput.cs | 27 +++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementInfoOutput.cs | 32 ++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListOutput.cs | 32 ++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListQueryInput.cs | 23 +++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Entity/TbUserAgreementEntity.cs | 39 +++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Mapper/TbUserAgreementMapper.cs | 14 ++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendCrInput.cs | 27 +++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendInfoOutput.cs | 32 ++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListOutput.cs | 31 +++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListQueryInput.cs | 23 +++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Entity/TbRecommendEntity.cs | 39 +++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Mapper/TbRecommendMapper.cs | 14 ++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponCrInput.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponInfoOutput.cs | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListOutput.cs | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListQueryInput.cs | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Entity/TbMyBoxCouponEntity.cs | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Mapper/TbMyBoxCouponMapper.cs | 14 ++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderCrInput.cs | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderInfoOutput.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListOutput.cs | 159 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListQueryInput.cs | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Entity/TbBoxOrderEntity.cs | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Mapper/TbBoxOrderMapper.cs | 21 +++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/视频信息/Dto/TbVideoListOutput.cs | 21 ++++++++++++++++++++- antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderCrInput.cs | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderInfoOutput.cs | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListOutput.cs | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListQueryInput.cs | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderUpInput.cs | 17 +++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Entity/TbTicketsOrderEntity.cs | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Mapper/TbTicketsOrderMapper.cs | 14 ++++++++++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路/ITbMbtLineService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路节点/ITbMbtLineNodeService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/NCC.BlindBox.Interfaces.csproj | 3 ++- antis-ncc-net-core/NCC.BlindBox.Interfaces/价格设定/ITbSettingPriceService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路/ITbAreaLineService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路节点/ITbAreaLineNodeService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/抽奖记录/ITbBoxLogService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/旅游景点/ITbTravelSpotService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/用户协议/ITbUserAgreementService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒介绍/ITbRecommendService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒券/ITbMyBoxCouponService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒订单/ITbBoxOrderService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox.Interfaces/门票订单/ITbTicketsOrderService.cs | 6 ++++++ antis-ncc-net-core/NCC.BlindBox/BlindBoxStatus.cs | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/MBT人格/TbMbtCharacterService.cs | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- antis-ncc-net-core/NCC.BlindBox/MBT人格线路/TbMbtLineService.cs | 334 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/MBT人格线路节点/TbMbtLineNodeService.cs | 320 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/NCC.BlindBox.csproj | 1 + antis-ncc-net-core/NCC.BlindBox/价格设定/TbSettingPriceService.cs | 304 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/地域管理/TbAreaService.cs | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- antis-ncc-net-core/NCC.BlindBox/地域线路/TbAreaLineService.cs | 330 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/地域线路节点/TbAreaLineNodeService.cs | 324 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/抽奖记录/TbBoxLogService.cs | 329 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/旅游景点/TbTravelSpotService.cs | 311 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/用户协议/TbUserAgreementService.cs | 301 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/盲盒介绍/TbRecommendService.cs | 222 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/盲盒券/TbMyBoxCouponService.cs | 363 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/盲盒订单/TbBoxOrderService.cs | 942 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/NCC.BlindBox/视频信息/TbVideoService.cs | 5 ++++- antis-ncc-net-core/NCC.BlindBox/门票订单/TbTicketsOrderService.cs | 474 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ antis-ncc-net-core/src/Application/NCC.API.Core/Startup.cs | 9 ++++++++- antis-ncc-net-core/src/Application/NCC.API/appsettings.json | 8 +++++--- antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/Interface/IWePay.cs | 2 +- antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/WePay.cs | 16 ++++++++-------- antis-ncc-net-core/src/Modularity/Common/NCC.Common/CustomExtend/Config/PaymentSettingsOptions.cs | 4 ++++ antis-ncc-net-core/src/Modularity/Common/NCC.Common/Helper/ServiceHelper.cs | 28 ++++++++++++++++++++++++++++ antis-ncc-net-core/src/Modularity/Food/NCC.Food/BaseOrderService.cs | 2 +- antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs | 27 ++++++++++++++------------- antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserCrInput.cs | 11 +++++++++++ antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserInfoOutput.cs | 10 ++++++++++ antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListOutput.cs | 8 ++++++++ antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Entity/Permission/UserEntity.cs | 11 +++++++++++ antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Common/FileService.cs | 4 +++- antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs | 133 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------ 178 files changed, 15622 insertions(+), 65 deletions(-) create mode 100644 antis-ncc-admin/src/views/tbAreaLine/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbAreaLine/Form.vue create mode 100644 antis-ncc-admin/src/views/tbAreaLine/index.vue create mode 100644 antis-ncc-admin/src/views/tbAreaLineNode/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbAreaLineNode/Form.vue create mode 100644 antis-ncc-admin/src/views/tbAreaLineNode/index.vue create mode 100644 antis-ncc-admin/src/views/tbBoxLog/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbBoxLog/Form.vue create mode 100644 antis-ncc-admin/src/views/tbBoxLog/index.vue create mode 100644 antis-ncc-admin/src/views/tbBoxOrder/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbBoxOrder/Form.vue create mode 100644 antis-ncc-admin/src/views/tbBoxOrder/index.vue create mode 100644 antis-ncc-admin/src/views/tbMbtLine/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbMbtLine/Form.vue create mode 100644 antis-ncc-admin/src/views/tbMbtLine/index.vue create mode 100644 antis-ncc-admin/src/views/tbMbtLineNode/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbMbtLineNode/Form.vue create mode 100644 antis-ncc-admin/src/views/tbMbtLineNode/index.vue create mode 100644 antis-ncc-admin/src/views/tbMyBoxCoupon/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbMyBoxCoupon/Form.vue create mode 100644 antis-ncc-admin/src/views/tbMyBoxCoupon/index.vue create mode 100644 antis-ncc-admin/src/views/tbRecommend/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbRecommend/Form.vue create mode 100644 antis-ncc-admin/src/views/tbRecommend/index.vue create mode 100644 antis-ncc-admin/src/views/tbSettingPrice/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbSettingPrice/Form.vue create mode 100644 antis-ncc-admin/src/views/tbSettingPrice/index.vue create mode 100644 antis-ncc-admin/src/views/tbTicketsOrder/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbTicketsOrder/Form.vue create mode 100644 antis-ncc-admin/src/views/tbTicketsOrder/index.vue create mode 100644 antis-ncc-admin/src/views/tbTravelSpot/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbTravelSpot/Form.vue create mode 100644 antis-ncc-admin/src/views/tbTravelSpot/index.vue create mode 100644 antis-ncc-admin/src/views/tbUserAgreement/ExportBox.vue create mode 100644 antis-ncc-admin/src/views/tbUserAgreement/Form.vue create mode 100644 antis-ncc-admin/src/views/tbUserAgreement/index.vue create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Entity/TbMbtLineEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Mapper/TbMbtLineMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Entity/TbMbtLineNodeEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Mapper/TbMbtLineNodeMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Entity/TbSettingPriceEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Mapper/TbSettingPriceMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Entity/TbAreaLineEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Mapper/TbAreaLineMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Entity/TbAreaLineNodeEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Mapper/TbAreaLineNodeMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Entity/TbBoxLogEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Mapper/TbBoxLogMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Entity/TbTravelSpotEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Mapper/TbTravelSpotMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Entity/TbUserAgreementEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Mapper/TbUserAgreementMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Entity/TbRecommendEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Mapper/TbRecommendMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Entity/TbMyBoxCouponEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Mapper/TbMyBoxCouponMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Entity/TbBoxOrderEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Mapper/TbBoxOrderMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderCrInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderInfoOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListOutput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListQueryInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderUpInput.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Entity/TbTicketsOrderEntity.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Mapper/TbTicketsOrderMapper.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路/ITbMbtLineService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路节点/ITbMbtLineNodeService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/价格设定/ITbSettingPriceService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路/ITbAreaLineService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路节点/ITbAreaLineNodeService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/抽奖记录/ITbBoxLogService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/旅游景点/ITbTravelSpotService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/用户协议/ITbUserAgreementService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒介绍/ITbRecommendService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒券/ITbMyBoxCouponService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒订单/ITbBoxOrderService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox.Interfaces/门票订单/ITbTicketsOrderService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/BlindBoxStatus.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/MBT人格线路/TbMbtLineService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/MBT人格线路节点/TbMbtLineNodeService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/价格设定/TbSettingPriceService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/地域线路/TbAreaLineService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/地域线路节点/TbAreaLineNodeService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/抽奖记录/TbBoxLogService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/旅游景点/TbTravelSpotService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/用户协议/TbUserAgreementService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/盲盒介绍/TbRecommendService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/盲盒券/TbMyBoxCouponService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/盲盒订单/TbBoxOrderService.cs create mode 100644 antis-ncc-net-core/NCC.BlindBox/门票订单/TbTicketsOrderService.cs create mode 100644 antis-ncc-net-core/src/Modularity/Common/NCC.Common/Helper/ServiceHelper.cs diff --git a/antis-ncc-admin/.env.production b/antis-ncc-admin/.env.production index 8a4c001..e8108b6 100644 --- a/antis-ncc-admin/.env.production +++ b/antis-ncc-admin/.env.production @@ -1,5 +1,5 @@ # 生产默认配置 ENV = 'production' -VUE_APP_BASE_API = 'http://8.130.38.56:8099' -VUE_APP_BASE_WSS = 'ws://8.130.38.56:8099/websocket' +VUE_APP_BASE_API = 'https://www.chillyouthstudio.com' +VUE_APP_BASE_WSS = 'wss://www.chillyouthstudio.com/websocket' diff --git a/antis-ncc-admin/src/assets/images/ncc1.png b/antis-ncc-admin/src/assets/images/ncc1.png index 499af56..d108dfd 100644 Binary files a/antis-ncc-admin/src/assets/images/ncc1.png and b/antis-ncc-admin/src/assets/images/ncc1.png differ diff --git a/antis-ncc-admin/src/assets/images/ncc2.png b/antis-ncc-admin/src/assets/images/ncc2.png index 3fd9341..d108dfd 100644 Binary files a/antis-ncc-admin/src/assets/images/ncc2.png and b/antis-ncc-admin/src/assets/images/ncc2.png differ diff --git a/antis-ncc-admin/src/utils/define.js b/antis-ncc-admin/src/utils/define.js index 1ba56c9..d735971 100644 --- a/antis-ncc-admin/src/utils/define.js +++ b/antis-ncc-admin/src/utils/define.js @@ -1,7 +1,8 @@ // 开发环境接口配置 // JAVA Boot版本对应后端接口地址 // JAVA Cloud对应网关地址 -const APIURl = 'http://localhost:8061' +// const APIURl = 'http://localhost:8061' +const APIURl = 'https://www.chillyouthstudio.com' module.exports = { APIURl: APIURl, diff --git a/antis-ncc-admin/src/views/permission/user/Form.vue b/antis-ncc-admin/src/views/permission/user/Form.vue index 5533121..f46620b 100644 --- a/antis-ncc-admin/src/views/permission/user/Form.vue +++ b/antis-ncc-admin/src/views/permission/user/Form.vue @@ -27,6 +27,16 @@ + + + + + + + + + + @@ -162,6 +172,8 @@ urgentContacts: '', urgentTelePhone: '', postalAddress: '', + "schoolNumber":"", + "school":'' }, roleId: [], departmentTreeData: [], diff --git a/antis-ncc-admin/src/views/permission/user/index.vue b/antis-ncc-admin/src/views/permission/user/index.vue index d288c46..84b949f 100644 --- a/antis-ncc-admin/src/views/permission/user/index.vue +++ b/antis-ncc-admin/src/views/permission/user/index.vue @@ -68,6 +68,18 @@ {{scope.row.postalAddress}} + + + + + + diff --git a/antis-ncc-admin/src/views/tbArea/Form.vue b/antis-ncc-admin/src/views/tbArea/Form.vue index 6f0751d..33a39e3 100644 --- a/antis-ncc-admin/src/views/tbArea/Form.vue +++ b/antis-ncc-admin/src/views/tbArea/Form.vue @@ -89,7 +89,7 @@ this.$refs['elForm'].resetFields(); if (this.dataForm.id) { request({ - url: '/api/Education/TbArea/' + this.dataForm.id, + url: '/api/Blind/TbArea/' + this.dataForm.id, method: 'get' }).then(res =>{ this.dataForm = res.data; @@ -102,7 +102,7 @@ if (valid) { if (!this.dataForm.id) { request({ - url: `/api/Education/TbArea`, + url: `/api/Blind/TbArea`, method: 'post', data: this.dataForm, }).then((res) => { @@ -118,7 +118,7 @@ }) } else { request({ - url: '/api/Education/TbArea/' + this.dataForm.id, + url: '/api/Blind/TbArea/' + this.dataForm.id, method: 'PUT', data: this.dataForm }).then((res) => { diff --git a/antis-ncc-admin/src/views/tbArea/index.vue b/antis-ncc-admin/src/views/tbArea/index.vue index 620b9e0..49d5bae 100644 --- a/antis-ncc-admin/src/views/tbArea/index.vue +++ b/antis-ncc-admin/src/views/tbArea/index.vue @@ -99,7 +99,7 @@ } } request({ - url: `/api/Education/TbArea`, + url: `/api/Blind/TbArea`, method: 'GET', data: query }).then(res => { @@ -113,7 +113,7 @@ type: 'warning' }).then(() => { request({ - url: `/api/Education/TbArea/${id}`, + url: `/api/Blind/TbArea/${id}`, method: 'DELETE' }).then(res => { this.$message({ @@ -145,7 +145,7 @@ type: 'warning' }).then(() => { request({ - url: `/api/Education/TbArea/batchRemove`, + url: `/api/Blind/TbArea/batchRemove`, method: 'POST', data: ids , }).then(res => { @@ -174,7 +174,7 @@ download(data) { let query = { ...data, ...this.listQuery, ...this.query } request({ - url: `/api/Education/TbArea/Actions/Export`, + url: `/api/Blind/TbArea/Actions/Export`, method: 'GET', data: query }).then(res => { diff --git a/antis-ncc-admin/src/views/tbAreaLine/ExportBox.vue b/antis-ncc-admin/src/views/tbAreaLine/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbAreaLine/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbAreaLine/Form.vue b/antis-ncc-admin/src/views/tbAreaLine/Form.vue new file mode 100644 index 0000000..a8ea308 --- /dev/null +++ b/antis-ncc-admin/src/views/tbAreaLine/Form.vue @@ -0,0 +1,178 @@ + + diff --git a/antis-ncc-admin/src/views/tbAreaLine/index.vue b/antis-ncc-admin/src/views/tbAreaLine/index.vue new file mode 100644 index 0000000..08ad760 --- /dev/null +++ b/antis-ncc-admin/src/views/tbAreaLine/index.vue @@ -0,0 +1,242 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbAreaLineNode/ExportBox.vue b/antis-ncc-admin/src/views/tbAreaLineNode/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbAreaLineNode/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbAreaLineNode/Form.vue b/antis-ncc-admin/src/views/tbAreaLineNode/Form.vue new file mode 100644 index 0000000..da16280 --- /dev/null +++ b/antis-ncc-admin/src/views/tbAreaLineNode/Form.vue @@ -0,0 +1,201 @@ + + diff --git a/antis-ncc-admin/src/views/tbAreaLineNode/index.vue b/antis-ncc-admin/src/views/tbAreaLineNode/index.vue new file mode 100644 index 0000000..f1bf3ef --- /dev/null +++ b/antis-ncc-admin/src/views/tbAreaLineNode/index.vue @@ -0,0 +1,292 @@ + + diff --git a/antis-ncc-admin/src/views/tbBoxLog/ExportBox.vue b/antis-ncc-admin/src/views/tbBoxLog/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbBoxLog/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbBoxLog/Form.vue b/antis-ncc-admin/src/views/tbBoxLog/Form.vue new file mode 100644 index 0000000..053e522 --- /dev/null +++ b/antis-ncc-admin/src/views/tbBoxLog/Form.vue @@ -0,0 +1,260 @@ + + diff --git a/antis-ncc-admin/src/views/tbBoxLog/index.vue b/antis-ncc-admin/src/views/tbBoxLog/index.vue new file mode 100644 index 0000000..444c0a0 --- /dev/null +++ b/antis-ncc-admin/src/views/tbBoxLog/index.vue @@ -0,0 +1,385 @@ + + diff --git a/antis-ncc-admin/src/views/tbBoxOrder/ExportBox.vue b/antis-ncc-admin/src/views/tbBoxOrder/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbBoxOrder/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbBoxOrder/Form.vue b/antis-ncc-admin/src/views/tbBoxOrder/Form.vue new file mode 100644 index 0000000..b7252e1 --- /dev/null +++ b/antis-ncc-admin/src/views/tbBoxOrder/Form.vue @@ -0,0 +1,311 @@ + + diff --git a/antis-ncc-admin/src/views/tbBoxOrder/index.vue b/antis-ncc-admin/src/views/tbBoxOrder/index.vue new file mode 100644 index 0000000..b901b34 --- /dev/null +++ b/antis-ncc-admin/src/views/tbBoxOrder/index.vue @@ -0,0 +1,486 @@ + + diff --git a/antis-ncc-admin/src/views/tbMbtCharacter/Form.vue b/antis-ncc-admin/src/views/tbMbtCharacter/Form.vue index 40b7273..955acc1 100644 --- a/antis-ncc-admin/src/views/tbMbtCharacter/Form.vue +++ b/antis-ncc-admin/src/views/tbMbtCharacter/Form.vue @@ -89,7 +89,7 @@ this.$refs['elForm'].resetFields(); if (this.dataForm.id) { request({ - url: '/api/Education/TbMbtCharacter/' + this.dataForm.id, + url: '/api/Blind/TbMbtCharacter/' + this.dataForm.id, method: 'get' }).then(res =>{ this.dataForm = res.data; @@ -102,7 +102,7 @@ if (valid) { if (!this.dataForm.id) { request({ - url: `/api/Education/TbMbtCharacter`, + url: `/api/Blind/TbMbtCharacter`, method: 'post', data: this.dataForm, }).then((res) => { @@ -118,7 +118,7 @@ }) } else { request({ - url: '/api/Education/TbMbtCharacter/' + this.dataForm.id, + url: '/api/Blind/TbMbtCharacter/' + this.dataForm.id, method: 'PUT', data: this.dataForm }).then((res) => { diff --git a/antis-ncc-admin/src/views/tbMbtCharacter/index.vue b/antis-ncc-admin/src/views/tbMbtCharacter/index.vue index 788d90e..572faaf 100644 --- a/antis-ncc-admin/src/views/tbMbtCharacter/index.vue +++ b/antis-ncc-admin/src/views/tbMbtCharacter/index.vue @@ -99,7 +99,7 @@ } } request({ - url: `/api/Education/TbMbtCharacter`, + url: `/api/Blind/TbMbtCharacter`, method: 'GET', data: query }).then(res => { @@ -113,7 +113,7 @@ type: 'warning' }).then(() => { request({ - url: `/api/Education/TbMbtCharacter/${id}`, + url: `/api/Blind/TbMbtCharacter/${id}`, method: 'DELETE' }).then(res => { this.$message({ @@ -145,7 +145,7 @@ type: 'warning' }).then(() => { request({ - url: `/api/Education/TbMbtCharacter/batchRemove`, + url: `/api/Blind/TbMbtCharacter/batchRemove`, method: 'POST', data: ids , }).then(res => { @@ -174,7 +174,7 @@ download(data) { let query = { ...data, ...this.listQuery, ...this.query } request({ - url: `/api/Education/TbMbtCharacter/Actions/Export`, + url: `/api/Blind/TbMbtCharacter/Actions/Export`, method: 'GET', data: query }).then(res => { diff --git a/antis-ncc-admin/src/views/tbMbtLine/ExportBox.vue b/antis-ncc-admin/src/views/tbMbtLine/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMbtLine/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbMbtLine/Form.vue b/antis-ncc-admin/src/views/tbMbtLine/Form.vue new file mode 100644 index 0000000..cceffb2 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMbtLine/Form.vue @@ -0,0 +1,178 @@ + + diff --git a/antis-ncc-admin/src/views/tbMbtLine/index.vue b/antis-ncc-admin/src/views/tbMbtLine/index.vue new file mode 100644 index 0000000..0f3d405 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMbtLine/index.vue @@ -0,0 +1,242 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbMbtLineNode/ExportBox.vue b/antis-ncc-admin/src/views/tbMbtLineNode/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMbtLineNode/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbMbtLineNode/Form.vue b/antis-ncc-admin/src/views/tbMbtLineNode/Form.vue new file mode 100644 index 0000000..4de3957 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMbtLineNode/Form.vue @@ -0,0 +1,204 @@ + + diff --git a/antis-ncc-admin/src/views/tbMbtLineNode/index.vue b/antis-ncc-admin/src/views/tbMbtLineNode/index.vue new file mode 100644 index 0000000..5bb4490 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMbtLineNode/index.vue @@ -0,0 +1,294 @@ + + diff --git a/antis-ncc-admin/src/views/tbMyBoxCoupon/ExportBox.vue b/antis-ncc-admin/src/views/tbMyBoxCoupon/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMyBoxCoupon/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbMyBoxCoupon/Form.vue b/antis-ncc-admin/src/views/tbMyBoxCoupon/Form.vue new file mode 100644 index 0000000..7530806 --- /dev/null +++ b/antis-ncc-admin/src/views/tbMyBoxCoupon/Form.vue @@ -0,0 +1,209 @@ + + diff --git a/antis-ncc-admin/src/views/tbMyBoxCoupon/index.vue b/antis-ncc-admin/src/views/tbMyBoxCoupon/index.vue new file mode 100644 index 0000000..b486ebe --- /dev/null +++ b/antis-ncc-admin/src/views/tbMyBoxCoupon/index.vue @@ -0,0 +1,335 @@ + + diff --git a/antis-ncc-admin/src/views/tbRecommend/ExportBox.vue b/antis-ncc-admin/src/views/tbRecommend/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbRecommend/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbRecommend/Form.vue b/antis-ncc-admin/src/views/tbRecommend/Form.vue new file mode 100644 index 0000000..4fbea1d --- /dev/null +++ b/antis-ncc-admin/src/views/tbRecommend/Form.vue @@ -0,0 +1,127 @@ + + diff --git a/antis-ncc-admin/src/views/tbRecommend/index.vue b/antis-ncc-admin/src/views/tbRecommend/index.vue new file mode 100644 index 0000000..51b9f7a --- /dev/null +++ b/antis-ncc-admin/src/views/tbRecommend/index.vue @@ -0,0 +1,186 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbSettingPrice/ExportBox.vue b/antis-ncc-admin/src/views/tbSettingPrice/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbSettingPrice/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbSettingPrice/Form.vue b/antis-ncc-admin/src/views/tbSettingPrice/Form.vue new file mode 100644 index 0000000..52a44a5 --- /dev/null +++ b/antis-ncc-admin/src/views/tbSettingPrice/Form.vue @@ -0,0 +1,148 @@ + + diff --git a/antis-ncc-admin/src/views/tbSettingPrice/index.vue b/antis-ncc-admin/src/views/tbSettingPrice/index.vue new file mode 100644 index 0000000..fc54c68 --- /dev/null +++ b/antis-ncc-admin/src/views/tbSettingPrice/index.vue @@ -0,0 +1,221 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbTicketsOrder/ExportBox.vue b/antis-ncc-admin/src/views/tbTicketsOrder/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbTicketsOrder/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbTicketsOrder/Form.vue b/antis-ncc-admin/src/views/tbTicketsOrder/Form.vue new file mode 100644 index 0000000..554819c --- /dev/null +++ b/antis-ncc-admin/src/views/tbTicketsOrder/Form.vue @@ -0,0 +1,231 @@ + + diff --git a/antis-ncc-admin/src/views/tbTicketsOrder/index.vue b/antis-ncc-admin/src/views/tbTicketsOrder/index.vue new file mode 100644 index 0000000..7e790d8 --- /dev/null +++ b/antis-ncc-admin/src/views/tbTicketsOrder/index.vue @@ -0,0 +1,290 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbTravelSpot/ExportBox.vue b/antis-ncc-admin/src/views/tbTravelSpot/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbTravelSpot/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbTravelSpot/Form.vue b/antis-ncc-admin/src/views/tbTravelSpot/Form.vue new file mode 100644 index 0000000..aa7c66b --- /dev/null +++ b/antis-ncc-admin/src/views/tbTravelSpot/Form.vue @@ -0,0 +1,223 @@ + + diff --git a/antis-ncc-admin/src/views/tbTravelSpot/index.vue b/antis-ncc-admin/src/views/tbTravelSpot/index.vue new file mode 100644 index 0000000..a29e62e --- /dev/null +++ b/antis-ncc-admin/src/views/tbTravelSpot/index.vue @@ -0,0 +1,222 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbUserAgreement/ExportBox.vue b/antis-ncc-admin/src/views/tbUserAgreement/ExportBox.vue new file mode 100644 index 0000000..4fc5c07 --- /dev/null +++ b/antis-ncc-admin/src/views/tbUserAgreement/ExportBox.vue @@ -0,0 +1,66 @@ + + + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbUserAgreement/Form.vue b/antis-ncc-admin/src/views/tbUserAgreement/Form.vue new file mode 100644 index 0000000..e88ed1e --- /dev/null +++ b/antis-ncc-admin/src/views/tbUserAgreement/Form.vue @@ -0,0 +1,127 @@ + + diff --git a/antis-ncc-admin/src/views/tbUserAgreement/index.vue b/antis-ncc-admin/src/views/tbUserAgreement/index.vue new file mode 100644 index 0000000..9e9d159 --- /dev/null +++ b/antis-ncc-admin/src/views/tbUserAgreement/index.vue @@ -0,0 +1,206 @@ + + \ No newline at end of file diff --git a/antis-ncc-admin/src/views/tbVideo/Form.vue b/antis-ncc-admin/src/views/tbVideo/Form.vue index 3fbf981..2f74def 100644 --- a/antis-ncc-admin/src/views/tbVideo/Form.vue +++ b/antis-ncc-admin/src/views/tbVideo/Form.vue @@ -75,7 +75,7 @@ this.$refs['elForm'].resetFields(); if (this.dataForm.id) { request({ - url: '/api/Education/TbVideo/' + this.dataForm.id, + url: '/api/Blind/TbVideo/' + this.dataForm.id, method: 'get' }).then(res =>{ this.dataForm = res.data; @@ -89,7 +89,7 @@ if (valid) { if (!this.dataForm.id) { request({ - url: `/api/Education/TbVideo`, + url: `/api/Blind/TbVideo`, method: 'post', data: this.dataForm, }).then((res) => { diff --git a/antis-ncc-admin/src/views/tbVideo/index.vue b/antis-ncc-admin/src/views/tbVideo/index.vue index 213451f..c249eb1 100644 --- a/antis-ncc-admin/src/views/tbVideo/index.vue +++ b/antis-ncc-admin/src/views/tbVideo/index.vue @@ -91,7 +91,7 @@ } } request({ - url: `/api/Education/TbVideo`, + url: `/api/Blind/TbVideo`, method: 'GET', data: query }).then(res => { @@ -105,7 +105,7 @@ type: 'warning' }).then(() => { request({ - url: `/api/Education/TbVideo/${id}`, + url: `/api/Blind/TbVideo/${id}`, method: 'DELETE' }).then(res => { this.$message({ @@ -137,7 +137,7 @@ type: 'warning' }).then(() => { request({ - url: `/api/Education/TbVideo/batchRemove`, + url: `/api/Blind/TbVideo/batchRemove`, method: 'POST', data: ids , }).then(res => { @@ -166,7 +166,7 @@ download(data) { let query = { ...data, ...this.listQuery, ...this.query } request({ - url: `/api/Education/TbVideo/Actions/Export`, + url: `/api/Blind/TbVideo/Actions/Export`, method: 'GET', data: query }).then(res => { diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineCrInput.cs new file mode 100644 index 0000000..e5417e9 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineCrInput.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbMbtLine +{ + /// + /// MBT人格线路修改输入参数 + /// + public class TbMbtLineCrInput + { + /// + /// 标题 + /// + public string name { get; set; } + + /// + /// MBT人格ID + /// + public string mbtId { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + /// + /// 线路图片 + /// + public List banner { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineInfoOutput.cs new file mode 100644 index 0000000..b902462 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineInfoOutput.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbMbtLine +{ + /// + /// MBT人格线路输出参数 + /// + public class TbMbtLineInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 标题 + /// + public string name { get; set; } + + /// + /// MBT人格ID + /// + public string mbtId { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + /// + /// 线路图片 + /// + public List banner { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListOutput.cs new file mode 100644 index 0000000..f30b512 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListOutput.cs @@ -0,0 +1,68 @@ +using Aspose.Words.Lists; +using NCC.Common.Model; +using NCC.Education.Entitys; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMbtLine +{ + /// + /// MBT人格线路输入参数 + /// + public class TbMbtLineListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 标题 + /// + public string name { get; set; } + + /// + /// MBT人格ID + /// + public string mbtId { get; set; } + + /// + /// MBT人格信息 + /// + public TbMbtCharacterEntity mbt { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + /// + /// 图片信息 + /// + public string banner { get; set; } + /// + /// 图片信息 + /// + public List Banner { get + { + try + { + return JsonConvert.DeserializeObject>(banner); + }catch(Exception ex) + { + return new List(); + } + } } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListQueryInput.cs new file mode 100644 index 0000000..9e32e1e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineListQueryInput.cs @@ -0,0 +1,38 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMbtLine +{ + /// + /// MBT人格线路列表查询输入 + /// + public class TbMbtLineListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 标题 + /// + public string name { get; set; } + + /// + /// MBT人格ID + /// + public string mbtId { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineUpInput.cs new file mode 100644 index 0000000..50e367a --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Dto/TbMbtLineUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMbtLine +{ + /// + /// MBT人格线路更新输入参数 + /// + public class TbMbtLineUpInput : TbMbtLineCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Entity/TbMbtLineEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Entity/TbMbtLineEntity.cs new file mode 100644 index 0000000..d453de1 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Entity/TbMbtLineEntity.cs @@ -0,0 +1,57 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// MBT人格线路 + /// + [SugarTable("tb_MbtLine")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbMbtLineEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 标题 + /// + [SugarColumn(ColumnName = "F_Name")] + public string Name { get; set; } + + /// + /// MBT人格ID + /// + [SugarColumn(ColumnName = "F_MbtId")] + public string MbtId { get; set; } + + /// + /// 线路概况 + /// + [SugarColumn(ColumnName = "F_Remark")] + public string Remark { get; set; } + + /// + /// 线路图片 + /// + [SugarColumn(ColumnName = "F_Banner")] + public string Banner { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Mapper/TbMbtLineMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Mapper/TbMbtLineMapper.cs new file mode 100644 index 0000000..f6f1bea --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路/Mapper/TbMbtLineMapper.cs @@ -0,0 +1,21 @@ +using NCC.Common.Helper; +using NCC.Common.Model; +using NCC.Blind.Entitys.Dto.TbMbtLine; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbMbtLine +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(dest => dest.Banner, src => src.banner.ToJson()) + ; + config.ForType() + .Map(dest => dest.banner, src => src.Banner.ToObject>()) + ; + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeCrInput.cs new file mode 100644 index 0000000..0e69023 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeCrInput.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode +{ + /// + /// MBT人格线路节点修改输入参数 + /// + public class TbMbtLineNodeCrInput + { + /// + /// MBT人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点图片 + /// + public List banner { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + /// + /// 排序 + /// + public int? sorts { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeInfoOutput.cs new file mode 100644 index 0000000..59d96e5 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeInfoOutput.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode +{ + /// + /// MBT人格线路节点输出参数 + /// + public class TbMbtLineNodeInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// MBT人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点图片 + /// + public List banner { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + /// + /// 排序 + /// + public int? sorts { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListOutput.cs new file mode 100644 index 0000000..3e14fd5 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListOutput.cs @@ -0,0 +1,76 @@ +using Aspose.Words.Lists; +using NCC.Common.Model; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode +{ + /// + /// MBT人格线路节点输入参数 + /// + public class TbMbtLineNodeListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// MBT人格线路ID + /// + public string mbtLineId { get; set; } + /// + /// MBT人格线路信息 + /// + public TbMbtLineEntity mbtLine { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + /// + /// 排序 + /// + public int? sorts { get; set; } + + /// + /// 图片信息 + /// + public string banner { get; set; } + /// + /// 图片信息 + /// + public List Banner { get + { + try + { + return JsonConvert.DeserializeObject>(banner); + }catch(Exception ex) + { + return new List(); + } + } } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListQueryInput.cs new file mode 100644 index 0000000..6f5ea1a --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeListQueryInput.cs @@ -0,0 +1,43 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode +{ + /// + /// MBT人格线路节点列表查询输入 + /// + public class TbMbtLineNodeListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// MBT人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeUpInput.cs new file mode 100644 index 0000000..198a914 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Dto/TbMbtLineNodeUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMbtLineNode +{ + /// + /// MBT人格线路节点更新输入参数 + /// + public class TbMbtLineNodeUpInput : TbMbtLineNodeCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Entity/TbMbtLineNodeEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Entity/TbMbtLineNodeEntity.cs new file mode 100644 index 0000000..91a1fa1 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Entity/TbMbtLineNodeEntity.cs @@ -0,0 +1,69 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// MBT人格线路节点 + /// + [SugarTable("tb_MbtLineNode")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbMbtLineNodeEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// MBT人格线路ID + /// + [SugarColumn(ColumnName = "F_MbtLineId")] + public string MbtLineId { get; set; } + + /// + /// 节点标题 + /// + [SugarColumn(ColumnName = "F_Title")] + public string Title { get; set; } + + /// + /// 节点简介 + /// + [SugarColumn(ColumnName = "F_Description")] + public string Description { get; set; } + + /// + /// 节点图片 + /// + [SugarColumn(ColumnName = "F_Banner")] + public string Banner { get; set; } + + /// + /// 节点注意事项 + /// + [SugarColumn(ColumnName = "F_Remark")] + public string Remark { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + /// + /// 排序 + /// + [SugarColumn(ColumnName = "F_Sorts")] + public int? Sorts { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Mapper/TbMbtLineNodeMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Mapper/TbMbtLineNodeMapper.cs new file mode 100644 index 0000000..d30498f --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/MBT人格线路节点/Mapper/TbMbtLineNodeMapper.cs @@ -0,0 +1,21 @@ +using NCC.Common.Helper; +using NCC.Common.Model; +using NCC.Blind.Entitys.Dto.TbMbtLineNode; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbMbtLineNode +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(dest => dest.Banner, src => src.banner.ToJson()) + ; + config.ForType() + .Map(dest => dest.banner, src => src.Banner.ToObject>()) + ; + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/NCC.BlindBox.Entitys.csproj b/antis-ncc-net-core/NCC.BlindBox.Entitys/NCC.BlindBox.Entitys.csproj index d1d4086..ba068fe 100644 --- a/antis-ncc-net-core/NCC.BlindBox.Entitys/NCC.BlindBox.Entitys.csproj +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/NCC.BlindBox.Entitys.csproj @@ -1,12 +1,14 @@ - + net5.0 + True + diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceCrInput.cs new file mode 100644 index 0000000..c1c3f78 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceCrInput.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbSettingPrice +{ + /// + /// 价格设定修改输入参数 + /// + public class TbSettingPriceCrInput + { + /// + /// 价格 + /// + public decimal price { get; set; } + + /// + /// 类型 1--盲盒价格 2--门票价格 + /// + public string type { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceInfoOutput.cs new file mode 100644 index 0000000..b33780b --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceInfoOutput.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbSettingPrice +{ + /// + /// 价格设定输出参数 + /// + public class TbSettingPriceInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 价格 + /// + public decimal price { get; set; } + + /// + /// 类型 1--盲盒价格 2--门票价格 + /// + public string type { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListOutput.cs new file mode 100644 index 0000000..b862ef9 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListOutput.cs @@ -0,0 +1,36 @@ +using System; + +namespace NCC.Blind.Entitys.Dto.TbSettingPrice +{ + /// + /// 价格设定输入参数 + /// + public class TbSettingPriceListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 价格 + /// + public decimal price { get; set; } + + /// + /// 类型 1--盲盒价格 2--门票价格 + /// + public string type { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListQueryInput.cs new file mode 100644 index 0000000..cc283fe --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceListQueryInput.cs @@ -0,0 +1,28 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbSettingPrice +{ + /// + /// 价格设定列表查询输入 + /// + public class TbSettingPriceListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 类型 1--盲盒价格 2--门票价格 + /// + public string type { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceUpInput.cs new file mode 100644 index 0000000..a65264c --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Dto/TbSettingPriceUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbSettingPrice +{ + /// + /// 价格设定更新输入参数 + /// + public class TbSettingPriceUpInput : TbSettingPriceCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Entity/TbSettingPriceEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Entity/TbSettingPriceEntity.cs new file mode 100644 index 0000000..de964f8 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Entity/TbSettingPriceEntity.cs @@ -0,0 +1,45 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 价格设定 + /// + [SugarTable("tb_SettingPrice")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbSettingPriceEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 价格 + /// + [SugarColumn(ColumnName = "F_Price")] + public decimal Price { get; set; } + + /// + /// 类型 1--盲盒价格 2--门票价格 + /// + [SugarColumn(ColumnName = "F_Type")] + public string Type { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Mapper/TbSettingPriceMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Mapper/TbSettingPriceMapper.cs new file mode 100644 index 0000000..0e9111a --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/价格设定/Mapper/TbSettingPriceMapper.cs @@ -0,0 +1,14 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbSettingPrice; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbSettingPrice +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineCrInput.cs new file mode 100644 index 0000000..89eb3a7 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineCrInput.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbAreaLine +{ + /// + /// 地域线路修改输入参数 + /// + public class TbAreaLineCrInput + { + /// + /// 线路标题 + /// + public string title { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 线路图片 + /// + public List banner { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineInfoOutput.cs new file mode 100644 index 0000000..3f7704e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineInfoOutput.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbAreaLine +{ + /// + /// 地域线路输出参数 + /// + public class TbAreaLineInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 线路标题 + /// + public string title { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 线路图片 + /// + public List banner { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListOutput.cs new file mode 100644 index 0000000..701e87a --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListOutput.cs @@ -0,0 +1,70 @@ +using Aspose.Words.Lists; +using NCC.Common.Model; +using NCC.Education.Entitys; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbAreaLine +{ + /// + /// 地域线路输入参数 + /// + public class TbAreaLineListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 线路标题 + /// + public string title { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 地域信息 + /// + public TbAreaEntity area { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 图片信息 + /// + public string banner { get; set; } + + /// + /// 图片信息 + /// + public List Banner { get + { + try + { + return JsonConvert.DeserializeObject>(banner); + }catch(Exception ex) + { + return new List(); + } + } } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListQueryInput.cs new file mode 100644 index 0000000..cec7ac5 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineListQueryInput.cs @@ -0,0 +1,38 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbAreaLine +{ + /// + /// 地域线路列表查询输入 + /// + public class TbAreaLineListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 线路标题 + /// + public string title { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 线路概况 + /// + public string remark { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineUpInput.cs new file mode 100644 index 0000000..4c6794e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Dto/TbAreaLineUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbAreaLine +{ + /// + /// 地域线路更新输入参数 + /// + public class TbAreaLineUpInput : TbAreaLineCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Entity/TbAreaLineEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Entity/TbAreaLineEntity.cs new file mode 100644 index 0000000..bbdc7e9 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Entity/TbAreaLineEntity.cs @@ -0,0 +1,57 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 地域线路 + /// + [SugarTable("tb_AreaLine")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbAreaLineEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 线路标题 + /// + [SugarColumn(ColumnName = "F_Title")] + public string Title { get; set; } + + /// + /// 地域ID + /// + [SugarColumn(ColumnName = "F_AreaId")] + public string AreaId { get; set; } + + /// + /// 线路概况 + /// + [SugarColumn(ColumnName = "F_Remark")] + public string Remark { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + /// + /// 线路图片 + /// + [SugarColumn(ColumnName = "F_Banner")] + public string Banner { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Mapper/TbAreaLineMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Mapper/TbAreaLineMapper.cs new file mode 100644 index 0000000..278e650 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路/Mapper/TbAreaLineMapper.cs @@ -0,0 +1,21 @@ +using NCC.Common.Helper; +using NCC.Common.Model; +using NCC.Blind.Entitys.Dto.TbAreaLine; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbAreaLine +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(dest => dest.Banner, src => src.banner.ToJson()) + ; + config.ForType() + .Map(dest => dest.banner, src => src.Banner.ToObject>()) + ; + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeCrInput.cs new file mode 100644 index 0000000..d3bc69f --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeCrInput.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode +{ + /// + /// 地域线路节点修改输入参数 + /// + public class TbAreaLineNodeCrInput + { + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点图片 + /// + public List banner { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 排序 + /// + public int? sorts { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeInfoOutput.cs new file mode 100644 index 0000000..2ceebdd --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeInfoOutput.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode +{ + /// + /// 地域线路节点输出参数 + /// + public class TbAreaLineNodeInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点图片 + /// + public List banner { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 排序 + /// + public int? sorts { get; set; } + + /// + /// 是否填写了个人信息 1--未填写 2--已填写 + /// + public string isAppend { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListOutput.cs new file mode 100644 index 0000000..c099cb4 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListOutput.cs @@ -0,0 +1,79 @@ +using Aspose.Words.Lists; +using NCC.Common.Model; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode +{ + /// + /// 地域线路节点输入参数 + /// + public class TbAreaLineNodeListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + /// + /// 地域线路信息 + /// + public TbAreaLineEntity areaLine { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 图片信息 + /// + public string banner { get; set; } + + /// + /// 图片信息 + /// + public List Banner { get + { + try + { + return JsonConvert.DeserializeObject>(banner); + }catch(Exception ex) + { + return new List(); + } + } } + + /// + /// 排序 + /// + public int? sorts { get; set; } + + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListQueryInput.cs new file mode 100644 index 0000000..0282cdc --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeListQueryInput.cs @@ -0,0 +1,43 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode +{ + /// + /// 地域线路节点列表查询输入 + /// + public class TbAreaLineNodeListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 节点标题 + /// + public string title { get; set; } + + /// + /// 节点简介 + /// + public string description { get; set; } + + /// + /// 节点注意事项 + /// + public string remark { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeUpInput.cs new file mode 100644 index 0000000..8006903 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Dto/TbAreaLineNodeUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbAreaLineNode +{ + /// + /// 地域线路节点更新输入参数 + /// + public class TbAreaLineNodeUpInput : TbAreaLineNodeCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Entity/TbAreaLineNodeEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Entity/TbAreaLineNodeEntity.cs new file mode 100644 index 0000000..efac86e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Entity/TbAreaLineNodeEntity.cs @@ -0,0 +1,70 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 地域线路节点 + /// + [SugarTable("tb_AreaLineNode")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbAreaLineNodeEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 地域线路ID + /// + [SugarColumn(ColumnName = "F_AreaLineId")] + public string AreaLineId { get; set; } + + /// + /// 节点标题 + /// + [SugarColumn(ColumnName = "F_Title")] + public string Title { get; set; } + + /// + /// 节点简介 + /// + [SugarColumn(ColumnName = "F_Description")] + public string Description { get; set; } + + /// + /// 节点图片 + /// + [SugarColumn(ColumnName = "F_Banner")] + public string Banner { get; set; } + + /// + /// 节点注意事项 + /// + [SugarColumn(ColumnName = "F_Remark")] + public string Remark { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + /// + /// 排序 + /// + [SugarColumn(ColumnName = "F_Sorts")] + public int? Sorts { get; set; } + + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Mapper/TbAreaLineNodeMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Mapper/TbAreaLineNodeMapper.cs new file mode 100644 index 0000000..9e16a15 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/地域线路节点/Mapper/TbAreaLineNodeMapper.cs @@ -0,0 +1,21 @@ +using NCC.Common.Helper; +using NCC.Common.Model; +using NCC.Blind.Entitys.Dto.TbAreaLineNode; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbAreaLineNode +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(dest => dest.Banner, src => src.banner.ToJson()) + ; + config.ForType() + .Map(dest => dest.banner, src => src.Banner.ToObject>()) + ; + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogCrInput.cs new file mode 100644 index 0000000..187516c --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogCrInput.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxLog +{ + /// + /// 抽奖记录修改输入参数 + /// + public class TbBoxLogCrInput + { + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 盲盒订单ID + /// + public string boxOrderId { get; set; } + + /// + /// 路线 1--地域路线 2--人格路线 + /// + public string type { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogInfoOutput.cs new file mode 100644 index 0000000..b69769d --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogInfoOutput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxLog +{ + /// + /// 抽奖记录输出参数 + /// + public class TbBoxLogInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 盲盒订单ID + /// + public string boxOrderId { get; set; } + + /// + /// 路线 1--地域路线 2--人格路线 + /// + public string type { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListOutput.cs new file mode 100644 index 0000000..512ade5 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListOutput.cs @@ -0,0 +1,90 @@ +using NCC.Education.Entitys; +using NCC.System.Entitys.Permission; +using System; + +namespace NCC.Blind.Entitys.Dto.TbBoxLog +{ + /// + /// 抽奖记录输入参数 + /// + public class TbBoxLogListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 用户信息 + /// + public UserEntity user { get; set; } + + /// + /// 盲盒订单ID + /// + public string boxOrderId { get; set; } + /// + /// 盲盒订单信息 + /// + public TbBoxOrderEntity boxOrder { get; set; } + + /// + /// 路线 1--地域路线 2--人格路线 + /// + public string type { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 地域线路 + /// + public TbAreaLineEntity areaLine { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 人格线路信息 + /// + public TbMbtLineEntity mbtLine { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + /// + /// 地域信息 + /// + public TbAreaEntity area { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + /// + /// 人格信息 + /// + public TbMbtCharacterEntity mbt { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListQueryInput.cs new file mode 100644 index 0000000..0a57ab7 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogListQueryInput.cs @@ -0,0 +1,58 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxLog +{ + /// + /// 抽奖记录列表查询输入 + /// + public class TbBoxLogListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 盲盒订单ID + /// + public string boxOrderId { get; set; } + + /// + /// 路线 1--地域路线 2--人格路线 + /// + public string type { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogUpInput.cs new file mode 100644 index 0000000..2791107 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Dto/TbBoxLogUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxLog +{ + /// + /// 抽奖记录更新输入参数 + /// + public class TbBoxLogUpInput : TbBoxLogCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Entity/TbBoxLogEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Entity/TbBoxLogEntity.cs new file mode 100644 index 0000000..0d379fb --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Entity/TbBoxLogEntity.cs @@ -0,0 +1,74 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 抽奖记录 + /// + [SugarTable("tb_BoxLog")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbBoxLogEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 用户ID + /// + [SugarColumn(ColumnName = "F_UserId")] + public string UserId { get; set; } + + /// + /// 盲盒订单ID + /// + [SugarColumn(ColumnName = "F_BoxOrderId")] + public string BoxOrderId { get; set; } + + /// + /// 路线 1--地域路线 2--人格路线 + /// + [SugarColumn(ColumnName = "F_Type")] + public string Type { get; set; } + + /// + /// 地域线路ID + /// + [SugarColumn(ColumnName = "F_AreaLineId")] + public string AreaLineId { get; set; } + + /// + /// 人格线路ID + /// + [SugarColumn(ColumnName = "F_MbtLineId")] + public string MbtLineId { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + /// + /// 地域ID + /// + [SugarColumn(ColumnName = "F_AreaId")] + public string AreaId { get; set; } + + /// + /// 人格ID + /// + [SugarColumn(ColumnName = "F_MbtId")] + public string MbtId { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Mapper/TbBoxLogMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Mapper/TbBoxLogMapper.cs new file mode 100644 index 0000000..c06bb29 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/抽奖记录/Mapper/TbBoxLogMapper.cs @@ -0,0 +1,14 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbBoxLog; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbBoxLog +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotCrInput.cs new file mode 100644 index 0000000..06dfc06 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotCrInput.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbTravelSpot +{ + /// + /// 旅游景点修改输入参数 + /// + public class TbTravelSpotCrInput + { + /// + /// 图片信息 + /// + public List homeBanner { get; set; } + + /// + /// 景点图片 + /// + public List banner { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 富文本 + /// + public string editors { get; set; } + + /// + /// 原价 + /// + public decimal oldMoneys { get; set; } + + /// + /// 现价 + /// + public decimal nowMoneys { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotInfoOutput.cs new file mode 100644 index 0000000..caa4e5c --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotInfoOutput.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Dto.TbTravelSpot +{ + /// + /// 旅游景点输出参数 + /// + public class TbTravelSpotInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 图片信息 + /// + public List homeBanner { get; set; } + + /// + /// 景点图片 + /// + public List banner { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 富文本 + /// + public string editors { get; set; } + + /// + /// 原价 + /// + public decimal oldMoneys { get; set; } + + /// + /// 现价 + /// + public decimal nowMoneys { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListOutput.cs new file mode 100644 index 0000000..c1e0dc0 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListOutput.cs @@ -0,0 +1,93 @@ +using Aspose.Words.Lists; +using NCC.Common.Model; +using Newtonsoft.Json; +using SqlSugar; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTravelSpot +{ + /// + /// 旅游景点输入参数 + /// + public class TbTravelSpotListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + + /// + /// 景点富文本 + /// + public string editors { get; set; } + /// + /// 原价 + /// + public decimal? oldMoneys { get; set; } + + /// + /// 现价 + /// + public decimal? nowMoneys { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 图片信息 + /// + public string homeBanner { get; set; } + + /// + /// 图片信息集合 + /// + public List HomeBanner { get + { + try + { + return JsonConvert.DeserializeObject>(homeBanner); + }catch(Exception ex) + { + return new List(); + } + } } + + /// + /// 景点图片 + /// + public string banner { get; set; } + + /// + /// 景点图片集合 + /// + public List Banner { get + { + try + { + return JsonConvert.DeserializeObject>(banner); + }catch(Exception ex) + { + return new List(); + } + } } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListQueryInput.cs new file mode 100644 index 0000000..daa3e5a --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotListQueryInput.cs @@ -0,0 +1,33 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTravelSpot +{ + /// + /// 旅游景点列表查询输入 + /// + public class TbTravelSpotListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 标题 + /// + public string title { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotUpInput.cs new file mode 100644 index 0000000..9109134 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Dto/TbTravelSpotUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTravelSpot +{ + /// + /// 旅游景点更新输入参数 + /// + public class TbTravelSpotUpInput : TbTravelSpotCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Entity/TbTravelSpotEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Entity/TbTravelSpotEntity.cs new file mode 100644 index 0000000..eb4986c --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Entity/TbTravelSpotEntity.cs @@ -0,0 +1,75 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 旅游景点 + /// + [SugarTable("tb_TravelSpot")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbTravelSpotEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 图片信息 + /// + [SugarColumn(ColumnName = "F_HomeBanner")] + public string HomeBanner { get; set; } + + /// + /// 景点图片 + /// + [SugarColumn(ColumnName = "F_Banner")] + public string Banner { get; set; } + + /// + /// 标题 + /// + [SugarColumn(ColumnName = "F_Title")] + public string Title { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "F_Remark")] + public string Remark { get; set; } + + /// + /// 富文本 + /// + [SugarColumn(ColumnName = "F_Editors")] + public string Editors { get; set; } + + /// + /// 原价 + /// + [SugarColumn(ColumnName = "F_OldMoneys")] + public decimal OldMoneys { get; set; } + + /// + /// 现价 + /// + [SugarColumn(ColumnName = "F_NowMoneys")] + public decimal NowMoneys { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Mapper/TbTravelSpotMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Mapper/TbTravelSpotMapper.cs new file mode 100644 index 0000000..4e1fec8 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/旅游景点/Mapper/TbTravelSpotMapper.cs @@ -0,0 +1,23 @@ +using NCC.Common.Helper; +using NCC.Common.Model; +using NCC.Blind.Entitys.Dto.TbTravelSpot; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbTravelSpot +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(dest => dest.HomeBanner, src => src.homeBanner.ToJson()) + .Map(dest => dest.Banner, src => src.banner.ToJson()) + ; + config.ForType() + .Map(dest => dest.homeBanner, src => src.HomeBanner.ToObject>()) + .Map(dest => dest.banner, src => src.Banner.ToObject>()) + ; + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementCrInput.cs new file mode 100644 index 0000000..a656c12 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementCrInput.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbUserAgreement +{ + /// + /// 用户协议修改输入参数 + /// + public class TbUserAgreementCrInput + { + /// + /// 协议内容 + /// + public string contents { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementInfoOutput.cs new file mode 100644 index 0000000..3c14223 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementInfoOutput.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbUserAgreement +{ + /// + /// 用户协议输出参数 + /// + public class TbUserAgreementInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 协议内容 + /// + public string contents { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListOutput.cs new file mode 100644 index 0000000..9c35241 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListOutput.cs @@ -0,0 +1,32 @@ +using System; + +namespace NCC.Blind.Entitys.Dto.TbUserAgreement +{ + /// + /// 用户协议输入参数 + /// + public class TbUserAgreementListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 协议内容 + /// + public string contents { get; set; } + + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListQueryInput.cs new file mode 100644 index 0000000..fbdcdb2 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementListQueryInput.cs @@ -0,0 +1,23 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbUserAgreement +{ + /// + /// 用户协议列表查询输入 + /// + public class TbUserAgreementListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementUpInput.cs new file mode 100644 index 0000000..0cf78e1 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Dto/TbUserAgreementUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbUserAgreement +{ + /// + /// 用户协议更新输入参数 + /// + public class TbUserAgreementUpInput : TbUserAgreementCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Entity/TbUserAgreementEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Entity/TbUserAgreementEntity.cs new file mode 100644 index 0000000..6e4e645 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Entity/TbUserAgreementEntity.cs @@ -0,0 +1,39 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 用户协议 + /// + [SugarTable("tb_UserAgreement")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbUserAgreementEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 协议内容 + /// + [SugarColumn(ColumnName = "F_Contents")] + public string Contents { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Mapper/TbUserAgreementMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Mapper/TbUserAgreementMapper.cs new file mode 100644 index 0000000..53506be --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/用户协议/Mapper/TbUserAgreementMapper.cs @@ -0,0 +1,14 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbUserAgreement; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbUserAgreement +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendCrInput.cs new file mode 100644 index 0000000..35fd0cc --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendCrInput.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbRecommend +{ + /// + /// 盲盒介绍修改输入参数 + /// + public class TbRecommendCrInput + { + /// + /// 介绍内容 + /// + public string editors { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendInfoOutput.cs new file mode 100644 index 0000000..acff52c --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendInfoOutput.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbRecommend +{ + /// + /// 盲盒介绍输出参数 + /// + public class TbRecommendInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 介绍内容 + /// + public string editors { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListOutput.cs new file mode 100644 index 0000000..d0fb825 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListOutput.cs @@ -0,0 +1,31 @@ +using System; + +namespace NCC.Blind.Entitys.Dto.TbRecommend +{ + /// + /// 盲盒介绍输入参数 + /// + public class TbRecommendListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 介绍内容 + /// + public string editors { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListQueryInput.cs new file mode 100644 index 0000000..032d816 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendListQueryInput.cs @@ -0,0 +1,23 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbRecommend +{ + /// + /// 盲盒介绍列表查询输入 + /// + public class TbRecommendListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendUpInput.cs new file mode 100644 index 0000000..50434e1 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Dto/TbRecommendUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbRecommend +{ + /// + /// 盲盒介绍更新输入参数 + /// + public class TbRecommendUpInput : TbRecommendCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Entity/TbRecommendEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Entity/TbRecommendEntity.cs new file mode 100644 index 0000000..7f06c29 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Entity/TbRecommendEntity.cs @@ -0,0 +1,39 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 盲盒介绍 + /// + [SugarTable("tb_Recommend")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbRecommendEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 介绍内容 + /// + [SugarColumn(ColumnName = "F_Editors")] + public string Editors { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Mapper/TbRecommendMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Mapper/TbRecommendMapper.cs new file mode 100644 index 0000000..9f32a92 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒介绍/Mapper/TbRecommendMapper.cs @@ -0,0 +1,14 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbRecommend; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbRecommend +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponCrInput.cs new file mode 100644 index 0000000..c7c86c4 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponCrInput.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMyBoxCoupon +{ + /// + /// 盲盒券修改输入参数 + /// + public class TbMyBoxCouponCrInput + { + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 赠送人 + /// + public string giveUserId { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 类型 1--未使用 2--已使用 + /// + public string type { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + /// + /// 订单ID + /// + public string orderId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponInfoOutput.cs new file mode 100644 index 0000000..a33c1ad --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponInfoOutput.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMyBoxCoupon +{ + /// + /// 盲盒券输出参数 + /// + public class TbMyBoxCouponInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 赠送人 + /// + public string giveUserId { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 类型 1--未使用 2--已使用 + /// + public string type { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + /// + /// 订单ID + /// + public string orderId { get; set; } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListOutput.cs new file mode 100644 index 0000000..9fcdf1f --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListOutput.cs @@ -0,0 +1,70 @@ +using NCC.Blind.Entitys.Dto.TbBoxOrder; +using NCC.System.Entitys.Permission; +using System; + +namespace NCC.Blind.Entitys.Dto.TbMyBoxCoupon +{ + /// + /// 盲盒券输入参数 + /// + public class TbMyBoxCouponListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + /// + /// 用户信息 + /// + public UserEntity user { get; set; } + + /// + /// 赠送人 + /// + public string giveUserId { get; set; } + /// + /// 赠送人信息 + /// + public UserEntity giveUser { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 类型 1--未使用 2--已使用 + /// + public string type { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + /// + /// 订单ID + /// + public string orderId { get; set; } + + /// + /// 订单信息 + /// + public TbBoxOrderListOutput order { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListQueryInput.cs new file mode 100644 index 0000000..dd7dbb1 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponListQueryInput.cs @@ -0,0 +1,52 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMyBoxCoupon +{ + /// + /// 盲盒券列表查询输入 + /// + public class TbMyBoxCouponListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 赠送人 + /// + public string giveUserId { get; set; } + + /// + /// 备注 + /// + public string remark { get; set; } + + /// + /// 类型 1--未使用 2--已使用 + /// + public string type { get; set; } + + /// + /// 标题 + /// + public string title { get; set; } + /// + /// 订单ID + /// + public string orderId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponUpInput.cs new file mode 100644 index 0000000..6a95ee8 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Dto/TbMyBoxCouponUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbMyBoxCoupon +{ + /// + /// 盲盒券更新输入参数 + /// + public class TbMyBoxCouponUpInput : TbMyBoxCouponCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Entity/TbMyBoxCouponEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Entity/TbMyBoxCouponEntity.cs new file mode 100644 index 0000000..c68bdfb --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Entity/TbMyBoxCouponEntity.cs @@ -0,0 +1,68 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 盲盒券 + /// + [SugarTable("tb_MyBoxCoupon")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbMyBoxCouponEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 用户ID + /// + [SugarColumn(ColumnName = "F_UserId")] + public string UserId { get; set; } + + /// + /// 赠送人 + /// + [SugarColumn(ColumnName = "F_GiveUserId")] + public string GiveUserId { get; set; } + + /// + /// 备注 + /// + [SugarColumn(ColumnName = "F_Remark")] + public string Remark { get; set; } + + /// + /// 类型 1--未使用 2--已使用 + /// + [SugarColumn(ColumnName = "F_Type")] + public string Type { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + /// + /// 标题 + /// + [SugarColumn(ColumnName = "F_Title")] + public string Title { get; set; } + /// + /// 订单ID + /// + [SugarColumn(ColumnName = "F_OrderId")] + public string OrderId { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Mapper/TbMyBoxCouponMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Mapper/TbMyBoxCouponMapper.cs new file mode 100644 index 0000000..a03b062 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒券/Mapper/TbMyBoxCouponMapper.cs @@ -0,0 +1,14 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbMyBoxCoupon; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbMyBoxCoupon +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderCrInput.cs new file mode 100644 index 0000000..c102e92 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderCrInput.cs @@ -0,0 +1,87 @@ +using NCC.Common.Model; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxOrder +{ + /// + /// 盲盒订单修改输入参数 + /// + public class TbBoxOrderCrInput + { + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 路线 1--地域路线 2--MBT人格路线 + /// + public string type { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 总金额 + /// + public decimal totalPrice { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 购买类型 1--自己购买 2--赠送他人 + /// + public string isMe { get; set; } + + /// + /// 赠送人用户ID + /// + public string giveUserId { get; set; } + + /// + /// 盲盒券ID + /// + public string myBoxCouponId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + /// + /// 二维码 + /// + public List qrCode { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderInfoOutput.cs new file mode 100644 index 0000000..3344a83 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderInfoOutput.cs @@ -0,0 +1,102 @@ +using NCC.Common.Model; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxOrder +{ + /// + /// 盲盒订单输出参数 + /// + public class TbBoxOrderInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 路线 1--地域路线 2--MBT人格路线 + /// + public string type { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 地域线路节点ID + /// + public string areaLineNodeId { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 人格线路节点ID + /// + public string mbtLineNodeId { get; set; } + + /// + /// 总金额 + /// + public decimal totalPrice { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 购买类型 1--自己购买 2--赠送他人 + /// + public string isMe { get; set; } + + /// + /// 赠送人用户ID + /// + public string giveUserId { get; set; } + + /// + /// 盲盒券ID + /// + public string myBoxCouponId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + /// + /// 二维码 + /// + public List qrCode { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListOutput.cs new file mode 100644 index 0000000..8e1f4d1 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListOutput.cs @@ -0,0 +1,159 @@ +using Aspose.Words.Lists; +using NCC.Common.Model; +using NCC.Education.Entitys; +using NCC.System.Entitys.Permission; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxOrder +{ + /// + /// 盲盒订单输入参数 + /// + public class TbBoxOrderListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 用户信息 + /// + public UserEntity user { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 路线 1--地域路线 2--MBT人格路线 + /// + public string type { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 地域信息 + /// + public TbAreaEntity area { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 地域线路信息 + /// + public TbAreaLineEntity areaLine { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + /// + /// 人格信息 + /// + public TbMbtCharacterEntity mbt { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 人格线路信息 + /// + public TbMbtLineEntity mbtLine { get; set; } + + /// + /// 总金额 + /// + public decimal totalPrice { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 购买类型 1--自己购买 2--赠送他人 + /// + public string isMe { get; set; } + + /// + /// 赠送人用户ID + /// + public string giveUserId { get; set; } + /// + /// 赠送人信息 + /// + public UserEntity giveUser { get; set; } + + /// + /// 盲盒券ID + /// + public string myBoxCouponId { get; set; } + + + /// + /// 盲盒券信息 + /// + public TbMyBoxCouponEntity myBoxCoupon { get; set; } + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + /// + /// 二维码 + /// + public string qrCode { get; set; } + /// + /// 二维码 + /// + public List QrCode { get + { + try + { + return JsonConvert.DeserializeObject>(qrCode); + }catch(Exception ex) + { + return new List(); + } + } } + + /// + /// 门票订单信息 + /// + public TbTicketsOrderEntity tickets { get; set; } + + + /// + /// 是否填写了个人信息 1--未填写 2--已填写 + /// + public string isAppend { get; set; } + + /// + /// 是否可抽奖 1--不可抽 2--可抽 + /// + public string isAnewDraw { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListQueryInput.cs new file mode 100644 index 0000000..c6af88b --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderListQueryInput.cs @@ -0,0 +1,78 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxOrder +{ + /// + /// 盲盒订单列表查询输入 + /// + public class TbBoxOrderListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 路线 1--地域路线 2--MBT人格路线 + /// + public string type { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + /// + /// 地域线路ID + /// + public string areaLineId { get; set; } + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + /// + /// 人格线路ID + /// + public string mbtLineId { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 购买类型 1--自己购买 2--赠送他人 + /// + public string isMe { get; set; } + + /// + /// 赠送人用户ID + /// + public string giveUserId { get; set; } + + /// + /// 盲盒券ID + /// + public string myBoxCouponId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderUpInput.cs new file mode 100644 index 0000000..3eed4d4 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Dto/TbBoxOrderUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbBoxOrder +{ + /// + /// 盲盒订单更新输入参数 + /// + public class TbBoxOrderUpInput : TbBoxOrderCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Entity/TbBoxOrderEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Entity/TbBoxOrderEntity.cs new file mode 100644 index 0000000..4a1316e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Entity/TbBoxOrderEntity.cs @@ -0,0 +1,122 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 盲盒订单 + /// + [SugarTable("tb_BoxOrder")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbBoxOrderEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 用户ID + /// + [SugarColumn(ColumnName = "F_UserId")] + public string UserId { get; set; } + + /// + /// 订单号 + /// + [SugarColumn(ColumnName = "F_OrderNumber")] + public string OrderNumber { get; set; } + + /// + /// 路线 1--地域路线 2--MBT人格路线 + /// + [SugarColumn(ColumnName = "F_Type")] + public string Type { get; set; } + + /// + /// 地域ID + /// + [SugarColumn(ColumnName = "F_AreaId")] + public string AreaId { get; set; } + + /// + /// 地域线路ID + /// + [SugarColumn(ColumnName = "F_AreaLineId")] + public string AreaLineId { get; set; } + + ///// + ///// 地域线路节点ID + ///// + //[SugarColumn(ColumnName = "F_AreaLineNodeId")] + //public string AreaLineNodeId { get; set; } + + /// + /// 人格ID + /// + [SugarColumn(ColumnName = "F_MbtId")] + public string MbtId { get; set; } + + /// + /// 人格线路ID + /// + [SugarColumn(ColumnName = "F_MbtLineId")] + public string MbtLineId { get; set; } + + ///// + ///// 人格线路节点ID + ///// + //[SugarColumn(ColumnName = "F_MbtLineNodeId")] + //public string MbtLineNodeId { get; set; } + + /// + /// 总金额 + /// + [SugarColumn(ColumnName = "F_TotalPrice")] + public decimal TotalPrice { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + [SugarColumn(ColumnName = "F_Status")] + public string Status { get; set; } + + /// + /// 购买类型 1--自己购买 2--赠送他人 + /// + [SugarColumn(ColumnName = "F_IsMe")] + public string IsMe { get; set; } + + /// + /// 赠送人用户ID + /// + [SugarColumn(ColumnName = "F_GiveUserId")] + public string GiveUserId { get; set; } + + /// + /// 盲盒券ID + /// + [SugarColumn(ColumnName = "F_MyBoxCouponId")] + public string MyBoxCouponId { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + /// + /// 二维码 + /// + [SugarColumn(ColumnName = "F_QrCode")] + public string QrCode { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Mapper/TbBoxOrderMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Mapper/TbBoxOrderMapper.cs new file mode 100644 index 0000000..448658e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/盲盒订单/Mapper/TbBoxOrderMapper.cs @@ -0,0 +1,21 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbBoxOrder; +using Mapster; +using System.Collections.Generic; +using NCC.Common.Model; + +namespace NCC.Blind.Entitys.Mapper.TbBoxOrder +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + config.ForType() + .Map(dest => dest.QrCode, src => src.qrCode.ToJson()) + ; + config.ForType() + .Map(dest => dest.qrCode, src => src.QrCode.ToObject>()) + ; + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/视频信息/Dto/TbVideoListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/视频信息/Dto/TbVideoListOutput.cs index 18be588..388a48d 100644 --- a/antis-ncc-net-core/NCC.BlindBox.Entitys/视频信息/Dto/TbVideoListOutput.cs +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/视频信息/Dto/TbVideoListOutput.cs @@ -1,4 +1,8 @@ -using System; +using Aspose.Words.Lists; +using NCC.Common.Model; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; namespace NCC.Education.Entitys.Dto.TbVideo { @@ -21,6 +25,21 @@ namespace NCC.Education.Entitys.Dto.TbVideo /// 修改时间 /// public DateTime? lastModifyTime { get; set; } + /// + /// 视频信息 + /// + public string url { get; set; } + + public List UrlList { get + { + try + { + return JsonConvert.DeserializeObject>(url); + }catch(Exception ex) + { + return new List(); + } + } } } } diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderCrInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderCrInput.cs new file mode 100644 index 0000000..2476834 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderCrInput.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTicketsOrder +{ + /// + /// 门票订单修改输入参数 + /// + public class TbTicketsOrderCrInput + { + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 真实姓名 + /// + public string name { get; set; } + + /// + /// 身份证号码 + /// + public string idCard { get; set; } + + /// + /// 电话号码 + /// + public string phone { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 金额 + /// + public decimal totalPrice { get; set; } + + /// + /// 订单ID + /// + public string orderId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderInfoOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderInfoOutput.cs new file mode 100644 index 0000000..5447407 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderInfoOutput.cs @@ -0,0 +1,67 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTicketsOrder +{ + /// + /// 门票订单输出参数 + /// + public class TbTicketsOrderInfoOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 真实姓名 + /// + public string name { get; set; } + + /// + /// 身份证号码 + /// + public string idCard { get; set; } + + /// + /// 电话号码 + /// + public string phone { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 金额 + /// + public decimal totalPrice { get; set; } + + /// + /// 订单ID + /// + public string orderId { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListOutput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListOutput.cs new file mode 100644 index 0000000..0413403 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListOutput.cs @@ -0,0 +1,76 @@ +using NCC.System.Entitys.Permission; +using System; + +namespace NCC.Blind.Entitys.Dto.TbTicketsOrder +{ + /// + /// 门票订单输入参数 + /// + public class TbTicketsOrderListOutput + { + /// + /// 主键 + /// + public string id { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + /// + /// 用户信息 + /// + public UserEntity user { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 真实姓名 + /// + public string name { get; set; } + + /// + /// 身份证号码 + /// + public string idCard { get; set; } + + /// + /// 电话号码 + /// + public string phone { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 金额 + /// + public decimal totalPrice { get; set; } + + /// + /// 订单ID + /// + public string orderId { get; set; } + + /// + /// 盲盒订单信息 + /// + public TbBoxOrderEntity order { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListQueryInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListQueryInput.cs new file mode 100644 index 0000000..9caa7a9 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderListQueryInput.cs @@ -0,0 +1,58 @@ +using NCC.Common.Filter; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTicketsOrder +{ + /// + /// 门票订单列表查询输入 + /// + public class TbTicketsOrderListQueryInput : PageInputBase + { + /// + /// 选择导出数据key + /// + public string selectKey { get; set; } + + /// + /// + /// + public int dataType { get; set; } + + + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 订单号 + /// + public string orderNumber { get; set; } + + /// + /// 真实姓名 + /// + public string name { get; set; } + + /// + /// 身份证号码 + /// + public string idCard { get; set; } + + /// + /// 电话号码 + /// + public string phone { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + public string status { get; set; } + + /// + /// 订单ID + /// + public string orderId { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderUpInput.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderUpInput.cs new file mode 100644 index 0000000..9a97ecf --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Dto/TbTicketsOrderUpInput.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Dto.TbTicketsOrder +{ + /// + /// 门票订单更新输入参数 + /// + public class TbTicketsOrderUpInput : TbTicketsOrderCrInput + { + /// + /// 主键 + /// + public string id { get; set; } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Entity/TbTicketsOrderEntity.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Entity/TbTicketsOrderEntity.cs new file mode 100644 index 0000000..f03d602 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Entity/TbTicketsOrderEntity.cs @@ -0,0 +1,81 @@ +using NCC.Common.Const; +using SqlSugar; +using System; + +namespace NCC.Blind.Entitys +{ + /// + /// 门票订单 + /// + [SugarTable("tb_TicketsOrder")] + [Tenant(ClaimConst.TENANT_ID)] + public class TbTicketsOrderEntity + { + /// + /// 主键 + /// + [SugarColumn(ColumnName = "F_Id", IsPrimaryKey = true)] + public string Id { get; set; } + + /// + /// 用户ID + /// + [SugarColumn(ColumnName = "F_UserId")] + public string UserId { get; set; } + + /// + /// 订单号 + /// + [SugarColumn(ColumnName = "F_OrderNumber")] + public string OrderNumber { get; set; } + + /// + /// 真实姓名 + /// + [SugarColumn(ColumnName = "F_Name")] + public string Name { get; set; } + + /// + /// 身份证号码 + /// + [SugarColumn(ColumnName = "F_IdCard")] + public string IdCard { get; set; } + + /// + /// 电话号码 + /// + [SugarColumn(ColumnName = "F_Phone")] + public string Phone { get; set; } + + /// + /// 状态 1--未付款 2--已付款 3--已完成 + /// + [SugarColumn(ColumnName = "F_Status")] + public string Status { get; set; } + + /// + /// 金额 + /// + [SugarColumn(ColumnName = "F_TotalPrice")] + public decimal TotalPrice { get; set; } + + /// + /// 订单ID + /// + [SugarColumn(ColumnName = "F_OrderId")] + public string OrderId { get; set; } + + /// + /// 创建时间 + /// + [SugarColumn(ColumnName = "F_CreatorTime")] + public DateTime? CreatorTime { get; set; } + + /// + /// 修改时间 + /// + [SugarColumn(ColumnName = "F_LastModifyTime")] + public DateTime? LastModifyTime { get; set; } + + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Mapper/TbTicketsOrderMapper.cs b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Mapper/TbTicketsOrderMapper.cs new file mode 100644 index 0000000..8cde5cc --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Entitys/门票订单/Mapper/TbTicketsOrderMapper.cs @@ -0,0 +1,14 @@ +using NCC.Common.Helper; +using NCC.Blind.Entitys.Dto.TbTicketsOrder; +using Mapster; +using System.Collections.Generic; + +namespace NCC.Blind.Entitys.Mapper.TbTicketsOrder +{ + public class Mapper : IRegister + { + public void Register(TypeAdapterConfig config) + { + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路/ITbMbtLineService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路/ITbMbtLineService.cs new file mode 100644 index 0000000..e100470 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路/ITbMbtLineService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbMbtLine +{ + public interface ITbMbtLineService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路节点/ITbMbtLineNodeService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路节点/ITbMbtLineNodeService.cs new file mode 100644 index 0000000..bfd932e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/MBT人格线路节点/ITbMbtLineNodeService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbMbtLineNode +{ + public interface ITbMbtLineNodeService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/NCC.BlindBox.Interfaces.csproj b/antis-ncc-net-core/NCC.BlindBox.Interfaces/NCC.BlindBox.Interfaces.csproj index 781507c..51f6052 100644 --- a/antis-ncc-net-core/NCC.BlindBox.Interfaces/NCC.BlindBox.Interfaces.csproj +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/NCC.BlindBox.Interfaces.csproj @@ -1,7 +1,8 @@ - + net5.0 + True diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/价格设定/ITbSettingPriceService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/价格设定/ITbSettingPriceService.cs new file mode 100644 index 0000000..4cea5df --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/价格设定/ITbSettingPriceService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbSettingPrice +{ + public interface ITbSettingPriceService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路/ITbAreaLineService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路/ITbAreaLineService.cs new file mode 100644 index 0000000..5439fe3 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路/ITbAreaLineService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbAreaLine +{ + public interface ITbAreaLineService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路节点/ITbAreaLineNodeService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路节点/ITbAreaLineNodeService.cs new file mode 100644 index 0000000..ff73a44 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/地域线路节点/ITbAreaLineNodeService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbAreaLineNode +{ + public interface ITbAreaLineNodeService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/抽奖记录/ITbBoxLogService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/抽奖记录/ITbBoxLogService.cs new file mode 100644 index 0000000..43f9679 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/抽奖记录/ITbBoxLogService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbBoxLog +{ + public interface ITbBoxLogService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/旅游景点/ITbTravelSpotService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/旅游景点/ITbTravelSpotService.cs new file mode 100644 index 0000000..e082a1e --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/旅游景点/ITbTravelSpotService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbTravelSpot +{ + public interface ITbTravelSpotService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/用户协议/ITbUserAgreementService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/用户协议/ITbUserAgreementService.cs new file mode 100644 index 0000000..fedaf53 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/用户协议/ITbUserAgreementService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbUserAgreement +{ + public interface ITbUserAgreementService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒介绍/ITbRecommendService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒介绍/ITbRecommendService.cs new file mode 100644 index 0000000..24dc4af --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒介绍/ITbRecommendService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbRecommend +{ + public interface ITbRecommendService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒券/ITbMyBoxCouponService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒券/ITbMyBoxCouponService.cs new file mode 100644 index 0000000..5cc79df --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒券/ITbMyBoxCouponService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbMyBoxCoupon +{ + public interface ITbMyBoxCouponService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒订单/ITbBoxOrderService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒订单/ITbBoxOrderService.cs new file mode 100644 index 0000000..bb7c4bb --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/盲盒订单/ITbBoxOrderService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbBoxOrder +{ + public interface ITbBoxOrderService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox.Interfaces/门票订单/ITbTicketsOrderService.cs b/antis-ncc-net-core/NCC.BlindBox.Interfaces/门票订单/ITbTicketsOrderService.cs new file mode 100644 index 0000000..e813e25 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox.Interfaces/门票订单/ITbTicketsOrderService.cs @@ -0,0 +1,6 @@ +namespace NCC.Blind.Interfaces.TbTicketsOrder +{ + public interface ITbTicketsOrderService + { + } +} \ No newline at end of file diff --git a/antis-ncc-net-core/NCC.BlindBox/BlindBoxStatus.cs b/antis-ncc-net-core/NCC.BlindBox/BlindBoxStatus.cs new file mode 100644 index 0000000..2199507 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/BlindBoxStatus.cs @@ -0,0 +1,101 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NCC.BlindBox +{ + /// + /// 枚举类 + /// + public class BlindBoxStatus + { + + /// + /// 购买类型 + /// + public enum BlindIsMeStatus + { + [Description("自己购买")] + 自己购买=1, + [Description("赠送他人")] + 赠送他人=2 + } + + /// + /// 支付状态 + /// + public enum BlindBoxOrderStatus + { + /// + /// 未付款 + /// + [Description("未付款")] + 未付款=1, + /// + /// 已付款 + /// + [Description("已付款")] + 已付款 =2, + /// + /// 已完成 + /// + [Description("已完成")] + 已完成 =3 + } + + /// + /// 路线类型 + /// + public enum BlindBoxLineStatus + { + /// + /// 地域线路 + /// + [Description("地域线路")] + 地域线路 = 1, + /// + /// MBT人格线路 + /// + [Description("MBT人格线路")] + MBT人格线路= 2 + } + + /// + /// 价格设定枚举 + /// + public enum BlindBoxSettingPriceType + { + /// + /// 盲盒价格 + /// + [Description("盲盒价格")] + 盲盒价格=1, + /// + /// 门票价格 + /// + [Description("门票价格")] + 门票价格=2 + } + + /// + /// 盲盒券状态 + /// + public enum BlindBoxCouponStatus + { + /// + /// 未使用 + /// + [Description("未使用")] + 未使用=1, + /// + /// 已使用 + /// + [Description("已使用")] + 已使用 = 2, + } + + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/MBT人格/TbMbtCharacterService.cs b/antis-ncc-net-core/NCC.BlindBox/MBT人格/TbMbtCharacterService.cs index 17528f4..d181c3e 100644 --- a/antis-ncc-net-core/NCC.BlindBox/MBT人格/TbMbtCharacterService.cs +++ b/antis-ncc-net-core/NCC.BlindBox/MBT人格/TbMbtCharacterService.cs @@ -23,14 +23,19 @@ using NCC.Common.Configuration; using NCC.DataEncryption; using NCC.ClayObject; using NCC.System.Interfaces.System; +using NCC.Blind.Entitys.Dto.TbAreaLineNode; +using NCC.Blind.Entitys; +using static NCC.Education.TbArea.TbAreaService; +using System.ComponentModel.DataAnnotations; +using NCC.Blind.Entitys.Dto.TbMbtLineNode; namespace NCC.Education.TbMbtCharacter { /// /// MBT人格服务 /// - [ApiDescriptionSettings(Tag = "Education",Name = "TbMbtCharacter", Order = 200)] - [Route("api/Education/[controller]")] + [ApiDescriptionSettings(Tag = "MBT人格服务",Name = "TbMbtCharacter", Order = 200)] + [Route("api/Blind/[controller]")] public class TbMbtCharacterService : ITbMbtCharacterService, IDynamicApiController, ITransient { private readonly ISqlSugarRepository _tbMbtCharacterRepository; @@ -54,6 +59,61 @@ namespace NCC.Education.TbMbtCharacter _dataBaseService = dataBaseService; _userManager = userManager; } + /// + /// 根据MBT人格ID查询MBT人格线路节点入参 + /// + public class MbtLineNodeOptions : PageInputBase + { + /// + /// MBT人格ID + /// + [Required(ErrorMessage = "MBT人格不能为空")] + public string mbtId { get; set; } + } + + /// + /// 根据MBTI人格查询人格线路节点 + /// + /// + /// + [HttpPost("GetMbtLineNodeByAreaId")] + public async Task GetMbtLineNodeByAreaId(MbtLineNodeOptions input) + { + List areaLineIds = new List(); + var areaLineList = _db.Queryable().Where(o => o.MbtId == input.mbtId).ToList(); + foreach (var item in areaLineList) + { + areaLineIds.Add(item.Id); + } + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + + .WhereIF(!string.IsNullOrEmpty(input.mbtId), p => areaLineIds.Contains(p.MbtLineId)) + .Select(it => new TbMbtLineNodeListOutput + { + id = it.Id, + mbtLineId = it.MbtLineId, + title = it.Title, + //description = it.Description, + remark = it.Remark, + creatorTime = it.CreatorTime, + lastModifyTime = it.LastModifyTime, + banner = it.Banner, + sorts = it.Sorts, + + }).MergeTable().Mapper(p => + { + p.mbtLine = _db.Queryable().Where(o => o.Id == p.mbtLineId).First(); + }).OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + + + + + + /// /// 获取MBT人格 diff --git a/antis-ncc-net-core/NCC.BlindBox/MBT人格线路/TbMbtLineService.cs b/antis-ncc-net-core/NCC.BlindBox/MBT人格线路/TbMbtLineService.cs new file mode 100644 index 0000000..00df940 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/MBT人格线路/TbMbtLineService.cs @@ -0,0 +1,334 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbMbtLine; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbMbtLine; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; +using NCC.Education.Entitys; + +namespace NCC.Blind.TbMbtLine +{ + /// + /// MBT人格线路服务 + /// + [ApiDescriptionSettings(Tag = "MBT人格线路",Name = "TbMbtLine", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbMbtLineService : ITbMbtLineService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbMbtLineRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbMbtLineService( + ISqlSugarRepository tbMbtLineRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbMbtLineRepository = tbMbtLineRepository; + _db = _tbMbtLineRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取MBT人格线路 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + + /// + /// 根据MBT人格ID查询MBT人格线路 + /// + /// + /// + [HttpPost("GetMbtLByMbtId")] + public async Task GetMbtLByMbtId(string id) + { + var model = _db.Queryable().Where(o => o.MbtId == id).First(); + return model; + } + + + + + + /// + /// 获取MBT人格线路列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbMbtLineListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.name), p => p.Name.Contains(input.name)) + .WhereIF(!string.IsNullOrEmpty(input.mbtId), p => p.MbtId.Equals(input.mbtId)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbMbtLineListOutput + { + id = it.Id, + name=it.Name, + mbtId=it.MbtId, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + banner=it.Banner + }).MergeTable().Mapper(p => + { + p.mbt = _db.Queryable().Where(o => o.Id == p.mbtId).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建MBT人格线路 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbMbtLineCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + //var model = _db.Queryable().Where(o => o.MbtId == entity.MbtId).First(); + //if (!model.IsNullOrEmpty()) throw NCCException.Oh($"该人格下已存在一条线路!"); + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取MBT人格线路无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbMbtLineListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.name), p => p.Name.Contains(input.name)) + .WhereIF(!string.IsNullOrEmpty(input.mbtId), p => p.MbtId.Equals(input.mbtId)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbMbtLineListOutput + { + id = it.Id, + name=it.Name, + mbtId=it.MbtId, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出MBT人格线路 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbMbtLineListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"MBT人格\",\"field\":\"mbtId\"},{\"value\":\"标题\",\"field\":\"name\"},{\"value\":\"线路概况\",\"field\":\"remark\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "MBT人格线路.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除MBT人格线路 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除MBT人格线路 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新MBT人格线路 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbMbtLineUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除MBT人格线路 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/MBT人格线路节点/TbMbtLineNodeService.cs b/antis-ncc-net-core/NCC.BlindBox/MBT人格线路节点/TbMbtLineNodeService.cs new file mode 100644 index 0000000..242b898 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/MBT人格线路节点/TbMbtLineNodeService.cs @@ -0,0 +1,320 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbMbtLineNode; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbMbtLineNode; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; + +namespace NCC.Blind.TbMbtLineNode +{ + /// + /// MBT人格线路节点服务 + /// + [ApiDescriptionSettings(Tag = "MBT人格线路节点",Name = "TbMbtLineNode", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbMbtLineNodeService : ITbMbtLineNodeService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbMbtLineNodeRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbMbtLineNodeService( + ISqlSugarRepository tbMbtLineNodeRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbMbtLineNodeRepository = tbMbtLineNodeRepository; + _db = _tbMbtLineNodeRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取MBT人格线路节点 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取MBT人格线路节点列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbMbtLineNodeListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.mbtLineId), p => p.MbtLineId.Equals(input.mbtLineId)) + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.description), p => p.Description.Contains(input.description)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbMbtLineNodeListOutput + { + id = it.Id, + mbtLineId=it.MbtLineId, + title=it.Title, + description=it.Description, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + sorts=it.Sorts, + banner=it.Banner, + }).MergeTable().Mapper(p => + { + p.mbtLine = _db.Queryable().Where(o => o.Id == p.mbtLineId).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建MBT人格线路节点 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbMbtLineNodeCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取MBT人格线路节点无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbMbtLineNodeListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.mbtLineId), p => p.MbtLineId.Equals(input.mbtLineId)) + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.description), p => p.Description.Contains(input.description)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbMbtLineNodeListOutput + { + id = it.Id, + mbtLineId=it.MbtLineId, + title=it.Title, + description=it.Description, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + sorts = it.Sorts + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出MBT人格线路节点 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbMbtLineNodeListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"MBT人格线路\",\"field\":\"mbtLineId\"},{\"value\":\"节点标题\",\"field\":\"title\"},{\"value\":\"节点简介\",\"field\":\"description\"},{\"value\":\"节点注意事项\",\"field\":\"remark\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},{\"value\":\"排序\",\"field\":\"sorts\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "MBT人格线路节点.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除MBT人格线路节点 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除MBT人格线路节点 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新MBT人格线路节点 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbMbtLineNodeUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除MBT人格线路节点 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/NCC.BlindBox.csproj b/antis-ncc-net-core/NCC.BlindBox/NCC.BlindBox.csproj index a11dd3d..057762c 100644 --- a/antis-ncc-net-core/NCC.BlindBox/NCC.BlindBox.csproj +++ b/antis-ncc-net-core/NCC.BlindBox/NCC.BlindBox.csproj @@ -2,6 +2,7 @@ net5.0 + True diff --git a/antis-ncc-net-core/NCC.BlindBox/价格设定/TbSettingPriceService.cs b/antis-ncc-net-core/NCC.BlindBox/价格设定/TbSettingPriceService.cs new file mode 100644 index 0000000..d7b96ba --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/价格设定/TbSettingPriceService.cs @@ -0,0 +1,304 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbSettingPrice; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbSettingPrice; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; + +namespace NCC.Blind.TbSettingPrice +{ + /// + /// 价格设定服务 + /// + [ApiDescriptionSettings(Tag = "价格设定",Name = "TbSettingPrice", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbSettingPriceService : ITbSettingPriceService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbSettingPriceRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbSettingPriceService( + ISqlSugarRepository tbSettingPriceRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbSettingPriceRepository = tbSettingPriceRepository; + _db = _tbSettingPriceRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取价格设定 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取价格设定列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbSettingPriceListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .Select(it=> new TbSettingPriceListOutput + { + id = it.Id, + price=it.Price, + type=it.Type, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建价格设定 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbSettingPriceCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取价格设定无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbSettingPriceListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .Select(it=> new TbSettingPriceListOutput + { + id = it.Id, + price=it.Price, + type=it.Type, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出价格设定 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbSettingPriceListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"价格\",\"field\":\"price\"},{\"value\":\"类型\",\"field\":\"type\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "价格设定.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除价格设定 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除价格设定 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新价格设定 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbSettingPriceUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除价格设定 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/地域管理/TbAreaService.cs b/antis-ncc-net-core/NCC.BlindBox/地域管理/TbAreaService.cs index ebb388f..f3f218a 100644 --- a/antis-ncc-net-core/NCC.BlindBox/地域管理/TbAreaService.cs +++ b/antis-ncc-net-core/NCC.BlindBox/地域管理/TbAreaService.cs @@ -23,14 +23,17 @@ using NCC.Common.Configuration; using NCC.DataEncryption; using NCC.ClayObject; using NCC.System.Interfaces.System; +using NCC.Blind.Entitys; +using System.ComponentModel.DataAnnotations; +using NCC.Blind.Entitys.Dto.TbAreaLineNode; namespace NCC.Education.TbArea { /// /// 地域管理服务 /// - [ApiDescriptionSettings(Tag = "Education",Name = "TbArea", Order = 200)] - [Route("api/Education/[controller]")] + [ApiDescriptionSettings(Tag = "地域管理",Name = "TbArea", Order = 200)] + [Route("api/Blind/[controller]")] public class TbAreaService : ITbAreaService, IDynamicApiController, ITransient { private readonly ISqlSugarRepository _tbAreaRepository; @@ -55,6 +58,62 @@ namespace NCC.Education.TbArea _userManager = userManager; } + + /// + /// 根据地域ID查询地域线路节点入参 + /// + public class AreaLineNodeOptions : PageInputBase + { + /// + /// 地域ID + /// + [Required(ErrorMessage = "地域ID不能为空")] + public string areaId { get; set; } + } + + /// + /// 根据地域ID查询地域线路节点 + /// + /// + /// + [HttpPost("GetAreaLineNodeByAreaId")] + public async Task GetAreaLineNodeByAreaId(AreaLineNodeOptions input) + { + List areaLineIds = new List(); + var areaLineList = _db.Queryable().Where(o => o.AreaId == input.areaId).ToList(); + foreach (var item in areaLineList) + { + areaLineIds.Add(item.Id); + } + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + + .WhereIF(!string.IsNullOrEmpty(input.areaId), p =>areaLineIds.Contains(p.AreaLineId)) + .Select(it => new TbAreaLineNodeListOutput + { + id = it.Id, + areaLineId = it.AreaLineId, + title = it.Title, + //description = it.Description, + remark = it.Remark, + creatorTime = it.CreatorTime, + lastModifyTime = it.LastModifyTime, + banner = it.Banner, + sorts = it.Sorts, + + }).MergeTable().Mapper(p => + { + p.areaLine = _db.Queryable().Where(o => o.Id == p.areaLineId).First(); + }).OrderBy(sidx + " " + input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + + + + + + /// /// 获取地域管理 /// diff --git a/antis-ncc-net-core/NCC.BlindBox/地域线路/TbAreaLineService.cs b/antis-ncc-net-core/NCC.BlindBox/地域线路/TbAreaLineService.cs new file mode 100644 index 0000000..68fddbc --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/地域线路/TbAreaLineService.cs @@ -0,0 +1,330 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbAreaLine; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbAreaLine; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; +using NCC.Education.Entitys; + +namespace NCC.Blind.TbAreaLine +{ + /// + /// 地域线路服务 + /// + [ApiDescriptionSettings(Tag = "地域线路",Name = "TbAreaLine", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbAreaLineService : ITbAreaLineService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbAreaLineRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbAreaLineService( + ISqlSugarRepository tbAreaLineRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbAreaLineRepository = tbAreaLineRepository; + _db = _tbAreaLineRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + + /// + /// 根据地域ID查询地域线路 + /// + /// + /// + [HttpPost("GetAreaLByAreaId")] + public async Task GetAreaLByAreaId(string id) + { + var model = _db.Queryable().Where(o => o.AreaId == id).First(); + return model; + } + + /// + /// 获取地域线路 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取地域线路列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbAreaLineListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.areaId), p => p.AreaId.Equals(input.areaId)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbAreaLineListOutput + { + id = it.Id, + title=it.Title, + areaId=it.AreaId, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + banner=it.Banner, + }).MergeTable().Mapper(p => + { + p.area = _db.Queryable().Where(o => o.Id == p.areaId).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建地域线路 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbAreaLineCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + //var model = _db.Queryable().Where(o => o.AreaId == entity.AreaId).First(); + //if (!model.IsNullOrEmpty()) throw NCCException.Oh($"该地域下已经存在一条线路!"); + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取地域线路无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbAreaLineListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.areaId), p => p.AreaId.Equals(input.areaId)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbAreaLineListOutput + { + id = it.Id, + title=it.Title, + areaId=it.AreaId, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出地域线路 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbAreaLineListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"地域\",\"field\":\"areaId\"},{\"value\":\"线路标题\",\"field\":\"title\"},{\"value\":\"线路概况\",\"field\":\"remark\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "地域线路.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除地域线路 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除地域线路 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新地域线路 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbAreaLineUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除地域线路 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/地域线路节点/TbAreaLineNodeService.cs b/antis-ncc-net-core/NCC.BlindBox/地域线路节点/TbAreaLineNodeService.cs new file mode 100644 index 0000000..817ba0c --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/地域线路节点/TbAreaLineNodeService.cs @@ -0,0 +1,324 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbAreaLineNode; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbAreaLineNode; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; + +namespace NCC.Blind.TbAreaLineNode +{ + /// + /// 地域线路节点服务 + /// + [ApiDescriptionSettings(Tag = "地域线路节点",Name = "TbAreaLineNode", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbAreaLineNodeService : ITbAreaLineNodeService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbAreaLineNodeRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbAreaLineNodeService( + ISqlSugarRepository tbAreaLineNodeRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbAreaLineNodeRepository = tbAreaLineNodeRepository; + _db = _tbAreaLineNodeRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取地域线路节点 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + var tickets = _db.Queryable().Where(o => o.OrderId == output.id).First(); + output.isAppend = tickets.IsNullOrEmpty() ? "1" : "2"; + return output; + } + + /// + /// 获取地域线路节点列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbAreaLineNodeListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.areaLineId), p => p.AreaLineId.Equals(input.areaLineId)) + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.description), p => p.Description.Contains(input.description)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbAreaLineNodeListOutput + { + id = it.Id, + areaLineId=it.AreaLineId, + title =it.Title, + description=it.Description, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + banner=it.Banner, + sorts = it.Sorts, + + }).MergeTable().Mapper(p => + { + p.areaLine = _db.Queryable().Where(o => o.Id == p.areaLineId).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建地域线路节点 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbAreaLineNodeCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取地域线路节点无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbAreaLineNodeListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.areaLineId), p => p.AreaLineId.Equals(input.areaLineId)) + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.description), p => p.Description.Contains(input.description)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbAreaLineNodeListOutput + { + id = it.Id, + areaLineId=it.AreaLineId, + title=it.Title, + description=it.Description, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + sorts = it.Sorts, + + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出地域线路节点 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbAreaLineNodeListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"地域线路\",\"field\":\"areaLineId\"},{\"value\":\"节点标题\",\"field\":\"title\"},{\"value\":\"节点简介\",\"field\":\"description\"},{\"value\":\"节点注意事项\",\"field\":\"remark\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},{\"value\":\"排序\",\"field\":\"sorts\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "地域线路节点.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除地域线路节点 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除地域线路节点 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新地域线路节点 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbAreaLineNodeUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除地域线路节点 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/抽奖记录/TbBoxLogService.cs b/antis-ncc-net-core/NCC.BlindBox/抽奖记录/TbBoxLogService.cs new file mode 100644 index 0000000..fbacfe2 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/抽奖记录/TbBoxLogService.cs @@ -0,0 +1,329 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbBoxLog; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbBoxLog; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; +using NCC.System.Entitys.Permission; +using NCC.Education.Entitys; + +namespace NCC.Blind.TbBoxLog +{ + /// + /// 抽奖记录服务 + /// + [ApiDescriptionSettings(Tag = "抽奖记录",Name = "TbBoxLog", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbBoxLogService : ITbBoxLogService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbBoxLogRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbBoxLogService( + ISqlSugarRepository tbBoxLogRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbBoxLogRepository = tbBoxLogRepository; + _db = _tbBoxLogRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取抽奖记录 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取抽奖记录列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbBoxLogListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.boxOrderId), p => p.BoxOrderId.Equals(input.boxOrderId)) + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .WhereIF(!string.IsNullOrEmpty(input.areaLineId), p => p.AreaLineId.Equals(input.areaLineId)) + .WhereIF(!string.IsNullOrEmpty(input.mbtLineId), p => p.MbtLineId.Equals(input.mbtLineId)) + .Select(it=> new TbBoxLogListOutput + { + id = it.Id, + userId=it.UserId, + boxOrderId=it.BoxOrderId, + type=it.Type, + areaLineId=it.AreaLineId, + mbtLineId=it.MbtLineId, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().Mapper(p => + { + p.user = _db.Queryable().Where(o => o.Id == p.userId).First(); + p.boxOrder = _db.Queryable().Where(o => o.Id == p.boxOrderId).First(); + p.mbtLine = _db.Queryable().Where(o => o.Id == p.mbtLineId).First(); + p.areaLine = _db.Queryable().Where(o => o.Id == p.areaLineId).First(); + p.area = _db.Queryable().Where(o => o.Id == p.areaId).First(); + p.mbt = _db.Queryable().Where(o => o.Id == p.mbtId).First(); + + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建抽奖记录 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbBoxLogCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取抽奖记录无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbBoxLogListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.boxOrderId), p => p.BoxOrderId.Equals(input.boxOrderId)) + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .WhereIF(!string.IsNullOrEmpty(input.areaLineId), p => p.AreaLineId.Equals(input.areaLineId)) + .WhereIF(!string.IsNullOrEmpty(input.mbtLineId), p => p.MbtLineId.Equals(input.mbtLineId)) + .Select(it=> new TbBoxLogListOutput + { + id = it.Id, + userId=it.UserId, + boxOrderId=it.BoxOrderId, + type=it.Type, + areaLineId=it.AreaLineId, + mbtLineId=it.MbtLineId, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出抽奖记录 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbBoxLogListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"用户\",\"field\":\"userId\"},{\"value\":\"盲盒订单\",\"field\":\"boxOrderId\"},{\"value\":\"路线\",\"field\":\"type\"},{\"value\":\"地域线路\",\"field\":\"areaLineId\"},{\"value\":\"人格线路\",\"field\":\"mbtLineId\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "抽奖记录.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除抽奖记录 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除抽奖记录 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新抽奖记录 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbBoxLogUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除抽奖记录 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/旅游景点/TbTravelSpotService.cs b/antis-ncc-net-core/NCC.BlindBox/旅游景点/TbTravelSpotService.cs new file mode 100644 index 0000000..44fff69 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/旅游景点/TbTravelSpotService.cs @@ -0,0 +1,311 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbTravelSpot; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbTravelSpot; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; + +namespace NCC.Blind.TbTravelSpot +{ + /// + /// 旅游景点服务 + /// + [ApiDescriptionSettings(Tag = "旅游景点",Name = "TbTravelSpot", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbTravelSpotService : ITbTravelSpotService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbTravelSpotRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbTravelSpotService( + ISqlSugarRepository tbTravelSpotRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbTravelSpotRepository = tbTravelSpotRepository; + _db = _tbTravelSpotRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取旅游景点 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取旅游景点列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbTravelSpotListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbTravelSpotListOutput + { + id = it.Id, + title=it.Title, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + banner=it.Banner, + homeBanner=it.HomeBanner, + editors=it.Editors, + oldMoneys=it.OldMoneys, + nowMoneys=it.NowMoneys + }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建旅游景点 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbTravelSpotCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取旅游景点无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbTravelSpotListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .Select(it=> new TbTravelSpotListOutput + { + id = it.Id, + title=it.Title, + remark=it.Remark, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出旅游景点 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbTravelSpotListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"标题\",\"field\":\"title\"},{\"value\":\"备注\",\"field\":\"remark\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "旅游景点.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除旅游景点 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除旅游景点 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新旅游景点 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbTravelSpotUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除旅游景点 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/用户协议/TbUserAgreementService.cs b/antis-ncc-net-core/NCC.BlindBox/用户协议/TbUserAgreementService.cs new file mode 100644 index 0000000..3f1e7d4 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/用户协议/TbUserAgreementService.cs @@ -0,0 +1,301 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbUserAgreement; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbUserAgreement; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; + +namespace NCC.Blind.TbUserAgreement +{ + /// + /// 用户协议服务 + /// + [ApiDescriptionSettings(Tag = "用户协议",Name = "TbUserAgreement", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbUserAgreementService : ITbUserAgreementService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbUserAgreementRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbUserAgreementService( + ISqlSugarRepository tbUserAgreementRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbUserAgreementRepository = tbUserAgreementRepository; + _db = _tbUserAgreementRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取用户协议 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取用户协议列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbUserAgreementListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .Select(it=> new TbUserAgreementListOutput + { + id = it.Id, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + contents= it.Contents, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建用户协议 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbUserAgreementCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var model = _db.Queryable().First(); + if (!model.IsNullOrEmpty()) throw NCCException.Oh($"只能存在一条协议哦"); + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取用户协议无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbUserAgreementListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .Select(it=> new TbUserAgreementListOutput + { + id = it.Id, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出用户协议 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbUserAgreementListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "用户协议.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除用户协议 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除用户协议 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新用户协议 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbUserAgreementUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除用户协议 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/盲盒介绍/TbRecommendService.cs b/antis-ncc-net-core/NCC.BlindBox/盲盒介绍/TbRecommendService.cs new file mode 100644 index 0000000..f51f751 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/盲盒介绍/TbRecommendService.cs @@ -0,0 +1,222 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbRecommend; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbRecommend; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.System.Interfaces.System; + +namespace NCC.Blind.TbRecommend +{ + /// + /// 盲盒介绍服务 + /// + [ApiDescriptionSettings(Tag = "盲盒介绍",Name = "TbRecommend", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbRecommendService : ITbRecommendService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbRecommendRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbRecommendService( + ISqlSugarRepository tbRecommendRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbRecommendRepository = tbRecommendRepository; + _db = _tbRecommendRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取盲盒介绍 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取盲盒介绍列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbRecommendListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .Select(it=> new TbRecommendListOutput + { + id = it.Id, + creatorTime=it.CreatorTime, + editors=it.Editors, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建盲盒介绍 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbRecommendCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var model = _db.Queryable().First(); + if (!model.IsNullOrEmpty()) throw NCCException.Oh($"已存在盲盒介绍!"); + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 批量删除盲盒介绍 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除盲盒介绍 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新盲盒介绍 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbRecommendUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除盲盒介绍 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/盲盒券/TbMyBoxCouponService.cs b/antis-ncc-net-core/NCC.BlindBox/盲盒券/TbMyBoxCouponService.cs new file mode 100644 index 0000000..a1b2e24 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/盲盒券/TbMyBoxCouponService.cs @@ -0,0 +1,363 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbMyBoxCoupon; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbMyBoxCoupon; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; +using NCC.System.Entitys.Permission; +using NCC.Blind.Entitys.Dto.TbBoxOrder; +using NCC.Education.Entitys; + +namespace NCC.Blind.TbMyBoxCoupon +{ + /// + /// 盲盒券服务 + /// + [ApiDescriptionSettings(Tag = "盲盒券",Name = "TbMyBoxCoupon", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbMyBoxCouponService : ITbMyBoxCouponService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbMyBoxCouponRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + + /// + /// 初始化一个类型的新实例 + /// + public TbMyBoxCouponService( + ISqlSugarRepository tbMyBoxCouponRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager) + { + _tbMyBoxCouponRepository = tbMyBoxCouponRepository; + _db = _tbMyBoxCouponRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + } + + /// + /// 获取盲盒券 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取盲盒券列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbMyBoxCouponListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.giveUserId), p => p.GiveUserId.Equals(input.giveUserId)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.orderId), p => p.OrderId.Equals(input.orderId)) + + .Select(it=> new TbMyBoxCouponListOutput + { + id = it.Id, + userId=it.UserId, + giveUserId=it.GiveUserId, + remark=it.Remark, + type=it.Type, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + title = it.Title, + orderId = it.OrderId, + + }).MergeTable().Mapper(p => + { + p.user = _db.Queryable().Where(o => o.Id == p.userId).First(); + p.giveUser = _db.Queryable().Where(o => o.Id == p.giveUserId).First(); + p.order = _db.Queryable().Where(o => o.Id == p.orderId).Select(it => new TbBoxOrderListOutput + { + id = it.Id, + userId = it.UserId, + orderNumber = it.OrderNumber, + type = it.Type, + areaId = it.AreaId, + areaLineId = it.AreaLineId, + mbtId = it.MbtId, + mbtLineId = it.MbtLineId, + totalPrice = it.TotalPrice, + status = it.Status, + isMe = it.IsMe, + giveUserId = it.GiveUserId, + myBoxCouponId = it.MyBoxCouponId, + creatorTime = it.CreatorTime, + lastModifyTime = it.LastModifyTime, + qrCode = it.QrCode + }).MergeTable().Mapper(p => + { + p.tickets = _db.Queryable().Where(o => o.OrderId == p.id).First(); + p.isAppend = p.tickets.IsNullOrEmpty() ? "1" : "2"; + p.user = _db.Queryable().Where(o => o.Id == p.userId).First(); + p.area = _db.Queryable().Where(o => o.Id == p.areaId).First(); + p.areaLine = _db.Queryable().Where(o => o.Id == p.areaLineId).First(); + p.mbt = _db.Queryable().Where(o => o.Id == p.mbtId).First(); + p.mbtLine = _db.Queryable().Where(o => o.Id == p.mbtLineId).First(); + p.giveUser = _db.Queryable().Where(o => o.Id == p.giveUserId).First(); + p.myBoxCoupon = _db.Queryable().Where(o => o.Id == p.myBoxCouponId).First(); + }).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建盲盒券 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbMyBoxCouponCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取盲盒券无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbMyBoxCouponListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.giveUserId), p => p.GiveUserId.Equals(input.giveUserId)) + .WhereIF(!string.IsNullOrEmpty(input.remark), p => p.Remark.Contains(input.remark)) + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .WhereIF(!string.IsNullOrEmpty(input.title), p => p.Title.Contains(input.title)) + .WhereIF(!string.IsNullOrEmpty(input.orderId), p => p.OrderId.Equals(input.orderId)) + + .Select(it=> new TbMyBoxCouponListOutput + { + id = it.Id, + userId=it.UserId, + giveUserId=it.GiveUserId, + remark=it.Remark, + type=it.Type, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + title = it.Title, + orderId = it.OrderId, + + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出盲盒券 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbMyBoxCouponListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"用户\",\"field\":\"userId\"},{\"value\":\"赠送人\",\"field\":\"giveUserId\"},{\"value\":\"类型\",\"field\":\"type\"},{\"value\":\"备注\",\"field\":\"remark\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},{\"value\":\"标题\",\"field\":\"title\"},{\"value\":\"订单\",\"field\":\"orderId\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "盲盒券.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除盲盒券 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除盲盒券 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新盲盒券 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbMyBoxCouponUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除盲盒券 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/盲盒订单/TbBoxOrderService.cs b/antis-ncc-net-core/NCC.BlindBox/盲盒订单/TbBoxOrderService.cs new file mode 100644 index 0000000..01b32ff --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/盲盒订单/TbBoxOrderService.cs @@ -0,0 +1,942 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbBoxOrder; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbBoxOrder; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; +using NCC.System.Entitys.Permission; +using NCC.Education.Entitys; +using NCC.BlindBox; +using Microsoft.Extensions.Logging; +using Antis.Pay.Core.Enum; +using System.Collections; +using Microsoft.AspNetCore.Http; +using NCC.Common.Extensions; +using Antis.Pay.Core.Interface; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using Antis.Pay.Core.Model; +using Microsoft.AspNetCore.Authorization; +using System.Drawing.Imaging; +using System.Drawing; +using System.IO; +using System.Net; +using System.Text; +using Microsoft.AspNetCore.Hosting; +using MySqlX.XDevAPI.Common; +using Spire.Presentation.Drawing.TimeLine; +using NCC.Common.Model; +using NCC.Blind.Entitys.Dto.TbAreaLineNode; +using NCC.Blind.Entitys.Dto.TbMbtLine; +using NCC.Blind.Entitys.Dto.TbMbtLineNode; +using NCC.Blind.Entitys.Dto.TbAreaLine; +using Serilog; + +namespace NCC.Blind.TbBoxOrder +{ + /// + /// 盲盒订单服务 + /// + [ApiDescriptionSettings(Tag = "盲盒订单",Name = "TbBoxOrder", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbBoxOrderService : ITbBoxOrderService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbBoxOrderRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly ILogger _logger; + private readonly IHostingEnvironment _hostingEnvironment; + + private readonly IUserManager _userManager; + private readonly IHttpContextAccessor _httpContextAccessor; + private readonly IWePay _wepay; + + private static WepayOptions WepayConfig = App.GetConfig("PaymentSettings", true).WepayConfig; + + /// + /// 初始化一个类型的新实例 + /// + public TbBoxOrderService( + ISqlSugarRepository tbBoxOrderRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager, + ILogger logger, + IHttpContextAccessor httpContextAccessor, + IHostingEnvironment hostingEnvironment, + IWePay wepay) + { + _tbBoxOrderRepository = tbBoxOrderRepository; + _db = _tbBoxOrderRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + _logger = logger; + _httpContextAccessor = httpContextAccessor; + _hostingEnvironment = hostingEnvironment; + _wepay = wepay; + } + + + public class OutOrderLineOptions + { + + /// + /// 地域线路信息 + /// + public TbAreaLineInfoOutput areaLine { get; set; } + /// + /// MBTI线路信息 + /// + public TbMbtLineInfoOutput mbtLine { get; set; } + + /// + /// 地域线路节点集合 + /// + public List areaLineNodeList { get; set; } + /// + /// MBTI人格线路节点集合 + /// + public List mbtLineNodeList { get; set; } + + /// + /// 类型 1--地域线路 2--MBT线路 + /// + public string type { get; set; } + } + + + + + /// + /// 根据订单ID查询路线信息 + /// + /// + /// + [HttpPost("GetOrderLineByOrderId")] + public async Task GetOrderLineByOrderId(string id) + { + OutOrderLineOptions result = new OutOrderLineOptions(); + var order = _db.Queryable().Where(o => o.Id == id).First(); + if (order.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到订单信息!"); + if (order.Type == BlindBoxStatus.BlindBoxLineStatus.地域线路.GetHashCode().ToString()) + { + //地域路线 + var entity = await _db.Queryable().FirstAsync(p => p.Id == order.AreaLineId); + var output = entity.Adapt(); + result.areaLine = output; + Log.Information($"查询的订单路线ID:{order.AreaLineId}"); + var model = _db.Queryable().Where(o => o.AreaLineId == order.AreaLineId).Select(it => new TbAreaLineNodeListOutput + { + id = it.Id, + areaLineId = it.AreaLineId, + title = it.Title, + description = it.Description, + remark = it.Remark, + creatorTime = it.CreatorTime, + lastModifyTime = it.LastModifyTime, + banner = it.Banner, + sorts = it.Sorts, + }).MergeTable().Mapper(p => + { + //p.areaLine = _db.Queryable().Where(o => o.Id == p.areaLineId).First(); + }).ToList(); + Log.Information($"路线节点集合:{JsonConvert.SerializeObject(model)}"); + + result.areaLineNodeList = model; + + + } + else + { + //人格路线 + var entity = await _db.Queryable().FirstAsync(p => p.Id == order.MbtLineId); + var output = entity.Adapt(); + result.mbtLine = output; + var model = _db.Queryable().Where(o => o.MbtLineId == order.MbtLineId).Select(it => new TbMbtLineNodeListOutput + { + id = it.Id, + mbtLineId = it.MbtLineId, + title = it.Title, + description = it.Description, + remark = it.Remark, + creatorTime = it.CreatorTime, + lastModifyTime = it.LastModifyTime, + sorts = it.Sorts, + banner=it.Banner + }).MergeTable().Mapper(p => + { + //p.mbtLine = _db.Queryable().Where(o => o.Id == p.mbtLineId).First(); + }).ToList(); + result.mbtLineNodeList = model; + } + result.type = order.Type; + return result; + } + + + + + + + + + + + + /// + /// 扫码获得盲盒券 + /// + public class ConfirmBindingCouponOptions + { + /// + /// 盲盒订单ID + /// + public string boxOrderId { get; set; } + + /// + /// 用户ID + /// + public string userId { get; set; } + + } + + /// + /// 扫码获得盲盒券 + /// + /// + /// + [HttpPost("CofirmBindingCoupon")] + public async Task CofirmBindingCoupon(ConfirmBindingCouponOptions query) + { + var boxOrder = _db.Queryable().Where(o => o.Id == query.boxOrderId).First(); + if (boxOrder.IsNullOrEmpty()) throw NCCException.Oh($"暂无此订单哦"); + if (!boxOrder.GiveUserId.IsNullOrEmpty()) throw NCCException.Oh($"该券已经被送出人接收了哦"); + var user = _db.Queryable().Where(o => o.Id == query.userId).First(); + if (user.IsNullOrEmpty()) throw NCCException.Oh($"暂无此用户哦"); + var coupon = _db.Insertable(new TbMyBoxCouponEntity + { + Id=YitIdHelper.NextId().ToString(), + GiveUserId= boxOrder.UserId, + OrderId=boxOrder.Id, + Remark=$"赠送盲盒抽奖", + Title="赠送盲盒抽奖", + Type=BlindBoxStatus.BlindBoxCouponStatus.未使用.GetHashCode().ToString(), + UserId= user.Id, + CreatorTime=DateTime.Now + }).ExecuteReturnEntity(); + _logger.LogInformation($"添加盲盒券实体:{coupon.ToJson()}"); + boxOrder.GiveUserId = user.Id; + boxOrder.MyBoxCouponId = coupon.Id; + var result = _db.Updateable(boxOrder).ExecuteCommand(); + _logger.LogInformation($"补全赠送信息:{result}"); + } + + + /// + /// 立即抽奖入参 + /// + public class ConfirmDrawOptions + { + /// + /// 盲盒订单ID + /// + public string boxOrderId { get; set; } + + /// + /// 盲盒券ID 赠送订单需传入 + /// + public string myBoxCouponId { get; set; } + } + + /// + /// 立即抽奖 + /// + /// + /// + [HttpPost("ConFirmDraw")] + public async Task ConFirmDraw(ConfirmDrawOptions query) + { + var model = _db.Queryable().Where(o => o.Id == query.boxOrderId).First(); + if (model.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到该订单,无法抽奖!"); + var logData = _db.Queryable().Where(o => o.BoxOrderId == model.Id).Count(); + if (logData > 1) throw NCCException.Oh($"您的次数已用完了哦"); + if (model.Type == BlindBoxStatus.BlindBoxLineStatus.MBT人格线路.GetHashCode().ToString()) + { + //人格 + var list = _db.Queryable().Where(o=>o.MbtId==model.MbtId).ToList(); + List ids = new List(); + foreach (var item in list) + { + ids.Add(item.Id); + } + int r = new Random().Next(ids.Count); + var data = list.Find(o => o.Id == ids[r]); + if (data.IsNullOrEmpty()) throw NCCException.Oh($"暂无人格路线哦"); + var logResult = new TbBoxLogEntity + { + Id = YitIdHelper.NextId().ToString(), + Type = BlindBoxStatus.BlindBoxLineStatus.MBT人格线路.GetHashCode().ToString(), + BoxOrderId = model.Id, + CreatorTime = DateTime.Now, + MbtId = model.MbtId, + MbtLineId = data.Id, + UserId = model.UserId, + }; + try + { + _db.BeginTran(); + if (model.IsMe == BlindBoxStatus.BlindIsMeStatus.赠送他人.GetHashCode().ToString()) + { + logResult.UserId = model.GiveUserId; + var couponResult = _db.Updateable().SetColumns(o => o.Type == BlindBoxStatus.BlindBoxCouponStatus.已使用.GetHashCode().ToString()).Where(o => o.Id == query.myBoxCouponId).ExecuteCommand(); + _logger.LogInformation($"我的盲盒券状态更改失败:{couponResult}"); + } + var result = _db.Insertable(logResult).ExecuteCommand(); + _logger.LogInformation($"添加MBT抽奖记录状态:{result}"); + model.MbtLineId = data.Id; + var orderResult = _db.Updateable(model).ExecuteCommand(); + _logger.LogInformation($"更改人格订单抽奖线路信息:{orderResult}"); + _db.CommitTran(); + var lineNode = _db.Queryable().Where(o => o.MbtLineId == data.Id).ToList(); + return new + { + type = BlindBoxStatus.BlindBoxLineStatus.MBT人格线路.GetHashCode().ToString(), + mbtLine = data, + mbtLineNode = lineNode, + }; + } + catch (Exception ex) + { + _logger.LogInformation($"抽奖人格报错:{ex.Message}"); + _db.RollbackTran(); + throw NCCException.Oh($"抽奖人格报错:{ex.Message}"); + } + } + else + { + //地域 + var list = _db.Queryable().Where(o => o.AreaId == model.AreaId).ToList(); + List ids = new List(); + foreach (var item in list) + { + ids.Add(item.Id); + } + int r = new Random().Next(ids.Count); + var data = list.Find(o => o.Id == ids[r]); + if (data.IsNullOrEmpty()) throw NCCException.Oh($"暂无地域路线哦"); + var logResult = new TbBoxLogEntity + { + Id = YitIdHelper.NextId().ToString(), + Type = BlindBoxStatus.BlindBoxLineStatus.地域线路.GetHashCode().ToString(), + BoxOrderId = model.Id, + CreatorTime = DateTime.Now, + AreaId = model.AreaId, + AreaLineId = data.Id, + UserId = model.UserId, + }; + try + { + _db.BeginTran(); + if (model.IsMe == BlindBoxStatus.BlindIsMeStatus.赠送他人.GetHashCode().ToString()) + { + logResult.UserId = model.GiveUserId; + var couponResult = _db.Updateable().SetColumns(o => o.Type == BlindBoxStatus.BlindBoxCouponStatus.已使用.GetHashCode().ToString()).Where(o => o.Id == query.myBoxCouponId).ExecuteCommand(); + _logger.LogInformation($"我的盲盒券状态更改失败:{couponResult}"); + } + var result = _db.Insertable(logResult).ExecuteCommand(); + _logger.LogInformation($"添加地域抽奖记录状态:{result}"); + model.AreaLineId = data.Id; + var orderResult = _db.Updateable(model).ExecuteCommand(); + _logger.LogInformation($"更改地域订单抽奖线路信息:{orderResult}"); + var lineNode = _db.Queryable().Where(o => o.AreaLineId == data.Id).ToList(); + _db.CommitTran(); + return new + { + type=BlindBoxStatus.BlindBoxLineStatus.地域线路.GetHashCode().ToString(), + areaLine = data, + areaLineNode = lineNode, + }; + } + catch (Exception ex) + { + _logger.LogInformation($"抽奖地域报错:{ex.Message}"); + _db.RollbackTran(); + throw NCCException.Oh($"抽奖地域报错:{ex.Message}"); + } + } + + + } + + + + + + + /// + /// 支付后回调处理 + /// + /// + [HttpGet("WePayNotify")] + [HttpPost("WePayNotify")] + [AllowAnonymous] + public string WePayNotify() + { + _logger.LogInformation("进入支付回调"); + WePayReturnModel payResult = new WePayReturnModel(); + if (_wepay.VerifyNotify(out payResult)) + { + _logger.LogInformation("验证成功" + JsonConvert.SerializeObject(payResult)); + var boxOrder = _db.Queryable().Where(o => o.OrderNumber == payResult.OutTradeNo).First(); + if (boxOrder.Status == BlindBoxStatus.BlindBoxOrderStatus.已付款.GetHashCode().ToString()) + { + return _wepay.GetReturnXml("SUCCESS", "OK"); + } + else + { + boxOrder.Status = BlindBoxStatus.BlindBoxOrderStatus.已付款.GetHashCode().ToString(); + var result = _db.Updateable(boxOrder).ExecuteCommand(); + _logger.LogInformation($"盲盒回调更改订单状态:{result}"); + } + } + _logger.LogInformation("支付回调验证失败 payResult=" + JsonHelper.ToJson((object)payResult)); + return _wepay.GetReturnXml("FAIL", "ERROR"); + } + + /// + /// 盲盒订单下单参数 + /// + public class PlanceBoxOptions + { + /// + /// 用户ID + /// + public string userId { get; set; } + + + /// + /// 路线 1--地域路线 2--MBT人格路线 + /// + public string type { get; set; } + + /// + /// 地域ID + /// + public string areaId { get; set; } + + + /// + /// 人格ID + /// + public string mbtId { get; set; } + + + /// + /// 购买类型 1--自己购买 2--赠送他人 + /// + public string isMe { get; set; } + + /// + /// 创建时间 + /// + public DateTime? creatorTime { get; set; } + + /// + /// 修改时间 + /// + public DateTime? lastModifyTime { get; set; } + } + + /// + /// 盲盒订单下单 + /// + /// + /// + [HttpPost("PlanceBoxOrder")] + public async Task PlanceBoxOrder(PlanceBoxOptions input) + { + if (input.userId.IsNullOrEmpty()) throw NCCException.Oh($"请设置用户标识"); + if (input.type.IsNullOrEmpty()) throw NCCException.Oh($"请选择路线类型"); + if (input.isMe.IsNullOrEmpty()) throw NCCException.Oh($"请选择购买类型"); + var user = _db.Queryable().Where(o => o.Id == input.userId).First(); + if (user.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到该用户"); + if (input.type.Equals(BlindBoxStatus.BlindBoxLineStatus.MBT人格线路.GetHashCode().ToString())) + { + //人格 + if (input.mbtId.IsNullOrEmpty()) throw NCCException.Oh($"请选择人格"); + var mbt = _db.Queryable().Where(o => o.Id == input.mbtId).First(); + if (mbt.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到人格"); + } + else + { + //地域 + if (input.areaId.IsNullOrEmpty()) throw NCCException.Oh($"请选择地域!"); + var area = _db.Queryable().Where(o => o.Id == input.areaId).First(); + if (area.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到地域"); + } + //if(input.isMe==BlindBoxStatus.BlindIsMeStatus.自己购买.GetHashCode().ToString()) + //{ + // //自己购买 + // if (input.type.Equals(BlindBoxStatus.BlindBoxLineStatus.MBT人格线路.GetHashCode().ToString())) + // { + // //人格路线 + // if (input.mbtLineId.IsNullOrEmpty()) throw NCCException.Oh($"请选择人格路线"); + // var mbtLine = _db.Queryable().Where(o => o.Id == input.mbtLineId).First(); + // if (mbtLine.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到人格路线"); + // } + // else + // { + // //地域路线 + // if (input.areaLineId.IsNullOrEmpty()) throw NCCException.Oh($"请选择地域路线!"); + // var areaLine = _db.Queryable().Where(o => o.Id == input.areaLineId).First(); + // if (areaLine.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到地域路线"); + // } + //} + var settingPrice = _db.Queryable().Where(o => o.Type == BlindBoxStatus.BlindBoxSettingPriceType.盲盒价格.GetHashCode().ToString()) +.First(); + if (settingPrice.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到盲盒价格,请联系管理员!"); + var entity = input.Adapt(); + entity.OrderNumber = ServiceHelper.getTime().ToString(); + entity.Status = BlindBoxStatus.BlindBoxOrderStatus.未付款.GetHashCode().ToString(); + entity.CreatorTime = DateTime.Now; + entity.TotalPrice = settingPrice.Price; + entity.Status = BlindBoxStatus.BlindBoxOrderStatus.未付款.GetHashCode().ToString(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var orderResult = _db.Insertable(entity).ExecuteReturnEntity(); + _logger.LogInformation($"添加订单状态:{orderResult.ToJson()}"); + if (entity.IsMe == "2") + { + _logger.LogInformation($"进入二维码"); + entity.QrCode = GetQRCode("pages/index/index", $"boxOrderId={orderResult.Id}").GetAwaiter().GetResult(); + _logger.LogInformation($"生成二维码:{entity.QrCode}"); + + } + //1--盲盒下单 + string result = _wepay.BuildWePay(user.OpenId, entity.OrderNumber, "盲盒抽奖", _wepay.GetMoneyYuanToFen(entity.TotalPrice), HttpContextExtensions.GetRemoteIpAddressToIPv4(_httpContextAccessor.HttpContext),0,1); + _logger.LogInformation($"这是盲和下单数据:{result.ToJson()}"); + var dataResult = new PlanceBoxOrderResult + { + order = entity, + data =JObject.Parse(result) + }; + return dataResult; + + } + + /// + /// 盲盒下单返回信息 + /// + public class PlanceBoxOrderResult + { + /// + /// 订单信息 + /// + public TbBoxOrderEntity order { get; set; } + public object data { get; set; } + } + + /// + /// 小程序获取accesstoken + /// + public class WXApi + { + public string access_token { get; set; } + } + + public class ModelJson + { + public string scene = ""; + + public string page = ""; + + public bool check_path = false; + } + /// + /// 获取小程序accesstoken + /// + /// APPID + /// 密钥 + /// + [HttpGet("GetAccessToken")] + [AllowAnonymous] + public string GetAccessToken() + { + string apiurl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + WepayConfig.APPLETE_APPID + "&secret=" + WepayConfig.APPLETE_APPSECRET; + WebRequest request = WebRequest.Create(apiurl); + request.Method = "GET"; + WebResponse response = request.GetResponse(); + Stream stream = response.GetResponseStream(); + Encoding encode = Encoding.UTF8; + StreamReader reader = new StreamReader(stream, encode); + string detail = reader.ReadToEnd(); + _logger.LogInformation($"信息access:{detail}"); + WXApi jd = JsonConvert.DeserializeObject(detail); + return jd.access_token; + } + /// + /// 获取二维码数据 带参数 + /// + /// 扫描二维码跳转的页面 + /// 携带的参数多个参数逗号隔开 + /// + [HttpPost("GetQRCode")] + [AllowAnonymous] + public async Task GetQRCode(string page = "", string scene = "") + { + ModelJson jsons = new ModelJson(); + _ = string.Empty; + string access_token = GetAccessToken(); + _logger.LogInformation($"获取token:{access_token}"); + string apiurl = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + access_token; + WebRequest request = WebRequest.Create(apiurl); + request.Method = "POST"; + request.ContentType = "image/jpeg"; + jsons.scene = scene; + jsons.page = page; + jsons.check_path = false; + string DataJson = JsonHelper.ToJson((object)jsons); + byte[] bytearray = Encoding.UTF8.GetBytes(DataJson); + request.ContentLength = bytearray.Length; + Stream strStream = request.GetRequestStream(); + strStream.Write(bytearray, 0, bytearray.Length); + strStream.Close(); + HttpWebResponse response = (HttpWebResponse)request.GetResponse(); + Stream stream = response.GetResponseStream(); + Bitmap bitimg = new Bitmap(stream); + MemoryStream memoryStream = new MemoryStream(); + bitimg.Save(memoryStream, ImageFormat.Jpeg); + byte[] arr = new byte[memoryStream.Length]; + memoryStream.Position = 0L; + memoryStream.Read(arr, 0, (int)memoryStream.Length); + Image imgs = Image.FromStream(memoryStream); + string filename = _hostingEnvironment.ContentRootPath + "\\UploadFile\\SystemFile\\" + Guid.NewGuid().ToString() + ".jpg"; + imgs.Save(filename); + return Path.GetFileName(filename); + } + + + + + /// + /// 获取盲盒订单 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取盲盒订单列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbBoxOrderListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.orderNumber), p => p.OrderNumber.Contains(input.orderNumber)) + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .WhereIF(!string.IsNullOrEmpty(input.areaId), p => p.AreaId.Equals(input.areaId)) + .WhereIF(!string.IsNullOrEmpty(input.areaLineId), p => p.AreaLineId.Equals(input.areaLineId)) + .WhereIF(!string.IsNullOrEmpty(input.mbtId), p => p.MbtId.Equals(input.mbtId)) + .WhereIF(!string.IsNullOrEmpty(input.mbtLineId), p => p.MbtLineId.Equals(input.mbtLineId)) + .WhereIF(!string.IsNullOrEmpty(input.status), p => p.Status.Equals(input.status)) + .WhereIF(!string.IsNullOrEmpty(input.isMe), p => p.IsMe.Equals(input.isMe)) + .WhereIF(!string.IsNullOrEmpty(input.giveUserId), p => p.GiveUserId.Equals(input.giveUserId)) + .WhereIF(!string.IsNullOrEmpty(input.myBoxCouponId), p => p.MyBoxCouponId.Equals(input.myBoxCouponId)) + .Select(it=> new TbBoxOrderListOutput + { + id = it.Id, + userId=it.UserId, + orderNumber=it.OrderNumber, + type=it.Type, + areaId=it.AreaId, + areaLineId=it.AreaLineId, + mbtId=it.MbtId, + mbtLineId=it.MbtLineId, + totalPrice=it.TotalPrice, + status=it.Status, + isMe=it.IsMe, + giveUserId=it.GiveUserId, + myBoxCouponId=it.MyBoxCouponId, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + qrCode=it.QrCode + }).MergeTable().Mapper(p => + { + var logData = _db.Queryable().Where(o => o.BoxOrderId == p.id).Count(); + p.isAnewDraw = logData > 1 ? "1" : "2"; + p.tickets = _db.Queryable().Where(o => o.OrderId == p.id).First(); + p.isAppend = p.tickets.IsNullOrEmpty() ? "1" : "2"; + p.user = _db.Queryable().Where(o => o.Id == p.userId).First(); + p.area = _db.Queryable().Where(o => o.Id == p.areaId).First(); + p.areaLine = _db.Queryable().Where(o => o.Id == p.areaLineId).First(); + p.mbt = _db.Queryable().Where(o => o.Id == p.mbtId).First(); + p.mbtLine = _db.Queryable().Where(o => o.Id == p.mbtLineId).First(); + p.giveUser = _db.Queryable().Where(o => o.Id == p.giveUserId).First(); + p.myBoxCoupon = _db.Queryable().Where(o => o.Id == p.myBoxCouponId).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建盲盒订单 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbBoxOrderCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取盲盒订单无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbBoxOrderListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.orderNumber), p => p.OrderNumber.Contains(input.orderNumber)) + .WhereIF(!string.IsNullOrEmpty(input.type), p => p.Type.Equals(input.type)) + .WhereIF(!string.IsNullOrEmpty(input.areaId), p => p.AreaId.Equals(input.areaId)) + .WhereIF(!string.IsNullOrEmpty(input.areaLineId), p => p.AreaLineId.Equals(input.areaLineId)) + .WhereIF(!string.IsNullOrEmpty(input.mbtId), p => p.MbtId.Equals(input.mbtId)) + .WhereIF(!string.IsNullOrEmpty(input.mbtLineId), p => p.MbtLineId.Equals(input.mbtLineId)) + .WhereIF(!string.IsNullOrEmpty(input.status), p => p.Status.Equals(input.status)) + .WhereIF(!string.IsNullOrEmpty(input.isMe), p => p.IsMe.Equals(input.isMe)) + .WhereIF(!string.IsNullOrEmpty(input.giveUserId), p => p.GiveUserId.Equals(input.giveUserId)) + .WhereIF(!string.IsNullOrEmpty(input.myBoxCouponId), p => p.MyBoxCouponId.Equals(input.myBoxCouponId)) + .Select(it=> new TbBoxOrderListOutput + { + id = it.Id, + userId=it.UserId, + orderNumber=it.OrderNumber, + type=it.Type, + areaId=it.AreaId, + areaLineId=it.AreaLineId, + mbtId=it.MbtId, + mbtLineId=it.MbtLineId, + totalPrice=it.TotalPrice, + status=it.Status, + isMe=it.IsMe, + giveUserId=it.GiveUserId, + myBoxCouponId=it.MyBoxCouponId, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出盲盒订单 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbBoxOrderListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"用户\",\"field\":\"userId\"},{\"value\":\"订单号\",\"field\":\"orderNumber\"},{\"value\":\"路线\",\"field\":\"type\"},{\"value\":\"地域\",\"field\":\"areaId\"},{\"value\":\"地域线路\",\"field\":\"areaLineId\"},{\"value\":\"人格\",\"field\":\"mbtId\"},{\"value\":\"人格线路\",\"field\":\"mbtLineId\"},{\"value\":\"状态\",\"field\":\"status\"},{\"value\":\"购买类型\",\"field\":\"isMe\"},{\"value\":\"赠送人\",\"field\":\"giveUserId\"},{\"value\":\"盲盒券\",\"field\":\"myBoxCouponId\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},{\"value\":\"总金额\",\"field\":\"totalPrice\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "盲盒订单.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除盲盒订单 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除盲盒订单 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新盲盒订单 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbBoxOrderUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除盲盒订单 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/NCC.BlindBox/视频信息/TbVideoService.cs b/antis-ncc-net-core/NCC.BlindBox/视频信息/TbVideoService.cs index c5a3592..1a49347 100644 --- a/antis-ncc-net-core/NCC.BlindBox/视频信息/TbVideoService.cs +++ b/antis-ncc-net-core/NCC.BlindBox/视频信息/TbVideoService.cs @@ -23,6 +23,7 @@ using NCC.Common.Configuration; using NCC.DataEncryption; using NCC.ClayObject; using NCC.System.Interfaces.System; +using Microsoft.AspNetCore.Authorization; namespace NCC.Education.TbVideo { @@ -30,7 +31,7 @@ namespace NCC.Education.TbVideo /// 视频信息服务 /// [ApiDescriptionSettings(Tag = "视频信息",Name = "TbVideo", Order = 200)] - [Route("api/Education/[controller]")] + [Route("api/Blind/[controller]")] public class TbVideoService : ITbVideoService, IDynamicApiController, ITransient { private readonly ISqlSugarRepository _tbVideoRepository; @@ -84,6 +85,7 @@ namespace NCC.Education.TbVideo /// 请求参数 /// [HttpGet("")] + [AllowAnonymous] public async Task GetList([FromQuery] TbVideoListQueryInput input) { var dbLink = await _dbLinkService.GetInfo("218239598550058245"); @@ -103,6 +105,7 @@ namespace NCC.Education.TbVideo id = it.Id, creatorTime=it.CreatorTime, lastModifyTime=it.LastModifyTime, + url=it.Url }).MergeTable().OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); return PageResult.SqlSugarPageResult(data); } diff --git a/antis-ncc-net-core/NCC.BlindBox/门票订单/TbTicketsOrderService.cs b/antis-ncc-net-core/NCC.BlindBox/门票订单/TbTicketsOrderService.cs new file mode 100644 index 0000000..0c279f9 --- /dev/null +++ b/antis-ncc-net-core/NCC.BlindBox/门票订单/TbTicketsOrderService.cs @@ -0,0 +1,474 @@ +using NCC.Common.Core.Manager; +using NCC.Common.Enum; +using NCC.Common.Extension; +using NCC.Common.Filter; +using NCC.Dependency; +using NCC.DynamicApiController; +using NCC.FriendlyException; +using NCC.Blind.Interfaces.TbTicketsOrder; +using Mapster; +using Microsoft.AspNetCore.Mvc; +using SqlSugar; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using NCC.Blind.Entitys; +using NCC.Blind.Entitys.Dto.TbTicketsOrder; +using Yitter.IdGenerator; +using NCC.Common.Helper; +using NCC.JsonSerialization; +using NCC.Common.Model.NPOI; +using NCC.Common.Configuration; +using NCC.DataEncryption; +using NCC.ClayObject; +using NCC.System.Interfaces.System; +using NCC.System.Entitys.Permission; +using Antis.Pay.Core.Model; +using Microsoft.AspNetCore.Authorization; +using NCC.BlindBox; +using NCC.Education.Entitys; +using Newtonsoft.Json.Linq; +using Newtonsoft.Json; +using Antis.Pay.Core.Interface; +using Microsoft.AspNetCore.Http; +using NCC.Common.Extensions; +using Microsoft.Extensions.Logging; + +namespace NCC.Blind.TbTicketsOrder +{ + /// + /// 门票订单服务 + /// + [ApiDescriptionSettings(Tag = "门票订单",Name = "TbTicketsOrder", Order = 200)] + [Route("api/Blind/[controller]")] + public class TbTicketsOrderService : ITbTicketsOrderService, IDynamicApiController, ITransient + { + private readonly ISqlSugarRepository _tbTicketsOrderRepository; + private readonly IDbLinkService _dbLinkService; + private readonly IDataBaseService _dataBaseService; + private readonly SqlSugarScope _db; + private readonly IUserManager _userManager; + private readonly IHttpContextAccessor _httpContextAccessor; + private readonly IWePay _wepay; + private readonly ILogger _logger; + + private static WepayOptions WepayConfig = App.GetConfig("PaymentSettings", true).WepayConfig; + + /// + /// 初始化一个类型的新实例 + /// + public TbTicketsOrderService( + ISqlSugarRepository tbTicketsOrderRepository, + IDbLinkService dbLinkService, + IDataBaseService dataBaseService, + IUserManager userManager, + IHttpContextAccessor httpContextAccessor, + IWePay wepay, + ILogger logger) + { + _tbTicketsOrderRepository = tbTicketsOrderRepository; + _db = _tbTicketsOrderRepository.Context; + _dbLinkService = dbLinkService; + _dataBaseService = dataBaseService; + _userManager = userManager; + _httpContextAccessor = httpContextAccessor; + _wepay = wepay; + _logger = logger; + } + + /// + /// 支付后回调处理 + /// + /// + [HttpGet("TikectWePayNotify")] + [HttpPost("TikectWePayNotify")] + [AllowAnonymous] + public string TikectWePayNotify() + { + _logger.LogInformation("进入支付回调"); + WePayReturnModel payResult = new WePayReturnModel(); + if (_wepay.VerifyNotify(out payResult)) + { + _logger.LogInformation("验证成功" + JsonConvert.SerializeObject(payResult)); + var boxOrder = _db.Queryable().Where(o => o.OrderNumber == payResult.OutTradeNo).First(); + if (boxOrder.Status == BlindBoxStatus.BlindBoxOrderStatus.已付款.GetHashCode().ToString()) + { + return _wepay.GetReturnXml("SUCCESS", "OK"); + } + else + { + boxOrder.Status = BlindBoxStatus.BlindBoxOrderStatus.已付款.GetHashCode().ToString(); + var result = _db.Updateable(boxOrder).ExecuteCommand(); + _logger.LogInformation($"盲盒回调更改订单状态:{result}"); + } + } + _logger.LogInformation("支付回调验证失败 payResult=" + JsonHelper.ToJson((object)payResult)); + return _wepay.GetReturnXml("FAIL", "ERROR"); + } + + /// + /// 门票订单下单参数 + /// + public class PlanceTicketOrderOptions + { + /// + /// 用户ID + /// + public string userId { get; set; } + + /// + /// 真实姓名 + /// + public string name { get; set; } + /// + /// 身份证号码 + /// + public string idCard { get; set; } + + /// + /// 手机号码 + /// + public string phone { get; set; } + /// + /// 盲盒订单ID + /// + public string orderId { get; set; } + + } + + /// + /// 门票订单下单 + /// + /// + /// + [HttpPost("PlanceTicketOrder")] + public async Task PlanceTicketOrder(PlanceTicketOrderOptions input) + { + if (input.userId.IsNullOrEmpty()) throw NCCException.Oh($"请设置用户标识"); + var user = _db.Queryable().Where(o => o.Id == input.userId).First(); + if (user.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到该用户"); + if (input.name.IsNullOrEmpty()) throw NCCException.Oh($"请填写真实姓名"); + if (input.phone.IsNullOrEmpty()) throw NCCException.Oh($"请填写手机号码"); + if (input.idCard.IsNullOrEmpty()) throw NCCException.Oh($"请填写身份证号码"); + if (input.orderId.IsNullOrEmpty()) throw NCCException.Oh($"请填写盲盒订单ID"); + var Order = _db.Queryable().Where(o => o.Id == input.orderId).First(); + if (Order.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到该盲盒订单信息"); + var tickets = _db.Queryable().Where(o => o.OrderId == Order.Id).First(); + if (!tickets.IsNullOrEmpty()) throw NCCException.Oh($"您已提交过个人信息!"); + var entity = input.Adapt(); + entity.OrderId = Order.Id; + var settingPrice = _db.Queryable().Where(o => o.Type == BlindBoxStatus.BlindBoxSettingPriceType.门票价格.GetHashCode().ToString()) +.First(); + if (settingPrice.IsNullOrEmpty()) throw NCCException.Oh($"暂未查询到门票价格,请联系管理员!"); + entity.TotalPrice = settingPrice.Price; + entity.Status = BlindBoxStatus.BlindBoxOrderStatus.已付款.GetHashCode().ToString(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.OrderNumber = ServiceHelper.getTime().ToString(); + entity.CreatorTime = DateTime.Now; + var data = _db.Insertable(entity).ExecuteCommand(); + if (!(data > 0)) throw NCCException.Oh($"门票下单失败"); + string result = _wepay.BuildWePay(user.OpenId, entity.OrderNumber, "购买门票", _wepay.GetMoneyYuanToFen(entity.TotalPrice), HttpContextExtensions.GetRemoteIpAddressToIPv4(_httpContextAccessor.HttpContext), 0, 2); + var dataResult = new PlanceTicketOrderResult + { + order = entity, + data=result + }; + return dataResult; + + } + + /// + /// 盲盒下单返回信息 + /// + public class PlanceTicketOrderResult + { + /// + /// 订单信息 + /// + public TbTicketsOrderEntity order { get; set; } + public object data { get; set; } + } + + + + + + /// + /// 获取门票订单 + /// + /// 参数 + /// + [HttpGet("{id}")] + public async Task GetInfo(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + var output = entity.Adapt(); + return output; + } + + /// + /// 获取门票订单列表 + /// + /// 请求参数 + /// + [HttpGet("")] + public async Task GetList([FromQuery] TbTicketsOrderListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.orderNumber), p => p.OrderNumber.Contains(input.orderNumber)) + .WhereIF(!string.IsNullOrEmpty(input.name), p => p.Name.Contains(input.name)) + .WhereIF(!string.IsNullOrEmpty(input.idCard), p => p.IdCard.Contains(input.idCard)) + .WhereIF(!string.IsNullOrEmpty(input.phone), p => p.Phone.Contains(input.phone)) + .WhereIF(!string.IsNullOrEmpty(input.status), p => p.Status.Equals(input.status)) + .WhereIF(!string.IsNullOrEmpty(input.orderId), p => p.OrderId.Equals(input.orderId)) + .Select(it=> new TbTicketsOrderListOutput + { + id = it.Id, + userId=it.UserId, + orderNumber=it.OrderNumber, + name=it.Name, + idCard=it.IdCard, + phone=it.Phone, + status=it.Status, + totalPrice=it.TotalPrice, + orderId=it.OrderId, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().Mapper(p => + { + p.user = _db.Queryable().Where(o => o.Id == p.userId).First(); + p.order = _db.Queryable().Where(o => o.Id == p.orderId).First(); + }).OrderBy(sidx+" "+input.sort).ToPagedListAsync(input.currentPage, input.pageSize); + return PageResult.SqlSugarPageResult(data); + } + + /// + /// 新建门票订单 + /// + /// 参数 + /// + [HttpPost("")] + public async Task Create([FromBody] TbTicketsOrderCrInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var userInfo = await _userManager.GetUserInfo(); + var entity = input.Adapt(); + entity.Id = YitIdHelper.NextId().ToString(); + entity.CreatorTime = DateTime.Now; + entity.OrderNumber = ServiceHelper.getTime().ToString(); + var model = _db.Queryable().Where(o => o.OrderId == entity.OrderId).First(); + if (!model.IsNullOrEmpty()) throw NCCException.Oh($"该订单已经提交过个人信息了哦!"); + var isOk = await _db.Insertable(entity).IgnoreColumns(ignoreNullColumn: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1000); + } + + /// + /// 获取门票订单无分页列表 + /// + /// 请求参数 + /// + [NonAction] + public async Task GetNoPagingList([FromQuery] TbTicketsOrderListQueryInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var sidx = input.sidx == null ? "id" : input.sidx; + var data = await _db.Queryable() + .WhereIF(!string.IsNullOrEmpty(input.userId), p => p.UserId.Equals(input.userId)) + .WhereIF(!string.IsNullOrEmpty(input.orderNumber), p => p.OrderNumber.Contains(input.orderNumber)) + .WhereIF(!string.IsNullOrEmpty(input.name), p => p.Name.Contains(input.name)) + .WhereIF(!string.IsNullOrEmpty(input.idCard), p => p.IdCard.Contains(input.idCard)) + .WhereIF(!string.IsNullOrEmpty(input.phone), p => p.Phone.Contains(input.phone)) + .WhereIF(!string.IsNullOrEmpty(input.status), p => p.Status.Equals(input.status)) + .WhereIF(!string.IsNullOrEmpty(input.orderId), p => p.OrderId.Equals(input.orderId)) + .Select(it=> new TbTicketsOrderListOutput + { + id = it.Id, + userId=it.UserId, + orderNumber=it.OrderNumber, + name=it.Name, + idCard=it.IdCard, + phone=it.Phone, + status=it.Status, + totalPrice=it.TotalPrice, + orderId=it.OrderId, + creatorTime=it.CreatorTime, + lastModifyTime=it.LastModifyTime, + }).MergeTable().OrderBy(sidx+" "+input.sort).ToListAsync(); + return data; + } + + /// + /// 导出门票订单 + /// + /// 请求参数 + /// + [HttpGet("Actions/Export")] + public async Task Export([FromQuery] TbTicketsOrderListQueryInput input) + { + var userInfo = await _userManager.GetUserInfo(); + var exportData = new List(); + if (input.dataType == 0) + { + var data = Clay.Object(await this.GetList(input)); + exportData = data.Solidify>().list; + } + else + { + exportData = await this.GetNoPagingList(input); + } + List paramList = "[{\"value\":\"用户\",\"field\":\"userId\"},{\"value\":\"订单号\",\"field\":\"orderNumber\"},{\"value\":\"真实姓名\",\"field\":\"name\"},{\"value\":\"身份证号码\",\"field\":\"idCard\"},{\"value\":\"电话号码\",\"field\":\"phone\"},{\"value\":\"状态\",\"field\":\"status\"},{\"value\":\"金额\",\"field\":\"totalPrice\"},{\"value\":\"订单\",\"field\":\"orderId\"},{\"value\":\"创建时间\",\"field\":\"creatorTime\"},{\"value\":\"修改时间\",\"field\":\"lastModifyTime\"},]".ToList(); + ExcelConfig excelconfig = new ExcelConfig(); + excelconfig.FileName = "门票订单.xls"; + excelconfig.HeadFont = "微软雅黑"; + excelconfig.HeadPoint = 10; + excelconfig.IsAllSizeColumn = true; + excelconfig.ColumnModel = new List(); + List selectKeyList = input.selectKey.Split(',').ToList(); + foreach (var item in selectKeyList) + { + var isExist = paramList.Find(p => p.field == item); + if (isExist != null) + { + excelconfig.ColumnModel.Add(new ExcelColumnModel() { Column = isExist.field, ExcelColumn = isExist.value }); + } + } + var addPath = FileVariable.TemporaryFilePath + excelconfig.FileName; + ExcelExportHelper.Export(exportData, excelconfig, addPath); + var fileName = _userManager.UserId + "|" + addPath + "|xls"; + var output = new + { + name = excelconfig.FileName, + url = "/api/File/Download?encryption=" + DESCEncryption.Encrypt(fileName, "NCC") + }; + return output; + } + + /// + /// 批量删除门票订单 + /// + /// 主键数组 + /// + [HttpPost("batchRemove")] + public async Task BatchRemove([FromBody] List ids) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entitys = await _db.Queryable().In(it => it.Id, ids).ToListAsync(); + if (entitys.Count > 0) + { + try + { + //开启事务 + _db.BeginTran(); + //批量删除门票订单 + await _db.Deleteable().In(d => d.Id,ids).ExecuteCommandAsync(); + //关闭事务 + _db.CommitTran(); + } + catch (Exception) + { + //回滚事务 + _db.RollbackTran(); + throw NCCException.Oh(ErrorCode.COM1002); + } + } + } + + /// + /// 更新门票订单 + /// + /// 主键 + /// 参数 + /// + [HttpPut("{id}")] + public async Task Update(string id, [FromBody] TbTicketsOrderUpInput input) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = input.Adapt(); + entity.LastModifyTime = DateTime.Now; + var isOk = await _db.Updateable(entity).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1001); + } + + /// + /// 删除门票订单 + /// + /// + [HttpDelete("{id}")] + public async Task Delete(string id) + { + var dbLink = await _dbLinkService.GetInfo("218239598550058245"); + _db.AddConnection(new ConnectionConfig() + { + ConfigId = dbLink.Id, + DbType = _dataBaseService.ToDbType(dbLink.DbType), + ConnectionString = _dataBaseService.ToConnectionString(dbLink), + InitKeyType = InitKeyType.Attribute, + IsAutoCloseConnection = true + }); + _db.ChangeDatabase(dbLink.Id); + var entity = await _db.Queryable().FirstAsync(p => p.Id == id); + _ = entity ?? throw NCCException.Oh(ErrorCode.COM1005); + var isOk = await _db.Deleteable().Where(d => d.Id == id).ExecuteCommandAsync(); + if (!(isOk > 0)) throw NCCException.Oh(ErrorCode.COM1002); + } + } +} diff --git a/antis-ncc-net-core/src/Application/NCC.API.Core/Startup.cs b/antis-ncc-net-core/src/Application/NCC.API.Core/Startup.cs index 690594f..981a449 100644 --- a/antis-ncc-net-core/src/Application/NCC.API.Core/Startup.cs +++ b/antis-ncc-net-core/src/Application/NCC.API.Core/Startup.cs @@ -29,6 +29,7 @@ using NCC.Common.Finder; using Antis.Pay.Core; using Antis.Pay.Core.Interface; using System.IO; +using Microsoft.AspNetCore.StaticFiles; namespace NCC.API.Core { @@ -155,7 +156,13 @@ namespace NCC.API.Core app.UseAuthentication(); app.UseAuthorization(); - + //app.UseStaticFiles(new StaticFileOptions + //{ + // ContentTypeProvider = new FileExtensionContentTypeProvider(new Dictionary + //{ + // { ".ttf", "application/octet-stream" } + // }) + //}); app.UseInject(string.Empty); app.UseEndpoints(endpoints => diff --git a/antis-ncc-net-core/src/Application/NCC.API/appsettings.json b/antis-ncc-net-core/src/Application/NCC.API/appsettings.json index 44f4d5b..2d84e93 100644 --- a/antis-ncc-net-core/src/Application/NCC.API/appsettings.json +++ b/antis-ncc-net-core/src/Application/NCC.API/appsettings.json @@ -101,7 +101,9 @@ //公众号平台配置 "WEPAY_WEB_APPID": "wx7eac7c67fed470c2", "WEPAY_WEB_MCH_ID": "1636552821", //商户号 - "WEPAY_WEB_NOTIFY_URL": "http://localhost:8061/api/Hairdressing/tbuserorder/WePayNotifyUserOrder", //微信支付回调地址 + "WEPAY_WEB_NOTIFY_URL": "http://localhost:8061/api/Blind/tbboxorder/WePayNotify", //微信支付回调地址 1 + "WEPAY_WEB_TICKETSNOTIFY_URL": "http://localhost:8061/api/Blind/tbticketsorder/TikectWePayNotify", //门票订单支付回调地址 2 + "WEPAY_WEB_URL": "https://uu365.t1j2.com/", "WEPAY_WEB_KEY": "F98514F3BEEE85F35DCC439B4E36D987", //微信商户秘钥 @@ -162,10 +164,10 @@ "PksEightPath": "Certificate/pkcs8.pem" }, "NCC_App": { - "CodeAreasName": "Education", + "CodeAreasName": "Blind", //系统文件路径(末尾必须带斜杆) "SystemPath": "C:\\web\\NCC\\uu-resources\\", - //"SystemPath": "C:\\inetpub\\wwwroot\\美容小程序\\UploadFile\\", + //"SystemPath": "C:\\inetpub\\wwwroot\\盲盒子\\UploadFile\\", //微信公众号允许上传文件类型 "MPUploadFileType": "bmp,png,jpeg,jpg,gif,mp3,wma,wav,amr,mp4", //微信允许上传文件类型 diff --git a/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/Interface/IWePay.cs b/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/Interface/IWePay.cs index a438653..32e199e 100644 --- a/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/Interface/IWePay.cs +++ b/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/Interface/IWePay.cs @@ -24,7 +24,7 @@ namespace Antis.Pay.Core.Interface /// APP支付:返回Json字符串,包含支付sdk支付参数 /// 公众号支付&WAP支付:暂未实现 /// - string BuildWePay(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType); + string BuildWePay(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType,int type); /// /// 微信支付异步通知验证 diff --git a/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/WePay.cs b/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/WePay.cs index a8bf5fc..d3e3890 100644 --- a/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/WePay.cs +++ b/antis-ncc-net-core/src/Infrastructure/NCC.Pay/NCC.Core.Pay/WePay.cs @@ -42,9 +42,9 @@ namespace Antis.Pay.Core /// /// /// - public string BuildWePay(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType) + public string BuildWePay(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType,int type) { - return this.UnifiedOrder(openid, orderNo, productName, totalFee, customerIP, tradeType); + return this.UnifiedOrder(openid, orderNo, productName, totalFee, customerIP, tradeType,type); } public bool VerifyNotify(out WePayReturnModel model) @@ -108,9 +108,9 @@ namespace Antis.Pay.Core /// 统一下单 /// /// - private string UnifiedOrder(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType) + private string UnifiedOrder(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType, int type) { - string requestXml = this.BuildRequest(openid, orderNo, productName, totalFee, customerIP, tradeType); + string requestXml = this.BuildRequest(openid, orderNo, productName, totalFee, customerIP, tradeType,type); Log4jHelper.LogInfo($" 第一个 resultXml = {requestXml}"); string resultXml = HTTPHelper.Post(WepayConfig.WEPAY_PAY_URL, requestXml); Log4jHelper.LogInfo($" UnifiedOrder resultXml = {resultXml}"); @@ -153,9 +153,9 @@ namespace Antis.Pay.Core throw new Exception("后台统一下单失败"); } - private string BuildRequest(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType) + private string BuildRequest(string openid, string orderNo, string productName, int totalFee, string customerIP, EnumWePayTradeType tradeType, int type) { - SortedDictionary dicParam = CreateParam(openid, orderNo, productName, totalFee, customerIP, tradeType); + SortedDictionary dicParam = CreateParam(openid, orderNo, productName, totalFee, customerIP, tradeType,type); string signString = CreateURLParamString(dicParam); string key = tradeType == EnumWePayTradeType.APP ? WepayConfig.WEPAY_APP_KEY : WepayConfig.WEPAY_WEB_KEY; @@ -166,7 +166,7 @@ namespace Antis.Pay.Core return BuildForm(dicParam); } - private static SortedDictionary CreateParam(string openid, string orderNo, string productName, decimal totalFee, string customerIP, EnumWePayTradeType tradeType) + private static SortedDictionary CreateParam(string openid, string orderNo, string productName, decimal totalFee, string customerIP, EnumWePayTradeType tradeType,int type) { SortedDictionary dic = new SortedDictionary(); dic.Add("appid", tradeType == EnumWePayTradeType.APP ? WepayConfig.WEPAY_APP_APPID : WepayConfig.WEPAY_WEB_APPID);//账号ID @@ -176,7 +176,7 @@ namespace Antis.Pay.Core dic.Add("out_trade_no", orderNo);//商户订单号 dic.Add("total_fee", totalFee.ToString());//总金额 dic.Add("spbill_create_ip", customerIP);//终端IP - dic.Add("notify_url", tradeType == EnumWePayTradeType.APP ? WepayConfig.WEPAY_APP_NOTIFY_URL : WepayConfig.WEPAY_WEB_NOTIFY_URL);//通知地址 + dic.Add("notify_url", tradeType == EnumWePayTradeType.APP ? WepayConfig.WEPAY_APP_NOTIFY_URL :type==1? WepayConfig.WEPAY_WEB_NOTIFY_URL: WepayConfig.WEPAY_WEB_TICKETSNOTIFY_URL);//通知地址 dic.Add("trade_type", tradeType.ToString());//交易类型 //加入openid dic.Add("openid", openid);//交易类型 diff --git a/antis-ncc-net-core/src/Modularity/Common/NCC.Common/CustomExtend/Config/PaymentSettingsOptions.cs b/antis-ncc-net-core/src/Modularity/Common/NCC.Common/CustomExtend/Config/PaymentSettingsOptions.cs index a60a9a0..2cfd7dc 100644 --- a/antis-ncc-net-core/src/Modularity/Common/NCC.Common/CustomExtend/Config/PaymentSettingsOptions.cs +++ b/antis-ncc-net-core/src/Modularity/Common/NCC.Common/CustomExtend/Config/PaymentSettingsOptions.cs @@ -100,6 +100,10 @@ namespace NCC.Common.Extensions public string WEPAY_WEB_APPID { get; set; } public string WEPAY_WEB_MCH_ID { get; set; } public string WEPAY_WEB_NOTIFY_URL { get; set; } + /// + /// 门票回调地址 + /// + public string WEPAY_WEB_TICKETSNOTIFY_URL { get; set; } public string WEPAY_WEB_URL { get; set; } /// /// /// diff --git a/antis-ncc-net-core/src/Modularity/Common/NCC.Common/Helper/ServiceHelper.cs b/antis-ncc-net-core/src/Modularity/Common/NCC.Common/Helper/ServiceHelper.cs new file mode 100644 index 0000000..97611bb --- /dev/null +++ b/antis-ncc-net-core/src/Modularity/Common/NCC.Common/Helper/ServiceHelper.cs @@ -0,0 +1,28 @@ +using NCC.Common.Extension; +using NCC.JsonSerialization; +using Newtonsoft.Json; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace NCC.Common.Helper +{ + /// + /// 帮助方法 + /// + public static class ServiceHelper + { + + /// + /// 获取时间戳 + /// + /// + public static long getTime() + { + return (long)(DateTime.Now.ToUniversalTime() - new DateTime(1970, 1, 1)).TotalMilliseconds; + } + + } +} diff --git a/antis-ncc-net-core/src/Modularity/Food/NCC.Food/BaseOrderService.cs b/antis-ncc-net-core/src/Modularity/Food/NCC.Food/BaseOrderService.cs index 893a999..6b8c3ca 100644 --- a/antis-ncc-net-core/src/Modularity/Food/NCC.Food/BaseOrderService.cs +++ b/antis-ncc-net-core/src/Modularity/Food/NCC.Food/BaseOrderService.cs @@ -399,7 +399,7 @@ namespace NCC.Food.BaseOrder { result = entity.Adapt(); //微信下单 - result.data = _wepay.BuildWePay(entity.OpenId, entity.OrderNumber, product.Title, _wepay.GetMoneyYuanToFen(entity.Money), ip, Antis.Pay.Core.Enum.EnumWePayTradeType.JSAPI).ToObject(); + //result.data = _wepay.BuildWePay(entity.OpenId, entity.OrderNumber, product.Title, _wepay.GetMoneyYuanToFen(entity.Money), ip, Antis.Pay.Core.Enum.EnumWePayTradeType.JSAPI).ToObject(); } _db.ScopedContext.CommitTran(); } diff --git a/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs b/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs index 609655b..f16e566 100644 --- a/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs +++ b/antis-ncc-net-core/src/Modularity/OAuth/NCC.OAuth/Service/OAuthService.cs @@ -49,6 +49,7 @@ using System.Text; using System.Web; using NCC.Common.Extensions; using NCC.Common.Helper; +using Serilog; namespace NCC.OAuth.Service { @@ -172,9 +173,9 @@ namespace NCC.OAuth.Service { try { - _logger.LogInformation($"aesIv:{aesIv}"); - _logger.LogInformation($"encryptedData:{encryptedData}"); - _logger.LogInformation($"code:{code}"); + Log.Information($"aesIv:{aesIv}"); + Log.Information($"encryptedData:{encryptedData}"); + Log.Information($"code:{code}"); string tenantDbName = App.Configuration["ConnectionStrings:DBName"]; string tenantId = App.Configuration["ConnectionStrings:ConfigId"]; string tenantAccout = string.Empty; @@ -188,7 +189,7 @@ namespace NCC.OAuth.Service Stream responseStream = httpWebResponse.GetResponseStream(); StreamReader streamReader = new StreamReader(responseStream, Encoding.UTF8); string text = streamReader.ReadToEnd(); - _logger.LogInformation($"这是请求获取解析:{text}"); + Log.Information($"这是请求获取解析:{text}"); streamReader.Close(); responseStream.Close(); var anon = new @@ -200,19 +201,19 @@ namespace NCC.OAuth.Service string text2 = JsonConvert.SerializeObject((object)anon, val); v_petminiuserdetails v_petminiuserdetails = JsonConvert.DeserializeObject(text); if (v_petminiuserdetails.openid.IsNullOrEmpty() || v_petminiuserdetails.session_key.IsNullOrEmpty()) throw NCCException.Oh("Code获取失败"); - _logger.LogInformation($"v_petminiuserdetails:{v_petminiuserdetails.ToJson()}"); - encryptedData = HttpUtility.UrlDecode(encryptedData); + Log.Information($"v_petminiuserdetails:{v_petminiuserdetails.ToJson()}"); + //encryptedData = HttpUtility.UrlDecode(encryptedData); encryptedData = encryptedData.Replace(" ", "+"); - _logger.LogInformation($"encryptedData:{encryptedData}"); + Log.Information($"encryptedData:{encryptedData}"); byte[] array = Convert.FromBase64String(encryptedData); - _logger.LogInformation($"encryptedData读取:{array.Length}"); + Log.Information($"encryptedData读取:{array.Length}"); RijndaelManaged rijndaelManaged = new RijndaelManaged(); rijndaelManaged.Key = Convert.FromBase64String(v_petminiuserdetails.session_key); - _logger.LogInformation($"session_key:{rijndaelManaged.ToJson()}"); - aesIv = HttpUtility.UrlDecode(aesIv); + Log.Information($"session_key:{rijndaelManaged.ToJson()}"); + //aesIv = HttpUtility.UrlDecode(aesIv); aesIv = aesIv.Replace(" ", "+"); rijndaelManaged.IV = Convert.FromBase64String(aesIv); - _logger.LogInformation($"IV解析:{rijndaelManaged.ToJson()}"); + Log.Information($"IV解析:{rijndaelManaged.ToJson()}"); rijndaelManaged.Mode = CipherMode.CBC; rijndaelManaged.Padding = PaddingMode.PKCS7; ICryptoTransform cryptoTransform = rijndaelManaged.CreateDecryptor(); @@ -220,8 +221,8 @@ namespace NCC.OAuth.Service string @string = Encoding.Default.GetString(bytes); wechardetails wechardetails = JsonConvert.DeserializeObject>(@string); wechardetails.watermark.openid = v_petminiuserdetails.openid; - _logger.LogInformation($"wechardetails:{wechardetails.ToJson()}"); - var entity = _userRepository.Context.Queryable().Where(o => o.MobilePhone == wechardetails.phoneNumber).First(); + Log.Information($"wechardetails:{wechardetails.ToJson()}"); + var entity = _userRepository.Context.Queryable().Where(o =>o.OpenId== v_petminiuserdetails.openid).First(); UserEntity user = null; if (entity == null) { diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserCrInput.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserCrInput.cs index 75d6ed4..b3a16a9 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserCrInput.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserCrInput.cs @@ -1,6 +1,7 @@ using NCC.Common.Model; using NCC.Dependency; using NCC.System.Entitys.Permission; +using SqlSugar; using System; using System.Collections.Generic; @@ -136,6 +137,16 @@ namespace NCC.System.Entitys.Dto.Permission.User /// 排序 /// public long? sortCode { get; set; } + + /// + /// 学校名称 + /// + public string school { get; set; } + + /// + /// 学号 + /// + public string schoolNumber { get; set; } } } diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserInfoOutput.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserInfoOutput.cs index 124db57..64aa764 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserInfoOutput.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserInfoOutput.cs @@ -139,5 +139,15 @@ namespace NCC.System.Entitys.Dto.Permission.User /// public long? sortCode { get; set; } + /// + /// 学校名称 + /// + public string school { get; set; } + + /// + /// 学号 + /// + public string schoolNumber { get; set; } + } } diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListOutput.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListOutput.cs index 006a222..5d57d44 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListOutput.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Dto/Permission/User/UserListOutput.cs @@ -107,6 +107,14 @@ namespace NCC.System.Entitys.Dto.Permission.User /// public string postalAddress { get; set; } + /// + /// 学校名称 + /// + public string school { get; set; } + /// + /// 学号 + /// + public string schoolNumber { get; set; } } } diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Entity/Permission/UserEntity.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Entity/Permission/UserEntity.cs index 33c8e88..7a22850 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Entity/Permission/UserEntity.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System.Entitys/Entity/Permission/UserEntity.cs @@ -334,6 +334,17 @@ namespace NCC.System.Entitys.Permission public string OpenId { get; set; } + /// + /// 学校名称 + /// + [SugarColumn(ColumnName = "F_School")] + public string School { get; set; } + + /// + /// 学号 + /// + [SugarColumn(ColumnName = "F_SchoolNumber")] + public string SchoolNumber { get; set; } } } diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Common/FileService.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Common/FileService.cs index a9dcf4d..f0ff5c6 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Common/FileService.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Common/FileService.cs @@ -37,16 +37,18 @@ namespace NCC.System.Service.Common private readonly IConfiguration _configuration; private readonly IUserManager _userManager; private readonly IOSSServiceFactory _oSSServiceFactory; + private readonly IHttpContextAccessor _httpContextAccessor; /// /// 初始化一个类型的新实例 /// - public FileService(IGeneralCaptcha captchaHandle, IConfiguration configuration, IUserManager userManager, IOSSServiceFactory oSSServiceFactory) + public FileService(IGeneralCaptcha captchaHandle, IConfiguration configuration, IUserManager userManager, IOSSServiceFactory oSSServiceFactory, IHttpContextAccessor httpContextAccessor) { _captchaHandle = captchaHandle; _configuration = configuration; _userManager = userManager; _oSSServiceFactory = oSSServiceFactory; + _httpContextAccessor = httpContextAccessor; } /// diff --git a/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs b/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs index 17461ab..0e3ddfa 100644 --- a/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs +++ b/antis-ncc-net-core/src/Modularity/System/NCC.System/Service/Permission/UsersService.cs @@ -93,7 +93,7 @@ namespace NCC.System.Service.Permission if (!input.organizeId.IsNullOrEmpty()) organizeIds = await GetSubOrganizeIds(input.organizeId); var data = await _userRepository.Context.Queryable((a, b) => new JoinQueryInfos(JoinType.Left, b.Id == SqlFunc.ToString(a.OrganizeId))) - .Select((a, b) => new UserListOutput { id = a.Id, account = a.Account, realName = a.RealName, creatorTime = a.CreatorTime, department = b.FullName, description = a.Description, enabledMark = a.EnabledMark, gender = a.Gender, mobilePhone = a.MobilePhone, positionId = a.PositionId, position = "", roleId = a.RoleId, roleName = "", sortCode = a.SortCode, deleteMark = a.DeleteMark, organizeId = a.OrganizeId,email=a.Email,postalAddress=a.PostalAddress }) + .Select((a, b) => new UserListOutput { id = a.Id,school=a.School,schoolNumber=a.SchoolNumber, account = a.Account, realName = a.RealName, creatorTime = a.CreatorTime, department = b.FullName, description = a.Description, enabledMark = a.EnabledMark, gender = a.Gender, mobilePhone = a.MobilePhone, positionId = a.PositionId, position = "", roleId = a.RoleId, roleName = "", sortCode = a.SortCode, deleteMark = a.DeleteMark, organizeId = a.OrganizeId,email=a.Email,postalAddress=a.PostalAddress }) .MergeTable() .Mapper((output) => { @@ -538,17 +538,135 @@ namespace NCC.System.Service.Permission user = await _userManager.GetUserInfo(); }); - if (!user.dataScope.Any(it => it.organizeId == input.organizeId && it.Edit == true) && !user.isAdministrator) + //if (!user.dataScope.Any(it => it.organizeId == input.organizeId && it.Edit == true) && !user.isAdministrator) + //{ + // throw NCCException.Oh(ErrorCode.D1013); + //} + // 排除自己并且判断与其他是否相同 + var isExist = await _userRepository.AnyAsync(u => u.Account == input.account && u.DeleteMark == null && u.Id != id); + if (isExist) throw NCCException.Oh(ErrorCode.D1003); + //if (id == input.managerId) throw NCCException.Oh(ErrorCode.D1021); + var entity = input.Adapt(); + entity.QuickQuery = PinyinUtil.PinyinString(input.realName); + var headIcon = ""; + entity.HeadIcon = headIcon; + entity.LastModifyTime = DateTime.Now; + entity.LastModifyUserId = user.userId; + try { - throw NCCException.Oh(ErrorCode.D1013); + //开启事务 + _userRepository.Ado.BeginTran(); + + //更新用户记录 + var newEntity = await _userRepository.Context.Updateable(entity).UpdateColumns(it => new + { + it.Account, + it.RealName, + it.QuickQuery, + it.Gender, + it.Email, + it.OrganizeId, + it.ManagerId, + it.PositionId, + it.RoleId, + it.SortCode, + it.EnabledMark, + it.Description, + it.HeadIcon, + it.Nation, + it.NativePlace, + it.EntryDate, + it.CertificatesType, + it.CertificatesNumber, + it.Education, + it.UrgentContacts, + it.UrgentTelePhone, + it.PostalAddress, + it.MobilePhone, + it.Birthday, + it.TelePhone, + it.Landline, + it.LastModifyTime, + it.LastModifyUserId, + it.School, + it.SchoolNumber + }).ExecuteCommandAsync(); + + //将临时文件迁移至正式文件 + FileHelper.MoveFile(FileVariable.TemporaryFilePath + headIcon, FileVariable.UserAvatarFilePath + headIcon); + + //直接删除用户关系表相关相关数据 + //await _userRelationService.Delete(id); + + //var userRelationList = new List(); + //var positionList = _userRelationService.CreateByPosition(id, entity.PositionId); + //var roleList = _userRelationService.CreateByRole(id, entity.RoleId); + //userRelationList.AddRange(positionList); + //userRelationList.AddRange(roleList); + //if (userRelationList.Count > 0) + //{ + // //批量新增用户关系 + // await _userRelationService.Create(userRelationList); + //} + + _userRepository.Ado.CommitTran(); + } + catch (Exception) + { + FileHelper.MoveFile(FileVariable.UserAvatarFilePath + headIcon, FileVariable.TemporaryFilePath + headIcon); + _userRepository.Ado.RollbackTran(); + throw NCCException.Oh(ErrorCode.D5004); } + + #region 第三方同步 + var sysConfig = await _sysConfigService.GetInfo(); + var userList = new List(); + userList.Add(entity); + if (sysConfig.dingSynIsSynUser == 1) + { + await _synThirdInfoService.SynUser(2, 3, sysConfig, userList); + } + if (sysConfig.qyhIsSynUser == 1) + { + await _synThirdInfoService.SynUser(1, 3, sysConfig, userList); + } + #endregion + + } + + + + + + /// + /// 更新 + /// + /// 主键 + /// 参数 + /// + [HttpPost("CustomUpdate")] + public async Task CustomUpdate(UserUpInput input) + { + var user = new UserInfo(); + await Scoped.Create(async (_, scope) => + { + var services = scope.ServiceProvider; + + var _userManager = App.GetService(services); + + user = await _userManager.GetUserInfo(); + }); + //if (!user.dataScope.Any(it => it.organizeId == input.organizeId && it.Edit == true) && !user.isAdministrator) + //{ + // throw NCCException.Oh(ErrorCode.D1013); + //} // 排除自己并且判断与其他是否相同 - var isExist = await _userRepository.AnyAsync(u => u.Account == input.account && u.DeleteMark == null && u.Id != id); + var isExist = await _userRepository.AnyAsync(u => u.Account == input.account && u.DeleteMark == null && u.Id != input.id); if (isExist) throw NCCException.Oh(ErrorCode.D1003); - if (id == input.managerId) throw NCCException.Oh(ErrorCode.D1021); + //if (id == input.managerId) throw NCCException.Oh(ErrorCode.D1021); var entity = input.Adapt(); entity.QuickQuery = PinyinUtil.PinyinString(input.realName); - var headIcon = input.headIcon.Split('/').ToList().Last(); + var headIcon = ""; entity.HeadIcon = headIcon; entity.LastModifyTime = DateTime.Now; entity.LastModifyUserId = user.userId; @@ -588,6 +706,8 @@ namespace NCC.System.Service.Permission it.Landline, it.LastModifyTime, it.LastModifyUserId, + it.School, + it.SchoolNumber }).ExecuteCommandAsync(); //将临时文件迁移至正式文件 @@ -629,6 +749,7 @@ namespace NCC.System.Service.Permission await _synThirdInfoService.SynUser(1, 3, sysConfig, userList); } #endregion + } /// -- libgit2 0.21.4