Commit ffded0b9 authored by 5359's avatar 5359

获取支付二维码接口代码调整

parent e57ef08c
package com.chinapay.service;
import com.alibaba.fastjson.JSONObject;
import com.chinapay.dto.HclcCupSignInfo;
import com.chinapay.dto.HlsEbankCcbTransaction;
import com.hand.hap.core.IRequest;
import com.hand.hap.core.ProxySelf;
import com.hand.hap.system.service.IBaseService;
/**
* Created with IntelliJ IDEA.
* User: lsy
* Date: 2020/2/24
* Time: 9:08
*/
public interface IHlsEbankCcbTransactionService extends IBaseService<HlsEbankCcbTransaction>, ProxySelf<IHlsEbankCcbTransactionService> {
}
package com.chinapay.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.chinapay.comm.Constants;
import com.chinapay.dto.HclcCupSignInfo;
import com.chinapay.dto.HlsEbankCcbTransaction;
import com.chinapay.dto.HlsWsConfig;
import com.chinapay.mapper.HclcCupSignInfoMapper;
import com.chinapay.mapper.HlsEbankCcbTransactionMapper;
import com.chinapay.mapper.HlsWsConfigMapper;
import com.chinapay.secss.SecssConstants;
import com.chinapay.secss.SecssUtil;
import com.chinapay.service.IHclcChinaPayService;
import com.chinapay.service.IHlsEbankCcbTransactionService;
import com.chinapay.util.HttpUtils;
import com.chinapay.util.StringUtil;
import com.hand.app.zhongDengWang.dto.HlsWsRequests;
import com.hand.app.zhongDengWang.mapper.HlsWsRequestsMapper;
import com.hand.hap.core.IRequest;
import com.hand.hap.intergration.service.IHapInterfaceHeaderService;
import com.hand.hap.system.service.impl.BaseServiceImpl;
import org.apache.commons.codec.binary.Base64;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.*;
import java.util.*;
/**
* Created with IntelliJ IDEA.
* User: lsy
* Date: 2020/2/24
* Time: 9:08
*/
@Service
public class HlsEbankCcbTransactionServiceImpl extends BaseServiceImpl<HlsEbankCcbTransaction> implements IHlsEbankCcbTransactionService {
}
......@@ -171,7 +171,7 @@ public class StringUtil {
Double amount=106.02D;
BigDecimal a1 = new BigDecimal(Double.toString(amount));
BigDecimal b1 = new BigDecimal(Double.toString(100));
System.out.println(a1.multiply(b1).longValue());
System.out.println(a1.multiply(b1).stripTrailingZeros());
}
/**
......
......@@ -8,11 +8,11 @@
* <author> <time> <version> <desc>
* lishuangyi 修改时间 版本号 描述
*/
package com.cmb.controllers;
package com.hand.app.cmb.controllers;
import com.alibaba.fastjson.JSONObject;
import com.chinapay.service.IHclcChinaPayService;
import com.cmb.service.HclcCmbPolyService;
import com.hand.app.cmb.service.HclcCmbPolyService;
import com.hand.hap.core.IRequest;
import com.hand.hap.system.controllers.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -31,6 +31,7 @@ import javax.servlet.http.HttpServletRequest;
* @since 1.0.0
*/
@Controller
@RequestMapping(value = {"/r/api", "/"})
public class HclcCmbPolyController extends BaseController {
@Autowired
......
package com.hand.app.cmb.controllers;
import com.alibaba.fastjson.JSONObject;
import com.hand.app.esignHclc.service.ISignInfoHclcFaceService;
import com.hand.app.esignHclc.service.ISignInfoHclcService;
import com.hand.hap.system.controllers.BaseController;
import com.hand.hap.system.dto.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
/**
* Created with IntelliJ IDEA.
* User: lsy
* Date: 2020/2/25
* Time: 21:32
*/
@Controller
public class HclcCmbPolyListenController extends BaseController {
@Autowired
private ISignInfoHclcFaceService iSignInfoHclcFaceService;
@Autowired
private ISignInfoHclcService iSignInfoHclcService;
@ResponseBody
@RequestMapping(value = "/api/public/cmb/get/qr/code/listen", method = RequestMethod.POST)
public JSONObject chinaSignListen(HttpServletRequest request) {
JSONObject responseData = new JSONObject();
return responseData;
}
}
......@@ -8,7 +8,7 @@
* <author> <time> <version> <desc>
* lishuangyi 修改时间 版本号 描述
*/
package com.cmb.dto;
package com.hand.app.cmb.dto;
import com.hand.hap.mybatis.annotation.ExtensionAttribute;
......
package com.cmb.mapper;
package com.hand.app.cmb.mapper;
import com.cmb.dto.Ld037;
import com.hand.app.cmb.dto.Ld037;
import com.hand.hap.mybatis.common.Mapper;
/**
......
package com.cmb.service;
package com.hand.app.cmb.service;
import com.alibaba.fastjson.JSONObject;
import com.hand.hap.core.IRequest;
......
package com.cmb.util;
package com.hand.app.cmb.util;
import org.bouncycastle.asn1.ASN1EncodableVector;
import org.bouncycastle.asn1.ASN1Integer;
......
package com.cmb.util;
package com.hand.app.cmb.util;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
......
package com.cmb.util;
package com.hand.app.cmb.util;
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPrivateKey;
import org.bouncycastle.jcajce.provider.asymmetric.ec.BCECPublicKey;
......
package com.cmb.util;
package com.hand.app.cmb.util;
public class Sm2Vo {
......
package com.cmb.util;
package com.hand.app.cmb.util;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
......
......@@ -2,15 +2,15 @@
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cmb.mapper.Ld037Mapper">
<mapper namespace="com.hand.app.cmb.mapper.Ld037Mapper">
<!--获取角色下的模块-->
<resultMap id="AppLd037Map" type="com.cmb.dto.Ld037">
<resultMap id="AppLd037Map" type="com.hand.app.cmb.dto.Ld037">
<result column="ID" property="id" jdbcType="VARCHAR"/>
<result column="CONTRACTNO" property="contractno" jdbcType="VARCHAR"/>
<result column="TIMES" property="times" jdbcType="DECIMAL"/>
<result column="generatedt" property="generatedt" jdbcType="Date"/>
<result column="generatedt" property="generatedt" jdbcType="DATE"/>
<result column="recamtno" property="recamtno" jdbcType="VARCHAR"/>
<result column="recduedt" property="recduedt" jdbcType="Date"/>
<result column="recduedt" property="recduedt" jdbcType="DATE"/>
<result column="bankname" property="bankname" jdbcType="VARCHAR"/>
<result column="accountid" property="accountid" jdbcType="VARCHAR"/>
<result column="accountname" property="accountname" jdbcType="VARCHAR"/>
......@@ -35,24 +35,24 @@
<result column="phone" property="phone" jdbcType="VARCHAR"/>
<result column="transaction_id" property="transaction_id" jdbcType="DECIMAL"/>
<result column="num" property="num" jdbcType="DECIMAL"/>
<result column="procdt" property="procdt" jdbcType="Date"/>
<result column="recdt" property="recdt" jdbcType="Date"/>
<result column="recbatchdt" property="recbatchdt" jdbcType="Date"/>
<result column="procdt" property="procdt" jdbcType="DATE"/>
<result column="recdt" property="recdt" jdbcType="DATE"/>
<result column="recbatchdt" property="recbatchdt" jdbcType="DATE"/>
</resultMap>
<update id="updateLd037Fail" parameterType="com.cmb.dto.Ld037">
UPDATE LD037
SET LD037.ProcDt = sysdate, /*文件处理日期*/
LD037.RecDt = sysdate, /*文件返回系统日期*/
LD037.RecBatchDt = sysdate, /*文件返回批处理日期*/
LD037.ReceiptStatus = '0', /*扣款失败状态*/
LD037.ReceiptCfmStatus = '1', /*扣款结果确认失败状态*/
LD037.ERRORMSG = (select h.description from hls_ebank_cmb_recode h where h.code=#{errorcd}), /*错误代码*/
LD037.ErrorCd = #{errorcd}, /*错误信息*/
LD037.UPDATEDDT = SYSDATE, /*更新日期*/
LD037.UPDATEDPERSON = 'CMB', /*更新者*/
LD037.Actdbtamount = 0 /* 实际扣款金额 */
<update id="updateLd037Fail" parameterType="com.hand.app.cmb.dto.Ld037">
UPDATE LD037 t
SET t.ProcDt = sysdate,
t.RecDt = sysdate,
t.RecBatchDt = sysdate,
t.ReceiptStatus = '0',
t.ReceiptCfmStatus = '1',
t.ERRORMSG = (select h.description from hls_ebank_cmb_recode h where h.code=#{errorcd,jdbcType=VARCHAR}),
t.ErrorCd = #{errorcd,jdbcType=VARCHAR},
t.UPDATEDDT = SYSDATE,
t.UPDATEDPERSON = 'CMB',
t.Actdbtamount = 0
WHERE LD037.id = #{id};
WHERE t.id = #{id,jdbcType=DECIMAL}
</update>
</mapper>
......@@ -19,7 +19,8 @@
<sift>
<appender name="REQ-${logName}" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{userId}] [%X{requestId}] %logger - %msg%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{userId}] [%X{requestId}] %logger - %msg%n
</pattern>
</encoder>
<file>${catalina.base}/logs/hls-${logName}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
......@@ -54,7 +55,8 @@
<sift>
<appender name="REQ-${logName}" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{userId}] [%X{requestId}] %logger - %msg%n</pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{userId}] [%X{requestId}] %logger - %msg%n
</pattern>
</encoder>
<file>${catalina.base}/logs/hls-cup-${logName}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
......@@ -64,6 +66,25 @@
</sift>
</appender>
<appender name="CMB-FILE" class="ch.qos.logback.classic.sift.SiftingAppender">
<discriminator>
<key>logName</key>
<defaultValue>default</defaultValue>
</discriminator>
<sift>
<appender name="REQ-${logName}" class="ch.qos.logback.core.rolling.RollingFileAppender">
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%X{userId}] [%X{requestId}] %logger - %msg%n
</pattern>
</encoder>
<file>${catalina.base}/logs/hls-cmb-${logName}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${catalina.base}/logs/%d{yyyy-MM-dd}/hls-cmb-${logName}.log</fileNamePattern>
</rollingPolicy>
</appender>
</sift>
</appender>
<root level="ERROR">
<appender-ref ref="STDOUT"/>
......@@ -112,6 +133,7 @@
<logger name="com.timevale" level="INFO" additivity="false">
<appender-ref ref="STDOUT"/>
</logger>
<logger name="com.chinapay.mapper.HlsEbankCcbTransactionMapper" level="DEBUG"/>
<logger name="com.hand.app.zhongDengWang.mapper" level="DEBUG"/>
<logger name="com.chinapay.service.impl.HclcChinaPayServiceImpl" level="INFO" additivity="false">
<appender-ref ref="CUP-FILE"/>
......@@ -119,4 +141,7 @@
<logger name="com.chinapay.util.HttpUtils" level="INFO" additivity="false">
<appender-ref ref="CUP-FILE"/>
</logger>
<logger name="com.cmb.service.impl.HclcCmbPolyServiceImpl" level="INFO" additivity="false">
<appender-ref ref="CMB-FILE"/>
</logger>
</configuration>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment