bruce

仓管费

......@@ -57,7 +57,6 @@ public class PickPayBiz {
// multiply(new BigDecimal(pickTotal)).add(new BigDecimal("6"));
BigDecimal totalAmount = new BigDecimal("0.01");//调试接口代码写死
result.put("totalAmount", totalAmount);
String pickNo = pickBiz.createPickNo();
try {
CreateQrCode createQrCode = new CreateQrCode();
createQrCode.setQrCodeId(UnionPayUtil.getQrCodeId());
......@@ -67,7 +66,6 @@ public class PickPayBiz {
createQrCode.setBillDate(DateUtil.getNow(DateEnum.DATE));
//此处拼接提货信息
OutpropApplyPickInfo pickInfo = (OutpropApplyPickInfo) session.getAttribute("pickInfo");
pickInfo.setPickNo(pickNo);
createQrCode.setSrcReserve(JsonUtil.toJsonRemoveNull(pickInfo));
@SuppressWarnings("unchecked")
Map<String, String> mapTypes = JsonUtil.fromJson(JsonUtil.toJson(createQrCode), Map.class);
......@@ -75,7 +73,7 @@ public class PickPayBiz {
UnionResponse response = JsonUtil.fromJson(json, UnionResponse.class);
if (response != null && response.getErrCode().equals(UnionConstants.SUCCESS_CODE)) {
result.put("qrCode", UnionPayUtil.createQrCode(createQrCode.getQrCodeId()));
insertPickPay(userId, createQrCode.getBillNo(), pickNo, createQrCode.getSrcReserve());
insertPickPay(userId, createQrCode.getBillNo(), createQrCode.getSrcReserve());
} else {
result.put("code", false);
result.put("msg", response.getErrMsg());
......@@ -118,13 +116,12 @@ public class PickPayBiz {
return false;
}
private void insertPickPay(String clientId, String tradeNo, String applyNo, String extInfo) {
private void insertPickPay(String clientId, String tradeNo, String extInfo) {
OutpropApplyPayInfo insert = new OutpropApplyPayInfo();
insert.setCreatedAt(DateUtil.getNow());
insert.setClientId(clientId);
insert.setStatus("1");
insert.setTradeNo(tradeNo);
insert.setApplyNo(applyNo);
insert.setExtInfo(extInfo);
outpropApplyPayDao.insert(insert);
}
......
......@@ -23,7 +23,7 @@ public class CreateQrCode implements Serializable {
private String totalAmount;
private String qrCodeId;
private String returnUrl = "https://www.zhao.com/login";
private String notifyUrl = "http://192.168.10.106/notify.do";
private String notifyUrl = "http://192.168.10.106//pick/pay/notify";
public String getMsgSrc() {
return msgSrc;
......
......@@ -7,20 +7,20 @@
<id property="tradeNo" column="TRADE_NO" />
<result property="createdAt" column="CREATED_AT" />
<result property="updatedAt" column="UPDATED_AT" />
<result property="applyNo" column="APPLY_NO" />
<result property="clientId" column="CLIENT_ID" />
<result property="payAt" column="PAY_AT" />
<result property="status" column="STATUS" />
<result property="extInfo" column="EXT_INFO" />
</resultMap>
<sql id="base_field">
TRADE_NO,CREATED_AT,UPDATED_AT,APPLY_NO,PAY_AT,STATUS,EXT_INFO
TRADE_NO,CREATED_AT,UPDATED_AT,PAY_AT,STATUS,EXT_INFO,CLIENT_ID
</sql>
<insert id="insert" parameterType="OutpropApplyPayInfo">
INSERT INTO HS_ASSET.OUTPROPAPPLY_PAY (TRADE_NO,CREATED_AT,UPDATED_AT,APPLY_NO,PAY_AT,STATUS,EXT_INFO)
INSERT INTO HS_ASSET.OUTPROPAPPLY_PAY (TRADE_NO,CREATED_AT,UPDATED_AT,PAY_AT,STATUS,EXT_INFO,CLIENT_ID)
VALUES (#{tradeNo, jdbcType=VARCHAR}, #{createdAt, jdbcType=VARCHAR}, #{updatedAt, jdbcType=VARCHAR},
#{applyNo, jdbcType=VARCHAR}, #{payAt, jdbcType=VARCHAR}, #{status, jdbcType=VARCHAR}, #{extInfo, jdbcType=VARCHAR})
#{payAt, jdbcType=VARCHAR}, #{status, jdbcType=VARCHAR}, #{extInfo, jdbcType=VARCHAR}, #{clientId, jdbcType=VARCHAR})
</insert>
<select id="selectByTradeNo" parameterType="java.lang.String" resultMap="BaseMap">
......