Merge #62 into master from cc_20260313_ws_wallet
网商 * cc_20260313_ws_wallet: (3 commits squashed) - fix:新店开通网商钱包 - fix:网商钱包开通回调修改 - fix Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/62
This commit is contained in:
@@ -41,7 +41,7 @@ public enum ShopSubStageEnum {
|
||||
SHOP_STAGE_22(ShopStageEnum.SHOP_STAGE_3, 220, "快手", null),
|
||||
SHOP_STAGE_25(ShopStageEnum.SHOP_STAGE_3, 250, "京东外卖", null),
|
||||
|
||||
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 260, "开通门店平安钱包", 1),
|
||||
SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 260, "开通门店网商钱包", 1),
|
||||
SHOP_STAGE_27(ShopStageEnum.SHOP_STAGE_2, 270, "开业验收", 1),
|
||||
SHOP_STAGE_28(ShopStageEnum.SHOP_STAGE_2, 280, "选择标准店型", 1),
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public enum ShopSubStageStatusEnum {
|
||||
SHOP_SUB_STAGE_STATUS_50(ShopSubStageEnum.SHOP_STAGE_5, 500, "登记中", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_51(ShopSubStageEnum.SHOP_STAGE_5, 510, "已完成", Boolean.TRUE),
|
||||
|
||||
//开通门店平安钱包
|
||||
//开通门店网商钱包
|
||||
SHOP_SUB_STAGE_STATUS_60(ShopSubStageEnum.SHOP_STAGE_6, 2600, "未开通", Boolean.FALSE),
|
||||
SHOP_SUB_STAGE_STATUS_61(ShopSubStageEnum.SHOP_STAGE_6, 2610, "已完成", Boolean.TRUE),
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
package com.cool.store.dto.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网商充值账户
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/3/13
|
||||
*/
|
||||
@Data
|
||||
public class WsPayAccountDTO {
|
||||
|
||||
@ApiModelProperty("门店id")
|
||||
private String outStoreId;
|
||||
|
||||
@ApiModelProperty("收款账号")
|
||||
private String payeeAccNo;
|
||||
|
||||
@ApiModelProperty("收款账户名称")
|
||||
private String payeeAccName;
|
||||
|
||||
@ApiModelProperty("收款银行名称")
|
||||
private String payeeBankName;
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 网商新店开通网商自然人账户Request
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2026/3/13
|
||||
*/
|
||||
@Data
|
||||
public class NewStoreAccountCreateRequest {
|
||||
@ApiModelProperty(value = "CRM门店编号", required = true)
|
||||
public String outStoreId;
|
||||
|
||||
@ApiModelProperty(value = "联系电话", required = true)
|
||||
private String phoneNumber;
|
||||
|
||||
@ApiModelProperty(value = "账户简称", required = true)
|
||||
private String accountAliasName;
|
||||
|
||||
@ApiModelProperty("法人姓名")
|
||||
private String legalName;
|
||||
|
||||
@ApiModelProperty("法人证件号码")
|
||||
private String legalNo;
|
||||
|
||||
@ApiModelProperty("法人联系电话")
|
||||
private String legalPhone;
|
||||
|
||||
@ApiModelProperty("法人银行卡号")
|
||||
private String legalAccountCardNo;
|
||||
|
||||
@ApiModelProperty("法人银行预留手机号")
|
||||
private String legalAccountPhone;
|
||||
|
||||
@ApiModelProperty("法人银行卡开户支行")
|
||||
private String legalBankNo;
|
||||
|
||||
@ApiModelProperty("法人银行卡开户支行名称")
|
||||
private String legalBankName;
|
||||
|
||||
@ApiModelProperty("法人代表证件人像面图片链接")
|
||||
private String certPhotoA;
|
||||
|
||||
@ApiModelProperty("法人代表证件国徽面图片链接")
|
||||
private String certPhotoB;
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package com.cool.store.request.wallet;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/11/20 13:38
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class NewWsCreateAccountRequest {
|
||||
@ApiModelProperty("门店id")
|
||||
@NotNull(message = "门店id不能为空")
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 签约人名称
|
||||
*/
|
||||
@ApiModelProperty(value = "签约人名称")
|
||||
private String signerName;
|
||||
|
||||
/**
|
||||
* 签约人身份证号码
|
||||
*/
|
||||
@ApiModelProperty(value = "签约人身份证号码")
|
||||
private String signerIdCard;
|
||||
|
||||
/**
|
||||
* 签约人手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "签约人手机号")
|
||||
private String signerPhone;
|
||||
|
||||
/**
|
||||
* 签约人身份证正面
|
||||
*/
|
||||
@ApiModelProperty(value = "签约人身份证正面")
|
||||
private String signerIdCardFront;
|
||||
|
||||
/**
|
||||
* 签约人身份证反面
|
||||
*/
|
||||
@ApiModelProperty(value = "签约人身份证反面")
|
||||
private String signerIdCardBack;
|
||||
|
||||
/**
|
||||
* 结算卡
|
||||
*/
|
||||
@ApiModelProperty(value = "结算卡")
|
||||
@NotBlank(message = "结算卡不能为空")
|
||||
private String settlementCard;
|
||||
|
||||
/**
|
||||
* 开户支行名称
|
||||
*/
|
||||
@ApiModelProperty(value = "开户支行名称")
|
||||
@NotBlank(message = "开户支行名称不能为空")
|
||||
private String bankBranchName;
|
||||
|
||||
/**
|
||||
* 开户支行编号
|
||||
*/
|
||||
@ApiModelProperty(value = "开户支行编号")
|
||||
@NotBlank(message = "开户支行编号不能为空")
|
||||
private String bankBranchCode;
|
||||
|
||||
/**
|
||||
* 银行预留手机号
|
||||
*/
|
||||
@ApiModelProperty(value = "银行预留手机号")
|
||||
@NotBlank(message = "银行预留手机号不能为空")
|
||||
private String bankReservedPhone;
|
||||
}
|
||||
@@ -222,6 +222,13 @@ public class WalletApiService {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl+"/open/crm/account/ws/v2/create", request, StoreIdDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新店创建门店网商账户
|
||||
*/
|
||||
public StoreIdDTO newStoreOpenAccount(NewStoreAccountCreateRequest request) {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/account/ws/v1/createIndividualAccount", request, StoreIdDTO.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取交易记录列表
|
||||
* @param request
|
||||
@@ -261,4 +268,11 @@ public class WalletApiService {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 网商充值账户查询
|
||||
*/
|
||||
public WsPayAccountDTO wsPayAccountQuery(OutStoreIdRequest request) {
|
||||
return walletHttpClientRest.postWithSign(walletBaseUrl + "/open/crm/account/ws/v1/queryCollectionAccount", request, WsPayAccountDTO.class);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +180,11 @@ public interface WalletService {
|
||||
*/
|
||||
Boolean openOnlineBankAccount(CoolOpenBasicInfoRequest request);
|
||||
|
||||
/**
|
||||
* 新店开通网商银行
|
||||
*/
|
||||
Boolean newStoreOpenOnlineBankAccount(NewWsCreateAccountRequest request);
|
||||
|
||||
/**
|
||||
* 网商发送激活短信
|
||||
* @param request 门店idRequest
|
||||
@@ -192,4 +197,9 @@ public interface WalletService {
|
||||
* @return
|
||||
*/
|
||||
List<BankInfoDTO> findBankHeadName();
|
||||
|
||||
/**
|
||||
* 网商充值账户查询
|
||||
*/
|
||||
WsPayAccountDTO wsPayAccountQuery(OutStoreIdRequest request);
|
||||
}
|
||||
|
||||
@@ -334,6 +334,14 @@ public class WalletServiceImpl implements WalletService {
|
||||
if (Integer.valueOf(5).equals(request.getAccountStatus())) {
|
||||
redisUtilPool.setString(key, request.getFailReason());
|
||||
} else {
|
||||
// 开通成功,判断是否为新开店,如果是进行阶段流转
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfoByStoreId(request.getOutStoreId());
|
||||
if (Objects.nonNull(shopInfo)) {
|
||||
ShopStageInfoDO payStage = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_6);
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_60.getShopSubStageStatus().equals(payStage.getShopSubStageStatus())) {
|
||||
walletOpenComplete(shopInfo);
|
||||
}
|
||||
}
|
||||
redisUtilPool.delKey(key);
|
||||
}
|
||||
// 如果创建成功,删除网商开通失败标识
|
||||
@@ -672,6 +680,29 @@ public class WalletServiceImpl implements WalletService {
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean newStoreOpenOnlineBankAccount(NewWsCreateAccountRequest request) {
|
||||
ShopInfoDO store = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (Objects.isNull(store)) {
|
||||
throw new ServiceException(ErrorCodeEnum.STORE_NOT_EXIST);
|
||||
}
|
||||
NewStoreAccountCreateRequest walletRequest = new NewStoreAccountCreateRequest();
|
||||
walletRequest.setOutStoreId(store.getStoreId());
|
||||
walletRequest.setPhoneNumber(request.getSignerPhone());
|
||||
walletRequest.setAccountAliasName(request.getSignerName() + UUIDUtils.get8UUID());
|
||||
walletRequest.setLegalName(request.getSignerName());
|
||||
walletRequest.setLegalNo(request.getSignerIdCard());
|
||||
walletRequest.setLegalPhone(request.getSignerPhone());
|
||||
walletRequest.setLegalAccountCardNo(request.getSettlementCard());
|
||||
walletRequest.setLegalAccountPhone(request.getBankReservedPhone());
|
||||
walletRequest.setLegalBankNo(request.getBankBranchCode());
|
||||
walletRequest.setLegalBankName(request.getBankBranchName());
|
||||
walletRequest.setCertPhotoA(request.getSignerIdCardFront());
|
||||
walletRequest.setCertPhotoB(request.getSignerIdCardBack());
|
||||
walletApiService.newStoreOpenAccount(walletRequest);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取开店流程网商银行开通失败标记
|
||||
*/
|
||||
@@ -714,6 +745,11 @@ public class WalletServiceImpl implements WalletService {
|
||||
return walletApiService.findBankHeadName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public WsPayAccountDTO wsPayAccountQuery(OutStoreIdRequest request) {
|
||||
return walletApiService.wsPayAccountQuery(request);
|
||||
}
|
||||
|
||||
public String getStoreId(StoreShopRequest request) {
|
||||
String storeId = request.getStoreId();
|
||||
if (StringUtils.isBlank(storeId) && Objects.nonNull(request.getShopId())) {
|
||||
|
||||
@@ -135,6 +135,11 @@ public class MiniWalletController {
|
||||
return ResponseResult.success(walletService.openOnlineBankAccount(request));
|
||||
}
|
||||
|
||||
@ApiOperation("新店网商钱包提交开通")
|
||||
@PostMapping("/newOpenOnlineBankAccount")
|
||||
public ResponseResult<Boolean> newStoreOpenOnlineBankAccount(@RequestBody @Validated NewWsCreateAccountRequest request) {
|
||||
return ResponseResult.success(walletService.newStoreOpenOnlineBankAccount(request));
|
||||
}
|
||||
|
||||
@ApiOperation("网商账户激活")
|
||||
@PostMapping("/onlineBankActive")
|
||||
@@ -147,4 +152,10 @@ public class MiniWalletController {
|
||||
public ResponseResult<List<BankInfoDTO>> findBankHeadName() {
|
||||
return ResponseResult.success(walletService.findBankHeadName());
|
||||
}
|
||||
|
||||
@ApiOperation("网商充值账户查询")
|
||||
@PostMapping("/wsPayAccountQuery")
|
||||
public ResponseResult<WsPayAccountDTO> wsPayAccountQuery(@RequestBody @Validated OutStoreIdRequest request) {
|
||||
return ResponseResult.success(walletService.wsPayAccountQuery(request));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user