Merge remote-tracking branch 'origin/master'

yy_dev
袁野 2 years ago
commit bc6ce1b539
  1. 2
      cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 45
      cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java
  3. 28
      cweb/src/main/java/com/cweb/controller/FileUploadController.java
  4. 2
      cweb/src/main/java/com/cweb/controller/TestController.java
  5. 82
      cweb/src/main/java/com/cweb/notify/LaKaLaController.java
  6. 72
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java
  7. 2
      service/src/main/java/com/hfkj/channel/saas/SaasMerService.java
  8. 32
      service/src/main/java/com/hfkj/dao/BsMerLedgerReceiverMapper.java
  9. 42
      service/src/main/java/com/hfkj/dao/BsMerLedgerReceiverSqlProvider.java
  10. 50
      service/src/main/java/com/hfkj/entity/BsMerLedgerReceiver.java
  11. 200
      service/src/main/java/com/hfkj/entity/BsMerLedgerReceiverExample.java
  12. 7
      service/src/main/java/com/hfkj/service/BsMerLedgerReceiverService.java
  13. 3
      service/src/main/java/com/hfkj/service/impl/BsDeviceOrderServiceImpl.java
  14. 11
      service/src/main/java/com/hfkj/service/impl/BsMerLedgerReceiverServiceImpl.java
  15. 3
      service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java
  16. 12
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java
  17. 53
      service/src/main/java/com/hfkj/sysenum/MerLedgerReceiverAuditStatusEnum.java
  18. 7
      service/src/main/java/com/hfkj/sysenum/MerLedgerReceiverStatusEnum.java

@ -100,7 +100,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/pay/microPay")
.excludePathPatterns("/pay/jsapiPay")
.excludePathPatterns("/pay/rotationQueryTrade")
.excludePathPatterns("/laKaLaNotify/microPay")
.excludePathPatterns("/laKaLaNotify/*")
.excludePathPatterns("/weiXinNotify/*")
.excludePathPatterns("/deviceOrderPay/orderNotify")
.excludePathPatterns("/storeDiscountActivityPartakeUser/*")

