添加汇付支付

This commit is contained in:
韩鹏辉
2024-01-16 13:41:41 +08:00
parent ae925b0ebb
commit f930f5a274
13 changed files with 251 additions and 163 deletions

View File

@@ -1,6 +1,7 @@
package com.chaozhanggui.admin.system.controller; package com.chaozhanggui.admin.system.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.merchant.service.HfMerService; import com.chaozhanggui.merchant.service.HfMerService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@@ -35,6 +36,26 @@ public class NotifyController {
return "SUCCESS"; return "SUCCESS";
} }
@PostMapping("testFeedCallBack")
public String feedCallBack(@RequestBody JSONObject object){
log.info(object.toJSONString());
String type = object.getString("type");
//验签请参data
String data = object.getString("data");
//验签请参sign
String sign = object.getString("sign");
hfMerService.callBack(type.substring(1,type.length()-1),data.substring(1,data.length()-1),sign.substring(1,sign.length()-1));
return "SUCCESS";
}
@PostMapping("authUser")
public String authUser(@RequestParam("requestId") String requestId){
hfMerService.authInfo(requestId);
return "SUCCESS";
}
@PostMapping("merchantResident") @PostMapping("merchantResident")
public String merchantResident(@RequestParam("userId") String userId){ public String merchantResident(@RequestParam("userId") String userId){
hfMerService.merchantResident(userId,null); hfMerService.merchantResident(userId,null);

View File

@@ -39,7 +39,10 @@ public class LoginInterceptor implements HandlerInterceptor {
// 获取进过拦截器的路径 // 获取进过拦截器的路径
String requestURI = request.getRequestURI(); String requestURI = request.getRequestURI();
if("/admin/notifyCallback/feedCallBack".equals(requestURI)||"/admin/notifyCallback/merchantResident".equals(requestURI)){ if("/admin/notifyCallback/feedCallBack".equals(requestURI)||"/admin/notifyCallback/merchantResident".equals(requestURI)
||"/admin/notifyCallback/testFeedCallBack".equals(requestURI)
||"/admin/notifyCallback/authUser".equals(requestURI)
){
return true; return true;
} }

View File

@@ -10,9 +10,9 @@ spring:
maxWait: 60000 maxWait: 60000
redis: redis:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突 # redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 1 database: 0
# redis服务器地址默认为localhost # redis服务器地址默认为localhost
host: 127.0.0.1 host: 101.37.12.135
# redis端口默认为6379 # redis端口默认为6379
port: 6379 port: 6379
# redis访问密码默认为空 # redis访问密码默认为空

View File

@@ -1,6 +1,6 @@
spring: spring:
datasource: datasource:
url: jdbc:mysql://127.0.0.1:3306/ysk_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=CTT&useSSL=false url: jdbc:mysql://101.37.12.135:3306/ysk_test?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useJDBCCompliantTimezoneShift=true&serverTimezone=CTT&useSSL=false
username: ysk_test username: ysk_test
password: mysqlroot@123 password: mysqlroot@123
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
@@ -12,7 +12,7 @@ spring:
# redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突 # redis数据库索引默认为0我们使用索引为3的数据库避免和其他数据库冲突
database: 0 database: 0
# redis服务器地址默认为localhost # redis服务器地址默认为localhost
host: 127.0.0.1 host: 101.37.12.135
# redis端口默认为6379 # redis端口默认为6379
port: 6379 port: 6379
# redis访问密码默认为空 # redis访问密码默认为空
@@ -33,9 +33,9 @@ spring:
max-request-size: 30MB max-request-size: 30MB
hf: hf:
account: account:
backUrl: http://newadminapi.sxczgkj.cn/admin/notifyCallback/feedCallBack backUrl: https://p40312246f.goho.co/admin/notifyCallback/feedCallBack
wxLite: wxLite:
appId: wxfc7bd92a462eb191 appId: wxfc7bd92a462eb191
wxPub: wxPub:
appId: wxfc7bd92a462eb191 appId: wxfc7bd92a462eb191
path: https://ky.sxczgkj.cn/wap/api/trans/pay path: http://admintestapi.sxczgkj.cn/wap/api/trans/pay

View File

@@ -1,6 +1,6 @@
spring: spring:
profiles: profiles:
active: dev active: test
server: server:
port: 18071 port: 18071
servlet: servlet:

View File

@@ -1,9 +1,11 @@
package com.chaozhanggui.common.system.config; package com.chaozhanggui.common.system.config;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.common.system.util.ExceptionUtil; import com.chaozhanggui.common.system.util.ExceptionUtil;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.util.List;
import java.util.Objects; import java.util.Objects;
//命名区别于ResponseBody注解 //命名区别于ResponseBody注解
@@ -20,6 +22,8 @@ public class RespBody {
setMessage(ExceptionUtil.map.get(code)); setMessage(ExceptionUtil.map.get(code));
} }
public RespBody(Exception e) { public RespBody(Exception e) {
if(e.getMessage().substring(0,1).equals("!")){ if(e.getMessage().substring(0,1).equals("!")){
setMessage(e.getMessage(),"-60009"); setMessage(e.getMessage(),"-60009");
@@ -40,25 +44,21 @@ public class RespBody {
} }
public RespBody(String code,Object data){ public RespBody(String code,Object data){
this.code=code; this.code = code;
this.data=data; this.data = data;
setMessage(ExceptionUtil.map.get(code)); setMessage(ExceptionUtil.map.get(code));
} }
public RespBody(String code,String message){ public RespBody(String code,String message){
this.code=code; this.code = code;
this.message=message; this.message = message;
} }
public RespBody(String code){ public RespBody(String code){
this.code=code; this.code=code;
setMessage(ExceptionUtil.map.get(code)); setMessage(ExceptionUtil.map.get(code));
} }
public String getCode() { public String getCode() {
return code; return code;
} }
public void setCode(String code) { public void setCode(String code) {
this.code = code; this.code = code;
setMessage(ExceptionUtil.map.get(code)); setMessage(ExceptionUtil.map.get(code));
@@ -75,7 +75,7 @@ public class RespBody {
public void setMessage(String message,String code) { public void setMessage(String message,String code) {
this.message = message; this.message = message;
this.code=code; this.code = code;
} }
public Object getData() { public Object getData() {
@@ -85,4 +85,5 @@ public class RespBody {
public void setData(Object data) { public void setData(Object data) {
this.data = data; this.data = data;
} }
} }

View File

@@ -102,7 +102,6 @@ public class StringUtil extends StringUtils {
*/ */
public static synchronized String getBillno() { public static synchronized String getBillno() {
StringBuilder billno = new StringBuilder(); StringBuilder billno = new StringBuilder();
// 日期(格式:20080524) // 日期(格式:20080524)
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS"); SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmssSSS");
billno.append(format.format(new Date())); billno.append(format.format(new Date()));

View File

@@ -20,7 +20,7 @@ public interface TbPlussMerchantHfInfoMapper {
int updateByPrimaryKey(TbPlussMerchantHfInfo record); int updateByPrimaryKey(TbPlussMerchantHfInfo record);
TbPlussMerchantHfInfo selectByMerchantCodeAndSubApiKey(@Param("merchantCode") String merchantCode,@Param("liveApiKey") String liveApiKey); TbPlussMerchantHfInfo selectByMerchantCodeAndSubApiKey(@Param("merchantCode") String merchantCode, @Param("liveApiKey") String liveApiKey);
TbPlussMerchantHfInfo selectByMerchantCode(String merchantCode); TbPlussMerchantHfInfo selectByMerchantCode(String merchantCode);

View File

@@ -20,6 +20,10 @@ public class TbPlussMerchantHfInfo implements Serializable {
private String appName; private String appName;
private String pucKey;
private String privKey;
private String loginPwd; private String loginPwd;
private Date createTime; private Date createTime;
@@ -92,6 +96,22 @@ public class TbPlussMerchantHfInfo implements Serializable {
this.appName = appName == null ? null : appName.trim(); this.appName = appName == null ? null : appName.trim();
} }
public String getPucKey() {
return pucKey;
}
public void setPucKey(String pucKey) {
this.pucKey = pucKey == null ? null : pucKey.trim();
}
public String getPrivKey() {
return privKey;
}
public void setPrivKey(String privKey) {
this.privKey = privKey == null ? null : privKey.trim();
}
public String getLoginPwd() { public String getLoginPwd() {
return loginPwd; return loginPwd;
} }

View File

@@ -53,7 +53,7 @@
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名--> <!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
<!-- <table tableName="%" schema="mining" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>--> <!-- <table tableName="%" schema="mining" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
<table tableName="tb_pluss_citys_hf" domainObjectName="TbPlussCitysHf" <table tableName="tb_pluss_merchant_hf_info" domainObjectName="TbPlussMerchantHfInfo"
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false" > enableSelectByExample="false" selectByExampleQueryId="false" >
</table> </table>

View File

@@ -10,13 +10,15 @@
<result column="app_id_list" jdbcType="VARCHAR" property="appIdList" /> <result column="app_id_list" jdbcType="VARCHAR" property="appIdList" />
<result column="app_id" jdbcType="VARCHAR" property="appId" /> <result column="app_id" jdbcType="VARCHAR" property="appId" />
<result column="app_name" jdbcType="VARCHAR" property="appName" /> <result column="app_name" jdbcType="VARCHAR" property="appName" />
<result column="puc_key" jdbcType="VARCHAR" property="pucKey" />
<result column="priv_key" jdbcType="VARCHAR" property="privKey" />
<result column="login_pwd" jdbcType="VARCHAR" property="loginPwd" /> <result column="login_pwd" jdbcType="VARCHAR" property="loginPwd" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, merchant_code, status, test_api_key, live_api_key, app_id_list, app_id, app_name, id, merchant_code, status, test_api_key, live_api_key, app_id_list, app_id, app_name,
login_pwd, create_time, update_time puc_key, priv_key, login_pwd, create_time, update_time
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
@@ -24,6 +26,19 @@
from tb_pluss_merchant_hf_info from tb_pluss_merchant_hf_info
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</select> </select>
<select id="selectByMerchantCodeAndSubApiKey" resultMap="BaseResultMap">
select * from tb_pluss_merchant_hf_info where merchant_code=#{merchantCode} and live_api_key=#{liveApiKey}
</select>
<select id="selectByMerchantCode" resultMap="BaseResultMap">
select * from tb_pluss_merchant_hf_info where merchant_code=#{merchantCode} order by id desc limit 1
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tb_pluss_merchant_hf_info delete from tb_pluss_merchant_hf_info
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
@@ -31,12 +46,14 @@
<insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantHfInfo"> <insert id="insert" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantHfInfo">
insert into tb_pluss_merchant_hf_info (id, merchant_code, status, insert into tb_pluss_merchant_hf_info (id, merchant_code, status,
test_api_key, live_api_key, app_id_list, test_api_key, live_api_key, app_id_list,
app_id, app_name, login_pwd, app_id, app_name, puc_key,
create_time, update_time) priv_key, login_pwd, create_time,
update_time)
values (#{id,jdbcType=INTEGER}, #{merchantCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, values (#{id,jdbcType=INTEGER}, #{merchantCode,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR},
#{testApiKey,jdbcType=VARCHAR}, #{liveApiKey,jdbcType=VARCHAR}, #{appIdList,jdbcType=VARCHAR}, #{testApiKey,jdbcType=VARCHAR}, #{liveApiKey,jdbcType=VARCHAR}, #{appIdList,jdbcType=VARCHAR},
#{appId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{loginPwd,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR}, #{pucKey,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{privKey,jdbcType=VARCHAR}, #{loginPwd,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert> </insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantHfInfo"> <insert id="insertSelective" parameterType="com.chaozhanggui.dao.system.entity.TbPlussMerchantHfInfo">
insert into tb_pluss_merchant_hf_info insert into tb_pluss_merchant_hf_info
@@ -65,6 +82,12 @@
<if test="appName != null"> <if test="appName != null">
app_name, app_name,
</if> </if>
<if test="pucKey != null">
puc_key,
</if>
<if test="privKey != null">
priv_key,
</if>
<if test="loginPwd != null"> <if test="loginPwd != null">
login_pwd, login_pwd,
</if> </if>
@@ -100,6 +123,12 @@
<if test="appName != null"> <if test="appName != null">
#{appName,jdbcType=VARCHAR}, #{appName,jdbcType=VARCHAR},
</if> </if>
<if test="pucKey != null">
#{pucKey,jdbcType=VARCHAR},
</if>
<if test="privKey != null">
#{privKey,jdbcType=VARCHAR},
</if>
<if test="loginPwd != null"> <if test="loginPwd != null">
#{loginPwd,jdbcType=VARCHAR}, #{loginPwd,jdbcType=VARCHAR},
</if> </if>
@@ -135,6 +164,12 @@
<if test="appName != null"> <if test="appName != null">
app_name = #{appName,jdbcType=VARCHAR}, app_name = #{appName,jdbcType=VARCHAR},
</if> </if>
<if test="pucKey != null">
puc_key = #{pucKey,jdbcType=VARCHAR},
</if>
<if test="privKey != null">
priv_key = #{privKey,jdbcType=VARCHAR},
</if>
<if test="loginPwd != null"> <if test="loginPwd != null">
login_pwd = #{loginPwd,jdbcType=VARCHAR}, login_pwd = #{loginPwd,jdbcType=VARCHAR},
</if> </if>
@@ -156,17 +191,11 @@
app_id_list = #{appIdList,jdbcType=VARCHAR}, app_id_list = #{appIdList,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR}, app_id = #{appId,jdbcType=VARCHAR},
app_name = #{appName,jdbcType=VARCHAR}, app_name = #{appName,jdbcType=VARCHAR},
puc_key = #{pucKey,jdbcType=VARCHAR},
priv_key = #{privKey,jdbcType=VARCHAR},
login_pwd = #{loginPwd,jdbcType=VARCHAR}, login_pwd = #{loginPwd,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER} where id = #{id,jdbcType=INTEGER}
</update> </update>
<select id="selectByMerchantCodeAndSubApiKey" resultMap="BaseResultMap">
select * from tb_pluss_merchant_hf_info where merchant_code=#{merchantCode} and live_api_key=#{liveApiKey}
</select>
<select id="selectByMerchantCode" resultMap="BaseResultMap">
select * from tb_pluss_merchant_hf_info where merchant_code=#{merchantCode} order by id desc limit 1
</select>
</mapper> </mapper>

View File

@@ -2049,6 +2049,16 @@ public class HfMerService {
tbPlussMerchantChannelStatusMapper.updateByPrimaryKeySelective(channelStatus); tbPlussMerchantChannelStatusMapper.updateByPrimaryKeySelective(channelStatus);
} }
TbPlussMerchantHfInfo hfInfo=new TbPlussMerchantHfInfo();
hfInfo.setMerchantCode(baseInfo.getMerchantcode());
hfInfo.setStatus("0");
hfInfo.setPrivKey(privateKey);
hfInfo.setPucKey(publicKey);
hfInfo.setCreateTime(new Date());
tbPlussMerchantHfInfoMapper.insert(hfInfo);
TbPlussMerchantAuditRecord merchantAuditRecord = new TbPlussMerchantAuditRecord(); TbPlussMerchantAuditRecord merchantAuditRecord = new TbPlussMerchantAuditRecord();
merchantAuditRecord.setStatus("1"); merchantAuditRecord.setStatus("1");
merchantAuditRecord.setMerchantcode(baseInfo.getMerchantcode()); merchantAuditRecord.setMerchantcode(baseInfo.getMerchantcode());
@@ -2072,20 +2082,22 @@ public class HfMerService {
String publicKey= AdapayCore.PUBLIC_KEY; String publicKey= AdapayCore.PUBLIC_KEY;
try { try {
Map map=(Map) JSON.parse(data); Map map=(Map) JSON.parse(data);
// Map map=(Map) JSON.parseArray(data).get(0);
String requestId=map.get("request_id").toString(); String requestId=map.get("request_id").toString();
if(AdapaySign.verifySign(data,sign,publicKey)){ if(AdapaySign.verifySign(data,sign,publicKey)){
// if(true){
switch (type){ switch (type){
case "userEntry.succeeded": case "userEntry.succeeded":
TbPlussMerchantAuditRecord record= tbPlussMerchantAuditRecordMapper.selectByApplicationid(requestId); TbPlussMerchantAuditRecord record= tbPlussMerchantAuditRecordMapper.selectByApplicationid(requestId);
if(ObjectUtil.isNotEmpty(record)){ if(ObjectUtil.isNotEmpty(record)){
TbPlussMerchantChannelStatus channelStatus= tbPlussMerchantChannelStatusMapper.selectByMerchantCode(record.getMerchantcode(),7); TbPlussMerchantChannelStatus channelStatus= tbPlussMerchantChannelStatusMapper.selectByMerchantCode(record.getMerchantcode(),7);
TbPlussMerchantHfInfo tbPlussMerchantHfInfo=tbPlussMerchantHfInfoMapper.selectByMerchantCodeAndSubApiKey(channelStatus.getMerchantcode(),map.get("live_api_key").toString()); TbPlussMerchantHfInfo tbPlussMerchantHfInfo=tbPlussMerchantHfInfoMapper.selectByMerchantCode(channelStatus.getMerchantcode());
if(ObjectUtil.isNotEmpty(channelStatus)){ if(ObjectUtil.isNotEmpty(channelStatus)){
if(ObjectUtil.isEmpty(tbPlussMerchantHfInfo)){ if(ObjectUtil.isNotEmpty(tbPlussMerchantHfInfo)){
tbPlussMerchantHfInfo=new TbPlussMerchantHfInfo();
tbPlussMerchantHfInfo.setMerchantCode(record.getMerchantcode());
tbPlussMerchantHfInfo.setTestApiKey(map.get("test_api_key").toString()); tbPlussMerchantHfInfo.setTestApiKey(map.get("test_api_key").toString());
tbPlussMerchantHfInfo.setLiveApiKey(map.get("live_api_key").toString()); tbPlussMerchantHfInfo.setLiveApiKey(map.get("live_api_key").toString());
List app_id_list = (List) map.get("app_id_list"); List app_id_list = (List) map.get("app_id_list");
@@ -2094,9 +2106,9 @@ public class HfMerService {
tbPlussMerchantHfInfo.setAppId(app.get("app_id").toString()); tbPlussMerchantHfInfo.setAppId(app.get("app_id").toString());
tbPlussMerchantHfInfo.setAppName(app.get("app_name").toString()); tbPlussMerchantHfInfo.setAppName(app.get("app_name").toString());
tbPlussMerchantHfInfo.setStatus("1"); //开户成功 tbPlussMerchantHfInfo.setStatus("1"); //开户成功
tbPlussMerchantHfInfo.setLoginPwd(MD5Util.md5("hf".concat(map.get("login_pwd").toString()))); tbPlussMerchantHfInfo.setLoginPwd((map.get("login_pwd").toString()));
tbPlussMerchantHfInfo.setCreateTime(new Date()); tbPlussMerchantHfInfo.setCreateTime(new Date());
tbPlussMerchantHfInfoMapper.insert(tbPlussMerchantHfInfo); tbPlussMerchantHfInfoMapper.updateByPrimaryKeySelective(tbPlussMerchantHfInfo);
channelStatus.setMerchantid(map.get("live_api_key").toString()); channelStatus.setMerchantid(map.get("live_api_key").toString());
channelStatus.setApplicationid(requestId); channelStatus.setApplicationid(requestId);
@@ -2109,14 +2121,6 @@ public class HfMerService {
merchantResident(baseInfo,tbPlussMerchantHfInfo.getLiveApiKey(),tbPlussMerchantHfInfo.getAppId(),tbPlussMerchantHfInfo); merchantResident(baseInfo,tbPlussMerchantHfInfo.getLiveApiKey(),tbPlussMerchantHfInfo.getAppId(),tbPlussMerchantHfInfo);
} }
} }
record.setStatus("9");
record.setUpdatetime(new Date());
} }
} }
break; break;
@@ -2133,8 +2137,43 @@ public class HfMerService {
} }
break; break;
case "resident.succeeded": case "resident.succeeded":
authInfo(requestId);
break;
case "resident.failed":
record= tbPlussMerchantAuditRecordMapper.selectByApplicationid(requestId); record= tbPlussMerchantAuditRecordMapper.selectByApplicationid(requestId);
if(ObjectUtil.isNotEmpty(record)&&!"5".equals(record.getThirdstatus())){ if(ObjectUtil.isNotEmpty(record)){
TbPlussMerchantHfInfo hfInfo= tbPlussMerchantHfInfoMapper.selectByMerchantCodeAndSubApiKey(record.getMerchantcode(),record.getMerchantid());
hfInfo.setStatus("4"); //入驻失败
hfInfo.setUpdateTime(new Date());
tbPlussMerchantHfInfoMapper.updateByPrimaryKey(hfInfo);
}
break;
case "resident.modify.succeeded":
break;
case "resident.modify.failed":
break;
case "corp_member.succeeded":
break;
case "corp_member.failed":
break;
case "corp_member_update.succeeded":
break;
case "corp_member_update.failed":
break;
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
public void authInfo(String requestId){
TbPlussMerchantAuditRecord record= tbPlussMerchantAuditRecordMapper.selectByApplicationid(requestId);
if(ObjectUtil.isNotEmpty(record)){
TbPlussMerchantChannelStatus channelStatus= tbPlussMerchantChannelStatusMapper.selectByMerchantCode(record.getMerchantcode(),7);
TbPlussMerchantHfInfo hfInfo= tbPlussMerchantHfInfoMapper.selectByMerchantCodeAndSubApiKey(record.getMerchantcode(),record.getMerchantid()); TbPlussMerchantHfInfo hfInfo= tbPlussMerchantHfInfoMapper.selectByMerchantCodeAndSubApiKey(record.getMerchantcode(),record.getMerchantid());
hfInfo.setStatus("3"); //入驻成功 hfInfo.setStatus("3"); //入驻成功
@@ -2147,8 +2186,12 @@ public class HfMerService {
record.setUpdatetime(new Date()); record.setUpdatetime(new Date());
tbPlussMerchantAuditRecordMapper.updateByPrimaryKeySelective(record); tbPlussMerchantAuditRecordMapper.updateByPrimaryKeySelective(record);
channelStatus.setStatus("3");
channelStatus.setStatus("00");
channelStatus.setMercname(null);
tbPlussMerchantChannelStatusMapper.updateByPrimaryKeySelective(channelStatus);
Map map=null;
//上传证照 //上传证照
TbPlussMerchantBaseInfo baseInfo= tbPlussMerchantBaseInfoMapper.selectByMerchantcode(record.getMerchantcode()); TbPlussMerchantBaseInfo baseInfo= tbPlussMerchantBaseInfoMapper.selectByMerchantcode(record.getMerchantcode());
if(ObjectUtil.isNotEmpty(baseInfo)){ if(ObjectUtil.isNotEmpty(baseInfo)){
@@ -2243,40 +2286,9 @@ public class HfMerService {
record.setUpdatetime(new Date()); record.setUpdatetime(new Date());
tbPlussMerchantAuditRecordMapper.updateByPrimaryKeySelective(record); tbPlussMerchantAuditRecordMapper.updateByPrimaryKeySelective(record);
// if(response.get("audit_status").equals("P")){
// //提交实名
// }
} }
} }
} }
break;
case "resident.failed":
record= tbPlussMerchantAuditRecordMapper.selectByApplicationid(requestId);
if(ObjectUtil.isNotEmpty(record)){
TbPlussMerchantHfInfo hfInfo= tbPlussMerchantHfInfoMapper.selectByMerchantCodeAndSubApiKey(record.getMerchantcode(),record.getMerchantid());
hfInfo.setStatus("4"); //入驻失败
hfInfo.setUpdateTime(new Date());
tbPlussMerchantHfInfoMapper.updateByPrimaryKey(hfInfo);
}
break;
case "resident.modify.succeeded":
break;
case "resident.modify.failed":
break;
case "corp_member.succeeded":
break;
case "corp_member.failed":
break;
case "corp_member_update.succeeded":
break;
case "corp_member_update.failed":
break;
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
} }

View File

@@ -90,6 +90,9 @@ public class RSAUtils {
return outStr; return outStr;
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
long temp = System.currentTimeMillis(); long temp = System.currentTimeMillis();
//生成公钥和私钥 //生成公钥和私钥