Merge branch 'master' into yy_dev

yy_dev
袁野 1 year ago
commit a463959a89
  1. 1
      cweb/src/main/java/com/cweb/config/AuthConfig.java
  2. 2
      cweb/src/main/java/com/cweb/controller/BsMerController.java
  3. 7
      cweb/src/main/java/com/cweb/controller/BsMerLedgerController.java
  4. 13
      cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java
  5. 129
      cweb/src/main/java/com/cweb/controller/BsMerWithdrawalController.java
  6. 17
      cweb/src/main/java/com/cweb/controller/TestController.java
  7. 19
      cweb/src/main/java/com/cweb/notify/LaKaLaController.java
  8. 25
      open-api/src/main/java/com/api/controller/v1/MerController.java
  9. 12
      open-api/src/main/java/com/api/controller/v1/NotifyController.java
  10. 95
      open-api/src/main/resources/prod-9606/application.yml
  11. 11
      open-api/src/main/resources/prod-9606/config.properties
  12. 178
      open-api/src/main/resources/prod-9606/logback.xml
  13. 2
      schedule/src/main/java/com/hfkj/schedule/Merchant.java
  14. 44
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaConfigService.java
  15. 53
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaLedgerService.java
  16. 9
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeSeparateService.java
  17. 90
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaWalletService.java
  18. 7
      service/src/main/java/com/hfkj/channel/saas/SaasMerService.java
  19. 183
      service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapper.java
  20. 7
      service/src/main/java/com/hfkj/dao/BsMerWithdrawalMapperExt.java
  21. 528
      service/src/main/java/com/hfkj/dao/BsMerWithdrawalSqlProvider.java
  22. 1
      service/src/main/java/com/hfkj/dao/OpenApiTradeOrderMapper.java
  23. 462
      service/src/main/java/com/hfkj/entity/BsMerWithdrawal.java
  24. 1924
      service/src/main/java/com/hfkj/entity/BsMerWithdrawalExample.java
  25. 9
      service/src/main/java/com/hfkj/openapi/v1/model/TradeBillsModel.java
  26. 12
      service/src/main/java/com/hfkj/openapi/v1/utils/SignatureUtil.java
  27. 7
      service/src/main/java/com/hfkj/service/BsMerLedgerService.java
  28. 25
      service/src/main/java/com/hfkj/service/BsMerWithdrawalService.java
  29. 2
      service/src/main/java/com/hfkj/service/impl/BsAuditServiceImpl.java
  30. 2
      service/src/main/java/com/hfkj/service/impl/BsDeviceOrderServiceImpl.java
  31. 11
      service/src/main/java/com/hfkj/service/impl/BsMerLedgerServiceImpl.java
  32. 2
      service/src/main/java/com/hfkj/service/impl/BsMerServiceImpl.java
  33. 47
      service/src/main/java/com/hfkj/service/impl/BsMerWithdrawalServiceImpl.java
  34. 15
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java
  35. 1
      service/src/main/java/com/hfkj/sysenum/MerLedgerStatusEnum.java
  36. 39
      service/src/main/java/com/hfkj/sysenum/MerWithdrawalStatusEnum.java
  37. 40
      service/src/main/resources/prod-9606/commonConfig.properties

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

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

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

