From cacf1fcbce568248faf08492dfd2327685c81f55 Mon Sep 17 00:00:00 2001 From: xhxu Date: Wed, 10 Aug 2022 17:20:24 +0800 Subject: [PATCH] // --- .../basic/WxProjectConfigController.java | 85 ++++++++---- .../com/iformall/domain/po/WxPayAccount.java | 4 + .../po/WxProfitSharingReceiverApply.java | 96 ++++++++++++++ .../enums/EnumSharingReceiverAccountType.java | 52 ++++++++ .../EnumSharingReceiverApplymentState.java | 65 +++++++++ .../EnumSharingReceiverBusinessCretType.java | 70 ++++++++++ .../enums/EnumSharingReceiverContactType.java | 53 ++++++++ .../enums/EnumSharingReceiverFinanceType.java | 59 +++++++++ .../enums/EnumSharingReceiverIdDocType.java | 65 +++++++++ .../EnumSharingReceiverIdHolderType.java | 53 ++++++++ .../EnumSharingReceiverOrganizationType.java | 63 +++++++++ .../enums/EnumSharingReceiverSignState.java | 55 ++++++++ .../mapper/WxPayAccountBillMapper.java | 2 - .../iformall/mapper/WxPayAccountMapper.java | 2 - .../WxProfitSharingReceiverApplyMapper.java | 13 ++ .../service/WxPayAccountBillService.java | 2 - .../service/WxProjectConfigService.java | 2 +- .../impl/WxPayAccountBillServiceImpl.java | 4 - .../impl/WxProjectConfigServiceImpl.java | 32 ++--- .../mapper/WxPayAccountBillMapper.xml | 7 - .../resources/mapper/WxPayAccountMapper.xml | 6 - .../WxProfitSharingReceiverApplyMapper.xml | 125 ++++++++++++++++++ .../basic/WxProjectConfigController.java | 56 ++++---- 23 files changed, 878 insertions(+), 93 deletions(-) create mode 100644 mallinkService/src/main/java/com/iformall/domain/po/WxProfitSharingReceiverApply.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverAccountType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverApplymentState.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverBusinessCretType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverContactType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverFinanceType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdDocType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdHolderType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverOrganizationType.java create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverSignState.java create mode 100644 mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java create mode 100644 mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java b/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java index 02ef82d4a..8a08b5943 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java @@ -230,23 +230,24 @@ public class WxProjectConfigController extends BaseController { } } - @ApiOperation("添加修改特殊商户号信息") + @ApiOperation("添加修改商户号信息") @PostMapping("/init/payAccount") - @SystemControllerLog(description = "特殊商户号-更新") + @SystemControllerLog(description = "商户号-更新") @TenantIgnore public ResultData initPayAccount(@RequestBody WxPayAccount wxPayAccount) { logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPayAccount"); try { - if(StringUtils.isBlank(wxPayAccount.getTenantId())){ - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); - } - WxPayAccount getByTenantId = wxPayAccountService.getByTenantId(wxPayAccount.getTenantId()); - if(wxPayAccount.getId() != null && (getByTenantId == null || !getByTenantId.getId().equals(wxPayAccount.getId()))){ - return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); + if(wxPayAccount.getAppInfoId() == null){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"小程序Id必传"); } - if(wxPayAccount.getId() == null && getByTenantId != null){ - return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); +// if(StringUtils.isBlank(wxPayAccount.getTenantId())){ +// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId 必传"); +// } + WxAppinfo appinfo = wxAppinfoService.getById(wxPayAccount.getAppInfoId()); + if(appinfo == null || !EnumAppType.C.getCode().equals(appinfo.getType())){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"小程序未找到或不是C端小程序"); } + wxPayAccount.updateTenantInfo(appinfo); if(StringUtils.isBlank(wxPayAccount.getNotifyUrl())){ wxPayAccount.setNotifyUrl(wechatWebProperties.getUrl()+"/wxPay/notify"); @@ -261,7 +262,7 @@ public class WxProjectConfigController extends BaseController { wxPayAccount.setShare(0);//0: 未分账,1:分账(默认不分账) } - wxProjectConfigService.initPayAccount(wxPayAccount); + wxProjectConfigService.initPayAccount(appinfo,wxPayAccount); return new ResultData(); }catch (Exception e){ @@ -270,6 +271,40 @@ public class WxProjectConfigController extends BaseController { } } + @ApiOperation("查询商户号信息") + @GetMapping("/getinit/payAccount") + @SystemControllerLog(description = "商户号-查询") + @TenantIgnore + public ResultData getinitPayAccount(Long appInfoId) { + logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPayAccount"); + try { + if(appInfoId == null){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"小程序Id必传"); + } +// if(StringUtils.isBlank(wxPayAccount.getTenantId())){ +// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId 必传"); +// } + WxAppinfo appinfo = wxAppinfoService.getById(appInfoId); + if(appinfo == null || !EnumAppType.C.getCode().equals(appinfo.getType())){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"小程序未找到或不是C端小程序"); + } + Map map = new HashMap(); + if(appinfo.getPayId() != null) { + WxPayAccount wxPayAccount = wxPayAccountService.getById(appinfo.getPayId()); + map.put("wxPayAccount",wxPayAccount); + } + if(appinfo.getPayBillId() != null){ + WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getById(appinfo.getPayBillId()); + map.put("wxPayAccountBill",wxPayAccountBill); + } + + return new ResultData(map); + }catch (Exception e){ + logger.error(e.getMessage(),e); + return new ResultData(ErrorCode.SYS_SERVER_ERROR); + } + } + @ApiOperation("添加修改小程序信息") @PostMapping("/init/appinfo") @SystemControllerLog(description = "小程序信息-更新") @@ -280,16 +315,16 @@ public class WxProjectConfigController extends BaseController { if(StringUtils.isBlank(wxAppinfo.getTenantId())){ return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); } - if(wxAppinfo.getId() == null){ - WxPayAccount byTenantId = wxPayAccountService.getByTenantId(wxAppinfo.getTenantId()); - if(byTenantId != null){ - wxAppinfo.setPayId(byTenantId.getId()); - } - WxPayAccountBill billByTenantId = wxPayAccountBillService.getByTenantId(wxAppinfo.getTenantId()); - if(billByTenantId != null){ - wxAppinfo.setPayBillId(billByTenantId.getId()); - } - } +// if(wxAppinfo.getId() == null){ +// WxPayAccount byTenantId = wxPayAccountService.getByTenantId(wxAppinfo.getTenantId()); +// if(byTenantId != null){ +// wxAppinfo.setPayId(byTenantId.getId()); +// } +// WxPayAccountBill billByTenantId = wxPayAccountBillService.getByTenantId(wxAppinfo.getTenantId()); +// if(billByTenantId != null){ +// wxAppinfo.setPayBillId(billByTenantId.getId()); +// } +// } wxAppinfoService.saveOrUpdate(wxAppinfo); @@ -629,10 +664,10 @@ public class WxProjectConfigController extends BaseController { ResultData wxMallBuildingFloorList = wxMallBuildingService.getBuildingFloorList(tenantEntity); map.put("wxMallBuildingFloorList",wxMallBuildingFloorList.data); - WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId()); - map.put("wxPayAccount",wxPayAccount); - WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId()); - map.put("wxPayAccountBill",wxPayAccountBill); +// WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId()); +// map.put("wxPayAccount",wxPayAccount); +// WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId()); +// map.put("wxPayAccountBill",wxPayAccountBill); WxAppinfo wxAppinfo = new WxAppinfo(); wxAppinfo.setTenantId(wxMall.getTenantId()); diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java b/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java index 083c2e295..e42d73bbd 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java @@ -1,6 +1,7 @@ package com.iformall.domain.po; import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableName; import com.iformall.domain.po.base.TenantEntity; import com.iformall.douyin.pay.orderQuery.QueryMerchantResult; @@ -97,4 +98,7 @@ public class WxPayAccount extends TenantEntity { } return openPayResult; } + + @TableField(exist = false) + private Long appInfoId; } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxProfitSharingReceiverApply.java b/mallinkService/src/main/java/com/iformall/domain/po/WxProfitSharingReceiverApply.java new file mode 100644 index 000000000..a9665b31e --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxProfitSharingReceiverApply.java @@ -0,0 +1,96 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.apache.commons.lang3.StringUtils; + +import java.util.Date; + +@TableName(value = "wx_profit_sharing_receiver_apply") +@Data +@EqualsAndHashCode(callSuper = true) +public class WxProfitSharingReceiverApply extends TenantEntity { + + protected Long id; + + @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") + private Long merchantId; + @io.swagger.annotations.ApiModelProperty(value="",name="plat") + private Integer plat; + @io.swagger.annotations.ApiModelProperty(value="业务申请编号",name="outRequestNo") + private String outRequestNo; + @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverOrganizationType 主体类型",name="organizationType") + private Integer organizationType; + @io.swagger.annotations.ApiModelProperty(value="是否金融机构",name="financeInstitution") + private Integer financeInstitution; + @io.swagger.annotations.ApiModelProperty(value="营业执照/登记证书信息",name="businessLicenseInfo") + private String businessLicenseInfo; + @io.swagger.annotations.ApiModelProperty(value="金融机构许可证信息",name="financeInstitutionInfo") + private String financeInstitutionInfo; + @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverIdHolderType 证件持有人类型",name="idHolderType") + private Integer idHolderType; + @io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverIdDocType 经营者/法人证件类型",name="idDocType") + private Integer idDocType; + @io.swagger.annotations.ApiModelProperty(value="法定代表人说明函(url)",name="authorizeLetter") + private String authorizeLetter; + @io.swagger.annotations.ApiModelProperty(value="法定代表人说明函",name="authorizeLetterCopy") + private String authorizeLetterCopy; + @io.swagger.annotations.ApiModelProperty(value="经营者/法人身份证信息",name="idCardInfo") + private String idCardInfo; + @io.swagger.annotations.ApiModelProperty(value="经营者/法人其他类型证件信息",name="idDocInfo") + private String idDocInfo; + @io.swagger.annotations.ApiModelProperty(value="经营者/法人是否为受益人",name="owner") + private Integer owner; + @io.swagger.annotations.ApiModelProperty(value="最终受益人信息列表([])",name="uboInfoList") + private String uboInfoList; + @io.swagger.annotations.ApiModelProperty(value="结算账户信息",name="accountInfo") + private String accountInfo; + @io.swagger.annotations.ApiModelProperty(value="超级管理员信息",name="contactInfo") + private String contactInfo; + @io.swagger.annotations.ApiModelProperty(value="店铺信息",name="salesSceneInfo") + private String salesSceneInfo; + @io.swagger.annotations.ApiModelProperty(value="结算规则",name="settlementInfo") + private String settlementInfo; + @io.swagger.annotations.ApiModelProperty(value="商户简称",name="merchantShortname") + private String merchantShortname; + @io.swagger.annotations.ApiModelProperty(value="特殊资质([])",name="qualifications") + private String qualifications; + @io.swagger.annotations.ApiModelProperty(value="补充材料([])",name="businessAdditionPics") + private String businessAdditionPics; + @io.swagger.annotations.ApiModelProperty(value="补充说明",name="businessAdditionDesc") + private String businessAdditionDesc; + + @io.swagger.annotations.ApiModelProperty(value="微信支付申请单号",name="applymentId") + private Integer applymentId; + @io.swagger.annotations.ApiModelProperty(value="申请状态",name="applymentState") + private Integer applymentState; + @io.swagger.annotations.ApiModelProperty(value="申请状态描述",name="applymentStateDesc") + private String applymentStateDesc; + @io.swagger.annotations.ApiModelProperty(value="签约状态",name="signState") + private Integer signState; + @io.swagger.annotations.ApiModelProperty(value="签约链接",name="signUrl") + private String signUrl; + @io.swagger.annotations.ApiModelProperty(value="电商平台二级商户号",name="subMchid") + private String subMchid; + @io.swagger.annotations.ApiModelProperty(value="汇款账户验证信息",name="accountValidation") + private String accountValidation; + @io.swagger.annotations.ApiModelProperty(value="驳回原因详情",name="auditDetail") + private String auditDetail; + @io.swagger.annotations.ApiModelProperty(value="法人验证链接",name="legalValidationUrl") + private String legalValidationUrl; + @io.swagger.annotations.ApiModelProperty(value="法人验证链接二维码",name="legalValidationQrcode") + private String legalValidationQrcode; + + @io.swagger.annotations.ApiModelProperty(value="申请状态",name="verifyResult") + private Integer verifyResult; + @io.swagger.annotations.ApiModelProperty(value="申请状态描述",name="verifyFailReason") + private String verifyFailReason; + + @io.swagger.annotations.ApiModelProperty(value="",name="createTime") + private Date createTime; + @io.swagger.annotations.ApiModelProperty(value="",name="updateTime") + private Date updateTime; + +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverAccountType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverAccountType.java new file mode 100644 index 000000000..67c69e361 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverAccountType.java @@ -0,0 +1,52 @@ +package com.iformall.enums; + +/** + * 结算账户信息 + * 账户类型 + */ +public enum EnumSharingReceiverAccountType { + + ACCOUNT_TYPE_74(74, "74", "对公账户"), + ACCOUNT_TYPE_75(75, "75", "对私账户"), + ; + + public static EnumSharingReceiverAccountType getEnum(Integer code) { + for (EnumSharingReceiverAccountType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverAccountType getEnum(String codeStr) { + for (EnumSharingReceiverAccountType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverAccountType(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverApplymentState.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverApplymentState.java new file mode 100644 index 000000000..86e0f756d --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverApplymentState.java @@ -0,0 +1,65 @@ +package com.iformall.enums; + +/** + * 申请状态 + * CHECKING:资料校验中 + * ACCOUNT_NEED_VERIFY:待账户验证 + * AUDITING:审核中 + * REJECTED:已驳回 + * NEED_SIGN:待签约 + * FINISH:完成 + * FROZEN:已冻结 + * CANCELED:已作废 + */ +public enum EnumSharingReceiverApplymentState { + + CHECKING(1, "CHECKING", "资料校验中"), + ACCOUNT_NEED_VERIFY(2, "ACCOUNT_NEED_VERIFY", "待账户验证"), + AUDITING(3, "AUDITING", "审核中"), + REJECTED(4, "REJECTED", "已驳回"), + NEED_SIGN(5, "NEED_SIGN", "待签约"), + FINISH(6, "FINISH", "完成"), + FROZEN(7, "FROZEN", "已冻结"), + CANCELED(8, "CANCELED", "已作废"), + ; + + public static EnumSharingReceiverApplymentState getEnum(Integer code) { + for (EnumSharingReceiverApplymentState value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverApplymentState getEnum(String codeStr) { + for (EnumSharingReceiverApplymentState value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverApplymentState(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverBusinessCretType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverBusinessCretType.java new file mode 100644 index 000000000..92c1e5c5b --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverBusinessCretType.java @@ -0,0 +1,70 @@ +package com.iformall.enums; + +/** + * 营业执照/登记证书信息 + * 证书类型 + * CERTIFICATE_TYPE_2388:事业单位法人证书 + * CERTIFICATE_TYPE_2389:统一社会信用代码证书 + * CERTIFICATE_TYPE_2394:社会团体法人登记证书 + * CERTIFICATE_TYPE_2395:民办非企业单位登记证书 + * CERTIFICATE_TYPE_2396:基金会法人登记证书 + * CERTIFICATE_TYPE_2399:宗教活动场所登记证 + * CERTIFICATE_TYPE_2400:政府部门下发的其他有效证明文件 + * CERTIFICATE_TYPE_2520:执业许可证/执业证 + * CERTIFICATE_TYPE_2521:基层群众性自治组织特别法人统一社会信用代码证 + * CERTIFICATE_TYPE_2522:农村集体经济组织登记证 + */ +public enum EnumSharingReceiverBusinessCretType { + + CERTIFICATE_TYPE_2388(2388, "CERTIFICATE_TYPE_2388", "事业单位法人证书"), + CERTIFICATE_TYPE_2389(2389, "CERTIFICATE_TYPE_2389", "统一社会信用代码证书"), + CERTIFICATE_TYPE_2394(2394, "CERTIFICATE_TYPE_2394", "社会团体法人登记证书"), + CERTIFICATE_TYPE_2395(2395, "CERTIFICATE_TYPE_2395", "民办非企业单位登记证书"), + CERTIFICATE_TYPE_2396(2396, "CERTIFICATE_TYPE_2396", "基金会法人登记证书"), + CERTIFICATE_TYPE_2399(2399, "CERTIFICATE_TYPE_2399", "宗教活动场所登记证"), + CERTIFICATE_TYPE_2400(2400, "CERTIFICATE_TYPE_2400", "政府部门下发的其他有效证明文件"), + CERTIFICATE_TYPE_2520(2520, "CERTIFICATE_TYPE_2520", "执业许可证/执业证"), + CERTIFICATE_TYPE_2521(2521, "CERTIFICATE_TYPE_2521", "基层群众性自治组织特别法人统一社会信用代码证"), + CERTIFICATE_TYPE_2522(2522, "CERTIFICATE_TYPE_2522", "农村集体经济组织登记证"), + ; + + public static EnumSharingReceiverBusinessCretType getEnum(Integer code) { + for (EnumSharingReceiverBusinessCretType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverBusinessCretType getEnum(String codeStr) { + for (EnumSharingReceiverBusinessCretType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverBusinessCretType(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverContactType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverContactType.java new file mode 100644 index 000000000..313026c0f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverContactType.java @@ -0,0 +1,53 @@ +package com.iformall.enums; + +/** + * 证件持有人类型 + * LEGAL:法人 + * SUPER:经办人 + */ +public enum EnumSharingReceiverContactType { + + LEGAL(65, "65", "法人"), + SUPER(66, "66", "经办人"), + ; + + public static EnumSharingReceiverContactType getEnum(Integer code) { + for (EnumSharingReceiverContactType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverContactType getEnum(String codeStr) { + for (EnumSharingReceiverContactType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverContactType(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverFinanceType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverFinanceType.java new file mode 100644 index 000000000..663ff364a --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverFinanceType.java @@ -0,0 +1,59 @@ +package com.iformall.enums; + +/** + * 金融机构类型 + * BANK_AGENT:银行业, 适用于商业银行、政策性银行、农村合作银行、村镇银行、开发性金融机构等 + * PAYMENT_AGENT:支付机构, 适用于非银行类支付机构 + * INSURANCE:保险业, 适用于保险、保险中介、保险代理、保险经纪等保险类业务 + * TRADE_AND_SETTLE:交易及结算类金融机构, 适用于交易所、登记结算类机构、银行卡清算机构、资金清算中心等 + * OTHER:其他金融机构, 适用于财务公司、信托公司、金融资产管理公司、金融租赁公司、汽车金融公司、贷款公司、货币经纪公司、消费金融公司、证券业、金融控股公司、股票、期货、货币兑换、小额贷款公司、金融资产管理、担保公司、商业保理公司、典当行、融资租赁公司、财经咨询等其他金融业 + */ +public enum EnumSharingReceiverFinanceType { + + BANK_AGENT(1, "BANK_AGENT", "银行业"), + PAYMENT_AGENT(2, "PAYMENT_AGENT", "支付机构"), + INSURANCE(3, "INSURANCE", "保险业"), + TRADE_AND_SETTLE(4, "TRADE_AND_SETTLE", "交易及结算类金融机构"), + OTHER(5, "OTHER", "其他金融机构"), + ; + + public static EnumSharingReceiverFinanceType getEnum(Integer code) { + for (EnumSharingReceiverFinanceType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverFinanceType getEnum(String codeStr) { + for (EnumSharingReceiverFinanceType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverFinanceType(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdDocType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdDocType.java new file mode 100644 index 000000000..96edc36dd --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdDocType.java @@ -0,0 +1,65 @@ +package com.iformall.enums; + +/** + * 经营者/法人证件类型 + * IDENTIFICATION_TYPE_MAINLAND_IDCARD:中国大陆居民-身份证 + * IDENTIFICATION_TYPE_OVERSEA_PASSPORT:其他国家或地区居民-护照 + * IDENTIFICATION_TYPE_HONGKONG:中国香港居民--来往内地通行证 + * IDENTIFICATION_TYPE_MACAO:中国澳门居民--来往内地通行证 + * IDENTIFICATION_TYPE_TAIWAN:中国台湾居民--来往大陆通行证 + * IDENTIFICATION_TYPE_FOREIGN_RESIDENT:外国人居留证 + * IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT:港澳居民证 + * IDENTIFICATION_TYPE_TAIWAN_RESIDENT:台湾居民证 + */ +public enum EnumSharingReceiverIdDocType { + + IDENTIFICATION_TYPE_MAINLAND_IDCARD(1, "IDENTIFICATION_TYPE_MAINLAND_IDCARD", "中国大陆居民-身份证"), + IDENTIFICATION_TYPE_OVERSEA_PASSPORT(2, "IDENTIFICATION_TYPE_OVERSEA_PASSPORT", "其他国家或地区居民-护照"), + IDENTIFICATION_TYPE_HONGKONG(3, "IDENTIFICATION_TYPE_HONGKONG", "中国香港居民--来往内地通行证"), + IDENTIFICATION_TYPE_MACAO(4, "IDENTIFICATION_TYPE_MACAO", "中国澳门居民--来往内地通行证"), + IDENTIFICATION_TYPE_TAIWAN(5, "IDENTIFICATION_TYPE_TAIWAN", "中国台湾居民--来往大陆通行证"), + IDENTIFICATION_TYPE_FOREIGN_RESIDENT(6, "IDENTIFICATION_TYPE_FOREIGN_RESIDENT", "外国人居留证"), + IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT(7, "IDENTIFICATION_TYPE_HONGKONG_MACAO_RESIDENT", "港澳居民证"), + IDENTIFICATION_TYPE_TAIWAN_RESIDENT(8, "IDENTIFICATION_TYPE_TAIWAN_RESIDENT", "台湾居民证"), + ; + + public static EnumSharingReceiverIdDocType getEnum(Integer code) { + for (EnumSharingReceiverIdDocType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverIdDocType getEnum(String codeStr) { + for (EnumSharingReceiverIdDocType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverIdDocType(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdHolderType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdHolderType.java new file mode 100644 index 000000000..9b9919ab6 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverIdHolderType.java @@ -0,0 +1,53 @@ +package com.iformall.enums; + +/** + * 证件持有人类型 + * LEGAL:法人 + * SUPER:经办人 + */ +public enum EnumSharingReceiverIdHolderType { + + LEGAL(1, "LEGAL", "法人"), + SUPER(2, "SUPER", "经办人"), + ; + + public static EnumSharingReceiverIdHolderType getEnum(Integer code) { + for (EnumSharingReceiverIdHolderType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverIdHolderType getEnum(String codeStr) { + for (EnumSharingReceiverIdHolderType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverIdHolderType(Integer code, String codeStr,String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverOrganizationType.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverOrganizationType.java new file mode 100644 index 000000000..dd66a78ef --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverOrganizationType.java @@ -0,0 +1,63 @@ +package com.iformall.enums; + +/** + * 进件店铺 主体类型 + * 2401:小微商户,指无营业执照的个人商家。 + * 2500:个人卖家,指无营业执照,已持续从事电子商务经营活动满6个月,且期间经营收入累计超过20万元的个人商家。(若选择该主体,请在“补充说明”填写相关描述)。 + * 4:个体工商户,营业执照上的主体类型一般为个体户、个体工商户、个体经营。 + * 2:企业,营业执照上的主体类型一般为有限公司、有限责任公司。 + * 3:事业单位,包括国内各类事业单位,如:医疗、教育、学校等单位。 + * 2502:政府机关,包括各级、各类政府机关,如机关党委、税务、民政、人社、工商、商务、市监等。 + * 1708:社会组织,包括社会团体、民办非企业、基金会、基层群众性自治组织、农村集体经济组织等组织。 + */ +public enum EnumSharingReceiverOrganizationType { + + XIAOWEI(2401, "2401", "小微商户"), + GEREN(2500, "2500", "个人卖家"), + GETI(4, "4", "个体工商户"), + QIYE(2, "2", "企业"), + SHIYE(3, "3", "事业单位"), + ZHENGFU(2502, "2502", "政府机关"), + SHEHUI(1708, "1708", "社会组织"), + ; + + public static EnumSharingReceiverOrganizationType getEnum(Integer code) { + for (EnumSharingReceiverOrganizationType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverOrganizationType getEnum(String codeStr) { + for (EnumSharingReceiverOrganizationType value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverOrganizationType(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverSignState.java b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverSignState.java new file mode 100644 index 000000000..4c6c46413 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverSignState.java @@ -0,0 +1,55 @@ +package com.iformall.enums; + +/** + * 签约状态 + * 1、UNSIGNED:未签约。该状态下,电商平台可查询获取签约链接,引导二级商户的超级管理员完成签约; + * 2、SIGNED :已签约。指二级商户的超级管理员已完成签约。注意:若申请单被驳回,商户修改了商户主体名称、法人名称、超级管理员信息、主体类型等信息,则需重新签约。 + * 3、NOT_SIGNABLE:不可签约。该状态下,暂不支持超级管理员签约。一般为申请单处于已驳回、已冻结、机器校验中状态,无法签约 + */ +public enum EnumSharingReceiverSignState { + + UNSIGNED(1, "UNSIGNED", "未签约"), + SIGNED(2, "SIGNED", "已签约"), + NOT_SIGNABLE(3, "NOT_SIGNABLE", "不可签约"), + ; + + public static EnumSharingReceiverSignState getEnum(Integer code) { + for (EnumSharingReceiverSignState value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + public static EnumSharingReceiverSignState getEnum(String codeStr) { + for (EnumSharingReceiverSignState value : values()) { + if (value.getCodeStr().equals(codeStr)) { + return value; + } + } + return null; + } + + private Integer code; + private String codeStr; + private String message; + + EnumSharingReceiverSignState(Integer code, String codeStr, String message) { + this.code = code; + this.codeStr = codeStr; + this.message = message; + } + + public Integer getCode() { + return code; + } + + public String getCodeStr() { + return codeStr; + } + + public String getMessage() { + return message; + } +} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountBillMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountBillMapper.java index e286f3510..eff08f2d4 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountBillMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountBillMapper.java @@ -12,6 +12,4 @@ public interface WxPayAccountBillMapper extends CommonMapper findList(WxPayAccountBill wxPayAccount); - - WxPayAccountBill getByTenantId(String tenantId); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountMapper.java index 2819adeee..1e3b7bdd7 100644 --- a/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountMapper.java +++ b/mallinkService/src/main/java/com/iformall/mapper/WxPayAccountMapper.java @@ -8,6 +8,4 @@ public interface WxPayAccountMapper extends CommonMapper { List findList(WxPayAccount wxPayAccount); - - WxPayAccount getByTenantId(String tenantId); } diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java new file mode 100644 index 000000000..4da269e0d --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java @@ -0,0 +1,13 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxProfitSharingReceiver; +import com.iformall.domain.po.WxProfitSharingReceiverApply; + +import java.util.List; + +public interface WxProfitSharingReceiverApplyMapper extends CommonMapper { + + List findList(WxProfitSharingReceiverApply apply); + +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java b/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java index b7cddb8a7..83d45304a 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxPayAccountBillService.java @@ -56,6 +56,4 @@ public interface WxPayAccountBillService { */ void deleteById(Long id); - - WxPayAccountBill getByTenantId(String tenantId); } diff --git a/mallinkService/src/main/java/com/iformall/service/WxProjectConfigService.java b/mallinkService/src/main/java/com/iformall/service/WxProjectConfigService.java index 5e4adff0b..d75d65ce2 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxProjectConfigService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxProjectConfigService.java @@ -30,7 +30,7 @@ public interface WxProjectConfigService { * 初始化新增修改wxPayAccount * @param wxPayAccount */ - void initPayAccount(WxPayAccount wxPayAccount); + void initPayAccount(WxAppinfo appinfo,WxPayAccount wxPayAccount); /** * 初始化新增userInfo diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java index 2b0eefca2..575998dd6 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPayAccountBillServiceImpl.java @@ -84,10 +84,6 @@ public class WxPayAccountBillServiceImpl implements WxPayAccountBillService { wxPayAccountBillMapper.deleteById(id); } - @Override - public WxPayAccountBill getByTenantId(String tenantId) { - return wxPayAccountBillMapper.getByTenantId(tenantId); - } } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java index e4a5b4977..150d673b6 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxProjectConfigServiceImpl.java @@ -194,14 +194,18 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { @Override @Transactional(rollbackFor = {Exception.class}) - public void initPayAccount(WxPayAccount wxPayAccount) { + public void initPayAccount(WxAppinfo appinfo,WxPayAccount wxPayAccount) { + if(appinfo.getPayId() != null){ + wxPayAccount.setId(appinfo.getPayId()); + } wxPayAccountService.saveOrUpdate(wxPayAccount); - WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxPayAccount.getTenantId()); - if(wxPayAccountBill == null){ - wxPayAccountBill = new WxPayAccountBill(); - wxPayAccountBill.setTenantId(wxPayAccount.getTenantId()); - wxPayAccountBill.setServiceChargeRate(0); + + WxPayAccountBill wxPayAccountBill = new WxPayAccountBill(); + if(appinfo.getPayBillId() != null){ + wxPayAccountBill.setId(appinfo.getPayBillId()); } + wxPayAccountBill.updateTenantInfo(wxPayAccount); + wxPayAccountBill.setServiceChargeRate(0); wxPayAccountBill.setMchId(wxPayAccount.getMchId()); wxPayAccountBill.setSubMchId(wxPayAccount.getSubMchId()); wxPayAccountBill.setApiKey(wxPayAccount.getApiKey()); @@ -212,15 +216,13 @@ public class WxProjectConfigServiceImpl implements WxProjectConfigService { wxPayAccountBill.setRate(wxPayAccount.getRate()); wxPayAccountBill.setRealRate(wxPayAccount.getRealRate()); wxPayAccountBillService.saveOrUpdate(wxPayAccountBill); - WxAppinfo wxAppinfo = new WxAppinfo(); - wxAppinfo.setTenantId(wxPayAccount.getTenantId()); - List list = wxAppinfoService.getList(wxAppinfo); - if(list != null && list.size() > 0){ - for (WxAppinfo wa:list) { - wa.setPayId(wxPayAccount.getId()); - wa.setPayBillId(wxPayAccountBill.getId()); - wxAppinfoService.saveOrUpdate(wa); - } + + if(appinfo.getPayId() == null){ + WxAppinfo updApp = new WxAppinfo(); + updApp.updateTenantInfo(appinfo); + updApp.setId(appinfo.getId()); + updApp.setPayId(wxPayAccount.getId()); + updApp.setPayBillId(wxPayAccountBill.getId()); } } diff --git a/mallinkService/src/main/resources/mapper/WxPayAccountBillMapper.xml b/mallinkService/src/main/resources/mapper/WxPayAccountBillMapper.xml index e3de9c36a..b22286de6 100644 --- a/mallinkService/src/main/resources/mapper/WxPayAccountBillMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPayAccountBillMapper.xml @@ -87,11 +87,4 @@ - - - diff --git a/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml b/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml index 74464afe2..f8f932619 100644 --- a/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPayAccountMapper.xml @@ -97,11 +97,5 @@ - - diff --git a/mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml b/mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml new file mode 100644 index 000000000..6fa9e5644 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`plat`, + `out_request_no`,`organization_type`,`finance_institution`,`business_license_info`,`finance_institution_info`, + `id_holder_type`,`id_doc_type`,`authorize_letter`,`authorize_letter_copy`,`id_card_info`,`id_doc_info`, + `owner`,`ubo_info_list`,`account_info`,`contact_info`,`sales_scene_info`,`settlement_info`, + `merchant_shortname`,`qualifications`,`business_addition_pics`,`business_addition_desc`, + `applyment_id`,`applyment_state`,`applyment_state_desc`,`sign_state`,`sign_url`, + `sub_mchid`,`account_validation`,`audit_detail`,`legal_validation_url`,`legal_validation_qrcode`, + `verify_result`,`verify_fail_reason`,`create_time`,`update_time` + + + + where 1 = 1 + + + and `id` = #{id} + + + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + + + and `merchant_id` = #{merchantId} + + + + and `plat` = #{plat} + + + + and `out_request_no` = #{outRequestNo} + + + + and `organization_type` = #{organizationType} + + + + and `applyment_id` = #{applymentId} + + + + and `applyment_state` = #{applymentState} + + + + and `sign_state` = #{signState} + + + + and `verify_result` = #{verifyResult} + + + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + + diff --git a/mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java b/mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java index cf29dd9de..d2da2e7a4 100644 --- a/mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java +++ b/mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxProjectConfigController.java @@ -10,10 +10,7 @@ import com.iformall.controller.base.BaseController; import com.iformall.domain.po.*; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxWeappInfo; -import com.iformall.enums.EnumGroupSupport; -import com.iformall.enums.EnumInvestUserType; -import com.iformall.enums.EnumSaleType; -import com.iformall.enums.EnumUserAdmin; +import com.iformall.enums.*; import com.iformall.service.*; import com.iformall.shiro.PasswordHelper; import com.iformall.utils.Constant; @@ -234,16 +231,17 @@ public class WxProjectConfigController extends BaseController { public ResultData initPayAccount(@RequestBody WxPayAccount wxPayAccount) { logger.debug("[" + getIpAddr() + "] WxProjectConfigController::initPayAccount"); try { - if(StringUtils.isBlank(wxPayAccount.getTenantId())){ - return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); - } - WxPayAccount getByTenantId = wxPayAccountService.getByTenantId(wxPayAccount.getTenantId()); - if(wxPayAccount.getId() != null && (getByTenantId == null || !getByTenantId.getId().equals(wxPayAccount.getId()))){ - return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); + if(wxPayAccount.getAppInfoId() == null){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"小程序Id必传"); } - if(wxPayAccount.getId() == null && getByTenantId != null){ - return new ResultData(ErrorCode.SYS_PARAMETER_ERROR); +// if(StringUtils.isBlank(wxPayAccount.getTenantId())){ +// return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"tenantId 必传"); +// } + WxAppinfo appinfo = wxAppinfoService.getById(wxPayAccount.getAppInfoId()); + if(appinfo == null || !EnumAppType.C.getCode().equals(appinfo.getType())){ + return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"小程序未找到或不是C端小程序"); } + wxPayAccount.updateTenantInfo(appinfo); if(StringUtils.isBlank(wxPayAccount.getNotifyUrl())){ wxPayAccount.setNotifyUrl(wechatWebProperties.getUrl()+"/wxPay/notify"); @@ -258,7 +256,7 @@ public class WxProjectConfigController extends BaseController { wxPayAccount.setShare(0);//0: 未分账,1:分账(默认不分账) } - wxProjectConfigService.initPayAccount(wxPayAccount); + wxProjectConfigService.initPayAccount(appinfo,wxPayAccount); return new ResultData(); }catch (Exception e){ @@ -277,16 +275,16 @@ public class WxProjectConfigController extends BaseController { if(StringUtils.isBlank(wxAppinfo.getTenantId())){ return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL); } - if(wxAppinfo.getId() == null){ - WxPayAccount byTenantId = wxPayAccountService.getByTenantId(wxAppinfo.getTenantId()); - if(byTenantId != null){ - wxAppinfo.setPayId(byTenantId.getId()); - } - WxPayAccountBill billByTenantId = wxPayAccountBillService.getByTenantId(wxAppinfo.getTenantId()); - if(billByTenantId != null){ - wxAppinfo.setPayBillId(billByTenantId.getId()); - } - } +// if(wxAppinfo.getId() == null){ +// WxPayAccount byTenantId = wxPayAccountService.getByTenantId(wxAppinfo.getTenantId()); +// if(byTenantId != null){ +// wxAppinfo.setPayId(byTenantId.getId()); +// } +// WxPayAccountBill billByTenantId = wxPayAccountBillService.getByTenantId(wxAppinfo.getTenantId()); +// if(billByTenantId != null){ +// wxAppinfo.setPayBillId(billByTenantId.getId()); +// } +// } wxAppinfoService.saveOrUpdate(wxAppinfo); @@ -591,12 +589,12 @@ public class WxProjectConfigController extends BaseController { TenantEntity tenantEntity = new TenantEntity(); tenantEntity.setTenantId(wxMall.getTenantId()); - ResultData wxMallBuildingFloorList = wxMallBuildingService.getBuildingFloorList(tenantEntity); - map.put("wxMallBuildingFloorList",wxMallBuildingFloorList.data); - WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId()); - map.put("wxPayAccount",wxPayAccount); - WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId()); - map.put("wxPayAccountBill",wxPayAccountBill); +// ResultData wxMallBuildingFloorList = wxMallBuildingService.getBuildingFloorList(tenantEntity); +// map.put("wxMallBuildingFloorList",wxMallBuildingFloorList.data); +// WxPayAccount wxPayAccount = wxPayAccountService.getByTenantId(wxMall.getTenantId()); +// map.put("wxPayAccount",wxPayAccount); +// WxPayAccountBill wxPayAccountBill = wxPayAccountBillService.getByTenantId(wxMall.getTenantId()); +// map.put("wxPayAccountBill",wxPayAccountBill); WxAppinfo wxAppinfo = new WxAppinfo(); wxAppinfo.setTenantId(wxMall.getTenantId());