diff --git a/cweb/src/main/java/com/cweb/config/AuthConfig.java b/cweb/src/main/java/com/cweb/config/AuthConfig.java index 8262873..7bb8050 100644 --- a/cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -106,6 +106,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/storeDiscountActivityPartakeUser/*") .excludePathPatterns("/wechat/*") .excludePathPatterns("/cmsContent/*") + .excludePathPatterns("/merWithdrawal/notify") .excludePathPatterns("/common/*") .excludePathPatterns("/mer/*") .excludePathPatterns("/tradeOrder/calculation") diff --git a/cweb/src/main/java/com/cweb/controller/BsMerController.java b/cweb/src/main/java/com/cweb/controller/BsMerController.java index ba5dadc..65a1c28 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerController.java @@ -457,6 +457,8 @@ public class BsMerController { storeModel.setAgentName(mer.getAgentName()); storeModel.setSalesmanId(mer.getSalesmanId()); storeModel.setSalesmanName(mer.getSalesmanName()); + storeModel.setMerId(mer.getId()); + storeModel.setMerName(mer.getMerName()); storeModel.setStoreType(mer.getMerType()); storeModel.setStatus(StoreStatusEnum.status3.getNumber()); storeModel.setBlisUrl(mer.getBlisUrl()); diff --git a/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java b/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java index f1d5f8b..0ff4c50 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java @@ -31,7 +31,7 @@ import java.util.Map; * @date: 2023/4/21 **/ @Controller -@Api(value = "设备管理") +@Api(value = "商户分账功能") @RequestMapping(value = "/merLedger") public class BsMerLedgerController { @@ -88,11 +88,12 @@ public class BsMerLedgerController { } merLedger.setReceiverStatus(false); } else { - if (!merLedger.getStatus().equals(MerLedgerStatusEnum.status3.getNumber())) { + if (merLedger.getStatus().equals(MerLedgerStatusEnum.status1.getNumber()) + || merLedger.getStatus().equals(MerLedgerStatusEnum.status2.getNumber())) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法修改"); } - merLedger = new BsMerLedger(); merLedger.setMerId(merPlatform.getMerId()); + merLedger.setMerName(mer.getMerName()); merLedger.setPlatformType(merPlatform.getPlatformType()); merLedger.setPlatformNo(merPlatform.getPlatformNo()); merLedger.setCupNo(merPlatform.getCupNo()); diff --git a/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java b/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java index 588a8d6..86c8511 100644 --- a/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java +++ b/cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java @@ -137,24 +137,25 @@ public class BsMerSettleAcctController { } // 对私非法人结算 - if (merSettleAcct.getSettleType().equals(MerSettleType.status3.getNumber()) && - (StringUtils.isBlank(merSettleAcct.getSettleIdCardPortraitImg()) - || StringUtils.isBlank(merSettleAcct.getSettleIdCardNationalEmblemImg()) - || StringUtils.isBlank(merSettleAcct.getSettleIdCardName()) - || StringUtils.isBlank(merSettleAcct.getSettleIdCardNo()) - || StringUtils.isBlank(merSettleAcct.getSettleIdCardPeriodStart()) - || StringUtils.isBlank(merSettleAcct.getSettleIdCardPeriodEnd()) - || merSettleAcct.getSettleIdPeriodType() == null)) { - log.error("configMerBasis error!","参数错误"); - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "需要结算人身份证信息"); + if (merSettleAcct.getSettleType().equals(MerSettleType.status3.getNumber())) { + if (StringUtils.isBlank(merSettleAcct.getSettleIdCardPortraitImg()) + || StringUtils.isBlank(merSettleAcct.getCommissionImg()) + || StringUtils.isBlank(merSettleAcct.getSettleIdCardNationalEmblemImg()) + || StringUtils.isBlank(merSettleAcct.getSettleIdCardName()) + || StringUtils.isBlank(merSettleAcct.getSettleIdCardNo()) + || StringUtils.isBlank(merSettleAcct.getSettleIdCardPeriodStart()) + || StringUtils.isBlank(merSettleAcct.getSettleIdCardPeriodEnd()) + || merSettleAcct.getSettleIdPeriodType() == null) { + log.error("configMerBasis error!","参数错误"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "需要填写结算人身份证信息"); + } } else { // 对公结算、对私法人结算 merSettleAcct.setSettleIdCardName(bsMer.getLarName()); merSettleAcct.setSettleIdCardNo(bsMer.getLarIdCard()); - merSettleAcct.setSettleIdCardAddress(bsMer.getLarIdCardAddress()); merSettleAcct.setSettleIdCardPortraitImg(bsMer.getLarIdCardPortraitImg()); merSettleAcct.setSettleIdCardNationalEmblemImg(bsMer.getLarIdCardNationalEmblemImg()); - merSettleAcct.setSettleIdPeriodType(bsMer.getBlisPeriodType()); + merSettleAcct.setSettleIdPeriodType(bsMer.getLarIdCardPeriodType()); merSettleAcct.setSettleIdCardPeriodStart(bsMer.getLarIdCardPeriodStart()); merSettleAcct.setSettleIdCardPeriodEnd(bsMer.getLarIdCardPeriodEnd()); } diff --git a/cweb/src/main/java/com/cweb/controller/BsMerWithdrawalController.java b/cweb/src/main/java/com/cweb/controller/BsMerWithdrawalController.java new file mode 100644 index 0000000..fb95e29 --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/BsMerWithdrawalController.java @@ -0,0 +1,129 @@ +package com.cweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.utils.DateUtil; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsMer; +import com.hfkj.entity.BsMerPlatformNo; +import com.hfkj.entity.BsMerWithdrawal; +import com.hfkj.model.ResponseData; +import com.hfkj.service.BsMerPlatformNoService; +import com.hfkj.service.BsMerService; +import com.hfkj.service.BsMerWithdrawalService; +import com.hfkj.sysenum.MerWithdrawalStatusEnum; +import com.hfkj.sysenum.PlatformTypeEnum; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; + +/** + * @className: BsMerWithdrawalController + * @author: HuRui + * @date: 2023/6/8 + **/ +@Controller +@Api(value = "商户结算信息") +@RequestMapping(value = "/merWithdrawal") +public class BsMerWithdrawalController { + + private static Logger log = LoggerFactory.getLogger(BsMerWithdrawalController.class); + + @Resource + private BsMerWithdrawalService merWithdrawalService; + @Resource + private BsMerPlatformNoService merPlatformNoService; + @Resource + private BsMerService merService; + + @RequestMapping(value="/notify",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "提现通知") + public ResponseData notify(@RequestParam(value = "cupNo" , required = false) String cupNo, + @RequestBody String reqBody) { + try { + log.info("提款通知:", reqBody); + log.info("cupNo:", cupNo); + System.out.println(reqBody); + JSONObject respData = JSONObject.parseObject(reqBody); + + BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(cupNo); + // 查询提款 + BsMerWithdrawal merWithdrawal = merWithdrawalService.getDetailByDrawJnl(respData.getString("drawJnl")); + if (merWithdrawal == null) { + merWithdrawal = new BsMerWithdrawal(); + merWithdrawal.setPlatformType(PlatformTypeEnum.type1.getNumber()); + if (merPlatform != null) { + merWithdrawal.setMerId(merPlatform.getMerId()); + merWithdrawal.setMerNo(merPlatform.getMerNo()); + merWithdrawal.setPlatformNo(merPlatform.getPlatformNo()); + merWithdrawal.setCupNo(merPlatform.getCupNo()); + // 查询商户 + BsMer mer = merService.getMer(merPlatform.getMerId()); + if (mer != null) { + merWithdrawal.setMerName(mer.getMerName()); + } + } + } + merWithdrawal.setDrawJnl(respData.getString("drawJnl")); + merWithdrawal.setDrawAmt(respData.getBigDecimal("drawAmt")); + merWithdrawal.setDrawFee(respData.getBigDecimal("drawFee")); + merWithdrawal.setDrawMode(respData.getString("drawMode").equals("D0")?1:2); + merWithdrawal.setBatchAutoSettle(respData.getString("batchAutoSettle").equals("01")?1:2); + merWithdrawal.setBatchNo(respData.getString("batchNo")); + merWithdrawal.setAcctNo(respData.getString("acctNo")); + merWithdrawal.setAcctName(respData.getString("acctName")); + merWithdrawal.setSettleNo(respData.getString("settleNo")); + merWithdrawal.setBankNo(respData.getString("bankNo")); + merWithdrawal.setBankName(respData.getString("nbkName")); + merWithdrawal.setCreateTime(DateUtil.format(respData.getString("createdTime"), "yyyy-MM-dd HH:mm:ss")); + if (StringUtils.isNotBlank(respData.getString("completeTime"))) { + merWithdrawal.setCompleteTime(DateUtil.format(respData.getString("completeTime"), "yyyy-MM-dd HH:mm:ss")); + } + +/* DRAW.ACCEPTED 提款已受理 + DRAW.FREEZE 提款冻结 + DRAW.PROCESSING 提款处理中 + DRAW.SUCCESS 提款成功 + DRAW.FAILED 提款失败*/ + String drawState = respData.getString("drawState"); + if (drawState.equals("DRAW.ACCEPTED")) { + merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status1.getNumber()); + } else if (drawState.equals("DRAW.FREEZE")) { + merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status2.getNumber()); + } else if (drawState.equals("DRAW.PROCESSING")) { + merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status3.getNumber()); + } else if (drawState.equals("DRAW.SUCCESS")) { + merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status4.getNumber()); + } else if (drawState.equals("DRAW.FAILED")) { + merWithdrawal.setDrawStatus(MerWithdrawalStatusEnum.status5.getNumber()); + } + merWithdrawalService.editData(merWithdrawal); + return ResponseMsgUtil.success(null); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/getDetailByDrawJnl",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "根据提款流水号查询详情") + public ResponseData getDetailByDrawJnl(@RequestParam(value = "drawJnl" , required = true) String drawJnl) { + try { + + return ResponseMsgUtil.success(merWithdrawalService.getDetailByDrawJnl(drawJnl)); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index 0a5be32..503dcd1 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -197,14 +197,19 @@ public class TestController { @RequestMapping(value="/lklWithdraw",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "lklWithdraw") - public ResponseData lklWithdraw() { + public ResponseData lklWithdraw(@RequestParam(value = "cupNo", required = true) String cupNo) { try { // return ResponseMsgUtil.success(laKaLaWalletService.ewalletBalanceQuery("8226900581219V0", null,"01")); // return ResponseMsgUtil.success(laKaLaWalletService.ewalletWithdrawD1("8226900581219V0", new BigDecimal("30193.35"),"提现")); - // return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleProfile("8226900581219V0", "02","06")); + return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleProfile( + 1, + cupNo, + "02", + "06", + CommonSysConst.getSysConfig().getDomainName()+"/crest/merWithdrawal/notify?cupNo="+cupNo)); // return ResponseMsgUtil.success(laKaLaWalletService.ewalletWithdrawQuery("8226900581219V0", "230602150213408367448221")); - return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleQuery("8226900581219V0")); + // return ResponseMsgUtil.success(laKaLaWalletService.ewalletSettleQuery("8226900591200TC")); // return ResponseMsgUtil.success(laKaLaWalletService.activeSettleApply("8226900581219V0")); } catch (Exception e) { @@ -485,12 +490,12 @@ public class TestController { // externalCustomerNos.add("822690053310F6C"); // return ResponseMsgUtil.success(saasActivityService.customerRegisterActivity("73", "315653020019", "0",externalCustomerNos)); - return ResponseMsgUtil.success(saasActivityService.referee(code)); + // return ResponseMsgUtil.success(saasActivityService.referee(code)); /******* 配置活动费率 *******/ -/* String activityId = "73"; + String activityId = "73"; String externalCustomerNo = code; JSONArray jsonArray = saasActivityService.queryCustomerRates(activityId, externalCustomerNo); - return ResponseMsgUtil.success(jsonArray);*/ + return ResponseMsgUtil.success(jsonArray); /* Map rate; List> rates = new ArrayList<>(); diff --git a/cweb/src/main/java/com/cweb/notify/LaKaLaController.java b/cweb/src/main/java/com/cweb/notify/LaKaLaController.java index 4e07665..8f7e728 100644 --- a/cweb/src/main/java/com/cweb/notify/LaKaLaController.java +++ b/cweb/src/main/java/com/cweb/notify/LaKaLaController.java @@ -2,6 +2,8 @@ package com.cweb.notify; import com.alibaba.fastjson.JSONObject; import com.hfkj.channel.lakala.LaKaLaLedgerService; +import com.hfkj.channel.lakala.LaKaLaWalletService; +import com.hfkj.config.CommonSysConst; import com.hfkj.entity.*; import com.hfkj.service.*; import com.hfkj.sysenum.*; @@ -49,6 +51,8 @@ public class LaKaLaController { private BsMerLedgerReceiverApplyService merLedgerReceiverApplyService; @Resource private LaKaLaLedgerService laKaLaLedgerService; + @Resource + private LaKaLaWalletService laKaLaWalletService; @RequestMapping(value="/microPay",method = RequestMethod.POST) @ResponseBody @@ -141,11 +145,24 @@ public class LaKaLaController { // 审核状态 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); } - merLedgerService.editMerLedger(merLedger); } } diff --git a/open-api/src/main/java/com/api/controller/v1/MerController.java b/open-api/src/main/java/com/api/controller/v1/MerController.java index e0ea944..b81bd93 100644 --- a/open-api/src/main/java/com/api/controller/v1/MerController.java +++ b/open-api/src/main/java/com/api/controller/v1/MerController.java @@ -32,15 +32,16 @@ public class MerController { @RequestMapping(value="/wechatParamConf",method = RequestMethod.GET) @ResponseBody - @ApiOperation(value = "wechatParamConf") + @ApiOperation(value = "微信参数配置") public ResponseData wechatParamConf(@RequestParam(value = "merCupNo" , required = true) String merCupNo, + @RequestParam(value = "channlId" , required = true) String channlId, @RequestParam(value = "subMchId" , required = true) String subMchId, @RequestParam(value = "subAppid" , required = false) String subAppid, @RequestParam(value = "jsapiPath" , required = false) String jsapiPath, @RequestParam(value = "confType" , required = true) String confType) { try { // return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf("822690053111ERC", "569999133","wxf30043187dc90829", "http://api2.ctpark.cn/")); - return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf(merCupNo, subMchId,subAppid, jsapiPath,confType)); + return ResponseMsgUtil.success(laKaLaConfigService.wechatParamConf(merCupNo, channlId, subMchId,subAppid, jsapiPath,confType)); } catch (Exception e) { log.error(e.getMessage(), e); @@ -51,10 +52,11 @@ public class MerController { @RequestMapping(value="/querySubMerInfo",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "querySubMerInfo") - public ResponseData querySubMerInfo(@RequestParam(value = "merCupNo" , required = true) String merCupNo) { + public ResponseData querySubMerInfo(@RequestParam(value = "channlId" , required = true) String channlId, + @RequestParam(value = "merCupNo" , required = true) String merCupNo) { try { - return ResponseMsgUtil.success(laKaLaConfigService.querySubMerInfo(merCupNo)); + return ResponseMsgUtil.success(laKaLaConfigService.querySubMerInfo(channlId,merCupNo)); } catch (Exception e) { log.error(e.getMessage(), e); @@ -62,4 +64,19 @@ public class MerController { } } + + @RequestMapping(value="/queryWechatConfig",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "微信服务商子商户开发配置查询") + public ResponseData queryWechatConfig(@RequestParam(value = "subMchId" , required = true) String subMchId, + @RequestParam(value = "merCupNo" , required = true) String merCupNo) { + try { + + return ResponseMsgUtil.success(laKaLaConfigService.queryWechatConfig(subMchId,merCupNo)); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } } diff --git a/open-api/src/main/java/com/api/controller/v1/NotifyController.java b/open-api/src/main/java/com/api/controller/v1/NotifyController.java index 6dd5f24..fb075f6 100644 --- a/open-api/src/main/java/com/api/controller/v1/NotifyController.java +++ b/open-api/src/main/java/com/api/controller/v1/NotifyController.java @@ -49,7 +49,7 @@ public class NotifyController { public void lakala(@RequestBody String reqBody, HttpServletResponse response) { try { log.info("========= Start 拉卡拉交易通知 Start ==========="); - log.info("平台接收拉卡拉交易通知:", reqBody); + log.info("平台接收拉卡拉交易通知:" + reqBody); System.out.println(reqBody); JSONObject body = JSONObject.parseObject(reqBody); @@ -88,14 +88,18 @@ public class NotifyController { responseQueryTradeModel.setAttach(tradeOrder.getAttach()); responseQueryTradeModel.setSign(SignatureUtil.createSign(responseQueryTradeModel, merKeyService.getKeyByMerNo(tradeOrder.getMerNo()))); - log.info("发送URL:", order.getPayNotifyUrl()); - log.info("发送参数:", JSONObject.toJSONString(responseQueryTradeModel)); + log.info("发送URL:" + order.getPayNotifyUrl()); + log.info("发送参数:" + JSONObject.toJSONString(responseQueryTradeModel)); JSONObject result = HttpsUtils.doPost(order.getPayNotifyUrl(), JSONObject.toJSONString(responseQueryTradeModel)); - log.info("响应参数:", result); - BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream()); - out.write(result.toJSONString().getBytes()); - out.flush(); - out.close(); + if (result != null) { + log.info("响应参数:" + result); + BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream()); + out.write(result.toJSONString().getBytes()); + out.flush(); + out.close(); + } else { + log.info("响应参数:null"); + } } } catch (Exception e) { diff --git a/open-api/src/main/resources/prod-9606/application.yml b/open-api/src/main/resources/prod-9606/application.yml new file mode 100644 index 0000000..c665fba --- /dev/null +++ b/open-api/src/main/resources/prod-9606/application.yml @@ -0,0 +1,95 @@ +server: + port: 9606 + servlet: + context-path: /openApi + +#配置是否为debug模式,debug模式下,不开启权限校验 +debug: false + +#datasource数据源设置 +spring: + datasource: + url: jdbc:mysql://192.168.0.63:21100/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: gratia_pay + password: HUfukeji123456!@# + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 10 + initialSize: 5 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + + redis: + database: 2 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 + #配置日期返回至前台为时间戳 + jackson: + serialization: + write-dates-as-timestamps: true + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://140.210.192.36:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: abcd123! + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + database: 2 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + +mybatis: + mapperLocations: + - classpath*:sqlmap*/*.xml + type-aliases-package: + org.springboot.sample.entity + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/open-api/src/main/resources/prod-9606/config.properties b/open-api/src/main/resources/prod-9606/config.properties new file mode 100644 index 0000000..185a8ae --- /dev/null +++ b/open-api/src/main/resources/prod-9606/config.properties @@ -0,0 +1,11 @@ +fileUrl=/home/project/gratia-pay/filesystem +cmsPath=/home/project/gratia-pay/filesystem/cmsPath + +wxAppId=wxa075e8509802f826 +wxAppSecret=0e606fc1378d35e359fcf3f15570b2c5 + +// WeChat service provider +wxUnifiedOrderUrl=https://api.mch.weixin.qq.com/pay/unifiedorder +wxMchAppId=wx637bd6f7314daa46 +wxApiKey=Skufk5oi85wDFGl888i6wsRSTkdd5df5 +wxMchId=1289663601 diff --git a/open-api/src/main/resources/prod-9606/logback.xml b/open-api/src/main/resources/prod-9606/logback.xml new file mode 100644 index 0000000..3d88a9d --- /dev/null +++ b/open-api/src/main/resources/prod-9606/logback.xml @@ -0,0 +1,178 @@ + + + + + %d %p (%file:%line\)- %m%n + UTF-8 + + + + log/base.log + + log/base.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/dao.log + + log/dao.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/error.log + + log/error.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + + + + + + + + + log/alipay/alipaylog.log + + log/alipay.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + log/hsg.log + + log/hsg/hsg.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + log/requestV1.log + + log/requestV1/requestV1.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + log/laklalog.log + + log/laklalog/laklalog.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + log/lklTradeNotify.log + + log/lklTradeNotify/lklTradeNotify.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + diff --git a/schedule/src/main/java/com/hfkj/schedule/Merchant.java b/schedule/src/main/java/com/hfkj/schedule/Merchant.java index cfb2e2b..05e035c 100644 --- a/schedule/src/main/java/com/hfkj/schedule/Merchant.java +++ b/schedule/src/main/java/com/hfkj/schedule/Merchant.java @@ -265,7 +265,7 @@ public class Merchant { merLedger.setPlatformType(merPlatform.getPlatformType()); merLedger.setPlatformNo(merPlatform.getPlatformNo()); merLedger.setCupNo(merPlatform.getCupNo()); - merLedger.setStatus(MerLedgerStatusEnum.status2.getNumber()); + merLedger.setStatus(MerLedgerStatusEnum.status4.getNumber()); merLedger.setReceiverStatus(false); merLedgerService.editMerLedger(merLedger); diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java index d86209d..da27dd9 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java @@ -29,7 +29,7 @@ public class LaKaLaConfigService { * @param confType 配置类型 配置类型 类型=SUB_APPID时,subAppid必传, 类型=SUBSCRIBE_APPID时,subscribeAppid必传 ,类型=UNION时,subAppid和subscribeAppid必传 类型=JSAPI_PATH时,jsapiPath必传 * @return */ - public JSONObject wechatParamConf(String merCupNo,String subMchId,String subAppid,String jsapiPath,String confType) { + public JSONObject wechatParamConf(String merCupNo,String channlId,String subMchId,String subAppid,String jsapiPath,String confType) { // 请求参数 Map param = new HashMap<>(); param.put("timestamp", new Date().getTime()); @@ -39,8 +39,7 @@ public class LaKaLaConfigService { Map map = new HashMap<>(); map.put("merCupNo", merCupNo); - // map.put("channlId", "24006513"); // 微信渠道号 (仅支持拉卡拉渠道配置) - map.put("channlId", "167048649"); // 微信渠道号 (仅支持拉卡拉渠道配置) + map.put("channlId", channlId); // 微信渠道号 (仅支持拉卡拉渠道配置) map.put("subMchId", subMchId); map.put("subAppid", subAppid); map.put("jsapiPath", jsapiPath); @@ -70,7 +69,7 @@ public class LaKaLaConfigService { * @param merCupNo * @return */ - public JSONObject querySubMerInfo(String merCupNo) { + public JSONObject querySubMerInfo(String channlId,String merCupNo) { // 请求参数 Map param = new HashMap<>(); param.put("timestamp", new Date().getTime()); @@ -81,7 +80,7 @@ public class LaKaLaConfigService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", new Date().getTime()); - map.put("orgCode", CommonSysConst.getSysConfig().getLkl_org_code()); + map.put("orgCode", channlId); map.put("merCupNo", merCupNo); map.put("registerStatus", "SUCCESS"); param.put("reqData", map); @@ -103,4 +102,39 @@ public class LaKaLaConfigService { return responseBody.getJSONObject("respData"); } + /** + * 商户报备结果查询 + * @param merCupNo + * @return + */ + public JSONObject queryWechatConfig(String subMerchantId,String merCupNo) { + // 请求参数 + Map param = new HashMap<>(); + param.put("timestamp", new Date().getTime()); + param.put("ver", "1.0.0"); + param.put("reqId", GenerateUtil.generateRandomString(18)); + + Map map = new HashMap<>(); + map.put("tradeMode", "WECHAT"); + map.put("subMerchantId", subMerchantId); + map.put("merchantNo", merCupNo); + param.put("reqData", map); + + // 生成签名 + Map reqParam = LaKaLaConfig.generateSignParamsV2(JSONObject.parseObject(JSONObject.toJSONString(param))); + + // 头部参数 + Map heard = new HashMap<>(); + heard.put("Authorization", reqParam.get("Authorization")); + + JSONObject responseBody = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLkl_request_url() + "/api/v2/mms/sme/queryWechatConfig", param, heard); + System.out.println("Authorization" + JSONObject.toJSONString(reqParam.get("Authorization"))); + System.out.println("request:" + JSONObject.toJSONString(param)); + System.out.println("response:" + responseBody.toJSONString()); + if (!responseBody.getString("retCode").equals("000000")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseBody.getString("retMsg")); + } + return responseBody.getJSONObject("respData"); + } + } diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java index 1238883..cce9302 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java @@ -46,6 +46,8 @@ public class LaKaLaLedgerService { private BsMerAttachService merAttachService; @Resource private BsMerPlatformNoService merPlatformNoService; + @Resource + private CommonService commonService; /** * 商户分账业务开通申请 @@ -63,7 +65,10 @@ public class LaKaLaLedgerService { if (mer == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } - + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -73,7 +78,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", orderNo); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("merCupNo", merLedger.getCupNo()); map.put("contactMobile", mer.getRegPhone()); map.put("splitLowestRatio", merLedger.getSplitLowestRatio()); @@ -124,6 +129,11 @@ public class LaKaLaLedgerService { if (mer == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } + Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -133,7 +143,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", orderNo); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("receiverNo", merLedger.getReceiverNo()); map.put("merCupNo", merLedger.getCupNo()); map.put("contactMobile", mer.getRegPhone()); @@ -188,7 +198,10 @@ public class LaKaLaLedgerService { if (mer == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } - + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -198,7 +211,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", orderNo); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("merCupNo", merLedger.getCupNo()); map.put("contactMobile", mer.getRegPhone()); map.put("splitLowestRatio", merLedger.getSplitLowestRatio()); @@ -254,6 +267,10 @@ public class LaKaLaLedgerService { if (mer == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -263,7 +280,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", orderNo); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("merCupNo", merCupNo); commonParam.put("reqData", map); @@ -292,6 +309,10 @@ public class LaKaLaLedgerService { if (merDetail == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } + SecDictionary org = commonService.mappingSysCode("ORG_NO", merDetail.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -300,7 +321,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", System.currentTimeMillis()+""); - map.put("orgCode", merDetail.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("receiverName", merDetail.getMerName()); map.put("contactMobile", merDetail.getRegPhone()); map.put("acctTypeCode", merDetail.getMerSettleAcct().getSettleType().equals(MerSettleType.status1.getNumber())?57:58);// 57:对公 58:对私 @@ -373,6 +394,10 @@ public class LaKaLaLedgerService { if (merDetail == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } + SecDictionary org = commonService.mappingSysCode("ORG_NO", merDetail.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -381,7 +406,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", System.currentTimeMillis()+""); - map.put("orgCode", merDetail.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("receiverNo", "1"); map.put("receiverName", merDetail.getMerName()); map.put("contactMobile", merDetail.getRegPhone()); @@ -447,6 +472,10 @@ public class LaKaLaLedgerService { if (mer == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -455,7 +484,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", System.currentTimeMillis()+""); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("merCupNo", merLedgerReceiver.getCupNo()); map.put("receiverNo", merLedgerReceiver.getReceiverNo()); @@ -508,6 +537,10 @@ public class LaKaLaLedgerService { if (mer == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } Map commonParam = new HashMap<>(); commonParam.put("reqTime", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "1.0.0"); @@ -516,7 +549,7 @@ public class LaKaLaLedgerService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", System.currentTimeMillis()+""); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("merCupNo", merLedgerReceiver.getCupNo()); map.put("receiverNo", merLedgerReceiver.getReceiverNo()); String base64ImgUrl = ImageUtils.getBase64ByImgUrl(CommonSysConst.getSysConfig().getObs_url() + merLedgerReceiver.getRelieveEntrustFilePath()); diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java index 9413fc5..06aaf0d 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java @@ -40,6 +40,8 @@ public class LaKaLaTradeSeparateService { private BsTradeOrderProfitSharingReceiverService tradeOrderProfitSharingReceiverService; @Resource private BsMerService merService; + @Resource + private CommonService commonService; /** * 发起分账 @@ -63,6 +65,11 @@ public class LaKaLaTradeSeparateService { // 分账接收方 List profitSharingReceiverList = tradeOrderProfitSharingReceiverService.getReceiverListByProfitSharingId(tradeOrderProfitSharing.getId()); + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } + Map commonParam = new HashMap<>(); commonParam.put("req_time", DateUtil.format(new Date(), "yyyyMMddHHmmss")); commonParam.put("version", "3.0"); @@ -73,7 +80,7 @@ public class LaKaLaTradeSeparateService { map.put("log_date", DateUtil.date2String(tradeOrder.getPayTime(), "yyyyMMdd")); map.put("out_separate_no", tradeOrderProfitSharing.getProfitSharingOrderNo()); map.put("total_amt", tradeOrderProfitSharing.getProfitSharingAmoun().multiply(new BigDecimal("100")).longValue()); - map.put("lkl_org_no", mer.getOrgNo()); + map.put("lkl_org_no", org.getExt1()); map.put("cal_type", "0"); List> recvDatasMapList = new ArrayList<>(); diff --git a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java index 1d96640..6d426a6 100644 --- a/service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java +++ b/service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java @@ -9,9 +9,13 @@ import com.hfkj.common.utils.GenerateUtil; import com.hfkj.common.utils.HttpsUtils; import com.hfkj.config.CommonSysConst; import com.hfkj.entity.BsMer; +import com.hfkj.entity.BsMerLedger; import com.hfkj.entity.BsMerPlatformNo; +import com.hfkj.entity.SecDictionary; +import com.hfkj.service.BsMerLedgerService; import com.hfkj.service.BsMerPlatformNoService; import com.hfkj.service.BsMerService; +import com.hfkj.service.CommonService; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -30,7 +34,11 @@ public class LaKaLaWalletService { @Resource private BsMerPlatformNoService merPlatformNoService; @Resource + private BsMerLedgerService merLedgerService; + @Resource private BsMerService merService; + @Resource + private CommonService commonService; /** * 商户开通主动结算业务 @@ -43,7 +51,15 @@ public class LaKaLaWalletService { if (merPlatform == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); } + // 商户平台 BsMer mer = merService.getMer(merPlatform.getMerId()); + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } // 请求参数 Map param = new HashMap<>(); @@ -55,7 +71,7 @@ public class LaKaLaWalletService { Map map = new HashMap<>(); map.put("version", "1.0"); map.put("orderNo", System.currentTimeMillis()+""); - map.put("orgCode", mer.getOrgNo()); + map.put("orgCode", org.getExt1()); map.put("merCupNo", merCupNo); param.put("reqData", map); @@ -87,7 +103,15 @@ public class LaKaLaWalletService { if (merPlatform == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); } + // 商户平台 BsMer mer = merService.getMer(merPlatform.getMerId()); + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } // 请求参数 Map param = new HashMap<>(); @@ -97,7 +121,7 @@ public class LaKaLaWalletService { param.put("reqId", new Date().getTime()); Map map = new HashMap<>(); - map.put("orgNo", mer.getOrgNo()); + map.put("orgNo", org.getExt1()); map.put("merchantNo", merCupNo); map.put("drawAmt", drawAmt); map.put("notifyUrl", ""); @@ -134,7 +158,15 @@ public class LaKaLaWalletService { if (merPlatform == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); } + // 商户平台 BsMer mer = merService.getMer(merPlatform.getMerId()); + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } // 请求参数 Map param = new HashMap<>(); @@ -144,7 +176,7 @@ public class LaKaLaWalletService { param.put("reqId", new Date().getTime()); Map map = new HashMap<>(); - map.put("orgNo", mer.getOrgNo()); + map.put("orgNo", org.getExt1()); map.put("merchantNo", merCupNo); map.put("payNo", payNo); map.put("payType", payType); @@ -178,7 +210,15 @@ public class LaKaLaWalletService { if (merPlatform == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); } + // 商户平台 BsMer mer = merService.getMer(merPlatform.getMerId()); + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } // 请求参数 Map param = new HashMap<>(); @@ -188,7 +228,7 @@ public class LaKaLaWalletService { param.put("reqId", new Date().getTime()); Map map = new HashMap<>(); - map.put("orgNo", mer.getOrgNo()); + map.put("orgNo", org.getExt1()); map.put("merchantNo", merCupNo); map.put("drawJnl", drawJnl); param.put("reqData", map); @@ -212,18 +252,41 @@ public class LaKaLaWalletService { /** * 账管家提款模式设置 + * @param merCupType 商户号类型 1:商户号 2:分账接收方账户 * @param merCupNo 商户号 * @param settleType 提款模式(01主动提款 02自动结算) * @param settleTime 结算时间(小时)- 默认值:06。如08:00-09:00到账,则传入08 + * @param notifyUrl 通知地址 * @return */ - public JSONObject ewalletSettleProfile(String merCupNo, String settleType, String settleTime) { - // 查询平台商户号 - BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); - if (merPlatform == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); + public JSONObject ewalletSettleProfile(Integer merCupType,String merCupNo, String settleType, String settleTime,String notifyUrl) { + BsMer mer = null; + + if (merCupType.equals(1)) { + // 查询平台商户号 + BsMerPlatformNo merPlatform = merPlatformNoService.getPlatformNoByCupNo(merCupNo); + if (merPlatform == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); + } + // 商户平台 + mer = merService.getMer(merPlatform.getMerId()); + + } else if (merCupType.equals(2)) { + // 查询分账信息 + BsMerLedger merLedger = merLedgerService.getMerLedgerByReceiverNo(merCupNo); + if (merLedger == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户分账信息"); + } + // 商户平台 + mer = merService.getMer(merLedger.getMerId()); + } + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); } - BsMer mer = merService.getMer(merPlatform.getMerId()); // 请求参数 Map param = new HashMap<>(); @@ -233,11 +296,11 @@ public class LaKaLaWalletService { param.put("reqId", new Date().getTime()); Map map = new HashMap<>(); - map.put("bmcpNo", mer.getOrgNo()); + map.put("bmcpNo", org.getExt1()); map.put("mercId", merCupNo); map.put("settleType", settleType); map.put("settleTime", settleTime); - map.put("notifyUrl", null); + map.put("notifyUrl", notifyUrl); param.put("reqData", map); // 生成签名 @@ -268,8 +331,15 @@ public class LaKaLaWalletService { if (merPlatform == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到平台商户号"); } + // 商户平台 BsMer mer = merService.getMer(merPlatform.getMerId()); - + if (mer == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + SecDictionary org = commonService.mappingSysCode("ORG_NO", mer.getOrgNo()); + if (org == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的机构"); + } // 请求参数 Map param = new HashMap<>(); param.put("timestamp", new Date().getTime()); @@ -278,7 +348,7 @@ public class LaKaLaWalletService { param.put("reqId", new Date().getTime()); Map map = new HashMap<>(); - map.put("bmcpNo", mer.getOrgNo()); + map.put("bmcpNo", org.getExt1()); map.put("mercId", merCupNo); param.put("reqData", map); diff --git a/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java b/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java index 79d2696..a8bf849 100644 --- a/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java +++ b/service/src/main/java/com/hfkj/channel/saas/SaasMerService.java @@ -327,6 +327,13 @@ public class SaasMerService { attachmentsMapList.add(attachmentsMap); } + if (StringUtils.isNotBlank(merSettleAcctApply.getCommissionImg())) { + attachmentsMap = new HashMap<>(); + attachmentsMap.put("imgType", "OTHERS"); + attachmentsMap.put("imgPath", saasCommon.fileUpload(new File(CommonSysConst.getSysConfig().getFile_url() +"/"+ merSettleAcctApply.getCommissionImg()), "OTHERS", "0").getString("url")); + attachmentsMapList.add(attachmentsMap); + } + param.put("attachments", attachmentsMapList); Map header = new HashMap<>(); diff --git a/service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapper.java b/service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapper.java new file mode 100644 index 0000000..eaa59e9 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapper.java @@ -0,0 +1,183 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerWithdrawal; +import com.hfkj.entity.BsMerWithdrawalExample; +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 BsMerWithdrawalMapper extends BsMerWithdrawalMapperExt { + @SelectProvider(type=BsMerWithdrawalSqlProvider.class, method="countByExample") + long countByExample(BsMerWithdrawalExample example); + + @DeleteProvider(type=BsMerWithdrawalSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMerWithdrawalExample example); + + @Delete({ + "delete from bs_mer_withdrawal", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_mer_withdrawal (mer_id, mer_no, ", + "mer_name, platform_type, ", + "platform_no, cup_no, ", + "mer_order_no, draw_jnl, ", + "draw_amt, draw_fee, ", + "draw_mode, batch_auto_settle, ", + "batch_no, acct_no, ", + "acct_name, bank_no, ", + "settle_no, bank_name, ", + "draw_status, create_time, ", + "update_time, complete_time, ", + "ext_1, ext_2, ext_3)", + "values (#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, ", + "#{merName,jdbcType=VARCHAR}, #{platformType,jdbcType=INTEGER}, ", + "#{platformNo,jdbcType=VARCHAR}, #{cupNo,jdbcType=VARCHAR}, ", + "#{merOrderNo,jdbcType=INTEGER}, #{drawJnl,jdbcType=VARCHAR}, ", + "#{drawAmt,jdbcType=DECIMAL}, #{drawFee,jdbcType=DECIMAL}, ", + "#{drawMode,jdbcType=INTEGER}, #{batchAutoSettle,jdbcType=INTEGER}, ", + "#{batchNo,jdbcType=VARCHAR}, #{acctNo,jdbcType=VARCHAR}, ", + "#{acctName,jdbcType=VARCHAR}, #{bankNo,jdbcType=VARCHAR}, ", + "#{settleNo,jdbcType=VARCHAR}, #{bankName,jdbcType=VARCHAR}, ", + "#{drawStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{completeTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMerWithdrawal record); + + @InsertProvider(type=BsMerWithdrawalSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMerWithdrawal record); + + @SelectProvider(type=BsMerWithdrawalSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), + @Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR), + @Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_order_no", property="merOrderNo", jdbcType=JdbcType.INTEGER), + @Result(column="draw_jnl", property="drawJnl", jdbcType=JdbcType.VARCHAR), + @Result(column="draw_amt", property="drawAmt", jdbcType=JdbcType.DECIMAL), + @Result(column="draw_fee", property="drawFee", jdbcType=JdbcType.DECIMAL), + @Result(column="draw_mode", property="drawMode", jdbcType=JdbcType.INTEGER), + @Result(column="batch_auto_settle", property="batchAutoSettle", jdbcType=JdbcType.INTEGER), + @Result(column="batch_no", property="batchNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acct_no", property="acctNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acct_name", property="acctName", jdbcType=JdbcType.VARCHAR), + @Result(column="bank_no", property="bankNo", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_no", property="settleNo", jdbcType=JdbcType.VARCHAR), + @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR), + @Result(column="draw_status", property="drawStatus", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="complete_time", property="completeTime", 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 selectByExample(BsMerWithdrawalExample example); + + @Select({ + "select", + "id, mer_id, mer_no, mer_name, platform_type, platform_no, cup_no, mer_order_no, ", + "draw_jnl, draw_amt, draw_fee, draw_mode, batch_auto_settle, batch_no, acct_no, ", + "acct_name, bank_no, settle_no, bank_name, draw_status, create_time, update_time, ", + "complete_time, ext_1, ext_2, ext_3", + "from bs_mer_withdrawal", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), + @Result(column="platform_no", property="platformNo", jdbcType=JdbcType.VARCHAR), + @Result(column="cup_no", property="cupNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_order_no", property="merOrderNo", jdbcType=JdbcType.INTEGER), + @Result(column="draw_jnl", property="drawJnl", jdbcType=JdbcType.VARCHAR), + @Result(column="draw_amt", property="drawAmt", jdbcType=JdbcType.DECIMAL), + @Result(column="draw_fee", property="drawFee", jdbcType=JdbcType.DECIMAL), + @Result(column="draw_mode", property="drawMode", jdbcType=JdbcType.INTEGER), + @Result(column="batch_auto_settle", property="batchAutoSettle", jdbcType=JdbcType.INTEGER), + @Result(column="batch_no", property="batchNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acct_no", property="acctNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acct_name", property="acctName", jdbcType=JdbcType.VARCHAR), + @Result(column="bank_no", property="bankNo", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_no", property="settleNo", jdbcType=JdbcType.VARCHAR), + @Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR), + @Result(column="draw_status", property="drawStatus", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="complete_time", property="completeTime", 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) + }) + BsMerWithdrawal selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMerWithdrawalSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMerWithdrawal record, @Param("example") BsMerWithdrawalExample example); + + @UpdateProvider(type=BsMerWithdrawalSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMerWithdrawal record, @Param("example") BsMerWithdrawalExample example); + + @UpdateProvider(type=BsMerWithdrawalSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMerWithdrawal record); + + @Update({ + "update bs_mer_withdrawal", + "set mer_id = #{merId,jdbcType=BIGINT},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "platform_type = #{platformType,jdbcType=INTEGER},", + "platform_no = #{platformNo,jdbcType=VARCHAR},", + "cup_no = #{cupNo,jdbcType=VARCHAR},", + "mer_order_no = #{merOrderNo,jdbcType=INTEGER},", + "draw_jnl = #{drawJnl,jdbcType=VARCHAR},", + "draw_amt = #{drawAmt,jdbcType=DECIMAL},", + "draw_fee = #{drawFee,jdbcType=DECIMAL},", + "draw_mode = #{drawMode,jdbcType=INTEGER},", + "batch_auto_settle = #{batchAutoSettle,jdbcType=INTEGER},", + "batch_no = #{batchNo,jdbcType=VARCHAR},", + "acct_no = #{acctNo,jdbcType=VARCHAR},", + "acct_name = #{acctName,jdbcType=VARCHAR},", + "bank_no = #{bankNo,jdbcType=VARCHAR},", + "settle_no = #{settleNo,jdbcType=VARCHAR},", + "bank_name = #{bankName,jdbcType=VARCHAR},", + "draw_status = #{drawStatus,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "complete_time = #{completeTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMerWithdrawal record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapperExt.java new file mode 100644 index 0000000..e11a0d9 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMerWithdrawalMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerWithdrawalSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerWithdrawalSqlProvider.java new file mode 100644 index 0000000..8f073f8 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerWithdrawalSqlProvider.java @@ -0,0 +1,528 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerWithdrawal; +import com.hfkj.entity.BsMerWithdrawalExample.Criteria; +import com.hfkj.entity.BsMerWithdrawalExample.Criterion; +import com.hfkj.entity.BsMerWithdrawalExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMerWithdrawalSqlProvider { + + public String countByExample(BsMerWithdrawalExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_mer_withdrawal"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMerWithdrawalExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_mer_withdrawal"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMerWithdrawal record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_mer_withdrawal"); + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformNo() != null) { + sql.VALUES("platform_no", "#{platformNo,jdbcType=VARCHAR}"); + } + + if (record.getCupNo() != null) { + sql.VALUES("cup_no", "#{cupNo,jdbcType=VARCHAR}"); + } + + if (record.getMerOrderNo() != null) { + sql.VALUES("mer_order_no", "#{merOrderNo,jdbcType=INTEGER}"); + } + + if (record.getDrawJnl() != null) { + sql.VALUES("draw_jnl", "#{drawJnl,jdbcType=VARCHAR}"); + } + + if (record.getDrawAmt() != null) { + sql.VALUES("draw_amt", "#{drawAmt,jdbcType=DECIMAL}"); + } + + if (record.getDrawFee() != null) { + sql.VALUES("draw_fee", "#{drawFee,jdbcType=DECIMAL}"); + } + + if (record.getDrawMode() != null) { + sql.VALUES("draw_mode", "#{drawMode,jdbcType=INTEGER}"); + } + + if (record.getBatchAutoSettle() != null) { + sql.VALUES("batch_auto_settle", "#{batchAutoSettle,jdbcType=INTEGER}"); + } + + if (record.getBatchNo() != null) { + sql.VALUES("batch_no", "#{batchNo,jdbcType=VARCHAR}"); + } + + if (record.getAcctNo() != null) { + sql.VALUES("acct_no", "#{acctNo,jdbcType=VARCHAR}"); + } + + if (record.getAcctName() != null) { + sql.VALUES("acct_name", "#{acctName,jdbcType=VARCHAR}"); + } + + if (record.getBankNo() != null) { + sql.VALUES("bank_no", "#{bankNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleNo() != null) { + sql.VALUES("settle_no", "#{settleNo,jdbcType=VARCHAR}"); + } + + if (record.getBankName() != null) { + sql.VALUES("bank_name", "#{bankName,jdbcType=VARCHAR}"); + } + + if (record.getDrawStatus() != null) { + sql.VALUES("draw_status", "#{drawStatus,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCompleteTime() != null) { + sql.VALUES("complete_time", "#{completeTime,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(BsMerWithdrawalExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_id"); + sql.SELECT("mer_no"); + sql.SELECT("mer_name"); + sql.SELECT("platform_type"); + sql.SELECT("platform_no"); + sql.SELECT("cup_no"); + sql.SELECT("mer_order_no"); + sql.SELECT("draw_jnl"); + sql.SELECT("draw_amt"); + sql.SELECT("draw_fee"); + sql.SELECT("draw_mode"); + sql.SELECT("batch_auto_settle"); + sql.SELECT("batch_no"); + sql.SELECT("acct_no"); + sql.SELECT("acct_name"); + sql.SELECT("bank_no"); + sql.SELECT("settle_no"); + sql.SELECT("bank_name"); + sql.SELECT("draw_status"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("complete_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_mer_withdrawal"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMerWithdrawal record = (BsMerWithdrawal) parameter.get("record"); + BsMerWithdrawalExample example = (BsMerWithdrawalExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_mer_withdrawal"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,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.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + 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.getCupNo() != null) { + sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}"); + } + + if (record.getMerOrderNo() != null) { + sql.SET("mer_order_no = #{record.merOrderNo,jdbcType=INTEGER}"); + } + + if (record.getDrawJnl() != null) { + sql.SET("draw_jnl = #{record.drawJnl,jdbcType=VARCHAR}"); + } + + if (record.getDrawAmt() != null) { + sql.SET("draw_amt = #{record.drawAmt,jdbcType=DECIMAL}"); + } + + if (record.getDrawFee() != null) { + sql.SET("draw_fee = #{record.drawFee,jdbcType=DECIMAL}"); + } + + if (record.getDrawMode() != null) { + sql.SET("draw_mode = #{record.drawMode,jdbcType=INTEGER}"); + } + + if (record.getBatchAutoSettle() != null) { + sql.SET("batch_auto_settle = #{record.batchAutoSettle,jdbcType=INTEGER}"); + } + + if (record.getBatchNo() != null) { + sql.SET("batch_no = #{record.batchNo,jdbcType=VARCHAR}"); + } + + if (record.getAcctNo() != null) { + sql.SET("acct_no = #{record.acctNo,jdbcType=VARCHAR}"); + } + + if (record.getAcctName() != null) { + sql.SET("acct_name = #{record.acctName,jdbcType=VARCHAR}"); + } + + if (record.getBankNo() != null) { + sql.SET("bank_no = #{record.bankNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleNo() != null) { + sql.SET("settle_no = #{record.settleNo,jdbcType=VARCHAR}"); + } + + if (record.getBankName() != null) { + sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}"); + } + + if (record.getDrawStatus() != null) { + sql.SET("draw_status = #{record.drawStatus,jdbcType=INTEGER}"); + } + + 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.getCompleteTime() != null) { + sql.SET("complete_time = #{record.completeTime,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 parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_mer_withdrawal"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); + sql.SET("platform_no = #{record.platformNo,jdbcType=VARCHAR}"); + sql.SET("cup_no = #{record.cupNo,jdbcType=VARCHAR}"); + sql.SET("mer_order_no = #{record.merOrderNo,jdbcType=INTEGER}"); + sql.SET("draw_jnl = #{record.drawJnl,jdbcType=VARCHAR}"); + sql.SET("draw_amt = #{record.drawAmt,jdbcType=DECIMAL}"); + sql.SET("draw_fee = #{record.drawFee,jdbcType=DECIMAL}"); + sql.SET("draw_mode = #{record.drawMode,jdbcType=INTEGER}"); + sql.SET("batch_auto_settle = #{record.batchAutoSettle,jdbcType=INTEGER}"); + sql.SET("batch_no = #{record.batchNo,jdbcType=VARCHAR}"); + sql.SET("acct_no = #{record.acctNo,jdbcType=VARCHAR}"); + sql.SET("acct_name = #{record.acctName,jdbcType=VARCHAR}"); + sql.SET("bank_no = #{record.bankNo,jdbcType=VARCHAR}"); + sql.SET("settle_no = #{record.settleNo,jdbcType=VARCHAR}"); + sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}"); + sql.SET("draw_status = #{record.drawStatus,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("complete_time = #{record.completeTime,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}"); + + BsMerWithdrawalExample example = (BsMerWithdrawalExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMerWithdrawal record) { + SQL sql = new SQL(); + sql.UPDATE("bs_mer_withdrawal"); + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.SET("platform_type = #{platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformNo() != null) { + sql.SET("platform_no = #{platformNo,jdbcType=VARCHAR}"); + } + + if (record.getCupNo() != null) { + sql.SET("cup_no = #{cupNo,jdbcType=VARCHAR}"); + } + + if (record.getMerOrderNo() != null) { + sql.SET("mer_order_no = #{merOrderNo,jdbcType=INTEGER}"); + } + + if (record.getDrawJnl() != null) { + sql.SET("draw_jnl = #{drawJnl,jdbcType=VARCHAR}"); + } + + if (record.getDrawAmt() != null) { + sql.SET("draw_amt = #{drawAmt,jdbcType=DECIMAL}"); + } + + if (record.getDrawFee() != null) { + sql.SET("draw_fee = #{drawFee,jdbcType=DECIMAL}"); + } + + if (record.getDrawMode() != null) { + sql.SET("draw_mode = #{drawMode,jdbcType=INTEGER}"); + } + + if (record.getBatchAutoSettle() != null) { + sql.SET("batch_auto_settle = #{batchAutoSettle,jdbcType=INTEGER}"); + } + + if (record.getBatchNo() != null) { + sql.SET("batch_no = #{batchNo,jdbcType=VARCHAR}"); + } + + if (record.getAcctNo() != null) { + sql.SET("acct_no = #{acctNo,jdbcType=VARCHAR}"); + } + + if (record.getAcctName() != null) { + sql.SET("acct_name = #{acctName,jdbcType=VARCHAR}"); + } + + if (record.getBankNo() != null) { + sql.SET("bank_no = #{bankNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleNo() != null) { + sql.SET("settle_no = #{settleNo,jdbcType=VARCHAR}"); + } + + if (record.getBankName() != null) { + sql.SET("bank_name = #{bankName,jdbcType=VARCHAR}"); + } + + if (record.getDrawStatus() != null) { + sql.SET("draw_status = #{drawStatus,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCompleteTime() != null) { + sql.SET("complete_time = #{completeTime,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, BsMerWithdrawalExample 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 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 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()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/OpenApiTradeOrderMapper.java b/service/src/main/java/com/hfkj/dao/OpenApiTradeOrderMapper.java index e94871f..70db9c9 100644 --- a/service/src/main/java/com/hfkj/dao/OpenApiTradeOrderMapper.java +++ b/service/src/main/java/com/hfkj/dao/OpenApiTradeOrderMapper.java @@ -21,6 +21,7 @@ public interface OpenApiTradeOrderMapper { " a.pay_time payTime," + " a.mer_no merchantNo," + " a.platform_trade_no platformTradeNo," + + " a.acc_trade_no accTradeNo," + " a.out_trade_no outTradeNo, " + " a.pay_user_id payUserId, " + " \"JSAPI\" as tradeType," + diff --git a/service/src/main/java/com/hfkj/entity/BsMerWithdrawal.java b/service/src/main/java/com/hfkj/entity/BsMerWithdrawal.java new file mode 100644 index 0000000..1c30f4a --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerWithdrawal.java @@ -0,0 +1,462 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_mer_withdrawal + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMerWithdrawal implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户编号 + */ + private String merNo; + + /** + * 商户名称 + */ + private String merName; + + /** + * 平台 1:拉卡拉 + */ + private Integer platformType; + + /** + * 平台商户号 + */ + private String platformNo; + + /** + * 银联商户号 + */ + private String cupNo; + + /** + * 商户订单号 + */ + private Integer merOrderNo; + + /** + * 提款流水号 + */ + private String drawJnl; + + /** + * 提现金额(单位:元) + */ + private BigDecimal drawAmt; + + /** + * 手续费(元) + */ + private BigDecimal drawFee; + + /** + * 提款模式(D0/D1) 1: D0 2:D1 + */ + private Integer drawMode; + + /** + * 结算模式(01主动提款 02自动结算) 1:主动提款 2:自动结算 + */ + private Integer batchAutoSettle; + + /** + * 自动结算批次号 + */ + private String batchNo; + + /** + * 结算账户号(脱敏) + */ + private String acctNo; + + /** + * 结算账户名(脱敏) + */ + private String acctName; + + /** + * 银行行号 + */ + private String bankNo; + + /** + * 结算流水号 + */ + private String settleNo; + + /** + * 银行名称 + */ + private String bankName; + + /** + * 提款状态 +1:提款已受理 +2:提款冻结 +3:提款处理中 +4:提款成功 +5:提款失败 + */ + private Integer drawStatus; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + /** + * 完成时间 + */ + private Date completeTime; + + 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 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 String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + 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 String getCupNo() { + return cupNo; + } + + public void setCupNo(String cupNo) { + this.cupNo = cupNo; + } + + public Integer getMerOrderNo() { + return merOrderNo; + } + + public void setMerOrderNo(Integer merOrderNo) { + this.merOrderNo = merOrderNo; + } + + public String getDrawJnl() { + return drawJnl; + } + + public void setDrawJnl(String drawJnl) { + this.drawJnl = drawJnl; + } + + public BigDecimal getDrawAmt() { + return drawAmt; + } + + public void setDrawAmt(BigDecimal drawAmt) { + this.drawAmt = drawAmt; + } + + public BigDecimal getDrawFee() { + return drawFee; + } + + public void setDrawFee(BigDecimal drawFee) { + this.drawFee = drawFee; + } + + public Integer getDrawMode() { + return drawMode; + } + + public void setDrawMode(Integer drawMode) { + this.drawMode = drawMode; + } + + public Integer getBatchAutoSettle() { + return batchAutoSettle; + } + + public void setBatchAutoSettle(Integer batchAutoSettle) { + this.batchAutoSettle = batchAutoSettle; + } + + public String getBatchNo() { + return batchNo; + } + + public void setBatchNo(String batchNo) { + this.batchNo = batchNo; + } + + public String getAcctNo() { + return acctNo; + } + + public void setAcctNo(String acctNo) { + this.acctNo = acctNo; + } + + public String getAcctName() { + return acctName; + } + + public void setAcctName(String acctName) { + this.acctName = acctName; + } + + public String getBankNo() { + return bankNo; + } + + public void setBankNo(String bankNo) { + this.bankNo = bankNo; + } + + public String getSettleNo() { + return settleNo; + } + + public void setSettleNo(String settleNo) { + this.settleNo = settleNo; + } + + public String getBankName() { + return bankName; + } + + public void setBankName(String bankName) { + this.bankName = bankName; + } + + public Integer getDrawStatus() { + return drawStatus; + } + + public void setDrawStatus(Integer drawStatus) { + this.drawStatus = drawStatus; + } + + 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 Date getCompleteTime() { + return completeTime; + } + + public void setCompleteTime(Date completeTime) { + this.completeTime = completeTime; + } + + 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; + } + BsMerWithdrawal other = (BsMerWithdrawal) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType())) + && (this.getPlatformNo() == null ? other.getPlatformNo() == null : this.getPlatformNo().equals(other.getPlatformNo())) + && (this.getCupNo() == null ? other.getCupNo() == null : this.getCupNo().equals(other.getCupNo())) + && (this.getMerOrderNo() == null ? other.getMerOrderNo() == null : this.getMerOrderNo().equals(other.getMerOrderNo())) + && (this.getDrawJnl() == null ? other.getDrawJnl() == null : this.getDrawJnl().equals(other.getDrawJnl())) + && (this.getDrawAmt() == null ? other.getDrawAmt() == null : this.getDrawAmt().equals(other.getDrawAmt())) + && (this.getDrawFee() == null ? other.getDrawFee() == null : this.getDrawFee().equals(other.getDrawFee())) + && (this.getDrawMode() == null ? other.getDrawMode() == null : this.getDrawMode().equals(other.getDrawMode())) + && (this.getBatchAutoSettle() == null ? other.getBatchAutoSettle() == null : this.getBatchAutoSettle().equals(other.getBatchAutoSettle())) + && (this.getBatchNo() == null ? other.getBatchNo() == null : this.getBatchNo().equals(other.getBatchNo())) + && (this.getAcctNo() == null ? other.getAcctNo() == null : this.getAcctNo().equals(other.getAcctNo())) + && (this.getAcctName() == null ? other.getAcctName() == null : this.getAcctName().equals(other.getAcctName())) + && (this.getBankNo() == null ? other.getBankNo() == null : this.getBankNo().equals(other.getBankNo())) + && (this.getSettleNo() == null ? other.getSettleNo() == null : this.getSettleNo().equals(other.getSettleNo())) + && (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName())) + && (this.getDrawStatus() == null ? other.getDrawStatus() == null : this.getDrawStatus().equals(other.getDrawStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getCompleteTime() == null ? other.getCompleteTime() == null : this.getCompleteTime().equals(other.getCompleteTime())) + && (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 + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode()); + result = prime * result + ((getPlatformNo() == null) ? 0 : getPlatformNo().hashCode()); + result = prime * result + ((getCupNo() == null) ? 0 : getCupNo().hashCode()); + result = prime * result + ((getMerOrderNo() == null) ? 0 : getMerOrderNo().hashCode()); + result = prime * result + ((getDrawJnl() == null) ? 0 : getDrawJnl().hashCode()); + result = prime * result + ((getDrawAmt() == null) ? 0 : getDrawAmt().hashCode()); + result = prime * result + ((getDrawFee() == null) ? 0 : getDrawFee().hashCode()); + result = prime * result + ((getDrawMode() == null) ? 0 : getDrawMode().hashCode()); + result = prime * result + ((getBatchAutoSettle() == null) ? 0 : getBatchAutoSettle().hashCode()); + result = prime * result + ((getBatchNo() == null) ? 0 : getBatchNo().hashCode()); + result = prime * result + ((getAcctNo() == null) ? 0 : getAcctNo().hashCode()); + result = prime * result + ((getAcctName() == null) ? 0 : getAcctName().hashCode()); + result = prime * result + ((getBankNo() == null) ? 0 : getBankNo().hashCode()); + result = prime * result + ((getSettleNo() == null) ? 0 : getSettleNo().hashCode()); + result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode()); + result = prime * result + ((getDrawStatus() == null) ? 0 : getDrawStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getCompleteTime() == null) ? 0 : getCompleteTime().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(", merId=").append(merId); + sb.append(", merNo=").append(merNo); + sb.append(", merName=").append(merName); + sb.append(", platformType=").append(platformType); + sb.append(", platformNo=").append(platformNo); + sb.append(", cupNo=").append(cupNo); + sb.append(", merOrderNo=").append(merOrderNo); + sb.append(", drawJnl=").append(drawJnl); + sb.append(", drawAmt=").append(drawAmt); + sb.append(", drawFee=").append(drawFee); + sb.append(", drawMode=").append(drawMode); + sb.append(", batchAutoSettle=").append(batchAutoSettle); + sb.append(", batchNo=").append(batchNo); + sb.append(", acctNo=").append(acctNo); + sb.append(", acctName=").append(acctName); + sb.append(", bankNo=").append(bankNo); + sb.append(", settleNo=").append(settleNo); + sb.append(", bankName=").append(bankName); + sb.append(", drawStatus=").append(drawStatus); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", completeTime=").append(completeTime); + 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(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsMerWithdrawalExample.java b/service/src/main/java/com/hfkj/entity/BsMerWithdrawalExample.java new file mode 100644 index 0000000..681f09a --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerWithdrawalExample.java @@ -0,0 +1,1924 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMerWithdrawalExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMerWithdrawalExample() { + oredCriteria = new ArrayList(); + } + + 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 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 criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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 values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List 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 andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNull() { + addCriterion("platform_type is null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNotNull() { + addCriterion("platform_type is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeEqualTo(Integer value) { + addCriterion("platform_type =", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotEqualTo(Integer value) { + addCriterion("platform_type <>", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThan(Integer value) { + addCriterion("platform_type >", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("platform_type >=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThan(Integer value) { + addCriterion("platform_type <", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThanOrEqualTo(Integer value) { + addCriterion("platform_type <=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIn(List values) { + addCriterion("platform_type in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotIn(List values) { + addCriterion("platform_type not in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeBetween(Integer value1, Integer value2) { + addCriterion("platform_type between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotBetween(Integer value1, Integer value2) { + addCriterion("platform_type not between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformNoIsNull() { + addCriterion("platform_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformNoIsNotNull() { + addCriterion("platform_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformNoEqualTo(String value) { + addCriterion("platform_no =", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoNotEqualTo(String value) { + addCriterion("platform_no <>", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoGreaterThan(String value) { + addCriterion("platform_no >", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_no >=", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoLessThan(String value) { + addCriterion("platform_no <", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoLessThanOrEqualTo(String value) { + addCriterion("platform_no <=", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoLike(String value) { + addCriterion("platform_no like", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoNotLike(String value) { + addCriterion("platform_no not like", value, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoIn(List values) { + addCriterion("platform_no in", values, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoNotIn(List values) { + addCriterion("platform_no not in", values, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoBetween(String value1, String value2) { + addCriterion("platform_no between", value1, value2, "platformNo"); + return (Criteria) this; + } + + public Criteria andPlatformNoNotBetween(String value1, String value2) { + addCriterion("platform_no not between", value1, value2, "platformNo"); + return (Criteria) this; + } + + public Criteria andCupNoIsNull() { + addCriterion("cup_no is null"); + return (Criteria) this; + } + + public Criteria andCupNoIsNotNull() { + addCriterion("cup_no is not null"); + return (Criteria) this; + } + + public Criteria andCupNoEqualTo(String value) { + addCriterion("cup_no =", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoNotEqualTo(String value) { + addCriterion("cup_no <>", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoGreaterThan(String value) { + addCriterion("cup_no >", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoGreaterThanOrEqualTo(String value) { + addCriterion("cup_no >=", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoLessThan(String value) { + addCriterion("cup_no <", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoLessThanOrEqualTo(String value) { + addCriterion("cup_no <=", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoLike(String value) { + addCriterion("cup_no like", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoNotLike(String value) { + addCriterion("cup_no not like", value, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoIn(List values) { + addCriterion("cup_no in", values, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoNotIn(List values) { + addCriterion("cup_no not in", values, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoBetween(String value1, String value2) { + addCriterion("cup_no between", value1, value2, "cupNo"); + return (Criteria) this; + } + + public Criteria andCupNoNotBetween(String value1, String value2) { + addCriterion("cup_no not between", value1, value2, "cupNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoIsNull() { + addCriterion("mer_order_no is null"); + return (Criteria) this; + } + + public Criteria andMerOrderNoIsNotNull() { + addCriterion("mer_order_no is not null"); + return (Criteria) this; + } + + public Criteria andMerOrderNoEqualTo(Integer value) { + addCriterion("mer_order_no =", value, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoNotEqualTo(Integer value) { + addCriterion("mer_order_no <>", value, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoGreaterThan(Integer value) { + addCriterion("mer_order_no >", value, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoGreaterThanOrEqualTo(Integer value) { + addCriterion("mer_order_no >=", value, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoLessThan(Integer value) { + addCriterion("mer_order_no <", value, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoLessThanOrEqualTo(Integer value) { + addCriterion("mer_order_no <=", value, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoIn(List values) { + addCriterion("mer_order_no in", values, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoNotIn(List values) { + addCriterion("mer_order_no not in", values, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoBetween(Integer value1, Integer value2) { + addCriterion("mer_order_no between", value1, value2, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andMerOrderNoNotBetween(Integer value1, Integer value2) { + addCriterion("mer_order_no not between", value1, value2, "merOrderNo"); + return (Criteria) this; + } + + public Criteria andDrawJnlIsNull() { + addCriterion("draw_jnl is null"); + return (Criteria) this; + } + + public Criteria andDrawJnlIsNotNull() { + addCriterion("draw_jnl is not null"); + return (Criteria) this; + } + + public Criteria andDrawJnlEqualTo(String value) { + addCriterion("draw_jnl =", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlNotEqualTo(String value) { + addCriterion("draw_jnl <>", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlGreaterThan(String value) { + addCriterion("draw_jnl >", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlGreaterThanOrEqualTo(String value) { + addCriterion("draw_jnl >=", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlLessThan(String value) { + addCriterion("draw_jnl <", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlLessThanOrEqualTo(String value) { + addCriterion("draw_jnl <=", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlLike(String value) { + addCriterion("draw_jnl like", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlNotLike(String value) { + addCriterion("draw_jnl not like", value, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlIn(List values) { + addCriterion("draw_jnl in", values, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlNotIn(List values) { + addCriterion("draw_jnl not in", values, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlBetween(String value1, String value2) { + addCriterion("draw_jnl between", value1, value2, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawJnlNotBetween(String value1, String value2) { + addCriterion("draw_jnl not between", value1, value2, "drawJnl"); + return (Criteria) this; + } + + public Criteria andDrawAmtIsNull() { + addCriterion("draw_amt is null"); + return (Criteria) this; + } + + public Criteria andDrawAmtIsNotNull() { + addCriterion("draw_amt is not null"); + return (Criteria) this; + } + + public Criteria andDrawAmtEqualTo(BigDecimal value) { + addCriterion("draw_amt =", value, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtNotEqualTo(BigDecimal value) { + addCriterion("draw_amt <>", value, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtGreaterThan(BigDecimal value) { + addCriterion("draw_amt >", value, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("draw_amt >=", value, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtLessThan(BigDecimal value) { + addCriterion("draw_amt <", value, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtLessThanOrEqualTo(BigDecimal value) { + addCriterion("draw_amt <=", value, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtIn(List values) { + addCriterion("draw_amt in", values, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtNotIn(List values) { + addCriterion("draw_amt not in", values, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("draw_amt between", value1, value2, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawAmtNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("draw_amt not between", value1, value2, "drawAmt"); + return (Criteria) this; + } + + public Criteria andDrawFeeIsNull() { + addCriterion("draw_fee is null"); + return (Criteria) this; + } + + public Criteria andDrawFeeIsNotNull() { + addCriterion("draw_fee is not null"); + return (Criteria) this; + } + + public Criteria andDrawFeeEqualTo(BigDecimal value) { + addCriterion("draw_fee =", value, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeNotEqualTo(BigDecimal value) { + addCriterion("draw_fee <>", value, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeGreaterThan(BigDecimal value) { + addCriterion("draw_fee >", value, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("draw_fee >=", value, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeLessThan(BigDecimal value) { + addCriterion("draw_fee <", value, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeLessThanOrEqualTo(BigDecimal value) { + addCriterion("draw_fee <=", value, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeIn(List values) { + addCriterion("draw_fee in", values, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeNotIn(List values) { + addCriterion("draw_fee not in", values, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("draw_fee between", value1, value2, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawFeeNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("draw_fee not between", value1, value2, "drawFee"); + return (Criteria) this; + } + + public Criteria andDrawModeIsNull() { + addCriterion("draw_mode is null"); + return (Criteria) this; + } + + public Criteria andDrawModeIsNotNull() { + addCriterion("draw_mode is not null"); + return (Criteria) this; + } + + public Criteria andDrawModeEqualTo(Integer value) { + addCriterion("draw_mode =", value, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeNotEqualTo(Integer value) { + addCriterion("draw_mode <>", value, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeGreaterThan(Integer value) { + addCriterion("draw_mode >", value, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeGreaterThanOrEqualTo(Integer value) { + addCriterion("draw_mode >=", value, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeLessThan(Integer value) { + addCriterion("draw_mode <", value, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeLessThanOrEqualTo(Integer value) { + addCriterion("draw_mode <=", value, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeIn(List values) { + addCriterion("draw_mode in", values, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeNotIn(List values) { + addCriterion("draw_mode not in", values, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeBetween(Integer value1, Integer value2) { + addCriterion("draw_mode between", value1, value2, "drawMode"); + return (Criteria) this; + } + + public Criteria andDrawModeNotBetween(Integer value1, Integer value2) { + addCriterion("draw_mode not between", value1, value2, "drawMode"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleIsNull() { + addCriterion("batch_auto_settle is null"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleIsNotNull() { + addCriterion("batch_auto_settle is not null"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleEqualTo(Integer value) { + addCriterion("batch_auto_settle =", value, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleNotEqualTo(Integer value) { + addCriterion("batch_auto_settle <>", value, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleGreaterThan(Integer value) { + addCriterion("batch_auto_settle >", value, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleGreaterThanOrEqualTo(Integer value) { + addCriterion("batch_auto_settle >=", value, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleLessThan(Integer value) { + addCriterion("batch_auto_settle <", value, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleLessThanOrEqualTo(Integer value) { + addCriterion("batch_auto_settle <=", value, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleIn(List values) { + addCriterion("batch_auto_settle in", values, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleNotIn(List values) { + addCriterion("batch_auto_settle not in", values, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleBetween(Integer value1, Integer value2) { + addCriterion("batch_auto_settle between", value1, value2, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchAutoSettleNotBetween(Integer value1, Integer value2) { + addCriterion("batch_auto_settle not between", value1, value2, "batchAutoSettle"); + return (Criteria) this; + } + + public Criteria andBatchNoIsNull() { + addCriterion("batch_no is null"); + return (Criteria) this; + } + + public Criteria andBatchNoIsNotNull() { + addCriterion("batch_no is not null"); + return (Criteria) this; + } + + public Criteria andBatchNoEqualTo(String value) { + addCriterion("batch_no =", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoNotEqualTo(String value) { + addCriterion("batch_no <>", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoGreaterThan(String value) { + addCriterion("batch_no >", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoGreaterThanOrEqualTo(String value) { + addCriterion("batch_no >=", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoLessThan(String value) { + addCriterion("batch_no <", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoLessThanOrEqualTo(String value) { + addCriterion("batch_no <=", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoLike(String value) { + addCriterion("batch_no like", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoNotLike(String value) { + addCriterion("batch_no not like", value, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoIn(List values) { + addCriterion("batch_no in", values, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoNotIn(List values) { + addCriterion("batch_no not in", values, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoBetween(String value1, String value2) { + addCriterion("batch_no between", value1, value2, "batchNo"); + return (Criteria) this; + } + + public Criteria andBatchNoNotBetween(String value1, String value2) { + addCriterion("batch_no not between", value1, value2, "batchNo"); + return (Criteria) this; + } + + public Criteria andAcctNoIsNull() { + addCriterion("acct_no is null"); + return (Criteria) this; + } + + public Criteria andAcctNoIsNotNull() { + addCriterion("acct_no is not null"); + return (Criteria) this; + } + + public Criteria andAcctNoEqualTo(String value) { + addCriterion("acct_no =", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoNotEqualTo(String value) { + addCriterion("acct_no <>", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoGreaterThan(String value) { + addCriterion("acct_no >", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoGreaterThanOrEqualTo(String value) { + addCriterion("acct_no >=", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoLessThan(String value) { + addCriterion("acct_no <", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoLessThanOrEqualTo(String value) { + addCriterion("acct_no <=", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoLike(String value) { + addCriterion("acct_no like", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoNotLike(String value) { + addCriterion("acct_no not like", value, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoIn(List values) { + addCriterion("acct_no in", values, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoNotIn(List values) { + addCriterion("acct_no not in", values, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoBetween(String value1, String value2) { + addCriterion("acct_no between", value1, value2, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNoNotBetween(String value1, String value2) { + addCriterion("acct_no not between", value1, value2, "acctNo"); + return (Criteria) this; + } + + public Criteria andAcctNameIsNull() { + addCriterion("acct_name is null"); + return (Criteria) this; + } + + public Criteria andAcctNameIsNotNull() { + addCriterion("acct_name is not null"); + return (Criteria) this; + } + + public Criteria andAcctNameEqualTo(String value) { + addCriterion("acct_name =", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameNotEqualTo(String value) { + addCriterion("acct_name <>", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameGreaterThan(String value) { + addCriterion("acct_name >", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameGreaterThanOrEqualTo(String value) { + addCriterion("acct_name >=", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameLessThan(String value) { + addCriterion("acct_name <", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameLessThanOrEqualTo(String value) { + addCriterion("acct_name <=", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameLike(String value) { + addCriterion("acct_name like", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameNotLike(String value) { + addCriterion("acct_name not like", value, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameIn(List values) { + addCriterion("acct_name in", values, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameNotIn(List values) { + addCriterion("acct_name not in", values, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameBetween(String value1, String value2) { + addCriterion("acct_name between", value1, value2, "acctName"); + return (Criteria) this; + } + + public Criteria andAcctNameNotBetween(String value1, String value2) { + addCriterion("acct_name not between", value1, value2, "acctName"); + return (Criteria) this; + } + + public Criteria andBankNoIsNull() { + addCriterion("bank_no is null"); + return (Criteria) this; + } + + public Criteria andBankNoIsNotNull() { + addCriterion("bank_no is not null"); + return (Criteria) this; + } + + public Criteria andBankNoEqualTo(String value) { + addCriterion("bank_no =", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoNotEqualTo(String value) { + addCriterion("bank_no <>", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoGreaterThan(String value) { + addCriterion("bank_no >", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoGreaterThanOrEqualTo(String value) { + addCriterion("bank_no >=", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoLessThan(String value) { + addCriterion("bank_no <", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoLessThanOrEqualTo(String value) { + addCriterion("bank_no <=", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoLike(String value) { + addCriterion("bank_no like", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoNotLike(String value) { + addCriterion("bank_no not like", value, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoIn(List values) { + addCriterion("bank_no in", values, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoNotIn(List values) { + addCriterion("bank_no not in", values, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoBetween(String value1, String value2) { + addCriterion("bank_no between", value1, value2, "bankNo"); + return (Criteria) this; + } + + public Criteria andBankNoNotBetween(String value1, String value2) { + addCriterion("bank_no not between", value1, value2, "bankNo"); + return (Criteria) this; + } + + public Criteria andSettleNoIsNull() { + addCriterion("settle_no is null"); + return (Criteria) this; + } + + public Criteria andSettleNoIsNotNull() { + addCriterion("settle_no is not null"); + return (Criteria) this; + } + + public Criteria andSettleNoEqualTo(String value) { + addCriterion("settle_no =", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoNotEqualTo(String value) { + addCriterion("settle_no <>", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoGreaterThan(String value) { + addCriterion("settle_no >", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoGreaterThanOrEqualTo(String value) { + addCriterion("settle_no >=", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoLessThan(String value) { + addCriterion("settle_no <", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoLessThanOrEqualTo(String value) { + addCriterion("settle_no <=", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoLike(String value) { + addCriterion("settle_no like", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoNotLike(String value) { + addCriterion("settle_no not like", value, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoIn(List values) { + addCriterion("settle_no in", values, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoNotIn(List values) { + addCriterion("settle_no not in", values, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoBetween(String value1, String value2) { + addCriterion("settle_no between", value1, value2, "settleNo"); + return (Criteria) this; + } + + public Criteria andSettleNoNotBetween(String value1, String value2) { + addCriterion("settle_no not between", value1, value2, "settleNo"); + 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 values) { + addCriterion("bank_name in", values, "bankName"); + return (Criteria) this; + } + + public Criteria andBankNameNotIn(List 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 andDrawStatusIsNull() { + addCriterion("draw_status is null"); + return (Criteria) this; + } + + public Criteria andDrawStatusIsNotNull() { + addCriterion("draw_status is not null"); + return (Criteria) this; + } + + public Criteria andDrawStatusEqualTo(Integer value) { + addCriterion("draw_status =", value, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusNotEqualTo(Integer value) { + addCriterion("draw_status <>", value, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusGreaterThan(Integer value) { + addCriterion("draw_status >", value, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("draw_status >=", value, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusLessThan(Integer value) { + addCriterion("draw_status <", value, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusLessThanOrEqualTo(Integer value) { + addCriterion("draw_status <=", value, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusIn(List values) { + addCriterion("draw_status in", values, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusNotIn(List values) { + addCriterion("draw_status not in", values, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusBetween(Integer value1, Integer value2) { + addCriterion("draw_status between", value1, value2, "drawStatus"); + return (Criteria) this; + } + + public Criteria andDrawStatusNotBetween(Integer value1, Integer value2) { + addCriterion("draw_status not between", value1, value2, "drawStatus"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeIsNull() { + addCriterion("complete_time is null"); + return (Criteria) this; + } + + public Criteria andCompleteTimeIsNotNull() { + addCriterion("complete_time is not null"); + return (Criteria) this; + } + + public Criteria andCompleteTimeEqualTo(Date value) { + addCriterion("complete_time =", value, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeNotEqualTo(Date value) { + addCriterion("complete_time <>", value, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeGreaterThan(Date value) { + addCriterion("complete_time >", value, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeGreaterThanOrEqualTo(Date value) { + addCriterion("complete_time >=", value, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeLessThan(Date value) { + addCriterion("complete_time <", value, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeLessThanOrEqualTo(Date value) { + addCriterion("complete_time <=", value, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeIn(List values) { + addCriterion("complete_time in", values, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeNotIn(List values) { + addCriterion("complete_time not in", values, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeBetween(Date value1, Date value2) { + addCriterion("complete_time between", value1, value2, "completeTime"); + return (Criteria) this; + } + + public Criteria andCompleteTimeNotBetween(Date value1, Date value2) { + addCriterion("complete_time not between", value1, value2, "completeTime"); + 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 values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List 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 values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List 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 values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List 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); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/openapi/v1/model/TradeBillsModel.java b/service/src/main/java/com/hfkj/openapi/v1/model/TradeBillsModel.java index 519fce6..e4fb0a0 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/model/TradeBillsModel.java +++ b/service/src/main/java/com/hfkj/openapi/v1/model/TradeBillsModel.java @@ -21,10 +21,13 @@ public class TradeBillsModel { @ColumnWidth(25) @ExcelProperty("商户号") private String merchantNo; - @ColumnWidth(25) + @ColumnWidth(40) @ExcelProperty("平台交易单号") private String platformTradeNo; - @ColumnWidth(25) + @ColumnWidth(40) + @ExcelProperty("账户端交易单号") + private String accTradeNo; + @ColumnWidth(40) @ExcelProperty("商户交易单号") private String outTradeNo; @ColumnWidth(25) @@ -40,7 +43,7 @@ public class TradeBillsModel { private String payMode; @ColumnWidth(15) - @ExcelProperty("交易方式") + @ExcelProperty("交易状态") private String tradeStatus; @ColumnWidth(15) diff --git a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java index f4d66ea..f5c28f9 100644 --- a/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java +++ b/service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java @@ -82,10 +82,16 @@ public class SignatureUtil { public static void main(String[] args) throws Exception { String paramStr = "{\n" + - " \"merchantNo\": \"2023030909414450700\",\n" + - " \"outSeparateNo\": \"1530202304261720503943170005\"" + + " \"merchantNo\": \"2023053014484290706\",\n" + + " \"outTradeNo\": \"ZF1130202305051459532538971005\",\n" + + " \"payMode\": \"WECHAT\",\n" + + " \"totalAmount\": 0.01,\n" + + " \"transType\": \"JSAPI\",\n" + + " \"subAppid\":\"wxc1d482cb439d570d\",\n" + + " \"userId\": \"o4Jwb42CBpXgAZJaF985MViTBIaI\",\n" + + " \"profitSharing\": 0\n" + "}"; - String sign = createSign(JSONObject.parseObject(paramStr), "LRL9uflTQGeyp9yVWDD6orhBp2VhYDvP"); + String sign = createSign(JSONObject.parseObject(paramStr), "2sKRbwGqRoejsqn9HFJL9p5T0GqDOONp"); System.out.println(sign); } } diff --git a/service/src/main/java/com/hfkj/service/BsMerLedgerService.java b/service/src/main/java/com/hfkj/service/BsMerLedgerService.java index 6940d02..c28a68a 100644 --- a/service/src/main/java/com/hfkj/service/BsMerLedgerService.java +++ b/service/src/main/java/com/hfkj/service/BsMerLedgerService.java @@ -34,6 +34,13 @@ public interface BsMerLedgerService { */ BsMerLedger getMerLedger(Long merId, PlatformTypeEnum platformType); + /** + * 获取商户分账信息 + * @param receiverNo + * @return + */ + BsMerLedger getMerLedgerByReceiverNo(String receiverNo); + /** * 查询商户分账信息 * @param id diff --git a/service/src/main/java/com/hfkj/service/BsMerWithdrawalService.java b/service/src/main/java/com/hfkj/service/BsMerWithdrawalService.java new file mode 100644 index 0000000..de06926 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/BsMerWithdrawalService.java @@ -0,0 +1,25 @@ +package com.hfkj.service; + +import com.hfkj.entity.BsMerWithdrawal; + +/** + * @className: BsMerWithdrawalService + * @author: HuRui + * @date: 2023/6/8 + **/ +public interface BsMerWithdrawalService { + + /** + * 编辑数据 + * @param merWithdrawal + */ + void editData(BsMerWithdrawal merWithdrawal); + + /** + * 根据提款流水号 查询详情 + * @param drawJnl + * @return + */ + BsMerWithdrawal getDetailByDrawJnl(String drawJnl); + +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java index 777d9be..0708b4e 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java @@ -57,6 +57,7 @@ public class BsAuditServiceImpl implements BsAuditService { } @Override + @Transactional(propagation= Propagation.REQUIRES_NEW) public void approve(Long auditId) { // 查询审核详情 BsAudit audit = getAuditDetailById(auditId); @@ -73,7 +74,6 @@ public class BsAuditServiceImpl implements BsAuditService { } @Override - @Transactional(propagation= Propagation.REQUIRES_NEW) public void approveCallback(BsAudit audit) { if (audit.getVocationalWorkType().equals(AuditVocationalWorkType.type1.getNumber())) { BsMerSettleAcctApply acctApply = merSettleAcctApplyService.getApplyById(audit.getAuditObjectId()); diff --git a/service/src/main/java/com/hfkj/service/impl/BsDeviceOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsDeviceOrderServiceImpl.java index ffb5b0f..0786803 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsDeviceOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsDeviceOrderServiceImpl.java @@ -87,7 +87,7 @@ public class BsDeviceOrderServiceImpl implements BsDeviceOrderService { deviceOrder.setSalesmanName(userInfoModel.getStore().getSalesmanName()); deviceOrder.setStoreId(userInfoModel.getStore().getId()); deviceOrder.setStoreName(userInfoModel.getStore().getName()); - deviceOrder.setMerId(userInfoModel.getStore().getId()); + deviceOrder.setMerId(userInfoModel.getStore().getMerId()); deviceOrder.setMerName(userInfoModel.getStore().getMerName()); deviceOrder.setAgentId(userInfoModel.getStore().getAgentId()); deviceOrder.setAgentName(userInfoModel.getStore().getAgentName()); diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java index 2776e4b..139f38f 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java @@ -69,6 +69,17 @@ public class BsMerLedgerServiceImpl implements BsMerLedgerService { return null; } + @Override + public BsMerLedger getMerLedgerByReceiverNo(String receiverNo) { + BsMerLedgerExample example = new BsMerLedgerExample(); + example.createCriteria().andReceiverNoEqualTo(receiverNo); + List list = merLedgerMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } + @Override public BsMerLedger getMerLedgerById(Long id) { return merLedgerMapper.selectByPrimaryKey(id); diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerServiceImpl.java index 65722c1..610ad09 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerServiceImpl.java @@ -110,7 +110,9 @@ public class BsMerServiceImpl implements BsMerService { mer.setCompanyId(salesman.getCompanyId()); mer.setCompanyName(salesman.getCompanyName()); mer.setAgentId(salesman.getAgentId()); + mer.setAgentName(salesman.getAgentName()); mer.setSalesmanId(salesman.getId()); + mer.setSalesmanName(salesman.getName()); mer.setRegName(merAccount.getName()); mer.setRegPhone(merAccount.getPhone()); mer.setRegEmail(merAccount.getEmail()); diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerWithdrawalServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerWithdrawalServiceImpl.java new file mode 100644 index 0000000..59f3e5b --- /dev/null +++ b/service/src/main/java/com/hfkj/service/impl/BsMerWithdrawalServiceImpl.java @@ -0,0 +1,47 @@ +package com.hfkj.service.impl; + +import com.hfkj.dao.BsMerWithdrawalMapper; +import com.hfkj.entity.BsMerWithdrawal; +import com.hfkj.entity.BsMerWithdrawalExample; +import com.hfkj.service.BsMerWithdrawalService; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @className: BsMerWithdrawalServiceImpl + * @author: HuRui + * @date: 2023/6/8 + **/ +@Service("merWithdrawalService") +public class BsMerWithdrawalServiceImpl implements BsMerWithdrawalService { + @Resource + private BsMerWithdrawalMapper merWithdrawalMapper; + + @Override + public void editData(BsMerWithdrawal merWithdrawal) { + if (merWithdrawal.getCreateTime() == null) { + merWithdrawal.setCreateTime(new Date()); + } + if (merWithdrawal.getId() == null) { + merWithdrawal.setUpdateTime(new Date()); + merWithdrawalMapper.insert(merWithdrawal); + } else { + merWithdrawal.setUpdateTime(new Date()); + merWithdrawalMapper.updateByPrimaryKey(merWithdrawal); + } + } + + @Override + public BsMerWithdrawal getDetailByDrawJnl(String drawJnl) { + BsMerWithdrawalExample example = new BsMerWithdrawalExample(); + example.createCriteria().andDrawJnlEqualTo(drawJnl); + List list = merWithdrawalMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java index 172e1e0..70a9d4b 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java @@ -58,7 +58,7 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { @Resource private UserDiscountService userDiscountService; @Resource - private BsMerPlatformNoRateService merPlatformNoRateService; + private BsMerRateService merRateService; @Override public void editOrder(BsTradeOrder tradeOrder) { @@ -223,6 +223,19 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService { tradeOrder.setStatus(TradeOrderStatusEnum.status3.getNumber()); tradeOrder.setPayTime(new Date()); + // WECHAT ALIPAY + if (tradeOrder.getPayMode().equals(TradeOrderPayModeEnum.WECHAT.getCode())) { + BsMerRate rate = merRateService.getDetail(tradeOrder.getMerId(), 302); + if (rate != null) { + tradeOrder.setFeeRate(rate.getRatePct()); + } + } else if (tradeOrder.getPayMode().equals(TradeOrderPayModeEnum.ALIPAY.getCode())) { + BsMerRate rate = merRateService.getDetail(tradeOrder.getMerId(),303); + if (rate != null) { + tradeOrder.setFeeRate(rate.getRatePct()); + } + } + if (StringUtils.isNotBlank(MapUtils.getString(other, "log_no"))) { tradeOrder.setPlatformLogNo(MapUtils.getString(other, "log_no")); } diff --git a/service/src/main/java/com/hfkj/sysenum/MerLedgerStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/MerLedgerStatusEnum.java index 00b1d07..f1833b7 100644 --- a/service/src/main/java/com/hfkj/sysenum/MerLedgerStatusEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/MerLedgerStatusEnum.java @@ -12,6 +12,7 @@ public enum MerLedgerStatusEnum { status1(1, "可用"), status2(2, "审核中"), status3(3, "审核驳回"), + status4(4, "待提交"), ; private Integer number; diff --git a/service/src/main/java/com/hfkj/sysenum/MerWithdrawalStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/MerWithdrawalStatusEnum.java new file mode 100644 index 0000000..471ea2a --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/MerWithdrawalStatusEnum.java @@ -0,0 +1,39 @@ +package com.hfkj.sysenum; + +/** + * 商户完善状态 + * @author hurui + */ +public enum MerWithdrawalStatusEnum { + status1(1, "提款已受理"), + status2(2, "提款冻结"), + status3(3, "提款处理中"), + status4(4, "提款成功"), + status5(5, "提款失败"), + ; + + private Integer number; + + private String name; + + MerWithdrawalStatusEnum(int number, String name) { + this.number = number; + this.name = name; + } + + 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; + } +} diff --git a/service/src/main/resources/prod-9606/commonConfig.properties b/service/src/main/resources/prod-9606/commonConfig.properties new file mode 100644 index 0000000..e8089ca --- /dev/null +++ b/service/src/main/resources/prod-9606/commonConfig.properties @@ -0,0 +1,40 @@ +obs_bucket_name=gratia-pay +obs_end_point=https://obs.cn-southwest-2.myhuaweicloud.com +obs_url=https://gratia-pay.obs.cn-southwest-2.myhuaweicloud.com + +qr_code_data_url=https://pay.dctpay.com/scanPay +qr_code_url=https://pay.dctpay.com/filesystem/payQrCode/ + +lkl_request_url=https://s2.lakala.com +lkl_org_code=965644 +lkl_v3_appid=OP00000622 +lkl_v3_serial_no=01752b7386f8 +lkl_v3_private_key=/home/project/gratia-pay/cert/lakala/v3/prod_private.text + +lkl_v2_appid=OP00000622 +lkl_v2_serial_no=01752b7386f8 +lkl_v2_private_key=/home/project/gratia-pay/cert/lakala/v2/prod_private.text +lkl_mer_contract_ret_url=https://pay.dctpay.com/brest/laKaLaNotify/merContract +lkl_micro_pay_ret_url=https://pay.dctpay.com/crest/laKaLaNotify/microPay +lkl_open_api_pay_notify_url=https://pay.dctpay.com/openApi/v1/payNotify/lakala + +lkl_saas_client_id=huifu +lkl_saas_client_secret=f65VVjqJfLtc177F +lkl_saas_activity_id=12 +lkl_saas_user_no=22206482 +lkl_saas_request_url=https://tkapi.lakala.com/ +lkl_saas_request_mer_registration_token_url=https://tkapi.lakala.com/auth/oauth/token +lkl_saas_request_mer_registration_url=https://htkactvi.lakala.com/registration/merchant/ +lkl_saas_request_mer_update_url=https://htkapi.lakala.com/api/ +lkl_saas_request_mer_registration_common_url=https://htkactvi.lakala.com/registration/ +lkl_saas_request_mer_url=https://tkapi.lakala.com/htkmerchants/ +lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAUkzRA+4GOS5OzYqxD/UJwM6p9to1dPvetL/7RbMa93o46qToPlPtaW61EvblOldHcBEHo7AGXXKmIYr7t2Up1PZC0g7UMpno/b5WkT6ieJ601Xreuj8hhyf2/xoej5vpi4/+lAr9YF+5GcyaVf4gfzTNJrmKj9PfvX5B3rUH2QIDAQAB +lkl_saas_private_key=MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAMBSTNED7gY5Lk7NirEP9QnAzqn22jV0+960v/tFsxr3ejjqpOg+U+1pbrUS9uU6V0dwEQejsAZdcqYhivu3ZSnU9kLSDtQymej9vlaRPqJ4nrTVet66PyGHJ/b/Gh6Pm+mLj/6UCv1gX7kZzJpV/iB/NM0muYqP09+9fkHetQfZAgMBAAECgYB42D3kaC+8QVnTsluffoNeKYSyT6Y1SNiqy7CGVvl/zFlEQkx0khVybHlf1hbFWq9U+Bn7TuNgXH+Z3CHUoRwy4Ap/kMx637iRatoC8F/kcPaiB7JFQfdrxhgK858dSyHCQ2OXXQDJgJdth+oF9FylVsrDu5Sw3ha4OuzrmufuwQJBAPnPPSeFr1wu7kH6I+A5E49fMbAm7EU+3TYVzxNH1lr3X/LWuK9pi/LVPrSR4eNgAypyQWREIqdpBIiJ9bOnwa0CQQDFFl0zTQTVTWf5r/hwgCUMo4gHr2y/q7XMNe6n5fh4SQuQ+o4gW+BGHzDrT97G5hFGPL+w5niGuEBHWSo5/9xdAkEAnrxdM7vzDjSUGUCFg3lBQJ1QyYoyIF4t2qxJBQtk3jDKu1hNysjasNdoHP2F+CGOYW5wtvHEw3Qr+UcQ5bP3kQJABPAcga6KUnXQBxd7mAX956UpQVgJ13uL4IPxaM+APDNIUOeWLAVhRyB870hfAoi9Ig9fliUQG//9zEvVnQJmGQJBAOb8Z0mGMEbEeAyEKjqoNiQkkIcoBdmPKNFUoUJ6ohcBNOoMfklvNsf2+BPfuhs26tvhYDBRgCAfOVhqTQcGj6I= + +wechat_pay_notify_url=https://pay.dctpay.com/crest/weiXinNotify/jsapiPay + +file_url=/home/project/gratia-pay/file +filesystem=/home/project/gratia-pay/filesystem + +domainName=https://pay.dctpay.com +hsg_domain_name=https://hsg.dctpay.com/