xuekang
2024-05-13 15a0280ae9e7db96fdf0744c722d214d2cb5a0e5
payment初始化
131个文件已添加
12135 ■■■■■ 已修改文件
ecosphere/ecosphere-four-payment/pom.xml 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/FourPaymentApplication.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/base/domain/SysUser.java 326 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseClientFallbackFactory.java 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseServiceClient.java 243 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopClientFallbackFactory.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopServiceClient.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/CorsConfig.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/JacksonConfig.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/RsaDecryptor.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/SwaggerConfig.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssFilter.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssRequestWrapper.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/HeadBandGiveCoup.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MyBatisConfig.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MySqlInterceptor.java 114 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/redis/RedisConfig.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/contants/Contants.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/BaseController.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppChannelOrgConfigController.java 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppStoreIndustryManageController.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityDistributeRecordController.java 81 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityFeeController.java 259 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityShopRecordController.java 242 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelInfoController.java 151 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelOrgConfigController.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SpecialFeeRateController.java 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/StoreIndustryManageController.java 163 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SysOrgController.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/AcceptResult.java 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityDistributeRecord.java 71 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityFee.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityShopRecord.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelInfo.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelOrgConfig.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SpecialFeeRate.java 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreIndustryManage.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreMemberInfo.java 511 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreSupplierInfoAccount.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SysOrg.java 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityDistributeBudgetDto.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityFeeDetailDto.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityShopRecordDto.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelInfoDto.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDetailDto.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDto.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ConfigOrgDetailChannel.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/RateDto.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/SpecialFeeRateDto.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/StoreIndustryManageDto.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/AppDTO.java 62 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysOrg.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysUser.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/MapDTO.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/SysOrgQuery.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ActivityShopRecordParam.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ChannelOrgConfigParam.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityDistributeRecordQuery.java 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityFeeQuery.java 101 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityShopRecordQuery.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/SpecialFeeRateQuery.java 83 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/StoreIndustryManageQuery.java 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/exception/Exceptionhandler.java 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityDistributeRecordMapper.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityFeeMapper.java 61 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityShopRecordMapper.java 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelInfoMapper.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelOrgConfigMapper.java 74 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SpecialFeeRateMapper.java 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/StoreIndustryManageMapper.java 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysOrgMapper.java 186 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysUserMapper.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityDistributeRecordService.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityFeeService.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityShopRecordService.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/BaseService.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelInfoService.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelOrgConfigService.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java 268 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SpecialFeeRateService.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/StoreIndustryManageService.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SysOrgService.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityDistributeRecordServiceImpl.java 239 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityFeeServiceImpl.java 296 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityShopRecordServiceImpl.java 167 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelInfoServiceImpl.java 161 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelOrgConfigServiceImpl.java 227 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SpecialFeeRateServiceImpl.java 119 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/StoreIndustryManageServiceImpl.java 164 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SysOrgServiceImpl.java 135 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/util/SystemUtil.java 282 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/alipay-sandbox.properties 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/apiclient_key.pem 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/application-dev.yml 77 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/application-kf.yml 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/application.properties 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/application.yml 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/banner.txt 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/express.properties 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/ftp.properties 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/hnnx.properties 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/hnnx/hnnxopenbank.pfx 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/hnnx/merchant-rsa.pfx 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityDistributeRecordMapper.xml 273 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityFeeMapper.xml 416 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityShopRecordMapper.xml 234 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelInfoMapper.xml 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelOrgConfigMapper.xml 182 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/SpecialFeeRateMapper.xml 338 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/StoreIndustryManageMapper.xml 231 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/SysOrgMapper.xml 343 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityDistributeRecordMapper.xml 162 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityFeeMapper.xml 185 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityShopRecordMapper.xml 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelInfoMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelOrgConfigMapper.xml 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendSpecialFeeRateMapper.xml 134 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendStoreIndustryManageMapper.xml 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/payTl-test.yml 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/pfx/zfxt.pfx 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/qdl.properties 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/qdl/天翼电子商务有限公司.cer 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/qdl/河南嗨呗智能科技有限公司.P12 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/qrTemp/muBan.png 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/sftp.properties 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/wxV3/apiclient_key.pem 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/wxpay.properties 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/main/resources/ydOss.properties 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/MybatisGeneratorTest.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/NumberTest.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/src/test/resources/generatorConfig.xml 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ecosphere/ecosphere-four-payment/pom.xml
New file
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.dromara</groupId>
        <artifactId>ecosphere</artifactId>
        <version>${revision}</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <artifactId>ecosphere-four-payment</artifactId>
    <description>
        ecosphere-four-payment ä¾èµ–项
    </description>
    <dependencies>
        <dependency>
            <groupId>org.dromara</groupId>
            <artifactId>ruoyi-common-web</artifactId>
        </dependency>
        <dependency>
            <groupId>com.nuvole</groupId>
            <artifactId>ecosphere-common</artifactId>
        </dependency>
        <dependency>
            <groupId>com.nuvole</groupId>
            <artifactId>ecosphere-base-rest</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.pagehelper</groupId>
            <artifactId>pagehelper-spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>druid-spring-boot-starter</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-redis</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.xiaoymin</groupId>
            <artifactId>swagger-bootstrap-ui</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-openfeign</artifactId>
        </dependency>
        <!-- rabbitMq -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-amqp</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-core</artifactId>
            <version>1.3.5</version>
            <scope>system</scope>
            <systemPath>${basedir}/../libs/mybatis-generator-core-1.3.5.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.springframework.data</groupId>
            <artifactId>spring-data-redis</artifactId>
            <version>2.0.8.RELEASE</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.5</version>
            <scope>compile</scope>
        </dependency>
        <!-- quartz æ¨¡å— -->
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz-jobs</artifactId>
            <version>2.3.0</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.ulisesbocchio</groupId>
            <artifactId>jasypt-spring-boot-starter</artifactId>
        </dependency>
        <!--自己搞的dto转换jar-->
        <dependency>
            <groupId>com.tangmou</groupId>
            <artifactId>convertDto</artifactId>
            <scope>system</scope>
            <version>1.0.0</version>
            <systemPath>${basedir}/../libs/convert-util.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>org.redisson</groupId>
            <artifactId>redisson</artifactId>
            <version>3.13.3</version>
        </dependency>
        <!--        å¾®ä¿¡å°ç¨‹åºæ”¯ä»˜-->
        <dependency>
            <groupId>com.github.wechatpay-apiv3</groupId>
            <artifactId>wechatpay-apache-httpclient</artifactId>
            <version>0.4.8</version>
        </dependency>
        <!--        <dependency>-->
        <!--            <groupId>com.walkersoft</groupId>-->
        <!--            <artifactId>walker-pay-support-allinpaycloud</artifactId>-->
        <!--            <version>2.0.0-20230303.053301-14</version>-->
        <!--        </dependency>-->
        <dependency>
            <groupId>com.walkersoft</groupId>
            <artifactId>walker-pay-support-allinpaycloud</artifactId>
            <version>2.3.0-SNAPSHOT</version>
        </dependency>
        <!-- å¾®ä¿¡æ”¯ä»˜API v3的Apache HttpClient扩展,实现了请求签名的生成和应答签名的验证-->
        <dependency>
            <groupId>com.github.wechatpay-apiv3</groupId>
            <artifactId>wechatpay-apache-httpclient</artifactId>
            <version>0.4.9</version>
        </dependency>
        <!-- zip ä½¿ç”¨-->
        <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>2.9.1</version>
        </dependency>
        <!--   hutool验证码模块     -->
        <dependency>
            <groupId>cn.hutool</groupId>
            <artifactId>hutool-captcha</artifactId>
            <version>4.5.3</version>
        </dependency>
        <!-- Alipay SDK é€šç”¨ç‰ˆ-->
        <dependency>
            <groupId>com.alipay.sdk</groupId>
            <artifactId>alipay-sdk-java</artifactId>
            <version>4.34.71.ALL</version>
        </dependency>
        <dependency>
            <groupId>com.google.zxing</groupId>
            <artifactId>core</artifactId>
            <version>3.5.0</version>
        </dependency>
    </dependencies>
</project>
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/FourPaymentApplication.java
New file
@@ -0,0 +1,29 @@
package com.nuvole;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.transaction.annotation.EnableTransactionManagement;
/**
 * @Desc: å››æ–¹æ”¯ä»˜å¯åŠ¨ç±»
 * @Author: dqh
 * @Date: 2024-04-09
 **/
@EnableFeignClients
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@MapperScan(value = {"com.nuvole.four.mapper","com.nuvole.util"})
@EnableTransactionManagement
public class FourPaymentApplication {
    public static void main(String[] args) {
//        SpringApplication application = new SpringApplication(FourPaymentApplication.class);
        // æ³¨å†ŒConfigValidator类为初始化器
//        application.addInitializers(new ConfigCheck());
//        application.run(args);
        SpringApplication.run(FourPaymentApplication.class, args);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/base/domain/SysUser.java
New file
@@ -0,0 +1,326 @@
package com.nuvole.base.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * å®žä½“类对应的数据表为:  sys_user
 * @author system-generator
 * @date 2019-04-22 14:25:10
 */
@ApiModel(value ="用户信息")
public class SysUser {
    @ApiModelProperty(value = "用户机构级别")
    private Integer orgLv;
    @ApiModelProperty(value = "用户机构名称")
    private String orgName;
    @ApiModelProperty(value = "用户部门名称")
    private String deptName;
    @ApiModelProperty(value = "ID")
    private Long id;
    @ApiModelProperty(value = "登录名")
    private String loginName;
    @ApiModelProperty(value = "密码")
    private String mixPd;
    @ApiModelProperty(value = "旧密码")
    private String oldPwd;
    @ApiModelProperty(value = "新密码")
    private String newPwd;
    @ApiModelProperty(value = "重置密码")
    private String resultPwd;
    @ApiModelProperty(value = "姓名")
    private String userName;
    @ApiModelProperty(value = "帐号类型(1 æ™®é€šç”¨æˆ· ï¼›;2 å®¢æˆ·ç»ç†ï¼‰")
    private Short userType;
    @ApiModelProperty(value = "人员编号")
    private String userCode;
    @ApiModelProperty(value = "性别[1男,2女]")
    private Short sex;
    @ApiModelProperty(value = "备注")
    private String note;
    @ApiModelProperty(value = "手机号码")
    private String mobile;
    @ApiModelProperty(value = "部门编号")
    private String deptCode;
    @ApiModelProperty(value = "机构id")
    private Long orgId;
    @ApiModelProperty(value = "部门ID")
    private Long deptId;
    @ApiModelProperty(value = "机构编号")
    private String orgCode;
    @ApiModelProperty(value = "邮箱")
    private String email;
    @ApiModelProperty(value = "状态(0 ç¦ç”¨ï¼Œ1启用)")
    private Short state;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value = "创建人ID")
    private Long createId;
    @ApiModelProperty(value = "创建人")
    private String createName;
    @ApiModelProperty(value = "头像")
    private String headImage;
    @ApiModelProperty(value = "锁定次数")
    private Short lockTimes;
    @ApiModelProperty(value = "锁定到期日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lockTime;
    public Integer getOrgLv() {
        return orgLv;
    }
    public void setOrgLv(Integer orgLv) {
        this.orgLv = orgLv;
    }
    public String getOrgName() {
        return orgName;
    }
    public void setOrgName(String orgName) {
        this.orgName = orgName;
    }
    public String getDeptName() {
        return deptName;
    }
    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getLoginName() {
        return loginName;
    }
    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }
    public String getResultPwd() {
        return resultPwd;
    }
    public void setResultPwd(String resultPwd) {
        this.resultPwd = resultPwd;
    }
    public String getOldPwd() {
        return oldPwd;
    }
    public void setOldPwd(String oldPwd) {
        this.oldPwd = oldPwd;
    }
    public String getNewPwd() {
        return newPwd;
    }
    public void setNewPwd(String newPwd) {
        this.newPwd = newPwd;
    }
    public String getMixPd() {
        return mixPd;
    }
    public void setMixPd(String mixPd) {
        this.mixPd = mixPd;
    }
    public String getUserName() {
        return userName;
    }
    public void setUserName(String userName) {
        this.userName = userName;
    }
    public Short getUserType() {
        return userType;
    }
    public void setUserType(Short userType) {
        this.userType = userType;
    }
    public String getUserCode() {
        return userCode;
    }
    public void setUserCode(String userCode) {
        this.userCode = userCode;
    }
    public Short getSex() {
        return sex;
    }
    public void setSex(Short sex) {
        this.sex = sex;
    }
    public String getNote() {
        return note;
    }
    public void setNote(String note) {
        this.note = note;
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile;
    }
    public String getDeptCode() {
        return deptCode;
    }
    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode;
    }
    public Long getOrgId() {
        return orgId;
    }
    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }
    public Long getDeptId() {
        return deptId;
    }
    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode;
    }
    public String getEmail() {
        return email;
    }
    public void setEmail(String email) {
        this.email = email;
    }
    public Short getState() {
        return state;
    }
    public void setState(Short state) {
        this.state = state;
    }
    public Date getCreateTime() {
        return createTime;
    }
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Long getCreateId() {
        return createId;
    }
    public void setCreateId(Long createId) {
        this.createId = createId;
    }
    public String getCreateName() {
        return createName;
    }
    public void setCreateName(String createName) {
        this.createName = createName;
    }
    public String getHeadImage() {
        return headImage;
    }
    public void setHeadImage(String headImage) {
        this.headImage = headImage;
    }
    public Short getLockTimes() {
        return lockTimes;
    }
    public void setLockTimes(Short lockTimes) {
        this.lockTimes = lockTimes;
    }
    public Date getLockTime() {
        return lockTime;
    }
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public void setLockTime(Date lockTime) {
        this.lockTime = lockTime;
    }
    private String wxAccount;
    public String getWxAccount() {
        return wxAccount;
    }
    public void setWxAccount(String wxAccount) {
        this.wxAccount = wxAccount;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseClientFallbackFactory.java
New file
@@ -0,0 +1,208 @@
//package com.nuvole.four.client;
//
//import com.nuvole.base.domain.BaseGlobalConfig;
//import com.nuvole.base.domain.SysArea;
//import com.nuvole.base.domain.SysOrg;
//import com.nuvole.base.domain.SysUser;
//import com.nuvole.common.domain.emnu.CommonResultEmnu;
//import com.nuvole.common.domain.result.CommonResult;
//import com.nuvole.common.domain.result.PageBean;
//import feign.hystrix.FallbackFactory;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestParam;
//
//import java.util.List;
//import java.util.Map;
//
///**
// * @author tangzong
// */
//@Component
//@Slf4j
//public class BaseClientFallbackFactory implements FallbackFactory<BaseServiceClient> {
//
//    @Override
//    public BaseServiceClient create(Throwable throwable) {
//        log.error("fallback reason:{}", throwable.getMessage());
//        return new BaseServiceClient() {
//
//            @Override
//            public CommonResult getOrgByCode(String code) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult getOrgByCode2(String code) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult getOrgAndParentByCode(String code) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult getManagerInfoByCode(String code) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<PageBean<SysUser>> selectAllByOrgId(Long org_id, Short user_type, Integer pageNumber,Integer pageSize, Integer state) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult getOrgByUserCode(String code) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<String> getAllManagerByOrgCode(String orgCode) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<Map>> getAllManagerInfoByOrgCode(String orgCode) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult getUserByCode(String code) {
//                return null;
//            }
//
//
//            @Override
//            public CommonResult getUserById(Long id) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<Map> getManagerInfoById(Long id) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<SysOrg>> getOrgList(Long pid, Integer state) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<String> getFullOrgName(Long id, String orgCode, String userOrgCode) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<PageBean<Map>> getBranchByOrgCode(String code, String keyText, Short userType, Integer pageNumber, Integer pageSize) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult getCityList() {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @GetMapping("/v1/base/pc/area/getAreaByOrgId")
//            @Override
//            public CommonResult getAreaByOrgId(@RequestParam("orgId") Long orgId) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public List<SysOrg> getOrgMapByLogin(Long orgId, Integer orgLv) {
//                return null;
//            }
//
//            @GetMapping("/v1/base/pc/sysUser/getUserInfoById")
//            @Override
//            public SysUser getUserInfoById(Long id) {
//                return null;
//            }
//
//            @Override
//            public SysUser getUserInfoByName(String name) {
//                return null;
//            }
//
//            @Override
//            public int getOrgLvByOrgCode(String orgCode) {
//                return -1;
//            }
//
//            @Override
//            public CommonResult getOrgById(Long orgId) {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public Long getSjOrgId(Long orgId, Integer orgLv) {
//                return null;
//            }
//
//            @GetMapping("/v1/base/pc/org/getSjOrgInfo")
//            @Override
//            public CommonResult<SysOrg> getSjOrgInfo() {
//                return new CommonResult(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public SysArea getAreaByOrgCode(String orgCode) {
//                return null;
//            }
//
//            @Override
//            public CommonResult<List<SysOrg>> getInfoByOrgCode(String orgCode) {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<Map>> getSjOrgCodeAreaNameRef() {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<Map>> getXjOrg() {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<Map> getByDicCodeAndDicKey(String dicCode, String dicKey) {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<Map>> getDicTree(String dicCode, Integer state) {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<Map>> getOrgCodeCache() {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<Map> getAllOrgFullName() {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<Boolean> cardIsContain(String cardNum) {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @Override
//            public CommonResult<List<BaseGlobalConfig>> getConfigList(String globalCode, Short matchModel) {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//
//            @PostMapping("/v1/base/pc/global/config/save")
//            @Override
//            public CommonResult<List<BaseGlobalConfig>> save(String configList) {
//                return new CommonResult<>(CommonResultEmnu.SERVER_ERR);
//            }
//        };
//    }
//}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseServiceClient.java
New file
@@ -0,0 +1,243 @@
//package com.nuvole.four.client;
//
//import com.nuvole.base.domain.BaseGlobalConfig;
//import com.nuvole.base.domain.SysArea;
//import com.nuvole.base.domain.SysOrg;
//import com.nuvole.base.domain.SysUser;
//import com.nuvole.common.domain.result.CommonResult;
//import com.nuvole.common.domain.result.PageBean;
//import org.springframework.cloud.openfeign.FeignClient;
//import org.springframework.stereotype.Component;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestParam;
//
//import java.util.List;
//import java.util.Map;
//
///**
// * è°ƒç”¨base
// *
// * @Author: lc
// * @Date: 2019/5/22 10:18
// */
//@Component
//@FeignClient(value = "service-base", fallbackFactory = BaseClientFallbackFactory.class)
//public interface BaseServiceClient {
//    /**
//     * æ ¹æ®æœºæž„编号查询机构信息
//     *
//     * @author zxc
//     * @Date 2019/6/4 11:27
//     **/
//    @GetMapping("/v1/base/pc/org/getOrgByCode")
//    CommonResult getOrgByCode(@RequestParam("code") String code);
//
//    @GetMapping("/v1/base/pc/org/getOrgByCode2")
//    CommonResult getOrgByCode2(@RequestParam("code") String code);
//
//    @GetMapping("/v1/base/pc/org/getOrgAndParentByCode")
//    CommonResult getOrgAndParentByCode(@RequestParam("code") String code);
//
//    /**
//     * Createed by PKZ
//     * Date 2019/6/17 16:15
//     * Description:根据user_org_code查询机构信息
//     **/
//    @GetMapping("/v1/base/pc/org/getOrgByUserCode")
//    CommonResult getOrgByUserCode(@RequestParam("code") String code);
//
//    @GetMapping("/v1/base/pc/sysUser/getAllManagerByOrgCode")
//    CommonResult<String> getAllManagerByOrgCode(@RequestParam("orgCode") String orgCode);
//
//    @GetMapping("/v1/base/pc/sysUser/getAllManagerInfoByOrgCode")
//    CommonResult<List<Map>> getAllManagerInfoByOrgCode(@RequestParam("orgCode") String orgCode);
//
//    /**
//     * Createed by PKZ
//     * Date 2019/6/17 16:15
//     * Description:根据user_code查询客户经理信息
//     **/
//    @GetMapping("/v1/base/pc/sysUser/getUserByCode")
//    CommonResult getUserByCode(@RequestParam("code") String code);
//
//    @GetMapping("/v1/base/pc/sysUser/getManagerInfoByCode")
//    CommonResult getManagerInfoByCode(@RequestParam("code") String code);
//
//    @GetMapping("/v1/base/pc/sysUser/selectAllByOrgId")
//    CommonResult<PageBean<SysUser>> selectAllByOrgId(@RequestParam("org_id") Long org_id,
//                                                     @RequestParam("user_type") Short user_type,
//                                                     @RequestParam("pageNumber") Integer pageNumber,
//                                                     @RequestParam("pageSize") Integer pageSize,
//                                                     @RequestParam("state") Integer state);
//
//    /**
//     * Createed by PKZ
//     * Date 2019/6/17 16:15
//     * Description:根据user_id查询客户经理信息
//     **/
//    @GetMapping("/v1/base/pc/sysUser/getUserById")
//    CommonResult getUserById(@RequestParam("id") Long id);
//
//    /**
//     * @param id
//     * @return
//     * @Description æ ¹æ®user_id查询客户经理信息
//     */
//    @GetMapping("/v1/base/pc/sysUser/getManagerInfoById")
//    CommonResult<Map> getManagerInfoById(@RequestParam("id") Long id);
//
//    /**
//     * Createed by PKZ
//     * Date 2019/6/17 16:15
//     * Description:根据pid查询机构列表
//     **/
//    @GetMapping("/v1/base/pc/org/getOrgList")
//    CommonResult<List<SysOrg>> getOrgList(@RequestParam("pid") Long pid, @RequestParam("state") Integer state);
//
//    @GetMapping("/v1/base/pc/org/getFullOrgName")
//    /**
//     * æŸ¥è¯¢æœºæž„全名
//     */
//    CommonResult<String> getFullOrgName(@RequestParam("id") Long id, @RequestParam("orgCode") String orgCode, @RequestParam("userOrgCode") String userOrgCode);
//
//    @GetMapping("/v1/base/pc/org/getBranchByOrgCode")
//    CommonResult<PageBean<Map>> getBranchByOrgCode(
//            @RequestParam("code") String code, @RequestParam("keyText") String keyText,
//            @RequestParam("userType") Short userType,
//            @RequestParam("pageNumber") Integer pageNumber,
//            @RequestParam("pageSize") Integer pageSize);
//
//    /**
//     * æŸ¥è¯¢ç¬¬äºŒçº§åŒºåŸŸåˆ—表
//     *
//     * @author zxc
//     * @Date 2019/7/13 17:38
//     **/
//    @GetMapping("/v1/base/pc/area/getAreaZtreeList")
//    CommonResult getCityList();
//
//    /**
//     * æ ¹æ®æœºæž„id查询区域信息
//     *
//     * @author zxc
//     * @Date 2019/6/4 11:27
//     **/
//    @GetMapping("/v1/base/pc/area/getAreaByOrgId")
//    CommonResult getAreaByOrgId(@RequestParam("orgId") Long orgId);
//
//    /**
//     * æ ¹æ®æœºæž„id查询机构信息
//     *
//     * @author tang
//     */
//    @GetMapping("/v1/base/pc/org/getOrgMapByLogin")
//    List<SysOrg> getOrgMapByLogin(@RequestParam("orgId") Long orgId, @RequestParam("orgLv") Integer orgLv);
//
//    @GetMapping("/v1/base/pc/sysUser/getUserInfoById")
//    SysUser getUserInfoById(@RequestParam("id") Long id);
//
//    @GetMapping("/v1/base/pc/sysUser/getUserInfoByName")
//    SysUser getUserInfoByName(@RequestParam("name") String name);
//
//    /**
//     * æ ¹æ®org——code获取机构等级
//     *
//     * @param orgCode
//     * @return
//     */
//    @GetMapping("/v1/base/pc/org/getOrgLvByOrgCode")
//    int getOrgLvByOrgCode(@RequestParam("orgCode") String orgCode);
//
//    /**
//     * æ ¹æ®id获取机构
//     *
//     * @param orgId
//     * @return
//     */
//    @GetMapping("/v1/base/pc/org/get")
//    CommonResult getOrgById(@RequestParam("id") Long orgId);
//
//
//    @GetMapping("/v1/base/pc/org/getSjOrgId")
//    Long getSjOrgId(@RequestParam("orgId") Long orgId, @RequestParam("lv") Integer orgLv);
//
//
//    /**
//     * æŸ¥è¯¢çœçº§æœºæž„信息
//     *
//     * @Author: lc
//     * @Date: 2019/8/28 18:56
//     */
//    @GetMapping("/v1/base/pc/org/getSjOrgInfo")
//    CommonResult<SysOrg> getSjOrgInfo();
//
//    /**
//     * æ ¹æ®æ”¯å±€æœºæž„编号查询市级区域信息
//     *
//     * @param orgCode
//     * @return
//     */
//    @GetMapping("/v1/base/pc/area/getAreaByOrgCode")
//    SysArea getAreaByOrgCode(@RequestParam("orgCode") String orgCode);
//
//    @GetMapping("/v1/base/pc/org/getInfoByOrgCode")
//    CommonResult<List<SysOrg>> getInfoByOrgCode(@RequestParam("orgCode") String orgCode);
//
//
//    /**
//     * æŸ¥è¯¢æ‰€æœ‰å¸‚级机构编号 å’Œ å¯¹åº”区域名称的 å…³è”
//     *
//     * @author zxc
//     * @date 2020/1/10 11:25
//     **/
//    @GetMapping("/v1/base/pc/org/getSjOrgCodeAreaNameRef")
//    CommonResult<List<Map>> getSjOrgCodeAreaNameRef();
//
//
//    /**
//     * èŽ·å–åŽ¿åŒºæœºæž„ä¿¡æ¯
//     *
//     * @return
//     */
//    @GetMapping("/v1/base/pc/org/getXqOrg")
//    CommonResult<List<Map>> getXjOrg();
//
//
//    /**
//     * æ ¹æ®æ•°æ®å­—å…¸key和数据名 æŸ¥è¯¢
//     *
//     * @author zxc
//     * @date 2019/12/13 16:42
//     **/
//    @GetMapping("/v1/base/pc/dic/getByDicCodeAndDicKey")
//    CommonResult<Map> getByDicCodeAndDicKey(@RequestParam("dicCode") String dicCode, @RequestParam("dicKey") String dicKey);
//
//    @GetMapping("/v1/base/pc/dic/getDicTree")
//    CommonResult<List<Map>> getDicTree(@RequestParam("dicCode") String dicCode, @RequestParam("state") Integer state);
//
//
//    @GetMapping("/v1/base/pc/org/getOrgCodeCache")
//    CommonResult<List<Map>> getOrgCodeCache();
//
//    @GetMapping("/v1/base/pc/org/getAllOrgFullName")
//    CommonResult<Map> getAllOrgFullName();
//
//    /**
//     * åˆ¤æ–­æŸ¥è¯¢çš„银行卡是否允许绑定
//     *
//     * @param cardNum
//     * @return
//     */
//    @GetMapping("/v1/base/pc/bankCardPeriod/isContain")
//    CommonResult<Boolean> cardIsContain(@RequestParam("cardNum") String cardNum);
//
//    @GetMapping("/v1/base/pc/global/config/getConfigList")
//    CommonResult<List<BaseGlobalConfig>> getConfigList(@RequestParam("globalCode") String globalCode, @RequestParam("matchModel") Short matchModel);
//
//    @PostMapping("/v1/base/pc/global/config/save")
//    CommonResult<List<BaseGlobalConfig>> save(@RequestBody String configList);
//
//
//}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopClientFallbackFactory.java
New file
@@ -0,0 +1,62 @@
package com.nuvole.four.client;
import com.nuvole.common.domain.emnu.CommonResultEmnu;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Date;
import java.util.List;
import java.util.Map;
@Component
@Slf4j
public class ShopClientFallbackFactory implements FallbackFactory<ShopServiceClient> {
    @Override
    public ShopServiceClient create(Throwable throwable) {
        log.error("fallback reason:{}", throwable.getMessage());
        return new ShopServiceClient() {
            @GetMapping(value = "/v1/shop/pc/storeMerchantShop/getMerchantShopExtendList", consumes = "application/json")
            @Override
            public CommonResult<PageBean<Map>> getMerchantShopExtendList(String queryOrgCode, String merchantId, String shopName,
                                                                         String managerName, String channelId,String channelIdNotNull,
                                                                         Integer pageNumber, Integer pageSize) {
                return new CommonResult(CommonResultEmnu.SERVER_ERR);
            }
            @Override
            public List<Map> selectShopMsgByIds(String ids) {
                return null;
            }
            /**
             * å•†æˆ·æ´»åŠ¨æ•°æ®ç»Ÿè®¡-列表
             * @param orgCode       æœºæž„code
             * @param channelId     é€šé“id
             * @param activityId    æ´»åЍid
             * @param startDate     äº¤æ˜“开始时间
             * @param endDate       äº¤æ˜“结束时间
             * @param pageNumber    é¡µç 
             * @param pageSize      æ¯é¡µæ¡æ•°
             * @return  å•†æˆ·æ´»åŠ¨æ•°æ®ç»Ÿè®¡-列表
             */
            @Override
            public CommonResult<PageBean<Map>> merchantActivityList(String orgCode, Long channelId, Long activityId, Date startDate,Date endDate, Integer pageNumber, Integer pageSize) {
                return new CommonResult(CommonResultEmnu.SERVER_ERR);
            }
            @Override
            public CommonResult<Map> merchantActivityCollect(String orgCode, Long channelId, Long activityId, Date startDate,Date endDate) {
                return new CommonResult(CommonResultEmnu.SERVER_ERR);
            }
        };
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopServiceClient.java
New file
@@ -0,0 +1,84 @@
package com.nuvole.four.client;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * æ–¹æ³•描述: è°ƒç”¨service-shop模块
 *
 * @date  2024-04-14 18:31
 **/
@Component
@FeignClient(value = "service-shop", fallbackFactory = ShopClientFallbackFactory.class)
public interface ShopServiceClient {
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢åº—铺列表
     *
     * @date  2024-04-14 18:31
     **/
    @GetMapping(value = "/v1/shop/pc/storeMerchantShop/getMerchantShopExtendList", consumes = "application/json")
    CommonResult<PageBean<Map>> getMerchantShopExtendList(
            @RequestParam("queryOrgCode") String queryOrgCode,
            @RequestParam("merchantId") String merchantId,
            @RequestParam("shopName") String shopName,
            @RequestParam("managerName") String managerName,
            @RequestParam("channelId") String channelId,
            @RequestParam("channelIdNotNull") String channelIdNotNull,
            @RequestParam("pageNumber") Integer pageNumber, @RequestParam("pageSize") Integer pageSize);
    @GetMapping(value = "/v1/shop/pc/storeMerchantShop/selectShopMsgByIds")
    List<Map> selectShopMsgByIds(
            @RequestParam("ids") String ids);
    /**
     * å•†æˆ·æ´»åŠ¨æ•°æ®ç»Ÿè®¡-列表
     * @param orgCode       æœºæž„code
     * @param channelId     é€šé“id
     * @param activityId    æ´»åЍid
     * @param startDate     äº¤æ˜“æ—¶é—´
     * @param pageNumber    é¡µç 
     * @param pageSize      æ¯é¡µæ¡æ•°
     * @return  å•†æˆ·æ´»åŠ¨æ•°æ®ç»Ÿè®¡-列表
     */
    @GetMapping(value = "/v1/shop/pc/static/report/merchant/activity/list")
    CommonResult<PageBean<Map>> merchantActivityList(
                @RequestParam("orgCode") String orgCode,
                @RequestParam("channelId") Long channelId,
                @RequestParam("activityId") Long activityId,
                @RequestParam("startDate") Date startDate,
                @RequestParam("endDate") Date endDate,
                @RequestParam("pageNumber") Integer pageNumber,
                @RequestParam("pageSize") Integer pageSize
            );
    /**
     * å•†æˆ·æ´»åŠ¨æ•°æ®ç»Ÿè®¡-数据汇总
     * @param orgCode       æœºæž„code
     * @param channelId     é€šé“id
     * @param activityId    æ´»åЍid
     * @param startDate     äº¤æ˜“开始时间
     * @param endDate       äº¤æ˜“结束时间
     * @return  å•†æˆ·æ´»åŠ¨æ•°æ®ç»Ÿè®¡-数据汇总
     */
    @GetMapping(value = "/v1/shop/pc/static/report/merchant/activity/collect")
    CommonResult<Map> merchantActivityCollect(
            @RequestParam("orgCode") String orgCode,
            @RequestParam("channelId") Long channelId,
            @RequestParam("activityId") Long activityId,
            @RequestParam("startDate") Date startDate,
            @RequestParam("endDate") Date endDate
    );
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/CorsConfig.java
New file
@@ -0,0 +1,34 @@
//package com.nuvole.four.config;
//
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.CorsRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
//
//// @formatter:off
//
///**
// *                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
// *            __.'  @Author     ~.   .~    ä»£ç æ— Bug   `.__
// *          .'//     liu.q        \./       (秘籍)      \\`.
// *        .'// [916000612@qq.com]  |   æ¬²ç»ƒç¥žåŠŸ   å¼•刀自宫  \\`.
// *      .'// .-~"""""""~~~~-._     |    _,-~~~~"""""""~-.  \\`.
// *    .'//.-"  2019-04-07     `-.  |  .-'     20:42       "-.\\`.
// *  .'//______.============-..   \ | /   ..-============.______\\`.
// *.'______________________________\|/______________________________`.
// *
// * @Description :
// */
//// @formatter:on
//
//@Configuration
//public class CorsConfig extends WebMvcConfigurerAdapter {
//    @Override
//    public void addCorsMappings(CorsRegistry registry) {
//        registry.addMapping("/**")
//                .allowedOrigins("*")
//                .allowCredentials(true)
//                .allowedMethods("GET", "POST", "DELETE", "PUT")
//                .maxAge(3600);
//    }
//}
//
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/JacksonConfig.java
New file
@@ -0,0 +1,44 @@
package com.nuvole.four.config;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import java.math.BigInteger;
// @formatter:off
/**
 *                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
 *            __.'  @Author     ~.   .~    ä»£ç æ— Bug   `.__
 *          .'//     liu.q        \./       (秘籍)      \\`.
 *        .'// [916000612@qq.com]  |   æ¬²ç»ƒç¥žåŠŸ   å¼•刀自宫  \\`.
 *      .'// .-~"""""""~~~~-._     |    _,-~~~~"""""""~-.  \\`.
 *    .'//.-"  2019-04-19     `-.  |  .-'     16:19       "-.\\`.
 *  .'//______.============-..   \ | /   ..-============.______\\`.
 *.'______________________________\|/______________________________`.
 *
 * @Description :
 */
// @formatter:on
@Configuration
public class JacksonConfig {
    /**
     * Jackson全局转化long类型为String,解决jackson序列化时long类型缺失精度问题
     *
     * @return Jackson2ObjectMapperBuilderCustomizer æ³¨å…¥çš„对象
     */
    @Bean
    public Jackson2ObjectMapperBuilderCustomizer jackson2ObjectMapperBuilderCustomizer() {
        Jackson2ObjectMapperBuilderCustomizer cunstomizer = new Jackson2ObjectMapperBuilderCustomizer() {
            @Override
            public void customize(Jackson2ObjectMapperBuilder jacksonObjectMapperBuilder) {
                jacksonObjectMapperBuilder.serializerByType(BigInteger.class, ToStringSerializer.instance);
                jacksonObjectMapperBuilder.serializerByType(Long.class, ToStringSerializer.instance);
                jacksonObjectMapperBuilder.serializerByType(Long.TYPE, ToStringSerializer.instance); //设置fast json解析规则
            }
        };
        return cunstomizer;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/RsaDecryptor.java
New file
@@ -0,0 +1,64 @@
package com.nuvole.four.config;
import javax.crypto.Cipher;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
import java.util.Base64;
public class RsaDecryptor {
    /**
     * è¯»å–私钥文件,生成RSA私钥
     *
     * @return RSA私钥
     * @throws NoSuchAlgorithmException
     * @throws InvalidKeySpecException
     */
    private static PrivateKey getRsaPrivateKey() throws NoSuchAlgorithmException, InvalidKeySpecException {
        String privateKeyContent = "-----BEGIN PRIVATE KEY-----\n" +
                "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCDpJ23UWIqAMiv\n" +
                "JwdrzEOS5WbbUvFlFxiW0Q4MDzwT4zg63gq6bk1BIi3v/mVchoDEhrr4bgSDqVjN\n" +
                "wfI4gfVZQ0tVlrfMayGi5MvjCdjbPRmeGBkBqKmB3WMkzXxVR0dHz1KFgc3Tt8Av\n" +
                "tpwK8GDzTavBXF/NSm2k9PL0BKcJuWmQS5Id+MGHxQMjmKJOXERBqDsFF2ghMaRk\n" +
                "lj5hvHCRcJXLehTzbWERfOV2t+teSs6K8CmCxoJjLdhNna3CEXS1fhfQ7UKBNydD\n" +
                "EqTDgG5ws2KrazhiE6QUcHSPUuuTXMVQuMusG63cyKRJazf0qqAQM3WjMInI56ui\n" +
                "rn1yvdUbAgMBAAECggEANZJSFH3sAsfa41xwqq+veCIe33Y7gjYJ7aYZn1K70iQP\n" +
                "h/VATGoCylTMePP/781UraVehSbQc3wBBYq9tb09SRwXljcFiQy33YBacIRbWazd\n" +
                "tfZ8hq5KfOzJIfr1dAbTvSdjn60ZQ+VtMn2PtuvnqFudX8zlt7doM07zZ9ZU26Gg\n" +
                "9W67OlGpxDxfWryUWI//tkCrguORceurhydByhYdRqJlDwc3xAgctyGXBfY9Plp0\n" +
                "m3VWaWvgDBJ54d0MpVleQVOufWRH85Jyj+7ZIxmn53oh3iPx6samq26FPiwbl4se\n" +
                "q82waM4wOeunJDHSLNjuJJSWwR3MovHrzwnc4XmaoQKBgQDBQRDIODW6MYPXklin\n" +
                "+sotoDe1raZRZCenAhpNO5pMcpS955SKkhi/NU/8mSEGpxw+fZPL0/gtnn2aHoXU\n" +
                "/z5pjhSBbYPJXrt3PeuOqKfNEdBXQx56JNyZw7UF3po/SkO2hJAwlQy2WYanhx4b\n" +
                "+5sYLVtHKWAmIRDmb+EtQ225EwKBgQCuYoufmFk62FYPpLeHtLAhSGqmDvrKPavj\n" +
                "cNsJsJZeltjQI9Juap+Xez5qlovS87vnyTqjEysUcAqMgcSthjK/VgFxNiL8Y93J\n" +
                "ORGTI6tkI306DhKmj8Jc02sB1VF4DV4IYGsQ3NOPP+AWrV3YlTj4Cw5wusX8jq9K\n" +
                "9Ubfiia82QKBgBGi+4IaRyT38d1RmM+zvpHNZmgpMd2Js2i1c2sK/njtmA+Au/it\n" +
                "fp6soeEepHnz9ErrsPpQHP0k0renA3W92ZdOhSaOtRFCmP834nCBidbYQlhEYtqo\n" +
                "1I0f5Dxl5VPTVjyo+nPEloVpxDUzypapLq1VLlhfOUwhhmZRXY6A8dmLAoGBAKtP\n" +
                "yBZq1g3HBRStHldEnFq2B39G6/zOBRSUg7nLLo2R50DiUBGE0W9A9ZpEduwv4QLd\n" +
                "XqthY0ranqJVwV8unJ/238fWBRypBvJtC+Tef7sKWjU0KgJS6//A+jh81WH4z82u\n" +
                "2r9gEL2DZKMigTUJs0OJqQ/5jBKGIZKjzpI/57pRAoGAGoaweJrzbYuFp7JSJw/W\n" +
                "nKsnDUAI14AN5DI4UlVt78ZESj/D7ArKtDLMkIDrLRk/NofDRQy9YdEwmw7Jjxa9\n" +
                "j8NF0ll01dV3Sr7SXqmkVtqfAvt58tdXwxXdsUvLV7+otZfAzinY7959MUoPc8gb\n" +
                "4kmHYWNzm1vJyr/QIapo94g=\n" +
                "-----END PRIVATE KEY-----\n";
        privateKeyContent = privateKeyContent.replaceAll("\\n", "").replace("-----BEGIN PRIVATE KEY-----", "").replace("-----END PRIVATE KEY-----", "");
        KeyFactory kf = KeyFactory.getInstance("RSA");
        PKCS8EncodedKeySpec keySpecPKCS8 = new PKCS8EncodedKeySpec(Base64.getDecoder().decode(privateKeyContent));
        return kf.generatePrivate(keySpecPKCS8);
    }
    public static String doDecrypt(String encrypted) throws Exception {
        Cipher cipher = Cipher.getInstance("RSA");
        cipher.init(Cipher.DECRYPT_MODE, getRsaPrivateKey());
        return new String(cipher.doFinal(Base64.getDecoder().decode(encrypted.getBytes())));
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/SwaggerConfig.java
New file
@@ -0,0 +1,58 @@
package com.nuvole.four.config;
import com.nuvole.constants.SystemConstants;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.List;
/**
 * ç±»æè¿°: swagger.config
 *
 * @author dqh
 * @date  2024-04-09 18:16
 * @version 1.0
 **/
@EnableSwagger2
@Configuration
public class SwaggerConfig {
    @Bean
    public Docket customDocket() {
        ParameterBuilder ticketPar = new ParameterBuilder();
        List<Parameter> pars = new ArrayList<Parameter>();
        ticketPar.name(SystemConstants.SHOP_WECHAT_TOKEN_HEADER).description("登录成功token标识")
                .modelRef(new ModelRef("string")).parameterType("header")
                .required(false).build();
        pars.add(ticketPar.build());
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.nuvole.four"))
                .paths(PathSelectors.any())
                .build()
                .globalOperationParameters(pars);
    }
    ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .title("四方支付")
                .description("四方支付接口文档")
                .version("1.0")
                .build();
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssFilter.java
New file
@@ -0,0 +1,45 @@
//package com.nuvole.four.config.filter;
//
//import cn.hutool.core.util.StrUtil;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.*;
//import javax.servlet.annotation.WebFilter;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//
///**
// * @author ChenLong
// * @version 1.0
// * @ClassName XssFilter
// * @date 2019/7/16 19:21
// * @Description XSS过滤器
// */
//@Component
//@WebFilter(urlPatterns = "/*", filterName = "filter1")
//public class XssFilter implements Filter {
//
//    public void destroy() {
//
//    }
//
//    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
//        HttpServletRequest req = (HttpServletRequest) request;
//        HttpServletResponse resp = (HttpServletResponse) response;
//        //点击劫持:X-Frame-Options未配置  æ¼æ´žä¿®æ”¹
//        resp.addHeader("x-frame-options","SAMEORIGIN");
//        if (req.getMethod().equals("OPTIONS")) {
//            chain.doFilter(req, resp);
//        }else if(StrUtil.isNotBlank(req.getHeader("Content-Type")) && req.getHeader("Content-Type").startsWith("multipart/form-data;")) {
//            chain.doFilter(req, resp);
//        } else {
//            chain.doFilter(new XssRequestWrapper(req), resp);
//        }
//    }
//
//    public void init(FilterConfig filterConfig)throws ServletException{
//
//    }
//
//}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssRequestWrapper.java
New file
@@ -0,0 +1,71 @@
//package com.nuvole.four.config.filter;
//
//import com.nuvole.util.XssUtil;
//import org.apache.commons.text.StringEscapeUtils;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletRequestWrapper;
//import java.util.Map;
//
///**
// * @ClassName XssRequestWrapper
// * @author ChenLong
// * @date 2019/7/16 19:11
// * @version 1.0
// * @Description XSS过滤类
// */
//public class XssRequestWrapper extends HttpServletRequestWrapper {
//
//    public XssRequestWrapper(HttpServletRequest request) {
//        super(request);
//    }
//
//
//    @Override
//    public String getHeader(String name) {
//        return StringEscapeUtils.unescapeHtml4(super.getHeader(name));
//    }
//
//    @Override
//    public String getQueryString() {
//        return XssUtil.clearXss(super.getQueryString());
//    }
//
//    @Override
//    public String getParameter(String name) {
//        return XssUtil.clearXss(super.getParameter(name));
//    }
//
//    @Override
//    public String[] getParameterValues(String name) {
//        String[] values = super.getParameterValues(name);
//        if(values != null) {
//            int length = values.length;
//            String[] escapseValues = new String[length];
//            for(int i = 0; i < length; i++){
//                escapseValues[i] = XssUtil.clearXss(values[i]);
//            }
//            return escapseValues;
//        }
//        return super.getParameterValues(name);
//    }
//
//    @Override
//    public Map<String, String[]> getParameterMap() {
//        Map<String, String[]> parameterMap = super.getParameterMap();
//        if (parameterMap != null) {
//            for (String k : parameterMap.keySet()) {
//                String[] values = parameterMap.get(k);
//                if(values != null) {
//                    int length = values.length;
//                    for(int i = 0; i < length; i++){
//                        values[i] = XssUtil.clearXss(values[i]);
//                    }
//                }
//            }
//        }
//        return super.getParameterMap();
//    }
//
//}
//
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/HeadBandGiveCoup.java
New file
@@ -0,0 +1,49 @@
package com.nuvole.four.config.mybatisInt;//package com.nuvole.shop.config.mybatisInt;
//
//import com.nuvole.shop.domain.StoreMemberBankcard;
//import com.nuvole.shop.service.ActivityDetailHeadBandCoupDetailService;
//import com.nuvole.util.AESUtil;
//import org.aspectj.lang.JoinPoint;
//import org.aspectj.lang.annotation.After;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//import org.springframework.util.CollectionUtils;
//
//import java.util.Arrays;
//import java.util.List;
//
///**
// * @ClassName HeadBandGiveCoup
// * @Author cy
// * @Date 2022/12/13
// * @Description
// * @Version 1.0
// **/
//@Aspect
//@Component
//public class HeadBandGiveCoup {
//    @Autowired
//    private ActivityDetailHeadBandCoupDetailService activityDetailHeadBandCoupDetailService;
//
//    @Pointcut("execution(* com.nuvole.shop.mapper.StoreMemberBankcardMapper.insertSelective(..))")
//    public void bindCard() {
//    }
//
//    @After("bindCard()")
//    public void afterMethod(JoinPoint point) {
//        String methodName = point.getSignature().getName();
//        System.out.println("调用后连接点方法为:" + methodName);
//        List<Object> args = Arrays.asList(point.getArgs());
//        if (!CollectionUtils.isEmpty(args)) {
//            Object o = args.get(0);
//            if (o instanceof StoreMemberBankcard) {
//                StoreMemberBankcard record = (StoreMemberBankcard) o;
//                activityDetailHeadBandCoupDetailService.doGetGiveCoupon(record.getMemberId(), AESUtil.decode(record.getCardNo()));
//            }
//        }
//        System.out.println("参数为:" + args);
//    }
//
//}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MyBatisConfig.java
New file
@@ -0,0 +1,34 @@
package com.nuvole.four.config.mybatisInt;//package com.nuvole.shop.config.mybatisInt;
//
//import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration;
//import org.apache.ibatis.session.SqlSessionFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.boot.autoconfigure.AutoConfigureAfter;
//import org.springframework.context.annotation.Configuration;
//
//import javax.annotation.PostConstruct;
//import java.util.List;
//
///**
// * @ClassName MyBatisConfig
// * @Author cy
// * @Date 2022/12/13
// * @Description
// * @Version 1.0
// **/
//@AutoConfigureAfter(PageHelperAutoConfiguration.class)
//@Configuration
//
//public class MyBatisConfig {
//    @Autowired
//    private List<SqlSessionFactory> sqlSessionFactoryList;
//
//    @PostConstruct
//    public void addMySqlInterceptor() {
//        MySqlInterceptor interceptor = new MySqlInterceptor();
//        for (SqlSessionFactory sqlSessionFactory : sqlSessionFactoryList) {
//            sqlSessionFactory.getConfiguration().addInterceptor(interceptor);
//
//        }
//    }
//}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MySqlInterceptor.java
New file
@@ -0,0 +1,114 @@
package com.nuvole.four.config.mybatisInt;//package com.nuvole.shop.config.mybatisInt;
//
//import com.nuvole.util.AESUtil;
//import lombok.extern.slf4j.Slf4j;
//import org.apache.ibatis.binding.MapperMethod;
//import org.apache.ibatis.executor.Executor;
//import org.apache.ibatis.mapping.MappedStatement;
//import org.apache.ibatis.plugin.*;
//import org.apache.ibatis.session.ResultHandler;
//import org.apache.ibatis.session.RowBounds;
//import org.springframework.stereotype.Component;
//
//import java.util.Properties;
//
///**
// * @ClassName MySqlInterceptor
// * @Author cy
// * @Date 2022/12/13
// * @Description
// * @Version 1.0
// **/
//@Slf4j
//@Intercepts({@Signature(type = Executor.class, method = "query",
//        args = {MappedStatement.class,
//                Object.class,
//                RowBounds.class,
//                ResultHandler.class})})
//@Component
//public class MySqlInterceptor implements Interceptor {
////    @Autowired
////    private ActivityDetailHeadBandCoupDetailService activityDetailHeadBandCoupDetailService;
//
//    @Override
//    /**
//     * intercept æ–¹æ³•用来对拦截的 sql è¿›è¡Œå…·ä½“的操作
//     * æœ¬æ‹¦æˆªæ–¹æ³•只对 mapper æŽ¥å£ä¸­çš„ searchByQuery æ–¹æ³•进行拦截,实际每个方法都拦截了,
//     * åªæ˜¯åªæœ‰ searchByQuery æ–¹æ³•时,才真正执行 æ‹¦æˆªçš„相关操作
//     * @param invocation æ‹¦æˆªå™¨æ‰§è¡Œå™¨
//     * @return
//     * @throws Throwable å¼‚常信息
//     */
//    public Object intercept(Invocation invocation) throws Throwable {
//        //  logger.info("执行intercept方法:{}", invocation.toString());
//        //  èŽ·å– invocation ä¼ é€’的参数
//        Object[] args = invocation.getArgs();
//
//        MappedStatement ms = (MappedStatement) args[0];
//        // èŽ·å–æ‰§è¡Œçš„è¯¥æ‹¦æˆªå™¨çš„å…¨è·¯å¾„æ–¹æ³• æ¯”如你的 UserInfoMapper æŽ¥å£çš„ getById æ–¹æ³•, com.xx.UserInfoMapper.getById
//        String id = ms.getId();
//        // å¦‚果不是 searchByQuery æ–¹æ³•,就不进行相关的拦截操作
//        Object proceed = invocation.proceed();
//        if (!filterMethodById(id)) {
//            return proceed;
//        }
//
//        // è¯¥å‚数类型 org.apache.ibatis.binding.MapperMethod$ParamMap
//        Object parameterObject = args[1];
//        // èŽ·å–ä¼ é€’çš„å‚æ•°ï¼Œ ä¸»è¦åŒ…含三个参数 1. æŸ¥è¯¢è¯­å¥ searchQuery, 2. æŸ¥è¯¢åç§» pageOffset, 3. æŸ¥è¯¢æ¯é¡µçš„æ•°æ®æ¡æ•°
//        MapperMethod.ParamMap paramMap = (MapperMethod.ParamMap) parameterObject;
//
//        Long memberId = null;
//        String cardNo = null;
//        if (paramMap.containsKey("memberId")) {
//            memberId = (Long) paramMap.get("memberId");
//        }
//        if (paramMap.containsKey("cardNo")) {
//            cardNo = AESUtil.decode((String) paramMap.get("cardNo"));
//        }
////        activityDetailHeadBandCoupDetailService.doGetGiveCoupon(memberId, cardNo);
//        log.info("拦截了 " + id + " ç›¸å…³æ‰§è¡Œã€‚");
//        return proceed;
//    }
//
//    @Override
//    /***
//     * å®šä¹‰æ‹¦æˆªçš„ç±» Executor、ParameterHandler、StatementHandler、ResultSetHandler当中的一个
//     * @param target éœ€è¦æ‹¦æˆªçš„ç±»
//     * @return
//     */
//    public Object plugin(Object target) {
//        if (target instanceof Executor) {
//            return Plugin.wrap(target, this);
//        }
//        return target;
//    }
//
//    @Override
//    /**
//     * å±žæ€§ç›¸å…³æ“ä½œ
//     * è®¾ç½®å’Œè‡ªå®šä¹‰å±žæ€§å€¼
//     * @param properties å±žæ€§å€¼
//     */
//    public void setProperties(Properties properties) {
//        // èŽ·å–å±žæ€§
//        // String value1 = properties.getProperty("prop1");
//    }
//
//
//    /**
//     * æ ¹æ®èŽ·å–åˆ°æ‰§è¡Œ id æ‰¾åˆ°å¯¹åº”的方法,只在 insertSelective æ–¹æ³•上执行拦截
//     *
//     * @param id æ ¹æ® MappedStatement èŽ·å–åˆ°çš„ id å±žæ€§
//     * @return æ˜¯å¦æ˜¯ insertSelective æ–¹æ³•
//     */
//    private boolean filterMethodById(String id) {
//        System.out.println("id: " + id);
//        return id.contains("com.nuvole.shop.mapper.extend.StoreMemberBankcardMapper.insertSelective");
//    }
//
//    private void headBandGiveCoup(Long memberId) {
//
//    }
//
//}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/redis/RedisConfig.java
New file
@@ -0,0 +1,56 @@
package com.nuvole.four.config.redis;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.PropertyAccessor;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
/**
 * ç±»æè¿°: Redis序列化配置
 *
 * @author dqh
 * @date  2024-04-11 14:17
 * @version 1.0
 **/
@Configuration
@EnableCaching
public class RedisConfig extends CachingConfigurerSupport {
    @Autowired
    RedisConnectionFactory redisConnectionFactory;
    /**
     * æ–¹æ³•描述: RedisTemplate配置
     *
     * @date  2024-04-11 14:18
     **/
    @Bean
    public RedisTemplate<String, String> redisTemplate(RedisConnectionFactory factory) {
        StringRedisTemplate template = new StringRedisTemplate(factory);
        setSerializer(template);//设置序列化工具
        template.afterPropertiesSet();
        return template;
    }
    /**
     * æ–¹æ³•描述: Redis序列化方式
     *
     * @date  2024-04-11 14:18
     **/
    private void setSerializer(StringRedisTemplate template) {
        @SuppressWarnings({"rawtypes", "unchecked"})
        Jackson2JsonRedisSerializer jackson2JsonRedisSerializer = new Jackson2JsonRedisSerializer(Object.class);
        ObjectMapper om = new ObjectMapper();
        om.setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.ANY);
        om.enableDefaultTyping(ObjectMapper.DefaultTyping.NON_FINAL);
        jackson2JsonRedisSerializer.setObjectMapper(om);
        template.setValueSerializer(jackson2JsonRedisSerializer);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/contants/Contants.java
New file
@@ -0,0 +1,42 @@
package com.nuvole.four.contants;
/**
 * @Desc: å¸¸é‡ç±»
 * @Author: dqh
 * @Date: 2024-04-10
 **/
public class Contants {
    /**
     * ç»¼åˆåŽå°ç™»å½•类型
     */
    public static final String LOGIN_TYPE_PC = "PC";
    /**
     * å°ç¨‹åºå•†åŸŽç™»å½•类型
     */
    public static final String LOGIN_TYPE_WECHAT = "WECHAT";
    /**
     * å°ç¨‹åºå•†åŸŽè¶…æ—¶æ—¶é•¿
     */
    public static final Long SHOP_WECHAT_TOKEN_EXPIRE = Long.valueOf(60 * 24 * 30);
    /**
     * å®¢æˆ·ç»ç†app登录类型
     */
    public static final String LOGIN_TYPE_MANAGER_APP = "APP_MANAGER";
    /**
     * å•†æˆ·æ‰«ç ä»˜å¾®ä¿¡ token header æ ‡è¯†ï¼ˆåŒ…含商户H5)
     */
    public static final String SCAN_WECHAT_TOKEN_HEADER = "SCAN-WECHAT-TOKEN-HEADER";
    /**
     * æ–¹æ³•描述:生成code的标识
     *
     * @date  2024-04-13 14:40
     **/
    public static final String CODE = "000";
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/BaseController.java
New file
@@ -0,0 +1,9 @@
package com.nuvole.four.controller;
/**
 * @Desc: åŸºç¡€Controller
 * @Author: dqh
 * @Date: 2024-04-09
 **/
public class BaseController {
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppChannelOrgConfigController.java
New file
@@ -0,0 +1,60 @@
package com.nuvole.four.controller.app;
import com.github.pagehelper.PageHelper;
import com.nuvole.base.domain.SysUser;
import com.nuvole.common.domain.emnu.CommonResultEmnu;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import com.nuvole.four.domain.dto.ChannelOrgConfigDto;
import com.nuvole.four.domain.params.ChannelOrgConfigParam;
import com.nuvole.four.service.ChannelOrgConfigService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.CommonUtil;
import com.nuvole.util.PageUtils;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @Desc: APP机构通道查询
 * @Author: dqh
 * @Date: 2024-04-10
 **/
@Api(value = "APP机构通道查询", tags = "APP机构通道查询")
@Slf4j
@RestController
@RequestMapping(value = "/v1/four/manager/app/channel/org/config")
public class AppChannelOrgConfigController extends BaseController {
    @Autowired
    private ChannelOrgConfigService channelOrgConfigService;
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„通道详情
     * è¯¦æƒ…中的通道 ä»…包含当前orgId对应的pId对应的通道
     * @date  2024-04-11 20:04
     **/
    @ApiOperation(value = "查询机构通道详情", notes = "查询机构通道详情")
    @GetMapping("/getDetail")
    public CommonResult<ChannelOrgConfigDetailDto> getChannelOrgConfigDetail(
            @ApiParam(name = "orgId", value = "机构ID") Long orgId)
    {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_MANAGER_APP);
        orgId = user.getOrgId();
        ChannelOrgConfigDetailDto dtoList = channelOrgConfigService.getChannelOrgConfigDetail(orgId);
        return new CommonResult(dtoList);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppStoreIndustryManageController.java
New file
@@ -0,0 +1,47 @@
package com.nuvole.four.controller.app;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.service.impl.StoreIndustryManageServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Desc: app行业controller
 * @Author: dqh
 * @Date: 2024-04-18
 **/
@Api(value = "APP行业查询", tags = "APP行业查询")
@Slf4j
@RestController
@RequestMapping(value = "/v1/four/manager/app/store/industry/manage")
public class AppStoreIndustryManageController extends BaseController {
    @Autowired
    private StoreIndustryManageServiceImpl storeIndustryManageService;
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ‰€æœ‰è¡Œä¸šæ ‘
     *
     * @date  2024-04-12 18:43
     **/
    @ApiOperation(value = "查询所有行业树", notes = "查询所有行业树")
    @GetMapping("/getIndustryTree")
    public CommonResult<List<Map>> getIndustryTree(Integer status) {
        Map map = new HashMap();
        if(status == null){
            map.put("status",1);
        }
        List<Map> list = storeIndustryManageService.getIndustryTree(map);
        return new CommonResult<>(list);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityDistributeRecordController.java
New file
@@ -0,0 +1,81 @@
package com.nuvole.four.controller.pc;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.ActivityDistributeRecord;
import com.nuvole.four.domain.dto.ActivityDistributeBudgetDto;
import com.nuvole.four.service.ActivityDistributeRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”é¢„ç®—åˆ†é…ç®¡ç†
 * @Author dqh
 * @Date 2024-04-13 21:36:24
 */
@Api(value = "活动预算分配管理接口", tags = "活动预算分配管理接口")
@EnableTransactionManagement
@RestController
@RequestMapping("/v1/four/pc/activity/distribute/record")
public class ActivityDistributeRecordController extends BaseController {
    @Autowired
    private ActivityDistributeRecordService activityDistributeRecordService;
    /**
     * æ–¹æ³•描述: åˆ†é…é¢„算查询
     * é»˜è®¤ä»…查询当前登录人的机构下级。不包含下下级
     * @date  2024-04-14 10:43
     **/
    @ApiOperation(value = "分配预算查询", notes = "分配预算查询")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "活动id")})
    @GetMapping("/getDetail")
    public CommonResult<ActivityDistributeBudgetDto> getActivityDistributeRecordDetail(Long id)
    {
        List<ActivityDistributeBudgetDto> dtoList = activityDistributeRecordService.getActivityDistributeRecordDetail(id);
        return new CommonResult(dtoList);
    }
    /**
     * æ–¹æ³•描述:分配预算保存
     * æœ‰id则进行更新;无则新增
     *
     * @date  2024-04-14 12:41
     **/
    @ApiOperation(value = "添加预算分配", notes = "添加预算分配")
    @ApiImplicitParams({ @ApiImplicitParam(name = "recordArray") })
    @PostMapping("/add")
    public CommonResult<Integer> add(String recordArray) {
        List<ActivityDistributeRecord> recordList = new ArrayList<>();
        if (StrUtil.isNotBlank(recordArray)) {
            Object object = JSON.parse(recordArray);
            if (object instanceof JSONArray) {
                recordList = JSONArray.parseArray(recordArray, ActivityDistributeRecord.class);
            }
        }
        CommonResult result = new CommonResult<>(activityDistributeRecordService.batchInsertOrUpdate(recordList));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityFeeController.java
New file
@@ -0,0 +1,259 @@
package com.nuvole.four.controller.pc;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.nuvole.base.domain.SysUser;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.client.ShopServiceClient;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.ActivityDistributeRecord;
import com.nuvole.four.domain.ActivityFee;
import com.nuvole.four.domain.SysOrg;
import com.nuvole.four.domain.dto.ActivityFeeDetailDto;
import com.nuvole.four.domain.query.ActivityFeeQuery;
import com.nuvole.four.service.ActivityFeeService;
import com.nuvole.four.service.impl.ActivityDistributeRecordServiceImpl;
import com.nuvole.four.service.impl.SysOrgServiceImpl;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.CommonUtil;
import io.swagger.annotations.*;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * @Description è´¹çŽ‡è¡¥è´´æ´»åŠ¨ç®¡ç†
 * @Author dqh
 * @Date 2024-04-13 21:33:08
 */
@Api(value = "费率补贴活动管理接口", tags = "费率补贴活动管理接口")
@EnableTransactionManagement
@RestController
@RequestMapping("/v1/four/pc/acitivity/fee")
@RequiredArgsConstructor
public class ActivityFeeController extends BaseController {
    private final ActivityFeeService activityFeeService;
    private final SysOrgServiceImpl sysOrgService;
    private final ActivityDistributeRecordServiceImpl activityDistributeRecordService;
    private final ShopServiceClient shopServiceClient;
    /**
     * æ–¹æ³•描述:查询费率补贴活动列表
     *
     * @date  2024-04-13 21:46
     **/
    @ApiOperation(value = "查询列表", notes = "查询列表")
    @ApiImplicitParams({ @ApiImplicitParam(name = "AcitivityFeeQuery") })
    @GetMapping("/getList")
    public CommonResult<PageBean> getList(@ApiParam(name = "pageNumber", value = "分页页码", required = true) Integer pageNumber,
                                           @ApiParam(name = "pageSize", value = "每页展示数", required = true) Integer pageSize) {
        ActivityFeeQuery copy = CommonUtil.getObjFromReq(ActivityFeeQuery.class);
        ActivityFeeQuery query = new ActivityFeeQuery();
        BeanUtils.copyProperties(copy, query);
        PageHelper.startPage(pageNumber, pageSize);
        PageHelper.orderBy("create_time desc");
        List<ActivityFee> list = activityFeeService.getList(query);
        CommonResult result = new CommonResult<>(new PageBean(list));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: è´¹çŽ‡è¡¥è´´æ´»åŠ¨æ·»åŠ 
     *
     * @date  2024-04-13 21:46
     **/
    @ApiOperation(value = "添加", notes = "添加")
    @ApiImplicitParams({ @ApiImplicitParam(name = "AcitivityFee") })
    @PostMapping("/add")
    public CommonResult<Integer> add() {
        ActivityFee copy = CommonUtil.getObjFromReq(ActivityFee.class);
        ActivityFee activityFee = new ActivityFee();
        BeanUtils.copyProperties(copy, activityFee);
        CommonResult result = new CommonResult<>(activityFeeService.addSelective(activityFee));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述:根据id查询分配预算详情
     *
     * @date  2024-04-13 22:02
     **/
    @ApiOperation(value = "查询分配预算详情", notes = "根据id查询分配预算详情")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @GetMapping("/get")
    public CommonResult<ActivityFee> get(Long id) {
        CommonResult result = new CommonResult();
        result = new CommonResult<>(activityFeeService.get(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述:查询分配额度信息
     *
     **/
    @ApiOperation(value = "查询分配额度信息", notes = "查询分配额度信息")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @GetMapping("/getFeeMsg")
    public CommonResult getFeeMsg(Long id) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        CommonResult result = new CommonResult();
        //super用户直接查询活动本身
        if(user.getLoginName().equalsIgnoreCase("super") && user.getOrgId() == null){
            return new CommonResult(activityFeeService.get(id));
        }
        if(user.getOrgId() != null){
            SysOrg sysOrg = sysOrgService.getById(user.getOrgId());
            //查询机构分配的预算额度
            ActivityDistributeRecord record = activityDistributeRecordService.getFeeByCondition(id, sysOrg.getId());
            result = new CommonResult<>(record);
            if(record == null){
                //查询活动本身的预算额度
                result = new CommonResult<>(activityDistributeRecordService.getActivityFeeByIdAndOrgId(id, sysOrg.getId()));
            }
        }
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¯¦æƒ…-活动数据
     *
     * @date  2024-04-15 13:17
     **/
    @ApiOperation(value = "查询活动详情-活动数据", notes = "查询活动详情-活动数据")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @GetMapping("/getDetail")
    public CommonResult<ActivityFeeDetailDto> getActivityFeeDetail(Long id) {
        ActivityFeeDetailDto detailDto = activityFeeService.getActivityFeeDetail(id);
        return new CommonResult<>(detailDto);
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¯¦æƒ…-商户活动数据
     *
     * @date  2024-04-15 16:47
     **/
    @ApiOperation(value = "查询活动详情-商户活动数据", notes = "查询活动详情-商户活动数据")
    @GetMapping("/merchantActivityList")
    public CommonResult merchantActivityList(
            @ApiParam(name = "orgCode", value = "机构code") String orgCode,
            @ApiParam(name = "channelId", value = "通道id") Long channelId,
            @ApiParam(name = "activityId", value = "活动ID", required = true) Long activityId,
            @ApiParam(name = "startDate", value = "交易时间") Date startDate,
            @ApiParam(name = "endDate", value = "交易结束时间") Date endDate,
            @ApiParam(name = "pageNumber", value = "分页页码", required = true) Integer pageNumber,
            @ApiParam(name = "pageSize", value = "每页展示数", required = true) Integer pageSize) {
        if(activityId == null){
            throw new IllegalArgumentException("活动ID不能为空");
        }
        if(StrUtil.isBlank(orgCode)){
            SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
            orgCode = user.getOrgCode();
        }
        CommonResult<PageBean<Map>> mapResult = shopServiceClient.merchantActivityList(orgCode, channelId, activityId, startDate,endDate, pageNumber, pageSize);
        return mapResult;
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¯¦æƒ…-商户活动数据-数据汇总
     **/
    @ApiOperation(value = "查询活动详情-商户活动数据-数据汇总", notes = "查询活动详情-商户活动数据-数据汇总")
    @GetMapping("/merchantActivityCollect")
    public CommonResult merchantActivityCollect(
            @ApiParam(name = "orgCode", value = "机构code") String orgCode,
            @ApiParam(name = "channelId", value = "通道id") Long channelId,
            @ApiParam(name = "activityId", value = "活动ID", required = true) Long activityId,
            @ApiParam(name = "startDate", value = "交易开始时间") Date startDate,
            @ApiParam(name = "endDate", value = "交易结束时间") Date endDate) {
        if(activityId == null){
            throw new IllegalArgumentException("活动ID不能为空");
        }
        if(StrUtil.isBlank(orgCode)){
            SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
            orgCode = user.getOrgCode();
        }
        CommonResult<Map> mapResult = shopServiceClient.merchantActivityCollect(orgCode, channelId, activityId, startDate,endDate);
        return mapResult;
    }
    /**
     * æ–¹æ³•描述: ç¼–辑费率补贴活动
     *
     * @date  2024-04-13 22:01
     **/
    @ApiOperation(value = "修改", notes = "修改")
    @ApiImplicitParams({ @ApiImplicitParam(name = "AcitivityFee") })
    @PostMapping("/upd")
    public CommonResult<Integer> upd() {
        ActivityFee copy = CommonUtil.getObjFromReq(ActivityFee.class);
        ActivityFee activityFee = new ActivityFee();
        BeanUtils.copyProperties(copy, activityFee);
        CommonResult result = new CommonResult<>(activityFeeService.editSelective(activityFee));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: åˆ é™¤è´¹çŽ‡è¡¥è´´æ´»åŠ¨
     *
     * @date  2024-04-13 22:01
     **/
    @ApiOperation(value = "删除", notes = "删除")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @PostMapping("/del")
    public CommonResult<Integer> del(Long id) {
        CommonResult result = new CommonResult<>(activityFeeService.del(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: å¼€å§‹/停止
     * åŒæ­¥åœæ­¢æ´»åŠ¨è¡¨ã€å•†æˆ·æ´»åŠ¨è¡¨ã€æœºæž„é¢„ç®—åˆ†é…è¡¨
     *
     * @date  2024-04-14 15:55
     **/
    @ApiOperation(value = "开始/停止", notes = "开始/停止")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id"),
                        @ApiImplicitParam(name = "status", value = "状态;1=开始 2=停止(结束)")})
    @PostMapping("/startOrStop")
    public CommonResult<Integer> startOrStop(Long id,Integer status) {
        CommonResult result = new CommonResult<>(activityFeeService.startOrStop(id,status));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityShopRecordController.java
New file
@@ -0,0 +1,242 @@
package com.nuvole.four.controller.pc;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.github.pagehelper.PageHelper;
import com.nuvole.base.domain.SysUser;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.client.ShopServiceClient;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.ActivityShopRecord;
import com.nuvole.four.domain.ChannelInfo;
import com.nuvole.four.domain.dto.ActivityShopRecordDto;
import com.nuvole.four.domain.params.ActivityShopRecordParam;
import com.nuvole.four.domain.query.ActivityShopRecordQuery;
import com.nuvole.four.service.ActivityShopRecordService;
import com.nuvole.four.service.ChannelInfoService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.CommonUtil;
import com.walker.infrastructure.utils.CollectionUtils;
import io.swagger.annotations.*;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.*;
import java.util.stream.Collectors;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”ä¸ŠæŠ¥å•†æˆ·ç®¡ç†
 * @Author dqh
 * @Date 2024-04-13 21:39:14
 */
@Api(value = "活动补贴—上报商户管理接口", tags = "活动补贴—上报商户管理接口")
@EnableTransactionManagement
@RestController
@RequestMapping("/v1/four/pc/activity/shop/record")
@RequiredArgsConstructor
public class ActivityShopRecordController extends BaseController {
    private final ActivityShopRecordService activityShopRecordService;
    private final ChannelInfoService channelInfoService;
    private final ShopServiceClient shopServiceClient;
    @ApiOperation(value = "查询列表", notes = "查询列表")
    @ApiImplicitParams({@ApiImplicitParam(name = "ActivityShopRecordQuery")})
    @GetMapping("/getList")
    public CommonResult<PageBean> getList(@ApiParam(name = "pageNumber", value = "分页页码", required = true) Integer pageNumber,
                                          @ApiParam(name = "pageSize", value = "每页展示数", required = true) Integer pageSize) {
        ActivityShopRecordQuery copy = CommonUtil.getObjFromReq(ActivityShopRecordQuery.class);
        ActivityShopRecordQuery query = new ActivityShopRecordQuery();
        BeanUtils.copyProperties(copy, query);
        PageHelper.startPage(pageNumber, pageSize);
        PageHelper.orderBy("create_time desc");
        List<ActivityShopRecord> list = activityShopRecordService.getList(query);
        CommonResult result = new CommonResult<>(new PageBean(list));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述:批量添加上报
     *
     * @date  2024-04-15 9:41
     **/
    @ApiOperation(value = "添加上报", notes = "添加上报")
    @ApiImplicitParams({ @ApiImplicitParam(name = "recordArray") })
    @PostMapping("/add")
    public CommonResult<Integer> add(String recordArray) {
        List<ActivityShopRecord> recordList = new ArrayList<>();
        if (StrUtil.isNotBlank(recordArray)) {
            Object object = JSON.parse(recordArray);
            if (object instanceof JSONArray) {
                recordList = JSONArray.parseArray(recordArray, ActivityShopRecord.class);
            }
        }
        CommonResult result = new CommonResult<>(activityShopRecordService.batchInsert(recordList));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    @ApiOperation(value = "根据id查询", notes = "根据id查询")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "主键id")})
    @GetMapping("/get")
    public CommonResult<ActivityShopRecord> get(Long id) {
        CommonResult result = new CommonResult<>(activityShopRecordService.get(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    @ApiOperation(value = "删除", notes = "删除")
    @ApiImplicitParams({@ApiImplicitParam(name = "id", value = "主键id")})
    @PostMapping("/del")
    public CommonResult<Integer> del(Long id) {
        CommonResult result = new CommonResult<>(activityShopRecordService.del(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    @ApiOperation(value = "根据店铺id查询活动费率", notes = "根据店铺id查询活动费率")
    @ApiImplicitParams({@ApiImplicitParam(name = "店铺id", value = "店铺id")})
    @GetMapping("/getActRateByShopIdAndChannelId")
    public CommonResult<Map> getActRateByShopIdAndChannelId(Long shopId, Long channelId) {
        ChannelInfo channelInfo = channelInfoService.getChannelInfo(channelId);
        HashMap<Object, Object> channelRateMap = new HashMap<>();
        if (channelInfo != null) {
            channelRateMap.put("onlineAgreeWxRate", channelInfo.getOnlineAgreeWxRate());
            channelRateMap.put("onlineAgreeZfbRate", channelInfo.getOnlineAgreeZfbRate());
            channelRateMap.put("onlineAgreeUnionpayRate", channelInfo.getOnlineAgreeUnionpayRate());
            channelRateMap.put("offlineAgreeWxRate", channelInfo.getOfflineAgreeWxRate());
            channelRateMap.put("offlineAgreeZfbRate", channelInfo.getOfflineAgreeZfbRate());
            channelRateMap.put("offlineAgreeUnionpayRate", channelInfo.getOfflineAgreeUnionpayRate());
        }
        Map actRateMap = activityShopRecordService.getActRateByShopIdAndChannelId(shopId, channelId);
        if (actRateMap != null) {
            channelRateMap.putAll(actRateMap);
        }
        CommonResult result = new CommonResult<>(channelRateMap);
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    @ApiOperation(value = "更新店铺使用额度", notes = "根据店铺id查询活动费率")
    @ApiImplicitParams({@ApiImplicitParam(name = "店铺id", value = "店铺id")})
    @PostMapping("/updShopSurplusFee")
    public CommonResult<Map> updShopSurplusFee(Long activityId, Long merchantShopId, Long channelId, Integer useFee) {
        CommonResult result = new CommonResult<>(activityShopRecordService.updShopSurplusFee(activityId, merchantShopId, channelId, useFee));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述:上报商户列表
     * è°ƒç”¨service-shop
     * @date  2024-04-14 19:04
     **/
    @ApiOperation(value = "上报商户列表", notes = "上报商户列表")
    @GetMapping("/getToMerchantList")
    public CommonResult getToMerchantList(
            @ApiParam(name = "queryOrgCode", value = "机构code") String queryOrgCode,
            @ApiParam(name = "merchantId", value = "所属商户id") String merchantId,
            @ApiParam(name = "shopName", value = "店铺名称") String shopName,
            @ApiParam(name = "managerName", value = "客户经理名称") String managerName,
            @ApiParam(name = "channelId", value = "通道id") String channelId,
            @ApiParam(name = "activityId", value = "活动ID") Long activityId,
            @ApiParam(name = "pageNumber", value = "分页页码", required = true) Integer pageNumber,
            @ApiParam(name = "pageSize", value = "每页展示数", required = true) Integer pageSize) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        if(StrUtil.isBlank(queryOrgCode)){
            queryOrgCode = user.getOrgCode();
        }
        CommonResult<PageBean<Map>> mapResult = shopServiceClient.getMerchantShopExtendList(queryOrgCode,merchantId,shopName,managerName,channelId,"channelIdNotNull",pageNumber,pageSize);
        List<Map> mapList = mapResult.getData().getRows();
        if(!CollectionUtils.isEmpty(mapList)){
            String[] idsArr = mapList.stream()
                    .map(map -> {
                        Object idObject = map.get("id");
                        if (idObject != null) {
                            return idObject.toString();
                        } else {
                            // å¦‚æžœ idObject ä¸º null,跳过该值;且在filter中过滤掉为null的值
                            return null;
                        }
                    })
                    .filter(Objects::nonNull).toArray(String[]::new);
            //匹配是否已上报,并添加返回标识字段
            List<ActivityShopRecord> recordList = activityShopRecordService.selectByCondition(idsArr,activityId);
            //existsShopIds = å·²ä¸ŠæŠ¥çš„shopIds
            List<Long> existsShopIds = recordList.stream()
                    .map(ActivityShopRecord::getMerchantShopId)
                    .collect(Collectors.toList());
            mapList.forEach(map -> {
                Object idObject = map.get("id");
                Long id = Long.parseLong(idObject.toString());
                if(existsShopIds.contains(id)){
                    //已上报过的商户
                    map.put("existsOrNot",1);
                }else{
                    //未上报的商户
                    map.put("existsOrNot",0);
                }
            });
        }
        PageBean pageBean = new PageBean();
        pageBean.setPageNumber(pageNumber);
        pageBean.setPageSize(pageSize);
        pageBean.setRows(mapList);
        pageBean.setTotal(mapResult.getData().getTotal());
        CommonResult result = new CommonResult<>(pageBean);
        return result;
    }
    /**
     * æ–¹æ³•描述:已上报商户列表
     *
     * @date  2024-04-14 20:35
     **/
    @ApiOperation(value = "已上报商户列表", notes = "已上报商户列表")
    @ApiImplicitParams({ @ApiImplicitParam(name = "ActivityShopRecordParam") })
    @GetMapping("/getAlreadyMerchantList")
    public CommonResult<PageBean> getAlreadyMerchantList(
            @ApiParam(name = "pageNumber", value = "分页页码", required = true) Integer pageNumber,
            @ApiParam(name = "pageSize", value = "每页展示数", required = true) Integer pageSize) {
        ActivityShopRecordParam copy = CommonUtil.getObjFromReq(ActivityShopRecordParam.class);
        ActivityShopRecordParam param = new ActivityShopRecordParam();
        BeanUtils.copyProperties(copy, param);
        PageHelper.startPage(pageNumber, pageSize);
        PageHelper.orderBy("create_time desc");
        List<ActivityShopRecordDto> list = activityShopRecordService.getAlreadyMerchantList(param);
        CommonResult result = new CommonResult<>(new PageBean(list));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelInfoController.java
New file
@@ -0,0 +1,151 @@
package com.nuvole.four.controller.pc;
import com.github.pagehelper.PageHelper;
import com.nuvole.common.domain.emnu.CommonResultEmnu;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.ChannelInfo;
import com.nuvole.four.domain.dto.ChannelInfoDto;
import com.nuvole.four.service.ChannelInfoService;
import com.nuvole.util.CommonUtil;
import com.nuvole.util.PageUtils;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
 * @Desc: é€šé“信息维护Controller
 * @Author: dqh
 * @Date: 2024-04-09
 **/
@Api(value = "通道信息维护", tags = "通道信息维护")
@Slf4j
@RestController
@CrossOrigin
@RequestMapping(value = "/v1/four/pc/channel")
public class ChannelInfoController extends BaseController {
    @Autowired
    private ChannelInfoService channelInfoService;
    /**
     * æ–¹æ³•描述:查询通道列表
     *
     * @date  2024-04-11 14:42
     **/
    @ApiOperation(value = "查询通道信息列表", notes = "查询通道信息列表")
    @GetMapping("/getChannelInfoList")
    public CommonResult<PageBean<ChannelInfo>> getChannelInfoList(
            @ApiParam(name = "channelName", value = "通道名称") String channelName,
            @ApiParam(name = "status", value = "状态;0=启用,1=禁用") Integer status,
            @ApiParam(name = "pageNumber", value = "页码", defaultValue = "1", required = true) Integer pageNumber,
            @ApiParam(name = "pageSize", value = "条数", defaultValue = "10", required = true) Integer pageSize,
            @ApiParam(name = "sortName", value = "排序名称") String sortName,
            @ApiParam(name = "sortOrder", value = "排序方式") String sortOrder
    ) {
        if (StringUtils.isNotBlank(sortName) && StringUtils.isNotBlank(sortOrder)) {
            PageHelper.orderBy(PageUtils.orderParser(sortName, sortOrder));
        } else {
            PageHelper.orderBy("create_time desc");
        }
        PageHelper.startPage(pageNumber, pageSize);
        ChannelInfo channelInfo = new ChannelInfo();
        channelInfo.setChannelName(channelName);
        channelInfo.setStatus(status);
        List<ChannelInfoDto> list = channelInfoService.getPageList(channelInfo);
        CommonResult result = new CommonResult<>(new PageBean(list));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述:查询通道列表
     *
     * @date  2024-04-11 14:42
     **/
    @ApiOperation(value = "查询所有通道信息列表", notes = "查询所有通道信息列表")
    @GetMapping("/getAllList")
    public CommonResult<List<ChannelInfo>> getAllChannelInfoList(
            @ApiParam(name = "channelName", value = "通道名称") String channelName,
            @ApiParam(name = "status", value = "状态;0=启用,1=禁用") Integer status,
            @ApiParam(name = "sortName", value = "排序名称") String sortName,
            @ApiParam(name = "sortOrder", value = "排序方式") String sortOrder
    ) {
        if (StringUtils.isNotBlank(sortName) && StringUtils.isNotBlank(sortOrder)) {
            PageHelper.orderBy(PageUtils.orderParser(sortName, sortOrder));
        } else {
            PageHelper.orderBy("create_time desc");
        }
        ChannelInfo channelInfo = new ChannelInfo();
        channelInfo.setChannelName(channelName);
        channelInfo.setStatus(status);
        List<ChannelInfo> list = channelInfoService.getList(channelInfo);
        return new CommonResult<>(list);
    }
    /**
     * æ–¹æ³•描述:新增通道
     *
     * @date  2024-04-11 14:42
     **/
    @ApiOperation(value = "添加", notes = "添加")
    @ApiImplicitParams({ @ApiImplicitParam(name = "ChannelInfo") })
    @PostMapping("/save")
    public CommonResult<Integer> save() {
        ChannelInfo channelInfo = CommonUtil.getObjFromReq(ChannelInfo.class);
        channelInfoService.saveChannelInfo(channelInfo);
        return new CommonResult(CommonResultEmnu.OK);
    }
    /**
     * æ–¹æ³•描述: ä¿®æ”¹é€šé“
     *
     * @date  2024-04-11 14:41
     **/
    @ApiOperation(value = "编辑", notes = "编辑")
    @ApiImplicitParams({ @ApiImplicitParam(name = "ChannelInfo") })
    @PostMapping("/upd")
    public CommonResult<Integer> upd() {
        ChannelInfo channelInfo = CommonUtil.getObjFromReq(ChannelInfo.class);
        channelInfoService.updateChannelInfo(channelInfo);
        return new CommonResult(CommonResultEmnu.OK);
    }
    /**
     * æ–¹æ³•描述:根据ID查询通道详情
     *
     * @date  2024-04-11 14:42
     **/
    @ApiOperation(value = "查询通道信息详情", notes = "查询通道信息详情")
    @GetMapping("/getDetail")
    public CommonResult<ChannelInfo> getChannelInfoDetail(
            @ApiParam(name = "id", value = "通道ID") Long id)
    {
        ChannelInfo dtoList = channelInfoService.getChannelInfo(id);
        return new CommonResult<>(dtoList);
    }
    /**
     * æ–¹æ³•描述:根据code查询通道详情
     *
     * @date 2024-04-11 14:42
     **/
    @ApiOperation(value = "根据code查询通道详情", notes = "根据code查询通道详情")
    @GetMapping("/getDetailByCode")
    public CommonResult<ChannelInfo> getDetailByCode(@ApiParam(name = "channelCode", value = "通道code") String channelCode) {
        ChannelInfo dtoList = channelInfoService.getDetailByCode(channelCode);
        return new CommonResult(dtoList);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelOrgConfigController.java
New file
@@ -0,0 +1,109 @@
package com.nuvole.four.controller.pc;
import com.github.pagehelper.PageHelper;
import com.nuvole.base.domain.SysUser;
import com.nuvole.common.domain.emnu.CommonResultEmnu;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import com.nuvole.four.domain.dto.ChannelOrgConfigDto;
import com.nuvole.four.domain.params.ChannelOrgConfigParam;
import com.nuvole.four.service.ChannelOrgConfigService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.CommonUtil;
import com.nuvole.util.PageUtils;
import io.swagger.annotations.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @Desc: æœºæž„通道配置Controller
 * @Author: dqh
 * @Date: 2024-04-10
 **/
@Api(value = "机构通道配置", tags = "机构通道配置")
@Slf4j
@RestController
@RequestMapping(value = "/v1/four/pc/channel/org/config")
public class ChannelOrgConfigController extends BaseController {
    @Autowired
    private ChannelOrgConfigService channelOrgConfigService;
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„通道列表
     * ä»…包含当前orgId的下级,不包含(二三四级等)
     * @date  2024-04-11 18:50
     **/
    @ApiOperation(value = "查询机构通道列表", notes = "查询机构通道列表")
    @GetMapping("/getChannelOrgList")
    public CommonResult<PageBean> getChannelOrgConfigList(
            @ApiParam(name = "orgId", value = "机构ID;顶级则不传") Long orgId,
            @ApiParam(name = "orgName", value = "机构名称") String orgName,
            @ApiParam(name = "pageNumber", value = "页码", defaultValue = "1", required = true) Integer pageNumber,
            @ApiParam(name = "pageSize", value = "条数", defaultValue = "10", required = true) Integer pageSize,
            @ApiParam(name = "sortName", value = "排序名称") String sortName,
            @ApiParam(name = "sortOrder", value = "排序方式") String sortOrder
    ) {
        if (StringUtils.isNotBlank(sortName) && StringUtils.isNotBlank(sortOrder)) {
            PageHelper.orderBy(PageUtils.orderParser(sortName, sortOrder));
        }
        PageHelper.startPage(pageNumber, pageSize);
        List<ChannelOrgConfigDto> list = channelOrgConfigService.queryAllChannelOrg(orgId,orgName);
        CommonResult result = new CommonResult<>(new PageBean(list));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: é…ç½®é€šé“、设置默认
     *
     * @date  2024-04-11 18:51
     **/
    @ApiOperation(value = "配置通道", notes = "配置通道")
    @ApiImplicitParams({ @ApiImplicitParam(name = "ChannelOrgConfigParam") })
    @PostMapping("/config/channel")
    public CommonResult<Integer> configChannel() {
        ChannelOrgConfigParam configParam = CommonUtil.getObjFromReq(ChannelOrgConfigParam.class);
        channelOrgConfigService.configChannel(configParam);
        return new CommonResult(CommonResultEmnu.OK);
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„通道详情
     * è¯¦æƒ…中的通道 ä»…包含当前orgId对应的pId对应的通道
     * @date  2024-04-11 20:04
     **/
    @ApiOperation(value = "查询机构通道详情", notes = "查询机构通道详情")
    @GetMapping("/getDetail")
    public CommonResult<ChannelOrgConfigDetailDto> getChannelOrgConfigDetail(
            @ApiParam(name = "orgId", value = "机构ID") Long orgId) {
        if (orgId == null) {
            SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
            if (user != null) {
                orgId = user.getOrgId();
            }
        }
        if (orgId == null) {
            return new CommonResult<>(CommonResultEmnu.INVALID_PARAMS, "参数为空!");
        }
        ChannelOrgConfigDetailDto dtoList = channelOrgConfigService.getChannelOrgConfigDetail(orgId);
        return new CommonResult(dtoList);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SpecialFeeRateController.java
New file
@@ -0,0 +1,88 @@
package com.nuvole.four.controller.pc;
import com.github.pagehelper.PageHelper;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.SpecialFeeRate;
import com.nuvole.four.domain.dto.SpecialFeeRateDto;
import com.nuvole.four.domain.query.SpecialFeeRateQuery;
import com.nuvole.four.service.SpecialFeeRateService;
import com.nuvole.util.CommonUtil;
import io.swagger.annotations.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
 * @Description è¡Œä¸šç®¡ç†-特殊行业费率管理
 * @Author dqh
 * @Date 2024-04-12 19:57:28
 */
@Api(value = "行业管理-特殊行业费率管理接口", tags = "行业管理-特殊行业费率管理接口")
@EnableTransactionManagement
@RestController
@RequestMapping("/v1/four/pc/special/fee/rate")
public class SpecialFeeRateController extends BaseController {
    @Autowired
    private SpecialFeeRateService specialFeeRateService;
    /**
     * æ–¹æ³•描述:特殊费率设置
     * id为空则新增;有值则修改
     *
     * @date  2024-04-13 13:15
     **/
    @ApiOperation(value = "特殊费率设置", notes = "特殊费率设置")
    @ApiImplicitParams({ @ApiImplicitParam(name = "SpecialFeeRateDto") })
    @PostMapping("/add")
    public CommonResult<Integer> add() {
        SpecialFeeRateDto dto = CommonUtil.getObjFromReq(SpecialFeeRateDto.class);
        CommonResult result = new CommonResult<>(specialFeeRateService.addSelective(dto));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    @ApiOperation(value = "删除", notes = "删除")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @PostMapping("/del")
    public CommonResult<Integer> del(Long id) {
        CommonResult result = new CommonResult<>(specialFeeRateService.del(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述:特殊费率配置查询
     *
     * @date  2024-04-13 13:17
     **/
    @ApiOperation(value = "特殊费率配置查询", notes = "特殊费率配置查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "industryId", value = "行业ID", dataType = "query", required = true),
            @ApiImplicitParam(name = "channelId", value = "通道ID", dataType = "query", required = true)
    })
    @GetMapping("/getConfig")
    public CommonResult<SpecialFeeRateDto> getConfig(Long industryId,Long channelId) {
        CommonResult result = new CommonResult<>(specialFeeRateService.getConfig(industryId,channelId));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/StoreIndustryManageController.java
New file
@@ -0,0 +1,163 @@
package com.nuvole.four.controller.pc;
import com.github.pagehelper.PageHelper;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.StoreIndustryManage;
import com.nuvole.four.domain.query.StoreIndustryManageQuery;
import com.nuvole.four.service.StoreIndustryManageService;
import com.nuvole.util.CommonUtil;
import io.swagger.annotations.*;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * @Description è¡Œä¸šç®¡ç†
 * @Author dqh
 * @Date 2024-04-12 17:41:29
 */
@Api(value = "行业管理接口", tags = "行业管理接口")
@EnableTransactionManagement
@RestController
@RequestMapping("/v1/four/pc/store/industry/manage")
public class StoreIndustryManageController extends BaseController {
    @Autowired
    private StoreIndustryManageService storeIndustryManageService;
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢è¡Œä¸šç®¡ç†åˆ—表
     *
     * @date  2024-04-12 17:56
     **/
    @ApiOperation(value = "查询列表", notes = "查询列表")
    @ApiImplicitParams({ @ApiImplicitParam(name = "StoreIndustryManageQuery") })
    @GetMapping("/getList")
    public CommonResult<PageBean> getList(@ApiParam(name = "pageNumber", value = "分页页码", required = true) Integer pageNumber,
                                          @ApiParam(name = "pageSize", value = "每页展示数", required = true) Integer pageSize) {
        StoreIndustryManageQuery copy = CommonUtil.getObjFromReq(StoreIndustryManageQuery.class);
        StoreIndustryManageQuery query = new StoreIndustryManageQuery();
        BeanUtils.copyProperties(copy, query);
        PageHelper.startPage(pageNumber, pageSize);
        PageHelper.orderBy("create_time desc");
        List<StoreIndustryManage> list = storeIndustryManageService.getList(query);
        CommonResult result = new CommonResult<>(new PageBean(list));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: æ·»åŠ è¡Œä¸šç®¡ç†
     *
     * @date  2024-04-12 18:17
     **/
    @ApiOperation(value = "添加", notes = "添加")
    @ApiImplicitParams({ @ApiImplicitParam(name = "StoreIndustryManage") })
    @PostMapping("/add")
    public CommonResult<Integer> add() {
        StoreIndustryManage copy = CommonUtil.getObjFromReq(StoreIndustryManage.class);
        StoreIndustryManage storeIndustryManage = new StoreIndustryManage();
        BeanUtils.copyProperties(copy, storeIndustryManage);
        CommonResult result = new CommonResult<>(storeIndustryManageService.addSelective(storeIndustryManage));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢max(sortNo)的序号信息
     * è¿”回 = max(sortNo) + 10
     *
     * @date  2024-04-12 18:17
     **/
    @ApiOperation(value = "查询当前最大序号", notes = "查询当前最大序号")
    @GetMapping("/getSort")
    public CommonResult<StoreIndustryManage> getSort() {
        CommonResult result = new CommonResult<>(storeIndustryManageService.getSort());
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: æ ¹æ®id查询行业管理详情
     *
     * @date  2024-04-12 18:32
     **/
    @ApiOperation(value = "根据id查询", notes = "根据id查询")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @GetMapping("/get")
    public CommonResult<StoreIndustryManage> get(Long id) {
        CommonResult result = new CommonResult<>(storeIndustryManageService.get(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: ä¿®æ”¹è¡Œä¸šç®¡ç†
     *
     * @date  2024-04-12 18:32
     **/
    @ApiOperation(value = "修改", notes = "修改")
    @ApiImplicitParams({ @ApiImplicitParam(name = "StoreIndustryManage") })
    @PostMapping("/upd")
    public CommonResult<Integer> upd() {
        StoreIndustryManage copy = CommonUtil.getObjFromReq(StoreIndustryManage.class);
        StoreIndustryManage storeIndustryManage = new StoreIndustryManage();
        BeanUtils.copyProperties(copy, storeIndustryManage);
        CommonResult result = new CommonResult<>(storeIndustryManageService.editSelective(storeIndustryManage));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    @ApiOperation(value = "删除", notes = "删除")
    @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "主键id") })
    @PostMapping("/del")
    public CommonResult<Integer> del(Long id) {
        CommonResult result = new CommonResult<>(storeIndustryManageService.del(id));
        CommonResult result1 = new CommonResult<>();
        BeanUtils.copyProperties(result, result1);
        result = result1;
        return result;
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ‰€æœ‰è¡Œä¸šæ ‘
     *
     * @date  2024-04-12 18:43
     **/
    @ApiOperation(value = "查询所有行业树", notes = "查询所有行业树")
    @GetMapping("/getIndustryTree")
    public CommonResult<List<Map>> getIndustryTree(Integer status) {
        Map map = new HashMap();
        if(status != null){
            map.put("status",status);
        }
        List<Map> list = storeIndustryManageService.getIndustryTree(map);
        return new CommonResult<>(list);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SysOrgController.java
New file
@@ -0,0 +1,107 @@
package com.nuvole.four.controller.pc;
import com.github.pagehelper.PageHelper;
import com.nuvole.common.domain.result.CommonResult;
import com.nuvole.common.domain.result.PageBean;
import com.nuvole.four.controller.BaseController;
import com.nuvole.four.domain.SysOrg;
import com.nuvole.four.service.SysOrgService;
import com.nuvole.util.PageUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * ç±»æè¿°: æœºæž„管理
 *
 * @author dqh
 * @date  2024-04-11 11:01
 * @version 1.0
 **/
@Api(value = "后台机构接口", tags = "后台机构接口")
@Slf4j
@RestController
@RequestMapping(value = "/v1/four/pc/org")
public class SysOrgController extends BaseController {
    @Autowired
    private SysOrgService sysOrgService;
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„树形列表
     *
     * @date  2024-04-11 11:00
     **/
    @ApiOperation(value = "查询机构树形列表", notes = "查询机构树形列表")
    @GetMapping("/getOrgsTree")
    public CommonResult<List<Map>> getOrgs() {
        List<Map> list = sysOrgService.getTreeOrg(new HashMap());
        return new CommonResult<>(list);
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„下级列表
     *
     * @date  2024-04-11 11:01
     **/
    @ApiOperation(value = "查询机构下级列表", notes = "查询机构下级列表")
    @GetMapping("/getChildrenOrg")
    public CommonResult<PageBean<SysOrg>> getChildrenOrg(
            @ApiParam(name = "id", value = "主键ID") Long id,
            @ApiParam(name = "name", value = "机构名称") String name,
            @ApiParam(name = "userOrgCode", value = "机构编号") String userOrgCode,
            @ApiParam(name = "state", value = "机构状态") Integer state,
            @ApiParam(name = "pageNumber", value = "页码", defaultValue = "1", required = true) Integer pageNumber,
            @ApiParam(name = "pageSize", value = "条数", defaultValue = "10", required = true) Integer pageSize,
            @ApiParam(name = "sortName", value = "排序名称") String sortName,
            @ApiParam(name = "sortOrder", value = "排序方式") String sortOrder
    ) {
        if (StringUtils.isNotBlank(sortName) && StringUtils.isNotBlank(sortOrder)) {
            PageHelper.orderBy(PageUtils.orderParser(sortName, sortOrder));
        } else {
            PageHelper.orderBy("sort_no");
        }
        SysOrg sto = new SysOrg();
        sto.setId(id);
        sto.setName(name);
        sto.setUserOrgCode(userOrgCode);
        sto.setState(state);
        SysOrg s = new SysOrg();
        BeanUtils.copyProperties(sto, s);
        PageHelper.startPage(pageNumber, pageSize);
        return new CommonResult<>(new PageBean(sysOrgService.selectListByPid(s.getId(), s.getName(), s.getUserOrgCode(), s.getState())));
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„列表(懒加载)
     *
     * @date  2024-04-11 11:01
     **/
    @ApiOperation(value = "查询机构列表(懒加载)", notes = "查询机构列表(懒加载)")
    @GetMapping("/getOrgList")
    public CommonResult<List<SysOrg>> getOrgList(
            @ApiParam(name = "pid", value = "父级id") Long pid,
            @ApiParam(name = "state", value = "机构状态") Integer state
    ) {
        PageHelper.orderBy("sort_no");
        SysOrg sto = new SysOrg();
        sto.setPid(pid);
        sto.setState(state);
        SysOrg s = new SysOrg();
        BeanUtils.copyProperties(sto, s);
        return new CommonResult<>(sysOrgService.selectListByPid(s.getPid(), null, null, s.getState()));
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/AcceptResult.java
New file
@@ -0,0 +1,40 @@
package com.nuvole.four.domain;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
// @formatter:off
/**
 @author
 ***** *   *  ****
    *   * *  *
   *     *   *
  *     * *  *
 ***** *   *  ****
 @Date 2019/7/29 9:22
 @Description åŽ»é¢†å¥–è¿”å›žä¿¡æ¯
 */
// @formatter:on
@Data
@Api(value = "领奖提交订单返回", tags = "领奖提交订单返回")
public class AcceptResult {
    @ApiModelProperty("订单ID")
    private Long orderId;
    @ApiModelProperty("订单编号")
    private String orderNo;
    @ApiModelProperty("领奖时间")
    private Date acceptTime;
    @ApiModelProperty("核销码")
    private String verificationCode;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityDistributeRecord.java
New file
@@ -0,0 +1,71 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”é¢„ç®—åˆ†é…
 * @Author dqh
 * @Date 2024-04-20 23:39:57
 */
@ApiModel("活动补贴—预算分配")
@Data
public class ActivityDistributeRecord {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("机构id")
    private Long orgId;
    @ApiModelProperty("机构名称")
    private String orgName;
    @ApiModelProperty("机构code")
    private String orgCode;
    @ApiModelProperty("活动ID")
    private Long activityId;
    @ApiModelProperty("总预算,分配过来的金额,金额按分")
    private Long totalFee;
    @ApiModelProperty("已使用预算,金额按分")
    private Long useFee;
    @ApiModelProperty("剩余预算额度,金额按分")
    private Long surplusFee;
    @ApiModelProperty("一级机构id")
    private Long lv1Id;
    @ApiModelProperty("二级机构id")
    private Long lv2Id;
    @ApiModelProperty("三级机构id")
    private Long lv3Id;
    @ApiModelProperty("四级机构id")
    private Long lv4Id;
    @ApiModelProperty("状态 0未开始 1一开始 2已结束")
    private Integer status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Integer deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityFee.java
New file
@@ -0,0 +1,104 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è´¹çŽ‡è¡¥è´´æ´»åŠ¨
 * @Author dqh
 * @Date 2024-04-20 16:54:59
 */
@ApiModel("费率补贴活动")
@Data
public class ActivityFee {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("机构Id")
    private Long orgId;
    @ApiModelProperty("机构code")
    private String orgCode;
    @ApiModelProperty("活动名称")
    private String name;
    @ApiModelProperty("活动编号")
    private String code;
    @ApiModelProperty("活动开始时间")
    private Date beginTime;
    @ApiModelProperty("活动结束时间")
    private Date endTime;
    @ApiModelProperty("报名截止时间")
    private Date expireTime;
    @ApiModelProperty("总预算,金额按分")
    private Long totalFee;
    @ApiModelProperty("已使用预算,金额按分")
    private Long useFee;
    @ApiModelProperty("剩余预算额度,金额按分")
    private Long surplusFee;
    @ApiModelProperty("线上协议费率-微信")
    private Double onlineAgreeWxRate;
    @ApiModelProperty("线上协议费率-支付宝")
    private Double onlineAgreeZfbRate;
    @ApiModelProperty("线上协议费率-云闪付")
    private Double onlineAgreeUnionpayRate;
    @ApiModelProperty("线下协议费率-微信")
    private Double offlineAgreeWxRate;
    @ApiModelProperty("线下协议费率-支付宝")
    private Double offlineAgreeZfbRate;
    @ApiModelProperty("线下协议费率-云闪付")
    private Double offlineAgreeUnionpayRate;
    @ApiModelProperty("线上商户费率-微信")
    private Double onlineMerWxRate;
    @ApiModelProperty("线上商户费率-支付宝")
    private Double onlineMerZfbRate;
    @ApiModelProperty("线上商户费率-云闪付")
    private Double onlineMerUnionpayRate;
    @ApiModelProperty("线下商户费率-微信")
    private Double offlineMerWxRate;
    @ApiModelProperty("线下商户费率-支付宝")
    private Double offlineMerZfbRate;
    @ApiModelProperty("线下商户费率-云闪付")
    private Double offlineMerUnionpayRate;
    @ApiModelProperty("状态 0未开始 1一开始 2已结束")
    private Integer status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Integer deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityShopRecord.java
New file
@@ -0,0 +1,62 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”ä¸ŠæŠ¥å•†æˆ·
 * @Author dqh
 * @Date 2024-04-13 21:39:14
 */
@ApiModel("活动补贴—上报商户")
@Data
public class ActivityShopRecord {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("活动id")
    private Long activityId;
    @ApiModelProperty("商户id")
    private Long merchantShopId;
    @ApiModelProperty("渠道id")
    private Long channelId;
    @ApiModelProperty("渠道名称")
    private String channelName;
    @ApiModelProperty("活动额度,金额按分")
    private Long totalFee;
    @ApiModelProperty("第三方商户号")
    private String thirdShopNo;
    @ApiModelProperty("已使活动额度,金额按分")
    private Long useFee;
    @ApiModelProperty("剩余活动额度,金额按分")
    private Long surplusFee;
    @ApiModelProperty("状态 0未开始 1一开始 2已结束")
    private Integer status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Integer deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelInfo.java
New file
@@ -0,0 +1,86 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è¡Œä¸šç®¡ç†
 * @Author dqh
 * @Date 2024-04-13 13:59:34
 */
@ApiModel("行业管理")
@Data
public class ChannelInfo {
    @ApiModelProperty(" id")
    private Long id;
    @ApiModelProperty("通道code")
    private String channelCode;
    @ApiModelProperty("通道名称")
    private String channelName;
    @ApiModelProperty("扩展json字段")
    private String extendJson;
    @ApiModelProperty("线上协议费率-微信")
    private Double onlineAgreeWxRate;
    @ApiModelProperty("线上协议费率-支付宝")
    private Double onlineAgreeZfbRate;
    @ApiModelProperty("线上协议费率-云闪付")
    private Double onlineAgreeUnionpayRate;
    @ApiModelProperty("线下协议费率-微信")
    private Double offlineAgreeWxRate;
    @ApiModelProperty("线下协议费率-支付宝")
    private Double offlineAgreeZfbRate;
    @ApiModelProperty("线下协议费率-云闪付")
    private Double offlineAgreeUnionpayRate;
    @ApiModelProperty("线上商户费率-微信")
    private Double onlineMerWxRate;
    @ApiModelProperty("线上商户费率-支付宝")
    private Double onlineMerZfbRate;
    @ApiModelProperty("线上商户费率-云闪付")
    private Double onlineMerUnionpayRate;
    @ApiModelProperty("线下商户费率-微信")
    private Double offlineMerWxRate;
    @ApiModelProperty("线下商户费率-支付宝")
    private Double offlineMerZfbRate;
    @ApiModelProperty("线下商户费率-云闪付")
    private Double offlineMerUnionpayRate;
    @ApiModelProperty("证书")
    private String certification;
    @ApiModelProperty("状态;0-启用(默认);1-禁用")
    private Integer status;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("修改人")
    private Long updateBy;
    @ApiModelProperty("修改时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelOrgConfig.java
New file
@@ -0,0 +1,50 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description æœºæž„通道配置
 * @Author dqh
 * @Date 2024-04-13 10:31:50
 */
@ApiModel("机构通道配置")
@Data
public class ChannelOrgConfig {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("机构id")
    private Long orgId;
    @ApiModelProperty("机构名称")
    private String orgName;
    @ApiModelProperty("父级机构名称")
    private String pOrgName;
    @ApiModelProperty("channel_info表的id")
    private Long channelInfoId;
    @ApiModelProperty("是否默认通道(默认0);0-否;1-是")
    private Integer defaultOrNot;
    @ApiModelProperty("是否启用(默认0);0-否;1-是")
    private Integer status;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("修改人")
    private Long updateBy;
    @ApiModelProperty("修改时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SpecialFeeRate.java
New file
@@ -0,0 +1,86 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è¡Œä¸šç®¡ç†
 * @Author dqh
 * @Date 2024-04-13 10:45:05
 */
@ApiModel("行业管理")
@Data
public class SpecialFeeRate {
    @ApiModelProperty("主键")
    private Long id;
    @ApiModelProperty("渠道id")
    private Long channelId;
    @ApiModelProperty("行业管理表id")
    private Long industryManageId;
    @ApiModelProperty("渠道行业code")
    private String industryCode;
    @ApiModelProperty("线上协议费率-微信")
    private Double onlineAgreeWxRate;
    @ApiModelProperty("线上协议费率-支付宝")
    private Double onlineAgreeZfbRate;
    @ApiModelProperty("线上协议费率-云闪付")
    private Double onlineAgreeUnionpayRate;
    @ApiModelProperty("线下协议费率-微信")
    private Double offlineAgreeWxRate;
    @ApiModelProperty("线下协议费率-支付宝")
    private Double offlineAgreeZfbRate;
    @ApiModelProperty("线下协议费率-云闪付")
    private Double offlineAgreeUnionpayRate;
    @ApiModelProperty("线上商户费率-微信")
    private Double onlineMerWxRate;
    @ApiModelProperty("线上商户费率-支付宝")
    private Double onlineMerZfbRate;
    @ApiModelProperty("线上商户费率-云闪付")
    private Double onlineMerUnionpayRate;
    @ApiModelProperty("线下商户费率-微信")
    private Double offlineMerWxRate;
    @ApiModelProperty("线下商户费率-支付宝")
    private Double offlineMerZfbRate;
    @ApiModelProperty("线下商户费率-云闪付")
    private Double offlineMerUnionpayRate;
    @ApiModelProperty("渠道行业名称")
    private String industryName;
    @ApiModelProperty("状态 0禁止 1启用")
    private Short status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Short deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreIndustryManage.java
New file
@@ -0,0 +1,56 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è¡Œä¸šç®¡ç†
 * @Author dqh
 * @Date 2024-04-13 10:40:45
 */
@ApiModel("行业管理")
@Data
public class StoreIndustryManage {
    @ApiModelProperty("主键")
    private Long id;
    @ApiModelProperty("最上级为0")
    private Long pId;
    @ApiModelProperty("行业名称")
    private String industryName;
    @ApiModelProperty("编号")
    private String industryCode;
    @ApiModelProperty("序号")
    private Integer sortNo;
    @ApiModelProperty("0.否 1.是")
    private Short isSpecial;
    @ApiModelProperty("层级")
    private Integer level;
    @ApiModelProperty("状态 0禁止 1启用")
    private Short status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Short deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreMemberInfo.java
New file
@@ -0,0 +1,511 @@
package com.nuvole.four.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * å®žä½“类对应的数据表为:  store_member_info
 * @author system-generator
 * @date 2020-07-31 09:50:29
 */
@ApiModel(value ="会员信息表")
public class StoreMemberInfo {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "会员名称")
    private String memberNameEncrypt;
    @ApiModelProperty(value = "会员名称脱敏")
    private String memberName;
    @ApiModelProperty(value = "会员类型 1普通会员 2 å®¢æˆ·ç»ç†")
    private Short memberType;
    @ApiModelProperty(value = "身份证号MD5密文")
    private String idcardEncryptMd5;
    @ApiModelProperty(value = "身份证密文")
    private String idcardEncrypt;
    @ApiModelProperty(value = "身份证脱敏")
    private String idcard;
    @ApiModelProperty(value = "手机号密文")
    private String mobileEncrypt;
    @ApiModelProperty(value = "手机号脱敏")
    private String mobile;
    @ApiModelProperty(value = "头像")
    private String headImage;
    @ApiModelProperty(value = "锁定次数")
    private Short lockTimes;
    @ApiModelProperty(value = "锁定到期日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lockTime;
    @ApiModelProperty(value = "用户唯一标识(微信小程序openid)")
    private String wechatOpenid;
    @ApiModelProperty(value = "支付宝userID")
    private String aliUserId;
    @ApiModelProperty(value = "支付宝唯一凭证(支付宝公众平台unionid)")
    private String aliUnionid;
    @ApiModelProperty(value = "用户唯一标识(支付宝小程序openid)")
    private String aliOpenid;
    @ApiModelProperty(value = "支付宝openId(公众号)")
    private String aliH5Openid;
    @ApiModelProperty(value = "翼支付userID")
    private String bestPayUserId;
    @ApiModelProperty(value = "云闪付userID")
    private String cloudPayUserId;
    @ApiModelProperty(value = "用户唯一标识(公众号openid)")
    private String wechatH5Openid;
    @ApiModelProperty(value = "微信唯一凭证(微信公众平台unionid)")
    private String wechatUnionid;
    @ApiModelProperty(value = "微信头像")
    private String wechatHeadImage;
    @ApiModelProperty(value = "会员昵称")
    private String nickName;
    @ApiModelProperty(value = "机构id")
    private Long orgId;
    @ApiModelProperty(value = "机构编号")
    private String orgCode;
    @ApiModelProperty(value = "机构全名称")
    private String orgFullName;
    @ApiModelProperty(value = "金融等级【数据字典】")
    private String financeLv;
    @ApiModelProperty(value = "区域id")
    private Long areaId;
    @ApiModelProperty(value = "区域code")
    private String areaCode;
    @ApiModelProperty(value = "区域全名称")
    private String areaFullName;
    @ApiModelProperty(value = "客户经理名称")
    private String managerName;
    @ApiModelProperty(value = "客户经理id")
    private Long managerId;
    @ApiModelProperty(value = "会员积分")
    private Long memberScore;
    @ApiModelProperty(value = "平台消耗积分")
    private Long costScore;
    @ApiModelProperty(value = "存量积分")
    private Long stockScore;
    @ApiModelProperty(value = "会员币")
    private Integer coin;
    @ApiModelProperty(value = "创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    @ApiModelProperty(value = "状态(0 ç¦ç”¨ï¼Œ1启用)")
    private Short state;
    @ApiModelProperty(value = "云商通用户唯一标识(如果为空代表没在云商通创建会员) ")
    private String yunstuserid;
    @ApiModelProperty(value = "推广人id")
    private Long pushwidemanid;
    @ApiModelProperty(value = "人才id")
    private String talentId;
    @ApiModelProperty(value = "出生日期")
    private Integer birthday;
    @ApiModelProperty(value = "性别 0男1女")
    private Integer sex;
    @ApiModelProperty(value = "人才类型")
    private String talentType;
    @ApiModelProperty(value = "人才类型标签")
    private String talentTypeLabel;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getMemberNameEncrypt() {
        return memberNameEncrypt;
    }
    public void setMemberNameEncrypt(String memberNameEncrypt) {
        this.memberNameEncrypt = memberNameEncrypt == null ? null : memberNameEncrypt.trim();
    }
    public String getMemberName() {
        return memberName;
    }
    public void setMemberName(String memberName) {
        this.memberName = memberName == null ? null : memberName.trim();
    }
    public Short getMemberType() {
        return memberType;
    }
    public void setMemberType(Short memberType) {
        this.memberType = memberType;
    }
    public String getIdcardEncryptMd5() {
        return idcardEncryptMd5;
    }
    public void setIdcardEncryptMd5(String idcardEncryptMd5) {
        this.idcardEncryptMd5 = idcardEncryptMd5 == null ? null : idcardEncryptMd5.trim();
    }
    public String getIdcardEncrypt() {
        return idcardEncrypt;
    }
    public void setIdcardEncrypt(String idcardEncrypt) {
        this.idcardEncrypt = idcardEncrypt == null ? null : idcardEncrypt.trim();
    }
    public String getIdcard() {
        return idcard;
    }
    public void setIdcard(String idcard) {
        this.idcard = idcard == null ? null : idcard.trim();
    }
    public String getMobileEncrypt() {
        return mobileEncrypt;
    }
    public void setMobileEncrypt(String mobileEncrypt) {
        this.mobileEncrypt = mobileEncrypt == null ? null : mobileEncrypt.trim();
    }
    public String getMobile() {
        return mobile;
    }
    public void setMobile(String mobile) {
        this.mobile = mobile == null ? null : mobile.trim();
    }
    public String getHeadImage() {
        return headImage;
    }
    public void setHeadImage(String headImage) {
        this.headImage = headImage == null ? null : headImage.trim();
    }
    public Short getLockTimes() {
        return lockTimes;
    }
    public void setLockTimes(Short lockTimes) {
        this.lockTimes = lockTimes;
    }
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getLockTime() {
        return lockTime;
    }
    public void setLockTime(Date lockTime) {
        this.lockTime = lockTime;
    }
    public String getWechatOpenid() {
        return wechatOpenid;
    }
    public void setWechatOpenid(String wechatOpenid) {
        this.wechatOpenid = wechatOpenid == null ? null : wechatOpenid.trim();
    }
    public String getWechatH5Openid() {
        return wechatH5Openid;
    }
    public void setWechatH5Openid(String wechatH5Openid) {
        this.wechatH5Openid = wechatH5Openid;
    }
    public String getWechatUnionid() {
        return wechatUnionid;
    }
    public void setWechatUnionid(String wechatUnionid) {
        this.wechatUnionid = wechatUnionid == null ? null : wechatUnionid.trim();
    }
    public String getWechatHeadImage() {
        return wechatHeadImage;
    }
    public void setWechatHeadImage(String wechatHeadImage) {
        this.wechatHeadImage = wechatHeadImage == null ? null : wechatHeadImage.trim();
    }
    public String getNickName() {
        return nickName;
    }
    public void setNickName(String nickName) {
        this.nickName = nickName == null ? null : nickName.trim();
    }
    public Long getOrgId() {
        return orgId;
    }
    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode == null ? null : orgCode.trim();
    }
    public String getOrgFullName() {
        return orgFullName;
    }
    public void setOrgFullName(String orgFullName) {
        this.orgFullName = orgFullName == null ? null : orgFullName.trim();
    }
    public String getFinanceLv() {
        return financeLv;
    }
    public void setFinanceLv(String financeLv) {
        this.financeLv = financeLv == null ? null : financeLv.trim();
    }
    public Long getAreaId() {
        return areaId;
    }
    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }
    public String getAreaCode() {
        return areaCode;
    }
    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode == null ? null : areaCode.trim();
    }
    public String getAreaFullName() {
        return areaFullName;
    }
    public void setAreaFullName(String areaFullName) {
        this.areaFullName = areaFullName == null ? null : areaFullName.trim();
    }
    public String getManagerName() {
        return managerName;
    }
    public void setManagerName(String managerName) {
        this.managerName = managerName == null ? null : managerName.trim();
    }
    public Long getManagerId() {
        return managerId;
    }
    public void setManagerId(Long managerId) {
        this.managerId = managerId;
    }
    public Long getMemberScore() {
        return memberScore;
    }
    public void setMemberScore(Long memberScore) {
        this.memberScore = memberScore;
    }
    public Long getCostScore() {
        return costScore;
    }
    public void setCostScore(Long costScore) {
        this.costScore = costScore;
    }
    public Long getStockScore() {
        return stockScore;
    }
    public void setStockScore(Long stockScore) {
        this.stockScore = stockScore;
    }
    public Integer getCoin() {
        return coin;
    }
    public void setCoin(Integer coin) {
        this.coin = coin;
    }
    @JsonFormat(locale = "zh", timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public Short getState() {
        return state;
    }
    public void setState(Short state) {
        this.state = state;
    }
    public String getYunstuserid() {
        return yunstuserid;
    }
    public void setYunstuserid(String yunstuserid) {
        this.yunstuserid = yunstuserid == null ? null : yunstuserid.trim();
    }
    public Long getPushwidemanid() {
        return pushwidemanid;
    }
    public void setPushwidemanid(Long pushwidemanid) {
        this.pushwidemanid = pushwidemanid;
    }
    public String getTalentId() {
        return talentId;
    }
    public void setTalentId(String talentId) {
        this.talentId = talentId;
    }
    public Integer getBirthday() {
        return birthday;
    }
    public void setBirthday(Integer birthday) {
        this.birthday = birthday;
    }
    public Integer getSex() {
        return sex;
    }
    public void setSex(Integer sex) {
        this.sex = sex;
    }
    public String getTalentType() {
        return talentType;
    }
    public void setTalentType(String talentType) {
        this.talentType = talentType;
    }
    public String getTalentTypeLabel() {
        return talentTypeLabel;
    }
    public void setTalentTypeLabel(String talentTypeLabel) {
        this.talentTypeLabel = talentTypeLabel;
    }
    public String getAliUserId() {
        return aliUserId;
    }
    public void setAliUserId(String aliUserId) {
        this.aliUserId = aliUserId;
    }
    public String getAliUnionid() {
        return aliUnionid;
    }
    public void setAliUnionid(String aliUnionid) {
        this.aliUnionid = aliUnionid;
    }
    public String getAliOpenid() {
        return aliOpenid;
    }
    public void setAliOpenid(String aliOpenid) {
        this.aliOpenid = aliOpenid;
    }
    public String getAliH5Openid() {
        return aliH5Openid;
    }
    public void setAliH5Openid(String aliH5Openid) {
        this.aliH5Openid = aliH5Openid;
    }
    public String getBestPayUserId() {
        return bestPayUserId;
    }
    public void setBestPayUserId(String bestPayUserId) {
        this.bestPayUserId = bestPayUserId;
    }
    public String getCloudPayUserId() {
        return cloudPayUserId;
    }
    public void setCloudPayUserId(String cloudPayUserId) {
        this.cloudPayUserId = cloudPayUserId;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreSupplierInfoAccount.java
New file
@@ -0,0 +1,62 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description ä¾›åº”商人员账号信息表
 * @Author cy
 * @Date 2023-08-10 14:09:49
 */
@ApiModel("供应商人员账号信息表")
@Data
public class StoreSupplierInfoAccount {
    @ApiModelProperty("ID")
    private Long id;
    @ApiModelProperty("头像")
    private String headImg;
    @ApiModelProperty("账号名")
    private String account;
    @ApiModelProperty("账号密码")
    private String mixPd;
    @ApiModelProperty("所属供应商ID")
    private Long supplierId;
    @ApiModelProperty("人员名称")
    private String userName;
    @ApiModelProperty("人员编号")
    private String userCode;
    @ApiModelProperty("人员手机号")
    private String userMobile;
    @ApiModelProperty("锁定次数")
    private Short lockTimes;
    @ApiModelProperty("锁定到期日期")
    private Date lockTime;
    @ApiModelProperty("备注信息")
    private String note;
    @ApiModelProperty("创建人")
    private Long createId;
    @ApiModelProperty("创建人")
    private String createName;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("状态【0:禁用  1:启用】")
    private Short state;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SysOrg.java
New file
@@ -0,0 +1,167 @@
package com.nuvole.four.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
 * å®žä½“类对应的数据表为:  sys_org
 * @author system-generator
 * @date 2019-04-17 15:49:13
 */
@ApiModel(value ="机构")
public class SysOrg {
    @ApiModelProperty(value = "id")
    private Long id;
    @ApiModelProperty(value = "NAME【名称】")
    private String name;
    @ApiModelProperty(value = "系统编号")
    private String orgCode;
    @ApiModelProperty(value = "用户机构编号")
    private String userOrgCode;
    @ApiModelProperty(value = "PID【父ID】")
    private Long pid;
    @ApiModelProperty(value = "级别【0.省级 1.市局 2.县区 3.支局】")
    private Integer lv;
    @ApiModelProperty(value = "顺序号")
    private Integer sortNo;
    @ApiModelProperty(value = "state【状态:1启用0禁用】")
    private Integer state;
    @ApiModelProperty(value = "NOTE【备注】")
    private String note;
    @ApiModelProperty(value = "经度")
    private String lon;
    @ApiModelProperty(value = "纬度")
    private String lat;
    @ApiModelProperty(value = "联系电话")
    private String phone;
    @ApiModelProperty(value = "营业时间")
    private String openTime;
    @ApiModelProperty(value = "详细地址")
    private String address;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }
    public String getOrgCode() {
        return orgCode;
    }
    public void setOrgCode(String orgCode) {
        this.orgCode = orgCode == null ? null : orgCode.trim();
    }
    public String getUserOrgCode() {
        return userOrgCode;
    }
    public void setUserOrgCode(String userOrgCode) {
        this.userOrgCode = userOrgCode == null ? null : userOrgCode.trim();
    }
    public Long getPid() {
        return pid;
    }
    public void setPid(Long pid) {
        this.pid = pid;
    }
    public Integer getLv() {
        return lv;
    }
    public void setLv(Integer lv) {
        this.lv = lv;
    }
    public Integer getSortNo() {
        return sortNo;
    }
    public void setSortNo(Integer sortNo) {
        this.sortNo = sortNo;
    }
    public Integer getState() {
        return state;
    }
    public void setState(Integer state) {
        this.state = state;
    }
    public String getNote() {
        return note;
    }
    public void setNote(String note) {
        this.note = note == null ? null : note.trim();
    }
    public String getLon() {
        return lon;
    }
    public void setLon(String lon) {
        this.lon = lon == null ? null : lon.trim();
    }
    public String getLat() {
        return lat;
    }
    public void setLat(String lat) {
        this.lat = lat == null ? null : lat.trim();
    }
    public String getPhone() {
        return phone;
    }
    public void setPhone(String phone) {
        this.phone = phone;
    }
    public String getOpenTime() {
        return openTime;
    }
    public void setOpenTime(String openTime) {
        this.openTime = openTime;
    }
    public String getAddress() {
        return address;
    }
    public void setAddress(String address) {
        this.address = address == null ? null : address.trim();
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityDistributeBudgetDto.java
New file
@@ -0,0 +1,39 @@
package com.nuvole.four.domain.dto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @Desc: æ´»åŠ¨é¢„ç®—åˆ†é…æ˜Žç»†Dto
 * @Author: dqh
 * @Date: 2024-04-14
 **/
@Api(value = "活动预算分配明细",tags = "活动预算分配明细")
@Data
public class ActivityDistributeBudgetDto {
    @ApiModelProperty(value = "分配记录ID")
    private Long id;
    @ApiModelProperty(value = "机构ID")
    private Long orgId;
    @ApiModelProperty(value = "机构层级")
    private Integer orgLv;
    @ApiModelProperty(value = "机构名称")
    private String orgName;
    @ApiModelProperty(value = "总预算额度;单位分")
    private Long totalFee;
    @ApiModelProperty(value = "剩余额度;单位分")
    private Long surplusFee;
    @ApiModelProperty(value = "发放额度;单位分")
    private Long useFee;
    @ApiModelProperty(value = "是否已发放;0-否;1-是")
    private Integer useOrNot;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityFeeDetailDto.java
New file
@@ -0,0 +1,28 @@
package com.nuvole.four.domain.dto;
import com.nuvole.four.domain.ActivityFee;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @Desc: æŸ¥çœ‹æ´»åŠ¨è¯¦æƒ…-活动数据返回DTO
 * @Author: dqh
 * @Date: 2024-04-15
 **/
@Api(value = "活动详情-活动数据", tags = "活动详情-活动数据")
@Data
public class ActivityFeeDetailDto extends ActivityFee {
    @ApiModelProperty(value = "创建人名称")
    private String createUserName;
    @ApiModelProperty(value = "已分配额度")
    private Long assigned;
    @ApiModelProperty(value = "活动预算分配列表")
    private List<ActivityDistributeBudgetDto> distributeBudgets;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityShopRecordDto.java
New file
@@ -0,0 +1,48 @@
package com.nuvole.four.domain.dto;
import com.nuvole.four.domain.ActivityShopRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @Desc: å·²ä¸ŠæŠ¥åˆ—表返回Dto
 * @Author: dqh
 * @Date: 2024-04-14
 **/
@Api(value = "已上报列表", tags = "已上报列表")
@Data
public class ActivityShopRecordDto extends ActivityShopRecord {
    @ApiModelProperty(value = "店铺code")
    private String shopCode;
    @ApiModelProperty(value = "店铺名称")
    private String shopName;
    @ApiModelProperty(value = "店铺id")
    private String shopId;
    @ApiModelProperty(value = "客户经理名称")
    private String managerName;
    @ApiModelProperty(value = "所属商户")
    private String merchantName;
    @ApiModelProperty(value = "联系人")
    private String contactName;
    @ApiModelProperty(value = "联系电话")
    private String contactMobile;
    @ApiModelProperty(value = "微信费率")
    private Double offlineWxRate;
    @ApiModelProperty(value = "支付宝费率")
    private Double offlineZfbRate;
    @ApiModelProperty(value = "云闪付费率")
    private Double offlineUnionpayRate;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelInfoDto.java
New file
@@ -0,0 +1,15 @@
package com.nuvole.four.domain.dto;
import com.nuvole.four.domain.ChannelInfo;
import lombok.Data;
/**
 * @Desc: é€šé“列表返回列
 * @Author: dqh
 * @Date: 2024-04-13
 **/
@Data
public class ChannelInfoDto extends ChannelInfo {
    private String createUserName;
    private String updateUserName;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDetailDto.java
New file
@@ -0,0 +1,34 @@
package com.nuvole.four.domain.dto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
 * @Desc: æœºæž„通道配置详情DTO
 * @Author: dqh
 * @Date: 2024-04-11
 **/
@Api(value = "机构通道配置详情", tags = "机构通道配置详情")
@Data
public class ChannelOrgConfigDetailDto {
    @ApiModelProperty(value = "机构PID")
    private Long pId;
    @ApiModelProperty(value = "机构名称")
    private String orgName;
    @ApiModelProperty(value = "父级机构名称")
    private String parentOrgName;
    @ApiModelProperty(value = "父级机构名称")
    private Integer lv;
    @ApiModelProperty(value = "机构—支付通道配置列表")
    private List<ConfigOrgDetailChannel> channelList;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDto.java
New file
@@ -0,0 +1,34 @@
package com.nuvole.four.domain.dto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
/**
 * @Desc: æœºæž„通道配置列表信息
 * @Author: dqh
 * @Date: 2024-04-11
 **/
@Api(value = "机构通道配置列表信息", tags = "机构通道配置列表信息")
@Data
public class ChannelOrgConfigDto {
    @ApiModelProperty(value = "机构ID")
    private String orgId;
    @ApiModelProperty(value = "机构名称")
    private String orgName;
    @ApiModelProperty(value = "机构code")
    private String orgCode;
    @ApiModelProperty(value = "配置通道个数")
    private Integer configCount;
    @ApiModelProperty(value = "修改时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ConfigOrgDetailChannel.java
New file
@@ -0,0 +1,33 @@
package com.nuvole.four.domain.dto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @Desc: æœºæž„-支付通道配置列表
 * @Author: dqh
 * @Date: 2024-04-11
 **/
@Api(value = "机构通道配置详情", tags = "机构通道配置详情")
@Data
public class ConfigOrgDetailChannel {
    @ApiModelProperty(value = "机构")
    private Long orgId;
    @ApiModelProperty(value = "通道ID")
    private Long channelInfoId;
    @ApiModelProperty(value = "通道名称")
    private String channelName;
    @ApiModelProperty(value = "通道code")
    private String channelCode;
    @ApiModelProperty(value = "是否启用;0-否;1-是")
    private Integer status;
    @ApiModelProperty(value = "是否默认通道;0-否;1-是")
    private Integer defaultOrNot;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/RateDto.java
New file
@@ -0,0 +1,22 @@
package com.nuvole.four.domain.dto;
import lombok.Data;
import java.math.BigDecimal;
/**
 * @Desc: é€šé“信息-费率Dto
 * @Author: dqh
 * @Date: 2024-04-09
 **/
@Data
public class RateDto {
    //唯一key
    private String key;
    //要展示的中文标签
    private String label;
    //费率值
    private String value;
    //展示顺序;sort越小越靠前
    private Integer sort;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/SpecialFeeRateDto.java
New file
@@ -0,0 +1,25 @@
package com.nuvole.four.domain.dto;
import com.nuvole.four.domain.SpecialFeeRate;
import com.nuvole.four.domain.StoreIndustryManage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.List;
/**
 * @Desc: ç‰¹æ®Šè´¹çŽ‡é…ç½®æŸ¥è¯¢
 * @Author: dqh
 * @Date: 2024-04-13
 **/
@EqualsAndHashCode(callSuper = true)
@Api(value = "特殊费率配置查询",tags = "特殊费率配置查询")
@Data
public class SpecialFeeRateDto extends SpecialFeeRate {
    @ApiModelProperty(value = "通道所属行业")
    //字符串json格式;List<Bean>暂无法转换
    private String industryManages;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/StoreIndustryManageDto.java
New file
@@ -0,0 +1,22 @@
package com.nuvole.four.domain.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @Desc:
 * @Author: dqh
 * @Date: 2024-04-13
 **/
@Data
public class StoreIndustryManageDto {
    @ApiModelProperty("修改ID,修改必传;新增不传")
    private Long id;
    @ApiModelProperty("行业名称")
    private String industryName;
    @ApiModelProperty("编号")
    private String industryCode;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/AppDTO.java
New file
@@ -0,0 +1,62 @@
package com.nuvole.four.domain.extend;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
 * ã€€ã€€ã€€â”â”“   ┏┓
 * ã€€ã€€â”â”›â”»â”â”â”â”›â”»â”“
 * ã€€ã€€â”ƒã€€ã€€ã€€ã€€ã€€ã€€ã€€â”ƒ
 * ã€€ã€€â”ƒã€€ã€€ã€€â”ã€€ã€€ã€€â”ƒ
 * ã€€ã€€â”ƒã€€â”³â”›ã€€â”—┳ ┃
 * ã€€ã€€â”ƒã€€ã€€ã€€ã€€ã€€ã€€ã€€â”ƒ
 * ã€€ã€€â”ƒã€€ã€€ã€€â”»ã€€ã€€ã€€â”ƒ
 * ã€€ã€€â”ƒã€€ã€€ã€€ã€€ã€€ã€€ã€€â”ƒ
 * ã€€ã€€â”—━┓   ┏━┛
 * ã€€ã€€ã€€ã€€â”ƒã€€ã€€ã€€â”ƒ    ç¥žå…½ä¿ä½‘,代码无bug
 * ã€€ã€€ã€€ã€€â”ƒã€€ã€€ã€€â”ƒ
 * ã€€ã€€ã€€ã€€â”ƒã€€ã€€ã€€â”—━━━┓
 * ã€€ã€€ã€€ã€€â”ƒã€€ã€€ã€€ã€€ã€€ã€€ã€€â”£â”“
 * ã€€ã€€ã€€ã€€â”ƒã€€ã€€ã€€ã€€ã€€ã€€ã€€â”â”›
 * ã€€ã€€ã€€ã€€â”—┓┓┏━┳┓┏┛
 * ã€€ã€€ã€€ã€€ã€€â”ƒâ”«â”«ã€€â”ƒâ”«â”«
 * ã€€ã€€ã€€ã€€ã€€â”—┻┛ ┗┻┛
 * â”â”â”â”â”â”APP通用属性过滤━━━━━━
 */
@Data
public class AppDTO<T> {
    private Long attr;
    private Long attr2;
    private Long attr3;
    private Long attr4;
    private String pro;
    private String pro2;
    private String pro3;
    private String pro4;
    private Short small;
    private Short small2;
    private Integer integer;
    private Integer integer2;
    private Object object;
    private Map map;
    private List<T> list;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysOrg.java
New file
@@ -0,0 +1,19 @@
package com.nuvole.four.domain.extend;
import com.nuvole.base.domain.SysOrg;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "查询结果")
public class ExtendSysOrg extends SysOrg {
    @ApiModelProperty(value = "会员个数")
    private String memberCount;
    @ApiModelProperty(value = "机构名称")
    private String orgName;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysUser.java
New file
@@ -0,0 +1,19 @@
package com.nuvole.four.domain.extend;
import com.nuvole.base.domain.SysUser;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "查询结果")
public class ExtendSysUser extends SysUser {
    @ApiModelProperty(value = "会员个数")
    private String memberCount;
    @ApiModelProperty(value = "机构名称")
    private String orgName;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/MapDTO.java
New file
@@ -0,0 +1,29 @@
package com.nuvole.four.domain.extend;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
 * @Description:
 * @Company: TOO (ps:公司名称)
 * @author: å”
 * @date: 2019/8/8 ä¸Šåˆ9:14
 * @version: V1.0.0
 */
@Data
public class MapDTO {
    private Map map;
    private List list;
    public Map getMap() {
        return map;
    }
    public void setMap(Map map) {
        this.map = map;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/SysOrgQuery.java
New file
@@ -0,0 +1,17 @@
package com.nuvole.four.domain.extend;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel(value = "机构信息查询条件")
public class SysOrgQuery {
    @ApiModelProperty(value = "编号")
    private String code;
    @ApiModelProperty(value = "机构编号")
    private String orgCode;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ActivityShopRecordParam.java
New file
@@ -0,0 +1,36 @@
package com.nuvole.four.domain.params;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiParam;
import lombok.Data;
/**
 * @Desc: å·²ä¸ŠæŠ¥å•†æˆ·åˆ—表请求参数
 * @Author: dqh
 * @Date: 2024-04-14
 **/
@Api(value = "已上报商户列表请求参数",tags = "已上报商户列表请求参数")
@Data
public class ActivityShopRecordParam {
    @ApiModelProperty(value = "机构code")
    private Long queryOrgCode;
    @ApiModelProperty(value = "所属商户id")
    private Long merchantId;
    @ApiModelProperty(value = "店铺名称")
    private Long shopName;
    @ApiModelProperty(value = "客户经理名称")
    private Long managerName;
    @ApiModelProperty(value = "通道id")
    private Long channelId;
    @ApiModelProperty(value = "活动ID")
    private Long activityId;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ChannelOrgConfigParam.java
New file
@@ -0,0 +1,31 @@
package com.nuvole.four.domain.params;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @Desc: é…ç½®é€šé“请求参数类
 * @Author: dqh
 * @Date: 2024-04-10
 **/
@Api(value = "配置通道请求参数",tags = "配置通道请求参数类")
@Data
public class ChannelOrgConfigParam {
    @ApiModelProperty(value = "机构ID")
    private Long orgId;
    @ApiModelProperty(value = "当前机构ID对应的机构名称")
    private String orgName;
    @ApiModelProperty(value = "通道ID")
    private Long channelInfoId;
    @ApiModelProperty(value = "状态;0=启用;1=禁用")
    private Integer status;
    @ApiModelProperty(value = "是否默认;0=否;1=是")
    private Integer defaultOrNot;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityDistributeRecordQuery.java
New file
@@ -0,0 +1,68 @@
package com.nuvole.four.domain.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”é¢„ç®—åˆ†é…æŸ¥è¯¢å‚æ•°
 * @Author dqh
 * @Date 2024-04-20 23:39:57
 */
@ApiModel("活动补贴—预算分配查询参数")
@Data
public class ActivityDistributeRecordQuery  {
    @ApiModelProperty("机构id")
    private Long orgId;
    @ApiModelProperty("机构名称")
    private String orgName;
    @ApiModelProperty("机构code")
    private String orgCode;
    @ApiModelProperty("活动ID")
    private Long activityId;
    @ApiModelProperty("总预算,分配过来的金额,金额按分")
    private Long totalFee;
    @ApiModelProperty("已使用预算,金额按分")
    private Long useFee;
    @ApiModelProperty("剩余预算额度,金额按分")
    private Long surplusFee;
    @ApiModelProperty("一级机构id")
    private Long lv1Id;
    @ApiModelProperty("二级机构id")
    private Long lv2Id;
    @ApiModelProperty("三级机构id")
    private Long lv3Id;
    @ApiModelProperty("四级机构id")
    private Long lv4Id;
    @ApiModelProperty("状态 0未开始 1一开始 2已结束")
    private Integer status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Integer deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityFeeQuery.java
New file
@@ -0,0 +1,101 @@
package com.nuvole.four.domain.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è´¹çŽ‡è¡¥è´´æ´»åŠ¨æŸ¥è¯¢å‚æ•°
 * @Author dqh
 * @Date 2024-04-20 16:54:59
 */
@ApiModel("费率补贴活动查询参数")
@Data
public class ActivityFeeQuery  {
    @ApiModelProperty("机构Id")
    private Long orgId;
    @ApiModelProperty("机构code")
    private String orgCode;
    @ApiModelProperty("活动名称")
    private String name;
    @ApiModelProperty("活动编号")
    private String code;
    @ApiModelProperty("活动开始时间")
    private Date beginTime;
    @ApiModelProperty("活动结束时间")
    private Date endTime;
    @ApiModelProperty("报名截止时间")
    private Date expireTime;
    @ApiModelProperty("总预算,金额按分")
    private Long totalFee;
    @ApiModelProperty("已使用预算,金额按分")
    private Long useFee;
    @ApiModelProperty("剩余预算额度,金额按分")
    private Long surplusFee;
    @ApiModelProperty("线上协议费率-微信")
    private Double onlineAgreeWxRate;
    @ApiModelProperty("线上协议费率-支付宝")
    private Double onlineAgreeZfbRate;
    @ApiModelProperty("线上协议费率-云闪付")
    private Double onlineAgreeUnionpayRate;
    @ApiModelProperty("线下协议费率-微信")
    private Double offlineAgreeWxRate;
    @ApiModelProperty("线下协议费率-支付宝")
    private Double offlineAgreeZfbRate;
    @ApiModelProperty("线下协议费率-云闪付")
    private Double offlineAgreeUnionpayRate;
    @ApiModelProperty("线上商户费率-微信")
    private Double onlineMerWxRate;
    @ApiModelProperty("线上商户费率-支付宝")
    private Double onlineMerZfbRate;
    @ApiModelProperty("线上商户费率-云闪付")
    private Double onlineMerUnionpayRate;
    @ApiModelProperty("线下商户费率-微信")
    private Double offlineMerWxRate;
    @ApiModelProperty("线下商户费率-支付宝")
    private Double offlineMerZfbRate;
    @ApiModelProperty("线下商户费率-云闪付")
    private Double offlineMerUnionpayRate;
    @ApiModelProperty("状态 0未开始 1一开始 2已结束")
    private Integer status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Integer deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityShopRecordQuery.java
New file
@@ -0,0 +1,59 @@
package com.nuvole.four.domain.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”ä¸ŠæŠ¥å•†æˆ·æŸ¥è¯¢å‚æ•°
 * @Author dqh
 * @Date 2024-04-13 21:39:14
 */
@ApiModel("活动补贴—上报商户查询参数")
@Data
public class ActivityShopRecordQuery  {
    @ApiModelProperty("活动id")
    private Long activityId;
    @ApiModelProperty("商户id")
    private Long merchantShopId;
    @ApiModelProperty("渠道id")
    private Long channelId;
    @ApiModelProperty("渠道名称")
    private String channelName;
    @ApiModelProperty("活动额度,金额按分")
    private Long totalFee;
    @ApiModelProperty("第三方商户号")
    private String thirdShopNo;
    @ApiModelProperty("已使活动额度,金额按分")
    private Long useFee;
    @ApiModelProperty("剩余活动额度,金额按分")
    private Long surplusFee;
    @ApiModelProperty("状态 0未开始 1一开始 2已结束")
    private Integer status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Integer deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/SpecialFeeRateQuery.java
New file
@@ -0,0 +1,83 @@
package com.nuvole.four.domain.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è¡Œä¸šç®¡ç†æŸ¥è¯¢å‚æ•°
 * @Author dqh
 * @Date 2024-04-13 10:45:05
 */
@ApiModel("行业管理查询参数")
@Data
public class SpecialFeeRateQuery  {
    @ApiModelProperty("渠道id")
    private Long channelId;
    @ApiModelProperty("行业管理表id")
    private Long industryManageId;
    @ApiModelProperty("渠道行业code")
    private String industryCode;
    @ApiModelProperty("线上协议费率-微信")
    private Double onlineAgreeWxRate;
    @ApiModelProperty("线上协议费率-支付宝")
    private Double onlineAgreeZfbRate;
    @ApiModelProperty("线上协议费率-云闪付")
    private Double onlineAgreeUnionpayRate;
    @ApiModelProperty("线下协议费率-微信")
    private Double offlineAgreeWxRate;
    @ApiModelProperty("线下协议费率-支付宝")
    private Double offlineAgreeZfbRate;
    @ApiModelProperty("线下协议费率-云闪付")
    private Double offlineAgreeUnionpayRate;
    @ApiModelProperty("线上商户费率-微信")
    private Double onlineMerWxRate;
    @ApiModelProperty("线上商户费率-支付宝")
    private Double onlineMerZfbRate;
    @ApiModelProperty("线上商户费率-云闪付")
    private Double onlineMerUnionpayRate;
    @ApiModelProperty("线下商户费率-微信")
    private Double offlineMerWxRate;
    @ApiModelProperty("线下商户费率-支付宝")
    private Double offlineMerZfbRate;
    @ApiModelProperty("线下商户费率-云闪付")
    private Double offlineMerUnionpayRate;
    @ApiModelProperty("渠道行业名称")
    private String industryName;
    @ApiModelProperty("状态 0禁止 1启用")
    private Short status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Short deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/StoreIndustryManageQuery.java
New file
@@ -0,0 +1,53 @@
package com.nuvole.four.domain.query;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @Description è¡Œä¸šç®¡ç†æŸ¥è¯¢å‚æ•°
 * @Author dqh
 * @Date 2024-04-13 10:40:45
 */
@ApiModel("行业管理查询参数")
@Data
public class StoreIndustryManageQuery  {
    @ApiModelProperty("最上级为0")
    private Long pId;
    @ApiModelProperty("行业名称")
    private String industryName;
    @ApiModelProperty("编号")
    private String industryCode;
    @ApiModelProperty("序号")
    private Integer sortNo;
    @ApiModelProperty("0.否 1.是")
    private Short isSpecial;
    @ApiModelProperty("层级")
    private Integer level;
    @ApiModelProperty("状态 0禁止 1启用")
    private Short status;
    @ApiModelProperty("删除状态 0未删除 1已删除")
    private Short deleted;
    @ApiModelProperty("创建人")
    private Long createBy;
    @ApiModelProperty("创建时间")
    private Date createTime;
    @ApiModelProperty("更新人")
    private Long updateBy;
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/exception/Exceptionhandler.java
New file
@@ -0,0 +1,55 @@
package com.nuvole.four.exception;
import cn.hutool.core.util.StrUtil;
import com.nuvole.common.domain.emnu.CommonResultEmnu;
import com.nuvole.common.domain.result.CommonResult;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import java.io.PrintWriter;
import java.io.StringWriter;
/**
 * ç±»æè¿°: å…¨å±€å¼‚常类
 *
 * @author dqh
 * @date  2024-04-09 19:25
 * @version 1.0
 **/
@ControllerAdvice
@Slf4j
public class Exceptionhandler {
    @ExceptionHandler(value = IllegalArgumentException.class)
    @ResponseBody
    private CommonResult IllegalArgumentException(HttpServletRequest req, IllegalArgumentException e) {
        log.error(getExceptionStackMsg(e));
        if(StrUtil.isNotBlank(e.getMessage())){
            return new CommonResult(CommonResultEmnu.INVALID_PARAMS, e.getMessage());
        }else {
            return new CommonResult(CommonResultEmnu.INVALID_PARAMS, "不合法的参数");
        }
    }
    @ExceptionHandler(value = Exception.class)
    @ResponseBody
    private CommonResult Exception(HttpServletRequest req, HttpServletResponse resp, Exception e) {
        //if (!(req.getHeader("accept").contains("application/json")//非异步请求
        //|| (req.getHeader("X-Requested-With") != null && req.getHeader("X-Requested-With").contains("XMLHttpRequest")))) {
        //}
        log.error(getExceptionStackMsg(e));
        return new CommonResult(CommonResultEmnu.SERVER_ERR, "服务异常");
    }
    public static String getExceptionStackMsg(Exception e) {
        StringWriter sw = new StringWriter();
        e.printStackTrace(new PrintWriter(sw, true));
        String strs = sw.toString();
        return strs;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityDistributeRecordMapper.java
New file
@@ -0,0 +1,78 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.ActivityDistributeRecord;
import com.nuvole.four.domain.dto.ActivityDistributeBudgetDto;
import com.nuvole.four.domain.query.ActivityDistributeRecordQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
 * @Description æ´»åŠ¨é¢„ç®—åˆ†é…Mapper
 * @Author dqh
 * @Date 2024-04-13 21:36:24
 */
@Mapper
public interface ActivityDistributeRecordMapper {
    int deleteByPrimaryKey(Long id);
    int insert(ActivityDistributeRecord record);
    int insertSelective(ActivityDistributeRecord record);
    ActivityDistributeRecord selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(ActivityDistributeRecord record);
    /**
     * æ ¹æ®activityId修改状态
     */
    @Update("update activity_distribute_record set status = #{status} where activity_id = #{activityId}")
    int updateByActivityId(ActivityDistributeRecord record);
    int updateByPrimaryKey(ActivityDistributeRecord record);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<ActivityDistributeRecord> selectList(ActivityDistributeRecordQuery query);
    /**
     * æ–¹æ³•描述: åˆ†é…é¢„算查询
     * æŸ¥è¯¢orgId的下级分配记录
     *
     * @date  2024-04-14 13:26
     **/
    List<ActivityDistributeBudgetDto> getActivityDistributeRecordDetail(@Param("orgId") Long orgId, @Param("activityId") Long activityId);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¯¦æƒ…-活动预算分配列表
     *
     * @date  2024-04-15 13:35
     **/
    List<ActivityDistributeBudgetDto> getActivityDistributeRecordDetailByAId(@Param("activityId") Long activityId,@Param("orgCode") String orgCode);
    /**
     * æ–¹æ³•描述:分配预算保存
     * æœ‰id则进行更新;无则新增
     *
     * @date  2024-04-14 13:41
     **/
    Integer batchInsertOrUpdate(List<ActivityDistributeRecord> recordList);
    @Select("select * from activity_distribute_record where deleted = 0 and activity_id = #{activityId} and org_id = #{orgId}")
    ActivityDistributeRecord getFeeByCondition(@Param("activityId") Long activityId,@Param("orgId") Long orgId);
    /**
     * æ–¹æ³•描述:
     *
     * @date  2024-04-20 17:26
     **/
    List<ActivityDistributeRecord> selectAllByActivityIds(@Param("ids") List<Long> ids);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityFeeMapper.java
New file
@@ -0,0 +1,61 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.ActivityFee;
import com.nuvole.four.domain.dto.ActivityDistributeBudgetDto;
import com.nuvole.four.domain.query.ActivityFeeQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
 * @Description è´¹çŽ‡è¡¥è´´æ´»åŠ¨Mapper
 * @Author dqh
 * @Date 2024-04-13 21:33:08
 */
@Mapper
public interface ActivityFeeMapper {
    int deleteByPrimaryKey(Long id);
    int insert(ActivityFee record);
    int insertSelective(ActivityFee record);
    ActivityFee selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(ActivityFee record);
    int updateByPrimaryKey(ActivityFee record);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<ActivityFee> selectList(ActivityFeeQuery query);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¡¨çš„é¢åº¦
     *
     * @date  2024-04-14 15:25
     **/
    List<ActivityDistributeBudgetDto> getActivityFeeDetail(Long orgId);
    /**
     * æ–¹æ³•描述: æ ¹æ®æ´»åЍid,orgId查询活动
     *
     * @date  2024-04-17 10:15
     **/
    @Select("select * from activity_fee where id = #{activityId} and org_id = #{orgId}")
    ActivityFee getActivityFeeByIdAndOrgId(@Param("activityId") Long activityId,@Param("orgId") Long orgId);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨åˆ—è¡¨ï¼ˆåŒ…å«å·²åˆ†é…çš„ï¼‰
     * æ ¹æ®orgId进行权限列表控制
     *
     * @date  2024-04-22 10:57
     **/
    List<ActivityFee> selectActivityWithDistribute(ActivityFeeQuery query);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityShopRecordMapper.java
New file
@@ -0,0 +1,91 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.ActivityShopRecord;
import com.nuvole.four.domain.dto.ActivityShopRecordDto;
import com.nuvole.four.domain.params.ActivityShopRecordParam;
import com.nuvole.four.domain.query.ActivityShopRecordQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.List;
import java.util.Map;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”ä¸ŠæŠ¥å•†æˆ·Mapper
 * @Author dqh
 * @Date 2024-04-13 21:39:14
 */
@Mapper
public interface ActivityShopRecordMapper {
    int deleteByPrimaryKey(Long id);
    int insert(ActivityShopRecord record);
    int insertSelective(ActivityShopRecord record);
    ActivityShopRecord selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(ActivityShopRecord record);
    /**
     * æ ¹æ®activityId修改状态
     */
    @Update("update activity_shop_record set status = #{status} where activity_id = #{activityId}")
    int updateByActivityId(ActivityShopRecord record);
    int updateByPrimaryKey(ActivityShopRecord record);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<ActivityShopRecord> selectList(ActivityShopRecordQuery query);
    /**
     * åŠŸèƒ½æè¿°  æ ¹æ®åº—铺id,支付通道 æŸ¥è¯¢æ´»åŠ¨è´¹çŽ‡
     * @param shopId
     * @param channelId
     **/
    Map getActRateByShopId(@Param("shopId") Long shopId, @Param("channelId") Long channelId);
    /**
     * åŠŸèƒ½æè¿° å½“商户使用额度时,更新剩余额度、已使用额度
     *
     * @param activityId     è´¹çŽ‡æ´»åŠ¨id
     * @param merchantShopId å•†æˆ·id
     * @param useFee         æœ¬æ¬¡ä½¿ç”¨é¢åº¦
     **/
    int updShopSurplusFee(@Param("activityId") Long activityId, @Param("merchantShopId") Long merchantShopId,
                          @Param("channelId") Long channelId, @Param("useFee") Integer useFee);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢å·²ä¸ŠæŠ¥å•†æˆ·åˆ—表
     *
     * @date  2024-04-14 21:41
     **/
    List<ActivityShopRecordDto> getAlreadyMerchantList(ActivityShopRecordParam param);
    /**
     * æ–¹æ³•描述: æ‰¹é‡æ·»åŠ ä¸ŠæŠ¥
     *
     * @date  2024-04-15 9:56
     **/
    Integer batchInsert(List<ActivityShopRecord> recordList);
    /**
     * æ–¹æ³•描述:根据shopIds查询所有记录
     *
     * @date  2024-04-15 11:24
     **/
    List<ActivityShopRecord> selectByCondition(@Param("ids") String[] ids,@Param("activityId") Long activityId);
    /**
     * æ–¹æ³•描述: æ‰¹é‡ç¼–辑分配上报额度
     *
     * @date  2024-04-15 15:46
     **/
    Integer batchUpdate(List<ActivityShopRecord> shopRecordList);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelInfoMapper.java
New file
@@ -0,0 +1,41 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.ChannelInfo;
import com.nuvole.four.domain.dto.ChannelInfoDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface ChannelInfoMapper {
    int deleteByPrimaryKey(Long id);
    int insert(ChannelInfo record);
    int insertSelective(ChannelInfo record);
    ChannelInfo selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(ChannelInfo record);
    int updateByPrimaryKey(ChannelInfo record);
    List<ChannelInfo> selectAll(ChannelInfo record);
    /**
     * æ–¹æ³•描述:校验通道code是否存在
     *
     * @date  2024-04-13 14:06
     **/
    @Select("select * from channel_info where channel_code = #{channelCode} ")
    ChannelInfo checkChannelCode(@Param("channelCode") String channelCode);
    /**
     * æ–¹æ³•描述: åˆ†é¡µæŸ¥è¯¢é€šé“列表
     *
     * @date  2024-04-13 16:21
     **/
    List<ChannelInfoDto> getPageList(ChannelInfo channelInfo);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelOrgConfigMapper.java
New file
@@ -0,0 +1,74 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.ChannelOrgConfig;
import com.nuvole.four.domain.dto.ChannelOrgConfigDto;
import com.nuvole.four.domain.dto.ConfigOrgDetailChannel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface ChannelOrgConfigMapper {
    int deleteByPrimaryKey(Long id);
    int insert(ChannelOrgConfig record);
    int insertSelective(ChannelOrgConfig record);
    ChannelOrgConfig selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(ChannelOrgConfig record);
    int updateByPrimaryKey(ChannelOrgConfig record);
    /**
     * æŸ¥è¯¢æœºæž„通道配置列表
     * ä»…包含当前orgId的下级,不包含(二三四级等)
     *
     * @param orgId é€‰æ‹©çš„æœºæž„ID
     * @param orgName   æŸ¥è¯¢æ¡ä»¶æœºæž„名称
     */
    List<ChannelOrgConfigDto> selectAllList(@Param("orgId")Long orgId, @Param("orgName") String orgName);
    /**
     * é€šè¿‡æ¡ä»¶æŸ¥è¯¢æ•°æ®
     *
     * @param orgId é€‰æ‹©çš„æœºæž„ID
     * @param channelId é€‰æ‹©çš„通道ID
     */
    @Select({"select * from channel_org_config where org_id = #{orgId} and channel_info_id = #{channelId} "})
    ChannelOrgConfig selectByOrgIdAndChannelId(@Param("orgId") Long orgId,@Param("channelId") Long channelId);
    /**
     * é€šè¿‡orgId查询 é»˜è®¤çš„通道配置
     * åŒä¸€orgId对应的默认通道仅有一条
     */
    @Select({"select * from channel_org_config where default_or_not = 1 and org_id = #{orgId} "})
    ChannelOrgConfig queryDefaultChannelByOrgId(@Param("orgId") Long orgId);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢ChannelOrgConfig表的所有数据
     *
     * @date  2024-04-11 20:42
     **/
    List<ChannelOrgConfig> selectAll(ChannelOrgConfig config);
    /**
     * æ–¹æ³•描述: æ ¹æ®orgId、orgPId查询所有有效的机构通道配置数据
     *
     * @date  2024-04-12 9:53
     **/
    @Select("(select a.org_id orgId,a.channel_info_id channelInfoId,a.`status`,a.default_or_not defaultOrNot,b.channel_name channelName,b.channel_code channelCode from channel_org_config a left join channel_info b on a.channel_info_id = b.id where a.org_id = #{pId} and a.`status` = 1 and b.`status` = 0) " +
            " union " +
            "(select a.org_id orgId,a.channel_info_id channelInfoId,a.`status`,a.default_or_not defaultOrNot,b.channel_name channelName,b.channel_code channelCode from channel_org_config a left join channel_info b on a.channel_info_id = b.id where a.org_id = #{orgId} and a.`status` = 1 and b.`status` = 0) ")
    List<ConfigOrgDetailChannel> selectValidByCondition(@Param("orgId") Long orgId,@Param("pId") Long pId);
    /**
     * æ–¹æ³•描述:查询机构层级 =省市 æŸ¥è¯¢å±•示的所有通道。
     *
     * @date  2024-04-12 10:20
     **/
    @Select("select ci.id,ci.channel_name,ci.channel_code channelCode,ci.id channelInfoId,IFNULL(coc.status,0) status,IFNULL(coc.default_or_not,0) defaultOrNot from channel_info ci LEFT JOIN channel_org_config coc on ci.id = coc.channel_info_id and coc.org_id = #{orgId} where ci.`status` = 0 GROUP BY ci.id")
    List<ConfigOrgDetailChannel> selectAllAndChannelInfo(@Param("orgId") Long orgId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SpecialFeeRateMapper.java
New file
@@ -0,0 +1,50 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.SpecialFeeRate;
import com.nuvole.four.domain.dto.SpecialFeeRateDto;
import com.nuvole.four.domain.query.SpecialFeeRateQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @Description è¡Œä¸šç®¡ç†-特殊行业费率Mapper
 * @Author dqh
 * @Date 2024-04-12 19:57:28
 */
@Mapper
public interface SpecialFeeRateMapper {
    int deleteByPrimaryKey(Long id);
    int insert(SpecialFeeRate record);
    int insertSelective(SpecialFeeRate record);
    SpecialFeeRate selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(SpecialFeeRate record);
    int updateByPrimaryKey(SpecialFeeRate record);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<SpecialFeeRate> selectList(SpecialFeeRateQuery query);
    /**
     * æ–¹æ³•描述:根据行业ID æŸ¥è¯¢ç‰¹æ®Šè´¹çŽ‡é…ç½®
     *
     **/
    List<SpecialFeeRate> selectByIndustryId(@Param("industryId") Long industryId, @Param("channelId") Long channelId);
    /**
     * æ–¹æ³•描述:批量处理
     * id为空则新增;有值则修改
     **/
    int batchInsert(List<SpecialFeeRate> list);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/StoreIndustryManageMapper.java
New file
@@ -0,0 +1,75 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.StoreIndustryManage;
import com.nuvole.four.domain.query.StoreIndustryManageQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
 * @Description è¡Œä¸šç®¡ç†Mapper
 * @Author dqh
 * @Date 2024-04-12 17:41:29
 */
@Mapper
public interface StoreIndustryManageMapper {
    int deleteByPrimaryKey(Long id);
    int insert(StoreIndustryManage record);
    int insertSelective(StoreIndustryManage record);
    StoreIndustryManage selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(StoreIndustryManage record);
    int updateByPrimaryKey(StoreIndustryManage record);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<StoreIndustryManage> selectList(StoreIndustryManageQuery query);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢max(sortNo)的序号信息
     * è¿”回 = max(sortNo) + 10
     *
     * @date  2024-04-12 18:17
     **/
    @Select("select (max(sort_no) + 10) sortNo from store_industry_manage")
    Integer getSort();
    /**
     * æ–¹æ³•描述:根据ID查询对应层级level;并自动+1得出下级level
     *
     * @date  2024-04-12 18:40
     **/
    @Select("select (`level` + 1) from store_industry_manage where id = #{id} ")
    Integer getLevel(Long id);
    /**
     * æ–¹æ³•描述:查询列表默认方法
     **/
    List<StoreIndustryManage> selectAll(Map map);
    /**
     * æ–¹æ³•描述:查询当前节点是否包含子节点
     *
     **/
    @Select("select count(1) from store_industry_manage where p_id = #{id} and deleted=0")
    int selectByPid(Long id);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢åŒçº§æœ€å¤§çš„code
     *
     * @date  2024-04-13 21:51
     **/
    @Select("select max(industry_code) from store_industry_manage where p_id = #{pid} and industry_code = #{industryCode}")
    String getMaxCode(@Param("pid") Long pid, @Param("industryCode") String industryCode);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysOrgMapper.java
New file
@@ -0,0 +1,186 @@
package com.nuvole.four.mapper;
import com.nuvole.four.domain.SysOrg;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import java.util.List;
import java.util.Map;
public interface SysOrgMapper {
    int deleteByPrimaryKey(Long id);
    int insert(SysOrg record);
    int insertSelective(SysOrg record);
    SysOrg selectByPrimaryKey(Long id);
    int updateByPrimaryKeySelective(SysOrg record);
    int updateByPrimaryKey(SysOrg record);
    /**
     * @Author : liu.q [916000612@qq.com]
     * @Date : 2019-04-04 14:15
     * @Description :查询全部
     */
    List<SysOrg> selectAll(Map map);
    /**
     * @Author : liu.q [916000612@qq.com]
     * @Date : 2019-04-07 19:21
     * @Description :查询全部
     */
    List<Map> selectAllOfMap(Map map);
    /**
     * æ ¹æ®æœºæž„编号查询机构信息
     *
     * @author zxc
     * @Date 2019/6/4 11:35
     **/
    SysOrg getOrgByCode(String code);
    @Select("select org.*,org2.org_Code pOrgCode from sys_org org left join sys_org org2 on org.pid = org2.id where org.org_code=#{code}")
    Map getOrgByCode2(String code);
    List<Map> getBranchByOrgCode(@Param("code") String code, @Param("keyText") String keyText, @Param("userType") Short userType);
    /**
     * æŸ¥è¯¢æœºæž„byCode
     *
     * @Author: lc
     * @Date: 2019/6/12 16:20
     */
    SysOrg selectOrgByCode(String code);
    /**
     * æ‰¹é‡æ‰§è¡Œå¯¼å…¥
     *
     * @author zxc
     * @Date 2019/6/11 18:59
     **/
    int batchImportOrg(List<Map> list);
    /**
     * æŸ¥è¯¢å…¨éƒ¨æœºæž„
     *
     * @Author: lc
     * @Date: 2019/6/13 9:39
     */
    @Select("select * from sys_org ")
    List<SysOrg> getOrgList();
    /**
     * æŸ¥è¯¢çˆ¶æœºæž„useCode ä»¥åŠ å­æœºæž„maxCode
     *
     * @author zxc
     * @Date 2019/7/13 18:49
     **/
    @Select("select max(a.org_code) maxCode,a.pid,(select b.org_code from sys_org b where b.id = a.pid) pCode from sys_org a group by a.pid")
    List<Map> selectUseCodeForImport();
    /**
     * æŸ¥è¯¢æœ¬çº§æœ€å¤§code
     *
     * @Author: lc
     * @Date: 2019/6/13 13:40
     */
    @Select("select max(org_code) from sys_org where pid=#{pid} ")
    String getMaxCode(@Param("pid") Long pid);
    /**
     * æ ¹æ®æœºæž„编号获取机构
     *
     * @param orgCode
     * @return
     */
    @Select("select * from sys_org where user_org_code = #{orgCode}")
    SysOrg selectByOrgCode(@Param("orgCode") String orgCode);
    /**
     * è§’色管理人员配置机构树
     *
     * @author zxc
     * @Date 2019/6/13 17:19
     **/
    List<SysOrg> getListForRoleUser(Map map);
    /**
     * Createed by PKZ
     * Date 2019/6/17 16:11
     * Description:根据userOrgCode查询机构信息
     **/
    @Select("select a.org_code zj_org_code,a.id zj_id,a.name zj_name,b.id xq_id,b.name xq_name,c.id sj_id,c.name sj_name from sys_org a,sys_org b,sys_org c where a.user_org_code = #{orgCode} and b.id=a.pid and c.id=b.pid")
    Map getOrgByUserCode(@Param("orgCode") String code);
    List<SysOrg> getOrgForSelector(@Param("pid") Long pid, @Param("rootId") Long rootId);
    @Select("select pid from sys_org where id = #{id}")
    Long queryPidById(@Param("id") Long id);
    @Select("select lv from sys_org where id = #{id}")
    Integer queryLvById(@Param("id") Long id);
    Integer getByOrgCode(SysOrg sysOrg);
    @Select("select id,name,org_code,user_org_code,pid from sys_org where state=1 and lv<2")
    List<SysOrg> getOrgEndS();
    @Select("select id, name from sys_org where pid = #{orgId}")
    List<SysOrg> getOrgMapByLogin(Long orgId);
    @Select("select id, name from sys_org where id = #{orgId} and lv = 3")
    List<SysOrg> getOrgMapByLoginLv(Long orgId);
    @Select("select lv from sys_org where org_code = #{orgCode}")
    Integer getOrgLvByOrgCode(String orgCode);
    /**
     * æŸ¥è¯¢æ‰€æœ‰æ”¯å±€
     */
    @Select("select id, name from sys_org where  lv = 3")
    List<SysOrg> getWdIdOrName();
    /**
     * æŸ¥è¯¢æ‰€æœ‰æ”¯å±€
     */
    @Select("select * from sys_org where  lv = 0 limit 1")
    SysOrg getSjOrgInfo();
    @Select("select * from sys_org where pid=(select id from sys_org where org_code = #{orgCode} ) or org_code = #{orgCode}")
    List<SysOrg> selectOrgByOrgCode(String orgCode);
    @Select("select name as orgName ,org_code as orgCode from sys_org group by org_code ")
    List<Map> getOrgCodeCache();
    @Select("select a.name,c.org_code orgCode from sys_area a left join sys_org_area b on b.area_id = a.id left join sys_org c on c.id = b.org_id where a.lv = 2")
    List<Map> getSjOrgCodeAreaNameRef();
    /**
     * ç¦ç”¨æœºæž„
     *
     * @param orgCode
     * @return CONCAT(' % ', # { 0 }, ' % ')
     */
    @Update("update sys_org set state=#{state} where org_code like CONCAT('%',#{orgCode},'%')")
    int updateState(@Param("orgCode") String orgCode, @Param("state") Integer state);
    /**
     * æ–¹æ³•描述: æ ¹æ®orgId查询机构名称、父级机构名称
     *
     * @date  2024-04-11 20:30
     **/
    @Select("select a.id,a.name orgName,a.pid pId,a.lv,(select b.name from sys_org b where b.id = a.pid) parentOrgName from sys_org a where a.id = #{orgId}")
    ChannelOrgConfigDetailDto queryNameAndParentName(@Param("orgId") Long orgId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysUserMapper.java
New file
@@ -0,0 +1,18 @@
package com.nuvole.four.mapper;
import com.nuvole.base.domain.SysUser;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.Map;
/**
 * @Desc: ç³»ç»Ÿç”¨æˆ·æŸ¥è¯¢mapper
 * @Author: dqh
 * @Date: 2024-04-15
 **/
public interface SysUserMapper {
    @Select("select * from sys_user where id = #{id}")
    SysUser getUserById(@Param("id") Long id);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityDistributeRecordService.java
New file
@@ -0,0 +1,47 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.ActivityDistributeRecord;
import com.nuvole.four.domain.ActivityFee;
import com.nuvole.four.domain.dto.ActivityDistributeBudgetDto;
import com.nuvole.four.domain.query.ActivityDistributeRecordQuery;
import java.util.List;
/**
 * @Description æ´»åŠ¨é¢„ç®—åˆ†é…Service
 * @Author dqh
 * @Date 2024-04-13 21:36:24
 */
public interface ActivityDistributeRecordService{
    int addSelective(ActivityDistributeRecord entity);
    int editSelective(ActivityDistributeRecord entity);
    ActivityDistributeRecord get(Long  id);
    int del(Long  id);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<ActivityDistributeRecord> getList(ActivityDistributeRecordQuery query);
    /**
     * æ–¹æ³•描述: åˆ†é…é¢„算查询
     * é»˜è®¤ä»…查询当前登录人的机构下级。不包含下下级
     * @date  2024-04-14 10:51
     **/
    List<ActivityDistributeBudgetDto> getActivityDistributeRecordDetail(Long id);
    /**
     * æ–¹æ³•描述:分配预算保存
     * æœ‰id则进行更新;无则新增
     *
     * @date  2024-04-14 13:41
     **/
    Integer batchInsertOrUpdate(List<ActivityDistributeRecord> recordList);
    ActivityDistributeRecord getFeeByCondition(Long activityId,Long orgId);
    ActivityFee getActivityFeeByIdAndOrgId(Long activityId,Long orgId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityFeeService.java
New file
@@ -0,0 +1,39 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.ActivityFee;
import com.nuvole.four.domain.dto.ActivityFeeDetailDto;
import com.nuvole.four.domain.query.ActivityFeeQuery;
import java.util.List;
/**
 * @Description è´¹çŽ‡è¡¥è´´æ´»åŠ¨Service
 * @Author dqh
 * @Date 2024-04-13 21:33:08
 */
public interface ActivityFeeService {
    int addSelective(ActivityFee entity);
    int editSelective(ActivityFee entity);
    ActivityFee get(Long  id);
    int del(Long  id);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<ActivityFee> getList(ActivityFeeQuery query);
    /**
     * æ–¹æ³•描述: å¼€å§‹/停止
     * åŒæ­¥åœæ­¢æ´»åŠ¨è¡¨ã€å•†æˆ·æ´»åŠ¨è¡¨ã€æœºæž„é¢„ç®—åˆ†é…è¡¨
     **/
    int startOrStop(Long id, Integer status);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¯¦æƒ…-活动数据
     **/
    ActivityFeeDetailDto getActivityFeeDetail(Long id);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityShopRecordService.java
New file
@@ -0,0 +1,70 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.ActivityShopRecord;
import com.nuvole.four.domain.dto.ActivityShopRecordDto;
import com.nuvole.four.domain.params.ActivityShopRecordParam;
import com.nuvole.four.domain.query.ActivityShopRecordQuery;
import java.util.List;
import java.util.Map;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”ä¸ŠæŠ¥å•†æˆ·Service
 * @Author dqh
 * @Date 2024-04-13 21:39:14
 */
public interface ActivityShopRecordService {
    int addSelective(ActivityShopRecord entity);
    int editSelective(ActivityShopRecord entity);
    ActivityShopRecord get(Long id);
    int del(Long id);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<ActivityShopRecord> getList(ActivityShopRecordQuery query);
    /**
     * åŠŸèƒ½æè¿° æ ¹æ®åº—铺id,支付通道 æŸ¥è¯¢æ´»åŠ¨è´¹çŽ‡
     *
     * @param
     **/
    Map getActRateByShopIdAndChannelId(Long shopId, Long channelId);
    /**
     * åŠŸèƒ½æè¿° å½“商户使用额度时,更新剩余额度、已使用额度
     *
     * @param activityId     è´¹çŽ‡æ´»åŠ¨id
     * @param merchantShopId å•†æˆ·id
     * @param useFee         æœ¬æ¬¡ä½¿ç”¨é¢åº¦
     **/
    int updShopSurplusFee(Long activityId, Long merchantShopId, Long channelId, Integer useFee);
    /**
     * æ–¹æ³•描述:已上报商户列表
     *
     * @date  2024-04-14 20:37
     **/
    List<ActivityShopRecordDto> getAlreadyMerchantList(ActivityShopRecordParam param);
    /**
     * æ–¹æ³•描述:批量添加上报
     *
     * @date  2024-04-15 9:45
     **/
    Integer batchInsert(List<ActivityShopRecord> recordList);
    /**
     * æ–¹æ³•描述:根据shopIds查询所有记录
     *
     * @date  2024-04-15 11:23
     **/
    List<ActivityShopRecord> selectByCondition(String[] idsArr,Long activityId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/BaseService.java
New file
@@ -0,0 +1,44 @@
package com.nuvole.four.service;
import java.util.List;
import java.util.Map;
// @formatter:off
/**
 *                .-~~~~~~~~~-._       _.-~~~~~~~~~-.
 *            __.'  @Author     ~.   .~    ä»£ç æ— Bug   `.__
 *          .'//     liu.q        \./       (秘籍)      \\`.
 *        .'// [916000612@qq.com]  |   æ¬²ç»ƒç¥žåŠŸ   å¼•刀自宫  \\`.
 *      .'// .-~"""""""~~~~-._     |    _,-~~~~"""""""~-.  \\`.
 *    .'//.-"  2019-04-04     `-.  |  .-'     13:59       "-.\\`.
 *  .'//______.============-..   \ | /   ..-============.______\\`.
 *.'______________________________\|/______________________________`.
 *
 * @Description :
 */
// @formatter:on
public interface BaseService<T> {
    //    æŸ¥è¯¢åˆ—表
    List<T> getList(Map map);
    List<T> getList(T t);
    List<Map> getListOfMap(Map map);
    List<Map> getListOfMap(T t);
    //    ä¿å­˜
    Integer save(T t);
    //    ä¿®æ”¹
    Integer update(T t);
    //    åˆ é™¤
    Integer del(Long id);
    //    æ ¹æ®ä¸»é”®id查询
    T getById(Long id);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelInfoService.java
New file
@@ -0,0 +1,36 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.ChannelInfo;
import com.nuvole.four.domain.dto.ChannelInfoDto;
import java.util.List;
/**
 * @Desc: é€šé“信息Service
 * @Author: dqh
 * @Date: 2024-04-09
 **/
public interface ChannelInfoService extends BaseService<ChannelInfo>{
    Integer saveChannelInfo(ChannelInfo channelInfo);
    Integer updateChannelInfo(ChannelInfo channelInfo);
    ChannelInfo getChannelInfo(Long id);
    /**
     * åŠŸèƒ½æè¿° æ ¹æ®code查询通道
     * @param channelCode
     com.nuvole.four.domain.ChannelInfo
     **/
    ChannelInfo getDetailByCode(String channelCode);
    /**
     * æ–¹æ³•描述: åˆ†é¡µæŸ¥è¯¢é€šé“列表
     *
     * @date  2024-04-13 16:20
     **/
    List<ChannelInfoDto> getPageList(ChannelInfo channelInfo);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelOrgConfigService.java
New file
@@ -0,0 +1,35 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.ChannelOrgConfig;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import com.nuvole.four.domain.dto.ChannelOrgConfigDto;
import com.nuvole.four.domain.params.ChannelOrgConfigParam;
import java.util.List;
/**
 * @Desc: æœºæž„通道配置Service
 * @Author: dqh
 * @Date: 2024-04-10
 **/
public interface ChannelOrgConfigService extends BaseService<ChannelOrgConfig>{
    ChannelOrgConfig get(Long id);
    Integer configChannel(ChannelOrgConfigParam configParam);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„通道配置列表
     *
     * @date  2024-04-11 14:57
     **/
    List<ChannelOrgConfigDto> queryAllChannelOrg(Long orgId,String orgName);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„通道详情
     * è¯¦æƒ…中的通道 ä»…包含当前orgId对应的pId对应的通道
     * @date  2024-04-11 20:04
     **/
    ChannelOrgConfigDetailDto getChannelOrgConfigDetail(Long orgId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java
New file
@@ -0,0 +1,268 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.extend.AppDTO;
import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.*;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;
/**
 * Coding makes me happy.
 * ã€€â”â”“   ┏┓
 * â”â”›â”»â”â”â”â”›â”»â”“
 * â”ƒã€€ã€€â˜†â˜†â˜†ã€€ã€€â”ƒ
 * â”ƒã€€ã€€ã€€â”ã€€ã€€ã€€â”ƒ
 * â”ƒã€€â”³â”›ã€€â”—┳ ┃
 * â”ƒã€€ã€€ã€€ã€€ã€€ã€€ã€€â”ƒ
 * â”ƒã€€ã€€ã€€â”»ã€€ã€€ã€€â”ƒ
 * â”—━┓ 史 ┏━┛
 * ã€€ã€€â”ƒã€€è¯— ┃神兽保佑
 * ã€€ã€€â”ƒã€€ä¹‹ã€€â”ƒä»£ç æ— BUG!
 * ã€€ã€€â”ƒã€€å® ã€€â”—━━━┓
 * ã€€ã€€â”ƒAuthor:   ┣┓
 * ã€€ã€€â”ƒã€€ã€€  liu.Q ┏┛
 * ã€€ã€€â”—┓┓┏━┳┓┏┛
 * ã€€ã€€ã€€â”ƒâ”«â”«ã€€â”ƒâ”«â”«
 * ã€€ã€€ã€€â”—┻┛ ┗┻┛
 * ----------------------
 *
 * @Date : ä¸Šåˆ11:18 2018/3/2
 * @Description :
 */
@Service
public class RedisService {
    @Autowired
    private RedisTemplate redisTemplate;
    /**
     * å†™å…¥ç¼“å­˜
     *
     * @param key
     * @param value
     * @return
     */
    public boolean set(final String key, Object value) {
        boolean result = false;
        try {
            ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
            AppDTO dto = new AppDTO();
            Map map = new HashMap();
            // todo xuekang
            // StringEscapeUtils.unescapeHtml4(key)
            map.put("key",StringEscapeUtils.unescapeHtml(key));
            map.put("value",value);
            dto.setMap(map);
            AppDTO s = new AppDTO();
            BeanUtils.copyProperties(dto,s);
            operations.set((String)s.getMap().get("key"), s.getMap().get("value"));
            result = true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
    /**
     * å†™å…¥ç¼“存设置时效时间
     *
     * @param key
     * @param value
     * @return
     */
    public boolean set(final String key, Object value, Long expireTime, TimeUnit timeUnit) {
        boolean result = false;
        try {
            ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
            AppDTO dto = new AppDTO();
            Map map = new HashMap();
            map.put("key",StringEscapeUtils.unescapeHtml(key));
            map.put("value",value);
            map.put("expireTime",expireTime);
            map.put("timeUnit",timeUnit);
            dto.setMap(map);
            AppDTO s = new AppDTO();
            BeanUtils.copyProperties(dto,s);
            operations.set((String)s.getMap().get("key"), s.getMap().get("value"));
//            operations.set(StringEscapeUtils.unescapeHtml4(key), value);
            redisTemplate.expire((String)s.getMap().get("key"), (Long)s.getMap().get("expireTime"), (TimeUnit) s.getMap().get("timeUnit"));
            result = true;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }
    /**
     * æ‰¹é‡åˆ é™¤å¯¹åº”çš„value
     *
     * @param keys
     */
    public void remove(final String... keys) {
        for (String key : keys) {
            remove(key);
        }
    }
    /**
     * æ‰¹é‡åˆ é™¤key
     *
     * @param pattern
     */
    public void removePattern(final String pattern) {
        Set<Serializable> keys = redisTemplate.keys(pattern);
        if (keys.size() > 0) {
            redisTemplate.delete(keys);
        }
    }
    /**
     * åˆ é™¤å¯¹åº”çš„value
     *
     * @param key
     */
    public void remove(final String key) {
        if (exists(key)) {
            redisTemplate.delete(StringEscapeUtils.unescapeHtml(key));
        }
    }
    /**
     * åˆ¤æ–­ç¼“存中是否有对应的value
     *
     * @param key
     * @return
     */
    public boolean exists(final String key) {
        AppDTO dto = new AppDTO();
        Map map = new HashMap();
        map.put("key",StringEscapeUtils.unescapeHtml(key));
        dto.setMap(map);
        AppDTO s = new AppDTO();
        BeanUtils.copyProperties(dto,s);
        return redisTemplate.hasKey((String)s.getMap().get("key"));
    }
    /**
     * è¯»å–缓存
     *
     * @param key
     * @return
     */
    public Object get(final String key) {
        Object result = null;
        ValueOperations<Serializable, Object> operations = redisTemplate.opsForValue();
        AppDTO dto = new AppDTO();
        Map map = new HashMap();
        map.put("key",StringEscapeUtils.unescapeHtml(key));
        dto.setMap(map);
        AppDTO s = new AppDTO();
        BeanUtils.copyProperties(dto,s);
        result = operations.get((String)s.getMap().get("key"));
        return result;
    }
    /**
     * å“ˆå¸Œ æ·»åŠ 
     *
     * @param key
     * @param hashKey
     * @param value
     */
    public void hmSet(String key, Object hashKey, Object value) {
        HashOperations<String, Object, Object> hash = redisTemplate.opsForHash();
        hash.put(key, hashKey, value);
    }
    /**
     * å“ˆå¸ŒèŽ·å–æ•°æ®
     *
     * @param key
     * @param hashKey
     * @return
     */
    public Object hmGet(String key, Object hashKey) {
        HashOperations<String, Object, Object> hash = redisTemplate.opsForHash();
        return hash.get(key, hashKey);
    }
    /**
     * åˆ—表添加
     *
     * @param k
     * @param v
     */
    public void lPush(String k, Object v) {
        ListOperations<String, Object> list = redisTemplate.opsForList();
        list.rightPush(k, v);
    }
    /**
     * åˆ—表获取
     *
     * @param k
     * @param l
     * @param l1
     * @return
     */
    public List<Object> lRange(String k, long l, long l1) {
        ListOperations<String, Object> list = redisTemplate.opsForList();
        return list.range(k, l, l1);
    }
    /**
     * é›†åˆæ·»åŠ 
     *
     * @param key
     * @param value
     */
    public void add(String key, Object value) {
        SetOperations<String, Object> set = redisTemplate.opsForSet();
        set.add(key, value);
    }
    /**
     * é›†åˆèŽ·å–
     *
     * @param key
     * @return
     */
    public Set<Object> setMembers(String key) {
        SetOperations<String, Object> set = redisTemplate.opsForSet();
        return set.members(key);
    }
    /**
     * æœ‰åºé›†åˆæ·»åŠ 
     *
     * @param key
     * @param value
     * @param scoure
     */
    public void zAdd(String key, Object value, double scoure) {
        ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
        zset.add(key, value, scoure);
    }
    /**
     * æœ‰åºé›†åˆèŽ·å–
     *
     * @param key
     * @param scoure
     * @param scoure1
     * @return
     */
    public Set<Object> rangeByScore(String key, double scoure, double scoure1) {
        ZSetOperations<String, Object> zset = redisTemplate.opsForZSet();
        return zset.rangeByScore(key, scoure, scoure1);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SpecialFeeRateService.java
New file
@@ -0,0 +1,35 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.SpecialFeeRate;
import com.nuvole.four.domain.dto.SpecialFeeRateDto;
import com.nuvole.four.domain.query.SpecialFeeRateQuery;
import java.util.List;
/**
 * @Description è¡Œä¸šç®¡ç†-特殊行业费率Service
 * @Author dqh
 * @Date 2024-04-12 19:57:28
 */
public interface SpecialFeeRateService{
    int addSelective(SpecialFeeRateDto entity);
    int editSelective(SpecialFeeRate entity);
    SpecialFeeRate get(Long id);
    int del(Long id);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<SpecialFeeRate> getList(SpecialFeeRateQuery query);
    /**
     * æ–¹æ³•描述:特殊费率配置查询
     *
     * @date  2024-04-13 13:19
     **/
    SpecialFeeRateDto getConfig(Long industryId,Long channelId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/StoreIndustryManageService.java
New file
@@ -0,0 +1,49 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.StoreIndustryManage;
import com.nuvole.four.domain.query.StoreIndustryManageQuery;
import java.util.List;
import java.util.Map;
/**
 * @Description è¡Œä¸šç®¡ç†Service
 * @Author dqh
 * @Date 2024-04-12 17:41:29
 */
public interface StoreIndustryManageService{
    int addSelective(StoreIndustryManage entity);
    int editSelective(StoreIndustryManage entity);
    StoreIndustryManage get(Long id);
    int del(Long  id);
    /**
     * æŸ¥è¯¢åˆ—表
     *
     * @param query
     * @return æŸ¥è¯¢ç»“æžœ
     */
    List<StoreIndustryManage> getList(StoreIndustryManageQuery query);
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢max(sortNo)的序号信息
     * è¿”回 = max(sortNo) + 10
     *
     * @date  2024-04-12 18:17
     **/
    Integer getSort();
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ‰€æœ‰è¡Œä¸šæ ‘
     *
     * @date  2024-04-12 18:47
     **/
    List<Map> getIndustryTree(Map map);
    /**
     * æ–¹æ³•描述:查询列表默认方法
     *
     * @date  2024-04-12 18:53
     **/
    List<StoreIndustryManage> getList(Map map);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SysOrgService.java
New file
@@ -0,0 +1,33 @@
package com.nuvole.four.service;
import com.nuvole.four.domain.SysOrg;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import java.util.List;
import java.util.Map;
/**
 * ç±»æè¿°: æœºæž„管理
 *
 * @author dqh
 * @date  2024-04-11 10:57
 * @version 1.0
 **/
public interface SysOrgService extends BaseService<SysOrg> {
    /**
     * æ–¹æ³•描述: èŽ·å–æœºæž„æ ‘
     *
     * @date  2024-04-11 10:57
     **/
    List<Map> getTreeOrg(Map map);
    /**
     * æ–¹æ³•描述: æ ¹æ®ç­›é€‰é¡¹èŽ·å–æœºæž„ä¿¡æ¯
     *
     * @date  2024-04-11 10:57
     **/
    List<SysOrg> selectListByPid(Long id, String name, String userOrgCode, Integer state);
    ChannelOrgConfigDetailDto queryNameAndParentName(Long orgId);
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityDistributeRecordServiceImpl.java
New file
@@ -0,0 +1,239 @@
package com.nuvole.four.service.impl;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.ActivityDistributeRecord;
import com.nuvole.four.domain.ActivityFee;
import com.nuvole.four.domain.SysOrg;
import com.nuvole.four.domain.dto.ActivityDistributeBudgetDto;
import com.nuvole.four.domain.query.ActivityDistributeRecordQuery;
import com.nuvole.four.mapper.ActivityDistributeRecordMapper;
import com.nuvole.four.mapper.ActivityFeeMapper;
import com.nuvole.four.mapper.SysOrgMapper;
import com.nuvole.four.service.ActivityDistributeRecordService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.IdGenerator;
import com.walker.infrastructure.utils.CollectionUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * @Description æ´»åŠ¨é¢„ç®—åˆ†é…Service实现类
 * @Author dqh
 * @Date 2024-04-13 21:36:24
 */
@Service
@RequiredArgsConstructor
public class ActivityDistributeRecordServiceImpl implements ActivityDistributeRecordService {
    private final ActivityDistributeRecordMapper activityDistributeRecordMapper;
    private final ActivityFeeMapper activityFeeMapper;
    private final SysOrgMapper sysOrgMapper;
    @Override
    public int addSelective(ActivityDistributeRecord entity){
        return activityDistributeRecordMapper.insertSelective(entity);
    }
    @Override
    public int editSelective(ActivityDistributeRecord entity){
        return activityDistributeRecordMapper.updateByPrimaryKeySelective(entity);
    }
     @Override
     public ActivityDistributeRecord get(Long  id){
        return activityDistributeRecordMapper.selectByPrimaryKey(id);
     }
    @Override
    public ActivityDistributeRecord getFeeByCondition(Long activityId,Long orgId){
         ActivityDistributeRecord record = activityDistributeRecordMapper.getFeeByCondition(activityId,orgId);
         if(record != null){
             return record;
         }
         return null;
    }
    @Override
    public ActivityFee getActivityFeeByIdAndOrgId(Long activityId,Long orgId){
        ActivityFee fee = activityFeeMapper.getActivityFeeByIdAndOrgId(activityId,orgId);
        return fee;
    }
     @Override
     public int del(Long  id){
        return activityDistributeRecordMapper.deleteByPrimaryKey(id);
     }
    @Override
    public List<ActivityDistributeRecord> getList(ActivityDistributeRecordQuery query) {
        return activityDistributeRecordMapper.selectList(query);
    }
    /**
     * æ–¹æ³•描述: åˆ†é…é¢„算查询
     * é»˜è®¤ä»…查询当前登录人的机构下级。不包含下下级
     * @date  2024-04-14 11:31
     **/
    @Override
    public List<ActivityDistributeBudgetDto> getActivityDistributeRecordDetail(Long activityId) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        Long orgId = user.getOrgId();
        if(!user.getLoginName().equalsIgnoreCase("super") && orgId == null){
            throw new IllegalArgumentException("当前登录人无权限分配");
        }
        SysOrg sysOrg = sysOrgMapper.selectByPrimaryKey(orgId);
        if(sysOrg != null && sysOrg.getLv() == null){
            throw new IllegalArgumentException("当前选择的机构层级为空");
        }
        List<ActivityDistributeBudgetDto> dtoList = new ArrayList<>();
        dtoList = activityDistributeRecordMapper.getActivityDistributeRecordDetail(orgId,activityId);
        return dtoList;
    }
    /**
     * æ–¹æ³•描述:分配预算保存
     * æœ‰id则进行更新;无则新增
     *
     * @date  2024-04-14 13:41
     **/
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer batchInsertOrUpdate(List<ActivityDistributeRecord> recordList) {
        if(CollectionUtils.isEmpty(recordList)){
            return 0;
        }
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        //校验额度分配
        checkBudget(recordList);
        recordList.forEach( r -> {
            if (r.getId() == null) {
                //新增自动生成id
                r.setId(IdGenerator.getId());
                r.setCreateBy(user.getId());
                r.setCreateTime(new Date());
                r.setTotalFee(r.getTotalFee());
                r.setUseFee(0L);
                r.setSurplusFee(r.getTotalFee());
                //默认状态均=0(未开始)
                r.setStatus(0);
                r.setDeleted(0);
                SysOrg sysOrg = sysOrgMapper.selectByPrimaryKey(r.getOrgId());
                r.setOrgCode(sysOrg.getOrgCode());
                generateOrgLv(r, user.getOrgLv());
            }else{
                //todo surplusFee最好是从表里重新查询,使用total_fee - useFee = surplusFee;以预防活动开始后追加预算场景。
                //校验活动是否=0(未开始);否则无法修改
                checkActivityStatus(r.getActivityId(),recordList.indexOf(r));
                r.setDeleted(0);
                r.setTotalFee(r.getTotalFee());
                r.setSurplusFee(r.getTotalFee());
                r.setUpdateBy(user.getId());
                r.setUpdateTime(new Date());
            }
        });
        activityDistributeRecordMapper.batchInsertOrUpdate(recordList);
        //inputTotalFeeSum = åˆ†é…çš„下级额度(useFee)之和
        Long inputTotalFeeSum = recordList.stream().mapToLong(ActivityDistributeRecord::getTotalFee).sum();
        updateParentFee(inputTotalFeeSum, user.getOrgId(), recordList.get(0).getActivityId());
        return 1;
    }
    /**
     * åˆ†é…åŽå¤„理父级(若有)、无父级则处理活动本身的userFee、surplusFee字段
     * @param inputTotalFeeSum        ä½¿ç”¨çš„额度
     * @param orgId         æœºæž„id
     * @param activityId    æ´»åЍid
     */
    private void updateParentFee(Long inputTotalFeeSum,Long orgId,Long activityId){
        if(inputTotalFeeSum == 0L){
            return;
        }
        ActivityDistributeRecord record = activityDistributeRecordMapper.getFeeByCondition(activityId,orgId);
        if(record != null){
            record.setUseFee(inputTotalFeeSum);
            record.setSurplusFee(record.getTotalFee() - inputTotalFeeSum);
            activityDistributeRecordMapper.updateByPrimaryKeySelective(record);
        }else{
            //更新活动本身
            ActivityFee activityFee = activityFeeMapper.getActivityFeeByIdAndOrgId(activityId,orgId);
            if(activityFee != null){
                activityFee.setUseFee(inputTotalFeeSum);
                activityFee.setSurplusFee(activityFee.getTotalFee() - inputTotalFeeSum);
                activityFeeMapper.updateByPrimaryKeySelective(activityFee);
            }
        }
    }
    /**
     * é¢„算分配额度校验
     * useFee(当前请求集合中所有分配额度累加) + surplusFee â‰¤ totalFee(活动的总额度)
     * @param recordList    å¾…保存的 é¢„算分配集合
     */
    private void checkBudget(List<ActivityDistributeRecord> recordList){
        Long activityId = recordList.get(0).getActivityId();
        Long totalFee = 0L;
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        Long orgId = user.getOrgId();
        ActivityDistributeRecord record = activityDistributeRecordMapper.getFeeByCondition(activityId,orgId);
        if (record == null) {
            ActivityFee activityFee = activityFeeMapper.getActivityFeeByIdAndOrgId(activityId,orgId);
            totalFee = activityFee.getTotalFee();
        }else{
            totalFee = record.getTotalFee();
        }
        Long inputTotalFeeSum = recordList.stream().mapToLong(ActivityDistributeRecord::getTotalFee).sum();
        long surplusFee = totalFee - inputTotalFeeSum;
        if(surplusFee < 0 ){
            throw new IllegalArgumentException("预算分配超出总额度,分配失败");
        }
    }
    /**
     * ç”Ÿæˆæœºorglv对应的枚举值
     * @param loginUserOrgLv    å½“前登录人的orgLv
     */
    private void generateOrgLv(ActivityDistributeRecord entity,Integer loginUserOrgLv){
        if(loginUserOrgLv == null){
            return;
        }
        switch (loginUserOrgLv){
            case 0:
                entity.setLv1Id(1L);
                break;
            case 1:
                entity.setLv2Id(2L);
                break;
            case 2:
                entity.setLv3Id(3L);
            case 3:
                entity.setLv4Id(4L);
            default:
        }
    }
    /**
     * æ ¡éªŒæ´»åŠ¨æ˜¯å¦=0(未开始);否则无法修改
     * @param activityId    æ´»åЍID
     * @param index     å½“前第几条
     */
    private void checkActivityStatus(Long activityId,int index){
        ActivityFee activityFee = activityFeeMapper.selectByPrimaryKey(activityId);
        if(activityFee.getStatus() != 0){
            String errMsg = String.format("第 {%s} æ¡æ´»åŠ¨å·²å¼€å§‹ï¼Œæ— æ³•åˆ†é…", index + 1);
            throw new IllegalArgumentException(errMsg);
        }
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityFeeServiceImpl.java
New file
@@ -0,0 +1,296 @@
package com.nuvole.four.service.impl;
import cn.hutool.core.util.StrUtil;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.ActivityDistributeRecord;
import com.nuvole.four.domain.ActivityFee;
import com.nuvole.four.domain.ActivityShopRecord;
import com.nuvole.four.domain.dto.ActivityDistributeBudgetDto;
import com.nuvole.four.domain.dto.ActivityFeeDetailDto;
import com.nuvole.four.domain.query.ActivityFeeQuery;
import com.nuvole.four.domain.query.ActivityShopRecordQuery;
import com.nuvole.four.mapper.ActivityDistributeRecordMapper;
import com.nuvole.four.mapper.ActivityFeeMapper;
import com.nuvole.four.mapper.ActivityShopRecordMapper;
import com.nuvole.four.mapper.SysUserMapper;
import com.nuvole.four.service.ActivityFeeService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.CodeUtil;
import com.nuvole.util.IdGenerator;
import com.walker.infrastructure.utils.CollectionUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * @Description è´¹çŽ‡è¡¥è´´æ´»åŠ¨Service实现类
 * @Author dqh
 * @Date 2024-04-13 21:33:08
 */
@Service
@RequiredArgsConstructor
public class ActivityFeeServiceImpl implements ActivityFeeService {
    private final ActivityFeeMapper activityFeeMapper;
    private final ActivityDistributeRecordMapper activityDistributeRecordMapper;
    private final ActivityShopRecordMapper activityShopRecordMapper;
    private final SysUserMapper sysUserMapper;
    /**
     * æ–¹æ³•描述:新建费率补贴活动
     *
     * @date  2024-04-13 22:00
     **/
    @Override
    public int addSelective(ActivityFee entity){
        checkParam(entity);
        entity.setId(IdGenerator.getId());
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        entity.setStatus(0);
        entity.setDeleted(0);
        //有总额度后,默认同步设置剩余额度,使用额度
        if(entity.getTotalFee() != null){
            entity.setSurplusFee(entity.getTotalFee());
            entity.setUseFee(0L);
        }
        entity.setOrgCode(user.getOrgCode());
        entity.setCode(CodeUtil.getTimeCode());
        entity.setOrgId(user.getOrgId());
        entity.setCreateBy(user.getId());
        entity.setCreateTime(new Date());
        return activityFeeMapper.insertSelective(entity);
    }
    private void checkParam(ActivityFee entity){
        if(entity.getBeginTime().after(entity.getEndTime())
                && entity.getBeginTime().equals(entity.getEndTime())){
            throw new IllegalArgumentException("活动开始时间必须小于活动结束时间");
        }
        if(entity.getExpireTime().after(entity.getBeginTime())
                && entity.getBeginTime().equals(entity.getEndTime())){
            throw new IllegalArgumentException("截止时间必须小于活动开始时间");
        }
    }
    /**
     * æ–¹æ³•描述: ç¼–辑费率补贴活动
     *
     * @date  2024-04-13 22:01
     **/
    @Override
    public int editSelective(ActivityFee entity){
        checkParam(entity);
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        entity.setUpdateBy(user.getId());
        entity.setUpdateTime(new Date());
        //有总额度后,默认同步设置剩余额度,使用额度
        if(entity.getTotalFee() != null){
            entity.setSurplusFee(entity.getTotalFee());
            entity.setUseFee(0L);
        }
        return activityFeeMapper.updateByPrimaryKeySelective(entity);
    }
    /**
     * æ–¹æ³•描述:查询费率补贴活动详情
     *
     * @date  2024-04-13 22:01
     **/
     @Override
     public ActivityFee get(Long  id){
        return activityFeeMapper.selectByPrimaryKey(id);
     }
     @Override
     public int del(Long  id){
        return activityFeeMapper.deleteByPrimaryKey(id);
     }
     /**
      * æ–¹æ³•描述:查询当前登录人的本级+下级机构的活动数据
      *
      * @date  2024-04-20 17:06
      **/
    @Override
    public List<ActivityFee> getList(ActivityFeeQuery query) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        if(!user.getLoginName().equalsIgnoreCase("super") && StrUtil.isBlank(user.getOrgCode())){
            throw new IllegalArgumentException("当前登录人的机构code为空");
        }
        List<ActivityFee> feeList = new ArrayList<>();
        if(user.getLoginName().equalsIgnoreCase("super") || user.getOrgLv().equals(0)){
            //查询匹配当前登录人orgCode的所有活动
            query.setOrgCode(user.getOrgCode());
            feeList = activityFeeMapper.selectList(query);
        } else {
            //查询分配出去的活动信息,根据orgId做权限过滤
            query.setOrgId(user.getOrgId());
            query.setCreateBy(user.getId());
            feeList = activityFeeMapper.selectActivityWithDistribute(query);
        }
        return feeList;
    }
    /**
     * æ–¹æ³•描述: å¼€å§‹/停止
     * åŒæ­¥åœæ­¢æ´»åŠ¨è¡¨ã€å•†æˆ·æ´»åŠ¨è¡¨ã€æœºæž„é¢„ç®—åˆ†é…è¡¨
     **/
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int startOrStop(Long id, Integer status) {
        //活动数据校验
        ActivityFee fee = activityFeeMapper.selectByPrimaryKey(id);
        if(fee == null){
            throw new IllegalArgumentException("活动不存在");
        }
        if(fee.getStatus().equals(status)){
            throw new IllegalArgumentException(status == 1 ? "当前活动正在进行中" : "当前活动已经结束了");
        }
        // æ›´æ”¹æ´»åŠ¨è¡¨çŠ¶æ€
        updateActivityStatus(fee, status);
        // æ›´æ”¹æœºæž„预算分配表状态
        updateDistributeRecordStatus(id, status);
        // æ›´æ”¹å•†æˆ·æ´»åŠ¨è¡¨çŠ¶æ€
        updateShopRecordStatus(id, status);
        // çŠ¶æ€=开始时,进行商户活动额度平均分配
        if (status == 1) {
            distributeFeeToShop(id, fee.getTotalFee());
        }
        return 1;
    }
    /**
     * æ›´æ”¹æ´»åŠ¨è¡¨çŠ¶æ€
     **/
    private void updateActivityStatus(ActivityFee fee, Integer status) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        Long userId = user.getId();
        Date date = new Date();
        fee.setStatus(status);
        fee.setUpdateBy(userId);
        fee.setUpdateTime(date);
        activityFeeMapper.updateByPrimaryKeySelective(fee);
    }
    /**
     * æ›´æ”¹æœºæž„预算分配表状态
     */
    private void updateDistributeRecordStatus(Long id, Integer status) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        Long userId = user.getId();
        Date date = new Date();
        ActivityDistributeRecord distributeRecord = new ActivityDistributeRecord();
        distributeRecord.setActivityId(id);
        distributeRecord.setStatus(status);
        distributeRecord.setUpdateBy(userId);
        distributeRecord.setUpdateTime(date);
        activityDistributeRecordMapper.updateByActivityId(distributeRecord);
    }
    /**
     * æ›´æ”¹å•†æˆ·æ´»åŠ¨è¡¨çŠ¶æ€
     */
    private void updateShopRecordStatus(Long id, Integer status) {
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        Long userId = user.getId();
        Date date = new Date();
        ActivityShopRecord shopRecord = new ActivityShopRecord();
        shopRecord.setActivityId(id);
        shopRecord.setStatus(status);
        shopRecord.setUpdateBy(userId);
        shopRecord.setUpdateTime(date);
        activityShopRecordMapper.updateByActivityId(shopRecord);
    }
    /**
     * çŠ¶æ€=开始时,进行商户活动额度平均分配
     * @param id       æ´»åЍid
     * @param totalFee  æ´»åŠ¨æ€»é¢åº¦
     */
    private void distributeFeeToShop(Long id, Long totalFee) {
        if(totalFee < 100L){
            throw new IllegalArgumentException("当前活动总额度不足1元,无法开始");
        }
        ActivityShopRecordQuery query = new ActivityShopRecordQuery();
        query.setActivityId(id);
        List<ActivityShopRecord> shopRecordList = activityShopRecordMapper.selectList(query);
        if (!CollectionUtils.isEmpty(shopRecordList)) {
            Integer[] surplusFee = distributeFeeToShop(shopRecordList.size(), totalFee);
            shopRecordList.forEach(r -> {
                Long userId = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC).getId();
                Date currentDate = new Date();
                Long totalFeePerShop = surplusFee[shopRecordList.indexOf(r)].longValue();
                r.setTotalFee(totalFeePerShop);
                r.setSurplusFee(totalFeePerShop);
                r.setUseFee(0L);
                r.setUpdateBy(userId);
                r.setUpdateTime(currentDate);
            });
            activityShopRecordMapper.batchUpdate(shopRecordList);
        }
    }
    /**
     * é¢åº¦å¹³å‡åˆ†é…
     * @param number    åˆ†é…æ•°é‡
     * @param total     åˆ†é…æ€»é¢
     * @return
     */
    private Integer[] distributeFeeToShop(int number,Long total){
        int totalFee = total.intValue();
        Integer[] result = new Integer[number];
        int value = totalFee / number;
        int index = totalFee - (value * number);
        for (int i = 0; i < number; i++) {
            if (i < index) {
                result[i] = value + 1;
            } else {
                result[i] = value;
            }
        }
        return result;
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ´»åŠ¨è¯¦æƒ…-活动数据
     **/
    @Override
    public ActivityFeeDetailDto getActivityFeeDetail(Long id) {
        ActivityFeeDetailDto detailDto = new ActivityFeeDetailDto();
        //活动基本信息查询
        ActivityFee activityFee = activityFeeMapper.selectByPrimaryKey(id);
        BeanUtils.copyProperties(activityFee,detailDto);
        //shopUseFees å·²æ¶ˆè€—额度 = ç»Ÿè®¡æ´»åŠ¨å•†æˆ·çš„sum(usefee)
        ActivityShopRecordQuery query = new ActivityShopRecordQuery();
        query.setActivityId(id);
        List<ActivityShopRecord> recordList = activityShopRecordMapper.selectList(query);
        if(!CollectionUtils.isEmpty(recordList)){
            Long shopUseFees = recordList.stream().mapToLong(ActivityShopRecord::getUseFee).sum();
            //已消耗 = useFee
            detailDto.setUseFee(shopUseFees);
        }
        //查询活动分配出去的预算信息(分配出去的预算展示会替换当前的活动预算)
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        ActivityDistributeRecord record = activityDistributeRecordMapper.getFeeByCondition(id,user.getOrgId());
        if(record != null) {
            detailDto.setTotalFee(record.getTotalFee());
            detailDto.setSurplusFee(record.getSurplusFee());
        }
        //assigned = å·²åˆ†é…é¢åº¦
        detailDto.setAssigned(detailDto.getTotalFee() - detailDto.getSurplusFee());
        //匹配查询创建人
        SysUser sysUser = sysUserMapper.getUserById(activityFee.getCreateBy());
        detailDto.setCreateUserName(sysUser.getUserName());
        //当前活动的预算分配列表查询
        List<ActivityDistributeBudgetDto> budgetDtoList = activityDistributeRecordMapper.getActivityDistributeRecordDetailByAId(id,user.getOrgCode());
        detailDto.setDistributeBudgets(budgetDtoList);
        return detailDto;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityShopRecordServiceImpl.java
New file
@@ -0,0 +1,167 @@
package com.nuvole.four.service.impl;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.client.ShopServiceClient;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.ActivityShopRecord;
import com.nuvole.four.domain.dto.ActivityShopRecordDto;
import com.nuvole.four.domain.params.ActivityShopRecordParam;
import com.nuvole.four.domain.query.ActivityShopRecordQuery;
import com.nuvole.four.mapper.ActivityFeeMapper;
import com.nuvole.four.mapper.ActivityShopRecordMapper;
import com.nuvole.four.service.ActivityShopRecordService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.IdGenerator;
import com.walker.infrastructure.utils.CollectionUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
 * @Description æ´»åŠ¨è¡¥è´´â€”ä¸ŠæŠ¥å•†æˆ·Service实现类
 * @Author dqh
 * @Date 2024-04-13 21:39:14
 */
@Service
@RequiredArgsConstructor
public class ActivityShopRecordServiceImpl implements ActivityShopRecordService {
    private final ActivityShopRecordMapper activityShopRecordMapper;
    private final ShopServiceClient shopServiceClient;
    private final ActivityFeeMapper activityFeeMapper;
    @Override
    public int addSelective(ActivityShopRecord entity) {
        return activityShopRecordMapper.insertSelective(entity);
    }
    @Override
    public int editSelective(ActivityShopRecord entity) {
        return activityShopRecordMapper.updateByPrimaryKeySelective(entity);
    }
    @Override
    public ActivityShopRecord get(Long id) {
        return activityShopRecordMapper.selectByPrimaryKey(id);
    }
    @Override
    public int del(Long id) {
        return activityShopRecordMapper.deleteByPrimaryKey(id);
    }
    @Override
    public List<ActivityShopRecord> getList(ActivityShopRecordQuery query) {
        return activityShopRecordMapper.selectList(query);
    }
    @Override
    public Map getActRateByShopIdAndChannelId(Long shopId, Long channelId) {
        return activityShopRecordMapper.getActRateByShopId(shopId, channelId);
    }
    @Override
    public int updShopSurplusFee(Long activityId, Long merchantShopId, Long channelId, Integer useFee) {
        return activityShopRecordMapper.updShopSurplusFee(activityId, merchantShopId, channelId, useFee);
    }
    /**
     * æ–¹æ³•描述:查询已上报商户列表
     *
     * @date  2024-04-14 21:08
     **/
    @Override
    public List<ActivityShopRecordDto> getAlreadyMerchantList(ActivityShopRecordParam param) {
        //已上报的商户列表
        List<ActivityShopRecordDto> dtoList = activityShopRecordMapper.getAlreadyMerchantList(param);
        if(CollectionUtils.isEmpty(dtoList)){
            return dtoList;
        }
        //关联shop库查询商户、店铺等字段信息
        List<Long> shopIds = dtoList.stream().map(ActivityShopRecord::getMerchantShopId).collect(Collectors.toList());
        String ids = shopIds.stream().map(String::valueOf).collect(Collectors.joining(","));
        List<Map> mapList = shopServiceClient.selectShopMsgByIds(ids);
        if(!CollectionUtils.isEmpty(mapList)){
            // å°† mapList ä¸­çš„æ•°æ®åˆå¹¶åˆ° dtoList ä¸­
            dtoList.forEach( d -> {
                ActivityShopRecordDto dto = d;
                Map<String, Object> map = mapList.get(dtoList.indexOf(d));
                // åˆå¹¶
                mergeMapToDto(dto, map);
            });
        }
        return dtoList;
    }
    /**
     * æ–¹æ³•描述:批量添加上报
     *
     * @date  2024-04-15 9:46
     **/
    @Override
    public Integer batchInsert(List<ActivityShopRecord> recordList) {
        if(CollectionUtils.isEmpty(recordList)){
            return 0;
        }
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        Long totalFee = activityFeeMapper.selectByPrimaryKey(recordList.get(0).getActivityId()).getTotalFee();
        recordList.forEach( r -> {
            if (r.getId() == null) {
                //新增自动生成id
                r.setId(IdGenerator.getId());
                r.setCreateBy(user.getId());
                r.setCreateTime(new Date());
                //上报时只存活动的总额度;待触发活动开始,才开始分配额度
                r.setTotalFee(totalFee);
                r.setUseFee(0L);
                r.setSurplusFee(totalFee);
                //默认状态均=0(未开始)
                r.setStatus(0);
                r.setDeleted(0);
            }else{
                //额度自动分配,不允许更新操作;
                String errMsg = String.format("第 {%s} æ¡ä¸å…è®¸é‡å¤ä¸ŠæŠ¥", recordList.indexOf(r) + 1);
                throw new IllegalArgumentException(errMsg);
            }
        });
        return activityShopRecordMapper.batchInsert(recordList);
    }
    /**
     * æ–¹æ³•描述:根据shopIds查询所有记录
     *
     * @date  2024-04-15 11:23
     **/
    @Override
    public List<ActivityShopRecord> selectByCondition(String[] ids,Long activityId) {
        return activityShopRecordMapper.selectByCondition(ids,activityId);
    }
    /**
     * æ–¹æ³•描述: å°† mapList ä¸­çš„æ•°æ®åˆå¹¶åˆ° dtoList ä¸­
     *
     * @date  2024-04-14 22:56
     **/
    private void mergeMapToDto(ActivityShopRecordDto dto, Map<String, Object> map) {
        dto.setManagerName((String)map.get("managerName"));
        dto.setShopCode((String)map.get("shopCode"));
        dto.setShopName((String)map.get("shopName"));
        dto.setShopId((String)map.get("id"));
        dto.setMerchantName((String) map.get("merchantName"));
        dto.setContactName((String) map.get("contactName"));
        dto.setContactMobile((String) map.get("contactMobile"));
        dto.setOfflineWxRate((Double) map.get("wxRate"));
        dto.setOfflineZfbRate((Double) map.get("zfbRate"));
        dto.setOfflineUnionpayRate((Double) map.get("unionpayRate"));
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelInfoServiceImpl.java
New file
@@ -0,0 +1,161 @@
package com.nuvole.four.service.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.ChannelInfo;
import com.nuvole.four.domain.dto.ChannelInfoDto;
import com.nuvole.four.mapper.ChannelInfoMapper;
import com.nuvole.four.service.ChannelInfoService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.IdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * @Desc: é€šé“信息ServiceImpl
 * @Author: dqh
 * @Date: 2024-04-09
 **/
@Slf4j
@Service
public class ChannelInfoServiceImpl implements ChannelInfoService {
    @Autowired
    private ChannelInfoMapper channelInfoMapper;
    @Override
    public List<ChannelInfo> getList(Map map) {
        return null;
    }
    /**
     * æ–¹æ³•描述:查询通道列表
     **/
    @Override
    public List<ChannelInfo> getList(ChannelInfo channelInfo) {
        return channelInfoMapper.selectAll(channelInfo);
    }
    /**
     * æ–¹æ³•描述:分页查询通道列表
     **/
    @Override
    public List<ChannelInfoDto> getPageList(ChannelInfo channelInfo) {
        return channelInfoMapper.getPageList(channelInfo);
    }
    @Override
    public List<Map> getListOfMap(Map map) {
        return null;
    }
    @Override
    public List<Map> getListOfMap(ChannelInfo channelInfo) {
        return null;
    }
    @Override
    public Integer save(ChannelInfo channelInfo) {
        return null;
    }
    /**
     * æ–¹æ³•描述: æ–°å¢žé€šé“
     *
     * @date  2024-04-11 14:39
     **/
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer saveChannelInfo(ChannelInfo channelInfo) {
        ChannelInfo codeExists = channelInfoMapper.checkChannelCode(channelInfo.getChannelCode());
        if(codeExists != null){
            throw new IllegalArgumentException("通道code重复");
        }
        /*
         * è§£æžextendJson的字符串字段转为json存储
         *
         **/
        if(StrUtil.isNotEmpty(channelInfo.getExtendJson())){
            Object object = JSON.parse(channelInfo.getExtendJson());
            if(object instanceof JSONArray){
                channelInfo.setExtendJson(channelInfo.getExtendJson());
            }
        }
        channelInfo.setId(IdGenerator.getId());
        channelInfo.setCreateTime(new Date());
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        channelInfo.setCreateBy(user.getId());
        channelInfo.setStatus(0);
        return channelInfoMapper.insert(channelInfo);
    }
    /**
     * æ–¹æ³•描述: ä¿®æ”¹é€šé“
     *
     * @date  2024-04-11 14:38
     **/
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer updateChannelInfo(ChannelInfo channelInfo) {
        ChannelInfo codeExists = channelInfoMapper.checkChannelCode(channelInfo.getChannelCode());
        if(codeExists != null && !codeExists.getId().equals(channelInfo.getId())){
            throw new IllegalArgumentException("通道code重复");
        }
        /*
         * è§£æžextendJson的字符串字段转为json存储
         *
         **/
        if(StrUtil.isNotEmpty(channelInfo.getExtendJson())){
            Object object = JSON.parse(channelInfo.getExtendJson());
            if(object instanceof JSONArray){
                channelInfo.setExtendJson(channelInfo.getExtendJson());
            }
        }
        channelInfo.setUpdateTime(new Date());
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        channelInfo.setUpdateBy(user.getId());
        return channelInfoMapper.updateByPrimaryKeySelective(channelInfo);
    }
    /**
     * æ–¹æ³•描述:根据id查询通道详情
     *
     * @date  2024-04-11 14:40
     **/
    @Override
    public ChannelInfo getChannelInfo(Long id) {
        return channelInfoMapper.selectByPrimaryKey(id);
    }
/**
     * æ–¹æ³•描述:根据code查询通道
     *
     * @date  2024-04-11 14:40
     **/
    @Override
    public ChannelInfo getDetailByCode(String channelCode) {
        return channelInfoMapper.checkChannelCode(channelCode);
    }
    @Override
    public Integer update(ChannelInfo channelInfo) {
        return null;
    }
    @Override
    public Integer del(Long id) {
        return null;
    }
    @Override
    public ChannelInfo getById(Long id) {
        return null;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelOrgConfigServiceImpl.java
New file
@@ -0,0 +1,227 @@
package com.nuvole.four.service.impl;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.ChannelOrgConfig;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import com.nuvole.four.domain.dto.ChannelOrgConfigDto;
import com.nuvole.four.domain.dto.ConfigOrgDetailChannel;
import com.nuvole.four.domain.params.ChannelOrgConfigParam;
import com.nuvole.four.mapper.ChannelOrgConfigMapper;
import com.nuvole.four.service.ChannelOrgConfigService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.IdGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
/**
 * @Desc: æœºæž„通道配置ServiceImpl
 * @Author: dqh
 * @Date: 2024-04-10
 **/
@Slf4j
@Service
public class ChannelOrgConfigServiceImpl implements ChannelOrgConfigService {
    @Autowired
    private ChannelOrgConfigMapper channelOrgConfigMapper;
    @Autowired
    private ChannelInfoServiceImpl channelInfoService;
    @Autowired
    private SysOrgServiceImpl sysOrgService;
    @Override
    public List<ChannelOrgConfig> getList(Map map) {
        return null;
    }
    @Override
    public List<ChannelOrgConfig> getList(ChannelOrgConfig channelOrgConfig) {
        return null;
    }
    @Override
    public List<Map> getListOfMap(Map map) {
        return null;
    }
    @Override
    public List<Map> getListOfMap(ChannelOrgConfig channelOrgConfig) {
        return null;
    }
    @Override
    public Integer save(ChannelOrgConfig channelOrgConfig) {
        return null;
    }
    @Override
    public Integer update(ChannelOrgConfig channelOrgConfig) {
        return null;
    }
    @Override
    public Integer del(Long id) {
        return null;
    }
    @Override
    public ChannelOrgConfig getById(Long id) {
        return null;
    }
    @Override
    public ChannelOrgConfig get(Long id) {
        return channelOrgConfigMapper.selectByPrimaryKey(id);
    }
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer configChannel(ChannelOrgConfigParam configParam) {
        Integer status = 0;
        ChannelOrgConfig dbIsExists = channelOrgConfigMapper.selectByOrgIdAndChannelId(configParam.getOrgId(),configParam.getChannelInfoId());
        if(dbIsExists == null){
            //不存在,进行新数据写入
            status = insertChannelConfig(configParam);
        }else{
            //参数校验
            ChannelOrgConfig updateConfig = checkParam(dbIsExists,configParam);
            //校验通过后,进行数据修改
            channelOrgConfigMapper.updateByPrimaryKeySelective(updateConfig);
        }
        return status;
    }
    /**
     * æœºæž„通道配置数据写入
     */
    private Integer insertChannelConfig(ChannelOrgConfigParam configParam){
        ChannelOrgConfig channelOrgConfig = new ChannelOrgConfig();
        channelOrgConfig.setId(IdGenerator.getId());
        BeanUtils.copyProperties(configParam,channelOrgConfig);
        Date date = new Date();
        channelOrgConfig.setDefaultOrNot(0);
        channelOrgConfig.setCreateTime(date);
        channelOrgConfig.setUpdateTime(date);
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        channelOrgConfig.setCreateBy(user.getId());
        channelOrgConfig.setUpdateBy(user.getId());
        channelOrgConfigMapper.insert(channelOrgConfig);
        return 1;
    }
    /**
     * ä¿®æ”¹æ—¶å‚数逻辑校验
     * @param dbConfig  æ•°æ®åº“已存在的数据
     * @param param     é¡µé¢çš„请求数据
     */
    private ChannelOrgConfig checkParam(ChannelOrgConfig dbConfig,ChannelOrgConfigParam param){
        //dbConfig.defaultOrNot=1(默认通道)、param.status=0(禁用)时;返回错误描述
        if(param.getStatus() != null &&
                (dbConfig.getDefaultOrNot().equals(1) && param.getStatus().equals(0))){
            throw new IllegalArgumentException("当前为默认通道,不能禁用");
        }
        //dbConfig.status=0(禁用)、param.defaultOrNot=1(默认通道)时;返回错误描述
        if(param.getDefaultOrNot() != null &&
                (dbConfig.getStatus().equals(0) && param.getDefaultOrNot().equals(1))){
            throw new IllegalArgumentException("当前通道已被禁用,不能切换为默认");
        }
        //校验默认通道是否存在
        ChannelOrgConfig defaultChannelIsExists = channelOrgConfigMapper.queryDefaultChannelByOrgId(param.getOrgId());
        if(defaultChannelIsExists != null){
            /*
                param.defaultOrNot=1(默认通道)、且 è¯·æ±‚的通道ID和数据库的默认通道ID不等时
                ç§»é™¤åŽŸæœ‰çš„é»˜è®¤é€šé“ï¼Œæ›´æ–°å½“å‰è¯·æ±‚æ•°æ®ä¸ºé»˜è®¤é€šé“
             */
            if(param.getDefaultOrNot() != null &&
                    (param.getDefaultOrNot().equals(1) && !defaultChannelIsExists.getChannelInfoId().equals(param.getChannelInfoId()))){
                ChannelOrgConfig config = new ChannelOrgConfig();
                config.setId(defaultChannelIsExists.getId());
                config.setDefaultOrNot(0);
                channelOrgConfigMapper.updateByPrimaryKeySelective(config);
            }
        }
        //校验通过;组装要入库的更新数据
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        dbConfig.setUpdateBy(user.getId());
        dbConfig.setUpdateTime(new Date());
        dbConfig.setStatus(param.getStatus());
        dbConfig.setDefaultOrNot(param.getDefaultOrNot());
        return dbConfig;
    }
    /**
     * æŸ¥è¯¢æœºæž„通道配置列表
     * ä»…包含当前orgId的下级,不包含(二三四级等)
     *
     * @param orgId é€‰æ‹©çš„æœºæž„ID
     * @param orgName   æŸ¥è¯¢æ¡ä»¶æœºæž„名称
     */
    @Override
    public List<ChannelOrgConfigDto> queryAllChannelOrg(Long orgId, String orgName) {
        return channelOrgConfigMapper.selectAllList(orgId,orgName);
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æœºæž„通道详情
     * è¯¦æƒ…中的通道 ä»…包含当前orgId对应的pId对应的通道
     * @date  2024-04-11 20:04
     **/
    @Override
    public ChannelOrgConfigDetailDto getChannelOrgConfigDetail(Long orgId) {
        // æŸ¥è¯¢å½“前机构、父级机构信息
        ChannelOrgConfigDetailDto dto = sysOrgService.queryNameAndParentName(orgId);
        if(dto == null){
            return dto;
        }
        if(dto.getLv() == null){
            throw new IllegalArgumentException("当前选择的机构层级为空");
        }
        List<ConfigOrgDetailChannel> channelList = null;
        switch (dto.getLv()) {
            case 0:
            case 1:
                // å¦‚果机构层级=0、1(省市);查询所有通道
                channelList = channelOrgConfigMapper.selectAllAndChannelInfo(orgId);
                break;
            case 2:
            case 3:
                // å¦‚果机构层级=2、3(县、支局);查询当前机构+父级机构 æ‰€æœ‰çŠ¶æ€=1(开启)的通道
                channelList = getValidChannelsForOrg(orgId, dto.getPId());
                break;
            default:
                throw new IllegalArgumentException("机构层级无效");
        }
        dto.setChannelList(channelList);
        return dto;
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢å½“前机构+父级机构 æ‰€æœ‰çŠ¶æ€=1(开启)的通道
     *
     * @date  2024-04-12 10:27
     **/
    private List<ConfigOrgDetailChannel> getValidChannelsForOrg(Long orgId, Long parentId) {
        List<ConfigOrgDetailChannel> orgConfigList = channelOrgConfigMapper.selectValidByCondition(orgId, parentId);
        Map<Long,ConfigOrgDetailChannel> map = new HashMap<>();
        orgConfigList.forEach(c -> {
            // çˆ¶çº§æœºæž„有,本级机构无的通道;设置数据为初始化状态
            if (!c.getOrgId().equals(orgId)) {
                c.setStatus(0);
                c.setDefaultOrNot(0);
            }
            /*
                æœ¬çº§æœºæž„有,父级也有的通道;则对父级的数据进行剔除。
                ä½¿ç”¨map特性,后者覆盖替换前者;
                å…¶ä¸­åŽè€…=机构本身,前者=父级机构的通道
             */
            map.put(c.getChannelInfoId(),c);
        });
        return new ArrayList<>(map.values());
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SpecialFeeRateServiceImpl.java
New file
@@ -0,0 +1,119 @@
package com.nuvole.four.service.impl;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.SpecialFeeRate;
import com.nuvole.four.domain.dto.SpecialFeeRateDto;
import com.nuvole.four.domain.dto.StoreIndustryManageDto;
import com.nuvole.four.domain.query.SpecialFeeRateQuery;
import com.nuvole.four.mapper.SpecialFeeRateMapper;
import com.nuvole.four.service.SpecialFeeRateService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.IdGenerator;
import com.walker.infrastructure.utils.CollectionUtils;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
 * @Description è¡Œä¸šç®¡ç†-特殊行业费率Service实现类
 * @Author dqh
 * @Date 2024-04-12 19:57:28
 */
@Service
@RequiredArgsConstructor
public class SpecialFeeRateServiceImpl implements SpecialFeeRateService {
    private final SpecialFeeRateMapper specialFeeRateMapper;
    /**
     * æ–¹æ³•描述:批处理特殊费率
     * id为空则新增;有值则修改
     **/
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int addSelective(SpecialFeeRateDto entity){
        entity.setDeleted((short) 0);
        entity.setStatus((short) 1);
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        List<SpecialFeeRate> rateList =new ArrayList<>();
        //组装行业集合的数据;进行批量插入 æˆ– æ›´æ–°
        if(StrUtil.isNotBlank(entity.getIndustryManages())){
            Object object = JSON.parse(entity.getIndustryManages());
            if(object instanceof JSONArray){
                List<StoreIndustryManageDto> manageList = JSONArray.parseArray(entity.getIndustryManages(), StoreIndustryManageDto.class);
                for (StoreIndustryManageDto i : manageList) {
                    SpecialFeeRate rate = new SpecialFeeRate();
                    BeanUtils.copyProperties(entity, rate);
                    rate.setIndustryCode(i.getIndustryCode());
                    rate.setIndustryName(i.getIndustryName());
                    if (i.getId() == null) {
                        //新增自动生成id
                        rate.setId(IdGenerator.getId());
                        rate.setCreateBy(user.getId());
                        rate.setCreateTime(new Date());
                    }else{
                        //修改直接取传过来的id
                        rate.setId(i.getId());
                        rate.setUpdateBy(user.getId());
                        rate.setUpdateTime(new Date());
                    }
                    rateList.add(rate);
                }
            }
        }
        return specialFeeRateMapper.batchInsert(rateList);
    }
    @Override
    public int editSelective(SpecialFeeRate entity){
        return specialFeeRateMapper.updateByPrimaryKeySelective(entity);
    }
     @Override
     public SpecialFeeRate get(Long id){
        return specialFeeRateMapper.selectByPrimaryKey(id);
     }
     @Override
     public int del(Long id){
        return specialFeeRateMapper.deleteByPrimaryKey(id);
     }
    @Override
    public List<SpecialFeeRate> getList(SpecialFeeRateQuery query) {
        return specialFeeRateMapper.selectList(query);
    }
    /**
     * æ–¹æ³•描述:特殊费率配置查询
     **/
    @Override
    public SpecialFeeRateDto getConfig(Long industryId,Long channelId) {
        //根据行业id,查询所属通道的所有特殊费率配置
        List<SpecialFeeRate> specialFeeRateList = specialFeeRateMapper.selectByIndustryId(industryId,channelId);
        SpecialFeeRateDto dto = new SpecialFeeRateDto();
        if(!CollectionUtils.isEmpty(specialFeeRateList)){
            JSONArray jsonArray = new JSONArray();
            specialFeeRateList.forEach( s -> {
                BeanUtils.copyProperties(s,dto);
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("id",String.valueOf(s.getId()));
                jsonObject.put("industryCode",s.getIndustryCode());
                jsonObject.put("industryName",s.getIndustryName());
                jsonArray.add(jsonObject);
            });
            dto.setIndustryManages(jsonArray.toJSONString());
        }
        return dto;
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/StoreIndustryManageServiceImpl.java
New file
@@ -0,0 +1,164 @@
package com.nuvole.four.service.impl;
import cn.hutool.core.util.StrUtil;
import com.github.pagehelper.PageHelper;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.StoreIndustryManage;
import com.nuvole.four.domain.query.StoreIndustryManageQuery;
import com.nuvole.four.mapper.StoreIndustryManageMapper;
import com.nuvole.four.service.StoreIndustryManageService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.IdGenerator;
import com.nuvole.util.TreeUtil;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
 * @Description è¡Œä¸šç®¡ç†Service实现类
 * @Author dqh
 * @Date 2024-04-12 17:41:29
 */
@Service
@RequiredArgsConstructor
public class StoreIndustryManageServiceImpl implements StoreIndustryManageService {
    private final StoreIndustryManageMapper storeIndustryManageMapper;
    /**
     * æ–¹æ³•描述: æ·»åŠ è¡Œä¸šç®¡ç†
     *
     * @date  2024-04-12 18:29
     **/
    @Override
    public int addSelective(StoreIndustryManage entity){
        entity.setId(IdGenerator.getId());
        if(entity.getPId() == null){
            entity.setPId(0L);
        }
        entity.setLevel(getLevel(entity.getPId()));
        //生成code
        String code = generateCode(entity);
        entity.setIndustryCode(code);
        entity.setIndustryCode(Contants.CODE + entity.getLevel() + Contants.CODE + entity.getLevel());
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        entity.setCreateBy(user.getId());
        entity.setCreateTime(new Date());
        return storeIndustryManageMapper.insertSelective(entity);
    }
    /**
     * æ–¹æ³•描述: ç”Ÿæˆæœ¬çº§code
     *
     * @date  2024-04-13 21:57
     **/
    private String generateCode(StoreIndustryManage entity){
        StoreIndustryManage pManage = storeIndustryManageMapper.selectByPrimaryKey(entity.getPId());
        String parentCode = "";//父级code
        if (pManage != null) {
            parentCode = pManage.getIndustryCode();
            parentCode = parentCode.substring(pManage.getIndustryCode().length());
        }
        String maxCode = storeIndustryManageMapper.getMaxCode(entity.getPId(),parentCode);   //本级最大code
        if (StrUtil.isNotBlank(maxCode)){
            maxCode = maxCode.substring(entity.getIndustryCode().length());
        }
        return maxCode;
    }
    /**
     * æ–¹æ³•描述:获取当前pId对应的level层级
     *
     **/
    private Integer getLevel(Long pId){
        Integer level = null;
        if(pId == null || pId == 0){
            level = 0;
        } else {
            //查询当前行业的level;根据pId的level + 1得出
            level = storeIndustryManageMapper.getLevel(pId);
        }
        return level;
    }
    /**
     * æ–¹æ³•描述:修改行业管理
     *
     * @date  2024-04-12 18:33
     **/
    @Override
    public int editSelective(StoreIndustryManage entity){
        if(entity.getPId() == null){
            entity.setPId(0L);
        }
        entity.setLevel(getLevel(entity.getPId()));
        SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
        entity.setUpdateBy(user.getId());
        entity.setUpdateTime(new Date());
        return storeIndustryManageMapper.updateByPrimaryKeySelective(entity);
    }
     @Override
     public StoreIndustryManage get(Long  id){
        return storeIndustryManageMapper.selectByPrimaryKey(id);
     }
     @Override
     public int del(Long  id){
        //校验是否存在子节点;存在则不允许删除
         int exists = storeIndustryManageMapper.selectByPid(id);
         if(exists > 0){
             throw new IllegalArgumentException("存在下级,不允许删除");
         }
        return storeIndustryManageMapper.deleteByPrimaryKey(id);
     }
     /**
      * æ–¹æ³•描述:查询行业管理列表
      *
      * @date  2024-04-12 18:52
      **/
    @Override
    public List<StoreIndustryManage> getList(StoreIndustryManageQuery query) {
        return storeIndustryManageMapper.selectList(query);
    }
    /**
     * æ–¹æ³•描述:查询列表默认方法
     *
     * @date  2024-04-12 18:52
     **/
    @Override
    public List<StoreIndustryManage> getList(Map map) {
        return storeIndustryManageMapper.selectAll(map);
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢max(sortNo)的序号信息
     * è¿”回 = max(sortNo) + 10
     *
     * @date  2024-04-12 18:17
     **/
    @Override
    public Integer getSort() {
        return storeIndustryManageMapper.getSort();
    }
    /**
     * æ–¹æ³•描述: æŸ¥è¯¢æ‰€æœ‰è¡Œä¸šæ ‘
     *
     * @date  2024-04-12 18:47
     **/
    @Override
    public List<Map> getIndustryTree(Map map) {
        PageHelper.orderBy("p_id,sort_no");
        List<StoreIndustryManage> list = this.getList(map);
        return TreeUtil.convert2Tree(list);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SysOrgServiceImpl.java
New file
@@ -0,0 +1,135 @@
package com.nuvole.four.service.impl;
import com.github.pagehelper.PageHelper;
import com.nuvole.base.domain.SysUser;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.SysOrg;
import com.nuvole.four.domain.dto.ChannelOrgConfigDetailDto;
import com.nuvole.four.domain.extend.AppDTO;
import com.nuvole.four.mapper.SysOrgMapper;
import com.nuvole.four.service.SysOrgService;
import com.nuvole.four.util.SystemUtil;
import com.nuvole.util.TreeUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
 * ç±»æè¿°:
 *
 * @author dqh
 * @date  2024-04-11 10:59
 * @version 1.0
 **/
@Service
@Slf4j
@RequiredArgsConstructor
public class SysOrgServiceImpl implements SysOrgService {
    @Value("${file.tmp-path}")
    private String tempPath;
    private final SysOrgMapper sysOrgMapper;
    @Override
    public List<SysOrg> getList(Map map) {
        return null;
    }
    @Override
    public List<SysOrg> getList(SysOrg sysOrg) {
        return null;
    }
    @Override
    public List<Map> getListOfMap(Map map) {
        return null;
    }
    @Override
    public List<Map> getListOfMap(SysOrg SysOrg) {
        return null;
    }
    @Override
    public Integer save(SysOrg sysOrg) {
        return null;
    }
    @Override
    public Integer update(SysOrg sysOrg) {
        return null;
    }
    @Override
    public Integer del(Long id) {
        return null;
    }
    @Override
    public SysOrg getById(Long id) {
        return sysOrgMapper.selectByPrimaryKey(id);
    }
    /**
     * æ–¹æ³•描述: èŽ·å–æœºæž„æ ‘
     *
     * @date  2024-04-11 10:59
     **/
    @Override
    public List<Map> getTreeOrg(Map map) {
        AppDTO appDTO = new AppDTO();
        appDTO.setObject(map);
        AppDTO a = new AppDTO();
        BeanUtils.copyProperties(appDTO, a);
        map = (Map) a.getObject();
        PageHelper.orderBy("pid,sort_no");
        List<SysOrg> list = this.getList(map);
        return TreeUtil.convert2Tree(list);
    }
    @Override
    public List<SysOrg> selectListByPid(Long id, String name, String userOrgCode, Integer state) {
        Map map = new HashMap();
        if (id != null) {
            map.put("pid", id);
        } else {
            SysUser user = SystemUtil.getLoginUser(Contants.LOGIN_TYPE_PC);
            if (user.getOrgId() == null || user.getOrgLv() == null) {
                map.put("pid", 0);
            } else {
                map.put("id", user.getOrgId());
            }
        }
        map.put("name", name);
        map.put("userOrgCode", userOrgCode);
        map.put("state", state);
        AppDTO appDTO = new AppDTO();
        appDTO.setObject(map);
        AppDTO a = new AppDTO();
        BeanUtils.copyProperties(appDTO, a);
        map = (Map) a.getObject();
        List<SysOrg> sysOrgList = sysOrgMapper.selectAll(map);
        return sysOrgList;
    }
    @Override
    public ChannelOrgConfigDetailDto queryNameAndParentName(Long orgId) {
        return sysOrgMapper.queryNameAndParentName(orgId);
    }
}
ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/util/SystemUtil.java
New file
@@ -0,0 +1,282 @@
package com.nuvole.four.util;
import cn.hutool.core.convert.Convert;
import com.nuvole.base.domain.SysUser;
import com.nuvole.constants.SystemConstants;
import com.nuvole.four.contants.Contants;
import com.nuvole.four.domain.StoreMemberInfo;
import com.nuvole.four.domain.StoreSupplierInfoAccount;
import com.nuvole.four.service.RedisService;
import com.nuvole.util.JWTUtil;
import jakarta.servlet.http.HttpServletRequest;
import org.apache.commons.lang.StringEscapeUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
/**
 * ç³»ç»Ÿå·¥å…·ç±»
 *
 * @Author: lc
 * @Date: 2019/6/3 20:10
 */
@Component
public class SystemUtil {
    private static RedisService redisService;
    @Autowired
    public void setRedisService(RedisService redisService) {
        SystemUtil.redisService = redisService;
    }
    /**
     * èŽ·å–request对象
     *
     * @param
     * @return : javax.servlet.http.HttpServletRequest
     * @author ChenLong
     * @date 2019/5/8 16:50
     * @version 1.0
     */
    public static HttpServletRequest getRequest() {
        ServletRequestAttributes requestAttributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
        HttpServletRequest request = requestAttributes.getRequest();
        return request;
    }
    /**
     * æ ¹æ®key获取header值
     *
     * @param k
     * @param k
     * @return : java.lang.String
     * @author ChenLong
     * @date 2019/5/8 16:55
     * @version 1.0
     */
    public static String getHeader(String k) {
        return StringEscapeUtils.unescapeHtml(getRequest().getHeader(k));
    }
    /**
     * å–token
     */
    public static String getToken(String loginType) {
        if (loginType.equals(Contants.LOGIN_TYPE_PC)) {
            return getPcToken();
        } else if (loginType.equals(Contants.LOGIN_TYPE_WECHAT)) {
            return getWechatToken();
        } else if (loginType.equals(Contants.LOGIN_TYPE_MANAGER_APP)) {
            return getManagerAppToken();
        } else if (loginType.equals(Contants.SCAN_WECHAT_TOKEN_HEADER)) {
            return getScanToken();
        }
        return "";
    }
    /**
     * èŽ·å–header中的扫码付 token
     */
    public static String getScanToken() {
        return getHeader(SystemConstants.SCAN_WECHAT_TOKEN_HEADER);
    }
    /**
     * èŽ·å–header中PC token
     *
     * @param
     * @return : java.lang.String
     * @author ChenLong
     * @date 2019/5/8 16:57
     * @version 1.0
     */
    public static String getPcToken() {
        return getHeader(SystemConstants.BASE_PC_TOKEN_HEADER);
    }
    /**
     * èŽ·å–header中PC ä¾›è´§å•†å¤´
     *
     * @return
     */
    public static String getSupplierPcToken() {
        return getHeader(SystemConstants.SUPPLIER_PC_TOKEN_HEADER);
    }
    /**
     * èŽ·å–header中的WECHAT token
     *
     * @Author: lc
     * @Date: 2019/6/14 11:43
     */
    public static String getWechatToken() {
        return getHeader(SystemConstants.SHOP_WECHAT_TOKEN_HEADER);
    }
    /**
     * èŽ·å–header中的客户经理app token
     *
     * @Author: lc
     * @Date: 2019/9/3 15:31
     */
    public static String getManagerAppToken() {
        return getHeader(SystemConstants.MANAGER_APP_TOKEN_HEADER);
    }
    /**
     * æ ¹æ®token获取pc登录用户信息
     *
     * @param token
     * @return : com.nuvole.merchant.domain.StoreMerchantShopAccount
     * @author ChenLong
     * @date 2019/5/8 17:00
     * @version 1.0
     */
    public static SysUser getPcLoginUserByToken(String token) {
        try {
            token = JWTUtil.getSubOfClaims(token);
        } catch (Exception e) {
            return null;
        }
        String redisK = Convert.toStr(redisService.get(SystemConstants.BASE_PC_USER_PREFIX + token));
        SysUser s = (SysUser) redisService.get(redisK);
        return s;
    }
    public static StoreSupplierInfoAccount getSupplierLoginUserByToken(String token) {
        try {
            token = JWTUtil.getSubOfClaims(token);
        } catch (Exception e) {
            return null;
        }
        String redisK = Convert.toStr(redisService.get(SystemConstants.BASE_PC_USER_PREFIX + token));
        StoreSupplierInfoAccount s = (StoreSupplierInfoAccount) redisService.get(redisK);
        return s;
    }
    /**
     * æ ¹æ®token获取wechat登录用户信息
     *
     * @Author: lc
     * @Date: 2019/6/14 11:44
     */
    public static StoreMemberInfo getWechatLoginUserByToken(String token) {
        return (StoreMemberInfo) redisService.get(SystemConstants.SHOP_WECHAT_USER_PREFIX + token);
    }
    /**
     * æ ¹æ®token获取扫码付登录用户
     *
     * @param token
     * @return
     */
    public static StoreMemberInfo getScanLoginUserByToken(String token) {
        return (StoreMemberInfo) redisService.get(SystemConstants.SCAN_WECHAT_USER_PREFIX + token);
    }
    /**
     * æ ¹æ®token获取客户经理app登录用户信息
     *
     * @Author: lc
     * @Date: 2019/9/3 15:33
     */
    public static SysUser getManagerAppLoginUserByToken(String token) {
        try {
            token = JWTUtil.getSubOfClaims(token);
        } catch (Exception e) {
            return new SysUser();
        }
        if (redisService.get(SystemConstants.MANAGER_APP_USER_PREFIX + token) == null) {
            return new SysUser();
        }
        String redisK = Convert.toStr(redisService.get(SystemConstants.MANAGER_APP_USER_PREFIX + token));
        SysUser s = (SysUser) redisService.get(redisK);
        return s;
    }
//
//    public static StoreSupplierInfoAccount getLoginSupplierUser() {
//        StoreSupplierInfoAccount supplierInfo = getPcLoginUserByToken(getPcToken());
//        if (supplierInfo == null) {
//            return new StoreSupplierInfoAccount();
//        }
//        StoreSupplierInfoAccount s = new StoreSupplierInfoAccount();
//        BeanUtils.copyProperties(supplierInfo, s);
//        supplierInfo = s;
//        return supplierInfo;
//    }
    /**
     * å–综合后台PC/客户经理app登录信息
     */
    public static SysUser getLoginUser(String loginType) {
        if (loginType.equals(Contants.LOGIN_TYPE_PC)) {
            SysUser sysUser = getPcLoginUserByToken(getPcToken());
            if (sysUser == null) {
                return new SysUser();
            }
            SysUser s = new SysUser();
            BeanUtils.copyProperties(sysUser, s);
            sysUser = s;
            return sysUser;
        } else if (loginType.equals(Contants.LOGIN_TYPE_MANAGER_APP)) {
            SysUser sysUser = getManagerAppLoginUserByToken(getManagerAppToken());
            SysUser s = new SysUser();
            BeanUtils.copyProperties(sysUser, s);
            sysUser = s;
            return sysUser;
        }
        return new SysUser();
    }
    /**
     * å–商城微信登录信息
     */
    public static StoreMemberInfo getMemberInfo() {
        StoreMemberInfo storeMemberInfo = getWechatLoginUserByToken(getWechatToken());
        if (storeMemberInfo != null) {
            StoreMemberInfo s = new StoreMemberInfo();
            BeanUtils.copyProperties(storeMemberInfo, s);
            storeMemberInfo = s;
        }
        return storeMemberInfo;
    }
    /************************************* èŽ·å–ç™»å½•ä¿¡æ¯ *****************************************/
    /**
     * èŽ·å–ç™»å½•ä¿¡æ¯ï¼ˆå•†æˆ·pc和商户app)
     */
    public static StoreSupplierInfoAccount getSupplierLoginUser(String loginType) {
        if (loginType.equals(Contants.LOGIN_TYPE_PC)) {
            StoreSupplierInfoAccount storeSupplierInfoAccount = getPcLoginSupplierUserByToken(getSupplierPcToken());
            StoreSupplierInfoAccount sto = new StoreSupplierInfoAccount();
            BeanUtils.copyProperties(storeSupplierInfoAccount, sto);
            return sto;
        }
        return new StoreSupplierInfoAccount();
    }
    /**
     * æ ¹æ®token获取pc登录用户信息
     */
    public static StoreSupplierInfoAccount getPcLoginSupplierUserByToken(String token) {
        try {
            token = JWTUtil.getSubOfClaims(token);
        } catch (Exception e) {
            return new StoreSupplierInfoAccount();
        }
        if (redisService.get(SystemConstants.SUPPLIER_PC_USER_PREFIX + token) == null) {
            return new StoreSupplierInfoAccount();
        }
        return (StoreSupplierInfoAccount) redisService.get(SystemConstants.SUPPLIER_PC_USER_PREFIX + token);
    }
}
ecosphere/ecosphere-four-payment/src/main/resources/alipay-sandbox.properties
New file
@@ -0,0 +1,17 @@
aliPay.pid=2088231183410951
#\u5E94\u7528appid(\u548C\u5546\u6237id\u7ED1\u5B9A\u8FC7)
aliPay.app-id=2021003199690698
#\u63A5\u4E0B\u6765\u4E09\u4E2A\u7528\u6765\u786E\u4FDDSSL
#\u5546\u6237\u79C1\u94A5
aliPay.merchant-private-key=MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCDTfN2hvaTa5yzAZ59TrJj7Cmejp7tPgm1qCgPwGBxiyPGpwJ2QCLGvmZk/kYFlvcivVZojLNynW3jQRe0zCz6jllSSNRBk3aOhLgmbsooc2OqLoFJE9mVJOeeQBiALXP4yup03u7adJgO+ATl0sTTRnGnvem5VxzREN1XuPnBj4+RunpQ0NfB5jolRXeDlVVZmVD2GyQrHDsHwkZsAEvidn93RD2SkAYa1BonRho5+SgOhaSmsq9kD3yRIaNtKh6Nyv6yrBb4XnHYPmykKl2LUhUg9arXTB0901Q4IV+Ys5SF6oTS/sRhZycLDYUqMd5LbEb284OAmTAklwYBLbe3AgMBAAECggEAJvLIdTAzlCcnpDGmwaTGZb132wCTQ+xTFP98Yq+96/BJ/HMt18XOiwWPegWy35WYWUWwi/KwiB8KqY51abvm26u98xqHW6xSTpQvy7axYK5ZsfF5iCPLNuJrkhWRLvRMolAOm/xE/af4Mvh++2051THgJNHAsqmUcq99+Ld13mQ1wq4KunaNsVDkG0FRFmWViNN48GmyEqpX/5eeVFbkEfKcXd7wwvi2EbgJud8op2TELX16cEaLBynMGdqcNmm13nEKbqqatyLln2xPN+yeyx72ndm5uMBW0mrpsgn15KgRSakFH3cZ1Ou2rNk5MYZ3pv4cGUsok7xWllcqL1mAgQKBgQD19MEsbBSkrzyTiLDkpgMS9XHOKrPPVcA6+EGLeG7ceCtzBOrr9MRGh0FuquJKyq7vYhE6RqLHQ2oLaGLFfhWj0HZ2vdcyGF0rHJUGJYsq3X1uc2E+vvKzGZzGCBTrNYUneBP47JNgv5lGwBDmJzn7mDc6OpYgezXiI0w4FOp0QwKBgQCIqp6G4Y7KrEgGh9xCfMW5PynOLIBfNKSNGTM4XvTGUVe2eZMRid2J6+GIEC8aJZQ8Oc/3JvMaTeIUnSyPwDoIbtvk4PWjvvTjQJZ0jkS4KR6VcVCwHlO7OXiOOlMlLr53Wwdx304wsfR9/oESVVs3A2hrc//PwbBI6bk0PLORfQKBgQDCytUzGWZAB4kyT0/JxrEokrtPTQKbco6MJZHDo94pPgMrVPm5ZmEMepKX0z7lfSCO9lwui0LgDcQuxL11LCZ3VuJ7qF6GjkU7n6dm9tUBXem5UCf0ScZtkhtXu47Vuc17NN6chsEyHoyGPBcmMGr7l9Ili8DaeLp0HwB+ahJFgQKBgDg9zsM/K54oS/O0EWajJlNXtQKNub50UYtnZXa7TQwYCXqkiWtcSvkpQ0TVNC0Ube5i9DyHoN+gUXueOupldvxlcsS79xqNyQWEXOZWbd1DvrxNR6FSua6AtiYBxpm0pNlFcsjf1rOfaDg5djBvQ/xdwKkHsaxzzvISjQ78NAGZAoGABK0g/t77vpwNo7+jskMQyGLwnNjOZiS/xA2fcj+0GAqYkDIHNiZTE5mniqX5TR7ioeozxI1jhYm6dMMa5BeOWUiCHW/Gvr1aM6MBcVFZ9nxSfPu6gyk8dO4FQRq5FsW7/0r9VSo/KBF7DuJoHOIBn0pO1piXr4UPrdj6p4DaYvE=
#\u652F\u4ED8\u5B9D\u516C\u94A5
aliPay.public-key=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtNBk2gZh3qdCxYcYQc3GO2l6A9js6KCU87d4QryrxWxTCVCTMQlM8OjTXHShfKcgDwE/dt0EHmn1pfEYYKPB4a37OfdxH9UZoW9pOu/Ws+EEOhHCheejYAYVtbPXllLGoPqKVy556lAYqofvpwhbe0d98WIcfRsQLpMkePWCg8KiXNL7+CPcTbqbI+167PrmvkQJ3vXRpr9Pkf/SJBkD59WVYrewnEainiiNVIQ+GpG9cSZYN6CRKnS9PW0zovBIgMszgB/62DrN0F0WyHgyBmiiwD0NjuaCmT19/WmaX4/VeDJ8MdtiV5mC0CMFJYTTAxq4J5oaHPjr99JTOFkApwIDAQAB
#TODO:  #\u5BF9\u79F0\u52A0\u5BC6\u5BC6\u94A5
#  content-key:
#\u63A5\u4E0B\u6765\u4E09\u4E2A\u662F\u76F8\u5173\u5730\u5740
#\u652F\u4ED8\u5B9D\u7F51\u5173
aliPay.gateway-url=https://openapi.alipay.com/gateway.do
#\u63A5\u6536\u7ED3\u679C\u901A\u77E5\u5730\u5740
aliPay.notify-url=xxxxxxxxxxx
#\u9875\u9762\u8DF3\u8F6C\u540C\u6B65\u901A\u77E5\u9875\u9762\u8DEF\u5F84
aliPay.return-url=xxxxxxxxxxx
ecosphere/ecosphere-four-payment/src/main/resources/apiclient_key.pem
New file
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOALnyQsjza9Fu
bSRx0KbF2zx1XD/B7AE+8yDQMRluKtmbsnJ1A0Eh60VPmCmj68KrhzpvNFtX80mD
Ov/CRHEZ1lwAGIphFt658jABdW67Z83SWSxojIf6AVh074accEzhnuIg2NTQNlKm
VNtsFR919pf4HZI4VcN4pVYJRH/8g7UytJ/N6CnZPpFRxZOtKBbDDkazY/vY1+Af
kRQgPIRIneAAGE0AbKodFktPe9aDn3/SusfNVVwg6keIEtnQVvvHh6CZoQEXp6mY
5RcaTTuiFJL6hHtGqozwKrYdaXgp/2rxyMBkqg2QACOgVUCSDLcRSuNAgePNTDbh
jntKa1oNAgMBAAECggEAT2zQRKujNtc3JFBIYOmFo3tn0AgFPQt1X4P1/s8vct5q
kDE5GAxtLFq9mnacd2sK339/9ChHn51ZlpNE0O36fW+8gPz1PYHH1gGeqLFSREc9
gACJsrWcJ7QlGtDPIbnaqpLLtMZlJvIK476L6xwpyR2OckdUfQv0FawJhAE5J24f
WkzlAKlAhAJ/M9RMv8QYz3HRnaMFcdY2s6cxcFPVYLFsO2R+5nQfFII3X4Z6fD+r
B3a/KMZHwcVFSBvRkikSKlhWAYQdHPiLZpORh32bMd03APceOxsOTN/wf9qwrcKF
O5qnHhEFjpOthwZQ56s2YVrn6zLEhVFSoAvaKuUNMQKBgQDtuGXxF3w5Lhip9trz
1MQXyTgywecyFSE5vaUK7WL74EQu/s0U3UCOb6SuOtyeHOJoOpGGuzUm0ZtDNo+k
bVGHRs2gu8iQDURD8FYExTOEFgLa4g9PUstlAASeUGT5dbrZWOiHpPHrfR1O04sQ
uc6vp0yk08mXY43EOLMRPCU7twKBgQDd1/WdRVUcv2Fc2xA57D1UKlGWzk4H7Ao1
TBmduszUwKCPr02gqdlCIUCzT7rhACWIq2SOmd8zKVNnOjL9zmMlmwCXadb/HLrE
NqbmSmkUUMayj91zvcwtASWXvf2kBg56MUDOmuuveLbcJfKXcs49GssMEhPZPRDr
AbRdoIngWwKBgQCOJxSexSJ9tvj8uidYY8UXTDaU86rjIguKUcOd8zKb2BIt4CSW
82+lPVHG9l/zFOa22T8oyE4SdolX+gqPkueL82UHVwOqUKSf09o8ZAhYVilC5qet
EZ+bOBWK7hxTqHkhe68hXhtkbJ7YAlxIljPoiiyk7BjCtL+TtSwvhD3npQKBgQCY
AsInaPnAQBdMFEOTHSCNCo5roqPvY7s++A1ZekWexvt+WWX84EWhvb1i4RAx2vLd
Kmw2FpPNr9SZmFSWe5SOkR6fogOTPbFwf+5vQK+uHwd4FYJuK7C7adzDlIk3mnrT
GerJZ3h1/WZ3hX0sb5uIXVKiy8RUCDcOgVWBDl9LnwKBgBx1snMWzSUXj1+1JSOl
pmFimM4YOPtFsiDFw+ntKPB7DIpYYFMxGYMYHh3kzB4F8nbTG1wC92s27DEGMdom
cIsR8kdngn//BtFhgyrq3dUD6ILb4t3kXW4/FAbPXB5v/ABXFp8eXzxoOSrCFBGC
SlwQbd8MtRbLLh/U1vdnBWr9
-----END PRIVATE KEY-----
ecosphere/ecosphere-four-payment/src/main/resources/application-dev.yml
New file
@@ -0,0 +1,77 @@
server:
  port: 9060
eureka:
  client:
    service-url:
      defaultZone: http://localhost:9000/eureka/
file:
  server: https://yqzx.jinmingyuan.com/file
  base-path: /ecosphereShop
  tmp-path: /tmp
  poster:
    path: /ecosphereShop
#####多数据源配置#####
#master
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://116.198.40.76:3306/ecosphere_shop_basics?characterEncoding=utf8&autoReconnect=true&useSSL=false
    username: root
    password: Bjjmy_2020
  redis:
    host: 116.198.40.76
    port: 6379
    password: Jmy2019.
    database: 2
  #rabbitMQ
  rabbitmq:
    host: 116.198.40.76
    port: 5672
    username: super
    password: Jmy2019.
    virtual-host: ecosphere
#客管系统
kg:
  #接口地址
  serverUrl: https://172.16.16.8
  #证书路径
  certsUrl: C:\Users\华为\Desktop\zfxt.pfx
  #证书key
  clientKey: ENC(G8cCcaj9gPzCLXW2vy4y3ap/Llx+W3GkvtpQP7vwFFo=)
  #证书TurstKey
  clientTurstKey: ENC(G8cCcaj9gPzCLXW2vy4y3ap/Llx+W3GkvtpQP7vwFFo=)
swagger:
  enable: true
#外网接口是否走call服务
service-type: false
# æ–°å¤§é™†pos默认appid
newpos:
  appid: new_land
  appsecret: pj@2Cs&&
# å¾®ä¿¡æ”¯ä»˜ç¨‹åºé…ç½®
wxminipay:
  #  appid: wx22159c42a5805166
#  mchid: 1251666601
#  mchid: 1630059373
#  appsecretKey: 9b16661a70453becdbc47dc53f6137a4
#  appsecretKey: 340ea8ab9886b9a446ea1ef6eb238d29
#  appsecretKey: 554ee5cf4bfe46d18adfc87e5daa1105
#  appsecretKey: Zhongzhouzhihuishuili12345678901
#  appsecretKey: 13d81c197caf4d41bc8afc183f43109f
#  serverDomain: http://localhost:9090
  serverDomain: http://1.14.252.104:7101/${spring.application.name}
#人才地址
ren:
  serverUrl: https://www.data-ren.com
#需要同PropertiesConstants.payWay一致
payWay: 2
# 0相同 1 ä¸åŒ
payGiveSame: 1
# ä¸­é‡‘支付配置文件路径
zhongJinPayConfigPath: D:\\MyProjects\\jmy\\ecosphere\\ecosphere-merchant\\src\\main\\resources\\cncpConfig\\payment
# æ˜¯å¦å¯ç”¨æ²³å—农信支付
hnnxpay:
  enabled: true
ecosphere/ecosphere-four-payment/src/main/resources/application-kf.yml
New file
@@ -0,0 +1,80 @@
server:
  port: 9062
eureka:
  client:
    service-url:
      defaultZone: http://localhost:9000/eureka/
#  instance:
#    #使用ip替代实例名
#    prefer-ip-address: true
#    #设置实例的ID为ip:port
#    instance-id: 1.14.252.104:7104
file:
  server: https://yqzx.jinmingyuan.com/file
  base-path: /ecosphereShopKf
  tmp-path: D:/tmp
  poster:
    path: /ecosphereShopKf
#####多数据源配置#####
#master
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://116.198.40.76:3306/ecosphere_base_four_payment_kf?characterEncoding=utf8&autoReconnect=true&useSSL=false
    username: root
    password: Bjjmy_2020
  redis:
    host: 116.198.40.76
    port: 6379
    password: Jmy2019.
    database: 5
  #rabbitMQ
  rabbitmq:
    host: 116.198.40.76
    port: 5672
    username: super
    password: Jmy2019.
    virtual-host: ecosphereKf
#客管系统
kg:
  #接口地址
  serverUrl: https://172.16.16.8
  #证书路径
  certsUrl: C:\Users\华为\Desktop\zfxt.pfx
  #证书key
  clientKey: ENC(G8cCcaj9gPzCLXW2vy4y3ap/Llx+W3GkvtpQP7vwFFo=)
  #证书TurstKey
  clientTurstKey: ENC(G8cCcaj9gPzCLXW2vy4y3ap/Llx+W3GkvtpQP7vwFFo=)
swagger:
  enable: true
#外网接口是否走call服务
service-type: false
# æ–°å¤§é™†pos默认appid
newpos:
  appid: new_land
  appsecret: pj@2Cs&&
# å¾®ä¿¡æ”¯ä»˜ç¨‹åºé…ç½®
wxminipay:
  #  appid: wx22159c42a5805166
  #  mchid: 1251666601
  #  mchid: 1630059373
  #  appsecretKey: 9b16661a70453becdbc47dc53f6137a4
  #  appsecretKey: 340ea8ab9886b9a446ea1ef6eb238d29
  #  appsecretKey: 554ee5cf4bfe46d18adfc87e5daa1105
  #  appsecretKey: Zhongzhouzhihuishuili12345678901
  #  appsecretKey: 13d81c197caf4d41bc8afc183f43109f
  #  serverDomain: http://localhost:9090
  serverDomain: http://116.198.40.76:9010/${spring.application.name}
#人才地址
ren:
  serverUrl: https://www.data-ren.com
#需要同PropertiesConstants.payWay一致
payWay: 2
# 0相同 1 ä¸åŒ
payGiveSame: 1
# ä¸­é‡‘支付配置文件路径
zhongJinPayConfigPath: D:\\MyProjects\\jmy\\ecosphere\\ecosphere-merchant\\src\\main\\resources\\cncpConfig\\payment
offLinePay:
  hnnx: true
ecosphere/ecosphere-four-payment/src/main/resources/application.properties
New file
@@ -0,0 +1,3 @@
spring.profiles.active=dev
# \u94F6\u884C\u5361\u98CE\u683C 1\u90AE\u653F\u7EFF\u5361 2\u91D1\u71D5\u5361
bank.card.style=1
ecosphere/ecosphere-four-payment/src/main/resources/application.yml
New file
@@ -0,0 +1,139 @@
swagger:
  base-package: com.nuvole.four
spring:
  http:
    encoding:
      charset: UTF-8
      enabled: true
      force: true
  servlet:
    #允许传输文件大小配置
    multipart:
      max-file-size: 100Mb
      max-request-size: 200Mb
  application:
    name: service-four-payment
  redis:
    jedis:
      pool:
        max-active: 2000
        max-wait: -1
        max-idle: 10
        min-idle: 0
    timeout: 30000
    #druid é“¾æŽ¥æ± 
  rabbitmq:
    publisher-confirms: true
    publisher-returns: true
    listener:
      direct:
        acknowledge-mode: manual
      simple:
        acknowledge-mode: manual
  datasource:
    druid:
      min-idle: 5
      initial-size: 5
      async-init: true
      async-close-connection-enable: true
      max-active: 150
      max-wait: 60000
      time-between-eviction-runs-millis: 60000
      min-evictable-idle-time-millis: 30000
      validation-query: SELECT 1 FROM DUAL
      test-while-idle: true
      test-on-borrow: false
      test-on-return: false
      pool-prepared-statements: true
      max-pool-prepared-statement-per-connection-size: 20
      filters: stat,wall,log4j2
      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
      web-stat-filter:
        enabled: true
        url-pattern: /*
        exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
        session-stat-enable: true
        profile-enable: true
      stat-view-servlet:
        enabled: false
        url-pattern: /druid/*
        login-username: stqAdmin
        login-password: m2UdVE40efM6A8FsCznj31JBt
        reset-enable: false
        allow: 127.0.0.1
      # deny: é»‘名单
      filter:
        stat:
          enabled: true
          log-slow-sql: true
          slow-sql-millis: 3000
          merge-sql: true
          db-type: mysql
        wall:
          enabled: true
          db-type: mysql
          config:
            alter-table-allow: false
            truncate-allow: false
            drop-table-allow: false
            none-base-statement-allow: false
            update-where-alay-true-check: true
            select-into-outfile-allow: false
            metadata-allow: true
          log-violation: true
          throw-exception: true
  #资源文件映射
  resources:
    static-locations: classpath:/static/,classpath:/public/,file:${file.upPath},file:${file.sysPath},file:${file.poster.path}
  banner:
    location: banner.txt
  jackson:
    date-format: yyyy-MM-dd HH:mm:ss
    time-zone: GMT+8
#mybaits映射配置
mybatis:
  mapper-locations: classpath:mapping/**/*Mapper.xml
  type-aliases-package: com.nuvole.four.domain
  configuration:
    map-underscore-to-camel-case: true
pagehelper:
  helper-dialect: mysql
  reasonable: false
  support-methods-s'y'sarguments: true
  params: count=countSql
#日志配置
logging:
  file: log/out.log
  pattern:
    console: "%d{yyyy/MM/dd-HH:mm:ss} [%thread] %-5level %logger- %msg%n"
    file: "%d{yyyy/MM/dd-HH:mm} [%thread] %-5level %logger- %msg%n"
  level:
    root: info
    com.nuvole.four: debug
feign:
  hystrix:
    enabled: true
hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 32000
ribbon:
  ConnectTimeout: 10000
  ReadTimeout: 30000
server:
  tomcat:
    uri-encoding: UTF-8
    max-threads: 1000
    max-connections: 1000
    basedir: tomcat
tl:
  could:
    fee: 0
# ä¼šå‘˜æ—¥é…ç½®
memberFlash:
  #每周几开启 5 ä¸ºå‘¨äº”,7为周日
  startWeekDay: 5
ecosphere/ecosphere-four-payment/src/main/resources/banner.txt
New file
@@ -0,0 +1,19 @@
                       .::::.
                     .::::::::.
                    :::::::::::
                 ..:::::::::::'
              '::::::::::::'
                .::::::::::
           '::::::::::::::..
                ..::::::::::::.     å¥³ç¥žä¿ä½‘,代码无bug
              ``::::::::::::::::
               ::::``:::::::::'        .:::.
              ::::'   ':::::'       .::::::::.
            .::::'      ::::     .:::::::'::::.
           .:::'       :::::  .:::::::::' ':::::.
          .::'        :::::.:::::::::'      ':::::.
         .::'         ::::::::::::::'         ``::::.
     ...:::           ::::::::::::'              ``::.
    ```` ':.          ':::::::::'                  ::::..
                       '.:::::'                    ':'````..
         :: Spring Boot ::   (v2.0.3.RELEASE)
ecosphere/ecosphere-four-payment/src/main/resources/express.properties
New file
@@ -0,0 +1,4 @@
EBusinessID=1328568
AppKey=29e39a04-582e-479c-bf0d-f0d5f9ca4897
Type=EMS
ReqURL=http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx
ecosphere/ecosphere-four-payment/src/main/resources/ftp.properties
New file
@@ -0,0 +1,3 @@
ftp.url=116.198.39.83
ftp.username=mysftp
ftp.mixpd=Bjjmy_2020
ecosphere/ecosphere-four-payment/src/main/resources/hnnx.properties
New file
@@ -0,0 +1,27 @@
# \u6CB3\u5357\u519C\u4FE1
#\u4EA4\u6613\u4E0A\u9001
hnnx.url=http://221.176.112.3:8030/SericeCenter
#\u4E00\u7EA7\u5546\u6237\u53F7
hnnx.merNbr=010020170801000001
#\u5E73\u53F0\u53F7
hnnx.appCode=00000000004
#\u8BC1\u4E66
hnnx.certPath=classpath:/hnnx/hnnxopenbank.pfx
#\u8BC1\u4E66\u5BC6\u7801
hnnx.certPwd=11111111
#\u9A8C\u7B7E\u516C\u94A5 \u8BB0\u5F97\u52A0\n
hnnx.pubKey=MIIDIjCCAgqgAwIBAgIEAaI2OjANBgkqhkiG9w0BAQsFADBTMQswCQYDVQQGEwJD\nTjELMAkGA1UECAwCSE4xCzAJBgNVBAcMAkpaMQ0wCwYDVQQKDARDU0lJMQ0wCwYD\nVQQLDARDU0lJMQwwCgYDVQQDDANndW8wHhcNMTcxMTMwMTcxNTQ4WhcNMTcxMTMw\nMTcxNzI4WjBTMQswCQYDVQQGEwJDTjELMAkGA1UECAwCSE4xCzAJBgNVBAcMAkpa\nMQ0wCwYDVQQKDARDU0lJMQ0wCwYDVQQLDARDU0lJMQwwCgYDVQQDDANndW8wggEi\nMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCcsoPLxmFskLaYXu6oIIyqfx9O\nrjoToBIdO2M05V4YjSsbyGgjNe4EMjeTmw6OeNUt66VZg755E85OoyQddcESTqLL\nEiAlVT/ExFeGsabwuV8Dz+HZDm8OYP1yLeyB2rsGauQrS4ZTBnFCQKedu71pvXX6\n8WC9b5DCEyDBScpNAOZpz4kgp41i4/Aeak1iF5dwCLzbzo5QxWv0we+vxOGfns+f\nTzxov+JVUz9VakW16spSR3bOonlS4xSxx196+j/fTjTyEu4zreH0IIbUZVZAyRQf\nueIdUQg1Y6FaywfGp0oeqy/a/kh/meY07yEhANTiJ+Y0fFmkbGu4dDeGDc31AgMB\nAAEwDQYJKoZIhvcNAQELBQADggEBAEkn51qfzUD/8A5bzUqrOkvi2fHHWWNnJLoJ\nt9AU4mUyRzV8uy9vi17HfHZf2sn4cXl4May+6ziiccVcEgU4FtY6BSPFfViHT1nR\nwCAqtRofjHtRHUCcIpfGl4cchl9syJJIqZvFqylvs1ffiRkl3I3JvzeQkB/3/C2P\nFOojS6sZVnRELGYhUv1J+unmS4cUcZyzYBR/UUYaZCSRpNroj+bV1Ghs4a4O+mhv\nMQsug07Nl2TZchabojn0IJvTZboGJREvvC//L64gL/qEq3LftLMXxHrfzys8lzxq\nRt2dTeElqm7uubLzIB/nqeibt6/gn37lOtBI2XUza6mz/iTUhoQ=
hnnx.platSubMerchantId=11
hnnx.branchId=111
#\u5FEB\u6377\u652F\u4ED8
hnnx.kjUrl=http://221.176.112.3:8006/pmPay
#\u4E00\u7EA7\u5546\u6237\u53F7
hnnx.kjMerNbr=010020170801000001
#\u516C\u94A5
hnnx.kjPubKey=MIIETzCCAzegAwIBAgIFQAJ5QwYwDQYJKoZIhvcNAQELBQAwXTELMAkGA1UEBhMC\nQ04xMDAuBgNVBAoTJ0NoaW5hIEZpbmFuY2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEcMBoGA1UEAxMTQ0ZDQSBBQ1MgVEVTVCBPQ0EzMTAeFw0xNzExMTMwMTI4\nMzJaFw0xOTExMTMwMTI4MzJaMHgxCzAJBgNVBAYTAkNOMRcwFQYDVQQKEw5DRkNBIFJTQSAwQ0EzMTERMA8GA1UECxMITG9jYWwgUkExGTAXBgNVBAsTEE9yZ2FuaXph\ndGlvbmFsLTExIjAgBgNVBAMMGTA1MUDlrp3mtqZAMzM1MzY1MjQ1MTIyQDEwggEi\nMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDSOGkcidudBD+EW6wFJ7wMOUnC\nbcSsatN1nK8i3xV8CXFqFLZI+tna/5pFf1vkwFpZzT/o9RfQTGVwX6TYaqcqiHxR\nBOodQvgnsjDj9R3gFA8T4i2fPo59F1hU0hoEuyi/4kpAq+Jtgmd2m48/ffVx8lZc\nIoGV2xi2drWdkyggilO+BCSrYm9CYjUk3o3aD78IYXbX3cIGhJdZwlRWCfkXxVtz\nMgTV3L8tmACZFwyb3mwSKKCRRwX4vrQ1KKRJleI7g0/gD5Pab/SCdVT8gmZ0N8Jx\n5YOkggQJM/FhTnokQuU3Eq3tCTPcH80US2nd9PvlWk/NB3oElBnf4oSetWLpAgMB\nAAGjgfowgfcwPwYIKwYBBQUHAQEEMzAxMC8GCCsGAQUFBzABhiNodHRwOi8vb2Nz\ncHRlc3QuY2ZjYS5jb20uY246ODAvb2NzcDAfBgNVHSMEGDAWgBSaPbSuZVj7zloF\neCagbSsEhrrG7DAMBgNVHRMBAf8EAjAAMDcGA1UdHwQwMC4wLKAqoCiGJmh0dHA6\nLy8yMTAuNzQuNDIuMy9PQ0EzMS9SU0EvY3JsMjcuY3JsMA4GA1UdDwEB/wQEAwIG\nwDAdBgNVHQ4EFgQUpd28TFA5+9PLZKvv/fgC8JMCVE8wHQYDVR0lBBYwFAYIKwYB\nBQUHAwIGCCsGAQUFBwMEMA0GCSqGSIb3DQEBCwUAA4IBAQAH2k5a4U+2taGiFJPh\nMgT2LVXe+93OQ7Jw0zV7IPaSqGnCnGL8GGow5m3zzI0e23DVDI1va45odnbB1Wdf\nf95Sqfl0Qm+dLhe2yFJVVO0KPT11/aNj7WjLCo2VGSTWvIrITukC9P9Am8Nq9aNt\nH7yVUTY4R71yAIDbFgQpoxqFiY1kf3lxnF52ZvCr42iDqljgD64Vq172qTYWKgiM\nCJKGk8sZkx9V9Xu9C+nqmSEz+PUkPbI4k7D/PISiaOQJ8Zi/qZJ2JaeEfx1eK8AF\n9PXx6z1nCGg8O+q1F+JWBqwcU3Xqls8oUivcHDwDWNsiAuoI/4Hn05BSvFReGe5I\n6c7M
#\u8BC1\u4E66
hnnx.kjCertPath=classpath:/hnnx/merchant-rsa.pfx
#\u8BC1\u4E66\u5BC6\u7801
hnnx.kjCertPwd=HNNX
ecosphere/ecosphere-four-payment/src/main/resources/hnnx/hnnxopenbank.pfx
Binary files differ
ecosphere/ecosphere-four-payment/src/main/resources/hnnx/merchant-rsa.pfx
Binary files differ
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityDistributeRecordMapper.xml
New file
@@ -0,0 +1,273 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ActivityDistributeRecordMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.ActivityDistributeRecord" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="org_id" property="orgId" jdbcType="BIGINT" />
    <result column="org_name" property="orgName" jdbcType="VARCHAR" />
    <result column="org_code" property="orgCode" jdbcType="VARCHAR" />
    <result column="activity_id" property="activityId" jdbcType="BIGINT" />
    <result column="total_fee" property="totalFee" jdbcType="BIGINT" />
    <result column="use_fee" property="useFee" jdbcType="BIGINT" />
    <result column="surplus_fee" property="surplusFee" jdbcType="BIGINT" />
    <result column="lv1_id" property="lv1Id" jdbcType="BIGINT" />
    <result column="lv2_id" property="lv2Id" jdbcType="BIGINT" />
    <result column="lv3_id" property="lv3Id" jdbcType="BIGINT" />
    <result column="lv4_id" property="lv4Id" jdbcType="BIGINT" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="deleted" property="deleted" jdbcType="INTEGER" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, org_id, org_name, org_code, activity_id, total_fee, use_fee, surplus_fee, lv1_id, lv2_id, lv3_id, lv4_id, status, deleted, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from activity_distribute_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    update activity_distribute_record set deleted = 1
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.ActivityDistributeRecord" >
    insert into activity_distribute_record (
      id,
      org_id,
      org_name,
      org_code,
      activity_id,
      total_fee,
      use_fee,
      surplus_fee,
      lv1_id,
      lv2_id,
      lv3_id,
      lv4_id,
      status,
      deleted,
      create_by,
      create_time,
      update_by,
      update_time
    )
    values (
             #{id,jdbcType=BIGINT},
             #{orgId,jdbcType=BIGINT},
             #{orgName,jdbcType=VARCHAR},
             #{orgCode,jdbcType=VARCHAR},
             #{activityId,jdbcType=BIGINT},
             #{totalFee,jdbcType=BIGINT},
             #{useFee,jdbcType=BIGINT},
             #{surplusFee,jdbcType=BIGINT},
             #{lv1Id,jdbcType=BIGINT},
             #{lv2Id,jdbcType=BIGINT},
             #{lv3Id,jdbcType=BIGINT},
             #{lv4Id,jdbcType=BIGINT},
             #{status,jdbcType=INTEGER},
             #{deleted,jdbcType=INTEGER},
             #{createBy,jdbcType=BIGINT},
             #{createTime,jdbcType=TIMESTAMP},
             #{updateBy,jdbcType=BIGINT},
             #{updateTime,jdbcType=TIMESTAMP}
           )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.ActivityDistributeRecord" >
    insert into activity_distribute_record
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="orgName != null" >
        org_name,
      </if>
      <if test="orgCode != null" >
        org_code,
      </if>
      <if test="activityId != null" >
        activity_id,
      </if>
      <if test="totalFee != null" >
        total_fee,
      </if>
      <if test="useFee != null" >
        use_fee,
      </if>
      <if test="surplusFee != null" >
        surplus_fee,
      </if>
      <if test="lv1Id != null" >
        lv1_id,
      </if>
      <if test="lv2Id != null" >
        lv2_id,
      </if>
      <if test="lv3Id != null" >
        lv3_id,
      </if>
      <if test="lv4Id != null" >
        lv4_id,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="deleted != null" >
        deleted,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null" >
        #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null" >
        #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="activityId != null" >
        #{activityId,jdbcType=BIGINT},
      </if>
      <if test="totalFee != null" >
        #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="useFee != null" >
        #{useFee,jdbcType=BIGINT},
      </if>
      <if test="surplusFee != null" >
        #{surplusFee,jdbcType=BIGINT},
      </if>
      <if test="lv1Id != null" >
        #{lv1Id,jdbcType=BIGINT},
      </if>
      <if test="lv2Id != null" >
        #{lv2Id,jdbcType=BIGINT},
      </if>
      <if test="lv3Id != null" >
        #{lv3Id,jdbcType=BIGINT},
      </if>
      <if test="lv4Id != null" >
        #{lv4Id,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="deleted != null" >
        #{deleted,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.ActivityDistributeRecord" >
    update activity_distribute_record
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null" >
        org_name = #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null" >
        org_code = #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="activityId != null" >
        activity_id = #{activityId,jdbcType=BIGINT},
      </if>
      <if test="totalFee != null" >
        total_fee = #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="useFee != null" >
        use_fee = #{useFee,jdbcType=BIGINT},
      </if>
      <if test="surplusFee != null" >
        surplus_fee = #{surplusFee,jdbcType=BIGINT},
      </if>
      <if test="lv1Id != null" >
        lv1_id = #{lv1Id,jdbcType=BIGINT},
      </if>
      <if test="lv2Id != null" >
        lv2_id = #{lv2Id,jdbcType=BIGINT},
      </if>
      <if test="lv3Id != null" >
        lv3_id = #{lv3Id,jdbcType=BIGINT},
      </if>
      <if test="lv4Id != null" >
        lv4_id = #{lv4Id,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="deleted != null" >
        deleted = #{deleted,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.ActivityDistributeRecord" >
    update activity_distribute_record
    set
      org_id = #{orgId,jdbcType=BIGINT},
      org_name = #{orgName,jdbcType=VARCHAR},
      org_code = #{orgCode,jdbcType=VARCHAR},
      activity_id = #{activityId,jdbcType=BIGINT},
      total_fee = #{totalFee,jdbcType=BIGINT},
      use_fee = #{useFee,jdbcType=BIGINT},
      surplus_fee = #{surplusFee,jdbcType=BIGINT},
      lv1_id = #{lv1Id,jdbcType=BIGINT},
      lv2_id = #{lv2Id,jdbcType=BIGINT},
      lv3_id = #{lv3Id,jdbcType=BIGINT},
      lv4_id = #{lv4Id,jdbcType=BIGINT},
      status = #{status,jdbcType=INTEGER},
      deleted = #{deleted,jdbcType=INTEGER},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityFeeMapper.xml
New file
@@ -0,0 +1,416 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ActivityFeeMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.ActivityFee" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="org_id" property="orgId" jdbcType="BIGINT" />
    <result column="org_code" property="orgCode" jdbcType="VARCHAR" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="code" property="code" jdbcType="VARCHAR" />
    <result column="begin_time" property="beginTime" jdbcType="TIMESTAMP" />
    <result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
    <result column="expire_time" property="expireTime" jdbcType="TIMESTAMP" />
    <result column="total_fee" property="totalFee" jdbcType="BIGINT" />
    <result column="use_fee" property="useFee" jdbcType="BIGINT" />
    <result column="surplus_fee" property="surplusFee" jdbcType="BIGINT" />
    <result column="online_agree_wx_rate" property="onlineAgreeWxRate" jdbcType="DECIMAL" />
    <result column="online_agree_zfb_rate" property="onlineAgreeZfbRate" jdbcType="DECIMAL" />
    <result column="online_agree_unionpay_rate" property="onlineAgreeUnionpayRate" jdbcType="DECIMAL" />
    <result column="offline_agree_wx_rate" property="offlineAgreeWxRate" jdbcType="DECIMAL" />
    <result column="offline_agree_zfb_rate" property="offlineAgreeZfbRate" jdbcType="DECIMAL" />
    <result column="offline_agree_unionpay_rate" property="offlineAgreeUnionpayRate" jdbcType="DECIMAL" />
    <result column="online_mer_wx_rate" property="onlineMerWxRate" jdbcType="DECIMAL" />
    <result column="online_mer_zfb_rate" property="onlineMerZfbRate" jdbcType="DECIMAL" />
    <result column="online_mer_unionpay_rate" property="onlineMerUnionpayRate" jdbcType="DECIMAL" />
    <result column="offline_mer_wx_rate" property="offlineMerWxRate" jdbcType="DECIMAL" />
    <result column="offline_mer_zfb_rate" property="offlineMerZfbRate" jdbcType="DECIMAL" />
    <result column="offline_mer_unionpay_rate" property="offlineMerUnionpayRate" jdbcType="DECIMAL" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="deleted" property="deleted" jdbcType="INTEGER" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, org_id, org_code, name, code, begin_time, end_time, expire_time, total_fee, use_fee, surplus_fee, online_agree_wx_rate, online_agree_zfb_rate, online_agree_unionpay_rate, offline_agree_wx_rate, offline_agree_zfb_rate, offline_agree_unionpay_rate, online_mer_wx_rate, online_mer_zfb_rate, online_mer_unionpay_rate, offline_mer_wx_rate, offline_mer_zfb_rate, offline_mer_unionpay_rate, status, deleted, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from activity_fee
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    update activity_fee set deleted = 1
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.ActivityFee" >
    insert into activity_fee (
      id,
      org_id,
      org_code,
      name,
      code,
      begin_time,
      end_time,
      expire_time,
      total_fee,
      use_fee,
      surplus_fee,
      online_agree_wx_rate,
      online_agree_zfb_rate,
      online_agree_unionpay_rate,
      offline_agree_wx_rate,
      offline_agree_zfb_rate,
      offline_agree_unionpay_rate,
      online_mer_wx_rate,
      online_mer_zfb_rate,
      online_mer_unionpay_rate,
      offline_mer_wx_rate,
      offline_mer_zfb_rate,
      offline_mer_unionpay_rate,
      status,
      deleted,
      create_by,
      create_time,
      update_by,
      update_time
    )
    values (
             #{id,jdbcType=BIGINT},
             #{orgId,jdbcType=BIGINT},
             #{orgCode,jdbcType=VARCHAR},
             #{name,jdbcType=VARCHAR},
             #{code,jdbcType=VARCHAR},
             #{beginTime,jdbcType=TIMESTAMP},
             #{endTime,jdbcType=TIMESTAMP},
             #{expireTime,jdbcType=TIMESTAMP},
             #{totalFee,jdbcType=BIGINT},
             #{useFee,jdbcType=BIGINT},
             #{surplusFee,jdbcType=BIGINT},
             #{onlineAgreeWxRate,jdbcType=DECIMAL},
             #{onlineAgreeZfbRate,jdbcType=DECIMAL},
             #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
             #{offlineAgreeWxRate,jdbcType=DECIMAL},
             #{offlineAgreeZfbRate,jdbcType=DECIMAL},
             #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
             #{onlineMerWxRate,jdbcType=DECIMAL},
             #{onlineMerZfbRate,jdbcType=DECIMAL},
             #{onlineMerUnionpayRate,jdbcType=DECIMAL},
             #{offlineMerWxRate,jdbcType=DECIMAL},
             #{offlineMerZfbRate,jdbcType=DECIMAL},
             #{offlineMerUnionpayRate,jdbcType=DECIMAL},
             #{status,jdbcType=INTEGER},
             #{deleted,jdbcType=INTEGER},
             #{createBy,jdbcType=BIGINT},
             #{createTime,jdbcType=TIMESTAMP},
             #{updateBy,jdbcType=BIGINT},
             #{updateTime,jdbcType=TIMESTAMP}
           )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.ActivityFee" >
    insert into activity_fee
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="orgCode != null" >
        org_code,
      </if>
      <if test="name != null" >
        name,
      </if>
      <if test="code != null" >
        code,
      </if>
      <if test="beginTime != null" >
        begin_time,
      </if>
      <if test="endTime != null" >
        end_time,
      </if>
      <if test="expireTime != null" >
        expire_time,
      </if>
      <if test="totalFee != null" >
        total_fee,
      </if>
      <if test="useFee != null" >
        use_fee,
      </if>
      <if test="surplusFee != null" >
        surplus_fee,
      </if>
      <if test="onlineAgreeWxRate != null" >
        online_agree_wx_rate,
      </if>
      <if test="onlineAgreeZfbRate != null" >
        online_agree_zfb_rate,
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        online_agree_unionpay_rate,
      </if>
      <if test="offlineAgreeWxRate != null" >
        offline_agree_wx_rate,
      </if>
      <if test="offlineAgreeZfbRate != null" >
        offline_agree_zfb_rate,
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        offline_agree_unionpay_rate,
      </if>
      <if test="onlineMerWxRate != null" >
        online_mer_wx_rate,
      </if>
      <if test="onlineMerZfbRate != null" >
        online_mer_zfb_rate,
      </if>
      <if test="onlineMerUnionpayRate != null" >
        online_mer_unionpay_rate,
      </if>
      <if test="offlineMerWxRate != null" >
        offline_mer_wx_rate,
      </if>
      <if test="offlineMerZfbRate != null" >
        offline_mer_zfb_rate,
      </if>
      <if test="offlineMerUnionpayRate != null" >
        offline_mer_unionpay_rate,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="deleted != null" >
        deleted,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgCode != null" >
        #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="name != null" >
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        #{code,jdbcType=VARCHAR},
      </if>
      <if test="beginTime != null" >
        #{beginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null" >
        #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expireTime != null" >
        #{expireTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalFee != null" >
        #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="useFee != null" >
        #{useFee,jdbcType=BIGINT},
      </if>
      <if test="surplusFee != null" >
        #{surplusFee,jdbcType=BIGINT},
      </if>
      <if test="onlineAgreeWxRate != null" >
        #{onlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeZfbRate != null" >
        #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeWxRate != null" >
        #{offlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeZfbRate != null" >
        #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerWxRate != null" >
        #{onlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerZfbRate != null" >
        #{onlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerUnionpayRate != null" >
        #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerWxRate != null" >
        #{offlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerZfbRate != null" >
        #{offlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerUnionpayRate != null" >
        #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="deleted != null" >
        #{deleted,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.ActivityFee" >
    update activity_fee
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgCode != null" >
        org_code = #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="name != null" >
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="code != null" >
        code = #{code,jdbcType=VARCHAR},
      </if>
      <if test="beginTime != null" >
        begin_time = #{beginTime,jdbcType=TIMESTAMP},
      </if>
      <if test="endTime != null" >
        end_time = #{endTime,jdbcType=TIMESTAMP},
      </if>
      <if test="expireTime != null" >
        expire_time = #{expireTime,jdbcType=TIMESTAMP},
      </if>
      <if test="totalFee != null" >
        total_fee = #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="useFee != null" >
        use_fee = #{useFee,jdbcType=BIGINT},
      </if>
      <if test="surplusFee != null" >
        surplus_fee = #{surplusFee,jdbcType=BIGINT},
      </if>
      <if test="onlineAgreeWxRate != null" >
        online_agree_wx_rate = #{onlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeZfbRate != null" >
        online_agree_zfb_rate = #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        online_agree_unionpay_rate = #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeWxRate != null" >
        offline_agree_wx_rate = #{offlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeZfbRate != null" >
        offline_agree_zfb_rate = #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        offline_agree_unionpay_rate = #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerWxRate != null" >
        online_mer_wx_rate = #{onlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerZfbRate != null" >
        online_mer_zfb_rate = #{onlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerUnionpayRate != null" >
        online_mer_unionpay_rate = #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerWxRate != null" >
        offline_mer_wx_rate = #{offlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerZfbRate != null" >
        offline_mer_zfb_rate = #{offlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerUnionpayRate != null" >
        offline_mer_unionpay_rate = #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="deleted != null" >
        deleted = #{deleted,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.ActivityFee" >
    update activity_fee
    set
      org_id = #{orgId,jdbcType=BIGINT},
      org_code = #{orgCode,jdbcType=VARCHAR},
      name = #{name,jdbcType=VARCHAR},
      code = #{code,jdbcType=VARCHAR},
      begin_time = #{beginTime,jdbcType=TIMESTAMP},
      end_time = #{endTime,jdbcType=TIMESTAMP},
      expire_time = #{expireTime,jdbcType=TIMESTAMP},
      total_fee = #{totalFee,jdbcType=BIGINT},
      use_fee = #{useFee,jdbcType=BIGINT},
      surplus_fee = #{surplusFee,jdbcType=BIGINT},
      online_agree_wx_rate = #{onlineAgreeWxRate,jdbcType=DECIMAL},
      online_agree_zfb_rate = #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      online_agree_unionpay_rate = #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      offline_agree_wx_rate = #{offlineAgreeWxRate,jdbcType=DECIMAL},
      offline_agree_zfb_rate = #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      offline_agree_unionpay_rate = #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      online_mer_wx_rate = #{onlineMerWxRate,jdbcType=DECIMAL},
      online_mer_zfb_rate = #{onlineMerZfbRate,jdbcType=DECIMAL},
      online_mer_unionpay_rate = #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      offline_mer_wx_rate = #{offlineMerWxRate,jdbcType=DECIMAL},
      offline_mer_zfb_rate = #{offlineMerZfbRate,jdbcType=DECIMAL},
      offline_mer_unionpay_rate = #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      status = #{status,jdbcType=INTEGER},
      deleted = #{deleted,jdbcType=INTEGER},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityShopRecordMapper.xml
New file
@@ -0,0 +1,234 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ActivityShopRecordMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.ActivityShopRecord" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="activity_id" property="activityId" jdbcType="BIGINT" />
    <result column="merchant_shop_id" property="merchantShopId" jdbcType="BIGINT" />
    <result column="channel_id" property="channelId" jdbcType="BIGINT" />
    <result column="channel_name" property="channelName" jdbcType="VARCHAR" />
    <result column="total_fee" property="totalFee" jdbcType="BIGINT" />
    <result column="third_shop_no" property="thirdShopNo" jdbcType="VARCHAR" />
    <result column="use_fee" property="useFee" jdbcType="BIGINT" />
    <result column="surplus_fee" property="surplusFee" jdbcType="BIGINT" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="deleted" property="deleted" jdbcType="INTEGER" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, activity_id, merchant_shop_id, channel_id, channel_name, total_fee, third_shop_no, use_fee, surplus_fee, status, deleted, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from activity_shop_record
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    update activity_shop_record set deleted = 1
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
    insert into activity_shop_record (
      id,
      activity_id,
      merchant_shop_id,
      channel_id,
      channel_name,
      total_fee,
      third_shop_no,
      use_fee,
      surplus_fee,
      status,
      deleted,
      create_by,
      create_time,
      update_by,
      update_time
      )
    values (
      #{id,jdbcType=BIGINT},
      #{activityId,jdbcType=BIGINT},
      #{merchantShopId,jdbcType=BIGINT},
      #{channelId,jdbcType=BIGINT},
      #{channelName,jdbcType=VARCHAR},
      #{totalFee,jdbcType=BIGINT},
      #{thirdShopNo,jdbcType=VARCHAR},
      #{useFee,jdbcType=BIGINT},
      #{surplusFee,jdbcType=BIGINT},
      #{status,jdbcType=INTEGER},
      #{deleted,jdbcType=INTEGER},
      #{createBy,jdbcType=BIGINT},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=BIGINT},
      #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
    insert into activity_shop_record
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="activityId != null" >
        activity_id,
      </if>
      <if test="merchantShopId != null" >
        merchant_shop_id,
      </if>
      <if test="channelId != null" >
        channel_id,
      </if>
      <if test="channelName != null" >
        channel_name,
      </if>
      <if test="totalFee != null" >
        total_fee,
      </if>
      <if test="thirdShopNo != null" >
        third_shop_no,
      </if>
      <if test="useFee != null" >
        use_fee,
      </if>
      <if test="surplusFee != null" >
        surplus_fee,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="deleted != null" >
        deleted,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="activityId != null" >
        #{activityId,jdbcType=BIGINT},
      </if>
      <if test="merchantShopId != null" >
        #{merchantShopId,jdbcType=BIGINT},
      </if>
      <if test="channelId != null" >
        #{channelId,jdbcType=BIGINT},
      </if>
      <if test="channelName != null" >
        #{channelName,jdbcType=VARCHAR},
      </if>
      <if test="totalFee != null" >
        #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="thirdShopNo != null" >
        #{thirdShopNo,jdbcType=VARCHAR},
      </if>
      <if test="useFee != null" >
        #{useFee,jdbcType=BIGINT},
      </if>
      <if test="surplusFee != null" >
        #{surplusFee,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="deleted != null" >
        #{deleted,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
    update activity_shop_record
    <set >
      <if test="activityId != null" >
        activity_id = #{activityId,jdbcType=BIGINT},
      </if>
      <if test="merchantShopId != null" >
        merchant_shop_id = #{merchantShopId,jdbcType=BIGINT},
      </if>
      <if test="channelId != null" >
        channel_id = #{channelId,jdbcType=BIGINT},
      </if>
      <if test="channelName != null" >
        channel_name = #{channelName,jdbcType=VARCHAR},
      </if>
      <if test="totalFee != null" >
        total_fee = #{totalFee,jdbcType=BIGINT},
      </if>
      <if test="thirdShopNo != null" >
        third_shop_no = #{thirdShopNo,jdbcType=VARCHAR},
      </if>
      <if test="useFee != null" >
        use_fee = #{useFee,jdbcType=BIGINT},
      </if>
      <if test="surplusFee != null" >
        surplus_fee = #{surplusFee,jdbcType=BIGINT},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="deleted != null" >
        deleted = #{deleted,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.ActivityShopRecord" >
    update activity_shop_record
    set
      activity_id = #{activityId,jdbcType=BIGINT},
      merchant_shop_id = #{merchantShopId,jdbcType=BIGINT},
      channel_id = #{channelId,jdbcType=BIGINT},
      channel_name = #{channelName,jdbcType=VARCHAR},
      total_fee = #{totalFee,jdbcType=BIGINT},
      third_shop_no = #{thirdShopNo,jdbcType=VARCHAR},
      use_fee = #{useFee,jdbcType=BIGINT},
      surplus_fee = #{surplusFee,jdbcType=BIGINT},
      status = #{status,jdbcType=INTEGER},
      deleted = #{deleted,jdbcType=INTEGER},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelInfoMapper.xml
New file
@@ -0,0 +1,338 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ChannelInfoMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.ChannelInfo" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="channel_code" property="channelCode" jdbcType="VARCHAR" />
    <result column="channel_name" property="channelName" jdbcType="VARCHAR" />
    <result column="extend_json" property="extendJson" jdbcType="VARCHAR" />
    <result column="online_agree_wx_rate" property="onlineAgreeWxRate" jdbcType="DECIMAL" />
    <result column="online_agree_zfb_rate" property="onlineAgreeZfbRate" jdbcType="DECIMAL" />
    <result column="online_agree_unionpay_rate" property="onlineAgreeUnionpayRate" jdbcType="DECIMAL" />
    <result column="offline_agree_wx_rate" property="offlineAgreeWxRate" jdbcType="DECIMAL" />
    <result column="offline_agree_zfb_rate" property="offlineAgreeZfbRate" jdbcType="DECIMAL" />
    <result column="offline_agree_unionpay_rate" property="offlineAgreeUnionpayRate" jdbcType="DECIMAL" />
    <result column="online_mer_wx_rate" property="onlineMerWxRate" jdbcType="DECIMAL" />
    <result column="online_mer_zfb_rate" property="onlineMerZfbRate" jdbcType="DECIMAL" />
    <result column="online_mer_unionpay_rate" property="onlineMerUnionpayRate" jdbcType="DECIMAL" />
    <result column="offline_mer_wx_rate" property="offlineMerWxRate" jdbcType="DECIMAL" />
    <result column="offline_mer_zfb_rate" property="offlineMerZfbRate" jdbcType="DECIMAL" />
    <result column="offline_mer_unionpay_rate" property="offlineMerUnionpayRate" jdbcType="DECIMAL" />
    <result column="certification" property="certification" jdbcType="VARCHAR" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="remark" property="remark" jdbcType="VARCHAR" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, channel_code, channel_name, extend_json, online_agree_wx_rate, online_agree_zfb_rate, online_agree_unionpay_rate, offline_agree_wx_rate, offline_agree_zfb_rate, offline_agree_unionpay_rate, online_mer_wx_rate, online_mer_zfb_rate, online_mer_unionpay_rate, offline_mer_wx_rate, offline_mer_zfb_rate, offline_mer_unionpay_rate, certification, status, remark, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from channel_info
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from channel_info
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.ChannelInfo" >
    insert into channel_info (
      id,
      channel_code,
      channel_name,
      extend_json,
      online_agree_wx_rate,
      online_agree_zfb_rate,
      online_agree_unionpay_rate,
      offline_agree_wx_rate,
      offline_agree_zfb_rate,
      offline_agree_unionpay_rate,
      online_mer_wx_rate,
      online_mer_zfb_rate,
      online_mer_unionpay_rate,
      offline_mer_wx_rate,
      offline_mer_zfb_rate,
      offline_mer_unionpay_rate,
      certification,
      status,
      remark,
      create_by,
      create_time,
      update_by,
      update_time
      )
    values (
      #{id,jdbcType=BIGINT},
      #{channelCode,jdbcType=VARCHAR},
      #{channelName,jdbcType=VARCHAR},
      #{extendJson,jdbcType=VARCHAR},
      #{onlineAgreeWxRate,jdbcType=DECIMAL},
      #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      #{offlineAgreeWxRate,jdbcType=DECIMAL},
      #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      #{onlineMerWxRate,jdbcType=DECIMAL},
      #{onlineMerZfbRate,jdbcType=DECIMAL},
      #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      #{offlineMerWxRate,jdbcType=DECIMAL},
      #{offlineMerZfbRate,jdbcType=DECIMAL},
      #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      #{certification,jdbcType=VARCHAR},
      #{status,jdbcType=INTEGER},
      #{remark,jdbcType=VARCHAR},
      #{createBy,jdbcType=BIGINT},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=BIGINT},
      #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.ChannelInfo" >
    insert into channel_info
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="channelCode != null" >
        channel_code,
      </if>
      <if test="channelName != null" >
        channel_name,
      </if>
      <if test="extendJson != null" >
        extend_json,
      </if>
      <if test="onlineAgreeWxRate != null" >
        online_agree_wx_rate,
      </if>
      <if test="onlineAgreeZfbRate != null" >
        online_agree_zfb_rate,
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        online_agree_unionpay_rate,
      </if>
      <if test="offlineAgreeWxRate != null" >
        offline_agree_wx_rate,
      </if>
      <if test="offlineAgreeZfbRate != null" >
        offline_agree_zfb_rate,
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        offline_agree_unionpay_rate,
      </if>
      <if test="onlineMerWxRate != null" >
        online_mer_wx_rate,
      </if>
      <if test="onlineMerZfbRate != null" >
        online_mer_zfb_rate,
      </if>
      <if test="onlineMerUnionpayRate != null" >
        online_mer_unionpay_rate,
      </if>
      <if test="offlineMerWxRate != null" >
        offline_mer_wx_rate,
      </if>
      <if test="offlineMerZfbRate != null" >
        offline_mer_zfb_rate,
      </if>
      <if test="offlineMerUnionpayRate != null" >
        offline_mer_unionpay_rate,
      </if>
      <if test="certification != null" >
        certification,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="remark != null" >
        remark,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="channelCode != null" >
        #{channelCode,jdbcType=VARCHAR},
      </if>
      <if test="channelName != null" >
        #{channelName,jdbcType=VARCHAR},
      </if>
      <if test="extendJson != null" >
        #{extendJson,jdbcType=VARCHAR},
      </if>
      <if test="onlineAgreeWxRate != null" >
        #{onlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeZfbRate != null" >
        #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeWxRate != null" >
        #{offlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeZfbRate != null" >
        #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerWxRate != null" >
        #{onlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerZfbRate != null" >
        #{onlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerUnionpayRate != null" >
        #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerWxRate != null" >
        #{offlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerZfbRate != null" >
        #{offlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerUnionpayRate != null" >
        #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="certification != null" >
        #{certification,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="remark != null" >
        #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.ChannelInfo" >
    update channel_info
    <set >
      <if test="channelCode != null" >
        channel_code = #{channelCode,jdbcType=VARCHAR},
      </if>
      <if test="channelName != null" >
        channel_name = #{channelName,jdbcType=VARCHAR},
      </if>
      <if test="extendJson != null" >
        extend_json = #{extendJson,jdbcType=VARCHAR},
      </if>
      <if test="onlineAgreeWxRate != null" >
        online_agree_wx_rate = #{onlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeZfbRate != null" >
        online_agree_zfb_rate = #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        online_agree_unionpay_rate = #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeWxRate != null" >
        offline_agree_wx_rate = #{offlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeZfbRate != null" >
        offline_agree_zfb_rate = #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        offline_agree_unionpay_rate = #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerWxRate != null" >
        online_mer_wx_rate = #{onlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerZfbRate != null" >
        online_mer_zfb_rate = #{onlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerUnionpayRate != null" >
        online_mer_unionpay_rate = #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerWxRate != null" >
        offline_mer_wx_rate = #{offlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerZfbRate != null" >
        offline_mer_zfb_rate = #{offlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerUnionpayRate != null" >
        offline_mer_unionpay_rate = #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="certification != null" >
        certification = #{certification,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="remark != null" >
        remark = #{remark,jdbcType=VARCHAR},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.ChannelInfo" >
    update channel_info
    set
      channel_code = #{channelCode,jdbcType=VARCHAR},
      channel_name = #{channelName,jdbcType=VARCHAR},
      extend_json = #{extendJson,jdbcType=VARCHAR},
      online_agree_wx_rate = #{onlineAgreeWxRate,jdbcType=DECIMAL},
      online_agree_zfb_rate = #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      online_agree_unionpay_rate = #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      offline_agree_wx_rate = #{offlineAgreeWxRate,jdbcType=DECIMAL},
      offline_agree_zfb_rate = #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      offline_agree_unionpay_rate = #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      online_mer_wx_rate = #{onlineMerWxRate,jdbcType=DECIMAL},
      online_mer_zfb_rate = #{onlineMerZfbRate,jdbcType=DECIMAL},
      online_mer_unionpay_rate = #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      offline_mer_wx_rate = #{offlineMerWxRate,jdbcType=DECIMAL},
      offline_mer_zfb_rate = #{offlineMerZfbRate,jdbcType=DECIMAL},
      offline_mer_unionpay_rate = #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      certification = #{certification,jdbcType=VARCHAR},
      status = #{status,jdbcType=INTEGER},
      remark = #{remark,jdbcType=VARCHAR},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelOrgConfigMapper.xml
New file
@@ -0,0 +1,182 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ChannelOrgConfigMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.ChannelOrgConfig" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="org_id" property="orgId" jdbcType="BIGINT" />
    <result column="org_name" property="orgName" jdbcType="VARCHAR" />
    <result column="p_org_name" property="pOrgName" jdbcType="VARCHAR" />
    <result column="channel_info_id" property="channelInfoId" jdbcType="BIGINT" />
    <result column="default_or_not" property="defaultOrNot" jdbcType="INTEGER" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, org_id, org_name, p_org_name, channel_info_id, default_or_not, status, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from channel_org_config
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    delete from channel_org_config
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.ChannelOrgConfig" >
    insert into channel_org_config (
      id,
      org_id,
      org_name,
      p_org_name,
      channel_info_id,
      default_or_not,
      status,
      create_by,
      create_time,
      update_by,
      update_time
      )
    values (
      #{id,jdbcType=BIGINT},
      #{orgId,jdbcType=BIGINT},
      #{orgName,jdbcType=VARCHAR},
      #{pOrgName,jdbcType=VARCHAR},
      #{channelInfoId,jdbcType=BIGINT},
      #{defaultOrNot,jdbcType=INTEGER},
      #{status,jdbcType=INTEGER},
      #{createBy,jdbcType=BIGINT},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=BIGINT},
      #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.ChannelOrgConfig" >
    insert into channel_org_config
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="orgId != null" >
        org_id,
      </if>
      <if test="orgName != null" >
        org_name,
      </if>
      <if test="pOrgName != null" >
        p_org_name,
      </if>
      <if test="channelInfoId != null" >
        channel_info_id,
      </if>
      <if test="defaultOrNot != null" >
        default_or_not,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="orgId != null" >
        #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null" >
        #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="pOrgName != null" >
        #{pOrgName,jdbcType=VARCHAR},
      </if>
      <if test="channelInfoId != null" >
        #{channelInfoId,jdbcType=BIGINT},
      </if>
      <if test="defaultOrNot != null" >
        #{defaultOrNot,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        #{status,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.ChannelOrgConfig" >
    update channel_org_config
    <set >
      <if test="orgId != null" >
        org_id = #{orgId,jdbcType=BIGINT},
      </if>
      <if test="orgName != null" >
        org_name = #{orgName,jdbcType=VARCHAR},
      </if>
      <if test="pOrgName != null" >
        p_org_name = #{pOrgName,jdbcType=VARCHAR},
      </if>
      <if test="channelInfoId != null" >
        channel_info_id = #{channelInfoId,jdbcType=BIGINT},
      </if>
      <if test="defaultOrNot != null" >
        default_or_not = #{defaultOrNot,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=INTEGER},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.ChannelOrgConfig" >
    update channel_org_config
    set
      org_id = #{orgId,jdbcType=BIGINT},
      org_name = #{orgName,jdbcType=VARCHAR},
      p_org_name = #{pOrgName,jdbcType=VARCHAR},
      channel_info_id = #{channelInfoId,jdbcType=BIGINT},
      default_or_not = #{defaultOrNot,jdbcType=INTEGER},
      status = #{status,jdbcType=INTEGER},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/SpecialFeeRateMapper.xml
New file
@@ -0,0 +1,338 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.SpecialFeeRateMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.SpecialFeeRate" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="channel_id" property="channelId" jdbcType="BIGINT" />
    <result column="industry_manage_id" property="industryManageId" jdbcType="BIGINT" />
    <result column="industry_code" property="industryCode" jdbcType="VARCHAR" />
    <result column="online_agree_wx_rate" property="onlineAgreeWxRate" jdbcType="DECIMAL" />
    <result column="online_agree_zfb_rate" property="onlineAgreeZfbRate" jdbcType="DECIMAL" />
    <result column="online_agree_unionpay_rate" property="onlineAgreeUnionpayRate" jdbcType="DECIMAL" />
    <result column="offline_agree_wx_rate" property="offlineAgreeWxRate" jdbcType="DECIMAL" />
    <result column="offline_agree_zfb_rate" property="offlineAgreeZfbRate" jdbcType="DECIMAL" />
    <result column="offline_agree_unionpay_rate" property="offlineAgreeUnionpayRate" jdbcType="DECIMAL" />
    <result column="online_mer_wx_rate" property="onlineMerWxRate" jdbcType="DECIMAL" />
    <result column="online_mer_zfb_rate" property="onlineMerZfbRate" jdbcType="DECIMAL" />
    <result column="online_mer_unionpay_rate" property="onlineMerUnionpayRate" jdbcType="DECIMAL" />
    <result column="offline_mer_wx_rate" property="offlineMerWxRate" jdbcType="DECIMAL" />
    <result column="offline_mer_zfb_rate" property="offlineMerZfbRate" jdbcType="DECIMAL" />
    <result column="offline_mer_unionpay_rate" property="offlineMerUnionpayRate" jdbcType="DECIMAL" />
    <result column="industry_name" property="industryName" jdbcType="VARCHAR" />
    <result column="status" property="status" jdbcType="SMALLINT" />
    <result column="deleted" property="deleted" jdbcType="SMALLINT" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, channel_id, industry_manage_id, industry_code, online_agree_wx_rate, online_agree_zfb_rate, online_agree_unionpay_rate, offline_agree_wx_rate, offline_agree_zfb_rate, offline_agree_unionpay_rate, online_mer_wx_rate, online_mer_zfb_rate, online_mer_unionpay_rate, offline_mer_wx_rate, offline_mer_zfb_rate, offline_mer_unionpay_rate, industry_name, status, deleted, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from special_fee_rate
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    update special_fee_rate set deleted = 1
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.SpecialFeeRate" >
    insert into special_fee_rate (
      id,
      channel_id,
      industry_manage_id,
      industry_code,
      online_agree_wx_rate,
      online_agree_zfb_rate,
      online_agree_unionpay_rate,
      offline_agree_wx_rate,
      offline_agree_zfb_rate,
      offline_agree_unionpay_rate,
      online_mer_wx_rate,
      online_mer_zfb_rate,
      online_mer_unionpay_rate,
      offline_mer_wx_rate,
      offline_mer_zfb_rate,
      offline_mer_unionpay_rate,
      industry_name,
      status,
      deleted,
      create_by,
      create_time,
      update_by,
      update_time
      )
    values (
      #{id,jdbcType=BIGINT},
      #{channelId,jdbcType=BIGINT},
      #{industryManageId,jdbcType=BIGINT},
      #{industryCode,jdbcType=VARCHAR},
      #{onlineAgreeWxRate,jdbcType=DECIMAL},
      #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      #{offlineAgreeWxRate,jdbcType=DECIMAL},
      #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      #{onlineMerWxRate,jdbcType=DECIMAL},
      #{onlineMerZfbRate,jdbcType=DECIMAL},
      #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      #{offlineMerWxRate,jdbcType=DECIMAL},
      #{offlineMerZfbRate,jdbcType=DECIMAL},
      #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      #{industryName,jdbcType=VARCHAR},
      #{status,jdbcType=SMALLINT},
      #{deleted,jdbcType=SMALLINT},
      #{createBy,jdbcType=BIGINT},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=BIGINT},
      #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.SpecialFeeRate" >
    insert into special_fee_rate
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="channelId != null" >
        channel_id,
      </if>
      <if test="industryManageId != null" >
        industry_manage_id,
      </if>
      <if test="industryCode != null" >
        industry_code,
      </if>
      <if test="onlineAgreeWxRate != null" >
        online_agree_wx_rate,
      </if>
      <if test="onlineAgreeZfbRate != null" >
        online_agree_zfb_rate,
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        online_agree_unionpay_rate,
      </if>
      <if test="offlineAgreeWxRate != null" >
        offline_agree_wx_rate,
      </if>
      <if test="offlineAgreeZfbRate != null" >
        offline_agree_zfb_rate,
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        offline_agree_unionpay_rate,
      </if>
      <if test="onlineMerWxRate != null" >
        online_mer_wx_rate,
      </if>
      <if test="onlineMerZfbRate != null" >
        online_mer_zfb_rate,
      </if>
      <if test="onlineMerUnionpayRate != null" >
        online_mer_unionpay_rate,
      </if>
      <if test="offlineMerWxRate != null" >
        offline_mer_wx_rate,
      </if>
      <if test="offlineMerZfbRate != null" >
        offline_mer_zfb_rate,
      </if>
      <if test="offlineMerUnionpayRate != null" >
        offline_mer_unionpay_rate,
      </if>
      <if test="industryName != null" >
        industry_name,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="deleted != null" >
        deleted,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="channelId != null" >
        #{channelId,jdbcType=BIGINT},
      </if>
      <if test="industryManageId != null" >
        #{industryManageId,jdbcType=BIGINT},
      </if>
      <if test="industryCode != null" >
        #{industryCode,jdbcType=VARCHAR},
      </if>
      <if test="onlineAgreeWxRate != null" >
        #{onlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeZfbRate != null" >
        #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeWxRate != null" >
        #{offlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeZfbRate != null" >
        #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerWxRate != null" >
        #{onlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerZfbRate != null" >
        #{onlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerUnionpayRate != null" >
        #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerWxRate != null" >
        #{offlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerZfbRate != null" >
        #{offlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerUnionpayRate != null" >
        #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="industryName != null" >
        #{industryName,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        #{status,jdbcType=SMALLINT},
      </if>
      <if test="deleted != null" >
        #{deleted,jdbcType=SMALLINT},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.SpecialFeeRate" >
    update special_fee_rate
    <set >
      <if test="channelId != null" >
        channel_id = #{channelId,jdbcType=BIGINT},
      </if>
      <if test="industryManageId != null" >
        industry_manage_id = #{industryManageId,jdbcType=BIGINT},
      </if>
      <if test="industryCode != null" >
        industry_code = #{industryCode,jdbcType=VARCHAR},
      </if>
      <if test="onlineAgreeWxRate != null" >
        online_agree_wx_rate = #{onlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeZfbRate != null" >
        online_agree_zfb_rate = #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineAgreeUnionpayRate != null" >
        online_agree_unionpay_rate = #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeWxRate != null" >
        offline_agree_wx_rate = #{offlineAgreeWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeZfbRate != null" >
        offline_agree_zfb_rate = #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineAgreeUnionpayRate != null" >
        offline_agree_unionpay_rate = #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerWxRate != null" >
        online_mer_wx_rate = #{onlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerZfbRate != null" >
        online_mer_zfb_rate = #{onlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="onlineMerUnionpayRate != null" >
        online_mer_unionpay_rate = #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerWxRate != null" >
        offline_mer_wx_rate = #{offlineMerWxRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerZfbRate != null" >
        offline_mer_zfb_rate = #{offlineMerZfbRate,jdbcType=DECIMAL},
      </if>
      <if test="offlineMerUnionpayRate != null" >
        offline_mer_unionpay_rate = #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      </if>
      <if test="industryName != null" >
        industry_name = #{industryName,jdbcType=VARCHAR},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=SMALLINT},
      </if>
      <if test="deleted != null" >
        deleted = #{deleted,jdbcType=SMALLINT},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.SpecialFeeRate" >
    update special_fee_rate
    set
      channel_id = #{channelId,jdbcType=BIGINT},
      industry_manage_id = #{industryManageId,jdbcType=BIGINT},
      industry_code = #{industryCode,jdbcType=VARCHAR},
      online_agree_wx_rate = #{onlineAgreeWxRate,jdbcType=DECIMAL},
      online_agree_zfb_rate = #{onlineAgreeZfbRate,jdbcType=DECIMAL},
      online_agree_unionpay_rate = #{onlineAgreeUnionpayRate,jdbcType=DECIMAL},
      offline_agree_wx_rate = #{offlineAgreeWxRate,jdbcType=DECIMAL},
      offline_agree_zfb_rate = #{offlineAgreeZfbRate,jdbcType=DECIMAL},
      offline_agree_unionpay_rate = #{offlineAgreeUnionpayRate,jdbcType=DECIMAL},
      online_mer_wx_rate = #{onlineMerWxRate,jdbcType=DECIMAL},
      online_mer_zfb_rate = #{onlineMerZfbRate,jdbcType=DECIMAL},
      online_mer_unionpay_rate = #{onlineMerUnionpayRate,jdbcType=DECIMAL},
      offline_mer_wx_rate = #{offlineMerWxRate,jdbcType=DECIMAL},
      offline_mer_zfb_rate = #{offlineMerZfbRate,jdbcType=DECIMAL},
      offline_mer_unionpay_rate = #{offlineMerUnionpayRate,jdbcType=DECIMAL},
      industry_name = #{industryName,jdbcType=VARCHAR},
      status = #{status,jdbcType=SMALLINT},
      deleted = #{deleted,jdbcType=SMALLINT},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/StoreIndustryManageMapper.xml
New file
@@ -0,0 +1,231 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.StoreIndustryManageMapper" >
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.StoreIndustryManage" >
    <id column="id" property="id" jdbcType="BIGINT" />
    <result column="p_id" property="pId" jdbcType="BIGINT" />
    <result column="industry_name" property="industryName" jdbcType="VARCHAR" />
    <result column="industry_code" property="industryCode" jdbcType="VARCHAR" />
    <result column="sort_no" property="sortNo" jdbcType="INTEGER" />
    <result column="is_special" property="isSpecial" jdbcType="SMALLINT" />
    <result column="level" property="level" jdbcType="INTEGER" />
    <result column="status" property="status" jdbcType="SMALLINT" />
    <result column="deleted" property="deleted" jdbcType="SMALLINT" />
    <result column="create_by" property="createBy" jdbcType="BIGINT" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_by" property="updateBy" jdbcType="BIGINT" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, p_id, industry_name, industry_code, sort_no, is_special, level, status, deleted, create_by, create_time, update_by, update_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" >
    select
    <include refid="Base_Column_List" />
    from store_industry_manage
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" >
    update store_industry_manage set deleted = 1
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.StoreIndustryManage" >
    insert into store_industry_manage (
      id,
      p_id,
      industry_name,
      industry_code,
      sort_no,
      is_special,
      level,
      status,
      deleted,
      create_by,
      create_time,
      update_by,
      update_time
      )
    values (
      #{id,jdbcType=BIGINT},
      #{pId,jdbcType=BIGINT},
      #{industryName,jdbcType=VARCHAR},
      #{industryCode,jdbcType=VARCHAR},
      #{sortNo,jdbcType=INTEGER},
      #{isSpecial,jdbcType=SMALLINT},
      #{level,jdbcType=INTEGER},
      #{status,jdbcType=SMALLINT},
      #{deleted,jdbcType=SMALLINT},
      #{createBy,jdbcType=BIGINT},
      #{createTime,jdbcType=TIMESTAMP},
      #{updateBy,jdbcType=BIGINT},
      #{updateTime,jdbcType=TIMESTAMP}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.StoreIndustryManage" >
    insert into store_industry_manage
    <trim prefix="(" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        id,
      </if>
      <if test="pId != null" >
        p_id,
      </if>
      <if test="industryName != null" >
        industry_name,
      </if>
      <if test="industryCode != null" >
        industry_code,
      </if>
      <if test="sortNo != null" >
        sort_no,
      </if>
      <if test="isSpecial != null" >
        is_special,
      </if>
      <if test="level != null" >
        level,
      </if>
      <if test="status != null" >
        status,
      </if>
      <if test="deleted != null" >
        deleted,
      </if>
      <if test="createBy != null" >
        create_by,
      </if>
      <if test="createTime != null" >
        create_time,
      </if>
      <if test="updateBy != null" >
        update_by,
      </if>
      <if test="updateTime != null" >
        update_time,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides="," >
      <if test="id != null" >
        #{id,jdbcType=BIGINT},
      </if>
      <if test="pId != null" >
        #{pId,jdbcType=BIGINT},
      </if>
      <if test="industryName != null" >
        #{industryName,jdbcType=VARCHAR},
      </if>
      <if test="industryCode != null" >
        #{industryCode,jdbcType=VARCHAR},
      </if>
      <if test="sortNo != null" >
        #{sortNo,jdbcType=INTEGER},
      </if>
      <if test="isSpecial != null" >
        #{isSpecial,jdbcType=SMALLINT},
      </if>
      <if test="level != null" >
        #{level,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        #{status,jdbcType=SMALLINT},
      </if>
      <if test="deleted != null" >
        #{deleted,jdbcType=SMALLINT},
      </if>
      <if test="createBy != null" >
        #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.StoreIndustryManage" >
    update store_industry_manage
    <set >
      <if test="pId != null" >
        p_id = #{pId,jdbcType=BIGINT},
      </if>
      <if test="industryName != null" >
        industry_name = #{industryName,jdbcType=VARCHAR},
      </if>
      <if test="industryCode != null" >
        industry_code = #{industryCode,jdbcType=VARCHAR},
      </if>
      <if test="sortNo != null" >
        sort_no = #{sortNo,jdbcType=INTEGER},
      </if>
      <if test="isSpecial != null" >
        is_special = #{isSpecial,jdbcType=SMALLINT},
      </if>
      <if test="level != null" >
        level = #{level,jdbcType=INTEGER},
      </if>
      <if test="status != null" >
        status = #{status,jdbcType=SMALLINT},
      </if>
      <if test="deleted != null" >
        deleted = #{deleted,jdbcType=SMALLINT},
      </if>
      <if test="createBy != null" >
        create_by = #{createBy,jdbcType=BIGINT},
      </if>
      <if test="createTime != null" >
        create_time = #{createTime,jdbcType=TIMESTAMP},
      </if>
      <if test="updateBy != null" >
        update_by = #{updateBy,jdbcType=BIGINT},
      </if>
      <if test="updateTime != null" >
        update_time = #{updateTime,jdbcType=TIMESTAMP},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.StoreIndustryManage" >
    update store_industry_manage
    set
      p_id = #{pId,jdbcType=BIGINT},
      industry_name = #{industryName,jdbcType=VARCHAR},
      industry_code = #{industryCode,jdbcType=VARCHAR},
      sort_no = #{sortNo,jdbcType=INTEGER},
      is_special = #{isSpecial,jdbcType=SMALLINT},
      level = #{level,jdbcType=INTEGER},
      status = #{status,jdbcType=SMALLINT},
      deleted = #{deleted,jdbcType=SMALLINT},
      create_by = #{createBy,jdbcType=BIGINT},
      create_time = #{createTime,jdbcType=TIMESTAMP},
      update_by = #{updateBy,jdbcType=BIGINT},
      update_time = #{updateTime,jdbcType=TIMESTAMP}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectAll" parameterType="map" resultMap="BaseResultMap">
    select <include refid="Base_Column_List" /> from store_industry_manage
    <where>
      deleted = 0
      <choose>
        <when test="pId != null">
          and p_id = #{pId}
        </when>
        <otherwise>
          <if test="id != null">
            and id = #{id}
          </if>
        </otherwise>
      </choose>
      <if test="industryName != null and industryName != '' ">
        and industry_name like CONCAT('%',#{industryName},'%')
      </if>
      <if test="status!=null">
        and status = #{status}
      </if>
    </where>
  </select>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/SysOrgMapper.xml
New file
@@ -0,0 +1,343 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nuvole.four.mapper.SysOrgMapper">
  <resultMap id="BaseResultMap" type="com.nuvole.four.domain.SysOrg">
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="name" jdbcType="VARCHAR" property="name" />
    <result column="org_code" jdbcType="VARCHAR" property="orgCode" />
    <result column="user_org_code" jdbcType="VARCHAR" property="userOrgCode" />
    <result column="pid" jdbcType="BIGINT" property="pid" />
    <result column="lv" jdbcType="INTEGER" property="lv" />
    <result column="sort_no" jdbcType="INTEGER" property="sortNo" />
    <result column="state" jdbcType="INTEGER" property="state" />
    <result column="note" jdbcType="VARCHAR" property="note" />
    <result column="lon" jdbcType="VARCHAR" property="lon" />
    <result column="lat" jdbcType="VARCHAR" property="lat" />
    <result column="phone" jdbcType="VARCHAR" property="phone" />
    <result column="open_time" jdbcType="VARCHAR" property="openTime" />
    <result column="address" jdbcType="VARCHAR" property="address" />
  </resultMap>
  <resultMap id="xqMap" type="HashMap">
    <result column="id" property="key" jdbcType="BIGINT"/>
    <result column="name" property="value" jdbcType="VARCHAR" />
  </resultMap>
  <sql id="Base_Column_List">
    id, name, org_code, user_org_code, pid, lv, sort_no, state, note, lon, lat,phone,open_time, address
  </sql>
  <select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from sys_org
    where id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
    delete from sys_org
    where id = #{id,jdbcType=BIGINT}
  </delete>
  <insert id="insert" parameterType="com.nuvole.four.domain.SysOrg">
    insert into sys_org (id, name, org_code,
      user_org_code, pid, lv,
      sort_no, state, note,
      lon, lat,phone,open_time, address)
    values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{orgCode,jdbcType=VARCHAR},
      #{userOrgCode,jdbcType=VARCHAR}, #{pid,jdbcType=BIGINT}, #{lv,jdbcType=INTEGER},
      #{sortNo,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, #{note,jdbcType=VARCHAR},
      #{lon,jdbcType=VARCHAR}, #{lat,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{openTime,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR})
  </insert>
  <insert id="insertSelective" parameterType="com.nuvole.four.domain.SysOrg">
    insert into sys_org
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">
        id,
      </if>
      <if test="name != null">
        name,
      </if>
      <if test="orgCode != null">
        org_code,
      </if>
      <if test="userOrgCode != null">
        user_org_code,
      </if>
      <if test="pid != null">
        pid,
      </if>
      <if test="lv != null">
        lv,
      </if>
      <if test="sortNo != null">
        sort_no,
      </if>
      <if test="state != null">
        state,
      </if>
      <if test="note != null">
        note,
      </if>
      <if test="lon != null">
        lon,
      </if>
      <if test="lat != null">
        lat,
      </if>
      <if test="phone != null">
        phone,
      </if>
      <if test="openTime != null">
        open_time,
      </if>
       <if test="address != null">
        address,
      </if>
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="id != null">
        #{id,jdbcType=BIGINT},
      </if>
      <if test="name != null">
        #{name,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null">
        #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="userOrgCode != null">
        #{userOrgCode,jdbcType=VARCHAR},
      </if>
      <if test="pid != null">
        #{pid,jdbcType=BIGINT},
      </if>
      <if test="lv != null">
        #{lv,jdbcType=INTEGER},
      </if>
      <if test="sortNo != null">
        #{sortNo,jdbcType=INTEGER},
      </if>
      <if test="state != null">
        #{state,jdbcType=INTEGER},
      </if>
      <if test="note != null">
        #{note,jdbcType=VARCHAR},
      </if>
      <if test="lon != null">
        #{lon,jdbcType=VARCHAR},
      </if>
      <if test="lat != null">
        #{lat,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        #{phone,jdbcType=VARCHAR},
      </if> <if test="openTime != null">
        #{openTime,jdbcType=VARCHAR},
      </if> <if test="address != null">
        #{address,jdbcType=VARCHAR},
      </if>
    </trim>
  </insert>
  <update id="updateByPrimaryKeySelective" parameterType="com.nuvole.four.domain.SysOrg">
    update sys_org
    <set>
      <if test="name != null">
        name = #{name,jdbcType=VARCHAR},
      </if>
      <if test="orgCode != null">
        org_code = #{orgCode,jdbcType=VARCHAR},
      </if>
      <if test="userOrgCode != null">
        user_org_code = #{userOrgCode,jdbcType=VARCHAR},
      </if>
      <if test="pid != null">
        pid = #{pid,jdbcType=BIGINT},
      </if>
      <if test="lv != null">
        lv = #{lv,jdbcType=INTEGER},
      </if>
      <if test="sortNo != null">
        sort_no = #{sortNo,jdbcType=INTEGER},
      </if>
      <if test="state != null">
        state = #{state,jdbcType=INTEGER},
      </if>
      <if test="note != null">
        note = #{note,jdbcType=VARCHAR},
      </if>
      <if test="lon != null">
        lon = #{lon,jdbcType=VARCHAR},
      </if>
      <if test="lat != null">
        lat = #{lat,jdbcType=VARCHAR},
      </if>
      <if test="phone != null">
        phone = #{phone,jdbcType=VARCHAR},
      </if>
      <if test="openTime != null">
        open_time = #{openTime,jdbcType=VARCHAR},
      </if>
      <if test="address != null">
        address = #{address,jdbcType=VARCHAR},
      </if>
    </set>
    where id = #{id,jdbcType=BIGINT}
  </update>
  <update id="updateByPrimaryKey" parameterType="com.nuvole.four.domain.SysOrg">
    update sys_org
    set name = #{name,jdbcType=VARCHAR},
      org_code = #{orgCode,jdbcType=VARCHAR},
      user_org_code = #{userOrgCode,jdbcType=VARCHAR},
      pid = #{pid,jdbcType=BIGINT},
      lv = #{lv,jdbcType=INTEGER},
      sort_no = #{sortNo,jdbcType=INTEGER},
      state = #{state,jdbcType=INTEGER},
      note = #{note,jdbcType=VARCHAR},
      lon = #{lon,jdbcType=VARCHAR},
      lat = #{lat,jdbcType=VARCHAR},
      phone = #{phone,jdbcType=VARCHAR},
      open_time = #{openTime,jdbcType=VARCHAR},
      address = #{address,jdbcType=VARCHAR}
    where id = #{id,jdbcType=BIGINT}
  </update>
  <select id="selectAll" parameterType="map" resultMap="BaseResultMap">
    select <include refid="Base_Column_List" /> from sys_org
    <where>
      <choose>
        <when test="pid != null">
          and pid = #{pid}
        </when>
        <otherwise>
          <if test="id != null">
            and id = #{id}
          </if>
        </otherwise>
      </choose>
      <if test="name!=null and name!=''">
        and name like CONCAT('%',#{name},'%')
      </if>
      <if test="userOrgCode!=null and userOrgCode!=''">
        and user_org_code like CONCAT(CONCAT('%',#{userOrgCode},'%'))
      </if>
      <if test="state!=null">
        and state = #{state}
      </if>
    </where>
  </select>
  <select id="selectAllOfMap" parameterType="map" resultType="map">
    select <include refid="Base_Column_List" /> from sys_org
  </select>
  <select id="getOrgByCode" parameterType="string" resultMap="BaseResultMap">
    select <include refid="Base_Column_List"></include>
    from sys_org
    where org_code=#{code}
  </select>
  <select id="getBranchByOrgCode" resultType="map">
    select (SELECT COUNT(u.id) from sys_user u where u.org_id = org.id
    <if test="userType != null">
      and user_type = #{userType}
    </if>
    ) managerNum,
    org.id as id,
    org.name as name,
    org.org_code as orgCode,
    org.user_org_code as userOrgCode,
    org.pid as pid,
    org.lv as lv,
    org.sort_no as sortNo,
    org.state as state,
    org.note as note,
    org.lon as lon,
    org.lat as lat,
    org.phone as phone,
    org.open_time as openTime,
    org.address as address
    from sys_org org
    LEFT JOIN sys_org o2 on o2.id = org.pid
    LEFT JOIN sys_org o1 on o1.id = o2.pid
    where org.lv=3
    <if test="code !=null and code !=''">
        and org.org_code like CONCAT( #{code},'%')
    </if>
    <if test="keyText !=null and keyText !=''">
      and (
      org.address like concat('%',#{keyText},'%')
      or org.`name` like concat('%',#{keyText},'%')
      or o1.`name` like concat('%',#{keyText},'%')
      or o2.`name` like concat('%',#{keyText},'%')
      )
    </if>
  </select>
  <select id="selectOrgByCode" parameterType="string" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List"/>
    from sys_org where user_org_code = #{code}
  </select>
  <insert id="batchImportOrg" parameterType="list">
    insert into sys_org
    (id,name,org_code,user_org_code,pid,lv,sort_no,state,note)
    values
    <foreach collection="list" index="i" item="n" separator=",">
      (
      #{n.id},
      #{n.name},
      #{n.orgCode},
      #{n.userOrgCode},
      #{n.pid},
      #{n.lv},
      #{n.sortNo},
      #{n.state},
      #{n.note}
      )
    </foreach>
  </insert>
  <select id="getListForRoleUser" parameterType="map" resultMap="BaseResultMap">
    select <include refid="Base_Column_List"></include>
     from sys_org
    <where>
        and state = 1
      <choose>
        <when test="pid != null">
          and pid = #{pid}
        </when>
        <otherwise>
          and id = #{orgId}
        </otherwise>
      </choose>
    </where>
  </select>
  <!--  æ­¤æ–¹æ³•为机构级联选择期公用方法,慎重修改  -->
  <select id="getOrgForSelector" parameterType="long" resultMap="BaseResultMap">
    select <include refid="Base_Column_List"/>
    from sys_org
    <where>
        and state = 1
        <if test="pid != null">
          and pid = #{pid}
        </if>
        <if test="rootId != null">
          and id = #{rootId}
        </if>
        <if test="pid == null and rootId==null">
          and pid = 0
        </if>
    </where>
    order by sort_no
  </select>
  <select id="getByOrgCode" parameterType="com.nuvole.four.domain.SysOrg" resultType="integer">
    select count(id) from sys_org
    <where>
      <if test="userOrgCode != null">
        and user_org_code = #{userOrgCode}
      </if>
      <if test="id != null">
        and id != #{id}
      </if>
    </where>
  </select>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityDistributeRecordMapper.xml
New file
@@ -0,0 +1,162 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ActivityDistributeRecordMapper" >
  <select id="selectList" parameterType="com.nuvole.four.domain.query.ActivityDistributeRecordQuery" resultType="com.nuvole.four.domain.ActivityDistributeRecord">
    select <include refid="Base_Column_List"></include>
    from activity_distribute_record
    <where>
      <if test="orgId!=null">
        and org_id =#{orgId}
      </if>
      <if test="orgName!=null and orgName!=''">
        and org_name like concat('%',#{orgName},'%')
      </if>
      <if test="totalFee!=null">
        and total_fee =#{totalFee}
      </if>
      <if test="useFee!=null">
        and use_fee =#{useFee}
      </if>
      <if test="surplusFee!=null">
        and surplus_fee =#{surplusFee}
      </if>
      <if test="lv1Id!=null">
        and lv1_id =#{lv1Id}
      </if>
      <if test="lv2Id!=null">
        and lv2_id =#{lv2Id}
      </if>
      <if test="lv3Id!=null">
        and lv3_id =#{lv3Id}
      </if>
      <if test="lv4Id!=null">
        and lv4_id =#{lv4Id}
      </if>
      <if test="status!=null">
        and status =#{status}
      </if>
      <if test="deleted!=null">
        and deleted =#{deleted}
      </if>
      <if test="createBy!=null">
        and create_by =#{createBy}
      </if>
      <if test="createTime!=null">
        and create_time =#{createTime}
      </if>
      <if test="updateBy!=null">
        and update_by =#{updateBy}
      </if>
      <if test="updateTime!=null">
        and update_time =#{updateTime}
      </if>
    </where>
  </select>
  <select id="getActivityDistributeRecordDetail" parameterType="java.lang.Long"
          resultType="com.nuvole.four.domain.dto.ActivityDistributeBudgetDto">
    SELECT
      adr.id,
      adr.total_fee totalFee,
      adr.surplus_fee surplusFee,
      so.id orgId,
      so.NAME orgName,
      so.org_code orgCode,
      so.pid pId,
      so.lv orgLv,
      IFNULL( adr.use_fee, 0 ) useFee,
      if( adr.id is null, 0, 1) useOrNot
    FROM
      sys_org so
        LEFT JOIN activity_distribute_record adr ON adr.org_id = so.id
        AND adr.deleted = 0 and adr.activity_id = #{activityId}
        <where>
            <if test="orgId != null">
              and so.pid = #{orgId}
            </if>
        </where>
    GROUP BY
      so.id
    ORDER BY
      sort_no
  </select>
  <select id="getActivityDistributeRecordDetailByAId" parameterType="java.lang.Long"
          resultType="com.nuvole.four.domain.dto.ActivityDistributeBudgetDto">
    SELECT
      adr.id,
      adr.total_fee totalFee,
      adr.surplus_fee surplusFee,
      so.id orgId,
      so.NAME orgName,
      so.org_code orgCode,
      so.pid pId,
      so.lv orgLv,
      IFNULL( adr.use_fee, 0 ) useFee
    FROM
      sys_org so
        JOIN activity_distribute_record adr ON adr.org_id = so.id
        AND adr.deleted = 0 and adr.activity_id = #{activityId}
        <where>
            AND adr.deleted = 0
          <if test="activityId != null">
            and adr.activity_id = #{activityId}
          </if>
          <if test="orgCode!=null and orgCode!=''">
            and adr.org_code like concat(#{orgCode}, '%')
          </if>
        </where>
      GROUP BY
        so.id
      ORDER BY
        sort_no
  </select>
  <select id="selectAllByActivityIds" resultType="com.nuvole.four.domain.ActivityDistributeRecord">
    select * from activity_distribute_record
    <where>
      and deleted = 0
      <if test="ids != null">
        and activity_id = in
        <foreach collection="ids" open="(" separator="," item="item" close=")">
          #{item}
        </foreach>
      </if>
    </where>
  </select>
  <insert id="batchInsertOrUpdate" parameterType="list">
    insert into activity_distribute_record
    (id,org_id,org_name,org_code,activity_id,total_fee,use_fee,surplus_fee,lv1_id,lv2_id,lv3_id,lv4_id,status,deleted,create_by,create_time,update_by,update_time)
    values
    <foreach collection="list" item="i" separator=",">
      (
      #{i.id},
      #{i.orgId},
      #{i.orgName},
      #{i.orgCode},
      #{i.activityId},
      #{i.totalFee},
      #{i.useFee},
      #{i.surplusFee},
      #{i.lv1Id},
      #{i.lv2Id},
      #{i.lv3Id},
      #{i.lv4Id},
      #{i.status},
      #{i.deleted},
      #{i.createBy},
      #{i.createTime},
      #{i.updateBy},
      #{i.updateTime}
      )
    </foreach>
    ON duplicate KEY UPDATE
      use_fee = values(use_fee),
      deleted = values(deleted),
      update_by = values(update_by),
      update_time = values(update_time)
  </insert>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityFeeMapper.xml
New file
@@ -0,0 +1,185 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ActivityFeeMapper" >
  <select id="selectList" parameterType="com.nuvole.four.domain.query.ActivityFeeQuery" resultType="com.nuvole.four.domain.ActivityFee">
    select <include refid="Base_Column_List"></include>
    from activity_fee
    <where>
      deleted = 0
      <if test="orgId!=null">
        and org_id =#{orgId}
      </if>
      <if test="orgCode!=null and orgCode!=''">
        and org_code like concat(#{orgCode}, '%')
      </if>
      <if test="name!=null and name!=''">
        and name like concat('%',#{name},'%')
      </if>
      <if test="code!=null and code!=''">
        and code like concat('%',#{code},'%')
      </if>
      <if test="beginTime!=null">
        and begin_time =#{beginTime}
      </if>
      <if test="endTime!=null">
        and end_time =#{endTime}
      </if>
      <if test="expireTime!=null">
        and expire_time =#{expireTime}
      </if>
      <if test="totalFee!=null">
        and total_fee =#{totalFee}
      </if>
      <if test="useFee!=null">
        and use_fee =#{useFee}
      </if>
      <if test="surplusFee!=null">
        and surplus_fee =#{surplusFee}
      </if>
      <if test="onlineAgreeWxRate!=null">
        and online_agree_wx_rate =#{onlineAgreeWxRate}
      </if>
      <if test="onlineAgreeZfbRate!=null">
        and online_agree_zfb_rate =#{onlineAgreeZfbRate}
      </if>
      <if test="onlineAgreeUnionpayRate!=null">
        and online_agree_unionpay_rate =#{onlineAgreeUnionpayRate}
      </if>
      <if test="offlineAgreeWxRate!=null">
        and offline_agree_wx_rate =#{offlineAgreeWxRate}
      </if>
      <if test="offlineAgreeZfbRate!=null">
        and offline_agree_zfb_rate =#{offlineAgreeZfbRate}
      </if>
      <if test="offlineAgreeUnionpayRate!=null">
        and offline_agree_unionpay_rate =#{offlineAgreeUnionpayRate}
      </if>
      <if test="onlineMerWxRate!=null">
        and online_mer_wx_rate =#{onlineMerWxRate}
      </if>
      <if test="onlineMerZfbRate!=null">
        and online_mer_zfb_rate =#{onlineMerZfbRate}
      </if>
      <if test="onlineMerUnionpayRate!=null">
        and online_mer_unionpay_rate =#{onlineMerUnionpayRate}
      </if>
      <if test="offlineMerWxRate!=null">
        and offline_mer_wx_rate =#{offlineMerWxRate}
      </if>
      <if test="offlineMerZfbRate!=null">
        and offline_mer_zfb_rate =#{offlineMerZfbRate}
      </if>
      <if test="offlineMerUnionpayRate!=null">
        and offline_mer_unionpay_rate =#{offlineMerUnionpayRate}
      </if>
      <if test="status!=null">
        and status =#{status}
      </if>
      <if test="deleted!=null">
        and deleted =#{deleted}
      </if>
      <if test="createBy!=null">
        and create_by =#{createBy}
      </if>
      <if test="createTime!=null">
        and create_time =#{createTime}
      </if>
      <if test="updateBy!=null">
        and update_by =#{updateBy}
      </if>
      <if test="updateTime!=null">
        and update_time =#{updateTime}
      </if>
    </where>
  </select>
  <select id="selectActivityWithDistribute" parameterType="com.nuvole.four.domain.query.ActivityFeeQuery" resultType="com.nuvole.four.domain.ActivityFee">
    SELECT
      af.id ,
      adr.org_id,
      adr.org_code,
      af.`name`,
      af.code,
      af.begin_time,
      af.end_time,
      af.expire_time,
      af.offline_mer_wx_rate,
      af.offline_mer_zfb_rate,
      af.offline_mer_unionpay_rate,
      af.`status`,
      af.create_time,
      af.create_by
    FROM
      activity_fee af
        JOIN activity_distribute_record adr ON adr.activity_id = af.id
    and af.deleted = 0
    <where>
      <if test="orgId != null">
        and adr.org_id = #{orgId}
      </if>
      <if test="orgCode!=null and orgCode!=''">
        and adr.org_code like concat(#{orgCode}, '%')
      </if>
      <if test="name!=null and name!=''">
        and af.name like concat('%',#{name},'%')
      </if>
      <if test="code!=null and code!=''">
        and af.code like concat('%',#{code},'%')
      </if>
      <if test="beginTime!=null">
        and af.begin_time =#{beginTime}
      </if>
      <if test="endTime!=null">
        and af.end_time =#{endTime}
      </if>
      <if test="expireTime!=null">
        and af.expire_time =#{expireTime}
      </if>
    </where>
    UNION
    SELECT
      af.id,
      '',
      '',
      af.`name`,
      af.CODE,
      af.begin_time,
      af.end_time,
      af.expire_time,
      af.offline_mer_wx_rate,
      af.offline_mer_zfb_rate,
      af.offline_mer_unionpay_rate,
      af.`status`,
      af.create_time,
      af.create_by
    FROM
        activity_fee af
    WHERE
        af.deleted = 0
    AND af.create_by = #{createBy}
  </select>
    <select id="getActivityFeeDetail" resultType="com.nuvole.four.domain.dto.ActivityDistributeBudgetDto">
      SELECT
        adr.id,
        af.total_fee totalFee,
        af.surplus_fee surplusFee,
        so.id orgId,
        so.NAME orgName,
        so.org_code orgCode,
        so.lv orgLv,
        so.pid pId,
        IFNULL( af.use_fee, 0 ) useFee,
        if( adr.id is null, 0, 1) useOrNot
      FROM
        sys_org so
          LEFT JOIN activity_distribute_record adr ON adr.org_id = so.id AND adr.deleted = 0
          left join activity_fee af on af.id = adr.activity_id and af.deleted = 0
      where so.pid = #{orgId}
      GROUP BY
        so.id
      ORDER BY
        sort_no
    </select>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityShopRecordMapper.xml
New file
@@ -0,0 +1,184 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ActivityShopRecordMapper" >
  <select id="selectList" parameterType="com.nuvole.four.domain.query.ActivityShopRecordQuery" resultType="com.nuvole.four.domain.ActivityShopRecord">
    select <include refid="Base_Column_List"></include>
    from activity_shop_record
    <where>
        deleted = 0
      <if test="activityId!=null">
        and activity_id =#{activityId}
      </if>
      <if test="merchantShopId!=null">
        and merchant_shop_id =#{merchantShopId}
      </if>
      <if test="channelId!=null">
        and channel_id =#{channelId}
      </if>
      <if test="channelName!=null and channelName!=''">
        and channel_name like concat('%',#{channelName},'%')
      </if>
      <if test="totalFee!=null">
        and total_fee =#{totalFee}
      </if>
      <if test="thirdShopNo!=null and thirdShopNo!=''">
        and third_shop_no like concat('%',#{thirdShopNo},'%')
      </if>
      <if test="useFee!=null">
        and use_fee =#{useFee}
      </if>
      <if test="surplusFee!=null">
        and surplus_fee =#{surplusFee}
      </if>
      <if test="status!=null">
        and status =#{status}
      </if>
      <if test="deleted!=null">
        and deleted =#{deleted}
      </if>
      <if test="createBy!=null">
        and create_by =#{createBy}
      </if>
      <if test="createTime!=null">
        and create_time =#{createTime}
      </if>
      <if test="updateBy!=null">
        and update_by =#{updateBy}
      </if>
      <if test="updateTime!=null">
        and update_time =#{updateTime}
      </if>
    </where>
  </select>
    <select id="getActRateByShopId" resultType="map">
        SELECT
            feeAct.online_mer_wx_rate onlineMerWxRate,
            feeAct.online_mer_zfb_rate onlineMerZfbRate,
            feeAct.online_mer_unionpay_rate onlineMerUnionpayRate ,
            feeAct.offline_mer_wx_rate offlineMerWxRate,
            feeAct.offline_mer_zfb_rate offlineMerZfbRate,
            feeAct.offline_mer_unionpay_rate offlineMerUnionpayRate,
            shopRec.surplus_fee surplusFee,
            shopRec.activity_id activityId,
            shopRec.merchant_shop_id merchantShopId,
            shopRec.channel_id channelId
        FROM
            activity_shop_record shopRec
            LEFT JOIN activity_fee feeAct ON feeAct.id = shopRec.activity_id
        <where>
            NOW() BETWEEN feeAct.begin_time
            AND feeAct.end_time
            AND feeAct.`status` = 1
            AND feeAct.deleted = 0
            AND shopRec.deleted = 0
            AND shopRec.`status` = 1
            <if test="shopId != null">
                AND shopRec.merchant_shop_id = #{shopId}
            </if>
            <if test="channelId != null">
                AND shopRec.channel_id = #{channelId}
            </if>
        </where>
    </select>
    <select id="getAlreadyMerchantList" resultType="com.nuvole.four.domain.dto.ActivityShopRecordDto">
        select * from activity_shop_record
        <where>
            deleted = 0 and activity_id = #{activityId}
            <if test="merchantId != null">
                and merchant_shop_id =#{merchantId}
            </if>
            <if test="channelId != null">
                and channel_id = #{channelId}
            </if>
        </where>
    </select>
    <select id="selectByCondition" resultType="com.nuvole.four.domain.ActivityShopRecord">
        select * from activity_shop_record
        <where>
            and deleted = 0 and activity_id = #{activityId}
            <if test="ids != null">
                and merchant_shop_id in
                <foreach collection="ids" item="item" index="index"
                         open="(" close=")" separator=",">
                    #{item}
                </foreach>
            </if>
        </where>
    </select>
    <update id="updShopSurplusFee">
        UPDATE activity_shop_record
        SET use_fee = IFNULL(use_fee,0) + #{useFee},
        surplus_fee = IFNULL(surplus_fee,total_fee) - #{useFee}
        WHERE
            activity_id = #{activityId}
            AND merchant_shop_id = #{merchantShopId}
            AND channel_id =#{channelId}
    </update>
    <insert id="batchInsert" parameterType="list">
        insert into activity_shop_record
        (id,
        activity_id,
        merchant_shop_id,
        channel_id,
        channel_name,
        total_fee,
        third_shop_no,
        use_fee,
        surplus_fee,
        status,
        deleted,
        create_by,
        create_time)
        values
        <foreach collection="list" item="i" separator=",">
            (
            #{i.id},
            #{i.activityId},
            #{i.merchantShopId},
            #{i.channelId},
            #{i.channelName},
            #{i.totalFee},
            #{i.thirdShopNo},
            #{i.useFee},
            #{i.surplusFee},
            #{i.status},
            #{i.deleted},
            #{i.createBy},
            #{i.createTime}
            )
        </foreach>
        ON duplicate KEY UPDATE
        update_by = values(update_by),
        update_time = values(update_time)
    </insert>
    <insert id="batchUpdate" parameterType="list">
        insert into activity_shop_record
            (id,
            total_fee,
            use_fee,
            surplus_fee,
            update_by,
            update_time)
        values
        <foreach collection="list" item="i" separator=",">
            (
            #{i.id},
            #{i.totalFee},
            #{i.useFee},
            #{i.surplusFee},
            #{i.updateBy},
            #{i.updateTime}
            )
        </foreach>
        ON duplicate KEY UPDATE
            total_fee = values(total_fee),
            use_fee = values(use_fee),
            surplus_fee = values(surplus_fee),
            update_by = values(update_by),
            update_time = values(update_time)
    </insert>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelInfoMapper.xml
New file
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ChannelInfoMapper">
    <select id="selectAll" parameterType="com.nuvole.four.domain.ChannelInfo"
            resultType="com.nuvole.four.domain.ChannelInfo">
        select
        <include refid="Base_Column_List"></include>
        from channel_info
        <where>
            <if test="channelName != null and channelName != '' ">
                and channel_name = #{channelName}
            </if>
            <if test="status!=null">
                and status = #{status}
            </if>
        </where>
    </select>
    <select id="getPageList" parameterType="com.nuvole.four.domain.ChannelInfo"
            resultType="com.nuvole.four.domain.dto.ChannelInfoDto">
        select ci.*,su.user_name createUserName from channel_info ci left join sys_user su on ci.create_by = su.id
        <where>
            <if test="channelName != null and channelName != '' ">
                and ci.channel_name = #{channelName}
            </if>
            <if test="status!=null">
                and ci.status = #{status}
            </if>
        </where>
    </select>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelOrgConfigMapper.xml
New file
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.ChannelOrgConfigMapper">
    <select id="selectAllList" parameterType="com.nuvole.four.domain.dto.ChannelOrgConfigDto"
            resultType="com.nuvole.four.domain.dto.ChannelOrgConfigDto">
        SELECT so.id orgId,so.name orgName,so.org_code orgCode,so.pid pId,coc.update_time updateTime,IFNULL(count(coc.id),0) configCount FROM sys_org so LEFT JOIN channel_org_config coc ON coc.org_id = so.id
        <where>
            so.state = 1
            <if test="orgName != null and orgName != '' ">
                and so.name like CONCAT(CONCAT('%',#{orgName},'%'))
            </if>
            <if test="orgId != null">
                and so.pid = #{orgId}
            </if>
        </where>
        GROUP BY so.id order by sort_no
    </select>
    <select id="selectAll" parameterType="com.nuvole.four.domain.ChannelOrgConfig"
            resultType="com.nuvole.four.domain.ChannelOrgConfig">
        select
        <include refid="Base_Column_List"></include>
        from channel_info
        <where>
            <if test="orgId != null">
                and org_id = #{orgId}
            </if>
        </where>
    </select>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendSpecialFeeRateMapper.xml
New file
@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.SpecialFeeRateMapper" >
  <select id="selectList" parameterType="com.nuvole.four.domain.query.SpecialFeeRateQuery" resultType="com.nuvole.four.domain.SpecialFeeRate">
    select <include refid="Base_Column_List"></include>
    from special_fee_rate
    <where>
      <if test="channelId!=null">
        and channel_id =#{channelId}
      </if>
      <if test="industryManageId!=null">
        and industry_manage_id =#{industryManageId}
      </if>
      <if test="industryCode!=null and industryCode!=''">
        and industry_code like concat('%',#{industryCode},'%')
      </if>
      <if test="onlineAgreeWxRate!=null">
        and online_agree_wx_rate =#{onlineAgreeWxRate}
      </if>
      <if test="onlineAgreeZfbRate!=null">
        and online_agree_zfb_rate =#{onlineAgreeZfbRate}
      </if>
      <if test="onlineAgreeUnionpayRate!=null">
        and online_agree_unionpay_rate =#{onlineAgreeUnionpayRate}
      </if>
      <if test="offlineAgreeWxRate!=null">
        and offline_agree_wx_rate =#{offlineAgreeWxRate}
      </if>
      <if test="offlineAgreeZfbRate!=null">
        and offline_agree_zfb_rate =#{offlineAgreeZfbRate}
      </if>
      <if test="offlineAgreeUnionpayRate!=null">
        and offline_agree_unionpay_rate =#{offlineAgreeUnionpayRate}
      </if>
      <if test="onlineMerWxRate!=null">
        and online_mer_wx_rate =#{onlineMerWxRate}
      </if>
      <if test="onlineMerZfbRate!=null">
        and online_mer_zfb_rate =#{onlineMerZfbRate}
      </if>
      <if test="onlineMerUnionpayRate!=null">
        and online_mer_unionpay_rate =#{onlineMerUnionpayRate}
      </if>
      <if test="offlineMerWxRate!=null">
        and offline_mer_wx_rate =#{offlineMerWxRate}
      </if>
      <if test="offlineMerZfbRate!=null">
        and offline_mer_zfb_rate =#{offlineMerZfbRate}
      </if>
      <if test="offlineMerUnionpayRate!=null">
        and offline_mer_unionpay_rate =#{offlineMerUnionpayRate}
      </if>
      <if test="industryName!=null and industryName!=''">
        and industry_name like concat('%',#{industryName},'%')
      </if>
      <if test="status!=null">
        and status =#{status}
      </if>
      <if test="deleted!=null">
        and deleted =#{deleted}
      </if>
      <if test="createBy!=null">
        and create_by =#{createBy}
      </if>
      <if test="createTime!=null">
        and create_time =#{createTime}
      </if>
      <if test="updateBy!=null">
        and update_by =#{updateBy}
      </if>
      <if test="updateTime!=null">
        and update_time =#{updateTime}
      </if>
    </where>
  </select>
  <select id="selectByIndustryId" parameterType="java.lang.Long" resultType="com.nuvole.four.domain.SpecialFeeRate">
     SELECT
       *
     FROM
       special_fee_rate
     WHERE
       deleted = 0
       AND industry_manage_id = #{industryId} and channel_id = #{channelId}
  </select>
  <insert id="batchInsert" parameterType="list">
    insert into special_fee_rate
        (id, channel_id, industry_manage_id, industry_code, online_agree_wx_rate, online_agree_zfb_rate, online_agree_unionpay_rate, offline_agree_wx_rate, offline_agree_zfb_rate, offline_agree_unionpay_rate, online_mer_wx_rate, online_mer_zfb_rate, online_mer_unionpay_rate, offline_mer_wx_rate, offline_mer_zfb_rate, offline_mer_unionpay_rate, industry_name, status, deleted, create_by, create_time)
    values
    <foreach collection="list" item="i" separator=",">
      (
      #{i.id},
      #{i.channelId},
      #{i.industryManageId},
      #{i.industryCode},
      #{i.onlineAgreeWxRate},
      #{i.onlineAgreeZfbRate},
      #{i.onlineAgreeUnionpayRate},
      #{i.offlineAgreeWxRate},
      #{i.offlineAgreeZfbRate},
      #{i.offlineAgreeUnionpayRate},
      #{i.onlineMerWxRate},
      #{i.onlineMerZfbRate},
      #{i.onlineMerUnionpayRate},
      #{i.offlineMerWxRate},
      #{i.offlineMerZfbRate},
      #{i.offlineMerUnionpayRate},
      #{i.industryName},
      #{i.status},
      #{i.deleted},
      #{i.createBy},
      #{i.createTime}
      )
    </foreach>
    ON duplicate KEY UPDATE
      online_agree_wx_rate = values(online_agree_wx_rate),
      online_agree_zfb_rate = values(online_agree_zfb_rate),
      online_agree_unionpay_rate = values(online_agree_unionpay_rate),
      offline_agree_wx_rate = values(offline_agree_wx_rate),
      offline_agree_zfb_rate = values(offline_agree_zfb_rate),
      offline_agree_unionpay_rate = values(offline_agree_unionpay_rate),
      online_mer_wx_rate = values(online_mer_wx_rate),
      online_mer_zfb_rate = values(online_mer_zfb_rate),
      online_mer_unionpay_rate = values(online_mer_unionpay_rate),
      offline_mer_wx_rate = values(offline_mer_wx_rate),
      offline_mer_zfb_rate = values(offline_mer_zfb_rate),
      offline_mer_unionpay_rate = values(offline_mer_unionpay_rate),
      update_by = values(update_by),
      update_time = values(update_time)
  </insert>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendStoreIndustryManageMapper.xml
New file
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.nuvole.four.mapper.StoreIndustryManageMapper" >
  <select id="selectList" parameterType="com.nuvole.four.domain.query.StoreIndustryManageQuery" resultType="com.nuvole.four.domain.StoreIndustryManage">
    select <include refid="Base_Column_List"></include>
    from store_industry_manage
    <where>
        deleted = 0
      <if test="pId!=null">
        and p_id =#{pId}
      </if>
      <if test="industryName!=null and industryName!=''">
        and industry_name like concat('%',#{industryName},'%')
      </if>
      <if test="industryCode!=null and industryCode!=''">
        and industry_code like concat('%',#{industryCode},'%')
      </if>
      <if test="sortNo!=null">
        and sort_no =#{sortNo}
      </if>
      <if test="isSpecial!=null">
        and is_special =#{isSpecial}
      </if>
      <if test="level!=null">
        and level =#{level}
      </if>
      <if test="status!=null">
        and status =#{status}
      </if>
      <if test="createBy!=null">
        and create_by =#{createBy}
      </if>
      <if test="createTime!=null">
        and create_time =#{createTime}
      </if>
      <if test="updateBy!=null">
        and update_by =#{updateBy}
      </if>
      <if test="updateTime!=null">
        and update_time =#{updateTime}
      </if>
    </where>
  </select>
</mapper>
ecosphere/ecosphere-four-payment/src/main/resources/payTl-test.yml
New file
@@ -0,0 +1,8 @@
tl-pay:
  url: http://test.allinpay.com/open/gateway
  appId: 1549646645901975554
  secretKey: DCRXgrguX88HCi0lqWFZyjqsBJZdOzN4
  certPath: ./1549646645901975554.pfx
  certPwd: 123456
  tlCertPath: ./TLCert-test.cer
  accountSetNo: 400363
ecosphere/ecosphere-four-payment/src/main/resources/pfx/zfxt.pfx
Binary files differ
ecosphere/ecosphere-four-payment/src/main/resources/qdl.properties
New file
@@ -0,0 +1,6 @@
#\u7FFC\u652F\u4ED8\u914D\u7F6E\u6587\u4EF6
# \u5E73\u53F0\u5546\u5546\u6237\u53F7
qdl.institutionCode=3178036951928327
#\u5C0F\u7A0B\u5E8F\u4F7F\u7528\u7684\u4E3B\u5546\u6237\u53F7
qdl.mainMerchantCode=610003141902948
ecosphere/ecosphere-four-payment/src/main/resources/qdl/ÌìÒíµç×ÓÉÌÎñÓÐÏÞ¹«Ë¾.cer
Binary files differ
ecosphere/ecosphere-four-payment/src/main/resources/qdl/ºÓÄÏàËßÂÖÇÄܿƼ¼ÓÐÏÞ¹«Ë¾.P12
Binary files differ
ecosphere/ecosphere-four-payment/src/main/resources/qrTemp/muBan.png
ecosphere/ecosphere-four-payment/src/main/resources/sftp.properties
New file
@@ -0,0 +1,3 @@
ftp.url=116.198.39.83
ftp.username=mysftp
ftp.mixpd=Bjjmy_2020
ecosphere/ecosphere-four-payment/src/main/resources/wxV3/apiclient_key.pem
New file
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDOALnyQsjza9Fu
bSRx0KbF2zx1XD/B7AE+8yDQMRluKtmbsnJ1A0Eh60VPmCmj68KrhzpvNFtX80mD
Ov/CRHEZ1lwAGIphFt658jABdW67Z83SWSxojIf6AVh074accEzhnuIg2NTQNlKm
VNtsFR919pf4HZI4VcN4pVYJRH/8g7UytJ/N6CnZPpFRxZOtKBbDDkazY/vY1+Af
kRQgPIRIneAAGE0AbKodFktPe9aDn3/SusfNVVwg6keIEtnQVvvHh6CZoQEXp6mY
5RcaTTuiFJL6hHtGqozwKrYdaXgp/2rxyMBkqg2QACOgVUCSDLcRSuNAgePNTDbh
jntKa1oNAgMBAAECggEAT2zQRKujNtc3JFBIYOmFo3tn0AgFPQt1X4P1/s8vct5q
kDE5GAxtLFq9mnacd2sK339/9ChHn51ZlpNE0O36fW+8gPz1PYHH1gGeqLFSREc9
gACJsrWcJ7QlGtDPIbnaqpLLtMZlJvIK476L6xwpyR2OckdUfQv0FawJhAE5J24f
WkzlAKlAhAJ/M9RMv8QYz3HRnaMFcdY2s6cxcFPVYLFsO2R+5nQfFII3X4Z6fD+r
B3a/KMZHwcVFSBvRkikSKlhWAYQdHPiLZpORh32bMd03APceOxsOTN/wf9qwrcKF
O5qnHhEFjpOthwZQ56s2YVrn6zLEhVFSoAvaKuUNMQKBgQDtuGXxF3w5Lhip9trz
1MQXyTgywecyFSE5vaUK7WL74EQu/s0U3UCOb6SuOtyeHOJoOpGGuzUm0ZtDNo+k
bVGHRs2gu8iQDURD8FYExTOEFgLa4g9PUstlAASeUGT5dbrZWOiHpPHrfR1O04sQ
uc6vp0yk08mXY43EOLMRPCU7twKBgQDd1/WdRVUcv2Fc2xA57D1UKlGWzk4H7Ao1
TBmduszUwKCPr02gqdlCIUCzT7rhACWIq2SOmd8zKVNnOjL9zmMlmwCXadb/HLrE
NqbmSmkUUMayj91zvcwtASWXvf2kBg56MUDOmuuveLbcJfKXcs49GssMEhPZPRDr
AbRdoIngWwKBgQCOJxSexSJ9tvj8uidYY8UXTDaU86rjIguKUcOd8zKb2BIt4CSW
82+lPVHG9l/zFOa22T8oyE4SdolX+gqPkueL82UHVwOqUKSf09o8ZAhYVilC5qet
EZ+bOBWK7hxTqHkhe68hXhtkbJ7YAlxIljPoiiyk7BjCtL+TtSwvhD3npQKBgQCY
AsInaPnAQBdMFEOTHSCNCo5roqPvY7s++A1ZekWexvt+WWX84EWhvb1i4RAx2vLd
Kmw2FpPNr9SZmFSWe5SOkR6fogOTPbFwf+5vQK+uHwd4FYJuK7C7adzDlIk3mnrT
GerJZ3h1/WZ3hX0sb5uIXVKiy8RUCDcOgVWBDl9LnwKBgBx1snMWzSUXj1+1JSOl
pmFimM4YOPtFsiDFw+ntKPB7DIpYYFMxGYMYHh3kzB4F8nbTG1wC92s27DEGMdom
cIsR8kdngn//BtFhgyrq3dUD6ILb4t3kXW4/FAbPXB5v/ABXFp8eXzxoOSrCFBGC
SlwQbd8MtRbLLh/U1vdnBWr9
-----END PRIVATE KEY-----
ecosphere/ecosphere-four-payment/src/main/resources/wxpay.properties
New file
@@ -0,0 +1,9 @@
#\u670D\u52A1\u5546\u5546\u6237\u53F7
wxpay.mch-id=1633049026
#\u5546\u6237API\u8BC1\u4E66\u5E8F\u5217\u53F7
wxpay.mch-serial-no=3EFA95814CE672B5C4A6AD59F53F3DFD50736EDB
#\u5546\u6237\u79C1\u94A5\u6587\u4EF6
wxpay.private-key-path=classpath:/wxV3/apiclient_key.pem
#wxpay.private-key-path=/opt/home/ecosphere/jar3/apiclient_key.pem
#apiV3\u5BC6\u94A5
wxpay.api-v3-key=G0W38atmAZkxIMn61zfu2lDoqdhLTjYC
ecosphere/ecosphere-four-payment/src/main/resources/ydOss.properties
New file
@@ -0,0 +1,11 @@
#\u586B\u5199\u8981\u4E0A\u4F20\u5230\u7684\u5B58\u50A8\u6876\u540D\u79F0\uFF0C\u4F8B\u5982'example-bucket'\u3002
ydOss.bucketName=ecosphere
#\u586B\u5199\u5B58\u50A8\u6876\uFF08Bucket\uFF09\u6240\u5728\u5730\u57DF\u5BF9\u5E94\u7684 endpoint \u548C Region\u3002
# \u5185\u7F51
ydOss.endpoint=eos.zhengzhou-4-internal.cmecloud.cn
# \u4E92\u8054\u7F51
ydOss.endpointNet=https://eos.zhengzhou-4.cmecloud.cn
ydOss.region=zhengzhou4
#\u586B\u5199 EOS \u8D26\u53F7\u7684\u8BA4\u8BC1\u4FE1\u606F\uFF0C\u6216\u8005\u5B50\u8D26\u53F7\u7684\u8BA4\u8BC1\u4FE1\u606F\u3002
ydOss.accessKey=1PMC6XN2QVDEN6M6IWQB
ydOss.secretKey=tfbfDxHZGUIl7s3kb2fJyHCLtpZLydbzEhlTRmIy
ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/MybatisGeneratorTest.java
New file
@@ -0,0 +1,37 @@
package com.nuvole.four;
import org.junit.Test;
import org.mybatis.generator.api.MyBatisGenerator;
import org.mybatis.generator.config.Configuration;
import org.mybatis.generator.config.xml.ConfigurationParser;
import org.mybatis.generator.internal.DefaultShellCallback;
import org.springframework.util.ResourceUtils;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* @ClassName MybatisGeneratorTest
* @Description Mybatis代码生成器
* @author ChenLong
* @date 2019/4/12 14:28
* @version 1.0
*/
public class MybatisGeneratorTest {
    @Test
    public void testGenerator() throws Exception{
        List<String> warnings = new ArrayList<String>();
        boolean overwrite = true;
        //指定 é€†å‘工程配置文件
        File configFile = ResourceUtils.getFile("classpath:generatorConfig.xml");
        //File configFile = new File("generatorConfig.xml");
        ConfigurationParser cp = new ConfigurationParser(warnings);
        Configuration config = cp.parseConfiguration(configFile);
        DefaultShellCallback callback = new DefaultShellCallback(overwrite);
        MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings);
        myBatisGenerator.generate(null);
    }
}
ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/NumberTest.java
New file
@@ -0,0 +1,41 @@
package com.nuvole.four;
import cn.hutool.core.util.NumberUtil;
import com.nuvole.base.domain.SysUser;
import com.tangmou.ConvertDto;
import org.junit.Test;
import org.springframework.http.ResponseEntity;
import java.util.ArrayList;
import java.util.List;
/**
 * @author ChenLong
 * @version 1.0
 * @ClassName NumberTest
 * @date 2019/6/20 17:37
 */
public class NumberTest {
    @Test
    public void testCeil() {
//        System.out.println(NumberUtil.div(6, 5000));
//        System.out.println(6 / 5000);
//        System.out.println(Math.ceil(NumberUtil.div(6, 5000)));
//        Long a = 6L;
//        System.out.println(a.floatValue());
        SysUser user = new SysUser(){{
            setId(1L);
            setMobile("1233");
        }};
        List lis = new ArrayList();
        lis.add(user);
//        user = ConvertDto.convert(user);
//        System.out.println(user.getMobile().toString());
        Object o = ResponseEntity.ok(null).getBody();
        System.out.println(user.getId().toString());
        System.out.println(lis.toString());
    }
}
ecosphere/ecosphere-four-payment/src/test/resources/generatorConfig.xml
New file
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
        PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
        "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <classPathEntry
            location="D:\workspace\mysql-connector-java-5.1.23-bin.jar"/>
    <context id="Mysql" targetRuntime="MyBatis3" defaultModelType="flat">
        <commentGenerator>
            <property name="suppressAllComments" value="false"></property>
            <property name="suppressDate" value="false"></property>
            <property name="addRemarkComments" value="true"/>
            <property name="author" value="system-generator"/>
            <property name="javaFileEncoding" value="utf-8"/>
        </commentGenerator>
        <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                        connectionURL="jdbc:mysql://116.198.40.76:3306/ecosphere_base_four_payment_kf?useSSL=false"
                        userId="root"
                        password="Bjjmy_2020">
            <property name="nullCatalogMeansCurrent" value="true"/>
        </jdbcConnection>
        <javaTypeResolver>
            <property name="forceBigDecimals" value="false"/>
        </javaTypeResolver>
        <javaModelGenerator targetPackage="com.nuvole.four.domain" targetProject="src/main/java">
            <property name="enableSubPackages" value="true"></property>
            <property name="trimStrings" value="true"></property>
        </javaModelGenerator>
        <sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources">
            <property name="enableSubPackages" value="true"></property>
        </sqlMapGenerator>
        <!--ANNOTATEDMAPPER,XMLMAPPER-->
        <javaClientGenerator type="XMLMAPPER" targetPackage="com.nuvole.four.mapper" targetProject="src/main/java">
            <property name="enableSubPackages" value="true"/>
        </javaClientGenerator>
        <!-- % è¡¨ç¤ºæ‰€æœ‰çš„表 -->
        <!-- è¦ç”Ÿæˆçš„表 tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
        <table tableName="channel_org_config"
               enableCountByExample="false"
               enableUpdateByExample="false"
               enableDeleteByExample="false"
               enableSelectByExample="false"
               selectByExampleQueryId="false"
        ></table>
    </context>
</generatorConfiguration>