From 15a0280ae9e7db96fdf0744c722d214d2cb5a0e5 Mon Sep 17 00:00:00 2001 From: xuekang <914468783@qq.com> Date: 星期一, 13 五月 2024 08:46:37 +0800 Subject: [PATCH] payment初始化 --- ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityFeeMapper.xml | 185 ecosphere/ecosphere-four-payment/src/main/resources/application-dev.yml | 77 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityDistributeRecordController.java | 81 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityFeeDetailDto.java | 28 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityShopRecordController.java | 242 + ecosphere/ecosphere-four-payment/src/main/resources/express.properties | 4 ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityShopRecordMapper.xml | 184 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelInfoService.java | 36 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelInfoController.java | 151 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SpecialFeeRateController.java | 88 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SysOrg.java | 167 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDto.java | 34 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityDistributeRecordMapper.java | 78 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/StoreIndustryManageServiceImpl.java | 164 ecosphere/ecosphere-four-payment/src/test/resources/generatorConfig.xml | 56 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/StoreIndustryManageMapper.java | 75 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityShopRecordDto.java | 48 ecosphere/ecosphere-four-payment/src/main/resources/qdl.properties | 6 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseClientFallbackFactory.java | 208 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreSupplierInfoAccount.java | 62 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityShopRecordServiceImpl.java | 167 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelOrgConfigMapper.java | 74 ecosphere/ecosphere-four-payment/src/main/resources/wxV3/apiclient_key.pem | 28 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelOrgConfigController.java | 109 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityDistributeRecordService.java | 47 ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelInfoMapper.xml | 338 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/AcceptResult.java | 40 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityFee.java | 104 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelInfoDto.java | 15 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelOrgConfigService.java | 35 ecosphere/ecosphere-four-payment/src/main/resources/pfx/zfxt.pfx | 0 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/contants/Contants.java | 42 ecosphere/ecosphere-four-payment/src/main/resources/application.yml | 139 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityFeeMapper.java | 61 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityFeeServiceImpl.java | 296 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityShopRecordService.java | 70 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppChannelOrgConfigController.java | 60 ecosphere/ecosphere-four-payment/src/main/resources/hnnx/merchant-rsa.pfx | 0 ecosphere/ecosphere-four-payment/src/main/resources/mapping/StoreIndustryManageMapper.xml | 231 + ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelInfoMapper.xml | 32 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityShopRecord.java | 62 ecosphere/ecosphere-four-payment/src/main/resources/ftp.properties | 3 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ChannelOrgConfigParam.java | 31 ecosphere/ecosphere-four-payment/src/main/resources/banner.txt | 19 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelInfoServiceImpl.java | 161 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssRequestWrapper.java | 71 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysUserMapper.java | 18 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/exception/Exceptionhandler.java | 55 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/redis/RedisConfig.java | 56 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MyBatisConfig.java | 34 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityFeeQuery.java | 101 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/SpecialFeeRateDto.java | 25 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopClientFallbackFactory.java | 62 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysUser.java | 19 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SysOrgController.java | 107 ecosphere/ecosphere-four-payment/src/main/resources/ydOss.properties | 11 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/SpecialFeeRateQuery.java | 83 ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/NumberTest.java | 41 ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendSpecialFeeRateMapper.xml | 134 ecosphere/ecosphere-four-payment/src/main/resources/application-kf.yml | 80 ecosphere/ecosphere-four-payment/src/main/resources/hnnx/hnnxopenbank.pfx | 0 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SpecialFeeRate.java | 86 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MySqlInterceptor.java | 114 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/StoreIndustryManageService.java | 49 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreIndustryManage.java | 56 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/MapDTO.java | 29 ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityDistributeRecordMapper.xml | 162 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/SysOrgQuery.java | 17 ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityShopRecordMapper.xml | 234 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/base/domain/SysUser.java | 326 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SpecialFeeRateMapper.java | 50 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SpecialFeeRateService.java | 35 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDetailDto.java | 34 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityDistributeRecordQuery.java | 68 ecosphere/ecosphere-four-payment/src/main/resources/payTl-test.yml | 8 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ConfigOrgDetailChannel.java | 33 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/HeadBandGiveCoup.java | 49 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelInfoMapper.java | 41 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssFilter.java | 45 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ActivityShopRecordParam.java | 36 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/RateDto.java | 22 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SysOrgService.java | 33 ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityDistributeRecordMapper.xml | 273 + ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelOrgConfigMapper.xml | 182 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/SwaggerConfig.java | 58 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/CorsConfig.java | 34 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/BaseService.java | 44 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysOrg.java | 19 ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityFeeMapper.xml | 416 ++ ecosphere/ecosphere-four-payment/src/main/resources/qdl/河南嗨呗智能科技有限公司.P12 | 0 ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendStoreIndustryManageMapper.xml | 44 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysOrgMapper.java | 186 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityFeeService.java | 39 ecosphere/ecosphere-four-payment/src/main/resources/qrTemp/muBan.png | 0 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopServiceClient.java | 84 ecosphere/ecosphere-four-payment/src/main/resources/qdl/天翼电子商务有限公司.cer | 0 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/AppDTO.java | 62 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityFeeController.java | 259 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityDistributeRecordServiceImpl.java | 239 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/BaseController.java | 9 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreMemberInfo.java | 511 ++ ecosphere/ecosphere-four-payment/pom.xml | 185 ecosphere/ecosphere-four-payment/src/main/resources/wxpay.properties | 9 ecosphere/ecosphere-four-payment/src/main/resources/application.properties | 3 ecosphere/ecosphere-four-payment/src/main/resources/hnnx.properties | 27 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityShopRecordMapper.java | 91 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityShopRecordQuery.java | 59 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelOrgConfig.java | 50 ecosphere/ecosphere-four-payment/src/main/resources/mapping/SpecialFeeRateMapper.xml | 338 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityDistributeBudgetDto.java | 39 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SysOrgServiceImpl.java | 135 ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelOrgConfigMapper.xml | 32 ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/MybatisGeneratorTest.java | 37 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/StoreIndustryManageQuery.java | 53 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SpecialFeeRateServiceImpl.java | 119 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/util/SystemUtil.java | 282 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityDistributeRecord.java | 71 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppStoreIndustryManageController.java | 47 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelInfo.java | 86 ecosphere/ecosphere-four-payment/src/main/resources/sftp.properties | 3 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/FourPaymentApplication.java | 29 ecosphere/ecosphere-four-payment/src/main/resources/apiclient_key.pem | 28 ecosphere/ecosphere-four-payment/src/main/resources/alipay-sandbox.properties | 17 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/StoreIndustryManageDto.java | 22 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/StoreIndustryManageController.java | 163 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelOrgConfigServiceImpl.java | 227 + ecosphere/ecosphere-four-payment/src/main/resources/mapping/SysOrgMapper.xml | 343 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/JacksonConfig.java | 44 ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java | 268 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseServiceClient.java | 243 + ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/RsaDecryptor.java | 64 131 files changed, 12,135 insertions(+), 0 deletions(-) diff --git a/ecosphere/ecosphere-four-payment/pom.xml b/ecosphere/ecosphere-four-payment/pom.xml new file mode 100644 index 0000000..e874903 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/pom.xml @@ -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鐨凙pache 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> diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/FourPaymentApplication.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/FourPaymentApplication.java new file mode 100644 index 0000000..3f30a92 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/FourPaymentApplication.java @@ -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); + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/base/domain/SysUser.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/base/domain/SysUser.java new file mode 100644 index 0000000..a0c23bb --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/base/domain/SysUser.java @@ -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 = "鍒涘缓浜篒D") + 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; + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseClientFallbackFactory.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseClientFallbackFactory.java new file mode 100644 index 0000000..d54610c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseClientFallbackFactory.java @@ -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); +// } +// }; +// } +//} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseServiceClient.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseServiceClient.java new file mode 100644 index 0000000..be45d8a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/BaseServiceClient.java @@ -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锛氭牴鎹畊ser_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锛氭牴鎹畊ser_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锛氭牴鎹畊ser_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锛氭牴鎹畃id鏌ヨ鏈烘瀯鍒楄〃 +// **/ +// @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鈥斺�攃ode鑾峰彇鏈烘瀯绛夌骇 +// * +// * @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); +// +// +//} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopClientFallbackFactory.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopClientFallbackFactory.java new file mode 100644 index 0000000..4539b59 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopClientFallbackFactory.java @@ -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); + } + + }; + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopServiceClient.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopServiceClient.java new file mode 100644 index 0000000..9b2e4b3 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/client/ShopServiceClient.java @@ -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 + ); + + + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/CorsConfig.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/CorsConfig.java new file mode 100644 index 0000000..35aad21 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/CorsConfig.java @@ -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 ~. .~ 浠g爜鏃燘ug `.__ +// * .'// 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); +// } +//} +// diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/JacksonConfig.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/JacksonConfig.java new file mode 100644 index 0000000..dd4a1e7 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/JacksonConfig.java @@ -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 ~. .~ 浠g爜鏃燘ug `.__ + * .'// liu.q \./ (绉樼睄) \\`. + * .'// [916000612@qq.com] | 娆茬粌绁炲姛 寮曞垁鑷 \\`. + * .'// .-~"""""""~~~~-._ | _,-~~~~"""""""~-. \\`. + * .'//.-" 2019-04-19 `-. | .-' 16:19 "-.\\`. + * .'//______.============-.. \ | / ..-============.______\\`. + *.'______________________________\|/______________________________`. + * + * @Description : + */ +// @formatter:on + +@Configuration +public class JacksonConfig { + /** + * Jackson鍏ㄥ眬杞寲long绫诲瀷涓篠tring锛岃В鍐砵ackson搴忓垪鍖栨椂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瑙f瀽瑙勫垯 + } + }; + return cunstomizer; + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/RsaDecryptor.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/RsaDecryptor.java new file mode 100644 index 0000000..dfcaa42 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/RsaDecryptor.java @@ -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 { + /** + * 璇诲彇绉侀挜鏂囦欢锛岀敓鎴怰SA绉侀挜 + * + * @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()))); + } + +} + + diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/SwaggerConfig.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/SwaggerConfig.java new file mode 100644 index 0000000..bac0739 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/SwaggerConfig.java @@ -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(); + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssFilter.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssFilter.java new file mode 100644 index 0000000..b404e55 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssFilter.java @@ -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; +// //鐐瑰嚮鍔寔锛歑-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{ +// +// } +// +//} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssRequestWrapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssRequestWrapper.java new file mode 100644 index 0000000..c91b8ef --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/filter/XssRequestWrapper.java @@ -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(); +// } +// +//} +// diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/HeadBandGiveCoup.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/HeadBandGiveCoup.java new file mode 100644 index 0000000..5603e4c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/HeadBandGiveCoup.java @@ -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); +// } +// +//} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MyBatisConfig.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MyBatisConfig.java new file mode 100644 index 0000000..869c31e --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MyBatisConfig.java @@ -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); +// +// } +// } +//} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MySqlInterceptor.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MySqlInterceptor.java new file mode 100644 index 0000000..0fdbf99 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/mybatisInt/MySqlInterceptor.java @@ -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 鏂规硶鏃讹紝鎵嶇湡姝f墽琛� 鎷︽埅鐨勭浉鍏虫搷浣� +// * @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銆丳arameterHandler銆丼tatementHandler銆丷esultSetHandler褰撲腑鐨勪竴涓� +// * @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) { +// +// } +// +//} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/redis/RedisConfig.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/redis/RedisConfig.java new file mode 100644 index 0000000..ad9f174 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/config/redis/RedisConfig.java @@ -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); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/contants/Contants.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/contants/Contants.java new file mode 100644 index 0000000..ab06f7c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/contants/Contants.java @@ -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 鏍囪瘑锛堝寘鍚晢鎴稨5锛� + */ + 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"; + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/BaseController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/BaseController.java new file mode 100644 index 0000000..177350a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/BaseController.java @@ -0,0 +1,9 @@ +package com.nuvole.four.controller; + +/** + * @Desc: 鍩虹Controller + * @Author: dqh + * @Date: 2024-04-09 + **/ +public class BaseController { +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppChannelOrgConfigController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppChannelOrgConfigController.java new file mode 100644 index 0000000..75d8ed6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppChannelOrgConfigController.java @@ -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; + + /** + * 鏂规硶鎻忚堪: 鏌ヨ鏈烘瀯閫氶亾璇︽儏 + * 璇︽儏涓殑閫氶亾 浠呭寘鍚綋鍓峯rgId瀵瑰簲鐨刾Id瀵瑰簲鐨勯�氶亾 + * @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); + } + + +} + diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppStoreIndustryManageController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppStoreIndustryManageController.java new file mode 100644 index 0000000..4da7cf5 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/app/AppStoreIndustryManageController.java @@ -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); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityDistributeRecordController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityDistributeRecordController.java new file mode 100644 index 0000000..fd16463 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityDistributeRecordController.java @@ -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); + } + + + /** + * 鏂规硶鎻忚堪:鍒嗛厤棰勭畻淇濆瓨 + * 鏈塱d鍒欒繘琛屾洿鏂帮紱鏃犲垯鏂板 + * + * @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; + } + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityFeeController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityFeeController.java new file mode 100644 index 0000000..92b6890 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityFeeController.java @@ -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; + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityShopRecordController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityShopRecordController.java new file mode 100644 index 0000000..db538c3 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ActivityShopRecordController.java @@ -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 = "鎵�灞炲晢鎴穒d") 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涓繃婊ゆ帀涓簄ull鐨勫�� + 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; + } + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelInfoController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelInfoController.java new file mode 100644 index 0000000..065f228 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelInfoController.java @@ -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); + } + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelOrgConfigController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelOrgConfigController.java new file mode 100644 index 0000000..e9fad97 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/ChannelOrgConfigController.java @@ -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; + + /** + * 鏂规硶鎻忚堪: 鏌ヨ鏈烘瀯閫氶亾鍒楄〃 + * 浠呭寘鍚綋鍓峯rgId鐨勪笅绾э紝涓嶅寘鍚�(浜屼笁鍥涚骇绛�) + * @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); + } + + /** + * 鏂规硶鎻忚堪: 鏌ヨ鏈烘瀯閫氶亾璇︽儏 + * 璇︽儏涓殑閫氶亾 浠呭寘鍚綋鍓峯rgId瀵瑰簲鐨刾Id瀵瑰簲鐨勯�氶亾 + * @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); + } + + +} + diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SpecialFeeRateController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SpecialFeeRateController.java new file mode 100644 index 0000000..1a0db8f --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SpecialFeeRateController.java @@ -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; + } + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/StoreIndustryManageController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/StoreIndustryManageController.java new file mode 100644 index 0000000..357cd63 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/StoreIndustryManageController.java @@ -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); + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SysOrgController.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SysOrgController.java new file mode 100644 index 0000000..a38ba00 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/controller/pc/SysOrgController.java @@ -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())); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/AcceptResult.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/AcceptResult.java new file mode 100644 index 0000000..934560d --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/AcceptResult.java @@ -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; + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityDistributeRecord.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityDistributeRecord.java new file mode 100644 index 0000000..bae0fdf --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityDistributeRecord.java @@ -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("涓�绾ф満鏋刬d") + 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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityFee.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityFee.java new file mode 100644 index 0000000..17eab97 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityFee.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityShopRecord.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityShopRecord.java new file mode 100644 index 0000000..41c80ab --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ActivityShopRecord.java @@ -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; +} \ No newline at end of file diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelInfo.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelInfo.java new file mode 100644 index 0000000..f039eea --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelInfo.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelOrgConfig.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelOrgConfig.java new file mode 100644 index 0000000..d670770 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/ChannelOrgConfig.java @@ -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; +} \ No newline at end of file diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SpecialFeeRate.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SpecialFeeRate.java new file mode 100644 index 0000000..009fb63 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SpecialFeeRate.java @@ -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("琛屼笟绠$悊琛╥d") + 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; +} \ No newline at end of file diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreIndustryManage.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreIndustryManage.java new file mode 100644 index 0000000..4e53c8c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreIndustryManage.java @@ -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; +} \ No newline at end of file diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreMemberInfo.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreMemberInfo.java new file mode 100644 index 0000000..7e19211 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreMemberInfo.java @@ -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 = "鏀粯瀹漸serID") + private String aliUserId; + + @ApiModelProperty(value = "鏀粯瀹濆敮涓�鍑瘉锛堟敮浠樺疂鍏紬骞冲彴unionid锛�") + private String aliUnionid; + + @ApiModelProperty(value = "鐢ㄦ埛鍞竴鏍囪瘑锛堟敮浠樺疂灏忕▼搴弌penid锛�") + private String aliOpenid; + + @ApiModelProperty(value = "鏀粯瀹漮penId(鍏紬鍙�)") + private String aliH5Openid; + + @ApiModelProperty(value = "缈兼敮浠榰serID") + private String bestPayUserId; + + @ApiModelProperty(value = "浜戦棯浠榰serID") + private String cloudPayUserId; + + @ApiModelProperty(value = "鐢ㄦ埛鍞竴鏍囪瘑锛堝叕浼楀彿openid锛�") + private String wechatH5Openid; + + @ApiModelProperty(value = "寰俊鍞竴鍑瘉锛堝井淇″叕浼楀钩鍙皍nionid锛�") + 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 = "鎺ㄥ箍浜篿d") + 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; + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreSupplierInfoAccount.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreSupplierInfoAccount.java new file mode 100644 index 0000000..c0dc6cc --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/StoreSupplierInfoAccount.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SysOrg.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SysOrg.java new file mode 100644 index 0000000..77f78f3 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/SysOrg.java @@ -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(); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityDistributeBudgetDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityDistributeBudgetDto.java new file mode 100644 index 0000000..48d3210 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityDistributeBudgetDto.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityFeeDetailDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityFeeDetailDto.java new file mode 100644 index 0000000..5f51a51 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityFeeDetailDto.java @@ -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; + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityShopRecordDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityShopRecordDto.java new file mode 100644 index 0000000..8979ac5 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ActivityShopRecordDto.java @@ -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: 宸蹭笂鎶ュ垪琛ㄨ繑鍥濪to + * @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; + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelInfoDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelInfoDto.java new file mode 100644 index 0000000..258aa95 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelInfoDto.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDetailDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDetailDto.java new file mode 100644 index 0000000..95e100e --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDetailDto.java @@ -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; + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDto.java new file mode 100644 index 0000000..1fc8359 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ChannelOrgConfigDto.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ConfigOrgDetailChannel.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ConfigOrgDetailChannel.java new file mode 100644 index 0000000..355b492 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/ConfigOrgDetailChannel.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/RateDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/RateDto.java new file mode 100644 index 0000000..d4219c9 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/RateDto.java @@ -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; + //灞曠ず椤哄簭锛泂ort瓒婂皬瓒婇潬鍓� + private Integer sort; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/SpecialFeeRateDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/SpecialFeeRateDto.java new file mode 100644 index 0000000..7453a56 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/SpecialFeeRateDto.java @@ -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 = "閫氶亾鎵�灞炶涓�") + //瀛楃涓瞛son鏍煎紡锛汱ist<Bean>鏆傛棤娉曡浆鎹� + private String industryManages; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/StoreIndustryManageDto.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/StoreIndustryManageDto.java new file mode 100644 index 0000000..a207c3b --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/dto/StoreIndustryManageDto.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/AppDTO.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/AppDTO.java new file mode 100644 index 0000000..7dd89a1 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/AppDTO.java @@ -0,0 +1,62 @@ +package com.nuvole.four.domain.extend; + +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * 銆�銆�銆�鈹忊敁銆�銆�銆�鈹忊敁 + * 銆�銆�鈹忊敍鈹烩攣鈹佲攣鈹涒敾鈹� + * 銆�銆�鈹冦��銆�銆�銆�銆�銆�銆�鈹� + * 銆�銆�鈹冦��銆�銆�鈹併��銆�銆�鈹� + * 銆�銆�鈹冦��鈹斥敍銆�鈹椻敵銆�鈹� + * 銆�銆�鈹冦��銆�銆�銆�銆�銆�銆�鈹� + * 銆�銆�鈹冦��銆�銆�鈹汇��銆�銆�鈹� + * 銆�銆�鈹冦��銆�銆�銆�銆�銆�銆�鈹� + * 銆�銆�鈹椻攣鈹撱��銆�銆�鈹忊攣鈹� + * 銆�銆�銆�銆�鈹冦��銆�銆�鈹� 绁炲吔淇濅綉,浠g爜鏃燽ug + * 銆�銆�銆�銆�鈹冦��銆�銆�鈹� + * 銆�銆�銆�銆�鈹冦��銆�銆�鈹椻攣鈹佲攣鈹� + * 銆�銆�銆�銆�鈹冦��銆�銆�銆�銆�銆�銆�鈹b敁 + * 銆�銆�銆�銆�鈹冦��銆�銆�銆�銆�銆�銆�鈹忊敍 + * 銆�銆�銆�銆�鈹椻敁鈹撯攺鈹佲敵鈹撯攺鈹� + * 銆�銆�銆�銆�銆�鈹冣敨鈹��鈹冣敨鈹� + * 銆�銆�銆�銆�銆�鈹椻敾鈹涖��鈹椻敾鈹� + * 鈹佲攣鈹佲攣鈹佲攣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; + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysOrg.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysOrg.java new file mode 100644 index 0000000..fc6b48b --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysOrg.java @@ -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; + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysUser.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysUser.java new file mode 100644 index 0000000..386725d --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/ExtendSysUser.java @@ -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; + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/MapDTO.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/MapDTO.java new file mode 100644 index 0000000..7258bd9 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/MapDTO.java @@ -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; + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/SysOrgQuery.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/SysOrgQuery.java new file mode 100644 index 0000000..1538549 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/extend/SysOrgQuery.java @@ -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; + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ActivityShopRecordParam.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ActivityShopRecordParam.java new file mode 100644 index 0000000..13e5216 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ActivityShopRecordParam.java @@ -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 = "鎵�灞炲晢鎴穒d") + 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; + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ChannelOrgConfigParam.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ChannelOrgConfigParam.java new file mode 100644 index 0000000..b031ed8 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/params/ChannelOrgConfigParam.java @@ -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; + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityDistributeRecordQuery.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityDistributeRecordQuery.java new file mode 100644 index 0000000..0bfdae6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityDistributeRecordQuery.java @@ -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("涓�绾ф満鏋刬d") + 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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityFeeQuery.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityFeeQuery.java new file mode 100644 index 0000000..c0aa58a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityFeeQuery.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityShopRecordQuery.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityShopRecordQuery.java new file mode 100644 index 0000000..cd3c49b --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/ActivityShopRecordQuery.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/SpecialFeeRateQuery.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/SpecialFeeRateQuery.java new file mode 100644 index 0000000..5ea54b6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/SpecialFeeRateQuery.java @@ -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("琛屼笟绠$悊琛╥d") + 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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/StoreIndustryManageQuery.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/StoreIndustryManageQuery.java new file mode 100644 index 0000000..081a077 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/domain/query/StoreIndustryManageQuery.java @@ -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; +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/exception/Exceptionhandler.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/exception/Exceptionhandler.java new file mode 100644 index 0000000..ae69887 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/exception/Exceptionhandler.java @@ -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; + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityDistributeRecordMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityDistributeRecordMapper.java new file mode 100644 index 0000000..a9f0786 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityDistributeRecordMapper.java @@ -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); + + /** + * 鏂规硶鎻忚堪:鍒嗛厤棰勭畻淇濆瓨 + * 鏈塱d鍒欒繘琛屾洿鏂帮紱鏃犲垯鏂板 + * + * @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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityFeeMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityFeeMapper.java new file mode 100644 index 0000000..3e223b3 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityFeeMapper.java @@ -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锛宱rgId鏌ヨ娲诲姩 + * + * @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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityShopRecordMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityShopRecordMapper.java new file mode 100644 index 0000000..49a80b4 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ActivityShopRecordMapper.java @@ -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 娲诲姩琛ヨ创鈥斾笂鎶ュ晢鎴稭apper + * @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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelInfoMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelInfoMapper.java new file mode 100644 index 0000000..b709804 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelInfoMapper.java @@ -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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelOrgConfigMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelOrgConfigMapper.java new file mode 100644 index 0000000..02bc9b1 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/ChannelOrgConfigMapper.java @@ -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); + + /** + * 鏌ヨ鏈烘瀯閫氶亾閰嶇疆鍒楄〃 + * 浠呭寘鍚綋鍓峯rgId鐨勪笅绾э紝涓嶅寘鍚�(浜屼笁鍥涚骇绛�) + * + * @param orgId 閫夋嫨鐨勬満鏋処D + * @param orgName 鏌ヨ鏉′欢鏈烘瀯鍚嶇О + */ + List<ChannelOrgConfigDto> selectAllList(@Param("orgId")Long orgId, @Param("orgName") String orgName); + + /** + * 閫氳繃鏉′欢鏌ヨ鏁版嵁 + * + * @param orgId 閫夋嫨鐨勬満鏋処D + * @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銆乷rgPId鏌ヨ鎵�鏈夋湁鏁堢殑鏈烘瀯閫氶亾閰嶇疆鏁版嵁 + * + * @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); + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SpecialFeeRateMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SpecialFeeRateMapper.java new file mode 100644 index 0000000..5bbdbc6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SpecialFeeRateMapper.java @@ -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); + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/StoreIndustryManageMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/StoreIndustryManageMapper.java new file mode 100644 index 0000000..8cc908a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/StoreIndustryManageMapper.java @@ -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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysOrgMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysOrgMapper.java new file mode 100644 index 0000000..1e43610 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysOrgMapper.java @@ -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(); + + /** + * 鏌ヨ鐖舵満鏋剈seCode 浠ュ強 瀛愭満鏋刴axCode + * + * @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(); + + /** + * 鏌ヨ鏈骇鏈�澶ode + * + * @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锛氭牴鎹畊serOrgCode鏌ヨ鏈烘瀯淇℃伅 + **/ + @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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysUserMapper.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysUserMapper.java new file mode 100644 index 0000000..63710d6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/mapper/SysUserMapper.java @@ -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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityDistributeRecordService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityDistributeRecordService.java new file mode 100644 index 0000000..a186bf8 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityDistributeRecordService.java @@ -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); + + /** + * 鏂规硶鎻忚堪:鍒嗛厤棰勭畻淇濆瓨 + * 鏈塱d鍒欒繘琛屾洿鏂帮紱鏃犲垯鏂板 + * + * @date 2024-04-14 13:41 + **/ + Integer batchInsertOrUpdate(List<ActivityDistributeRecord> recordList); + + ActivityDistributeRecord getFeeByCondition(Long activityId,Long orgId); + + ActivityFee getActivityFeeByIdAndOrgId(Long activityId,Long orgId); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityFeeService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityFeeService.java new file mode 100644 index 0000000..6814698 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityFeeService.java @@ -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); + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityShopRecordService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityShopRecordService.java new file mode 100644 index 0000000..47f32c2 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ActivityShopRecordService.java @@ -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 娲诲姩琛ヨ创鈥斾笂鎶ュ晢鎴稴ervice + * @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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/BaseService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/BaseService.java new file mode 100644 index 0000000..1617f6c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/BaseService.java @@ -0,0 +1,44 @@ +package com.nuvole.four.service; + +import java.util.List; +import java.util.Map; +// @formatter:off +/** + * .-~~~~~~~~~-._ _.-~~~~~~~~~-. + * __.' @Author ~. .~ 浠g爜鏃燘ug `.__ + * .'// 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); + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelInfoService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelInfoService.java new file mode 100644 index 0000000..8f59efc --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelInfoService.java @@ -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); + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelOrgConfigService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelOrgConfigService.java new file mode 100644 index 0000000..06f146e --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/ChannelOrgConfigService.java @@ -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); + + + /** + * 鏂规硶鎻忚堪: 鏌ヨ鏈烘瀯閫氶亾璇︽儏 + * 璇︽儏涓殑閫氶亾 浠呭寘鍚綋鍓峯rgId瀵瑰簲鐨刾Id瀵瑰簲鐨勯�氶亾 + * @date 2024-04-11 20:04 + **/ + ChannelOrgConfigDetailDto getChannelOrgConfigDetail(Long orgId); + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java new file mode 100644 index 0000000..725a49b --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/RedisService.java @@ -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锛� + * 銆�銆�鈹冦��瀹犮��鈹椻攣鈹佲攣鈹� + * 銆�銆�鈹傾uthor:銆�銆�銆�鈹b敁 + * 銆�銆�鈹冦��銆� 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; + } + + /** + * 鎵归噺鍒犻櫎瀵瑰簲鐨剉alue + * + * @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); + } + } + + /** + * 鍒犻櫎瀵瑰簲鐨剉alue + * + * @param key + */ + public void remove(final String key) { + if (exists(key)) { + redisTemplate.delete(StringEscapeUtils.unescapeHtml(key)); + } + } + + /** + * 鍒ゆ柇缂撳瓨涓槸鍚︽湁瀵瑰簲鐨剉alue + * + * @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); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SpecialFeeRateService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SpecialFeeRateService.java new file mode 100644 index 0000000..b770caa --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SpecialFeeRateService.java @@ -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); + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/StoreIndustryManageService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/StoreIndustryManageService.java new file mode 100644 index 0000000..8632fea --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/StoreIndustryManageService.java @@ -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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SysOrgService.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SysOrgService.java new file mode 100644 index 0000000..c6ca8bc --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/SysOrgService.java @@ -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); +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityDistributeRecordServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityDistributeRecordServiceImpl.java new file mode 100644 index 0000000..cb30d56 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityDistributeRecordServiceImpl.java @@ -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; + } + + /** + * 鏂规硶鎻忚堪:鍒嗛厤棰勭畻淇濆瓨 + * 鏈塱d鍒欒繘琛屾洿鏂帮紱鏃犲垯鏂板 + * + * @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銆乻urplusFee瀛楁 + * @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("棰勭畻鍒嗛厤瓒呭嚭鎬婚搴�,鍒嗛厤澶辫触"); + } + } + + /** + * 鐢熸垚鏈簅rglv瀵瑰簲鐨勬灇涓惧�� + * @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); + } + } + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityFeeServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityFeeServiceImpl.java new file mode 100644 index 0000000..7095d48 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityFeeServiceImpl.java @@ -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)){ + //鏌ヨ鍖归厤褰撳墠鐧诲綍浜簅rgCode鐨勬墍鏈夋椿鍔� + 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 ? "褰撳墠娲诲姩姝e湪杩涜涓�" : "褰撳墠娲诲姩宸茬粡缁撴潫浜�"); + } + // 鏇存敼娲诲姩琛ㄧ姸鎬� + 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 宸叉秷鑰楅搴� = 缁熻娲诲姩鍟嗘埛鐨剆um(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; + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityShopRecordServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityShopRecordServiceImpl.java new file mode 100644 index 0000000..853dc50 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ActivityShopRecordServiceImpl.java @@ -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 娲诲姩琛ヨ创鈥斾笂鎶ュ晢鎴稴ervice瀹炵幇绫� + * @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")); + + } + + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelInfoServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelInfoServiceImpl.java new file mode 100644 index 0000000..f336492 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelInfoServiceImpl.java @@ -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閲嶅"); + } + /* + * 瑙f瀽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閲嶅"); + } + /* + * 瑙f瀽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; + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelOrgConfigServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelOrgConfigServiceImpl.java new file mode 100644 index 0000000..26d8f48 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/ChannelOrgConfigServiceImpl.java @@ -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(榛樿閫氶亾)銆乸aram.status=0(绂佺敤)鏃讹紱杩斿洖閿欒鎻忚堪 + if(param.getStatus() != null && + (dbConfig.getDefaultOrNot().equals(1) && param.getStatus().equals(0))){ + throw new IllegalArgumentException("褰撳墠涓洪粯璁ら�氶亾,涓嶈兘绂佺敤"); + } + //dbConfig.status=0(绂佺敤)銆乸aram.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; + } + + /** + * 鏌ヨ鏈烘瀯閫氶亾閰嶇疆鍒楄〃 + * 浠呭寘鍚綋鍓峯rgId鐨勪笅绾э紝涓嶅寘鍚�(浜屼笁鍥涚骇绛�) + * + * @param orgId 閫夋嫨鐨勬満鏋処D + * @param orgName 鏌ヨ鏉′欢鏈烘瀯鍚嶇О + */ + @Override + public List<ChannelOrgConfigDto> queryAllChannelOrg(Long orgId, String orgName) { + return channelOrgConfigMapper.selectAllList(orgId,orgName); + } + + /** + * 鏂规硶鎻忚堪: 鏌ヨ鏈烘瀯閫氶亾璇︽儏 + * 璇︽儏涓殑閫氶亾 浠呭寘鍚綋鍓峯rgId瀵瑰簲鐨刾Id瀵瑰簲鐨勯�氶亾 + * @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()); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SpecialFeeRateServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SpecialFeeRateServiceImpl.java new file mode 100644 index 0000000..1656208 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SpecialFeeRateServiceImpl.java @@ -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{ + //淇敼鐩存帴鍙栦紶杩囨潵鐨刬d + 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; + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/StoreIndustryManageServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/StoreIndustryManageServiceImpl.java new file mode 100644 index 0000000..e69f1a2 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/StoreIndustryManageServiceImpl.java @@ -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); //鏈骇鏈�澶ode + if (StrUtil.isNotBlank(maxCode)){ + maxCode = maxCode.substring(entity.getIndustryCode().length()); + } + return maxCode; + } + + /** + * 鏂规硶鎻忚堪:鑾峰彇褰撳墠pId瀵瑰簲鐨刲evel灞傜骇 + * + **/ + private Integer getLevel(Long pId){ + Integer level = null; + if(pId == null || pId == 0){ + level = 0; + } else { + //鏌ヨ褰撳墠琛屼笟鐨刲evel锛涙牴鎹畃Id鐨刲evel + 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); + } +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SysOrgServiceImpl.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SysOrgServiceImpl.java new file mode 100644 index 0000000..7aa4232 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/service/impl/SysOrgServiceImpl.java @@ -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); + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/util/SystemUtil.java b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/util/SystemUtil.java new file mode 100644 index 0000000..1377a9e --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/java/com/nuvole/four/util/SystemUtil.java @@ -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)); + } + + /** + * 鍙杢oken + */ + 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涓璓C 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涓璓C 渚涜揣鍟嗗ご + * + * @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; +// } + + /** + * 鍙栫患鍚堝悗鍙癙C/瀹㈡埛缁忕悊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; + } + + /************************************* 鑾峰彇鐧诲綍淇℃伅 *****************************************/ + + /** + * 鑾峰彇鐧诲綍淇℃伅锛堝晢鎴穚c鍜屽晢鎴穉pp锛� + */ + 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); + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/alipay-sandbox.properties b/ecosphere/ecosphere-four-payment/src/main/resources/alipay-sandbox.properties new file mode 100644 index 0000000..92c9dbc --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/alipay-sandbox.properties @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/apiclient_key.pem b/ecosphere/ecosphere-four-payment/src/main/resources/apiclient_key.pem new file mode 100644 index 0000000..a4170c6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/apiclient_key.pem @@ -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----- diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/application-dev.yml b/ecosphere/ecosphere-four-payment/src/main/resources/application-dev.yml new file mode 100644 index 0000000..4826ba1 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/application-dev.yml @@ -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 +#澶栫綉鎺ュ彛鏄惁璧癱all鏈嶅姟 +service-type: false + +# 鏂板ぇ闄唒os榛樿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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/application-kf.yml b/ecosphere/ecosphere-four-payment/src/main/resources/application-kf.yml new file mode 100644 index 0000000..05632ef --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/application-kf.yml @@ -0,0 +1,80 @@ +server: + port: 9062 +eureka: + client: + service-url: + defaultZone: http://localhost:9000/eureka/ +# instance: +# #浣跨敤ip鏇夸唬瀹炰緥鍚� +# prefer-ip-address: true +# #璁剧疆瀹炰緥鐨処D涓篿p: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 +#澶栫綉鎺ュ彛鏄惁璧癱all鏈嶅姟 +service-type: false + +# 鏂板ぇ闄唒os榛樿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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/application.properties b/ecosphere/ecosphere-four-payment/src/main/resources/application.properties new file mode 100644 index 0000000..3f01367 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/application.properties @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/application.yml b/ecosphere/ecosphere-four-payment/src/main/resources/application.yml new file mode 100644 index 0000000..37eec66 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/application.yml @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/banner.txt b/ecosphere/ecosphere-four-payment/src/main/resources/banner.txt new file mode 100644 index 0000000..6332f38 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/banner.txt @@ -0,0 +1,19 @@ + .::::. + .::::::::. + ::::::::::: + ..:::::::::::' + '::::::::::::' + .:::::::::: + '::::::::::::::.. + ..::::::::::::. 濂崇淇濅綉,浠g爜鏃燽ug + ``:::::::::::::::: + ::::``:::::::::' .:::. + ::::' ':::::' .::::::::. + .::::' :::: .:::::::'::::. + .:::' ::::: .:::::::::' ':::::. + .::' :::::.:::::::::' ':::::. + .::' ::::::::::::::' ``::::. + ...::: ::::::::::::' ``::. + ```` ':. ':::::::::' ::::.. + '.:::::' ':'````.. + :: Spring Boot :: (v2.0.3.RELEASE) \ No newline at end of file diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/express.properties b/ecosphere/ecosphere-four-payment/src/main/resources/express.properties new file mode 100644 index 0000000..b1162d1 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/express.properties @@ -0,0 +1,4 @@ +EBusinessID=1328568 +AppKey=29e39a04-582e-479c-bf0d-f0d5f9ca4897 +Type=EMS +ReqURL=http://api.kdniao.com/Ebusiness/EbusinessOrderHandle.aspx diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/ftp.properties b/ecosphere/ecosphere-four-payment/src/main/resources/ftp.properties new file mode 100644 index 0000000..7039f20 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/ftp.properties @@ -0,0 +1,3 @@ +ftp.url=116.198.39.83 +ftp.username=mysftp +ftp.mixpd=Bjjmy_2020 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/hnnx.properties b/ecosphere/ecosphere-four-payment/src/main/resources/hnnx.properties new file mode 100644 index 0000000..fbba102 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/hnnx.properties @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/hnnx/hnnxopenbank.pfx b/ecosphere/ecosphere-four-payment/src/main/resources/hnnx/hnnxopenbank.pfx new file mode 100644 index 0000000..f351a5d --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/hnnx/hnnxopenbank.pfx Binary files differ diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/hnnx/merchant-rsa.pfx b/ecosphere/ecosphere-four-payment/src/main/resources/hnnx/merchant-rsa.pfx new file mode 100644 index 0000000..a7b91dc --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/hnnx/merchant-rsa.pfx Binary files differ diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityDistributeRecordMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityDistributeRecordMapper.xml new file mode 100644 index 0000000..cef8135 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityDistributeRecordMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityFeeMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityFeeMapper.xml new file mode 100644 index 0000000..379f985 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityFeeMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityShopRecordMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityShopRecordMapper.xml new file mode 100644 index 0000000..d1e097c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ActivityShopRecordMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelInfoMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelInfoMapper.xml new file mode 100644 index 0000000..4e7c996 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelInfoMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelOrgConfigMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelOrgConfigMapper.xml new file mode 100644 index 0000000..1cbc87a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/ChannelOrgConfigMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/SpecialFeeRateMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/SpecialFeeRateMapper.xml new file mode 100644 index 0000000..9d99664 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/SpecialFeeRateMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/StoreIndustryManageMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/StoreIndustryManageMapper.xml new file mode 100644 index 0000000..4bd0719 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/StoreIndustryManageMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/SysOrgMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/SysOrgMapper.xml new file mode 100644 index 0000000..40ae2c5 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/SysOrgMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityDistributeRecordMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityDistributeRecordMapper.xml new file mode 100644 index 0000000..ac5a9f9 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityDistributeRecordMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityFeeMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityFeeMapper.xml new file mode 100644 index 0000000..03e3c0c --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityFeeMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityShopRecordMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityShopRecordMapper.xml new file mode 100644 index 0000000..0dcff07 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendActivityShopRecordMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelInfoMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelInfoMapper.xml new file mode 100644 index 0000000..da22cb0 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelInfoMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelOrgConfigMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelOrgConfigMapper.xml new file mode 100644 index 0000000..5cb050d --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendChannelOrgConfigMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendSpecialFeeRateMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendSpecialFeeRateMapper.xml new file mode 100644 index 0000000..008a39a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendSpecialFeeRateMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendStoreIndustryManageMapper.xml b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendStoreIndustryManageMapper.xml new file mode 100644 index 0000000..6f1e304 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/mapping/extend/ExtendStoreIndustryManageMapper.xml @@ -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> diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/payTl-test.yml b/ecosphere/ecosphere-four-payment/src/main/resources/payTl-test.yml new file mode 100644 index 0000000..c564d0f --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/payTl-test.yml @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/pfx/zfxt.pfx b/ecosphere/ecosphere-four-payment/src/main/resources/pfx/zfxt.pfx new file mode 100644 index 0000000..6dbe0d7 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/pfx/zfxt.pfx Binary files differ diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/qdl.properties b/ecosphere/ecosphere-four-payment/src/main/resources/qdl.properties new file mode 100644 index 0000000..121bd83 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/qdl.properties @@ -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 + diff --git "a/ecosphere/ecosphere-four-payment/src/main/resources/qdl/\345\244\251\347\277\274\347\224\265\345\255\220\345\225\206\345\212\241\346\234\211\351\231\220\345\205\254\345\217\270.cer" "b/ecosphere/ecosphere-four-payment/src/main/resources/qdl/\345\244\251\347\277\274\347\224\265\345\255\220\345\225\206\345\212\241\346\234\211\351\231\220\345\205\254\345\217\270.cer" new file mode 100644 index 0000000..ea7e8e5 --- /dev/null +++ "b/ecosphere/ecosphere-four-payment/src/main/resources/qdl/\345\244\251\347\277\274\347\224\265\345\255\220\345\225\206\345\212\241\346\234\211\351\231\220\345\205\254\345\217\270.cer" Binary files differ diff --git "a/ecosphere/ecosphere-four-payment/src/main/resources/qdl/\346\262\263\345\215\227\345\227\250\345\221\227\346\231\272\350\203\275\347\247\221\346\212\200\346\234\211\351\231\220\345\205\254\345\217\270.P12" "b/ecosphere/ecosphere-four-payment/src/main/resources/qdl/\346\262\263\345\215\227\345\227\250\345\221\227\346\231\272\350\203\275\347\247\221\346\212\200\346\234\211\351\231\220\345\205\254\345\217\270.P12" new file mode 100644 index 0000000..e64b6e9 --- /dev/null +++ "b/ecosphere/ecosphere-four-payment/src/main/resources/qdl/\346\262\263\345\215\227\345\227\250\345\221\227\346\231\272\350\203\275\347\247\221\346\212\200\346\234\211\351\231\220\345\205\254\345\217\270.P12" Binary files differ diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/qrTemp/muBan.png b/ecosphere/ecosphere-four-payment/src/main/resources/qrTemp/muBan.png new file mode 100644 index 0000000..4b4e955 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/qrTemp/muBan.png Binary files differ diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/sftp.properties b/ecosphere/ecosphere-four-payment/src/main/resources/sftp.properties new file mode 100644 index 0000000..7039f20 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/sftp.properties @@ -0,0 +1,3 @@ +ftp.url=116.198.39.83 +ftp.username=mysftp +ftp.mixpd=Bjjmy_2020 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/wxV3/apiclient_key.pem b/ecosphere/ecosphere-four-payment/src/main/resources/wxV3/apiclient_key.pem new file mode 100644 index 0000000..a4170c6 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/wxV3/apiclient_key.pem @@ -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----- diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/wxpay.properties b/ecosphere/ecosphere-four-payment/src/main/resources/wxpay.properties new file mode 100644 index 0000000..793404a --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/wxpay.properties @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/main/resources/ydOss.properties b/ecosphere/ecosphere-four-payment/src/main/resources/ydOss.properties new file mode 100644 index 0000000..9bb067d --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/main/resources/ydOss.properties @@ -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 diff --git a/ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/MybatisGeneratorTest.java b/ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/MybatisGeneratorTest.java new file mode 100644 index 0000000..c95fc8e --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/MybatisGeneratorTest.java @@ -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浠g爜鐢熸垚鍣� +* @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); + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/NumberTest.java b/ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/NumberTest.java new file mode 100644 index 0000000..e22cbf7 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/test/java/com/nuvole/four/NumberTest.java @@ -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()); + + } + +} diff --git a/ecosphere/ecosphere-four-payment/src/test/resources/generatorConfig.xml b/ecosphere/ecosphere-four-payment/src/test/resources/generatorConfig.xml new file mode 100644 index 0000000..e6449e5 --- /dev/null +++ b/ecosphere/ecosphere-four-payment/src/test/resources/generatorConfig.xml @@ -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锛孹MLMAPPER--> + <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> -- Gitblit v1.9.1