Compare commits
2 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
b88821c001 | |
|
|
799285a6cd |
|
|
@ -9,7 +9,9 @@ import cn.pluss.platform.exception.MsgException;
|
|||
import cn.pluss.platform.mapper.AccountMapper;
|
||||
import cn.pluss.platform.merchant.AccountService;
|
||||
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
|
@ -39,11 +41,7 @@ public class ZfbAttestationController {
|
|||
@PostMapping
|
||||
public Result<Object> Attestation(@RequestBody Map<String, String> params) {
|
||||
|
||||
QueryWrapper<MerchantChannelStatus> QueryWrapper = new QueryWrapper<MerchantChannelStatus>()
|
||||
.eq("merchantCode", params.get("merchantCode"))
|
||||
.eq("status", 3)
|
||||
.ne("merchantId","");
|
||||
MerchantChannelStatus merchantCode = merchantChannelStatusService.getOne(QueryWrapper);
|
||||
MerchantChannelStatus merchantCode = checkChannel(params.get("merchantCode"));
|
||||
if (merchantCode == null){
|
||||
throw new MsgException("账号异常");
|
||||
}
|
||||
|
|
@ -80,4 +78,28 @@ public class ZfbAttestationController {
|
|||
}
|
||||
return ResultGenerator.genSuccessResult(merchantCodeMap);
|
||||
}
|
||||
|
||||
|
||||
private MerchantChannelStatus checkChannel(String merchantCode){
|
||||
LambdaQueryWrapper<MerchantChannelStatus> qWrapper2 = Wrappers.lambdaQuery();
|
||||
qWrapper2.eq(MerchantChannelStatus::getMerchantCode, merchantCode)
|
||||
.in(MerchantChannelStatus::getStatus,
|
||||
MerchantChannelStatus.AUDIT_STATUS_SUCCESS,
|
||||
MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT)
|
||||
.orderByDesc(MerchantChannelStatus::getValid)
|
||||
.orderByAsc(MerchantChannelStatus::getId)
|
||||
.last("limit 1");
|
||||
MerchantChannelStatus mcs = merchantChannelStatusService.getOne(qWrapper2);
|
||||
if (mcs != null) {
|
||||
return mcs;
|
||||
}
|
||||
|
||||
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = new LambdaQueryWrapper<MerchantChannelStatus>()
|
||||
.eq(MerchantChannelStatus::getMerchantCode, merchantCode)
|
||||
.orderByDesc(MerchantChannelStatus::getValid)
|
||||
.orderByAsc(MerchantChannelStatus::getId)
|
||||
.last("limit 1");
|
||||
|
||||
return merchantChannelStatusService.getOne(qWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -198,14 +198,14 @@ public class WxController {
|
|||
// ysServiceV3.req(ReqMethod.Reporting, bizContentMap);
|
||||
// }
|
||||
//
|
||||
// @PostMapping("/appIdAddOrUpdate")
|
||||
// public void appIdAddOrUpdate(){
|
||||
// JSONObject bizContentMap = new JSONObject();
|
||||
// bizContentMap.put("channelId", "CUPS_WECHAT");
|
||||
// bizContentMap.put("mercId", "QRY230511483159");
|
||||
// bizContentMap.put("appletId", "wxc2bb94c0ddda1032");
|
||||
// ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap);
|
||||
// }
|
||||
@PostMapping("/appIdAddOrUpdate")
|
||||
public void appIdAddOrUpdate(){
|
||||
JSONObject bizContentMap = new JSONObject();
|
||||
bizContentMap.put("channelId", "CUPS_WECHAT");
|
||||
bizContentMap.put("mercId", "QRY230510383416");
|
||||
bizContentMap.put("appletId", "wxfc7bd92a462eb191");
|
||||
ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap,4);
|
||||
}
|
||||
|
||||
// @PostMapping("/auditResult")
|
||||
// public void test(String sysFlowId){
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import lombok.Getter;
|
|||
public enum ZfbChannel {
|
||||
SXF_CHANNEL("随行付","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E9%9A%8F%E8%A1%8C%E4%BB%98.png"),
|
||||
YS_CHANNEL("银盛","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E9%93%B6%E7%9B%9B.png"),
|
||||
LKL_CHANNEL("拉卡拉","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%8B%89%E5%8D%A1%E6%8B%89.jpg"),
|
||||
LKL_CHANNEL("拉卡拉","https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%8B%89%E5%8D%A1%E6%8B%89%28%E6%94%AF%E4%BB%98%E5%AE%9D%29.jpg"),
|
||||
HF_CHANNEL("汇付", "https://czg-oss.oss-cn-hangzhou.aliyuncs.com/app/statics/%E6%B1%87%E4%BB%98.png");
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -195,6 +195,8 @@ public class MercAuditListenerImpl implements MercAuditListener {
|
|||
sb.append("&mobile=").append(userInfo.getLoginName());
|
||||
sb.append("&syb_m_id=").append(merchantStore.getId());
|
||||
sb.append("&addressNo=").append(merchantBaseInfo.getAddressNo());
|
||||
sb.append("&merchantCode=").append(merchantBaseInfo.getMerchantCode());
|
||||
sb.append("&type=").append(1);
|
||||
String address = merchantBaseInfo.getProvince() + merchantBaseInfo.getCity() + merchantBaseInfo.getDistrict() + merchantBaseInfo.getAddress();
|
||||
String area = merchantBaseInfo.getProvince() +"-"+ merchantBaseInfo.getCity() +"-"+ merchantBaseInfo.getDistrict();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -752,12 +752,12 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||
// mercAuditListener.onSuccess(mbi.getUserId(), mcs);
|
||||
//向小程序里加入商家
|
||||
handler.createStore(mcs);
|
||||
// //银盛再次报备
|
||||
// JSONObject bizContentMap = new JSONObject();
|
||||
// bizContentMap.put("channelId", "CUPS_WECHAT");
|
||||
// bizContentMap.put("mercId", mercId);
|
||||
// bizContentMap.put("appletId", "wxc2bb94c0ddda1032");
|
||||
// ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap);
|
||||
// //银盛再次报备 appid
|
||||
JSONObject bizContentMap = new JSONObject();
|
||||
bizContentMap.put("channelId", "CUPS_WECHAT");
|
||||
bizContentMap.put("mercId", mercId);
|
||||
bizContentMap.put("appletId", "wxfc7bd92a462eb191");
|
||||
ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap,channel);
|
||||
break;
|
||||
case YsConfigV3.STATUS_REFUSE:
|
||||
String note1 = authData.getNote();
|
||||
|
|
|
|||
|
|
@ -128,6 +128,8 @@ public abstract class BaseMerAuditHandler<T extends IMerAuditHandler> implements
|
|||
sb.append("&mobile=").append(userInfo.getLoginName());
|
||||
sb.append("&syb_m_id=").append(merchantStore.getId());
|
||||
sb.append("&addressNo=").append(merchantBaseInfo.getAddressNo());
|
||||
sb.append("&merchantCode=").append(merchantBaseInfo.getMerchantCode());
|
||||
sb.append("&type=").append(1);
|
||||
String address = merchantBaseInfo.getProvince() + merchantBaseInfo.getCity() + merchantBaseInfo.getDistrict() + merchantBaseInfo.getAddress();
|
||||
String area = merchantBaseInfo.getProvince() +"-"+ merchantBaseInfo.getCity() +"-"+ merchantBaseInfo.getDistrict();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -386,6 +386,7 @@ public class LklMerAuditHandler {
|
|||
sb.append("&syb_m_id=").append(merchantStore.getId());
|
||||
sb.append("&addressNo=").append(merchantBaseInfo.getAddressNo());
|
||||
sb.append("&merchantCode=").append(merchantBaseInfo.getMerchantCode());
|
||||
sb.append("&type=").append(1);
|
||||
String address = merchantBaseInfo.getProvince() + merchantBaseInfo.getCity() + merchantBaseInfo.getDistrict() + merchantBaseInfo.getAddress();
|
||||
String area = merchantBaseInfo.getProvince() + "-" + merchantBaseInfo.getCity() + "-" + merchantBaseInfo.getDistrict();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -287,6 +287,8 @@ public class RyxMerAuditHandler {
|
|||
String address = merchantBaseInfo.getProvince() + merchantBaseInfo.getCity() + merchantBaseInfo.getDistrict() + merchantBaseInfo.getAddress();
|
||||
String addressNo = merchantBaseInfo.getAddressNo();
|
||||
sb.append("&addressNo=").append(addressNo);
|
||||
sb.append("&merchantCode=").append(merchantBaseInfo.getMerchantCode());
|
||||
sb.append("&type=").append(1);
|
||||
String area = merchantBaseInfo.getProvince() +"-"+ merchantBaseInfo.getCity() +"-"+ merchantBaseInfo.getDistrict();
|
||||
try {
|
||||
String decodeAddress = URLEncoder.encode(address, "UTF-8");
|
||||
|
|
|
|||
|
|
@ -376,6 +376,8 @@ public class SxfMerAuditHandler {
|
|||
sb.append("&mobile=").append(userInfo.getLoginName());
|
||||
sb.append("&syb_m_id=").append(merchantStore.getId());
|
||||
sb.append("&addressNo=").append(merchantBaseInfo.getAddressNo());
|
||||
sb.append("&merchantCode=").append(merchantBaseInfo.getMerchantCode());
|
||||
sb.append("&type=").append(1);
|
||||
String address = merchantBaseInfo.getProvince() + merchantBaseInfo.getCity() + merchantBaseInfo.getDistrict() + merchantBaseInfo.getAddress();
|
||||
String area = merchantBaseInfo.getProvince() +"-"+ merchantBaseInfo.getCity() +"-"+ merchantBaseInfo.getDistrict();
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class ReqEntity {
|
|||
ReqEntity entity = new ReqEntity();
|
||||
entity.timeStamp = DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
|
||||
entity.method = reqMethod.getMethod();
|
||||
entity.reqId = "SYB_" + RandomUtil.randomString(4) + DateUtil.format(date, "yyMMddHHmmss");
|
||||
entity.reqId = "YSK_" + RandomUtil.randomString(4) + DateUtil.format(date, "yyMMddHHmmss");
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ public class ReqEntity {
|
|||
ReqEntity entity = new ReqEntity();
|
||||
entity.timeStamp = DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
|
||||
entity.method = reqMethod.getMethod();
|
||||
entity.reqId = "SYB_" + RandomUtil.randomString(4) + DateUtil.format(date, "yyMMddHHmmss");
|
||||
entity.reqId = "YSK_" + RandomUtil.randomString(4) + DateUtil.format(date, "yyMMddHHmmss");
|
||||
|
||||
return entity;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue