dev
胡锐 1 year ago
parent 5b1882afb7
commit 5a732b3a2d
  1. 226
      cweb/src/main/java/com/cweb/controller/BsMerPlatformPeriodController.java
  2. 16
      cweb/src/main/java/com/cweb/controller/BsPayQrCodeController.java
  3. 192
      cweb/src/main/java/com/cweb/notify/LLGController.java
  4. 385
      service/src/main/java/com/hfkj/channel/llg/service/LLGMerService.java
  5. 105
      service/src/main/java/com/hfkj/channel/llg/service/LLGOrderService.java
  6. 23
      service/src/main/java/com/hfkj/dao/BsMerMapper.java
  7. 37
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodMapper.java
  8. 142
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodPaidMapper.java
  9. 7
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodPaidMapperExt.java
  10. 388
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodPaidSqlProvider.java
  11. 23
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodRateMapper.java
  12. 14
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodRateSqlProvider.java
  13. 42
      service/src/main/java/com/hfkj/dao/BsMerPlatformPeriodSqlProvider.java
  14. 14
      service/src/main/java/com/hfkj/dao/BsMerSqlProvider.java
  15. 100
      service/src/main/java/com/hfkj/dao/LlgBankCodeMapper.java
  16. 7
      service/src/main/java/com/hfkj/dao/LlgBankCodeMapperExt.java
  17. 248
      service/src/main/java/com/hfkj/dao/LlgBankCodeSqlProvider.java
  18. 16
      service/src/main/java/com/hfkj/entity/BsMer.java
  19. 60
      service/src/main/java/com/hfkj/entity/BsMerExample.java
  20. 48
      service/src/main/java/com/hfkj/entity/BsMerPlatformPeriod.java
  21. 190
      service/src/main/java/com/hfkj/entity/BsMerPlatformPeriodExample.java
  22. 296
      service/src/main/java/com/hfkj/entity/BsMerPlatformPeriodPaid.java
  23. 1253
      service/src/main/java/com/hfkj/entity/BsMerPlatformPeriodPaidExample.java
  24. 16
      service/src/main/java/com/hfkj/entity/BsMerPlatformPeriodRate.java
  25. 60
      service/src/main/java/com/hfkj/entity/BsMerPlatformPeriodRateExample.java
  26. 135
      service/src/main/java/com/hfkj/entity/LlgBankCode.java
  27. 622
      service/src/main/java/com/hfkj/entity/LlgBankCodeExample.java
  28. 6
      service/src/main/java/com/hfkj/service/BsMerService.java
  29. 19
      service/src/main/java/com/hfkj/service/LlgBankCodeService.java
  30. 11
      service/src/main/java/com/hfkj/service/impl/BsMerServiceImpl.java
  31. 7
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderRefundServiceImpl.java
  32. 32
      service/src/main/java/com/hfkj/service/impl/LlgBankCodeServiceImpl.java
  33. 60
      service/src/main/java/com/hfkj/service/period/BsMerPlatformPeriodPaidService.java
  34. 42
      service/src/main/java/com/hfkj/service/period/BsMerPlatformPeriodRateService.java
  35. 37
      service/src/main/java/com/hfkj/service/period/BsMerPlatformPeriodService.java
  36. 86
      service/src/main/java/com/hfkj/service/period/impl/BsMerPlatformPeriodPaidServiceImpl.java
  37. 61
      service/src/main/java/com/hfkj/service/period/impl/BsMerPlatformPeriodRateServiceImpl.java
  38. 100
      service/src/main/java/com/hfkj/service/period/impl/BsMerPlatformPeriodServiceImpl.java
  39. 49
      service/src/main/java/com/hfkj/sysenum/MerPlatformPeriodFeePaidTypeEnum.java
  40. 48
      service/src/main/java/com/hfkj/sysenum/MerPlatformPeriodPayTypeEnum.java
  41. 49
      service/src/main/java/com/hfkj/sysenum/MerPlatformPeriodRateTypeEnum.java
  42. 50
      service/src/main/java/com/hfkj/sysenum/MerPlatformPeriodStatusEnum.java
  43. 1
      service/src/main/java/com/hfkj/sysenum/PlatformPeriodTypeEnum.java