@ -137,24 +137,25 @@ public class BsMerSettleAcctController {
}
// 对私非法人结算
if (merSettleAcct.getSettleType().equals(MerSettleType.status3.getNumber()) &&
(StringUtils.isBlank(merSettleAcct.getSettleIdCardPortraitImg())
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)) {
|| merSettleAcct.getSettleIdPeriodType() == null) {
log.error("configMerBasis error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_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());
}

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

@ -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<String, Object> rate;
List<Map<String,Object>> rates = new ArrayList<>();

@ -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,13 +145,26 @@ 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);
}
}
}
} catch (Exception e) {
log.error("login error!",e);

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

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

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

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

@ -0,0 +1,178 @@
<configuration>
<!-- %m输出的信息,%p日志级别,%t线程名,%d日期,%c类的全名,,,, -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d %p (%file:%line\)- %m%n</pattern>
<charset>UTF-8</charset>
</encoder>
</appender>
<appender name="baselog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/base.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/base.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="daolog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/dao.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/dao.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<appender name="errorlog"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/error.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/error.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<logger name="com.hfkj" level="DEBUG">
<appender-ref ref="baselog" />
</logger>
<logger name="com.hfkj.dao" level="DEBUG">
<appender-ref ref="daolog" />
</logger>
<logger name="com.hfkj" level="ERROR">
<appender-ref ref="errorlog" />
</logger>
<appender name="alipaylog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/alipay/alipaylog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/alipay.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.channel.alipay" level="INFO">
<appender-ref ref="alipaylog" />
</logger>
<appender name="hsglog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/hsg.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/hsg/hsg.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.channel.hsg" level="INFO">
<appender-ref ref="hsglog" />
</logger>
<appender name="requestV1log" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/requestV1.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/requestV1/requestV1.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.api.controller.v1" level="INFO">
<appender-ref ref="requestV1log" />
</logger>
<appender name="laklalog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/laklalog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/laklalog/laklalog.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.channel.lakala" level="INFO">
<appender-ref ref="laklalog" />
</logger>
<appender name="lklTradeNotify" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/lklTradeNotify.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/lklTradeNotify/lklTradeNotify.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.api.controller.v1.NotifyController" level="INFO">
<appender-ref ref="lklTradeNotify" />
</logger>
</configuration>

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

@ -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<String, Object> param = new HashMap<>();
param.put("timestamp", new Date().getTime());
@ -39,8 +39,7 @@ public class LaKaLaConfigService {
Map<String, Object> 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<String, Object> param = new HashMap<>();
param.put("timestamp", new Date().getTime());
@ -81,7 +80,7 @@ public class LaKaLaConfigService {
Map<String, Object> 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<String, Object> param = new HashMap<>();
param.put("timestamp", new Date().getTime());
param.put("ver", "1.0.0");
param.put("reqId", GenerateUtil.generateRandomString(18));
Map<String, Object> map = new HashMap<>();
map.put("tradeMode", "WECHAT");
map.put("subMerchantId", subMerchantId);
map.put("merchantNo", merCupNo);
param.put("reqData", map);
// 生成签名
Map<String, Object> reqParam = LaKaLaConfig.generateSignParamsV2(JSONObject.parseObject(JSONObject.toJSONString(param)));
// 头部参数
Map<String, Object> 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");
}
}

@ -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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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<String, Object> 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());

@ -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<BsTradeOrderProfitSharingReceiver> 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<String, Object> 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<Map<String,Object>> recvDatasMapList = new ArrayList<>();

@ -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<String, Object> param = new HashMap<>();
@ -55,7 +71,7 @@ public class LaKaLaWalletService {
Map<String, Object> 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<String, Object> param = new HashMap<>();
@ -97,7 +121,7 @@ public class LaKaLaWalletService {
param.put("reqId", new Date().getTime());
Map<String, Object> 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<String, Object> param = new HashMap<>();
@ -144,7 +176,7 @@ public class LaKaLaWalletService {
param.put("reqId", new Date().getTime());
Map<String, Object> 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<String, Object> param = new HashMap<>();
@ -188,7 +228,7 @@ public class LaKaLaWalletService {
param.put("reqId", new Date().getTime());
Map<String, Object> 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) {
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, "未找到平台商户号");
}
BsMer mer = merService.getMer(merPlatform.getMerId());
// 商户平台
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, "未知的机构");
}
// 请求参数
Map<String, Object> param = new HashMap<>();
@ -233,11 +296,11 @@ public class LaKaLaWalletService {
param.put("reqId", new Date().getTime());
Map<String, Object> 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<String, Object> param = new HashMap<>();
param.put("timestamp", new Date().getTime());
@ -278,7 +348,7 @@ public class LaKaLaWalletService {
param.put("reqId", new Date().getTime());
Map<String, Object> map = new HashMap<>();
map.put("bmcpNo", mer.getOrgNo());
map.put("bmcpNo", org.getExt1());
map.put("mercId", merCupNo);
param.put("reqData", map);

@ -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<String,Object> header = new HashMap<>();

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

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

@ -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<String, Object> 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<String, Object> 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<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -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," +

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

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

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

@ -34,6 +34,13 @@ public interface BsMerLedgerService {
*/
BsMerLedger getMerLedger(Long merId, PlatformTypeEnum platformType);
/**
* 获取商户分账信息
* @param receiverNo
* @return
*/
BsMerLedger getMerLedgerByReceiverNo(String receiverNo);
/**
* 查询商户分账信息
* @param id

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

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

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

@ -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<BsMerLedger> list = merLedgerMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public BsMerLedger getMerLedgerById(Long id) {
return merLedgerMapper.selectByPrimaryKey(id);

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

@ -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<BsMerWithdrawal> list = merWithdrawalMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
}

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

@ -12,6 +12,7 @@ public enum MerLedgerStatusEnum {
status1(1, "可用"),
status2(2, "审核中"),
status3(3, "审核驳回"),
status4(4, "待提交"),
;
private Integer number;

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

@ -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/
Loading…
Cancel
Save