@ -81,9 +81,8 @@ public class BsMerLedgerController {
merLedger.setStatus(MerLedgerStatusEnum.status1.getNumber());
}
} else {
if (merLedger.getStatus().equals(MerLedgerStatusEnum.status1.getNumber())
|| merLedger.getStatus().equals(MerLedgerStatusEnum.status2.getNumber()) ) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "暂时无法修改");
if (!merLedger.getStatus().equals(MerLedgerStatusEnum.status3.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法修改");
}
merLedger = new BsMerLedger();
merLedger.setMerId(merPlatform.getMerId());
@ -119,7 +118,7 @@ public class BsMerLedgerController {
}
}
@RequestMapping(value="/merLedgerReceiverApply",method = RequestMethod.GET)
@RequestMapping(value="/merLedgerReceiverApply",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "商户分账绑定接受方申请")
public ResponseData merLedgerReceiverApply(@RequestBody BsMerLedgerReceiver body) {
@ -139,9 +138,6 @@ public class BsMerLedgerController {
if (merLedger == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户分账功能未开通");
}
if (!merLedger.getStatus().equals(MerLedgerStatusEnum.status1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户分账功能状态无法申请");
}
// 查询接收方数据
BsMerLedgerReceiver receiver = merLedgerReceiverService.getMerLedgerReceiver(merLedger.getMerId(), body.getReceiverNo());
@ -172,16 +168,16 @@ public class BsMerLedgerController {
}
}
@RequestMapping(value="/merLedgerReceiverSecure",method = RequestMethod.GET)
@RequestMapping(value="/merLedgerReceiverDelApply",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "商户分账绑接受方申请")
public ResponseData merLedgerReceiverSecure(@RequestBody BsMerLedgerReceiver body) {
@ApiOperation(value = "商户分账绑接受方申请")
public ResponseData merLedgerReceiverDelApply(@RequestBody BsMerLedgerReceiver body) {
try {
if (body == null
|| body.getMerLedgerId() == null
|| StringUtils.isBlank(body.getReceiverNo())
|| StringUtils.isBlank(body.getReceiverName())
|| StringUtils.isBlank(body.getEntrustFilePath())
|| StringUtils.isBlank(body.getRelieveEntrustFilePath())
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠类型");
}
@ -191,9 +187,6 @@ public class BsMerLedgerController {
if (merLedger == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户分账功能未开通");
}
if (!merLedger.getStatus().equals(MerLedgerStatusEnum.status1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户分账功能状态无法申请");
}
// 查询接收方数据
BsMerLedgerReceiver receiver = merLedgerReceiverService.getMerLedgerReceiver(merLedger.getMerId(), body.getReceiverNo());
@ -206,15 +199,15 @@ public class BsMerLedgerController {
receiver.setCupNo(merLedger.getCupNo());
receiver.setReceiverNo(body.getReceiverNo());
receiver.setReceiverName(body.getReceiverName());
receiver.setEntrustFileName(body.getEntrustFilePath().substring(body.getEntrustFilePath().lastIndexOf("/")+1));
receiver.setEntrustFilePath(body.getEntrustFilePath());
receiver.setRelieveEntrustFileName(body.getRelieveEntrustFilePath().substring(body.getRelieveEntrustFilePath().lastIndexOf("/")+1));
receiver.setRelieveEntrustFilePath(body.getRelieveEntrustFilePath());
} else {
receiver.setReceiverNo(body.getReceiverNo());
receiver.setReceiverName(body.getReceiverName());
receiver.setEntrustFileName(body.getEntrustFilePath().substring(body.getEntrustFilePath().lastIndexOf("/")+1));
receiver.setEntrustFilePath(body.getEntrustFilePath());
receiver.setRelieveEntrustFileName(body.getRelieveEntrustFilePath().substring(body.getRelieveEntrustFilePath().lastIndexOf("/")+1));
receiver.setRelieveEntrustFilePath(body.getRelieveEntrustFilePath());
}
merLedgerReceiverService.merLedgerReceiverApply(receiver);
merLedgerReceiverService.merLedgerReceiverDel(receiver);
return ResponseMsgUtil.success("操作成功");
@ -239,6 +232,20 @@ public class BsMerLedgerController {
}
}
@RequestMapping(value="/getLedgerReceiverById",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询接收方详情")
public ResponseData getLedgerReceiverById(@RequestParam(name = "ledgerReceiverId", required = true) Long ledgerReceiverId) {
try {
return ResponseMsgUtil.success(merLedgerReceiverService.getMerLedgerReceiverById(ledgerReceiverId));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getLedgerReceiverList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询接收方列表")

@ -6,6 +6,7 @@ import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.ImageUtils;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.model.ResponseData;
@ -77,13 +78,13 @@ public class FileUploadController {
out.flush();
Thumbnails.of(destDirName + File.separator + fileName).scale(1f)
.outputQuality(0.01f).toFile(destDirName + File.separator + fileName);
.outputQuality(0.5f).toFile(destDirName + File.separator + fileName);
fileNames.add("/"+ childPath + "/" + fileName);
File filePath = new File(destDirName + "/" + fileName);
PutObjectResult putObjectResult = HuaWeiYunObs.putObject(CommonSysConst.getSysConfig().getObs_bucket_name(),
childPath + fileName,filePath);
childPath + "/" + fileName,filePath);
} catch (Exception e) {
log.error(e.getMessage(), e);
@ -103,6 +104,29 @@ public class FileUploadController {
}
}
@RequestMapping(value="/uploadBase64File",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "文件上传")
public ResponseData uploadBase64File(@RequestParam(value = "base64File" , required = true) String base64File) {
try {
String fileName = System.currentTimeMillis()+"";
String childPath = DateUtil.date2String(new Date(), "yyyyMM");
String path = sysConfig.getFileUrl() + File.separator + childPath;
Map<String, Object> map = ImageUtils.generateImage(base64File, path, fileName);
File filePath = new File(path +"/"+ map.get("fileName"));
HuaWeiYunObs.putObject(CommonSysConst.getSysConfig().getObs_bucket_name(), childPath + "/" + map.get("fileName"), filePath);
List<String> fileNames = new ArrayList<String>();
fileNames.add("/"+childPath + "/" + map.get("fileName"));
return ResponseMsgUtil.success(fileNames);
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getImgSignedUrl",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "文件上传")

@ -88,7 +88,7 @@ public class TestController {
try {
// return ResponseMsgUtil.success(LaKaLaConfig.queryCardBin("3100020709200056842"));
return ResponseMsgUtil.success(laKaLaTradeService.preorder(""));
return ResponseMsgUtil.success(laKaLaLedgerService.queryLedgerMer("8221210701101SB"));
} catch (Exception e) {
log.error(e.getMessage(), e);

@ -1,12 +1,12 @@
package com.cweb.notify;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.lakala.LaKaLaLedgerService;
import com.hfkj.entity.*;
import com.hfkj.service.*;
import com.hfkj.sysenum.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
@ -45,6 +45,8 @@ public class LaKaLaController {
private BsMerLedgerReceiverService merLedgerReceiverService;
@Resource
private BsMerLedgerReceiverApplyService merLedgerReceiverApplyService;
@Resource
private LaKaLaLedgerService laKaLaLedgerService;
@RequestMapping(value="/microPay",method = RequestMethod.POST)
@ResponseBody
@ -113,26 +115,28 @@ public class LaKaLaController {
log.info("开通分账业务通知", reqBody);
System.out.println(reqBody);
JSONObject body = JSONObject.parseObject(reqBody);
JSONObject respData = body.getJSONObject("respData");
JSONObject respData = JSONObject.parseObject(reqBody);
BsMerLedgerApply ledgerApply = merLedgerApplyService.getApplyByOrderNo(respData.getString("orderNo"));
BsMerLedgerApply ledgerApply = merLedgerApplyService.getApplyByApplyId(respData.getString("applyId"));
if (ledgerApply != null) {
ledgerApply.setNotifyBody(reqBody);
merLedgerApplyService.editMerLedgerApply(ledgerApply);
// 查询商户分账信息
BsMerLedger merLedger = merLedgerService.getMerLedger(ledgerApply.getMerId(), PlatformTypeEnum.type1);
BsMerLedger merLedger = merLedgerService.getMerLedgerById(ledgerApply.getMerLedgerId());
if (merLedger != null) {
// 审核状态 1:通过,2拒绝
if (respData.getString("auditStatus").equals("1")) {
merLedger.setStatus(MerLedgerStatusEnum.status1.getNumber());
} else {
merLedger.setStatus(MerLedgerStatusEnum.status3.getNumber());
merLedger.setRejectReason(respData.getString("auditStatusText"));
}
merLedgerService.editMerLedger(merLedger);
if (merLedger.getStatus().equals(MerLedgerStatusEnum.status1.getNumber())) {
laKaLaLedgerService.applyLedgerReceiver(merLedger.getMerId());
}
}
}
@ -150,15 +154,15 @@ public class LaKaLaController {
log.info("分账关系绑定申请通知", reqBody);
System.out.println(reqBody);
JSONObject body = JSONObject.parseObject(reqBody);
JSONObject respData = body.getJSONObject("respData");
JSONObject respData = JSONObject.parseObject(reqBody);
// 分手接收方申请记录
BsMerLedgerReceiverApply receiverApply = merLedgerReceiverApplyService.getReceiverApplyByApplyId(respData.getString("applyId"));
if (receiverApply != null) {
receiverApply.setNotifyBody(reqBody);
// 1:通过,2拒绝
receiverApply.setStatus(respData.getString("auditStatus").equals("1")
receiverApply.setStatus(
respData.getString("auditStatus").equals("1")
?MerLedgerReceiverApplyStatusEnum.status2.getNumber()
:MerLedgerReceiverApplyStatusEnum.status3.getNumber());
receiverApply.setRejectReason(respData.getString("auditStatusText"));
@ -167,8 +171,64 @@ public class LaKaLaController {
// 分账接收方
BsMerLedgerReceiver ledgerReceiver = merLedgerReceiverService.getMerLedgerReceiver(receiverApply.getMerId(), receiverApply.getReceiverNo());
if (ledgerReceiver != null) {
ledgerReceiver.setStatus(receiverApply.getStatus().equals(MerLedgerReceiverApplyStatusEnum.status2.getNumber())
?MerLedgerReceiverStatusEnum.status1.getNumber():MerLedgerReceiverStatusEnum.status3.getNumber());
ledgerReceiver.setStatus(
receiverApply.getStatus().equals(
MerLedgerReceiverApplyStatusEnum.status2.getNumber())
?MerLedgerReceiverStatusEnum.status1.getNumber()
:MerLedgerReceiverStatusEnum.status2.getNumber()
);
ledgerReceiver.setAuditStatus(
receiverApply.getStatus().equals(MerLedgerReceiverApplyStatusEnum.status2.getNumber())
?MerLedgerReceiverAuditStatusEnum.status2.getNumber()
:MerLedgerReceiverAuditStatusEnum.status3.getNumber()
);
ledgerReceiver.setRejectReason(receiverApply.getRejectReason());
merLedgerReceiverService.editMerLedgerReceiver(ledgerReceiver);
}
}
} catch (Exception e) {
log.error("login error!",e);
}
}
@RequestMapping(value="/applyBindUnReceiver",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "分账关系绑定申请")
public void applyBindUnReceiver(@RequestBody String reqBody) {
try {
log.info("分账关系绑定申请通知", reqBody);
System.out.println(reqBody);
JSONObject respData = JSONObject.parseObject(reqBody);
// 分手接收方申请记录
BsMerLedgerReceiverApply receiverApply = merLedgerReceiverApplyService.getReceiverApplyByApplyId(respData.getString("applyId"));
if (receiverApply != null) {
receiverApply.setNotifyBody(reqBody);
// 1:通过,2拒绝
receiverApply.setStatus(
respData.getString("auditStatus").equals("1")
?MerLedgerReceiverApplyStatusEnum.status2.getNumber()
:MerLedgerReceiverApplyStatusEnum.status3.getNumber());
receiverApply.setRejectReason(respData.getString("auditStatusText"));
merLedgerReceiverApplyService.editReceiverApply(receiverApply);
// 分账接收方
BsMerLedgerReceiver ledgerReceiver = merLedgerReceiverService.getMerLedgerReceiver(receiverApply.getMerId(), receiverApply.getReceiverNo());
if (ledgerReceiver != null) {
ledgerReceiver.setStatus(
receiverApply.getStatus().equals(
MerLedgerReceiverApplyStatusEnum.status2.getNumber())
?MerLedgerReceiverStatusEnum.status0.getNumber()
:MerLedgerReceiverStatusEnum.status2.getNumber()
);
ledgerReceiver.setAuditStatus(
receiverApply.getStatus().equals(MerLedgerReceiverApplyStatusEnum.status2.getNumber())
?MerLedgerReceiverAuditStatusEnum.status2.getNumber()
:MerLedgerReceiverAuditStatusEnum.status5.getNumber()
);
ledgerReceiver.setRejectReason(receiverApply.getRejectReason());
merLedgerReceiverService.editMerLedgerReceiver(ledgerReceiver);
}

@ -16,6 +16,7 @@ import com.hfkj.model.MerBasisModel;
import com.hfkj.service.*;
import com.hfkj.sysenum.*;
import com.hfkj.sysenum.lakala.UploadFileTypeEnum;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@ -38,6 +39,8 @@ public class LaKaLaLedgerService {
@Resource
private BsMerLedgerReceiverService merLedgerReceiverService;
@Resource
private BsMerLedgerReceiverApplyService merLedgerReceiverApplyService;
@Resource
private BsMerService merService;
@Resource
private BsMerAttachService merAttachService;
@ -50,11 +53,11 @@ public class LaKaLaLedgerService {
public JSONObject applyLedger(Long merLedgerId) {
//
BsMerLedger merLedger = merLedgerService.getMerLedgerById(merLedgerId);
if (merLedger == null || merLedger.getPlatformType().equals(PlatformTypeEnum.type1.getNumber())) {
if (merLedger == null || !merLedger.getPlatformType().equals(PlatformTypeEnum.type1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 商户
MerBasisModel merDetail = merService.getMerDetail(merLedger.getId());
MerBasisModel merDetail = merService.getMerDetail(merLedger.getMerId());
if (merDetail == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户");
}
@ -74,11 +77,11 @@ public class LaKaLaLedgerService {
map.put("splitLowestRatio", merLedger.getSplitLowestRatio());
map.put("splitEntrustFileName", merLedger.getSplitEntrustFileName());
// 转换成bas64
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + "/"+ merLedger.getSplitEntrustFilePath());
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url()+merLedger.getSplitEntrustFilePath());
String fileType = merLedger.getSplitEntrustFilePath().substring(merLedger.getSplitEntrustFilePath().lastIndexOf(".") + 1);
map.put("splitEntrustFilePath", LaKaLaConfig.uploadFile("COOPERATION_QUALIFICATION_PROOF", fileType, base64ImgUrl).getString("attFileId"));
map.put("splitRange", "MARK");
map.put("retUrl", CommonSysConst.getSysConfig() + "/crest/laKaLaNotify/applyLedgerMer");
map.put("retUrl", CommonSysConst.getSysConfig().getDomainName() + "/crest/laKaLaNotify/applyLedgerMer");
commonParam.put("reqData", map);
Map<String, Object> reqParam = LaKaLaConfig.generateSignParamsV2(JSONObject.parseObject(JSONObject.toJSONString(commonParam)));
@ -96,19 +99,16 @@ public class LaKaLaLedgerService {
merLedgerApply.setMerId(merLedger.getId());
merLedgerApply.setOrderNo(orderNo);
merLedgerApply.setRequestBody(JSONObject.toJSONString(requestMap));
merLedgerApplyService.editMerLedgerApply(merLedgerApply);
JSONObject responseBody = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLkl_request_url() + "/api/v2/mms/openApi/ledger/applyLedgerMer", commonParam, heard);
if (!responseBody.getString("retCode").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("retMsg"));
}
System.out.println("body:" + JSONObject.toJSONString(commonParam));
System.out.println("response:" + responseBody.toJSONString());
merLedgerApply.setApplyId(responseBody.getJSONObject("respData").getString("applyId"));
merLedgerApply.setResponseBody(responseBody.toJSONString());
merLedgerApplyService.editMerLedgerApply(merLedgerApply);
if (!responseBody.getString("retCode").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("retMsg"));
}
return responseBody;
}
@ -297,9 +297,8 @@ public class LaKaLaLedgerService {
/**
* 绑定分账关系
*/
public void applyBind(Long merId,String receiverNo) {
public void applyBind(BsMerLedgerReceiver merLedgerReceiver) {
// 查询
BsMerLedgerReceiver merLedgerReceiver = merLedgerReceiverService.getMerLedgerReceiver(merId, receiverNo);
if (merLedgerReceiver == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到分账关系");
}
@ -315,11 +314,11 @@ public class LaKaLaLedgerService {
map.put("merCupNo", merLedgerReceiver.getCupNo());
map.put("receiverNo", merLedgerReceiver.getReceiverNo());
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + "/"+ merLedgerReceiver.getEntrustFilePath());
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url()+merLedgerReceiver.getEntrustFilePath());
String fileType = merLedgerReceiver.getEntrustFilePath().substring(merLedgerReceiver.getEntrustFilePath().lastIndexOf(".") + 1);
map.put("entrustFileName", merLedgerReceiver.getEntrustFileName());
map.put("entrustFilePath", LaKaLaConfig.uploadFile("COOPERATION_QUALIFICATION_PROOF", fileType, base64ImgUrl).getString("attFileId"));
map.put("retUrl", CommonSysConst.getSysConfig().getDomainName()+"/crest/laKaLaNotify/applyLedgerMer");
map.put("retUrl", CommonSysConst.getSysConfig().getDomainName()+"/crest/laKaLaNotify/applyBindReceiver");
commonParam.put("reqData", map);
Map<String, Object> reqParam = LaKaLaConfig.generateSignParamsV2(JSONObject.parseObject(JSONObject.toJSONString(commonParam)));
@ -333,8 +332,21 @@ public class LaKaLaLedgerService {
if (!responseBody.getString("retCode").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("retMsg"));
}
merLedgerReceiver.setStatus(MerLedgerStatusEnum.status1.getNumber());
merLedgerReceiver.setStatus(MerLedgerReceiverStatusEnum.status2.getNumber());
merLedgerReceiver.setAuditStatus(MerLedgerReceiverAuditStatusEnum.status1.getNumber());
merLedgerReceiverService.editMerLedgerReceiver(merLedgerReceiver);
BsMerLedgerReceiverApply ledgerReceiverApply = new BsMerLedgerReceiverApply();
ledgerReceiverApply.setMerId(merLedgerReceiver.getMerId());
ledgerReceiverApply.setMerLedgerId(merLedgerReceiver.getMerLedgerId());
ledgerReceiverApply.setMerLedgerReceiverId(merLedgerReceiver.getId());
ledgerReceiverApply.setReceiverNo(merLedgerReceiver.getReceiverNo());
ledgerReceiverApply.setOrderNo(MapUtils.getString(map,"orderNo"));
ledgerReceiverApply.setApplyId(responseBody.getJSONObject("respData").getString("applyId"));
ledgerReceiverApply.setRequestBody(JSONObject.toJSONString(commonParam));
ledgerReceiverApply.setResponseBody(responseBody.toJSONString());
ledgerReceiverApply.setStatus(MerLedgerReceiverApplyStatusEnum.status1.getNumber());
merLedgerReceiverApplyService.editReceiverApply(ledgerReceiverApply);
}
/**
@ -355,15 +367,13 @@ public class LaKaLaLedgerService {
map.put("version", "1.0");
map.put("orderNo", System.currentTimeMillis()+"");
map.put("orgCode", "1");
map.put("merCupNo", "8226900581208NT");
map.put("receiverNo", "");
map.put("entrustFileName", "123");
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + "/"+ merLedgerReceiver.getEntrustFilePath());
String fileType = merLedgerReceiver.getEntrustFilePath().substring(merLedgerReceiver.getEntrustFilePath().lastIndexOf(".") + 1);
map.put("entrustFileName", merLedgerReceiver.getEntrustFileName());
map.put("merCupNo", merLedgerReceiver.getCupNo());
map.put("receiverNo", merLedgerReceiver.getReceiverNo());
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + merLedgerReceiver.getRelieveEntrustFilePath());
String fileType = merLedgerReceiver.getRelieveEntrustFilePath().substring(merLedgerReceiver.getRelieveEntrustFilePath().lastIndexOf(".") + 1);
map.put("entrustFileName", merLedgerReceiver.getRelieveEntrustFileName());
map.put("entrustFilePath", LaKaLaConfig.uploadFile("COOPERATION_QUALIFICATION_PROOF", fileType, base64ImgUrl).getString("attFileId"));
map.put("retUrl", "123");
map.put("retUrl", CommonSysConst.getSysConfig().getDomainName()+"/crest/laKaLaNotify/applyBindUnReceiver");
commonParam.put("reqData", map);
Map<String, Object> reqParam = LaKaLaConfig.generateSignParamsV2(JSONObject.parseObject(JSONObject.toJSONString(commonParam)));
@ -377,6 +387,20 @@ public class LaKaLaLedgerService {
if (!responseBody.getString("retCode").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("retMsg"));
}
merLedgerReceiver.setAuditStatus(MerLedgerReceiverAuditStatusEnum.status4.getNumber());
merLedgerReceiverService.editMerLedgerReceiver(merLedgerReceiver);
BsMerLedgerReceiverApply ledgerReceiverApply = new BsMerLedgerReceiverApply();
ledgerReceiverApply.setMerId(merLedgerReceiver.getMerId());
ledgerReceiverApply.setMerLedgerId(merLedgerReceiver.getMerLedgerId());
ledgerReceiverApply.setMerLedgerReceiverId(merLedgerReceiver.getId());
ledgerReceiverApply.setReceiverNo(merLedgerReceiver.getReceiverNo());
ledgerReceiverApply.setOrderNo(MapUtils.getString(map,"orderNo"));
ledgerReceiverApply.setApplyId(responseBody.getJSONObject("respData").getString("applyId"));
ledgerReceiverApply.setRequestBody(JSONObject.toJSONString(commonParam));
ledgerReceiverApply.setResponseBody(responseBody.toJSONString());
ledgerReceiverApply.setStatus(MerLedgerReceiverApplyStatusEnum.status1.getNumber());
merLedgerReceiverApplyService.editReceiverApply(ledgerReceiverApply);
}
}

@ -95,7 +95,7 @@ public class SaasMerService {
Map<String,Object> body = new HashMap<>();
body.put("userNo", SaasConfig.userNo);
body.put("email", basisModel.getRegEmail());
body.put("busiCode", "PAPER_CODE");
body.put("busiCode", "WECHAT_PAY");
body.put("merRegName", basisModel.getMerName());
body.put("merType", basisModel.getMerType().equals(MerTypeEnum.status2.getNumber())?"TP_MERCHANT":"TP_PERSONAL");
body.put("merName", basisModel.getMerName());

@ -43,18 +43,20 @@ public interface BsMerLedgerReceiverMapper extends BsMerLedgerReceiverMapperExt
"platform_type, platform_no, ",
"cup_no, receiver_no, ",
"receiver_name, entrust_file_name, ",
"entrust_file_path, `status`, ",
"reject_reason, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"entrust_file_path, relieve_entrust_file_name, ",
"relieve_entrust_file_path, `status`, ",
"audit_status, reject_reason, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{merId,jdbcType=BIGINT}, #{merLedgerId,jdbcType=BIGINT}, ",
"#{platformType,jdbcType=INTEGER}, #{platformNo,jdbcType=VARCHAR}, ",
"#{cupNo,jdbcType=VARCHAR}, #{receiverNo,jdbcType=VARCHAR}, ",
"#{receiverName,jdbcType=VARCHAR}, #{entrustFileName,jdbcType=VARCHAR}, ",
"#{entrustFilePath,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{rejectReason,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{entrustFilePath,jdbcType=VARCHAR}, #{relieveEntrustFileName,jdbcType=VARCHAR}, ",
"#{relieveEntrustFilePath,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{auditStatus,jdbcType=INTEGER}, #{rejectReason,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerLedgerReceiver record);
@ -75,7 +77,10 @@ public interface BsMerLedgerReceiverMapper extends BsMerLedgerReceiverMapperExt
@Result(column="receiver_name", property="receiverName", jdbcType=JdbcType.VARCHAR),
@Result(column="entrust_file_name", property="entrustFileName", jdbcType=JdbcType.VARCHAR),
@Result(column="entrust_file_path", property="entrustFilePath", jdbcType=JdbcType.VARCHAR),
@Result(column="relieve_entrust_file_name", property="relieveEntrustFileName", jdbcType=JdbcType.VARCHAR),
@Result(column="relieve_entrust_file_path", property="relieveEntrustFilePath", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="audit_status", property="auditStatus", jdbcType=JdbcType.INTEGER),
@Result(column="reject_reason", property="rejectReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@ -88,8 +93,9 @@ public interface BsMerLedgerReceiverMapper extends BsMerLedgerReceiverMapperExt
@Select({
"select",
"id, mer_id, mer_ledger_id, platform_type, platform_no, cup_no, receiver_no, ",
"receiver_name, entrust_file_name, entrust_file_path, `status`, reject_reason, ",
"create_time, update_time, ext_1, ext_2, ext_3",
"receiver_name, entrust_file_name, entrust_file_path, relieve_entrust_file_name, ",
"relieve_entrust_file_path, `status`, audit_status, reject_reason, create_time, ",
"update_time, ext_1, ext_2, ext_3",
"from bs_mer_ledger_receiver",
"where id = #{id,jdbcType=BIGINT}"
})
@ -104,7 +110,10 @@ public interface BsMerLedgerReceiverMapper extends BsMerLedgerReceiverMapperExt
@Result(column="receiver_name", property="receiverName", jdbcType=JdbcType.VARCHAR),
@Result(column="entrust_file_name", property="entrustFileName", jdbcType=JdbcType.VARCHAR),
@Result(column="entrust_file_path", property="entrustFilePath", jdbcType=JdbcType.VARCHAR),
@Result(column="relieve_entrust_file_name", property="relieveEntrustFileName", jdbcType=JdbcType.VARCHAR),
@Result(column="relieve_entrust_file_path", property="relieveEntrustFilePath", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="audit_status", property="auditStatus", jdbcType=JdbcType.INTEGER),
@Result(column="reject_reason", property="rejectReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@ -134,7 +143,10 @@ public interface BsMerLedgerReceiverMapper extends BsMerLedgerReceiverMapperExt
"receiver_name = #{receiverName,jdbcType=VARCHAR},",
"entrust_file_name = #{entrustFileName,jdbcType=VARCHAR},",
"entrust_file_path = #{entrustFilePath,jdbcType=VARCHAR},",
"relieve_entrust_file_name = #{relieveEntrustFileName,jdbcType=VARCHAR},",
"relieve_entrust_file_path = #{relieveEntrustFilePath,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"audit_status = #{auditStatus,jdbcType=INTEGER},",
"reject_reason = #{rejectReason,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",

@ -64,10 +64,22 @@ public class BsMerLedgerReceiverSqlProvider {
sql.VALUES("entrust_file_path", "#{entrustFilePath,jdbcType=VARCHAR}");
}
if (record.getRelieveEntrustFileName() != null) {
sql.VALUES("relieve_entrust_file_name", "#{relieveEntrustFileName,jdbcType=VARCHAR}");
}
if (record.getRelieveEntrustFilePath() != null) {
sql.VALUES("relieve_entrust_file_path", "#{relieveEntrustFilePath,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getAuditStatus() != null) {
sql.VALUES("audit_status", "#{auditStatus,jdbcType=INTEGER}");
}
if (record.getRejectReason() != null) {
sql.VALUES("reject_reason", "#{rejectReason,jdbcType=VARCHAR}");
}
@ -111,7 +123,10 @@ public class BsMerLedgerReceiverSqlProvider {
sql.SELECT("receiver_name");
sql.SELECT("entrust_file_name");
sql.SELECT("entrust_file_path");
sql.SELECT("relieve_entrust_file_name");
sql.SELECT("relieve_entrust_file_path");
sql.SELECT("`status`");
sql.SELECT("audit_status");
sql.SELECT("reject_reason");
sql.SELECT("create_time");
sql.SELECT("update_time");
@ -175,10 +190,22 @@ public class BsMerLedgerReceiverSqlProvider {
sql.SET("entrust_file_path = #{record.entrustFilePath,jdbcType=VARCHAR}");
}
if (record.getRelieveEntrustFileName() != null) {
sql.SET("relieve_entrust_file_name = #{record.relieveEntrustFileName,jdbcType=VARCHAR}");
}
if (record.getRelieveEntrustFilePath() != null) {
sql.SET("relieve_entrust_file_path = #{record.relieveEntrustFilePath,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getAuditStatus() != null) {
sql.SET("audit_status = #{record.auditStatus,jdbcType=INTEGER}");
}
if (record.getRejectReason() != null) {
sql.SET("reject_reason = #{record.rejectReason,jdbcType=VARCHAR}");
}
@ -221,7 +248,10 @@ public class BsMerLedgerReceiverSqlProvider {
sql.SET("receiver_name = #{record.receiverName,jdbcType=VARCHAR}");
sql.SET("entrust_file_name = #{record.entrustFileName,jdbcType=VARCHAR}");
sql.SET("entrust_file_path = #{record.entrustFilePath,jdbcType=VARCHAR}");
sql.SET("relieve_entrust_file_name = #{record.relieveEntrustFileName,jdbcType=VARCHAR}");
sql.SET("relieve_entrust_file_path = #{record.relieveEntrustFilePath,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("audit_status = #{record.auditStatus,jdbcType=INTEGER}");
sql.SET("reject_reason = #{record.rejectReason,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
@ -274,10 +304,22 @@ public class BsMerLedgerReceiverSqlProvider {
sql.SET("entrust_file_path = #{entrustFilePath,jdbcType=VARCHAR}");
}
if (record.getRelieveEntrustFileName() != null) {
sql.SET("relieve_entrust_file_name = #{relieveEntrustFileName,jdbcType=VARCHAR}");
}
if (record.getRelieveEntrustFilePath() != null) {
sql.SET("relieve_entrust_file_path = #{relieveEntrustFilePath,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getAuditStatus() != null) {
sql.SET("audit_status = #{auditStatus,jdbcType=INTEGER}");
}
if (record.getRejectReason() != null) {
sql.SET("reject_reason = #{rejectReason,jdbcType=VARCHAR}");
}

@ -64,10 +64,25 @@ public class BsMerLedgerReceiver implements Serializable {
private String entrustFilePath;
/**
* 状态 0删除 1可用 2审核中 3审核驳回
* 解除合作协议附件名称
*/
private String relieveEntrustFileName;
/**
* 解除合作协议附件路径
*/
private String relieveEntrustFilePath;
/**
* 状态 0删除 1正常 2不可用
*/
private Integer status;
/**
* 审核状态 1绑定分账审核中 2通过 3驳回 4解绑分账审核中
*/
private Integer auditStatus;
/**
* 驳回原因
*/
@ -171,6 +186,22 @@ public class BsMerLedgerReceiver implements Serializable {
this.entrustFilePath = entrustFilePath;
}
public String getRelieveEntrustFileName() {
return relieveEntrustFileName;
}
public void setRelieveEntrustFileName(String relieveEntrustFileName) {
this.relieveEntrustFileName = relieveEntrustFileName;
}
public String getRelieveEntrustFilePath() {
return relieveEntrustFilePath;
}
public void setRelieveEntrustFilePath(String relieveEntrustFilePath) {
this.relieveEntrustFilePath = relieveEntrustFilePath;
}
public Integer getStatus() {
return status;
}
@ -179,6 +210,14 @@ public class BsMerLedgerReceiver implements Serializable {
this.status = status;
}
public Integer getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(Integer auditStatus) {
this.auditStatus = auditStatus;
}
public String getRejectReason() {
return rejectReason;
}
@ -249,7 +288,10 @@ public class BsMerLedgerReceiver implements Serializable {
&& (this.getReceiverName() == null ? other.getReceiverName() == null : this.getReceiverName().equals(other.getReceiverName()))
&& (this.getEntrustFileName() == null ? other.getEntrustFileName() == null : this.getEntrustFileName().equals(other.getEntrustFileName()))
&& (this.getEntrustFilePath() == null ? other.getEntrustFilePath() == null : this.getEntrustFilePath().equals(other.getEntrustFilePath()))
&& (this.getRelieveEntrustFileName() == null ? other.getRelieveEntrustFileName() == null : this.getRelieveEntrustFileName().equals(other.getRelieveEntrustFileName()))
&& (this.getRelieveEntrustFilePath() == null ? other.getRelieveEntrustFilePath() == null : this.getRelieveEntrustFilePath().equals(other.getRelieveEntrustFilePath()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getAuditStatus() == null ? other.getAuditStatus() == null : this.getAuditStatus().equals(other.getAuditStatus()))
&& (this.getRejectReason() == null ? other.getRejectReason() == null : this.getRejectReason().equals(other.getRejectReason()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
@ -272,7 +314,10 @@ public class BsMerLedgerReceiver implements Serializable {
result = prime * result + ((getReceiverName() == null) ? 0 : getReceiverName().hashCode());
result = prime * result + ((getEntrustFileName() == null) ? 0 : getEntrustFileName().hashCode());
result = prime * result + ((getEntrustFilePath() == null) ? 0 : getEntrustFilePath().hashCode());
result = prime * result + ((getRelieveEntrustFileName() == null) ? 0 : getRelieveEntrustFileName().hashCode());
result = prime * result + ((getRelieveEntrustFilePath() == null) ? 0 : getRelieveEntrustFilePath().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getAuditStatus() == null) ? 0 : getAuditStatus().hashCode());
result = prime * result + ((getRejectReason() == null) ? 0 : getRejectReason().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
@ -298,7 +343,10 @@ public class BsMerLedgerReceiver implements Serializable {
sb.append(", receiverName=").append(receiverName);
sb.append(", entrustFileName=").append(entrustFileName);
sb.append(", entrustFilePath=").append(entrustFilePath);
sb.append(", relieveEntrustFileName=").append(relieveEntrustFileName);
sb.append(", relieveEntrustFilePath=").append(relieveEntrustFilePath);
sb.append(", status=").append(status);
sb.append(", auditStatus=").append(auditStatus);
sb.append(", rejectReason=").append(rejectReason);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);

@ -785,6 +785,146 @@ public class BsMerLedgerReceiverExample {
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameIsNull() {
addCriterion("relieve_entrust_file_name is null");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameIsNotNull() {
addCriterion("relieve_entrust_file_name is not null");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameEqualTo(String value) {
addCriterion("relieve_entrust_file_name =", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameNotEqualTo(String value) {
addCriterion("relieve_entrust_file_name <>", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameGreaterThan(String value) {
addCriterion("relieve_entrust_file_name >", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameGreaterThanOrEqualTo(String value) {
addCriterion("relieve_entrust_file_name >=", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameLessThan(String value) {
addCriterion("relieve_entrust_file_name <", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameLessThanOrEqualTo(String value) {
addCriterion("relieve_entrust_file_name <=", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameLike(String value) {
addCriterion("relieve_entrust_file_name like", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameNotLike(String value) {
addCriterion("relieve_entrust_file_name not like", value, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameIn(List<String> values) {
addCriterion("relieve_entrust_file_name in", values, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameNotIn(List<String> values) {
addCriterion("relieve_entrust_file_name not in", values, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameBetween(String value1, String value2) {
addCriterion("relieve_entrust_file_name between", value1, value2, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFileNameNotBetween(String value1, String value2) {
addCriterion("relieve_entrust_file_name not between", value1, value2, "relieveEntrustFileName");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathIsNull() {
addCriterion("relieve_entrust_file_path is null");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathIsNotNull() {
addCriterion("relieve_entrust_file_path is not null");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathEqualTo(String value) {
addCriterion("relieve_entrust_file_path =", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathNotEqualTo(String value) {
addCriterion("relieve_entrust_file_path <>", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathGreaterThan(String value) {
addCriterion("relieve_entrust_file_path >", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathGreaterThanOrEqualTo(String value) {
addCriterion("relieve_entrust_file_path >=", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathLessThan(String value) {
addCriterion("relieve_entrust_file_path <", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathLessThanOrEqualTo(String value) {
addCriterion("relieve_entrust_file_path <=", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathLike(String value) {
addCriterion("relieve_entrust_file_path like", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathNotLike(String value) {
addCriterion("relieve_entrust_file_path not like", value, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathIn(List<String> values) {
addCriterion("relieve_entrust_file_path in", values, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathNotIn(List<String> values) {
addCriterion("relieve_entrust_file_path not in", values, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathBetween(String value1, String value2) {
addCriterion("relieve_entrust_file_path between", value1, value2, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andRelieveEntrustFilePathNotBetween(String value1, String value2) {
addCriterion("relieve_entrust_file_path not between", value1, value2, "relieveEntrustFilePath");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
@ -845,6 +985,66 @@ public class BsMerLedgerReceiverExample {
return (Criteria) this;
}
public Criteria andAuditStatusIsNull() {
addCriterion("audit_status is null");
return (Criteria) this;
}
public Criteria andAuditStatusIsNotNull() {
addCriterion("audit_status is not null");
return (Criteria) this;
}
public Criteria andAuditStatusEqualTo(Integer value) {
addCriterion("audit_status =", value, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusNotEqualTo(Integer value) {
addCriterion("audit_status <>", value, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusGreaterThan(Integer value) {
addCriterion("audit_status >", value, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("audit_status >=", value, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusLessThan(Integer value) {
addCriterion("audit_status <", value, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusLessThanOrEqualTo(Integer value) {
addCriterion("audit_status <=", value, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusIn(List<Integer> values) {
addCriterion("audit_status in", values, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusNotIn(List<Integer> values) {
addCriterion("audit_status not in", values, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusBetween(Integer value1, Integer value2) {
addCriterion("audit_status between", value1, value2, "auditStatus");
return (Criteria) this;
}
public Criteria andAuditStatusNotBetween(Integer value1, Integer value2) {
addCriterion("audit_status not between", value1, value2, "auditStatus");
return (Criteria) this;
}
public Criteria andRejectReasonIsNull() {
addCriterion("reject_reason is null");
return (Criteria) this;

@ -31,6 +31,13 @@ public interface BsMerLedgerReceiverService {
*/
void merLedgerReceiverDel(BsMerLedgerReceiver merLedgerReceiver);
/**
* 查询分账接收方详情
* @param id
* @return
*/
BsMerLedgerReceiver getMerLedgerReceiverById(Long id);
/**
* 查询分账接收方详情
* @param merId

@ -116,14 +116,13 @@ public class BsDeviceOrderServiceImpl implements BsDeviceOrderService {
editData(order);
List<BsDevice> deviceList = new ArrayList<>();
Integer orderType = order.getOrderType();
for (String deviceNo : deviceNoList) {
// 查询设备
BsDevice device = deviceService.getDetailByNo(deviceNo);
if (device == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的订单号");
}
if (!device.getDeviceType().equals(orderType)) {
if (!device.getDeviceType().equals(order.getDeviceType())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "设备编号:"+device.getDeviceNo() + "无法分配,设备类型不匹配");
}
if (device.getStoreId() != null) {

@ -11,6 +11,8 @@ import com.hfkj.sysenum.PlatformTypeEnum;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
@ -44,15 +46,17 @@ public class BsMerLedgerReceiverServiceImpl implements BsMerLedgerReceiverServic
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void merLedgerReceiverApply(BsMerLedgerReceiver merLedgerReceiver) {
editMerLedgerReceiver(merLedgerReceiver);
if (merLedgerReceiver.getPlatformType().equals(PlatformTypeEnum.type1.getNumber())) {
laKaLaLedgerService.applyBind(merLedgerReceiver.getMerId(), merLedgerReceiver.getReceiverNo());
laKaLaLedgerService.applyBind(merLedgerReceiver);
}
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void merLedgerReceiverDel(BsMerLedgerReceiver merLedgerReceiver) {
editMerLedgerReceiver(merLedgerReceiver);
@ -61,6 +65,11 @@ public class BsMerLedgerReceiverServiceImpl implements BsMerLedgerReceiverServic
}
}
@Override
public BsMerLedgerReceiver getMerLedgerReceiverById(Long id) {
return merLedgerReceiverMapper.selectByPrimaryKey(id);
}
@Override
public BsMerLedgerReceiver getMerLedgerReceiver(Long merId, String receiverNo) {
BsMerLedgerReceiverExample example = new BsMerLedgerReceiverExample();

@ -7,6 +7,8 @@ import com.hfkj.entity.BsMerLedgerExample;
import com.hfkj.service.BsMerLedgerService;
import com.hfkj.sysenum.PlatformTypeEnum;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
@ -39,6 +41,7 @@ public class BsMerLedgerServiceImpl implements BsMerLedgerService {
}
@Override
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
public void merLedgerApply(BsMerLedger merLedger) {
editMerLedger(merLedger);

@ -223,11 +223,6 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
userDiscountService.userDiscountUse(tradeOrder.getUserDiscountId(), tradeOrder.getUserPhone());
}
// 创建分账
if (tradeOrder.getProfitSharingStatus().equals(true)) {
tradeOrderProfitSharingService.createProfitSharing(tradeOrder);
}
Map<String,Object> param = new HashMap<>();
param.put("storeId", tradeOrder.getStoreId());
param.put("deviceType", DeviceTypeEnum.type1.getNumber());
@ -236,6 +231,13 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
for (BsDevice device : deviceList) {
soundService.sendPayMsg(device.getDeviceNo(), tradeOrder.getTradeAmount());
}
// 创建分账
if (tradeOrder.getProfitSharingStatus().equals(true)) {
new Thread(() -> {
tradeOrderProfitSharingService.createProfitSharing(tradeOrder);
});
}
}
}

@ -0,0 +1,53 @@
package com.hfkj.sysenum;
import java.util.Objects;
/**
* @className: MerLedgerStatusEnum
* @author: HuRui
* @date: 2023/4/18
**/
public enum MerLedgerReceiverAuditStatusEnum {
status1(1, "绑定分账审核中"),
status2(2, "通过"),
status3(3, "驳回"),
status4(4, "解绑分账审核中"),
status5(5, "解除分账驳回"),
;
private Integer number;
private String name;
MerLedgerReceiverAuditStatusEnum(int number, String name) {
this.number = number;
this.name = name;
}
public static MerLedgerReceiverAuditStatusEnum getDataByNumber(Integer number) {
for (MerLedgerReceiverAuditStatusEnum ele : values()) {
if (Objects.equals(number,ele.getNumber())) {
return ele;
}
}
return null;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -8,10 +8,9 @@ import java.util.Objects;
* @date: 2023/4/18
**/
public enum MerLedgerReceiverStatusEnum {
status0(0, "不可用"),
status1(1, "可用"),
status2(2, "审核中"),
status3(3, "审核驳回"),
status0(0, "删除"),
status1(1, "正常"),
status2(2, "不可用"),
;
private Integer number;

Loading…
Cancel
Save