debug
This commit is contained in:
parent
a72dfb8602
commit
cd2eb5adec
|
@ -33,4 +33,10 @@ public class BizParameter extends JSONObject
|
||||||
{
|
{
|
||||||
this.put(paramName, paramValue);
|
this.put(paramName, paramValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addParamNoNull(String paramName, Object paramValue) {
|
||||||
|
if (paramValue != null) {
|
||||||
|
this.put(paramName, paramValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
package com.ruoyi.common.pay.yst.domain.params;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 消费申请 参数
|
|
||||||
* @author wjh
|
|
||||||
* 2024/8/1
|
|
||||||
*/
|
|
||||||
public class AddOrderParam {
|
|
||||||
|
|
||||||
}
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.ruoyi.common.pay.yst.domain.params;
|
||||||
|
|
||||||
|
import com.ruoyi.common.pay.yst.enums.YstCertType;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 个人会员实名及绑卡(申请)参数
|
||||||
|
* @author wjh
|
||||||
|
* 2024/8/3
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
public class PersonRealNameAndBindCardApplyParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员编号
|
||||||
|
*/
|
||||||
|
private String signNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员角色
|
||||||
|
*/
|
||||||
|
private String memberRole;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件类型
|
||||||
|
*/
|
||||||
|
private String certType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 证件号码
|
||||||
|
*/
|
||||||
|
private String certNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行预留手机号
|
||||||
|
*/
|
||||||
|
private String phone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 银行卡号
|
||||||
|
*/
|
||||||
|
private String acctNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑卡方式
|
||||||
|
*/
|
||||||
|
private String bindType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对信用卡
|
||||||
|
* 有效期(月年)
|
||||||
|
* 格式为月年;如0321,2位月2位年
|
||||||
|
*/
|
||||||
|
private String validDate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 针对信用卡
|
||||||
|
* cvv2
|
||||||
|
*/
|
||||||
|
private String cvv2;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
package com.ruoyi.common.pay.yst.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author wjh
|
||||||
|
* 2024/8/3
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum YstBindType {
|
||||||
|
|
||||||
|
TLT("通联通协议支付签约", "6"),
|
||||||
|
SYB("收银宝快捷支付签约", "7"),
|
||||||
|
BANK_CARD4("银行卡四要素验证", "8");
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
private final String type;
|
||||||
|
|
||||||
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ruoyi.common.pay.yst.service;
|
package com.ruoyi.common.pay.yst.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.pay.yst.domain.params.PersonRealNameAndBindCardApplyParam;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 云商通账户接口
|
* 云商通账户接口
|
||||||
* @author wjh
|
* @author wjh
|
||||||
|
@ -10,6 +12,6 @@ public interface YstAccountService {
|
||||||
/**
|
/**
|
||||||
* 个人会员实名及绑卡(申请)
|
* 个人会员实名及绑卡(申请)
|
||||||
*/
|
*/
|
||||||
void personRealNameAndBindCardApply();
|
void personRealNameAndBindCardApply(PersonRealNameAndBindCardApplyParam param);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,17 @@
|
||||||
package com.ruoyi.common.pay.yst.service.impl;
|
package com.ruoyi.common.pay.yst.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.exception.ServiceException;
|
||||||
|
import com.ruoyi.common.pay.yst.config.YstConfig;
|
||||||
|
import com.ruoyi.common.pay.yst.constants.YstApi;
|
||||||
|
import com.ruoyi.common.pay.yst.constants.YstTransCode;
|
||||||
|
import com.ruoyi.common.pay.yst.domain.BizParameter;
|
||||||
|
import com.ruoyi.common.pay.yst.domain.params.PersonRealNameAndBindCardApplyParam;
|
||||||
import com.ruoyi.common.pay.yst.service.YstAccountService;
|
import com.ruoyi.common.pay.yst.service.YstAccountService;
|
||||||
|
import com.ruoyi.common.pay.yst.util.SM4Utils;
|
||||||
|
import com.ruoyi.common.pay.yst.util.YstClient;
|
||||||
|
import com.ruoyi.common.utils.SnowFlakeUtil;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -9,11 +20,42 @@ import org.springframework.stereotype.Service;
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
public class YstAccountServiceImpl implements YstAccountService {
|
public class YstAccountServiceImpl implements YstAccountService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private YstClient client;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private YstConfig config;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 个人会员实名及绑卡(申请)
|
* 个人会员实名及绑卡(申请)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void personRealNameAndBindCardApply() {
|
public void personRealNameAndBindCardApply(PersonRealNameAndBindCardApplyParam param) {
|
||||||
|
try {
|
||||||
|
|
||||||
|
// 组装参数
|
||||||
|
BizParameter bizParameter = new BizParameter();
|
||||||
|
// 发送请求
|
||||||
|
bizParameter.addParam("reqTraceNum", String.valueOf(SnowFlakeUtil.newId()));
|
||||||
|
bizParameter.addParam("signNum", param.getSignNum());
|
||||||
|
bizParameter.addParam("memberRole", param.getMemberRole());
|
||||||
|
bizParameter.addParam("cerType", param.getCertType());
|
||||||
|
|
||||||
|
bizParameter.addParam("cerNum", SM4Utils.encryptEcb(config.getSecretKey(),param.getCertNum()));
|
||||||
|
bizParameter.addParam("name",param.getName());
|
||||||
|
bizParameter.addParam("acctNum", SM4Utils.encryptEcb(config.getSecretKey(),param.getAcctNum()));
|
||||||
|
|
||||||
|
bizParameter.addParam("phone",param.getPhone());
|
||||||
|
bizParameter.addParam("bindType",param.getBindType());//6-通联通协议支付,7-收银宝快捷,8-银行卡四要素
|
||||||
|
|
||||||
|
bizParameter.addParam("validDate",param.getValidDate());
|
||||||
|
bizParameter.addParam("cvv2",param.getCvv2());
|
||||||
|
bizParameter.addParam("bizOrderCode",String.valueOf(System.currentTimeMillis()));
|
||||||
|
client.sendRequest(YstApi.TM, YstTransCode.INDIVIDUAL_MEMBER_REAL_NAME_AND_BIND_CARD_APPLY, bizParameter, String.class);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new ServiceException(e.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,6 @@ import com.ruoyi.common.pay.yst.constants.YstTransCode;
|
||||||
import com.ruoyi.common.pay.yst.domain.BizParameter;
|
import com.ruoyi.common.pay.yst.domain.BizParameter;
|
||||||
import com.ruoyi.common.pay.yst.domain.YstResponse;
|
import com.ruoyi.common.pay.yst.domain.YstResponse;
|
||||||
import com.ruoyi.common.pay.yst.domain.bizRes.comsumptionApply.ConsumptionApplyRes;
|
import com.ruoyi.common.pay.yst.domain.bizRes.comsumptionApply.ConsumptionApplyRes;
|
||||||
import com.ruoyi.common.pay.yst.domain.params.AddOrderParam;
|
|
||||||
import com.ruoyi.common.pay.yst.service.YstPayService;
|
import com.ruoyi.common.pay.yst.service.YstPayService;
|
||||||
import com.ruoyi.common.pay.yst.util.SM4Utils;
|
import com.ruoyi.common.pay.yst.util.SM4Utils;
|
||||||
import com.ruoyi.common.pay.yst.util.YstClient;
|
import com.ruoyi.common.pay.yst.util.YstClient;
|
||||||
|
|
|
@ -64,6 +64,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</if>
|
||||||
|
<if test="userIds != null and userIds.size() > 0">
|
||||||
|
and ss.user_id in
|
||||||
|
<foreach collection="userIds" close=")" item="item" open="(" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSmStoreList" parameterType="StoreQuery" resultMap="SmStoreResult">
|
<select id="selectSmStoreList" parameterType="StoreQuery" resultMap="SmStoreResult">
|
||||||
|
|
|
@ -242,6 +242,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<where>
|
<where>
|
||||||
<include refid="searchCondition"/>
|
<include refid="searchCondition"/>
|
||||||
</where>
|
</where>
|
||||||
|
order by stb.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectWithdrawById" resultMap="SmTransactionBillResult">
|
<select id="selectWithdrawById" resultMap="SmTransactionBillResult">
|
||||||
|
|
|
@ -497,6 +497,12 @@ public class TransactionBillServiceImpl implements TransactionBillService {
|
||||||
data.setPayPicture(dto.getPayPicture());
|
data.setPayPicture(dto.getPayPicture());
|
||||||
data.setWithdrawType(dto.getWithdrawType());
|
data.setWithdrawType(dto.getWithdrawType());
|
||||||
data.setOfflineImage(dto.getOfflineImage());
|
data.setOfflineImage(dto.getOfflineImage());
|
||||||
|
|
||||||
|
// 线下打款并且状态为已打款,则修改支付时间为当前
|
||||||
|
if (WithdrawType.OFFLINE.getType().equals(dto.getWithdrawType()) && TransactionBillStatus.WITHDRAW_SUCCESS.equals(status)) {
|
||||||
|
data.setPayTime(DateUtils.getNowDate());
|
||||||
|
}
|
||||||
|
|
||||||
TransactionBillQuery query = new TransactionBillQuery();
|
TransactionBillQuery query = new TransactionBillQuery();
|
||||||
query.setBillId(dto.getBillId());
|
query.setBillId(dto.getBillId());
|
||||||
query.setType(TransactionBillType.WITHDRAW.getType());
|
query.setType(TransactionBillType.WITHDRAW.getType());
|
||||||
|
|
|
@ -4,10 +4,8 @@ import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.ValidGroup;
|
import com.ruoyi.common.core.domain.ValidGroup;
|
||||||
import com.ruoyi.common.utils.ServiceUtil;
|
|
||||||
import com.ruoyi.ss.user.domain.SmUserQuery;
|
import com.ruoyi.ss.user.domain.SmUserQuery;
|
||||||
import com.ruoyi.ss.user.domain.SmUserVo;
|
import com.ruoyi.ss.user.domain.SmUserVo;
|
||||||
import com.ruoyi.ss.user.service.UserAssembler;
|
import com.ruoyi.ss.user.service.UserAssembler;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user