@ -1,15 +1,20 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsMer;
import com.hfkj.entity.BsMerPlatformPeriod;
import com.hfkj.entity.BsMerPlatformPeriodPaid;
import com.hfkj.entity.BsMerPlatformPeriodRate;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsMerPlatformNoService;
import com.hfkj.service.BsMerService;
import com.hfkj.service.period.BsMerPlatformPeriodPaidService;
import com.hfkj.service.period.BsMerPlatformPeriodRateService;
import com.hfkj.service.period.BsMerPlatformPeriodService;
import com.hfkj.sysenum.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
@ -19,8 +24,11 @@ import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @className: BsMerPlatformPeriodController
@ -28,7 +36,7 @@ import java.util.Map;
* @date: 2024/1/6
**/
@Controller
@Api(value = "商户分渠道管理")
@Api(value = "商户分渠道管理")
@RequestMapping(value = "/merPlatformPeriod")
public class BsMerPlatformPeriodController {
@ -36,6 +44,12 @@ public class BsMerPlatformPeriodController {
@Resource
private BsMerPlatformPeriodService merPlatformPeriodService;
@Resource
private BsMerPlatformPeriodPaidService merPlatformPeriodPaidService;
@Resource
private BsMerPlatformPeriodRateService merPlatformPeriodRateService;
@Resource
private BsMerService merService;
@RequestMapping(value="/apply",method = RequestMethod.POST)
@ResponseBody
@ -46,25 +60,217 @@ public class BsMerPlatformPeriodController {
|| StringUtils.isBlank(body.getString("merNo"))
|| body.getInteger("platformPeriodType") == null
|| body.getBoolean("openUnionpay") == null
|| body.getString("unionpayFeePaid") == null
|| body.getJSONObject("rateObj") == null) {
|| StringUtils.isBlank(body.getString("agreementPics"))
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 查询商户
BsMer mer = merService.getMer(body.getString("merNo"));
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
JSONObject rateObj = body.getJSONObject("rateObj");
for (Object obj : rateObj.getJSONArray("")) {
if () {
// 查询记录
BsMerPlatformPeriod merPlatformPeriod = merPlatformPeriodService.getDetailByMer(mer.getMerNo(), PlatformPeriodTypeEnum.getDataByNumber(body.getInteger("platformPeriodType")));
if (merPlatformPeriod != null && !merPlatformPeriod.getStatus().equals(MerPlatformPeriodStatusEnum.status3.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "状态错误,无法多次申请");
}
if (merPlatformPeriod == null) {
merPlatformPeriod = new BsMerPlatformPeriod();
}
merPlatformPeriod.setCompanyId(mer.getCompanyId());
merPlatformPeriod.setAgentId(mer.getAgentId());
merPlatformPeriod.setMerId(mer.getId());
merPlatformPeriod.setMerNo(mer.getMerNo());
merPlatformPeriod.setPlatformType(body.getInteger("platformPeriodType"));
merPlatformPeriod.setOpenUnionpay(body.getBoolean("openUnionpay"));
merPlatformPeriod.setOpenAlipay(false);
merPlatformPeriod.setStatus(MerPlatformPeriodStatusEnum.status2.getNumber());
merPlatformPeriod.setSuggestionReject(null);
merPlatformPeriod.setAgreementPics(body.getString("agreementPics"));
List<BsMerPlatformPeriodPaid> periodPaidList = new ArrayList<>();
List<BsMerPlatformPeriodRate> periodRateList = new ArrayList<>();
BsMerPlatformPeriodRate periodRate;
// 开通银联分期
if (body.getBoolean("openUnionpay") == true) {
if (StringUtils.isBlank(body.getString("unionpayFeePaid"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未上传银联贴息方式");
}
if (body.getJSONArray("unionpayRate1") == null || body.getJSONArray("unionpayRate2") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未上传费率");
}
// 贴息方式
merPlatformPeriod.setUnionpayFeePaid(body.getString("unionpayFeePaid"));
String[] feePaidArray = merPlatformPeriod.getUnionpayFeePaid().split(",");
for (String feePaid : feePaidArray) {
BsMerPlatformPeriodPaid merPlatformPeriodPaid = new BsMerPlatformPeriodPaid();
merPlatformPeriodPaid.setMerId(merPlatformPeriod.getMerId());
merPlatformPeriodPaid.setMerNo(merPlatformPeriod.getMerNo());
merPlatformPeriodPaid.setPayType(MerPlatformPeriodPayTypeEnum.type1.getNumber());
merPlatformPeriodPaid.setPlatformType(merPlatformPeriod.getPlatformType());
merPlatformPeriodPaid.setPlatformFeePaid(MerPlatformPeriodFeePaidTypeEnum.getDataByNumber(Integer.valueOf(feePaid)).getNumber());
merPlatformPeriodPaid.setCurrentSettle(periodPaidList.stream().filter(o -> o.getPlatformType() != null).collect(Collectors.toList()).isEmpty()?true:false);
periodPaidList.add(merPlatformPeriodPaid);
}
// 银联分期费率(1类银行)
for (Object obj : body.getJSONArray("unionpayRate1")) {
JSONObject unionpayRateObj = (JSONObject) obj;
if (unionpayRateObj == null
|| unionpayRateObj.getInteger("periodNum") == null
|| unionpayRateObj.getBigDecimal("rate") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "费率请求校验失败");
}
periodRate = new BsMerPlatformPeriodRate();
periodRate.setPeriodRateType(MerPlatformPeriodRateTypeEnum.type1.getNumber());
periodRate.setPeriodNum(unionpayRateObj.getInteger("periodNum"));
periodRate.setRate(unionpayRateObj.getBigDecimal("rate"));
periodRateList.add(periodRate);
}
// 银联分期费率(2类银行)
for (Object obj : body.getJSONArray("unionpayRate2")) {
JSONObject unionpayRateObj = (JSONObject) obj;
if (unionpayRateObj == null
|| unionpayRateObj.getInteger("periodNum") == null
|| unionpayRateObj.getBigDecimal("rate") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "费率请求校验失败");
}
periodRate = new BsMerPlatformPeriodRate();
periodRate.setPeriodRateType(MerPlatformPeriodRateTypeEnum.type2.getNumber());
periodRate.setPeriodNum(unionpayRateObj.getInteger("periodNum"));
periodRate.setRate(unionpayRateObj.getBigDecimal("rate"));
periodRateList.add(periodRate);
}
}
merPlatformPeriodService.apply();
merPlatformPeriodService.configPeriod(merPlatformPeriod, periodPaidList, periodRateList);
return ResponseMsgUtil.success();
return ResponseMsgUtil.success("申请成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/updateFeePaid",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改贴息方式")
public ResponseData updateFeePaid(@RequestBody JSONObject body) {
try {
if (body == null
|| StringUtils.isBlank(body.getString("merNo"))
|| body.getInteger("platformPeriodType") == null
|| body.getInteger("payType") == null
|| body.getInteger("feePaid") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
merPlatformPeriodService.updateFeePaid(
body.getString("merNo"),
PlatformPeriodTypeEnum.getDataByNumber(body.getInteger("platformPeriodType")),
MerPlatformPeriodPayTypeEnum.getDataByNumber(body.getInteger("payType")),
MerPlatformPeriodFeePaidTypeEnum.getDataByNumber(body.getInteger("feePaid"))
);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getMerPlatformPeriodDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询商户详情")
public ResponseData getMerPlatformPeriodDetail(@RequestParam(value = "merNo" , required = true) String merNo) {
try {
List<Map<String,Object>> list = new ArrayList<>();
Map<String,Object> platformPeriodTypeMap = new HashMap<>();
// 渠道平台
for (PlatformPeriodTypeEnum platformPeriodTypeEnum : PlatformPeriodTypeEnum.values()) {
platformPeriodTypeMap.put("platformType", platformPeriodTypeEnum.getNumber());
platformPeriodTypeMap.put("platformTypeName", platformPeriodTypeEnum.getName());
// 查询渠道平台资料
BsMerPlatformPeriod period = merPlatformPeriodService.getDetailByMer(merNo, platformPeriodTypeEnum);
if (period != null) {
platformPeriodTypeMap.put("platformPeriod", period);
platformPeriodTypeMap.put("unionpayRate1", merPlatformPeriodRateService.getList(period.getId(), MerPlatformPeriodRateTypeEnum.type1));
platformPeriodTypeMap.put("unionpayRate2", merPlatformPeriodRateService.getList(period.getId(), MerPlatformPeriodRateTypeEnum.type2));
} else {
platformPeriodTypeMap.put("platformPeriod", null);
platformPeriodTypeMap.put("unionpayRate1", null);
platformPeriodTypeMap.put("unionpayRate2", null);
}
list.add(platformPeriodTypeMap);
}
return ResponseMsgUtil.success(list);
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getFeePaidList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询商户贴息列表")
public ResponseData getFeePaidList(@RequestParam(value = "merNo" , required = true) String merNo) {
try {
List<Map<String,Object>> list = new ArrayList<>();
Map<String,Object> platformPeriodTypeMap = new HashMap<>();
// 渠道平台
PlatformPeriodTypeEnum[] platformPeriodTypeList = PlatformPeriodTypeEnum.values();
for (PlatformPeriodTypeEnum platformPeriodTypeEnum : platformPeriodTypeList) {
platformPeriodTypeMap.put("platformType", platformPeriodTypeEnum.getNumber());
platformPeriodTypeMap.put("platformTypeName", platformPeriodTypeEnum.getName());
platformPeriodTypeMap.put("platformPeriod", merPlatformPeriodService.getDetailByMer(merNo, platformPeriodTypeEnum));
List<Map<String,Object>> payTypeListMap = new ArrayList<>();
// 分期支付方式
MerPlatformPeriodPayTypeEnum[] periodPayType = MerPlatformPeriodPayTypeEnum.values();
for (MerPlatformPeriodPayTypeEnum payType : periodPayType) {
Map<String,Object> payTypeMap = new HashMap<>();
payTypeMap.put("payType", payType.getNumber());
payTypeMap.put("payTypeName", payType.getName());
List<Map<String,Object>> paidListMap = new ArrayList<>();
// 查询贴息方式
List<BsMerPlatformPeriodPaid> paidList = merPlatformPeriodPaidService.getList(merNo, PlatformPeriodTypeEnum.getDataByNumber(platformPeriodTypeEnum.getNumber()));
for (BsMerPlatformPeriodPaid paid : paidList) {
Map<String,Object> paidMap = new HashMap<>();
paidMap.put("feePaid", paid.getPlatformFeePaid());
paidMap.put("currentSettle", paid.getCurrentSettle());
paidListMap.add(paidMap);
}
payTypeMap.put("feePaidList", paidListMap);
payTypeListMap.add(payTypeMap);
}
platformPeriodTypeMap.put("payTypeList", payTypeListMap);
list.add(platformPeriodTypeMap);
}
return ResponseMsgUtil.success(list);
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -8,10 +8,12 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.common.utils.StreamUtil;
import com.hfkj.entity.BsMer;
import com.hfkj.entity.BsPayQrCode;
import com.hfkj.entity.BsStore;
import com.hfkj.entity.BsStoreDiscountActivity;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsMerService;
import com.hfkj.service.BsPayQrCodeService;
import com.hfkj.service.BsStoreDiscountActivityService;
import com.hfkj.service.BsStoreService;
@ -44,7 +46,8 @@ public class BsPayQrCodeController {
@Resource
private BsStoreService storeService;
@Resource
private BsMerService merService;
@Resource
private BsStoreDiscountActivityService storeDiscountActivityService;
@ -91,6 +94,17 @@ public class BsPayQrCodeController {
storeMap.put("storeName", store.getName());
param.put("store", storeMap);
// 查询商户
BsMer mer = merService.getMer(store.getMerId());
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
Map<String, Object> merMap = new HashMap<>();
merMap.put("merNo", mer.getMerNo());
merMap.put("merName", mer.getMerName());
merMap.put("periodStatus", mer.getPeriodStatus());
param.put("mer", merMap);
List<BsStoreDiscountActivity> discountActivityList = new ArrayList<>();
// 门店优惠

@ -8,6 +8,8 @@ import com.hfkj.channel.llg.util.AesUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.*;
import com.hfkj.service.*;
import com.hfkj.service.period.BsMerPlatformPeriodPaidService;
import com.hfkj.service.period.BsMerPlatformPeriodService;
import com.hfkj.sysenum.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -45,17 +47,12 @@ public class LLGController {
@Resource
private BsTradeOrderMsgService tradeOrderMsgService;
@Resource
private BsMerLedgerService merLedgerService;
private BsMerPlatformPeriodService merPlatformPeriodService;
@Resource
private BsMerLedgerApplyService merLedgerApplyService;
private BsMerPlatformPeriodPaidService merPlatformPeriodPaidService;
@Resource
private BsMerLedgerReceiverService merLedgerReceiverService;
@Resource
private BsMerLedgerReceiverApplyService merLedgerReceiverApplyService;
@Resource
private LaKaLaLedgerService laKaLaLedgerService;
@Resource
private LaKaLaWalletService laKaLaWalletService;
private BsMerService merService;
@RequestMapping(value="/trade",method = RequestMethod.POST)
@ResponseBody
@ -100,139 +97,70 @@ public class LLGController {
}
}
@RequestMapping(value="/applyLedgerMer",method = RequestMethod.POST)
@RequestMapping(value="/merApply",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "开通分账业务通知")
public void applyLedgerMer(@RequestBody String reqBody) {
@ApiOperation(value = "商户申请开通审核通知")
public void merApply(@RequestBody String reqBody) {
try {
log.info("开通分账业务通知", reqBody);
log.info("商户申请开通审核通知", reqBody);
System.out.println(reqBody);
JSONObject respData = JSONObject.parseObject(reqBody);
BsMerLedgerApply ledgerApply = merLedgerApplyService.getApplyByApplyId(respData.getString("applyId"));
if (ledgerApply != null) {
ledgerApply.setNotifyBody(reqBody);
merLedgerApplyService.editMerLedgerApply(ledgerApply);
// 查询商户分账信息
BsMerLedger merLedger = merLedgerService.getMerLedgerById(ledgerApply.getMerLedgerId());
if (merLedger != null) {
// 审核状态 1:通过,2拒绝
if (respData.getString("auditStatus").equals("1")) {
merLedger.setStatus(MerLedgerStatusEnum.status1.getNumber());
merLedgerService.editMerLedger(merLedger);
// 延迟3秒
Thread.sleep(3000);
// 提现通知地址
String notifyUrl = CommonSysConst.getSysConfig().getDomainName()+"/crest/merWithdrawal/notify?cupNo="+merLedger.getCupNo();
// 配置账户自动结算
laKaLaWalletService.ewalletSettleProfile(1,merLedger.getCupNo(), "02", "06", notifyUrl);
// 配置分账接收方账户自动结算
laKaLaWalletService.ewalletSettleProfile(2,merLedger.getReceiverNo(), "02", "06", notifyUrl);
} else {
merLedger.setStatus(MerLedgerStatusEnum.status3.getNumber());
merLedger.setRejectReason(respData.getString("remark"));
merLedgerService.editMerLedger(merLedger);
// 示例:{"application_form_id":3878,"mer_id":"0","result":"图片模糊,请重新上传","status":"3"}
BsMerPlatformPeriod period = merPlatformPeriodService.getDetail(respData.getString("application_form_id"), PlatformPeriodTypeEnum.type1);
if (period != null) {
// 1:等待审核 2:通过 3:需要重新提交 4:拒绝
Integer status = respData.getInteger("status");
if (status == 2) {
period.setStatus(PlatformPeriodStatusEnum.status1.getNumber());
merPlatformPeriodService.editData(period);
// 查询商户
BsMer mer = merService.getMer(period.getMerId());
if (mer != null) {
mer.setPeriodStatus(true);
merService.update(mer);
}
}
}
} catch (Exception e) {
log.error("login error!",e);
}
}
@RequestMapping(value="/applyBindReceiver",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "分账关系绑定申请")
public void applyBindReceiver(@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("remark"));
merLedgerReceiverApplyService.editReceiverApply(receiverApply);
// 分账接收方
BsMerLedgerReceiver ledgerReceiver = merLedgerReceiverService.getMerLedgerReceiver(receiverApply.getMerId(), receiverApply.getReceiverNo());
if (ledgerReceiver != null) {
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);
}
}
for (Object obj : respData.getJSONArray("data")) {
JSONObject data = (JSONObject) obj;
// 贴息方式 1:商户贴息 2:用户贴息 3:商户用户各一半
if (data.getString("fee_paid_type").equals("1")) {
// Todo 目前只有银联分期,花呗未开通业务。MerPlatformPeriodPayTypeEnum 类型写死
BsMerPlatformPeriodPaid periodPaid = merPlatformPeriodPaidService.getDetail(period.getMerNo(), PlatformPeriodTypeEnum.type1, MerPlatformPeriodPayTypeEnum.type1, MerPlatformPeriodFeePaidTypeEnum.type1);
if (periodPaid != null) {
periodPaid.setPlatformMarketId(data.getString("market_id"));
periodPaid.setPlatformPkgId(data.getString("pkg_id"));
merPlatformPeriodPaidService.editData(periodPaid);
}
} else if (data.getString("fee_paid_type").equals("2")) {
// Todo 目前只有银联分期,花呗未开通业务。MerPlatformPeriodPayTypeEnum 类型写死
BsMerPlatformPeriodPaid periodPaid = merPlatformPeriodPaidService.getDetail(period.getMerNo(), PlatformPeriodTypeEnum.type1, MerPlatformPeriodPayTypeEnum.type1, MerPlatformPeriodFeePaidTypeEnum.type2);
if (periodPaid != null) {
periodPaid.setPlatformMarketId(data.getString("market_id"));
periodPaid.setPlatformPkgId(data.getString("pkg_id"));
merPlatformPeriodPaidService.editData(periodPaid);
}
} else if (data.getString("fee_paid_type").equals("3")) {
// Todo 目前只有银联分期,花呗未开通业务。MerPlatformPeriodPayTypeEnum 类型写死
BsMerPlatformPeriodPaid periodPaid = merPlatformPeriodPaidService.getDetail(period.getMerNo(), PlatformPeriodTypeEnum.type1, MerPlatformPeriodPayTypeEnum.type1, MerPlatformPeriodFeePaidTypeEnum.type3);
if (periodPaid != null) {
periodPaid.setPlatformMarketId(data.getString("market_id"));
periodPaid.setPlatformPkgId(data.getString("pkg_id"));
merPlatformPeriodPaidService.editData(periodPaid);
}
}
@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);
} else if (status == 3 || status == 4) {
period.setStatus(PlatformPeriodStatusEnum.status3.getNumber());
period.setSuggestionReject(respData.getString("result"));
merPlatformPeriodService.editData(period);
// 分手接收方申请记录
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);
}
}

@ -4,20 +4,20 @@ import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.llg.config.LLGConfig;
import com.hfkj.channel.llg.util.AesUtil;
import com.hfkj.channel.llg.util.HttpsUtils;
import com.hfkj.common.exception.BaseException;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.BsLklMcc;
import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.LlgRegion;
import com.hfkj.entity.*;
import com.hfkj.model.MerBasisModel;
import com.hfkj.service.BsLklMccService;
import com.hfkj.service.BsMerService;
import com.hfkj.service.LlgBankCodeService;
import com.hfkj.service.LlgRegionService;
import com.hfkj.sysenum.MerSettleType;
import com.hfkj.sysenum.MerStatusEnum;
import com.hfkj.sysenum.MerTypeEnum;
import com.hfkj.service.period.BsMerPlatformPeriodRateService;
import com.hfkj.service.period.BsMerPlatformPeriodService;
import com.hfkj.sysenum.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
@ -51,158 +51,230 @@ public class LLGMerService {
@Resource
private BsLklMccService mccService;
@Resource
private BsMerPlatformPeriodService merPlatformPeriodService;
@Resource
private BsMerPlatformPeriodRateService merPlatformPeriodRateService;
@Resource
private LlgBankCodeService llgBankCodeService;
/**
* 零零购商户入网申请417
* @return
* @throws Exception
*/
public Map<String,Object> merApply(Long merId) throws Exception {
// 商户详情
MerBasisModel merDetail = merService.getMerDetail(merId);
if (merDetail == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
if (!merDetail.getMerStatus().equals(MerStatusEnum.status1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户状态未处于正常");
}
if (!merDetail.getMerType().equals(MerTypeEnum.status1.getNumber())
&& !merDetail.getMerType().equals(MerTypeEnum.status2.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户无法申请");
}
// 查询零零购地区
LlgRegion llgRegion = llgRegionService.getDataByAreaCode(merDetail.getMerRegion().getAreaCode());
if (llgRegion == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的地区");
}
// 查询MCC编码
BsLklMcc mccData = mccService.getMccByCode(merDetail.getMerMccCode());
if (mccData == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的MCC编码");
}
public Map<String,Object> merApply(Long merId) {
try {
// 商户详情
MerBasisModel merDetail = merService.getMerDetail(merId);
if (merDetail == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
if (!merDetail.getMerStatus().equals(MerStatusEnum.status1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户状态未处于正常");
}
if (merDetail.getMerType().equals(MerTypeEnum.status3.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户无法申请");
}
// 查询分期渠道配置
BsMerPlatformPeriod platformPeriod = merPlatformPeriodService.getDetailByMer(merDetail.getMerNo(), PlatformPeriodTypeEnum.type1);
if (platformPeriod == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "分期渠道未配置");
}
// 查询零零购地区
LlgRegion llgRegion = llgRegionService.getDataByAreaCode(merDetail.getMerRegion().getAreaCode());
if (llgRegion == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的地区");
}
// 查询MCC编码
BsLklMcc mccData = mccService.getMccByCode(merDetail.getMerMccCode());
if (mccData == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的MCC编码");
}
if (StringUtils.isBlank(mccData.getExt2())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "商户MCC编码不支持开通分期");
}
Map<String,Object> map = new HashMap<>();
if (merDetail.getMerType().equals(MerTypeEnum.status1.getNumber())) {
map.put("mer_type", "1");
} else if (merDetail.getMerType().equals(MerTypeEnum.status2.getNumber())) {
map.put("mer_type", "0");
}
map.put("access_mode", 3);
map.put("company_name", merDetail.getCompanyName());
map.put("merchant_sub_name", merDetail.getMerAbbreviate());
map.put("manager_name", merDetail.getRegName());
map.put("manager_phone", merDetail.getRegPhone());
map.put("manager_email", merDetail.getRegEmail());
map.put("legal_rep_phone", merDetail.getRegPhone());
map.put("province_code", llgRegion.getProvinceCode().toString());
map.put("Province1", llgRegion.getProvinceName());
map.put("city_code", llgRegion.getCityCode().toString());
map.put("city", llgRegion.getCityName());
map.put("district_code", llgRegion.getAreaCode().toString());
map.put("district_name", llgRegion.getAreaName());
map.put("scope", merDetail.getMerIndustry().getChildName());
map.put("mcc", "1005");
// 查询经营地区
LlgRegion bizRegion = llgRegionService.getDataByAreaCode(merDetail.getMerRegion().getAreaCode());
if (bizRegion == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的地区");
}
map.put("biz_province_code", bizRegion.getProvinceCode().toString());
map.put("biz_city_code", bizRegion.getCityCode().toString());
map.put("biz_district_code", bizRegion.getAreaCode().toString());
map.put("biz_address", merDetail.getStoreModel().getAddress());
map.put("service_phone", merDetail.getRegName());
map.put("salesman_name", merDetail.getRegPhone());
map.put("salesman_phone", merDetail.getRegEmail());
/***** 分期配置 ******/
map.put("open_union_pay", 1); // 开通银联分期 1.开通 2.不开通
map.put("union_pay_fee_paid","2"); // 银联贴息方式 1:商户贴息 2:用户贴息 3:商户用户各一半
JSONObject unionpayRate = new JSONObject();
unionpayRate.put("3", "0.12");
unionpayRate.put("6", "0.34");
unionpayRate.put("12", "0.46");
map.put("unionpay_rate", unionpayRate.toString()); // 银联分期费率(1类银行)
map.put("unionpay_rate_1", unionpayRate.toString()); // 银联分期费率(2类银行)
/* map.put("open_hua_bei", 2); // 开通花呗分期 1.开通 2.不开通
map.put("hua_bei_pay_fee_paid", 2); // 花呗贴息方式 1:商户贴息 2:用户贴息*/
/***** 分期配置 ******/
/***** 营业执照 ******/
map.put("address", merDetail.getBlisRegAddress());
map.put("bus_lic_no", merDetail.getBlisNo());
map.put("license_begin_date", merDetail.getBlisPeriodStart().replace("年", "-").replace("月", "-").replace("日", ""));
if (merDetail.getBlisPeriodType().equals(2)) {
map.put("cert_indate", "29991231");
} else {
map.put("cert_indate", merDetail.getBlisPeriodStart().replace("年", "-").replace("月", "-").replace("日", ""));
}
/***** 营业执照 ******/
/***** 法人信息 ******/
map.put("legal_rep", merDetail.getLarName());
map.put("legal_rep_id_card", merDetail.getLarIdCard());
map.put("legal_cert_begin_date", merDetail.getLarIdCardPeriodEnd().replace(".", ""));
if (merDetail.getLarIdCardPeriodType().equals(2)) {
map.put("legal_cert_end_date", "29991231");
} else {
map.put("legal_cert_end_date", merDetail.getLarIdCardPeriodEnd().replace(".", ""));
}
/***** 法人信息 ******/
Map<String,Object> map = new HashMap<>();
if (merDetail.getMerType().equals(MerTypeEnum.status1.getNumber())) {
map.put("mer_type", "1");
} else if (merDetail.getMerType().equals(MerTypeEnum.status2.getNumber())) {
map.put("mer_type", "0");
}
map.put("access_mode", 3); // 接入模式 商户登录:1 二维码扫码:2 接口:3( 三选一)
map.put("company_name", merDetail.getMerName());
map.put("merchant_sub_name", merDetail.getMerAbbreviate());
map.put("manager_name", merDetail.getRegName());
map.put("manager_phone", merDetail.getRegPhone());
map.put("manager_email", merDetail.getRegEmail());
map.put("legal_rep_phone", merDetail.getRegPhone());
/***** 结算信息 ******/
if (merDetail.getMerSettleAcct().getSettleType().equals(MerSettleType.status1.getNumber())) {
map.put("payment_type", 1);
} else {
map.put("payment_type", 2);
}
map.put("settlement_name", merDetail.getMerSettleAcct().getBankCardHolder());
map.put("settlement_acc", merDetail.getMerSettleAcct().getBankCardNo());
map.put("settlement_bank", merDetail.getMerSettleAcct().getOpenningBankName());
map.put("bank_top_code", "303");
map.put("Bank_code", merDetail.getMerSettleAcct().getOpenningBankCode());
map.put("bank_province", merDetail.getMerSettleAcct().getOpenningBankProvinceName());
map.put("bank_city", merDetail.getMerSettleAcct().getOpenningBankCityName());
/***** 结算信息 ******/
/***** 图片资料上传 ******/
// 营业执照
map.put("bus_lic_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getBlisUrl())));
// 法人身份证正面照片
map.put("legal_rep_id_card_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getLarIdCardPortraitImg())));
// 法人身份证背面照片
map.put("legal_rep_id_card_pic_back", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getLarIdCardNationalEmblemImg())));
if (merDetail.getMerSettleAcct().equals(MerSettleType.status1.getNumber())) {
// 开户许可证
map.put("open_lic_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getOpenningBankLicenseUrl())));
// 结算帐户照片
map.put("settlement_acc_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getOpenningBankLicenseUrl())));
} else {
// 开户许可证
map.put("open_lic_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getBankCardImg())));
// 结算帐户照片
map.put("settlement_acc_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getBankCardImg())));
}
map.put("province_code", llgRegion.getProvinceCode().toString());
map.put("Province1", llgRegion.getProvinceName());
map.put("city_code", llgRegion.getCityCode().toString());
map.put("city", llgRegion.getCityName());
map.put("district_code", llgRegion.getAreaCode().toString());
map.put("district_name", llgRegion.getAreaName());
map.put("scope", merDetail.getMerIndustry().getChildName());
map.put("mcc", mccData.getExt2());
// 查询经营地区
LlgRegion bizRegion = llgRegionService.getDataByAreaCode(merDetail.getMerRegion().getAreaCode());
if (bizRegion == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的地区");
}
map.put("biz_province_code", bizRegion.getProvinceCode().toString());
map.put("biz_city_code", bizRegion.getCityCode().toString());
map.put("biz_district_code", bizRegion.getAreaCode().toString());
map.put("biz_address", merDetail.getStoreModel().getAddress());
map.put("service_phone", merDetail.getRegName());
map.put("salesman_name", merDetail.getRegPhone());
map.put("salesman_phone", merDetail.getRegEmail());
/***** 分期配置 ******/
// 银联分期
map.put("open_union_pay", platformPeriod.getOpenUnionpay().equals(true)?1:2); // 开通银联分期 1.开通 2.不开通
if (platformPeriod.getOpenUnionpay().equals(true)) {
map.put("union_pay_fee_paid", platformPeriod.getUnionpayFeePaid()); // 银联贴息方式 1:商户贴息 2:用户贴息 3:商户用户各一半
// 银联分期费率(1类银行)
List<BsMerPlatformPeriodRate> unionpay1RateList = merPlatformPeriodRateService.getList(platformPeriod.getId(), MerPlatformPeriodRateTypeEnum.type1);
JSONObject unionpayRate1 = new JSONObject();
for (BsMerPlatformPeriodRate rate : unionpay1RateList) {
unionpayRate1.put(rate.getPeriodNum()+"", rate.getRate());
}
map.put("unionpay_rate", unionpayRate1.toString()); // 银联分期费率(1类银行)
// 银联分期费率(2类银行)
List<BsMerPlatformPeriodRate> unionpay2RateList = merPlatformPeriodRateService.getList(platformPeriod.getId(), MerPlatformPeriodRateTypeEnum.type2);
JSONObject unionpayRate2 = new JSONObject();
for (BsMerPlatformPeriodRate rate : unionpay2RateList) {
unionpayRate2.put(rate.getPeriodNum()+"", rate.getRate());
}
map.put("unionpay_rate_1", unionpayRate2.toString()); // 银联分期费率(2类银行)
}
// 花呗分期
map.put("open_hua_bei", platformPeriod.getOpenUnionpay().equals(true)?1:2); // 开通银联分期 1.开通 2.不开通
if (platformPeriod.getOpenUnionpay().equals(true)) {
map.put("hua_bei_pay_fee_paid", platformPeriod.getAlipayFeePaid()); // 花呗贴息方式 1:商户贴息 2:用户贴息
// 花呗分期费率
List<BsMerPlatformPeriodRate> unionpay1RateList = merPlatformPeriodRateService.getList(platformPeriod.getId(), MerPlatformPeriodRateTypeEnum.type3);
JSONObject unionpayRate1 = new JSONObject();
for (BsMerPlatformPeriodRate rate : unionpay1RateList) {
unionpayRate1.put(rate.getPeriodNum()+"", rate.getRate());
}
map.put("hb_rate", unionpayRate1.toString()); // 花呗分期费率
}
/***** 分期配置 ******/
/***** 营业执照 ******/
map.put("address", merDetail.getBlisRegAddress());
map.put("bus_lic_no", merDetail.getBlisNo());
map.put("license_begin_date", merDetail.getBlisPeriodStart().replace("年", "-").replace("月", "-").replace("日", ""));
if (merDetail.getBlisPeriodType().equals(2)) {
map.put("cert_indate", "29991231");
} else {
map.put("cert_indate", merDetail.getBlisPeriodStart().replace("年", "-").replace("月", "-").replace("日", ""));
}
/***** 营业执照 ******/
/***** 法人信息 ******/
map.put("legal_rep", merDetail.getLarName());
map.put("legal_rep_id_card", merDetail.getLarIdCard());
map.put("legal_cert_begin_date", merDetail.getLarIdCardPeriodEnd().replace(".", ""));
if (merDetail.getLarIdCardPeriodType().equals(2)) {
map.put("legal_cert_end_date", "29991231");
} else {
map.put("legal_cert_end_date", merDetail.getLarIdCardPeriodEnd().replace(".", ""));
}
/***** 法人信息 ******/
/***** 结算信息 ******/
if (merDetail.getMerSettleAcct().getSettleType().equals(MerSettleType.status1.getNumber())) {
map.put("payment_type", 1);
} else {
map.put("payment_type", 2);
}
map.put("settlement_name", merDetail.getMerSettleAcct().getBankCardHolder());
map.put("settlement_acc", merDetail.getMerSettleAcct().getBankCardNo());
map.put("settlement_bank", merDetail.getMerSettleAcct().getOpenningBankName());
// 经营场所照片
List<String> premisePicList = new ArrayList<>();
premisePicList.add(upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getStoreModel().getCashRegisterImg())));
premisePicList.add(upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getStoreModel().getInternalImg())));
map.put("premise_pic", premisePicList);
String bankName = merDetail.getMerSettleAcct().getBankName();
if (bankName.lastIndexOf("银行") > 0) {
bankName = bankName.substring(0, bankName.lastIndexOf("银行"));
}
// 查询零零购银行编码
LlgBankCode banTopCode = llgBankCodeService.getDetail(bankName);
if (banTopCode == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未匹配到结算银行code");
}
map.put("bank_top_code", banTopCode.getBankCode()+"");
map.put("Bank_code", merDetail.getMerSettleAcct().getOpenningBankCode());
map.put("bank_province", merDetail.getMerSettleAcct().getOpenningBankProvinceName());
map.put("bank_city", merDetail.getMerSettleAcct().getOpenningBankCityName());
/***** 结算信息 ******/
// 协议照片
map.put("agreement_pics", premisePicList);
/***** 图片资料上传 ******/
/***** 图片资料上传 ******/
// 营业执照
map.put("bus_lic_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getBlisUrl())));
// 法人身份证正面照片
map.put("legal_rep_id_card_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getLarIdCardPortraitImg())));
// 法人身份证背面照片
map.put("legal_rep_id_card_pic_back", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getLarIdCardNationalEmblemImg())));
System.out.println("请求:" + JSONObject.toJSONString(map));
String responseData = HttpsUtils.doLLGPost(LLGConfig.requestUrl + "/v3/openapi/sign/apply", AesUtil.aesEncrypt(LLGConfig.key, JSONObject.toJSONString(map)));
return JSONObject.parseObject(AesUtil.aesDecrypt(LLGConfig.key, responseData), Map.class);
if (merDetail.getMerSettleAcct().getSettleType().equals(MerSettleType.status1.getNumber())) {
// 开户许可证
map.put("open_lic_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getOpenningBankLicenseUrl())));
// 结算帐户照片
map.put("settlement_acc_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getOpenningBankLicenseUrl())));
} else {
// 开户许可证
map.put("open_lic_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getBankCardImg())));
// 结算帐户照片
map.put("settlement_acc_pic", upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getMerSettleAcct().getBankCardImg())));
}
// 经营场所照片
List<String> premisePicList = new ArrayList<>();
premisePicList.add(upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getStoreModel().getCashRegisterImg())));
premisePicList.add(upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + merDetail.getStoreModel().getInternalImg())));
map.put("premise_pic", premisePicList);
// 协议照片
List<String> agreementPicsList = new ArrayList<>();
for (String agreementPics : platformPeriod.getAgreementPics().split(",")) {
agreementPicsList.add(upload(new File(CommonSysConst.getSysConfig().getFile_url() + "/" + agreementPics)));
}
map.put("agreement_pics", agreementPicsList);
/***** 图片资料上传 ******/
map.put("result_call_back", CommonSysConst.getSysConfig().getDomainName()+"/crest/llgNotify/merApply");
System.out.println("请求:" + JSONObject.toJSONString(map));
String responseStr = HttpsUtils.doLLGPost(LLGConfig.requestUrl + "/v3/openapi/sign/apply"+(StringUtils.isNotBlank(platformPeriod.getPlatformNo())?"/"+platformPeriod.getPlatformNo():""), AesUtil.aesEncrypt(LLGConfig.key, JSONObject.toJSONString(map)));
JSONObject responseData = JSONObject.parseObject(AesUtil.aesDecrypt(LLGConfig.key, responseStr));
if (responseData.getJSONObject("status").getString("code").equals("2000")) {
platformPeriod.setStatus(PlatformPeriodStatusEnum.status2.getNumber());
platformPeriod.setPlatformNo(responseData.getJSONObject("data").getString("id"));
merPlatformPeriodService.editData(platformPeriod);
} else {
platformPeriod.setStatus(PlatformPeriodStatusEnum.status3.getNumber());
platformPeriod.setSuggestionReject(responseData.getJSONObject("status").getString("msg"));
merPlatformPeriodService.editData(platformPeriod);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseData.getJSONObject("status").getString("msg"));
}
} catch (BaseException e) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getErrorMsg());
} catch (Exception e) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知错误");
}
return null;
/**
* {
* "data": {
@ -222,14 +294,27 @@ public class LLGMerService {
* @return
* @throws Exception
*/
public Map<String,Object> merDetail(Long merId) throws Exception {
public JSONObject merDetail(Long merId) throws Exception {
// 商户详情
MerBasisModel merDetail = merService.getMerDetail(merId);
if (merDetail == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户");
}
String responseData = HttpsUtils.doLLGGet(LLGConfig.requestUrl + "/v3/openapi/sign/apply/" + "3876");
return JSONObject.parseObject(AesUtil.aesDecrypt(LLGConfig.key, responseData), Map.class);
// 查询分期渠道配置
BsMerPlatformPeriod platformPeriod = merPlatformPeriodService.getDetailByMer(merDetail.getMerNo(), PlatformPeriodTypeEnum.type1);
if (platformPeriod == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "分期渠道未配置");
}
if (StringUtils.isBlank(platformPeriod.getPlatformNo())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "分期渠道未申请");
}
String responseStr = HttpsUtils.doLLGGet(LLGConfig.requestUrl + "/v3/openapi/sign/apply/" + platformPeriod.getPlatformNo());
JSONObject responseData = JSONObject.parseObject(AesUtil.aesDecrypt(LLGConfig.key, responseStr));
if (responseData.getJSONObject("status").getString("code").equals("2000")) {
return responseData.getJSONObject("data");
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseData.getJSONObject("status").getString("msg"));
}
}
/**

File diff suppressed because one or more lines are too long

@ -57,10 +57,10 @@ public interface BsMerMapper extends BsMerMapperExt {
"lar_id_card_national_emblem_img, lar_id_card_address, ",
"lar_id_card_period_type, lar_id_card_period_start, ",
"lar_id_card_period_end, complete_status, ",
"mer_status, create_salesman_id, ",
"create_salesman_name, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"mer_status, period_status, ",
"create_salesman_id, create_salesman_name, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{orgNo,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR}, ",
"#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ",
"#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ",
@ -79,10 +79,10 @@ public interface BsMerMapper extends BsMerMapperExt {
"#{larIdCardNationalEmblemImg,jdbcType=VARCHAR}, #{larIdCardAddress,jdbcType=VARCHAR}, ",
"#{larIdCardPeriodType,jdbcType=INTEGER}, #{larIdCardPeriodStart,jdbcType=VARCHAR}, ",
"#{larIdCardPeriodEnd,jdbcType=VARCHAR}, #{completeStatus,jdbcType=INTEGER}, ",
"#{merStatus,jdbcType=INTEGER}, #{createSalesmanId,jdbcType=BIGINT}, ",
"#{createSalesmanName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{merStatus,jdbcType=INTEGER}, #{periodStatus,jdbcType=BIT}, ",
"#{createSalesmanId,jdbcType=BIGINT}, #{createSalesmanName,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMer record);
@ -131,6 +131,7 @@ public interface BsMerMapper extends BsMerMapperExt {
@Result(column="lar_id_card_period_end", property="larIdCardPeriodEnd", jdbcType=JdbcType.VARCHAR),
@Result(column="complete_status", property="completeStatus", jdbcType=JdbcType.INTEGER),
@Result(column="mer_status", property="merStatus", jdbcType=JdbcType.INTEGER),
@Result(column="period_status", property="periodStatus", jdbcType=JdbcType.BIT),
@Result(column="create_salesman_id", property="createSalesmanId", jdbcType=JdbcType.BIGINT),
@Result(column="create_salesman_name", property="createSalesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -149,8 +150,8 @@ public interface BsMerMapper extends BsMerMapperExt {
"blis_url, blis_name, blis_no, blis_reg_address, blis_period_type, blis_period_start, ",
"blis_period_end, lar_name, lar_id_card, lar_id_card_portrait_img, lar_id_card_national_emblem_img, ",
"lar_id_card_address, lar_id_card_period_type, lar_id_card_period_start, lar_id_card_period_end, ",
"complete_status, mer_status, create_salesman_id, create_salesman_name, create_time, ",
"update_time, ext_1, ext_2, ext_3",
"complete_status, mer_status, period_status, create_salesman_id, create_salesman_name, ",
"create_time, update_time, ext_1, ext_2, ext_3",
"from bs_mer",
"where id = #{id,jdbcType=BIGINT}"
})
@ -193,6 +194,7 @@ public interface BsMerMapper extends BsMerMapperExt {
@Result(column="lar_id_card_period_end", property="larIdCardPeriodEnd", jdbcType=JdbcType.VARCHAR),
@Result(column="complete_status", property="completeStatus", jdbcType=JdbcType.INTEGER),
@Result(column="mer_status", property="merStatus", jdbcType=JdbcType.INTEGER),
@Result(column="period_status", property="periodStatus", jdbcType=JdbcType.BIT),
@Result(column="create_salesman_id", property="createSalesmanId", jdbcType=JdbcType.BIGINT),
@Result(column="create_salesman_name", property="createSalesmanName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -251,6 +253,7 @@ public interface BsMerMapper extends BsMerMapperExt {
"lar_id_card_period_end = #{larIdCardPeriodEnd,jdbcType=VARCHAR},",
"complete_status = #{completeStatus,jdbcType=INTEGER},",
"mer_status = #{merStatus,jdbcType=INTEGER},",
"period_status = #{periodStatus,jdbcType=BIT},",
"create_salesman_id = #{createSalesmanId,jdbcType=BIGINT},",
"create_salesman_name = #{createSalesmanName,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -41,22 +41,20 @@ public interface BsMerPlatformPeriodMapper extends BsMerPlatformPeriodMapperExt
@Insert({
"insert into bs_mer_platform_period (company_id, agent_id, ",
"mer_id, mer_no, platform_type, ",
"platform_no, platform_market_id, ",
"platform_pkg_id, open_unionpay, ",
"platform_no, open_unionpay, ",
"unionpay_fee_paid, open_alipay, ",
"alipay_fee_paid, `status`, ",
"suggestion_reject, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"alipay_fee_paid, agreement_pics, ",
"`status`, suggestion_reject, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, #{platformType,jdbcType=INTEGER}, ",
"#{platformNo,jdbcType=VARCHAR}, #{platformMarketId,jdbcType=BIGINT}, ",
"#{platformPkgId,jdbcType=BIGINT}, #{openUnionpay,jdbcType=BIT}, ",
"#{platformNo,jdbcType=VARCHAR}, #{openUnionpay,jdbcType=BIT}, ",
"#{unionpayFeePaid,jdbcType=VARCHAR}, #{openAlipay,jdbcType=BIT}, ",
"#{alipayFeePaid,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, ",
"#{suggestionReject,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{alipayFeePaid,jdbcType=INTEGER}, #{agreementPics,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{suggestionReject,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerPlatformPeriod record);
@ -74,12 +72,11 @@ public interface BsMerPlatformPeriodMapper extends BsMerPlatformPeriodMapperExt
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_market_id", property="platformMarketId", jdbcType=JdbcType.BIGINT),
@Result(column="platform_pkg_id", property="platformPkgId", jdbcType=JdbcType.BIGINT),
@Result(column="open_unionpay", property="openUnionpay", jdbcType=JdbcType.BIT),
@Result(column="unionpay_fee_paid", property="unionpayFeePaid", jdbcType=JdbcType.VARCHAR),
@Result(column="open_alipay", property="openAlipay", jdbcType=JdbcType.BIT),
@Result(column="alipay_fee_paid", property="alipayFeePaid", jdbcType=JdbcType.INTEGER),
@Result(column="agreement_pics", property="agreementPics", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="suggestion_reject", property="suggestionReject", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -92,9 +89,9 @@ public interface BsMerPlatformPeriodMapper extends BsMerPlatformPeriodMapperExt
@Select({
"select",
"id, company_id, agent_id, mer_id, mer_no, platform_type, platform_no, platform_market_id, ",
"platform_pkg_id, open_unionpay, unionpay_fee_paid, open_alipay, alipay_fee_paid, ",
"`status`, suggestion_reject, create_time, update_time, ext_1, ext_2, ext_3",
"id, company_id, agent_id, mer_id, mer_no, platform_type, platform_no, open_unionpay, ",
"unionpay_fee_paid, open_alipay, alipay_fee_paid, agreement_pics, `status`, suggestion_reject, ",
"create_time, update_time, ext_1, ext_2, ext_3",
"from bs_mer_platform_period",
"where id = #{id,jdbcType=BIGINT}"
})
@ -106,12 +103,11 @@ public interface BsMerPlatformPeriodMapper extends BsMerPlatformPeriodMapperExt
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_market_id", property="platformMarketId", jdbcType=JdbcType.BIGINT),
@Result(column="platform_pkg_id", property="platformPkgId", jdbcType=JdbcType.BIGINT),
@Result(column="open_unionpay", property="openUnionpay", jdbcType=JdbcType.BIT),
@Result(column="unionpay_fee_paid", property="unionpayFeePaid", jdbcType=JdbcType.VARCHAR),
@Result(column="open_alipay", property="openAlipay", jdbcType=JdbcType.BIT),
@Result(column="alipay_fee_paid", property="alipayFeePaid", jdbcType=JdbcType.INTEGER),
@Result(column="agreement_pics", property="agreementPics", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="suggestion_reject", property="suggestionReject", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -139,12 +135,11 @@ public interface BsMerPlatformPeriodMapper extends BsMerPlatformPeriodMapperExt
"mer_no = #{merNo,jdbcType=VARCHAR},",
"platform_type = #{platformType,jdbcType=INTEGER},",
"platform_no = #{platformNo,jdbcType=VARCHAR},",
"platform_market_id = #{platformMarketId,jdbcType=BIGINT},",
"platform_pkg_id = #{platformPkgId,jdbcType=BIGINT},",
"open_unionpay = #{openUnionpay,jdbcType=BIT},",
"unionpay_fee_paid = #{unionpayFeePaid,jdbcType=VARCHAR},",
"open_alipay = #{openAlipay,jdbcType=BIT},",
"alipay_fee_paid = #{alipayFeePaid,jdbcType=INTEGER},",
"agreement_pics = #{agreementPics,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"suggestion_reject = #{suggestionReject,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -0,0 +1,142 @@
package com.hfkj.dao;
import com.hfkj.entity.BsMerPlatformPeriodPaid;
import com.hfkj.entity.BsMerPlatformPeriodPaidExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface BsMerPlatformPeriodPaidMapper extends BsMerPlatformPeriodPaidMapperExt {
@SelectProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="countByExample")
long countByExample(BsMerPlatformPeriodPaidExample example);
@DeleteProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="deleteByExample")
int deleteByExample(BsMerPlatformPeriodPaidExample example);
@Delete({
"delete from bs_mer_platform_period_paid",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_mer_platform_period_paid (platform_period_id, mer_id, ",
"mer_no, pay_type, ",
"platform_type, platform_no, ",
"platform_fee_paid, platform_market_id, ",
"platform_pkg_id, current_settle, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{platformPeriodId,jdbcType=BIGINT}, #{merId,jdbcType=BIGINT}, ",
"#{merNo,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER}, ",
"#{platformType,jdbcType=INTEGER}, #{platformNo,jdbcType=VARCHAR}, ",
"#{platformFeePaid,jdbcType=INTEGER}, #{platformMarketId,jdbcType=VARCHAR}, ",
"#{platformPkgId,jdbcType=VARCHAR}, #{currentSettle,jdbcType=BIT}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerPlatformPeriodPaid record);
@InsertProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsMerPlatformPeriodPaid record);
@SelectProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform_period_id", property="platformPeriodId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_fee_paid", property="platformFeePaid", jdbcType=JdbcType.INTEGER),
@Result(column="platform_market_id", property="platformMarketId", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_pkg_id", property="platformPkgId", jdbcType=JdbcType.VARCHAR),
@Result(column="current_settle", property="currentSettle", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<BsMerPlatformPeriodPaid> selectByExample(BsMerPlatformPeriodPaidExample example);
@Select({
"select",
"id, platform_period_id, mer_id, mer_no, pay_type, platform_type, platform_no, ",
"platform_fee_paid, platform_market_id, platform_pkg_id, current_settle, create_time, ",
"update_time, ext_1, ext_2, ext_3",
"from bs_mer_platform_period_paid",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform_period_id", property="platformPeriodId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_fee_paid", property="platformFeePaid", jdbcType=JdbcType.INTEGER),
@Result(column="platform_market_id", property="platformMarketId", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_pkg_id", property="platformPkgId", jdbcType=JdbcType.VARCHAR),
@Result(column="current_settle", property="currentSettle", jdbcType=JdbcType.BIT),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
BsMerPlatformPeriodPaid selectByPrimaryKey(Long id);
@UpdateProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsMerPlatformPeriodPaid record, @Param("example") BsMerPlatformPeriodPaidExample example);
@UpdateProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsMerPlatformPeriodPaid record, @Param("example") BsMerPlatformPeriodPaidExample example);
@UpdateProvider(type=BsMerPlatformPeriodPaidSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsMerPlatformPeriodPaid record);
@Update({
"update bs_mer_platform_period_paid",
"set platform_period_id = #{platformPeriodId,jdbcType=BIGINT},",
"mer_id = #{merId,jdbcType=BIGINT},",
"mer_no = #{merNo,jdbcType=VARCHAR},",
"pay_type = #{payType,jdbcType=INTEGER},",
"platform_type = #{platformType,jdbcType=INTEGER},",
"platform_no = #{platformNo,jdbcType=VARCHAR},",
"platform_fee_paid = #{platformFeePaid,jdbcType=INTEGER},",
"platform_market_id = #{platformMarketId,jdbcType=VARCHAR},",
"platform_pkg_id = #{platformPkgId,jdbcType=VARCHAR},",
"current_settle = #{currentSettle,jdbcType=BIT},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsMerPlatformPeriodPaid record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface BsMerPlatformPeriodPaidMapperExt {
}

@ -0,0 +1,388 @@
package com.hfkj.dao;
import com.hfkj.entity.BsMerPlatformPeriodPaid;
import com.hfkj.entity.BsMerPlatformPeriodPaidExample.Criteria;
import com.hfkj.entity.BsMerPlatformPeriodPaidExample.Criterion;
import com.hfkj.entity.BsMerPlatformPeriodPaidExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsMerPlatformPeriodPaidSqlProvider {
public String countByExample(BsMerPlatformPeriodPaidExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_mer_platform_period_paid");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsMerPlatformPeriodPaidExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_mer_platform_period_paid");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsMerPlatformPeriodPaid record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_mer_platform_period_paid");
if (record.getPlatformPeriodId() != null) {
sql.VALUES("platform_period_id", "#{platformPeriodId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}");
}
if (record.getPayType() != null) {
sql.VALUES("pay_type", "#{payType,jdbcType=INTEGER}");
}
if (record.getPlatformType() != null) {
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.VALUES("platform_no", "#{platformNo,jdbcType=VARCHAR}");
}
if (record.getPlatformFeePaid() != null) {
sql.VALUES("platform_fee_paid", "#{platformFeePaid,jdbcType=INTEGER}");
}
if (record.getPlatformMarketId() != null) {
sql.VALUES("platform_market_id", "#{platformMarketId,jdbcType=VARCHAR}");
}
if (record.getPlatformPkgId() != null) {
sql.VALUES("platform_pkg_id", "#{platformPkgId,jdbcType=VARCHAR}");
}
if (record.getCurrentSettle() != null) {
sql.VALUES("current_settle", "#{currentSettle,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(BsMerPlatformPeriodPaidExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("platform_period_id");
sql.SELECT("mer_id");
sql.SELECT("mer_no");
sql.SELECT("pay_type");
sql.SELECT("platform_type");
sql.SELECT("platform_no");
sql.SELECT("platform_fee_paid");
sql.SELECT("platform_market_id");
sql.SELECT("platform_pkg_id");
sql.SELECT("current_settle");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_mer_platform_period_paid");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
BsMerPlatformPeriodPaid record = (BsMerPlatformPeriodPaid) parameter.get("record");
BsMerPlatformPeriodPaidExample example = (BsMerPlatformPeriodPaidExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_mer_platform_period_paid");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getPlatformPeriodId() != null) {
sql.SET("platform_period_id = #{record.platformPeriodId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
}
if (record.getPayType() != null) {
sql.SET("pay_type = #{record.payType,jdbcType=INTEGER}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
}
if (record.getPlatformFeePaid() != null) {
sql.SET("platform_fee_paid = #{record.platformFeePaid,jdbcType=INTEGER}");
}
if (record.getPlatformMarketId() != null) {
sql.SET("platform_market_id = #{record.platformMarketId,jdbcType=VARCHAR}");
}
if (record.getPlatformPkgId() != null) {
sql.SET("platform_pkg_id = #{record.platformPkgId,jdbcType=VARCHAR}");
}
if (record.getCurrentSettle() != null) {
sql.SET("current_settle = #{record.currentSettle,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_platform_period_paid");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("platform_period_id = #{record.platformPeriodId,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("pay_type = #{record.payType,jdbcType=INTEGER}");
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
sql.SET("platform_fee_paid = #{record.platformFeePaid,jdbcType=INTEGER}");
sql.SET("platform_market_id = #{record.platformMarketId,jdbcType=VARCHAR}");
sql.SET("platform_pkg_id = #{record.platformPkgId,jdbcType=VARCHAR}");
sql.SET("current_settle = #{record.currentSettle,jdbcType=BIT}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
BsMerPlatformPeriodPaidExample example = (BsMerPlatformPeriodPaidExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsMerPlatformPeriodPaid record) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_platform_period_paid");
if (record.getPlatformPeriodId() != null) {
sql.SET("platform_period_id = #{platformPeriodId,jdbcType=BIGINT}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getMerNo() != null) {
sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}");
}
if (record.getPayType() != null) {
sql.SET("pay_type = #{payType,jdbcType=INTEGER}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformNo() != null) {
sql.SET("platform_no = #{platformNo,jdbcType=VARCHAR}");
}
if (record.getPlatformFeePaid() != null) {
sql.SET("platform_fee_paid = #{platformFeePaid,jdbcType=INTEGER}");
}
if (record.getPlatformMarketId() != null) {
sql.SET("platform_market_id = #{platformMarketId,jdbcType=VARCHAR}");
}
if (record.getPlatformPkgId() != null) {
sql.SET("platform_pkg_id = #{platformPkgId,jdbcType=VARCHAR}");
}
if (record.getCurrentSettle() != null) {
sql.SET("current_settle = #{currentSettle,jdbcType=BIT}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsMerPlatformPeriodPaidExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -39,14 +39,14 @@ public interface BsMerPlatformPeriodRateMapper extends BsMerPlatformPeriodRateMa
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_mer_platform_period_rate (platform_period_id, period_num, ",
"rate, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values (#{platformPeriodId,jdbcType=BIGINT}, #{periodNum,jdbcType=INTEGER}, ",
"#{rate,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"insert into bs_mer_platform_period_rate (platform_period_id, period_rate_type, ",
"period_num, rate, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{platformPeriodId,jdbcType=BIGINT}, #{periodRateType,jdbcType=INTEGER}, ",
"#{periodNum,jdbcType=INTEGER}, #{rate,jdbcType=DECIMAL}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerPlatformPeriodRate record);
@ -59,6 +59,7 @@ public interface BsMerPlatformPeriodRateMapper extends BsMerPlatformPeriodRateMa
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform_period_id", property="platformPeriodId", jdbcType=JdbcType.BIGINT),
@Result(column="period_rate_type", property="periodRateType", jdbcType=JdbcType.INTEGER),
@Result(column="period_num", property="periodNum", jdbcType=JdbcType.INTEGER),
@Result(column="rate", property="rate", jdbcType=JdbcType.DECIMAL),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -71,14 +72,15 @@ public interface BsMerPlatformPeriodRateMapper extends BsMerPlatformPeriodRateMa
@Select({
"select",
"id, platform_period_id, period_num, rate, create_time, update_time, ext_1, ext_2, ",
"ext_3",
"id, platform_period_id, period_rate_type, period_num, rate, create_time, update_time, ",
"ext_1, ext_2, ext_3",
"from bs_mer_platform_period_rate",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="platform_period_id", property="platformPeriodId", jdbcType=JdbcType.BIGINT),
@Result(column="period_rate_type", property="periodRateType", jdbcType=JdbcType.INTEGER),
@Result(column="period_num", property="periodNum", jdbcType=JdbcType.INTEGER),
@Result(column="rate", property="rate", jdbcType=JdbcType.DECIMAL),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -101,6 +103,7 @@ public interface BsMerPlatformPeriodRateMapper extends BsMerPlatformPeriodRateMa
@Update({
"update bs_mer_platform_period_rate",
"set platform_period_id = #{platformPeriodId,jdbcType=BIGINT},",
"period_rate_type = #{periodRateType,jdbcType=INTEGER},",
"period_num = #{periodNum,jdbcType=INTEGER},",
"rate = #{rate,jdbcType=DECIMAL},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -32,6 +32,10 @@ public class BsMerPlatformPeriodRateSqlProvider {
sql.VALUES("platform_period_id", "#{platformPeriodId,jdbcType=BIGINT}");
}
if (record.getPeriodRateType() != null) {
sql.VALUES("period_rate_type", "#{periodRateType,jdbcType=INTEGER}");
}
if (record.getPeriodNum() != null) {
sql.VALUES("period_num", "#{periodNum,jdbcType=INTEGER}");
}
@ -71,6 +75,7 @@ public class BsMerPlatformPeriodRateSqlProvider {
sql.SELECT("id");
}
sql.SELECT("platform_period_id");
sql.SELECT("period_rate_type");
sql.SELECT("period_num");
sql.SELECT("rate");
sql.SELECT("create_time");
@ -103,6 +108,10 @@ public class BsMerPlatformPeriodRateSqlProvider {
sql.SET("platform_period_id = #{record.platformPeriodId,jdbcType=BIGINT}");
}
if (record.getPeriodRateType() != null) {
sql.SET("period_rate_type = #{record.periodRateType,jdbcType=INTEGER}");
}
if (record.getPeriodNum() != null) {
sql.SET("period_num = #{record.periodNum,jdbcType=INTEGER}");
}
@ -141,6 +150,7 @@ public class BsMerPlatformPeriodRateSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("platform_period_id = #{record.platformPeriodId,jdbcType=BIGINT}");
sql.SET("period_rate_type = #{record.periodRateType,jdbcType=INTEGER}");
sql.SET("period_num = #{record.periodNum,jdbcType=INTEGER}");
sql.SET("rate = #{record.rate,jdbcType=DECIMAL}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -162,6 +172,10 @@ public class BsMerPlatformPeriodRateSqlProvider {
sql.SET("platform_period_id = #{platformPeriodId,jdbcType=BIGINT}");
}
if (record.getPeriodRateType() != null) {
sql.SET("period_rate_type = #{periodRateType,jdbcType=INTEGER}");
}
if (record.getPeriodNum() != null) {
sql.SET("period_num = #{periodNum,jdbcType=INTEGER}");
}

@ -52,14 +52,6 @@ public class BsMerPlatformPeriodSqlProvider {
sql.VALUES("platform_no", "#{platformNo,jdbcType=VARCHAR}");
}
if (record.getPlatformMarketId() != null) {
sql.VALUES("platform_market_id", "#{platformMarketId,jdbcType=BIGINT}");
}
if (record.getPlatformPkgId() != null) {
sql.VALUES("platform_pkg_id", "#{platformPkgId,jdbcType=BIGINT}");
}
if (record.getOpenUnionpay() != null) {
sql.VALUES("open_unionpay", "#{openUnionpay,jdbcType=BIT}");
}
@ -76,6 +68,10 @@ public class BsMerPlatformPeriodSqlProvider {
sql.VALUES("alipay_fee_paid", "#{alipayFeePaid,jdbcType=INTEGER}");
}
if (record.getAgreementPics() != null) {
sql.VALUES("agreement_pics", "#{agreementPics,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
@ -120,12 +116,11 @@ public class BsMerPlatformPeriodSqlProvider {
sql.SELECT("mer_no");
sql.SELECT("platform_type");
sql.SELECT("platform_no");
sql.SELECT("platform_market_id");
sql.SELECT("platform_pkg_id");
sql.SELECT("open_unionpay");
sql.SELECT("unionpay_fee_paid");
sql.SELECT("open_alipay");
sql.SELECT("alipay_fee_paid");
sql.SELECT("agreement_pics");
sql.SELECT("`status`");
sql.SELECT("suggestion_reject");
sql.SELECT("create_time");
@ -178,14 +173,6 @@ public class BsMerPlatformPeriodSqlProvider {
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
}
if (record.getPlatformMarketId() != null) {
sql.SET("platform_market_id = #{record.platformMarketId,jdbcType=BIGINT}");
}
if (record.getPlatformPkgId() != null) {
sql.SET("platform_pkg_id = #{record.platformPkgId,jdbcType=BIGINT}");
}
if (record.getOpenUnionpay() != null) {
sql.SET("open_unionpay = #{record.openUnionpay,jdbcType=BIT}");
}
@ -202,6 +189,10 @@ public class BsMerPlatformPeriodSqlProvider {
sql.SET("alipay_fee_paid = #{record.alipayFeePaid,jdbcType=INTEGER}");
}
if (record.getAgreementPics() != null) {
sql.SET("agreement_pics = #{record.agreementPics,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
@ -245,12 +236,11 @@ public class BsMerPlatformPeriodSqlProvider {
sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}");
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}");
sql.SET("platform_market_id = #{record.platformMarketId,jdbcType=BIGINT}");
sql.SET("platform_pkg_id = #{record.platformPkgId,jdbcType=BIGINT}");
sql.SET("open_unionpay = #{record.openUnionpay,jdbcType=BIT}");
sql.SET("unionpay_fee_paid = #{record.unionpayFeePaid,jdbcType=VARCHAR}");
sql.SET("open_alipay = #{record.openAlipay,jdbcType=BIT}");
sql.SET("alipay_fee_paid = #{record.alipayFeePaid,jdbcType=INTEGER}");
sql.SET("agreement_pics = #{record.agreementPics,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("suggestion_reject = #{record.suggestionReject,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -292,14 +282,6 @@ public class BsMerPlatformPeriodSqlProvider {
sql.SET("platform_no = #{platformNo,jdbcType=VARCHAR}");
}
if (record.getPlatformMarketId() != null) {
sql.SET("platform_market_id = #{platformMarketId,jdbcType=BIGINT}");
}
if (record.getPlatformPkgId() != null) {
sql.SET("platform_pkg_id = #{platformPkgId,jdbcType=BIGINT}");
}
if (record.getOpenUnionpay() != null) {
sql.SET("open_unionpay = #{openUnionpay,jdbcType=BIT}");
}
@ -316,6 +298,10 @@ public class BsMerPlatformPeriodSqlProvider {
sql.SET("alipay_fee_paid = #{alipayFeePaid,jdbcType=INTEGER}");
}
if (record.getAgreementPics() != null) {
sql.SET("agreement_pics = #{agreementPics,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}

@ -176,6 +176,10 @@ public class BsMerSqlProvider {
sql.VALUES("mer_status", "#{merStatus,jdbcType=INTEGER}");
}
if (record.getPeriodStatus() != null) {
sql.VALUES("period_status", "#{periodStatus,jdbcType=BIT}");
}
if (record.getCreateSalesmanId() != null) {
sql.VALUES("create_salesman_id", "#{createSalesmanId,jdbcType=BIGINT}");
}
@ -251,6 +255,7 @@ public class BsMerSqlProvider {
sql.SELECT("lar_id_card_period_end");
sql.SELECT("complete_status");
sql.SELECT("mer_status");
sql.SELECT("period_status");
sql.SELECT("create_salesman_id");
sql.SELECT("create_salesman_name");
sql.SELECT("create_time");
@ -427,6 +432,10 @@ public class BsMerSqlProvider {
sql.SET("mer_status = #{record.merStatus,jdbcType=INTEGER}");
}
if (record.getPeriodStatus() != null) {
sql.SET("period_status = #{record.periodStatus,jdbcType=BIT}");
}
if (record.getCreateSalesmanId() != null) {
sql.SET("create_salesman_id = #{record.createSalesmanId,jdbcType=BIGINT}");
}
@ -501,6 +510,7 @@ public class BsMerSqlProvider {
sql.SET("lar_id_card_period_end = #{record.larIdCardPeriodEnd,jdbcType=VARCHAR}");
sql.SET("complete_status = #{record.completeStatus,jdbcType=INTEGER}");
sql.SET("mer_status = #{record.merStatus,jdbcType=INTEGER}");
sql.SET("period_status = #{record.periodStatus,jdbcType=BIT}");
sql.SET("create_salesman_id = #{record.createSalesmanId,jdbcType=BIGINT}");
sql.SET("create_salesman_name = #{record.createSalesmanName,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -666,6 +676,10 @@ public class BsMerSqlProvider {
sql.SET("mer_status = #{merStatus,jdbcType=INTEGER}");
}
if (record.getPeriodStatus() != null) {
sql.SET("period_status = #{periodStatus,jdbcType=BIT}");
}
if (record.getCreateSalesmanId() != null) {
sql.SET("create_salesman_id = #{createSalesmanId,jdbcType=BIGINT}");
}

@ -0,0 +1,100 @@
package com.hfkj.dao;
import com.hfkj.entity.LlgBankCode;
import com.hfkj.entity.LlgBankCodeExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface LlgBankCodeMapper extends LlgBankCodeMapperExt {
@SelectProvider(type=LlgBankCodeSqlProvider.class, method="countByExample")
long countByExample(LlgBankCodeExample example);
@DeleteProvider(type=LlgBankCodeSqlProvider.class, method="deleteByExample")
int deleteByExample(LlgBankCodeExample example);
@Delete({
"delete from llg_bank_code",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into llg_bank_code (bank_code, bank_name, ",
"ext_1, ext_2, ext_3)",
"values (#{bankCode,jdbcType=BIGINT}, #{bankName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(LlgBankCode record);
@InsertProvider(type=LlgBankCodeSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(LlgBankCode record);
@SelectProvider(type=LlgBankCodeSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="bank_code", property="bankCode", jdbcType=JdbcType.BIGINT),
@Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<LlgBankCode> selectByExample(LlgBankCodeExample example);
@Select({
"select",
"id, bank_code, bank_name, ext_1, ext_2, ext_3",
"from llg_bank_code",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="bank_code", property="bankCode", jdbcType=JdbcType.BIGINT),
@Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
LlgBankCode selectByPrimaryKey(Long id);
@UpdateProvider(type=LlgBankCodeSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") LlgBankCode record, @Param("example") LlgBankCodeExample example);
@UpdateProvider(type=LlgBankCodeSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") LlgBankCode record, @Param("example") LlgBankCodeExample example);
@UpdateProvider(type=LlgBankCodeSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(LlgBankCode record);
@Update({
"update llg_bank_code",
"set bank_code = #{bankCode,jdbcType=BIGINT},",
"bank_name = #{bankName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(LlgBankCode record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface LlgBankCodeMapperExt {
}

@ -0,0 +1,248 @@
package com.hfkj.dao;
import com.hfkj.entity.LlgBankCode;
import com.hfkj.entity.LlgBankCodeExample.Criteria;
import com.hfkj.entity.LlgBankCodeExample.Criterion;
import com.hfkj.entity.LlgBankCodeExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class LlgBankCodeSqlProvider {
public String countByExample(LlgBankCodeExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("llg_bank_code");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(LlgBankCodeExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("llg_bank_code");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(LlgBankCode record) {
SQL sql = new SQL();
sql.INSERT_INTO("llg_bank_code");
if (record.getBankCode() != null) {
sql.VALUES("bank_code", "#{bankCode,jdbcType=BIGINT}");
}
if (record.getBankName() != null) {
sql.VALUES("bank_name", "#{bankName,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(LlgBankCodeExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("bank_code");
sql.SELECT("bank_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("llg_bank_code");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
LlgBankCode record = (LlgBankCode) parameter.get("record");
LlgBankCodeExample example = (LlgBankCodeExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("llg_bank_code");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getBankCode() != null) {
sql.SET("bank_code = #{record.bankCode,jdbcType=BIGINT}");
}
if (record.getBankName() != null) {
sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("llg_bank_code");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("bank_code = #{record.bankCode,jdbcType=BIGINT}");
sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
LlgBankCodeExample example = (LlgBankCodeExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(LlgBankCode record) {
SQL sql = new SQL();
sql.UPDATE("llg_bank_code");
if (record.getBankCode() != null) {
sql.SET("bank_code = #{bankCode,jdbcType=BIGINT}");
}
if (record.getBankName() != null) {
sql.SET("bank_name = #{bankName,jdbcType=VARCHAR}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, LlgBankCodeExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -203,6 +203,11 @@ public class BsMer implements Serializable {
*/
private Integer merStatus;
/**
* 开通分期状态 0未开通 1已开通
*/
private Boolean periodStatus;
/**
* 创建业务员id
*/
@ -535,6 +540,14 @@ public class BsMer implements Serializable {
this.merStatus = merStatus;
}
public Boolean getPeriodStatus() {
return periodStatus;
}
public void setPeriodStatus(Boolean periodStatus) {
this.periodStatus = periodStatus;
}
public Long getCreateSalesmanId() {
return createSalesmanId;
}
@ -641,6 +654,7 @@ public class BsMer implements Serializable {
&& (this.getLarIdCardPeriodEnd() == null ? other.getLarIdCardPeriodEnd() == null : this.getLarIdCardPeriodEnd().equals(other.getLarIdCardPeriodEnd()))
&& (this.getCompleteStatus() == null ? other.getCompleteStatus() == null : this.getCompleteStatus().equals(other.getCompleteStatus()))
&& (this.getMerStatus() == null ? other.getMerStatus() == null : this.getMerStatus().equals(other.getMerStatus()))
&& (this.getPeriodStatus() == null ? other.getPeriodStatus() == null : this.getPeriodStatus().equals(other.getPeriodStatus()))
&& (this.getCreateSalesmanId() == null ? other.getCreateSalesmanId() == null : this.getCreateSalesmanId().equals(other.getCreateSalesmanId()))
&& (this.getCreateSalesmanName() == null ? other.getCreateSalesmanName() == null : this.getCreateSalesmanName().equals(other.getCreateSalesmanName()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -692,6 +706,7 @@ public class BsMer implements Serializable {
result = prime * result + ((getLarIdCardPeriodEnd() == null) ? 0 : getLarIdCardPeriodEnd().hashCode());
result = prime * result + ((getCompleteStatus() == null) ? 0 : getCompleteStatus().hashCode());
result = prime * result + ((getMerStatus() == null) ? 0 : getMerStatus().hashCode());
result = prime * result + ((getPeriodStatus() == null) ? 0 : getPeriodStatus().hashCode());
result = prime * result + ((getCreateSalesmanId() == null) ? 0 : getCreateSalesmanId().hashCode());
result = prime * result + ((getCreateSalesmanName() == null) ? 0 : getCreateSalesmanName().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -746,6 +761,7 @@ public class BsMer implements Serializable {
sb.append(", larIdCardPeriodEnd=").append(larIdCardPeriodEnd);
sb.append(", completeStatus=").append(completeStatus);
sb.append(", merStatus=").append(merStatus);
sb.append(", periodStatus=").append(periodStatus);
sb.append(", createSalesmanId=").append(createSalesmanId);
sb.append(", createSalesmanName=").append(createSalesmanName);
sb.append(", createTime=").append(createTime);

@ -2675,6 +2675,66 @@ public class BsMerExample {
return (Criteria) this;
}
public Criteria andPeriodStatusIsNull() {
addCriterion("period_status is null");
return (Criteria) this;
}
public Criteria andPeriodStatusIsNotNull() {
addCriterion("period_status is not null");
return (Criteria) this;
}
public Criteria andPeriodStatusEqualTo(Boolean value) {
addCriterion("period_status =", value, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusNotEqualTo(Boolean value) {
addCriterion("period_status <>", value, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusGreaterThan(Boolean value) {
addCriterion("period_status >", value, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusGreaterThanOrEqualTo(Boolean value) {
addCriterion("period_status >=", value, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusLessThan(Boolean value) {
addCriterion("period_status <", value, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusLessThanOrEqualTo(Boolean value) {
addCriterion("period_status <=", value, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusIn(List<Boolean> values) {
addCriterion("period_status in", values, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusNotIn(List<Boolean> values) {
addCriterion("period_status not in", values, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusBetween(Boolean value1, Boolean value2) {
addCriterion("period_status between", value1, value2, "periodStatus");
return (Criteria) this;
}
public Criteria andPeriodStatusNotBetween(Boolean value1, Boolean value2) {
addCriterion("period_status not between", value1, value2, "periodStatus");
return (Criteria) this;
}
public Criteria andCreateSalesmanIdIsNull() {
addCriterion("create_salesman_id is null");
return (Criteria) this;

@ -48,16 +48,6 @@ public class BsMerPlatformPeriod implements Serializable {
*/
private String platformNo;
/**
* 平台活动id
*/
private Long platformMarketId;
/**
* 平台子活动id
*/
private Long platformPkgId;
/**
* 开通银联分期
*/
@ -78,6 +68,11 @@ public class BsMerPlatformPeriod implements Serializable {
*/
private Integer alipayFeePaid;
/**
* 协议图片
*/
private String agreementPics;
/**
* 状态 0不可用 1可用 2 审核中 3审核驳回
*/
@ -162,22 +157,6 @@ public class BsMerPlatformPeriod implements Serializable {
this.platformNo = platformNo;
}
public Long getPlatformMarketId() {
return platformMarketId;
}
public void setPlatformMarketId(Long platformMarketId) {
this.platformMarketId = platformMarketId;
}
public Long getPlatformPkgId() {
return platformPkgId;
}
public void setPlatformPkgId(Long platformPkgId) {
this.platformPkgId = platformPkgId;
}
public Boolean getOpenUnionpay() {
return openUnionpay;
}
@ -210,6 +189,14 @@ public class BsMerPlatformPeriod implements Serializable {
this.alipayFeePaid = alipayFeePaid;
}
public String getAgreementPics() {
return agreementPics;
}
public void setAgreementPics(String agreementPics) {
this.agreementPics = agreementPics;
}
public Integer getStatus() {
return status;
}
@ -285,12 +272,11 @@ public class BsMerPlatformPeriod implements Serializable {
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType()))
&& (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo()))
&& (this.getPlatformMarketId() == null ? other.getPlatformMarketId() == null : this.getPlatformMarketId().equals(other.getPlatformMarketId()))
&& (this.getPlatformPkgId() == null ? other.getPlatformPkgId() == null : this.getPlatformPkgId().equals(other.getPlatformPkgId()))
&& (this.getOpenUnionpay() == null ? other.getOpenUnionpay() == null : this.getOpenUnionpay().equals(other.getOpenUnionpay()))
&& (this.getUnionpayFeePaid() == null ? other.getUnionpayFeePaid() == null : this.getUnionpayFeePaid().equals(other.getUnionpayFeePaid()))
&& (this.getOpenAlipay() == null ? other.getOpenAlipay() == null : this.getOpenAlipay().equals(other.getOpenAlipay()))
&& (this.getAlipayFeePaid() == null ? other.getAlipayFeePaid() == null : this.getAlipayFeePaid().equals(other.getAlipayFeePaid()))
&& (this.getAgreementPics() == null ? other.getAgreementPics() == null : this.getAgreementPics().equals(other.getAgreementPics()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getSuggestionReject() == null ? other.getSuggestionReject() == null : this.getSuggestionReject().equals(other.getSuggestionReject()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -311,12 +297,11 @@ public class BsMerPlatformPeriod implements Serializable {
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode());
result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode());
result = prime * result + ((getPlatformMarketId() == null) ? 0 : getPlatformMarketId().hashCode());
result = prime * result + ((getPlatformPkgId() == null) ? 0 : getPlatformPkgId().hashCode());
result = prime * result + ((getOpenUnionpay() == null) ? 0 : getOpenUnionpay().hashCode());
result = prime * result + ((getUnionpayFeePaid() == null) ? 0 : getUnionpayFeePaid().hashCode());
result = prime * result + ((getOpenAlipay() == null) ? 0 : getOpenAlipay().hashCode());
result = prime * result + ((getAlipayFeePaid() == null) ? 0 : getAlipayFeePaid().hashCode());
result = prime * result + ((getAgreementPics() == null) ? 0 : getAgreementPics().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getSuggestionReject() == null) ? 0 : getSuggestionReject().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -340,12 +325,11 @@ public class BsMerPlatformPeriod implements Serializable {
sb.append(", merNo=").append(merNo);
sb.append(", platformType=").append(platformType);
sb.append(", platformNo=").append(platformNo);
sb.append(", platformMarketId=").append(platformMarketId);
sb.append(", platformPkgId=").append(platformPkgId);
sb.append(", openUnionpay=").append(openUnionpay);
sb.append(", unionpayFeePaid=").append(unionpayFeePaid);
sb.append(", openAlipay=").append(openAlipay);
sb.append(", alipayFeePaid=").append(alipayFeePaid);
sb.append(", agreementPics=").append(agreementPics);
sb.append(", status=").append(status);
sb.append(", suggestionReject=").append(suggestionReject);
sb.append(", createTime=").append(createTime);

@ -565,126 +565,6 @@ public class BsMerPlatformPeriodExample {
return (Criteria) this;
}
public Criteria andPlatformMarketIdIsNull() {
addCriterion("platform_market_id is null");
return (Criteria) this;
}
public Criteria andPlatformMarketIdIsNotNull() {
addCriterion("platform_market_id is not null");
return (Criteria) this;
}
public Criteria andPlatformMarketIdEqualTo(Long value) {
addCriterion("platform_market_id =", value, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdNotEqualTo(Long value) {
addCriterion("platform_market_id <>", value, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdGreaterThan(Long value) {
addCriterion("platform_market_id >", value, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdGreaterThanOrEqualTo(Long value) {
addCriterion("platform_market_id >=", value, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdLessThan(Long value) {
addCriterion("platform_market_id <", value, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdLessThanOrEqualTo(Long value) {
addCriterion("platform_market_id <=", value, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdIn(List<Long> values) {
addCriterion("platform_market_id in", values, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdNotIn(List<Long> values) {
addCriterion("platform_market_id not in", values, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdBetween(Long value1, Long value2) {
addCriterion("platform_market_id between", value1, value2, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformMarketIdNotBetween(Long value1, Long value2) {
addCriterion("platform_market_id not between", value1, value2, "platformMarketId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdIsNull() {
addCriterion("platform_pkg_id is null");
return (Criteria) this;
}
public Criteria andPlatformPkgIdIsNotNull() {
addCriterion("platform_pkg_id is not null");
return (Criteria) this;
}
public Criteria andPlatformPkgIdEqualTo(Long value) {
addCriterion("platform_pkg_id =", value, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdNotEqualTo(Long value) {
addCriterion("platform_pkg_id <>", value, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdGreaterThan(Long value) {
addCriterion("platform_pkg_id >", value, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdGreaterThanOrEqualTo(Long value) {
addCriterion("platform_pkg_id >=", value, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdLessThan(Long value) {
addCriterion("platform_pkg_id <", value, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdLessThanOrEqualTo(Long value) {
addCriterion("platform_pkg_id <=", value, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdIn(List<Long> values) {
addCriterion("platform_pkg_id in", values, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdNotIn(List<Long> values) {
addCriterion("platform_pkg_id not in", values, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdBetween(Long value1, Long value2) {
addCriterion("platform_pkg_id between", value1, value2, "platformPkgId");
return (Criteria) this;
}
public Criteria andPlatformPkgIdNotBetween(Long value1, Long value2) {
addCriterion("platform_pkg_id not between", value1, value2, "platformPkgId");
return (Criteria) this;
}
public Criteria andOpenUnionpayIsNull() {
addCriterion("open_unionpay is null");
return (Criteria) this;
@ -935,6 +815,76 @@ public class BsMerPlatformPeriodExample {
return (Criteria) this;
}
public Criteria andAgreementPicsIsNull() {
addCriterion("agreement_pics is null");
return (Criteria) this;
}
public Criteria andAgreementPicsIsNotNull() {
addCriterion("agreement_pics is not null");
return (Criteria) this;
}
public Criteria andAgreementPicsEqualTo(String value) {
addCriterion("agreement_pics =", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsNotEqualTo(String value) {
addCriterion("agreement_pics <>", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsGreaterThan(String value) {
addCriterion("agreement_pics >", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsGreaterThanOrEqualTo(String value) {
addCriterion("agreement_pics >=", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsLessThan(String value) {
addCriterion("agreement_pics <", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsLessThanOrEqualTo(String value) {
addCriterion("agreement_pics <=", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsLike(String value) {
addCriterion("agreement_pics like", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsNotLike(String value) {
addCriterion("agreement_pics not like", value, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsIn(List<String> values) {
addCriterion("agreement_pics in", values, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsNotIn(List<String> values) {
addCriterion("agreement_pics not in", values, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsBetween(String value1, String value2) {
addCriterion("agreement_pics between", value1, value2, "agreementPics");
return (Criteria) this;
}
public Criteria andAgreementPicsNotBetween(String value1, String value2) {
addCriterion("agreement_pics not between", value1, value2, "agreementPics");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;

@ -0,0 +1,296 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
/**
* bs_mer_platform_period_paid
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsMerPlatformPeriodPaid implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 公司id
*/
private Long platformPeriodId;
/**
* 商户id
*/
private Long merId;
/**
* 内部商户号
*/
private String merNo;
/**
* 分期方式 1银联 2花呗
*/
private Integer payType;
/**
* 平台 1零零购
*/
private Integer platformType;
/**
* 平台商户号
*/
private String platformNo;
/**
* 贴息方式 1商户贴息 2用户贴息 3商户用户各一半
*/
private Integer platformFeePaid;
/**
* 平台活动id
*/
private String platformMarketId;
/**
* 平台子活动id
*/
private String platformPkgId;
/**
* 是否当前结算方式
*/
private Boolean currentSettle;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getPlatformPeriodId() {
return platformPeriodId;
}
public void setPlatformPeriodId(Long platformPeriodId) {
this.platformPeriodId = platformPeriodId;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getMerNo() {
return merNo;
}
public void setMerNo(String merNo) {
this.merNo = merNo;
}
public Integer getPayType() {
return payType;
}
public void setPayType(Integer payType) {
this.payType = payType;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformNo() {
return platformNo;
}
public void setPlatformNo(String platformNo) {
this.platformNo = platformNo;
}
public Integer getPlatformFeePaid() {
return platformFeePaid;
}
public void setPlatformFeePaid(Integer platformFeePaid) {
this.platformFeePaid = platformFeePaid;
}
public String getPlatformMarketId() {
return platformMarketId;
}
public void setPlatformMarketId(String platformMarketId) {
this.platformMarketId = platformMarketId;
}
public String getPlatformPkgId() {
return platformPkgId;
}
public void setPlatformPkgId(String platformPkgId) {
this.platformPkgId = platformPkgId;
}
public Boolean getCurrentSettle() {
return currentSettle;
}
public void setCurrentSettle(Boolean currentSettle) {
this.currentSettle = currentSettle;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BsMerPlatformPeriodPaid other = (BsMerPlatformPeriodPaid) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPlatformPeriodId() == null ? other.getPlatformPeriodId() == null : this.getPlatformPeriodId().equals(other.getPlatformPeriodId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo()))
&& (this.getPayType() == null ? other.getPayType() == null : this.getPayType().equals(other.getPayType()))
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType()))
&& (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo()))
&& (this.getPlatformFeePaid() == null ? other.getPlatformFeePaid() == null : this.getPlatformFeePaid().equals(other.getPlatformFeePaid()))
&& (this.getPlatformMarketId() == null ? other.getPlatformMarketId() == null : this.getPlatformMarketId().equals(other.getPlatformMarketId()))
&& (this.getPlatformPkgId() == null ? other.getPlatformPkgId() == null : this.getPlatformPkgId().equals(other.getPlatformPkgId()))
&& (this.getCurrentSettle() == null ? other.getCurrentSettle() == null : this.getCurrentSettle().equals(other.getCurrentSettle()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPlatformPeriodId() == null) ? 0 : getPlatformPeriodId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode());
result = prime * result + ((getPayType() == null) ? 0 : getPayType().hashCode());
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode());
result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode());
result = prime * result + ((getPlatformFeePaid() == null) ? 0 : getPlatformFeePaid().hashCode());
result = prime * result + ((getPlatformMarketId() == null) ? 0 : getPlatformMarketId().hashCode());
result = prime * result + ((getPlatformPkgId() == null) ? 0 : getPlatformPkgId().hashCode());
result = prime * result + ((getCurrentSettle() == null) ? 0 : getCurrentSettle().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", platformPeriodId=").append(platformPeriodId);
sb.append(", merId=").append(merId);
sb.append(", merNo=").append(merNo);
sb.append(", payType=").append(payType);
sb.append(", platformType=").append(platformType);
sb.append(", platformNo=").append(platformNo);
sb.append(", platformFeePaid=").append(platformFeePaid);
sb.append(", platformMarketId=").append(platformMarketId);
sb.append(", platformPkgId=").append(platformPkgId);
sb.append(", currentSettle=").append(currentSettle);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -24,6 +24,11 @@ public class BsMerPlatformPeriodRate implements Serializable {
*/
private Long platformPeriodId;
/**
* 费率类型 1银联分期费率1类银行 2银联分期费率2类银行 3花呗分期
*/
private Integer periodRateType;
/**
* 分期数
*/
@ -68,6 +73,14 @@ public class BsMerPlatformPeriodRate implements Serializable {
this.platformPeriodId = platformPeriodId;
}
public Integer getPeriodRateType() {
return periodRateType;
}
public void setPeriodRateType(Integer periodRateType) {
this.periodRateType = periodRateType;
}
public Integer getPeriodNum() {
return periodNum;
}
@ -138,6 +151,7 @@ public class BsMerPlatformPeriodRate implements Serializable {
BsMerPlatformPeriodRate other = (BsMerPlatformPeriodRate) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getPlatformPeriodId() == null ? other.getPlatformPeriodId() == null : this.getPlatformPeriodId().equals(other.getPlatformPeriodId()))
&& (this.getPeriodRateType() == null ? other.getPeriodRateType() == null : this.getPeriodRateType().equals(other.getPeriodRateType()))
&& (this.getPeriodNum() == null ? other.getPeriodNum() == null : this.getPeriodNum().equals(other.getPeriodNum()))
&& (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -153,6 +167,7 @@ public class BsMerPlatformPeriodRate implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getPlatformPeriodId() == null) ? 0 : getPlatformPeriodId().hashCode());
result = prime * result + ((getPeriodRateType() == null) ? 0 : getPeriodRateType().hashCode());
result = prime * result + ((getPeriodNum() == null) ? 0 : getPeriodNum().hashCode());
result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -171,6 +186,7 @@ public class BsMerPlatformPeriodRate implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", platformPeriodId=").append(platformPeriodId);
sb.append(", periodRateType=").append(periodRateType);
sb.append(", periodNum=").append(periodNum);
sb.append(", rate=").append(rate);
sb.append(", createTime=").append(createTime);

@ -246,6 +246,66 @@ public class BsMerPlatformPeriodRateExample {
return (Criteria) this;
}
public Criteria andPeriodRateTypeIsNull() {
addCriterion("period_rate_type is null");
return (Criteria) this;
}
public Criteria andPeriodRateTypeIsNotNull() {
addCriterion("period_rate_type is not null");
return (Criteria) this;
}
public Criteria andPeriodRateTypeEqualTo(Integer value) {
addCriterion("period_rate_type =", value, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeNotEqualTo(Integer value) {
addCriterion("period_rate_type <>", value, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeGreaterThan(Integer value) {
addCriterion("period_rate_type >", value, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("period_rate_type >=", value, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeLessThan(Integer value) {
addCriterion("period_rate_type <", value, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeLessThanOrEqualTo(Integer value) {
addCriterion("period_rate_type <=", value, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeIn(List<Integer> values) {
addCriterion("period_rate_type in", values, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeNotIn(List<Integer> values) {
addCriterion("period_rate_type not in", values, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeBetween(Integer value1, Integer value2) {
addCriterion("period_rate_type between", value1, value2, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodRateTypeNotBetween(Integer value1, Integer value2) {
addCriterion("period_rate_type not between", value1, value2, "periodRateType");
return (Criteria) this;
}
public Criteria andPeriodNumIsNull() {
addCriterion("period_num is null");
return (Criteria) this;

@ -0,0 +1,135 @@
package com.hfkj.entity;
import java.io.Serializable;
/**
* llg_bank_code
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class LlgBankCode implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 银行代码
*/
private Long bankCode;
/**
* 银行名称
*/
private String bankName;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getBankCode() {
return bankCode;
}
public void setBankCode(Long bankCode) {
this.bankCode = bankCode;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
LlgBankCode other = (LlgBankCode) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getBankCode() == null ? other.getBankCode() == null : this.getBankCode().equals(other.getBankCode()))
&& (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getBankCode() == null) ? 0 : getBankCode().hashCode());
result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", bankCode=").append(bankCode);
sb.append(", bankName=").append(bankName);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,622 @@
package com.hfkj.entity;
import java.util.ArrayList;
import java.util.List;
public class LlgBankCodeExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public LlgBankCodeExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andBankCodeIsNull() {
addCriterion("bank_code is null");
return (Criteria) this;
}
public Criteria andBankCodeIsNotNull() {
addCriterion("bank_code is not null");
return (Criteria) this;
}
public Criteria andBankCodeEqualTo(Long value) {
addCriterion("bank_code =", value, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeNotEqualTo(Long value) {
addCriterion("bank_code <>", value, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeGreaterThan(Long value) {
addCriterion("bank_code >", value, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeGreaterThanOrEqualTo(Long value) {
addCriterion("bank_code >=", value, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeLessThan(Long value) {
addCriterion("bank_code <", value, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeLessThanOrEqualTo(Long value) {
addCriterion("bank_code <=", value, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeIn(List<Long> values) {
addCriterion("bank_code in", values, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeNotIn(List<Long> values) {
addCriterion("bank_code not in", values, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeBetween(Long value1, Long value2) {
addCriterion("bank_code between", value1, value2, "bankCode");
return (Criteria) this;
}
public Criteria andBankCodeNotBetween(Long value1, Long value2) {
addCriterion("bank_code not between", value1, value2, "bankCode");
return (Criteria) this;
}
public Criteria andBankNameIsNull() {
addCriterion("bank_name is null");
return (Criteria) this;
}
public Criteria andBankNameIsNotNull() {
addCriterion("bank_name is not null");
return (Criteria) this;
}
public Criteria andBankNameEqualTo(String value) {
addCriterion("bank_name =", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameNotEqualTo(String value) {
addCriterion("bank_name <>", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameGreaterThan(String value) {
addCriterion("bank_name >", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameGreaterThanOrEqualTo(String value) {
addCriterion("bank_name >=", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameLessThan(String value) {
addCriterion("bank_name <", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameLessThanOrEqualTo(String value) {
addCriterion("bank_name <=", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameLike(String value) {
addCriterion("bank_name like", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameNotLike(String value) {
addCriterion("bank_name not like", value, "bankName");
return (Criteria) this;
}
public Criteria andBankNameIn(List<String> values) {
addCriterion("bank_name in", values, "bankName");
return (Criteria) this;
}
public Criteria andBankNameNotIn(List<String> values) {
addCriterion("bank_name not in", values, "bankName");
return (Criteria) this;
}
public Criteria andBankNameBetween(String value1, String value2) {
addCriterion("bank_name between", value1, value2, "bankName");
return (Criteria) this;
}
public Criteria andBankNameNotBetween(String value1, String value2) {
addCriterion("bank_name not between", value1, value2, "bankName");
return (Criteria) this;
}
public Criteria andExt1IsNull() {
addCriterion("ext_1 is null");
return (Criteria) this;
}
public Criteria andExt1IsNotNull() {
addCriterion("ext_1 is not null");
return (Criteria) this;
}
public Criteria andExt1EqualTo(String value) {
addCriterion("ext_1 =", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotEqualTo(String value) {
addCriterion("ext_1 <>", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThan(String value) {
addCriterion("ext_1 >", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThanOrEqualTo(String value) {
addCriterion("ext_1 >=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThan(String value) {
addCriterion("ext_1 <", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThanOrEqualTo(String value) {
addCriterion("ext_1 <=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1Like(String value) {
addCriterion("ext_1 like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotLike(String value) {
addCriterion("ext_1 not like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1In(List<String> values) {
addCriterion("ext_1 in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotIn(List<String> values) {
addCriterion("ext_1 not in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1Between(String value1, String value2) {
addCriterion("ext_1 between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotBetween(String value1, String value2) {
addCriterion("ext_1 not between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt2IsNull() {
addCriterion("ext_2 is null");
return (Criteria) this;
}
public Criteria andExt2IsNotNull() {
addCriterion("ext_2 is not null");
return (Criteria) this;
}
public Criteria andExt2EqualTo(String value) {
addCriterion("ext_2 =", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotEqualTo(String value) {
addCriterion("ext_2 <>", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThan(String value) {
addCriterion("ext_2 >", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThanOrEqualTo(String value) {
addCriterion("ext_2 >=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThan(String value) {
addCriterion("ext_2 <", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThanOrEqualTo(String value) {
addCriterion("ext_2 <=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2Like(String value) {
addCriterion("ext_2 like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotLike(String value) {
addCriterion("ext_2 not like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2In(List<String> values) {
addCriterion("ext_2 in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotIn(List<String> values) {
addCriterion("ext_2 not in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2Between(String value1, String value2) {
addCriterion("ext_2 between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotBetween(String value1, String value2) {
addCriterion("ext_2 not between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt3IsNull() {
addCriterion("ext_3 is null");
return (Criteria) this;
}
public Criteria andExt3IsNotNull() {
addCriterion("ext_3 is not null");
return (Criteria) this;
}
public Criteria andExt3EqualTo(String value) {
addCriterion("ext_3 =", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotEqualTo(String value) {
addCriterion("ext_3 <>", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThan(String value) {
addCriterion("ext_3 >", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThanOrEqualTo(String value) {
addCriterion("ext_3 >=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThan(String value) {
addCriterion("ext_3 <", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThanOrEqualTo(String value) {
addCriterion("ext_3 <=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3Like(String value) {
addCriterion("ext_3 like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotLike(String value) {
addCriterion("ext_3 not like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3In(List<String> values) {
addCriterion("ext_3 in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotIn(List<String> values) {
addCriterion("ext_3 not in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3Between(String value1, String value2) {
addCriterion("ext_3 between", value1, value2, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotBetween(String value1, String value2) {
addCriterion("ext_3 not between", value1, value2, "ext3");
return (Criteria) this;
}
}
/**
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -26,6 +26,12 @@ public interface BsMerService {
*/
void editMer(BsMer mer);
/**
* 修改商户并更新缓存
* @param mer
*/
void update(BsMer mer);
/**
* 配置商户账户
* @param merAccount 账户参数

@ -0,0 +1,19 @@
package com.hfkj.service;
import com.hfkj.entity.LlgBankCode;
/**
* @className: LlgBankCodeService
* @author: HuRui
* @date: 2024/1/10
**/
public interface LlgBankCodeService {
/**
* 查询详情
* @param bankName 模糊银行名称
* @return
*/
LlgBankCode getDetail(String bankName);
}

@ -3,6 +3,7 @@ package com.hfkj.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.CacheUpdate;
import com.alicp.jetcache.anno.Cached;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
@ -90,11 +91,17 @@ public class BsMerServiceImpl implements BsMerService {
mer.setUpdateTime(new Date());
merMapper.insert(mer);
} else {
mer.setUpdateTime(new Date());
merMapper.updateByPrimaryKey(mer);
update(mer);
}
}
@Override
@CacheUpdate(name = "MER:", key = "#mer.id", value = "#mer")
public void update(BsMer mer) {
mer.setUpdateTime(new Date());
merMapper.updateByPrimaryKey(mer);
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class})
public Long configMerAccount(MerAccountModel merAccount) {

@ -2,6 +2,7 @@ package com.hfkj.service.impl;
import com.hfkj.channel.ccb.CCBTradeService;
import com.hfkj.channel.hsg.HsgIntegralService;
import com.hfkj.channel.llg.service.LLGOrderService;
import com.hfkj.channel.tianque.service.TianQueTradeService;
import com.hfkj.channel.weixin.WeiXinPayService;
import com.hfkj.common.exception.BizException;
@ -52,6 +53,9 @@ public class BsTradeOrderRefundServiceImpl implements BsTradeOrderRefundService
@Resource
private TianQueTradeService tianQueTradeService;
@Resource
private LLGOrderService llgOrderService;
@Override
public void editOrderRefund(BsTradeOrderRefund tradeOrderRefund) {
if (tradeOrderRefund.getId() == null) {
@ -101,6 +105,9 @@ public class BsTradeOrderRefundServiceImpl implements BsTradeOrderRefundService
} else if (tradeOrderRefund.getPlatformType().equals(PlatformTypeEnum.type5.getNumber())) {
refund = tianQueTradeService.refund(tradeOrderRefund.getRefundNo(), tradeOrderRefund.getRefundAmount());
refundStatus = true;
} else if (tradeOrderRefund.getPlatformType().equals(PlatformTypeEnum.type6.getNumber())) {
refund = llgOrderService.refund(tradeOrderRefund.getRefundNo());
refundStatus = true;
}
if (tradeOrder != null) {

@ -0,0 +1,32 @@
package com.hfkj.service.impl;
import com.hfkj.dao.LlgBankCodeMapper;
import com.hfkj.entity.LlgBankCode;
import com.hfkj.entity.LlgBankCodeExample;
import com.hfkj.service.LlgBankCodeService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* @className: LlgBankCodeServiceImpl
* @author: HuRui
* @date: 2024/1/10
**/
@Service("llgBankCodeService")
public class LlgBankCodeServiceImpl implements LlgBankCodeService {
@Resource
private LlgBankCodeMapper llgBankCodeMapper;
@Override
public LlgBankCode getDetail(String bankName) {
LlgBankCodeExample example = new LlgBankCodeExample();
example.createCriteria().andBankNameLike("%"+bankName+"%");
List<LlgBankCode> list = llgBankCodeMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
}

@ -0,0 +1,60 @@
package com.hfkj.service.period;
import com.hfkj.entity.BsMerPlatformPeriodPaid;
import com.hfkj.sysenum.MerPlatformPeriodFeePaidTypeEnum;
import com.hfkj.sysenum.MerPlatformPeriodPayTypeEnum;
import com.hfkj.sysenum.PlatformPeriodTypeEnum;
import java.util.List;
/**
* @className: BsMerPlatformPeriodPaidService
* @author: HuRui
* @date: 2024/1/9
**/
public interface BsMerPlatformPeriodPaidService {
/**
* 编辑数据
* @param data
*/
void editData(BsMerPlatformPeriodPaid data);
/**
* 查询详情
* @param merNo
* @param platformPeriodType
* @param platformPeriodFeePaidType
* @return
*/
BsMerPlatformPeriodPaid getDetail(String merNo, PlatformPeriodTypeEnum platformPeriodType, MerPlatformPeriodPayTypeEnum periodPayType, MerPlatformPeriodFeePaidTypeEnum platformPeriodFeePaidType);
/**
* 查询列表
* @param merNo
* @return
*/
List<BsMerPlatformPeriodPaid> getList(String merNo);
/**
* 查询列表
* @param merNo
* @param platformPeriodType
* @return
*/
List<BsMerPlatformPeriodPaid> getList(String merNo, PlatformPeriodTypeEnum platformPeriodType);
/**
* 查询当前分期平台贴息
* @param merNo
* @param platformPeriodType
* @return
*/
BsMerPlatformPeriodPaid getCurrenPeriodPaid(String merNo, PlatformPeriodTypeEnum platformPeriodType);
/**
* 删除数据
* @param merNo
*/
void delData(String merNo);
}

@ -0,0 +1,42 @@
package com.hfkj.service.period;
import com.hfkj.entity.BsMerPlatformPeriod;
import com.hfkj.entity.BsMerPlatformPeriodRate;
import com.hfkj.sysenum.MerPlatformPeriodRateTypeEnum;
import java.util.List;
/**
* @className: BsMerPlatformPeriodRateService
* @author: HuRui
* @date: 2024/1/8
**/
public interface BsMerPlatformPeriodRateService {
/**
* 编辑数据
* @param data
*/
void editData(BsMerPlatformPeriodRate data);
/**
* 查询详情
* @param platformPeriodId
* @param periodNum
* @return
*/
BsMerPlatformPeriodRate getDetail(Long platformPeriodId, MerPlatformPeriodRateTypeEnum periodRateType, Integer periodNum);
/**
* 查询列表
* @param platformPeriodId
* @param periodRateType
*/
List<BsMerPlatformPeriodRate> getList(Long platformPeriodId, MerPlatformPeriodRateTypeEnum periodRateType);
/**
* 删除数据
* @param platformPeriodId
*/
void delData(Long platformPeriodId);
}

@ -1,8 +1,15 @@
package com.hfkj.service.period;
import com.hfkj.entity.BsMerPlatformPeriod;
import com.hfkj.entity.BsMerPlatformPeriodPaid;
import com.hfkj.entity.BsMerPlatformPeriodRate;
import com.hfkj.sysenum.MerPlatformPeriodFeePaidTypeEnum;
import com.hfkj.sysenum.MerPlatformPeriodPayTypeEnum;
import com.hfkj.sysenum.PlatformPeriodTypeEnum;
import java.util.List;
import java.util.Map;
/**
* @className: BsMerPlatformPeriodService
* @author: HuRui
@ -16,6 +23,22 @@ public interface BsMerPlatformPeriodService {
*/
void editData(BsMerPlatformPeriod period);
/**
* 配置分期
* @param period
* @param periodPaidList
*/
void configPeriod(BsMerPlatformPeriod period, List<BsMerPlatformPeriodPaid> periodPaidList , List<BsMerPlatformPeriodRate> rateList) ;
/**
* 修改分期贴息方式
* @param merNo
* @param platformPeriodType
* @param payType
* @param feePaidType
*/
void updateFeePaid(String merNo, PlatformPeriodTypeEnum platformPeriodType, MerPlatformPeriodPayTypeEnum payType, MerPlatformPeriodFeePaidTypeEnum feePaidType) ;
/**
* 申请开通分期
* @param merNo
@ -30,5 +53,19 @@ public interface BsMerPlatformPeriodService {
*/
BsMerPlatformPeriod getDetailByMer(String merNo, PlatformPeriodTypeEnum platformTypeEnum);
/**
* 查询详情
* @param platformNo
* @param platformTypeEnum
* @return
*/
BsMerPlatformPeriod getDetail(String platformNo, PlatformPeriodTypeEnum platformTypeEnum);
/**
* 查询列表
* @param param
* @return
*/
List<BsMerPlatformPeriod> getList(Map<String, Object> param);
}

@ -0,0 +1,86 @@
package com.hfkj.service.period.impl;
import com.hfkj.dao.BsMerPlatformPeriodPaidMapper;
import com.hfkj.entity.BsMerPlatformPeriodPaid;
import com.hfkj.entity.BsMerPlatformPeriodPaidExample;
import com.hfkj.service.period.BsMerPlatformPeriodPaidService;
import com.hfkj.sysenum.MerPlatformPeriodFeePaidTypeEnum;
import com.hfkj.sysenum.MerPlatformPeriodPayTypeEnum;
import com.hfkj.sysenum.PlatformPeriodTypeEnum;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @className: BsMerPlatformPeriodPaidServiceImpl
* @author: HuRui
* @date: 2024/1/9
**/
@Service("merPlatformPeriodPaidService")
public class BsMerPlatformPeriodPaidServiceImpl implements BsMerPlatformPeriodPaidService {
@Resource
private BsMerPlatformPeriodPaidMapper merPlatformPeriodPaidMapper;
@Override
public void editData(BsMerPlatformPeriodPaid data) {
if (data.getId() == null) {
data.setCreateTime(new Date());
data.setUpdateTime(new Date());
merPlatformPeriodPaidMapper.insert(data);
} else {
data.setUpdateTime(new Date());
merPlatformPeriodPaidMapper.updateByPrimaryKey(data);
}
}
@Override
public BsMerPlatformPeriodPaid getDetail(String merNo, PlatformPeriodTypeEnum platformPeriodType, MerPlatformPeriodPayTypeEnum periodPayType, MerPlatformPeriodFeePaidTypeEnum platformPeriodFeePaidType) {
BsMerPlatformPeriodPaidExample example = new BsMerPlatformPeriodPaidExample();
example.createCriteria()
.andMerNoEqualTo(merNo)
.andPlatformTypeEqualTo(platformPeriodType.getNumber())
.andPayTypeEqualTo(periodPayType.getNumber())
.andPlatformFeePaidEqualTo(platformPeriodFeePaidType.getNumber());
List<BsMerPlatformPeriodPaid> list = merPlatformPeriodPaidMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public List<BsMerPlatformPeriodPaid> getList(String merNo) {
BsMerPlatformPeriodPaidExample example = new BsMerPlatformPeriodPaidExample();
example.createCriteria().andMerNoEqualTo(merNo);
return merPlatformPeriodPaidMapper.selectByExample(example);
}
@Override
public List<BsMerPlatformPeriodPaid> getList(String merNo, PlatformPeriodTypeEnum platformPeriodType) {
BsMerPlatformPeriodPaidExample example = new BsMerPlatformPeriodPaidExample();
example.createCriteria().andMerNoEqualTo(merNo).andPlatformTypeEqualTo(platformPeriodType.getNumber());
return merPlatformPeriodPaidMapper.selectByExample(example);
}
@Override
public BsMerPlatformPeriodPaid getCurrenPeriodPaid(String merNo, PlatformPeriodTypeEnum platformPeriodType) {
BsMerPlatformPeriodPaidExample example = new BsMerPlatformPeriodPaidExample();
example.createCriteria().andMerNoEqualTo(merNo).andPlatformTypeEqualTo(platformPeriodType.getNumber()).andCurrentSettleEqualTo(true);
List<BsMerPlatformPeriodPaid> list = merPlatformPeriodPaidMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public void delData(String merNo) {
BsMerPlatformPeriodPaidExample example = new BsMerPlatformPeriodPaidExample();
example.createCriteria().andMerNoEqualTo(merNo);
merPlatformPeriodPaidMapper.deleteByExample(example);
}
}

@ -0,0 +1,61 @@
package com.hfkj.service.period.impl;
import com.hfkj.dao.BsMerPlatformPeriodRateMapper;
import com.hfkj.entity.BsMerPlatformPeriodRate;
import com.hfkj.entity.BsMerPlatformPeriodRateExample;
import com.hfkj.service.period.BsMerPlatformPeriodRateService;
import com.hfkj.sysenum.MerPlatformPeriodRateTypeEnum;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @className: BsMerPlatformPeriodRateServiceImpl
* @author: HuRui
* @date: 2024/1/8
**/
@Service("merPlatformPeriodRateService")
public class BsMerPlatformPeriodRateServiceImpl implements BsMerPlatformPeriodRateService {
@Resource
private BsMerPlatformPeriodRateMapper merPlatformPeriodRateMapper;
@Override
public void editData(BsMerPlatformPeriodRate data) {
if (data.getId() == null) {
data.setCreateTime(new Date());
data.setUpdateTime(new Date());
merPlatformPeriodRateMapper.insert(data);
} else {
data.setUpdateTime(new Date());
merPlatformPeriodRateMapper.updateByPrimaryKey(data);
}
}
@Override
public BsMerPlatformPeriodRate getDetail(Long platformPeriodId, MerPlatformPeriodRateTypeEnum periodRateType, Integer periodNum) {
BsMerPlatformPeriodRateExample example = new BsMerPlatformPeriodRateExample();
example.createCriteria().andPlatformPeriodIdEqualTo(platformPeriodId).andPeriodRateTypeEqualTo(periodRateType.getNumber()).andPeriodNumEqualTo(periodNum);
List<BsMerPlatformPeriodRate> list = merPlatformPeriodRateMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public List<BsMerPlatformPeriodRate> getList(Long platformPeriodId, MerPlatformPeriodRateTypeEnum periodRateType) {
BsMerPlatformPeriodRateExample example = new BsMerPlatformPeriodRateExample();
example.createCriteria().andPlatformPeriodIdEqualTo(platformPeriodId).andPeriodRateTypeEqualTo(periodRateType.getNumber());
return merPlatformPeriodRateMapper.selectByExample(example);
}
@Override
public void delData(Long platformPeriodId) {
BsMerPlatformPeriodRateExample example = new BsMerPlatformPeriodRateExample();
example.createCriteria().andPlatformPeriodIdEqualTo(platformPeriodId);
merPlatformPeriodRateMapper.deleteByExample(example);
}
}

@ -1,22 +1,27 @@
package com.hfkj.service.period.impl;
import com.hfkj.channel.llg.service.LLGMerService;
import com.hfkj.common.exception.BaseException;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.RedisUtil;
import com.hfkj.dao.BsMerPlatformPeriodMapper;
import com.hfkj.entity.BsMer;
import com.hfkj.entity.BsMerPlatformPeriod;
import com.hfkj.entity.BsMerPlatformPeriodExample;
import com.hfkj.entity.*;
import com.hfkj.service.BsMerService;
import com.hfkj.service.period.BsMerPlatformPeriodPaidService;
import com.hfkj.service.period.BsMerPlatformPeriodRateService;
import com.hfkj.service.period.BsMerPlatformPeriodService;
import com.hfkj.sysenum.PlatformPeriodStatusEnum;
import com.hfkj.sysenum.PlatformPeriodTypeEnum;
import com.hfkj.sysenum.*;
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.List;
import java.util.Map;
/**
* @className: BsMerPlatformPeriodServiceImpl
@ -35,6 +40,10 @@ public class BsMerPlatformPeriodServiceImpl implements BsMerPlatformPeriodServic
private RedisUtil redisUtil;
@Resource
private BsMerService merService;
@Resource
private BsMerPlatformPeriodPaidService merPlatformPeriodPaidService;
@Resource
private BsMerPlatformPeriodRateService merPlatformPeriodRateService;
@Override
public void editData(BsMerPlatformPeriod period) {
@ -48,7 +57,54 @@ public class BsMerPlatformPeriodServiceImpl implements BsMerPlatformPeriodServic
}
@Override
public void apply(String merNo, PlatformPeriodTypeEnum platformTypeEnum) throws Exception {
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void configPeriod(BsMerPlatformPeriod period, List<BsMerPlatformPeriodPaid> periodPaidList , List<BsMerPlatformPeriodRate> rateList) {
editData(period);
merPlatformPeriodPaidService.delData(period.getMerNo());
for (BsMerPlatformPeriodPaid periodPaid : periodPaidList) {
periodPaid.setPlatformPeriodId(period.getId());
merPlatformPeriodPaidService.editData(periodPaid);
}
merPlatformPeriodRateService.delData(period.getId());
for (BsMerPlatformPeriodRate rate : rateList) {
rate.setPlatformPeriodId(period.getId());
merPlatformPeriodRateService.editData(rate);
}
try {
apply(period.getMerNo(), PlatformPeriodTypeEnum.getDataByNumber(period.getPlatformType()));
} catch (BaseException baseException) {
redisUtil.del(REDIS_FILE_KEY + period.getMerNo() + "_" + period.getPlatformType());
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, baseException.getErrorMsg());
} catch (Exception e) {
redisUtil.del(REDIS_FILE_KEY + period.getMerNo() + "_" + period.getPlatformType());
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知异常");
}
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void updateFeePaid(String merNo, PlatformPeriodTypeEnum platformPeriodType, MerPlatformPeriodPayTypeEnum payType, MerPlatformPeriodFeePaidTypeEnum feePaidType) {
// 查询
List<BsMerPlatformPeriodPaid> list = merPlatformPeriodPaidService.getList(merNo);
for (BsMerPlatformPeriodPaid paid : list) {
if (paid.getPlatformFeePaid().equals(feePaidType.getNumber())) {
paid.setCurrentSettle(true);
} else {
paid.setCurrentSettle(false);
}
merPlatformPeriodPaidService.editData(paid);
}
}
@Override
public void apply(String merNo, PlatformPeriodTypeEnum platformTypeEnum) throws BaseException {
// 查询商户
BsMer mer = merService.getMer(merNo);
if (mer == null) {
@ -56,8 +112,9 @@ public class BsMerPlatformPeriodServiceImpl implements BsMerPlatformPeriodServic
}
if (platformTypeEnum.getNumber().equals(PlatformPeriodTypeEnum.type1.getNumber())) {
llgMerService.merApply(mer.getId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的渠道");
}
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的渠道");
}
@Override
@ -70,7 +127,7 @@ public class BsMerPlatformPeriodServiceImpl implements BsMerPlatformPeriodServic
example.createCriteria()
.andMerNoEqualTo(merNo)
.andPlatformTypeEqualTo(platformTypeEnum.getNumber())
.andStatusEqualTo(PlatformPeriodStatusEnum.status1.getNumber());
.andStatusNotEqualTo(PlatformPeriodStatusEnum.status0.getNumber());
List<BsMerPlatformPeriod> list = merPlatformPeriodMapper.selectByExample(example);
if (!list.isEmpty()) {
BsMerPlatformPeriod period = list.get(0);
@ -79,4 +136,31 @@ public class BsMerPlatformPeriodServiceImpl implements BsMerPlatformPeriodServic
}
return null;
}
@Override
public BsMerPlatformPeriod getDetail(String platformNo, PlatformPeriodTypeEnum platformTypeEnum) {
BsMerPlatformPeriodExample example = new BsMerPlatformPeriodExample();
example.createCriteria()
.andPlatformNoEqualTo(platformNo)
.andPlatformTypeEqualTo(platformTypeEnum.getNumber())
.andStatusNotEqualTo(PlatformPeriodStatusEnum.status0.getNumber());
List<BsMerPlatformPeriod> list = merPlatformPeriodMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public List<BsMerPlatformPeriod> getList(Map<String, Object> param) {
BsMerPlatformPeriodExample example = new BsMerPlatformPeriodExample();
BsMerPlatformPeriodExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(param, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(param, "status"));
}
example.setOrderByClause("create_time desc");
return merPlatformPeriodMapper.selectByExample(example);
}
}

@ -0,0 +1,49 @@
package com.hfkj.sysenum;
import java.util.Objects;
/**
* 分期平台类型
* @author hurui
*/
public enum MerPlatformPeriodFeePaidTypeEnum {
type1(1, "商户贴息"),
type2(2, "用户贴息"),
type3(3, "商户用户各一半"),
;
private Integer number;
private String name;
MerPlatformPeriodFeePaidTypeEnum(int number, String name) {
this.number = number;
this.name = name;
}
public static MerPlatformPeriodFeePaidTypeEnum getDataByNumber(Integer number) {
for (MerPlatformPeriodFeePaidTypeEnum 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;
}
}

@ -0,0 +1,48 @@
package com.hfkj.sysenum;
import java.util.Objects;
/**
* 分期平台类型
* @author hurui
*/
public enum MerPlatformPeriodPayTypeEnum {
type1(1, "银联分期"),
/*type2(2, "花呗分期"),*/
;
private Integer number;
private String name;
MerPlatformPeriodPayTypeEnum(int number, String name) {
this.number = number;
this.name = name;
}
public static MerPlatformPeriodPayTypeEnum getDataByNumber(Integer number) {
for (MerPlatformPeriodPayTypeEnum 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;
}
}

@ -0,0 +1,49 @@
package com.hfkj.sysenum;
import java.util.Objects;
/**
* 分期平台类型
* @author hurui
*/
public enum MerPlatformPeriodRateTypeEnum {
type1(1, "银联分期费率(1类银行)"),
type2(2, "银联分期费率(2类银行)"),
type3(3, "花呗分期费率"),
;
private Integer number;
private String name;
MerPlatformPeriodRateTypeEnum(int number, String name) {
this.number = number;
this.name = name;
}
public static MerPlatformPeriodRateTypeEnum getDataByNumber(Integer number) {
for (MerPlatformPeriodRateTypeEnum 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;
}
}

@ -0,0 +1,50 @@
package com.hfkj.sysenum;
import java.util.Objects;
/**
* 分期平台类型
* @author hurui
*/
public enum MerPlatformPeriodStatusEnum {
status0(0, "不可用"),
status1(1, "正常"),
status2(2, "审核中"),
status3(3, "审核驳回"),
;
private Integer number;
private String name;
MerPlatformPeriodStatusEnum(int number, String name) {
this.number = number;
this.name = name;
}
public static MerPlatformPeriodStatusEnum getDataByNumber(Integer number) {
for (MerPlatformPeriodStatusEnum 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;
}
}

@ -1,5 +1,6 @@
package com.hfkj.sysenum;
import java.util.List;
import java.util.Objects;
/**

Loading…
Cancel
Save