银盛进件报备appid,进件后向php发送店铺信息

This commit is contained in:
liuyingfang
2024-02-22 11:20:12 +08:00
parent 93ad59c289
commit 799285a6cd
9 changed files with 51 additions and 22 deletions

View File

@@ -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);
}
}

View File

@@ -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){