提交代码

yy_dev
胡锐 2 years ago
parent fade043f67
commit c176ee986f
  1. 2
      bweb/src/main/java/com/bweb/controller/BsStoreDiscountActivityController.java
  2. 20
      bweb/src/main/resources/dev/logback.xml
  3. 20
      bweb/src/main/resources/prod/logback.xml
  4. 163
      cweb/src/main/java/com/cweb/controller/BsMerSettleAcctController.java
  5. 31
      cweb/src/main/java/com/cweb/controller/TestController.java
  6. 21
      cweb/src/main/resources/dev/logback.xml
  7. 20
      cweb/src/main/resources/prod/logback.xml
  8. 103
      service/src/main/java/com/hfkj/channel/hsg/HsgIntegralService.java
  9. 3
      service/src/main/java/com/hfkj/channel/hsg/config/HsgConfig.java
  10. 4
      service/src/main/java/com/hfkj/channel/lakala/LaKaLaTradeService.java
  11. 3
      service/src/main/java/com/hfkj/channel/lakala/config/LaKaLaConfig.java
  12. 96
      service/src/main/java/com/hfkj/channel/saas/SaasMerService.java
  13. 6
      service/src/main/java/com/hfkj/channel/saas/config/SaasConfig.java
  14. 37
      service/src/main/java/com/hfkj/channel/saas/utils/SaasCommon.java
  15. 1
      service/src/main/java/com/hfkj/config/CommonSysConfig.java
  16. 227
      service/src/main/java/com/hfkj/dao/BsMerSettleAcctApplyMapper.java
  17. 7
      service/src/main/java/com/hfkj/dao/BsMerSettleAcctApplyMapperExt.java
  18. 668
      service/src/main/java/com/hfkj/dao/BsMerSettleAcctApplySqlProvider.java
  19. 57
      service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java
  20. 56
      service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java
  21. 616
      service/src/main/java/com/hfkj/entity/BsMerSettleAcctApply.java
  22. 2633
      service/src/main/java/com/hfkj/entity/BsMerSettleAcctApplyExample.java
  23. 64
      service/src/main/java/com/hfkj/entity/BsTradeOrder.java
  24. 240
      service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java
  25. 27
      service/src/main/java/com/hfkj/service/BsMerSettleAcctApplyService.java
  26. 53
      service/src/main/java/com/hfkj/service/impl/BsMerSettleAcctApplyServiceImpl.java
  27. 21
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderRefundServiceImpl.java
  28. 28
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java
  29. 53
      service/src/main/java/com/hfkj/sysenum/MerSettleAcctApplyStatus.java
  30. 34
      service/src/main/resources/dev/commonConfig.properties
  31. 1
      service/src/main/resources/prod/commonConfig.properties

@ -78,7 +78,7 @@ public class BsStoreDiscountActivityController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的参与类型");
}
if (partakeWayEnum.getNumber().equals(StoreDiscountActivityPartakeWayEnum.type3.getNumber())
&& body.getRestrictType() == null || body.getRestrictPartakeNum() == null) {
&& (body.getRestrictType() == null || body.getRestrictPartakeNum() == null)) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "需要填写限制参与条件");
}

@ -69,4 +69,24 @@
<logger name="com.hfkj" level="ERROR">
<appender-ref ref="errorlog" />
</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>
</configuration>

@ -69,4 +69,24 @@
<logger name="com.hfkj" level="ERROR">
<appender-ref ref="errorlog" />
</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>
</configuration>

@ -0,0 +1,163 @@
package com.cweb.controller;
import com.cweb.config.SysConfig;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.ImageUtils;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.*;
import com.hfkj.model.*;
import com.hfkj.obs.HuaWeiYunObs;
import com.hfkj.service.*;
import com.hfkj.sysenum.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import net.coobird.thumbnailator.Thumbnails;
import org.apache.commons.collections4.MapUtils;
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 org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.File;
import java.io.FileOutputStream;
import java.util.*;
@Controller
@Api(value = "商户结算信息")
@RequestMapping(value = "/merSettleAcct")
public class BsMerSettleAcctController {
private static Logger log = LoggerFactory.getLogger(BsMerSettleAcctController.class);
@Resource
private BsMerSettleAcctApplyService merSettleAcctApplyService;
@Resource
private BsMerService merService;
@Resource
private CommonService commonService;
@RequestMapping(value="/createApplyUpdateSettle",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "创建申请修改结算")
public ResponseData createApplyUpdateSettle(@RequestBody BsMerSettleAcctApply merSettleAcct) {
try {
if (merSettleAcct.getMerId() == null
|| merSettleAcct.getApplyType() == null
|| merSettleAcct.getSettleType() == null
|| StringUtils.isBlank(merSettleAcct.getBankCardNo())
|| StringUtils.isBlank(merSettleAcct.getBankCardHolder())
|| merSettleAcct.getOpenningBankAreaCode() == null
|| (merSettleAcct.getSettleType().equals(MerSettleType.status1.getNumber()) && StringUtils.isBlank(merSettleAcct.getOpenningBankLicenseUrl()))
|| (merSettleAcct.getSettleType().equals(MerSettleType.status2.getNumber()) && StringUtils.isBlank(merSettleAcct.getBankCardImg()))
|| (merSettleAcct.getSettleType().equals(MerSettleType.status3.getNumber()) && StringUtils.isBlank(merSettleAcct.getBankCardImg()))
) {
log.error("configMerBasis error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
if (StringUtils.isBlank(merSettleAcct.getOpenningBankName())
|| StringUtils.isBlank(merSettleAcct.getOpenningBankCode())
|| StringUtils.isBlank(merSettleAcct.getClearingBankCode())) {
log.error("configMerBasis error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
SecRegion openningBankArea = commonService.getRegionsById(merSettleAcct.getOpenningBankAreaCode());
if (openningBankArea == null) {
log.error("configMerBasis error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的开户地区");
}
SecRegion openningBankCity = commonService.getRegionsById(openningBankArea.getParentId());
if (openningBankCity == null) {
log.error("configMerBasis error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的开户地区");
}
SecRegion openningBankProvince = commonService.getRegionsById(openningBankCity.getParentId());
if (openningBankProvince == null) {
log.error("configMerBasis error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的开户地区");
}
merSettleAcct.setOpenningBankAreaName(openningBankArea.getRegionName());
merSettleAcct.setOpenningBankCityCode(openningBankCity.getRegionId());
merSettleAcct.setOpenningBankCityName(openningBankCity.getRegionName());
merSettleAcct.setOpenningBankProvinceCode(openningBankProvince.getRegionId());
merSettleAcct.setOpenningBankProvinceName(openningBankProvince.getRegionName());
// 查询商户详情
BsMer bsMer = merService.getMer(merSettleAcct.getMerId());
if (bsMer == null) {
log.error("configMerBasis error!","未知商户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知商户");
}
if ((!bsMer.getMerStatus().equals(MerStatusEnum.status2.getNumber())
&& !bsMer.getMerStatus().equals(MerStatusEnum.status4.getNumber()))) {
log.error("configMerBasis error!","状态错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.STATUS_ERROR, "");
}
// 对私非法人结算
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, "需要结算人身份证信息");
} else {
// 对公结算、对私法人结算
merSettleAcct.setSettleIdCardName(bsMer.getLarName());
merSettleAcct.setSettleIdCardNo(bsMer.getLarIdCard());
merSettleAcct.setSettleIdCardPortraitImg(bsMer.getLarIdCardPortraitImg());
merSettleAcct.setSettleIdCardNationalEmblemImg(bsMer.getLarIdCardNationalEmblemImg());
merSettleAcct.setSettleIdPeriodType(bsMer.getBlisPeriodType());
merSettleAcct.setSettleIdCardPeriodStart(bsMer.getLarIdCardPeriodStart());
merSettleAcct.setSettleIdCardPeriodEnd(bsMer.getLarIdCardPeriodEnd());
}
merSettleAcct.setApplyNo(System.currentTimeMillis()+"");
merSettleAcct.setStatus(MerSettleAcctApplyStatus.status1.getNumber());
return ResponseMsgUtil.success("申请成功");
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/getMerDetail",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询商户详情")
public ResponseData getMerDetail(@RequestParam(value = "merId" , required = true) Long merId) {
try {
return ResponseMsgUtil.success(merService.getMerDetail(merId));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -22,7 +22,9 @@ import com.hfkj.channel.weixin.utils.WxUtils;
import com.hfkj.channel.weixin.utils.sdk.WXPayConstants;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.common.utils.ImageUtils;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.config.device.SoundService;
import com.hfkj.config.mqtt.MqttProviderService;
import com.hfkj.entity.BsLklMcc;
@ -98,8 +100,12 @@ public class TestController {
public ResponseData saasGetToken() {
try {
// return ResponseMsgUtil.success(LaKaLaConfig.queryCardBin("3100020709200056842"));
return ResponseMsgUtil.success(LaKaLaConfig.uploadFile("", "", ""));
return ResponseMsgUtil.success(LaKaLaConfig.queryCardBin("3100020709200056842"));
/* // 转换成bas64
String imageUrl = "https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com/merchant/57/1682405639861.jpeg";
String base64ImgUrl = ImageUtils.getBase64ByImgUrl(imageUrl);
String fileType = imageUrl.substring(imageUrl.lastIndexOf(".") + 1);
return ResponseMsgUtil.success(LaKaLaConfig.uploadFile("COOPERATION_QUALIFICATION_PROOF", fileType, base64ImgUrl));*/
} catch (Exception e) {
log.error(e.getMessage(), e);
@ -115,13 +121,14 @@ public class TestController {
// return ResponseMsgUtil.success(saasCommon.fileUpload(new File("D:/home/project/gratia-pay/filesystem/share/1680164428924.png"), "OTHERS", "0"));
// 996900 6900 6905
// return ResponseMsgUtil.success(saasCommon.getArea("1"));
// return ResponseMsgUtil.success(saasCommon.getBank("6530", "大坪支行"));
//return ResponseMsgUtil.success(saasCommon.getBank("6530", "恒丰银行重庆渝北支行"));
// tradeOrderProfitSharingService.createProfitSharing(tradeOrderService.getOrderByOutTradeNo("ZF1130202304261043149211335400"));
// laKaLaLedgerService.queryLedgerMer("8226900481608NL");
//laKaLaTradeSeparateService.separate("1530202304261049572195600000");
// tradeOrderProfitSharingService.createProfitSharing(tradeOrderService.getOrderByOutTradeNo("ZF1130202304261734049211335408"));
return ResponseMsgUtil.success(laKaLaTradeSeparateService.fallback("153020230426173509288272000001"));
// return ResponseMsgUtil.success(saasCommon.getUpdateToken());
return ResponseMsgUtil.success(saasMerService.updateSettleApply(38L));
// return ResponseMsgUtil.success("");
// 1200
// return ResponseMsgUtil.success(saasCommon.fileUpload(new HashMap<>()));
@ -142,6 +149,22 @@ public class TestController {
}
}
@RequestMapping(value="/saasTest1",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "saasTest")
public ResponseData saasTest1(@RequestParam(value = "reviewRelatedId", required = true) String reviewRelatedId) {
try {
// return ResponseMsgUtil.success(saasMerService.updateReview(reviewRelatedId));
return ResponseMsgUtil.success(saasMerService.getMerSettle("122952457"));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/soundSendMsg",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "音响发送消息")

@ -91,4 +91,25 @@
<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>
</configuration>

@ -91,4 +91,24 @@
<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>
</configuration>

@ -10,11 +10,13 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.common.utils.ResponseMsgUtil;
import io.netty.channel.ConnectTimeoutException;
import org.apache.commons.collections4.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.math.BigDecimal;
import java.net.SocketTimeoutException;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -29,7 +31,7 @@ public class HsgIntegralService {
private static Logger log = LoggerFactory.getLogger(HsgIntegralService.class);
/**
* 返利
* 积分返利
* @param productType
* @param phone
* @param orderNo
@ -47,10 +49,11 @@ public class HsgIntegralService {
BigDecimal price,
String storeName,
Date createTime) {
log.info("========== start 积分返利 ===========");
String requestJSON = "";
try {
Map<String , Object> mapPost = new HashMap<>();
mapPost.put("apiKey" , HsgConfig.apiKey);
mapPost.put("merchId" , HsgConfig.merchId);
mapPost.put("productType" , productType.getNumber()); // 101 普通支付 102 商家活动差价返利
mapPost.put("orderNo" , orderNo);
@ -59,9 +62,94 @@ public class HsgIntegralService {
mapPost.put("price" , price);
mapPost.put("title" , storeName);
mapPost.put("createTime" , createTime);
mapPost.put("sign" , WxUtils.generateSignApi(mapPost, MapUtils.getString(mapPost, "apiKey"), WXPayConstants.SignType.MD5));
mapPost.put("sign" , WxUtils.generateSignApi(mapPost, HsgConfig.apiKey, WXPayConstants.SignType.MD5));
requestJSON = JSONObject.toJSONString(mapPost);
log.info("请求参数:" + requestJSON);
JSONObject response = HttpsUtils.doPost(HsgConfig.hsgDomainName+"v1/orderRebate/rebate", mapPost, new HashMap<>());
System.out.println(response);
log.info("响应参数:" + response);
if (response == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求超时");
}
if (!response.getString("return_code").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("return_msg"));
}
return true;
} catch (SocketTimeoutException | ConnectTimeoutException e) {
log.info("请求超时:" + e);
return false;
} catch (Exception e) {
log.info("出现异常:" + e);
return false;
} finally {
log.info("========== end 积分返利 ===========");
}
}
/**
* 退款返利
* @param orderId
* @param orderNo
* @return
*/
public static Boolean recycleIntegral(String orderId,String orderNo) {
log.info("========== start 退款返利 ===========");
String requestJSON = "";
try {
Map<String , Object> mapPost = new HashMap<>();
mapPost.put("merchId" , HsgConfig.merchId);
mapPost.put("orderId" , orderId);
mapPost.put("orderNo" , orderNo);
mapPost.put("sign" , WxUtils.generateSignApi(mapPost, HsgConfig.apiKey, WXPayConstants.SignType.MD5));
requestJSON = JSONObject.toJSONString(mapPost);
log.info("请求参数:" + requestJSON);
JSONObject response = HttpsUtils.doPost(HsgConfig.hsgDomainName+"v1/orderRebate/recycleIntegral", mapPost, new HashMap<>());
log.info("响应参数:" + response.toJSONString());
if (response == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求超时");
}
if (!response.getString("return_code").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("return_msg"));
}
return true;
} catch (SocketTimeoutException | ConnectTimeoutException e) {
log.info("请求超时:" + e);
return false;
} catch (Exception e) {
log.info("出现异常:" + e);
return false;
} finally {
log.info("========== end 退款返利 ===========");
}
}
/**
* 通知退还积分状态
* @param orderId
* @param orderNo
* @return
*/
public static Boolean refundReturn(String orderId,String orderNo, Boolean status) {
log.info("========== start 通知退还积分状态 ===========");
String requestJSON = "";
try {
Map<String , Object> mapPost = new HashMap<>();
mapPost.put("merchId" , HsgConfig.merchId);
mapPost.put("orderId" , orderId);
mapPost.put("orderNo" , orderNo);
mapPost.put("refundStatus" , status.equals(true)?"succeed":"fail");
mapPost.put("sign" , WxUtils.generateSignApi(mapPost, HsgConfig.apiKey, WXPayConstants.SignType.MD5));
requestJSON = JSONObject.toJSONString(mapPost);
log.info("请求参数:" + requestJSON);
JSONObject response = HttpsUtils.doPost(HsgConfig.hsgDomainName+"v1/orderRebate/refundReturn", mapPost, new HashMap<>());
log.info("响应参数:" + response.toJSONString());
if (response == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求超时");
}
@ -69,8 +157,15 @@ public class HsgIntegralService {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, response.getString("return_msg"));
}
return true;
} catch (SocketTimeoutException | ConnectTimeoutException e) {
log.info("请求超时:" + e);
return false;
} catch (Exception e) {
log.info("出现异常:" + e);
return false;
} finally {
log.info("========== end 通知退还积分状态 ===========");
}
}

@ -9,9 +9,8 @@ import com.hfkj.config.CommonSysConst;
**/
public class HsgConfig {
public final static String hsgDomainName = CommonSysConst.getSysConfig().getHsg_domain_name();
public final static String apiKey = "0C7897EA3BD96156A5881618FF2FF645";
public final static String merchId = "20230258302";
public final static String hsgDomainName = CommonSysConst.getSysConfig().getHsg_domain_name();
}

@ -96,7 +96,7 @@ public class LaKaLaTradeService {
map.put("term_no", merPlatformTerm.getTermNo());
map.put("out_trade_no", order.getOutTradeNo());
map.put("auth_code", authCode);
map.put("total_amount", order.getTradeAmount().multiply(new BigDecimal("100")).intValue());
map.put("total_amount", order.getTradeActualAmount().multiply(new BigDecimal("100")).intValue());
map.put("notify_url", CommonSysConst.getSysConfig().getLkl_micro_pay_ret_url());
map.put("settle_type", order.getProfitSharingStatus().equals(true)?"1":"0");
@ -208,7 +208,7 @@ public class LaKaLaTradeService {
map.put("out_trade_no", order.getOutTradeNo());
map.put("account_type", order.getPayMode());
map.put("trans_type", "51");
map.put("total_amount", order.getTradeAmount().multiply(new BigDecimal("100")).intValue());
map.put("total_amount", order.getTradeActualAmount().multiply(new BigDecimal("100")).intValue());
map.put("subject", mer.getMerAbbreviate());
map.put("notify_url", CommonSysConst.getSysConfig().getLkl_micro_pay_ret_url());

@ -174,7 +174,8 @@ public class LaKaLaConfig {
heard.put("Authorization", reqParam.get("Authorization"));
JSONObject responseBody = HttpsUtils.doPost(CommonSysConst.getSysConfig().getLkl_request_url() + "/api/v2/mms/openApi/uploadFile", param, heard);
System.out.println("body:");
System.out.println("body:" + 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"));
}

@ -1,5 +1,6 @@
package com.hfkj.channel.saas;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.saas.config.SaasConfig;
import com.hfkj.channel.saas.utils.RSAUtil;
@ -52,6 +53,8 @@ public class SaasMerService {
@Resource
private BsMerRateService merRateService;
@Resource
private BsMerSettleAcctApplyService merSettleAcctApplyService;
@Resource
private BsMerPlatformNoService merPlatformNoService;
@ -274,22 +277,63 @@ public class SaasMerService {
/**
* 修改结算信息
* @param customerNo
* @param applyId 申请id
* @return
*/
public JSONObject updateSettle(String customerNo) {
public JSONObject updateSettleApply(Long applyId) {
try {
// 结算申请
BsMerSettleAcctApply merSettleAcctApply = merSettleAcctApplyService.getApplyById(applyId);
if (merSettleAcctApply == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的结算申请");
}
// 平台商户
BsMerPlatformNo merPlatformNo = merPlatformNoService.getPlatformNo(merSettleAcctApply.getMerId(), PlatformTypeEnum.type1);
if (merPlatformNo == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "未找到平台商户号");
}
Map<String,Object> param = new HashMap<>();
param.put("customerNo", customerNo);
param.put("accountKind", merSettleAcctApply.getSettleType().equals(MerSettleType.status1.getNumber())?"57":"58");
param.put("accountName", merSettleAcctApply.getSettleIdCardName());
param.put("accountNo", merSettleAcctApply.getBankCardNo());
param.put("bankName", merSettleAcctApply.getOpenningBankName());
param.put("bankNo", merSettleAcctApply.getOpenningBankCode());
param.put("clearingBankNo", merSettleAcctApply.getClearingBankCode());
param.put("identityNo", merSettleAcctApply.getSettleIdCardNo());
param.put("settleCityCode", merSettleAcctApply.getOpenningBankCityCode());
param.put("settleCityName", merSettleAcctApply.getOpenningBankCityName());
param.put("settleCountyCode", merSettleAcctApply.getOpenningBankAreaCode());
param.put("settleCountyName", merSettleAcctApply.getOpenningBankAreaName());
param.put("settleProvinceCode", merSettleAcctApply.getOpenningBankProvinceCode());
param.put("settleProvinceName", merSettleAcctApply.getOpenningBankProvinceName());
List<Map<String, Object>> attachmentsMapList = new ArrayList<>();
Map<String, Object> attachmentsMap;
attachmentsMap = new HashMap<>();
if (StringUtils.isNotBlank(merSettleAcctApply.getBankCardImg())) {
attachmentsMap.put("imgType", "BANK_CARD");
attachmentsMap.put("imgPath", saasCommon.fileUpload(new File(CommonSysConst.getSysConfig().getFile_url() +"/"+ merSettleAcctApply.getBankCardImg()), "BANK_CARD", "0").getString("url"));
attachmentsMapList.add(attachmentsMap);
} else if (StringUtils.isNotBlank(merSettleAcctApply.getOpenningBankLicenseUrl())) {
attachmentsMap = new HashMap<>();
attachmentsMap.put("imgType", "OPENING_PERMIT");
attachmentsMap.put("imgPath", saasCommon.fileUpload(new File(CommonSysConst.getSysConfig().getFile_url() +"/"+ merSettleAcctApply.getOpenningBankLicenseUrl()), "OPENING_PERMIT", "0").getString("url"));
attachmentsMapList.add(attachmentsMap);
}
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "bearer " + saasCommon.getToken());
param.put("attachments", attachmentsMapList);
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "bearer " + saasCommon.getUpdateToken());
/*
JSONObject obj = new JSONObject();
obj.put("data", Base64.encodeBase64String(RSAUtil.encryptByPrivateKey(JSONObject.toJSONString(param).getBytes(), Base64.decodeBase64(RSAUtil.PRIVATE_KEY))));
obj.put("data", Base64.encodeBase64String(RSAUtil.encryptByPrivateKey(JSONObject.toJSONString(param).getBytes(), Base64.decodeBase64(RSAUtil.PRIVATE_KEY))));*/
JSONObject responseObj = HttpsUtils.doPost(SaasConfig.requestMerUrl + "open/merchant/info", obj, header);
System.out.println(responseObj.toJSONString());
JSONObject responseObj = HttpsUtils.doPost(SaasConfig.requestMerUrl + "channel/customer/update/settle/" + merPlatformNo.getPlatformNo(), param, header);
System.out.println("body:" + JSONObject.toJSONString(param));
System.out.println("response:" + responseObj.toJSONString());
if (responseObj == null || !responseObj.getString("code").equals("000000")) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, responseObj.getString("message"));
}
@ -301,6 +345,42 @@ public class SaasMerService {
}
}
public JSONObject updateReview(String reviewRelatedId) {
try {
Map<String,Object> param = new HashMap<>();
param.put("reviewRelatedId", reviewRelatedId);
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "bearer " + saasCommon.getUpdateToken());
String result = HttpsUtils.doSaasGet(SaasConfig.requestMerUpdateUrl+"customer/update/review", param, header, true);
return JSONObject.parseObject(result);
} catch (Exception e) {
System.out.println(e);
return null;
}
}
public JSONObject getMerSettle(String customerNo) {
try {
Map<String,Object> param = new HashMap<>();
param.put("customerNo", customerNo);
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "bearer " + saasCommon.getUpdateToken());
String result = HttpsUtils.doSaasGet(SaasConfig.requestMerUrl+"channel/customer/update/settle", param, header, false);
return JSONObject.parseObject(result);
} catch (Exception e) {
System.out.println(e);
return null;
}
}
/**
* 查询银行地区编码
* @param customerNo

@ -13,11 +13,17 @@ public class SaasConfig {
public static String requestMerRegistrationUrl = CommonSysConst.getSysConfig().getLkl_saas_request_mer_registration_url();
public static String requestMerRegistrationCommonUrl = CommonSysConst.getSysConfig().getLkl_saas_request_mer_registration_common_url();
public static String requestMerUrl = CommonSysConst.getSysConfig().getLkl_saas_request_mer_url();
public static String requestMerUpdateUrl = CommonSysConst.getSysConfig().getLkl_saas_request_mer_update_url();
public static String client_id = CommonSysConst.getSysConfig().getLkl_saas_client_id();
public static String client_secret = CommonSysConst.getSysConfig().getLkl_saas_client_secret();
public static String activityId = CommonSysConst.getSysConfig().getLkl_saas_activity_id();
public static String userNo = CommonSysConst.getSysConfig().getLkl_saas_user_no();
// public static String username = "13200000001";
// public static String password = "12345qwert";
public static String username = "13638395536";
public static String password = "lkl1qaz";
/* public static String requestMerRegistrationTokenUrl = "https://test.wsmsd.cn/sit/htkauth/oauth/token";
public static String requestMerRegistrationUrl = "https://test.wsmsd.cn/sit/htkregistration/merchant/";
public static String requestMerRegistrationCommonUrl = "https://test.wsmsd.cn/sit/htkregistration/";

@ -10,6 +10,7 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.common.utils.RedisUtil;
import com.hfkj.config.CommonSysConst;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.entity.mime.content.FileBody;
import org.slf4j.Logger;
@ -75,6 +76,42 @@ public class SaasCommon {
return null;
}
public Object getUpdateToken() {
try {
Object saasToken = redisUtil.get("SAAS_UPDATE_TOKEN");
if (saasToken != null) {
return saasToken.toString();
}
Map<String,Object> param = new HashMap<>();
param.put("grant_type", "password");
param.put("username", SaasConfig.username);
param.put("password", SaasConfig.password);
param.put("scope", "all");
Map<String,Object> header = new HashMap<>();
header.put("Authorization", "Basic " + Base64Util.encode(SaasConfig.client_id+":"+SaasConfig.client_secret));
// 请求参数
String requestParam = SaasUtils.paramSort(param);
log.info("==============start 获取token start ==============");
log.info("请求header:" + JSONObject.toJSONString(header));
log.info("请求参数:" + requestParam);
JSONObject jsonObject = HttpsUtils.doPostForm(SaasConfig.requestMerRegistrationTokenUrl, requestParam, header);
log.info("响应参数:" + jsonObject);
if (StringUtils.isNotBlank(jsonObject.getString("access_token"))) {
redisUtil.set("SAAS_UPDATE_TOKEN", jsonObject.getString("access_token"), jsonObject.getLong("expires_in"));
return jsonObject.getString("access_token");
}
} catch (Exception e) {
log.info("出现异常:", e);
return null;
} finally {
log.info("==============end 获取token end ==============");
}
return null;
}
/**
* 文件上传
* @param file 文件

@ -95,6 +95,7 @@ public class CommonSysConfig {
private String lkl_saas_user_no;
private String lkl_saas_request_mer_registration_token_url;
private String lkl_saas_request_mer_registration_url;
private String lkl_saas_request_mer_update_url;
private String lkl_saas_request_mer_registration_common_url;
private String lkl_saas_request_mer_url;
private String lkl_saas_public_key;

@ -0,0 +1,227 @@
package com.hfkj.dao;
import com.hfkj.entity.BsMerSettleAcctApply;
import com.hfkj.entity.BsMerSettleAcctApplyExample;
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 BsMerSettleAcctApplyMapper extends BsMerSettleAcctApplyMapperExt {
@SelectProvider(type=BsMerSettleAcctApplySqlProvider.class, method="countByExample")
long countByExample(BsMerSettleAcctApplyExample example);
@DeleteProvider(type=BsMerSettleAcctApplySqlProvider.class, method="deleteByExample")
int deleteByExample(BsMerSettleAcctApplyExample example);
@Delete({
"delete from bs_mer_settle_acct_apply",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_mer_settle_acct_apply (apply_no, apply_type, ",
"mer_id, settle_type, ",
"commission_img, bank_card_img, ",
"bank_name, bank_card_no, ",
"bank_card_holder, openning_bank_city_code, ",
"openning_bank_city_name, openning_bank_area_code, ",
"openning_bank_area_name, openning_bank_province_code, ",
"openning_bank_province_name, openning_bank_code, ",
"openning_bank_name, openning_bank_license_url, ",
"clearing_bank_code, settle_id_card_name, ",
"settle_id_card_no, settle_id_card_address, ",
"settle_id_card_portrait_img, settle_id_card_national_emblem_img, ",
"settle_id_period_type, settle_id_card_period_start, ",
"settle_id_card_period_end, electronic_pact, ",
"`status`, reject_reason, ",
"create_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{applyNo,jdbcType=VARCHAR}, #{applyType,jdbcType=INTEGER}, ",
"#{merId,jdbcType=BIGINT}, #{settleType,jdbcType=INTEGER}, ",
"#{commissionImg,jdbcType=VARCHAR}, #{bankCardImg,jdbcType=VARCHAR}, ",
"#{bankName,jdbcType=VARCHAR}, #{bankCardNo,jdbcType=VARCHAR}, ",
"#{bankCardHolder,jdbcType=VARCHAR}, #{openningBankCityCode,jdbcType=BIGINT}, ",
"#{openningBankCityName,jdbcType=VARCHAR}, #{openningBankAreaCode,jdbcType=BIGINT}, ",
"#{openningBankAreaName,jdbcType=VARCHAR}, #{openningBankProvinceCode,jdbcType=BIGINT}, ",
"#{openningBankProvinceName,jdbcType=VARCHAR}, #{openningBankCode,jdbcType=VARCHAR}, ",
"#{openningBankName,jdbcType=VARCHAR}, #{openningBankLicenseUrl,jdbcType=VARCHAR}, ",
"#{clearingBankCode,jdbcType=VARCHAR}, #{settleIdCardName,jdbcType=VARCHAR}, ",
"#{settleIdCardNo,jdbcType=VARCHAR}, #{settleIdCardAddress,jdbcType=VARCHAR}, ",
"#{settleIdCardPortraitImg,jdbcType=VARCHAR}, #{settleIdCardNationalEmblemImg,jdbcType=VARCHAR}, ",
"#{settleIdPeriodType,jdbcType=INTEGER}, #{settleIdCardPeriodStart,jdbcType=VARCHAR}, ",
"#{settleIdCardPeriodEnd,jdbcType=VARCHAR}, #{electronicPact,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{rejectReason,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsMerSettleAcctApply record);
@InsertProvider(type=BsMerSettleAcctApplySqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsMerSettleAcctApply record);
@SelectProvider(type=BsMerSettleAcctApplySqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
@Result(column="apply_type", property="applyType", jdbcType=JdbcType.INTEGER),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="settle_type", property="settleType", jdbcType=JdbcType.INTEGER),
@Result(column="commission_img", property="commissionImg", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_card_img", property="bankCardImg", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_card_no", property="bankCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_card_holder", property="bankCardHolder", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_city_code", property="openningBankCityCode", jdbcType=JdbcType.BIGINT),
@Result(column="openning_bank_city_name", property="openningBankCityName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_area_code", property="openningBankAreaCode", jdbcType=JdbcType.BIGINT),
@Result(column="openning_bank_area_name", property="openningBankAreaName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_province_code", property="openningBankProvinceCode", jdbcType=JdbcType.BIGINT),
@Result(column="openning_bank_province_name", property="openningBankProvinceName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_code", property="openningBankCode", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_name", property="openningBankName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_license_url", property="openningBankLicenseUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="clearing_bank_code", property="clearingBankCode", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_name", property="settleIdCardName", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_no", property="settleIdCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_address", property="settleIdCardAddress", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_portrait_img", property="settleIdCardPortraitImg", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_national_emblem_img", property="settleIdCardNationalEmblemImg", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_period_type", property="settleIdPeriodType", jdbcType=JdbcType.INTEGER),
@Result(column="settle_id_card_period_start", property="settleIdCardPeriodStart", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_period_end", property="settleIdCardPeriodEnd", jdbcType=JdbcType.VARCHAR),
@Result(column="electronic_pact", property="electronicPact", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="reject_reason", property="rejectReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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<BsMerSettleAcctApply> selectByExample(BsMerSettleAcctApplyExample example);
@Select({
"select",
"id, apply_no, apply_type, mer_id, settle_type, commission_img, bank_card_img, ",
"bank_name, bank_card_no, bank_card_holder, openning_bank_city_code, openning_bank_city_name, ",
"openning_bank_area_code, openning_bank_area_name, openning_bank_province_code, ",
"openning_bank_province_name, openning_bank_code, openning_bank_name, openning_bank_license_url, ",
"clearing_bank_code, settle_id_card_name, settle_id_card_no, settle_id_card_address, ",
"settle_id_card_portrait_img, settle_id_card_national_emblem_img, settle_id_period_type, ",
"settle_id_card_period_start, settle_id_card_period_end, electronic_pact, `status`, ",
"reject_reason, create_time, update_time, ext_1, ext_2, ext_3",
"from bs_mer_settle_acct_apply",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
@Result(column="apply_type", property="applyType", jdbcType=JdbcType.INTEGER),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="settle_type", property="settleType", jdbcType=JdbcType.INTEGER),
@Result(column="commission_img", property="commissionImg", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_card_img", property="bankCardImg", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_name", property="bankName", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_card_no", property="bankCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="bank_card_holder", property="bankCardHolder", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_city_code", property="openningBankCityCode", jdbcType=JdbcType.BIGINT),
@Result(column="openning_bank_city_name", property="openningBankCityName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_area_code", property="openningBankAreaCode", jdbcType=JdbcType.BIGINT),
@Result(column="openning_bank_area_name", property="openningBankAreaName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_province_code", property="openningBankProvinceCode", jdbcType=JdbcType.BIGINT),
@Result(column="openning_bank_province_name", property="openningBankProvinceName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_code", property="openningBankCode", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_name", property="openningBankName", jdbcType=JdbcType.VARCHAR),
@Result(column="openning_bank_license_url", property="openningBankLicenseUrl", jdbcType=JdbcType.VARCHAR),
@Result(column="clearing_bank_code", property="clearingBankCode", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_name", property="settleIdCardName", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_no", property="settleIdCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_address", property="settleIdCardAddress", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_portrait_img", property="settleIdCardPortraitImg", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_national_emblem_img", property="settleIdCardNationalEmblemImg", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_period_type", property="settleIdPeriodType", jdbcType=JdbcType.INTEGER),
@Result(column="settle_id_card_period_start", property="settleIdCardPeriodStart", jdbcType=JdbcType.VARCHAR),
@Result(column="settle_id_card_period_end", property="settleIdCardPeriodEnd", jdbcType=JdbcType.VARCHAR),
@Result(column="electronic_pact", property="electronicPact", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="reject_reason", property="rejectReason", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@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)
})
BsMerSettleAcctApply selectByPrimaryKey(Long id);
@UpdateProvider(type=BsMerSettleAcctApplySqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsMerSettleAcctApply record, @Param("example") BsMerSettleAcctApplyExample example);
@UpdateProvider(type=BsMerSettleAcctApplySqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsMerSettleAcctApply record, @Param("example") BsMerSettleAcctApplyExample example);
@UpdateProvider(type=BsMerSettleAcctApplySqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsMerSettleAcctApply record);
@Update({
"update bs_mer_settle_acct_apply",
"set apply_no = #{applyNo,jdbcType=VARCHAR},",
"apply_type = #{applyType,jdbcType=INTEGER},",
"mer_id = #{merId,jdbcType=BIGINT},",
"settle_type = #{settleType,jdbcType=INTEGER},",
"commission_img = #{commissionImg,jdbcType=VARCHAR},",
"bank_card_img = #{bankCardImg,jdbcType=VARCHAR},",
"bank_name = #{bankName,jdbcType=VARCHAR},",
"bank_card_no = #{bankCardNo,jdbcType=VARCHAR},",
"bank_card_holder = #{bankCardHolder,jdbcType=VARCHAR},",
"openning_bank_city_code = #{openningBankCityCode,jdbcType=BIGINT},",
"openning_bank_city_name = #{openningBankCityName,jdbcType=VARCHAR},",
"openning_bank_area_code = #{openningBankAreaCode,jdbcType=BIGINT},",
"openning_bank_area_name = #{openningBankAreaName,jdbcType=VARCHAR},",
"openning_bank_province_code = #{openningBankProvinceCode,jdbcType=BIGINT},",
"openning_bank_province_name = #{openningBankProvinceName,jdbcType=VARCHAR},",
"openning_bank_code = #{openningBankCode,jdbcType=VARCHAR},",
"openning_bank_name = #{openningBankName,jdbcType=VARCHAR},",
"openning_bank_license_url = #{openningBankLicenseUrl,jdbcType=VARCHAR},",
"clearing_bank_code = #{clearingBankCode,jdbcType=VARCHAR},",
"settle_id_card_name = #{settleIdCardName,jdbcType=VARCHAR},",
"settle_id_card_no = #{settleIdCardNo,jdbcType=VARCHAR},",
"settle_id_card_address = #{settleIdCardAddress,jdbcType=VARCHAR},",
"settle_id_card_portrait_img = #{settleIdCardPortraitImg,jdbcType=VARCHAR},",
"settle_id_card_national_emblem_img = #{settleIdCardNationalEmblemImg,jdbcType=VARCHAR},",
"settle_id_period_type = #{settleIdPeriodType,jdbcType=INTEGER},",
"settle_id_card_period_start = #{settleIdCardPeriodStart,jdbcType=VARCHAR},",
"settle_id_card_period_end = #{settleIdCardPeriodEnd,jdbcType=VARCHAR},",
"electronic_pact = #{electronicPact,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"reject_reason = #{rejectReason,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsMerSettleAcctApply record);
}

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

@ -0,0 +1,668 @@
package com.hfkj.dao;
import com.hfkj.entity.BsMerSettleAcctApply;
import com.hfkj.entity.BsMerSettleAcctApplyExample.Criteria;
import com.hfkj.entity.BsMerSettleAcctApplyExample.Criterion;
import com.hfkj.entity.BsMerSettleAcctApplyExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsMerSettleAcctApplySqlProvider {
public String countByExample(BsMerSettleAcctApplyExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_mer_settle_acct_apply");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsMerSettleAcctApplyExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_mer_settle_acct_apply");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsMerSettleAcctApply record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_mer_settle_acct_apply");
if (record.getApplyNo() != null) {
sql.VALUES("apply_no", "#{applyNo,jdbcType=VARCHAR}");
}
if (record.getApplyType() != null) {
sql.VALUES("apply_type", "#{applyType,jdbcType=INTEGER}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getSettleType() != null) {
sql.VALUES("settle_type", "#{settleType,jdbcType=INTEGER}");
}
if (record.getCommissionImg() != null) {
sql.VALUES("commission_img", "#{commissionImg,jdbcType=VARCHAR}");
}
if (record.getBankCardImg() != null) {
sql.VALUES("bank_card_img", "#{bankCardImg,jdbcType=VARCHAR}");
}
if (record.getBankName() != null) {
sql.VALUES("bank_name", "#{bankName,jdbcType=VARCHAR}");
}
if (record.getBankCardNo() != null) {
sql.VALUES("bank_card_no", "#{bankCardNo,jdbcType=VARCHAR}");
}
if (record.getBankCardHolder() != null) {
sql.VALUES("bank_card_holder", "#{bankCardHolder,jdbcType=VARCHAR}");
}
if (record.getOpenningBankCityCode() != null) {
sql.VALUES("openning_bank_city_code", "#{openningBankCityCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankCityName() != null) {
sql.VALUES("openning_bank_city_name", "#{openningBankCityName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankAreaCode() != null) {
sql.VALUES("openning_bank_area_code", "#{openningBankAreaCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankAreaName() != null) {
sql.VALUES("openning_bank_area_name", "#{openningBankAreaName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankProvinceCode() != null) {
sql.VALUES("openning_bank_province_code", "#{openningBankProvinceCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankProvinceName() != null) {
sql.VALUES("openning_bank_province_name", "#{openningBankProvinceName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankCode() != null) {
sql.VALUES("openning_bank_code", "#{openningBankCode,jdbcType=VARCHAR}");
}
if (record.getOpenningBankName() != null) {
sql.VALUES("openning_bank_name", "#{openningBankName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankLicenseUrl() != null) {
sql.VALUES("openning_bank_license_url", "#{openningBankLicenseUrl,jdbcType=VARCHAR}");
}
if (record.getClearingBankCode() != null) {
sql.VALUES("clearing_bank_code", "#{clearingBankCode,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardName() != null) {
sql.VALUES("settle_id_card_name", "#{settleIdCardName,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardNo() != null) {
sql.VALUES("settle_id_card_no", "#{settleIdCardNo,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardAddress() != null) {
sql.VALUES("settle_id_card_address", "#{settleIdCardAddress,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardPortraitImg() != null) {
sql.VALUES("settle_id_card_portrait_img", "#{settleIdCardPortraitImg,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardNationalEmblemImg() != null) {
sql.VALUES("settle_id_card_national_emblem_img", "#{settleIdCardNationalEmblemImg,jdbcType=VARCHAR}");
}
if (record.getSettleIdPeriodType() != null) {
sql.VALUES("settle_id_period_type", "#{settleIdPeriodType,jdbcType=INTEGER}");
}
if (record.getSettleIdCardPeriodStart() != null) {
sql.VALUES("settle_id_card_period_start", "#{settleIdCardPeriodStart,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardPeriodEnd() != null) {
sql.VALUES("settle_id_card_period_end", "#{settleIdCardPeriodEnd,jdbcType=VARCHAR}");
}
if (record.getElectronicPact() != null) {
sql.VALUES("electronic_pact", "#{electronicPact,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getRejectReason() != null) {
sql.VALUES("reject_reason", "#{rejectReason,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(BsMerSettleAcctApplyExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("apply_no");
sql.SELECT("apply_type");
sql.SELECT("mer_id");
sql.SELECT("settle_type");
sql.SELECT("commission_img");
sql.SELECT("bank_card_img");
sql.SELECT("bank_name");
sql.SELECT("bank_card_no");
sql.SELECT("bank_card_holder");
sql.SELECT("openning_bank_city_code");
sql.SELECT("openning_bank_city_name");
sql.SELECT("openning_bank_area_code");
sql.SELECT("openning_bank_area_name");
sql.SELECT("openning_bank_province_code");
sql.SELECT("openning_bank_province_name");
sql.SELECT("openning_bank_code");
sql.SELECT("openning_bank_name");
sql.SELECT("openning_bank_license_url");
sql.SELECT("clearing_bank_code");
sql.SELECT("settle_id_card_name");
sql.SELECT("settle_id_card_no");
sql.SELECT("settle_id_card_address");
sql.SELECT("settle_id_card_portrait_img");
sql.SELECT("settle_id_card_national_emblem_img");
sql.SELECT("settle_id_period_type");
sql.SELECT("settle_id_card_period_start");
sql.SELECT("settle_id_card_period_end");
sql.SELECT("electronic_pact");
sql.SELECT("`status`");
sql.SELECT("reject_reason");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_mer_settle_acct_apply");
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) {
BsMerSettleAcctApply record = (BsMerSettleAcctApply) parameter.get("record");
BsMerSettleAcctApplyExample example = (BsMerSettleAcctApplyExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_mer_settle_acct_apply");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getApplyNo() != null) {
sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}");
}
if (record.getApplyType() != null) {
sql.SET("apply_type = #{record.applyType,jdbcType=INTEGER}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getSettleType() != null) {
sql.SET("settle_type = #{record.settleType,jdbcType=INTEGER}");
}
if (record.getCommissionImg() != null) {
sql.SET("commission_img = #{record.commissionImg,jdbcType=VARCHAR}");
}
if (record.getBankCardImg() != null) {
sql.SET("bank_card_img = #{record.bankCardImg,jdbcType=VARCHAR}");
}
if (record.getBankName() != null) {
sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}");
}
if (record.getBankCardNo() != null) {
sql.SET("bank_card_no = #{record.bankCardNo,jdbcType=VARCHAR}");
}
if (record.getBankCardHolder() != null) {
sql.SET("bank_card_holder = #{record.bankCardHolder,jdbcType=VARCHAR}");
}
if (record.getOpenningBankCityCode() != null) {
sql.SET("openning_bank_city_code = #{record.openningBankCityCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankCityName() != null) {
sql.SET("openning_bank_city_name = #{record.openningBankCityName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankAreaCode() != null) {
sql.SET("openning_bank_area_code = #{record.openningBankAreaCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankAreaName() != null) {
sql.SET("openning_bank_area_name = #{record.openningBankAreaName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankProvinceCode() != null) {
sql.SET("openning_bank_province_code = #{record.openningBankProvinceCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankProvinceName() != null) {
sql.SET("openning_bank_province_name = #{record.openningBankProvinceName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankCode() != null) {
sql.SET("openning_bank_code = #{record.openningBankCode,jdbcType=VARCHAR}");
}
if (record.getOpenningBankName() != null) {
sql.SET("openning_bank_name = #{record.openningBankName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankLicenseUrl() != null) {
sql.SET("openning_bank_license_url = #{record.openningBankLicenseUrl,jdbcType=VARCHAR}");
}
if (record.getClearingBankCode() != null) {
sql.SET("clearing_bank_code = #{record.clearingBankCode,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardName() != null) {
sql.SET("settle_id_card_name = #{record.settleIdCardName,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardNo() != null) {
sql.SET("settle_id_card_no = #{record.settleIdCardNo,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardAddress() != null) {
sql.SET("settle_id_card_address = #{record.settleIdCardAddress,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardPortraitImg() != null) {
sql.SET("settle_id_card_portrait_img = #{record.settleIdCardPortraitImg,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardNationalEmblemImg() != null) {
sql.SET("settle_id_card_national_emblem_img = #{record.settleIdCardNationalEmblemImg,jdbcType=VARCHAR}");
}
if (record.getSettleIdPeriodType() != null) {
sql.SET("settle_id_period_type = #{record.settleIdPeriodType,jdbcType=INTEGER}");
}
if (record.getSettleIdCardPeriodStart() != null) {
sql.SET("settle_id_card_period_start = #{record.settleIdCardPeriodStart,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardPeriodEnd() != null) {
sql.SET("settle_id_card_period_end = #{record.settleIdCardPeriodEnd,jdbcType=VARCHAR}");
}
if (record.getElectronicPact() != null) {
sql.SET("electronic_pact = #{record.electronicPact,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getRejectReason() != null) {
sql.SET("reject_reason = #{record.rejectReason,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_settle_acct_apply");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}");
sql.SET("apply_type = #{record.applyType,jdbcType=INTEGER}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("settle_type = #{record.settleType,jdbcType=INTEGER}");
sql.SET("commission_img = #{record.commissionImg,jdbcType=VARCHAR}");
sql.SET("bank_card_img = #{record.bankCardImg,jdbcType=VARCHAR}");
sql.SET("bank_name = #{record.bankName,jdbcType=VARCHAR}");
sql.SET("bank_card_no = #{record.bankCardNo,jdbcType=VARCHAR}");
sql.SET("bank_card_holder = #{record.bankCardHolder,jdbcType=VARCHAR}");
sql.SET("openning_bank_city_code = #{record.openningBankCityCode,jdbcType=BIGINT}");
sql.SET("openning_bank_city_name = #{record.openningBankCityName,jdbcType=VARCHAR}");
sql.SET("openning_bank_area_code = #{record.openningBankAreaCode,jdbcType=BIGINT}");
sql.SET("openning_bank_area_name = #{record.openningBankAreaName,jdbcType=VARCHAR}");
sql.SET("openning_bank_province_code = #{record.openningBankProvinceCode,jdbcType=BIGINT}");
sql.SET("openning_bank_province_name = #{record.openningBankProvinceName,jdbcType=VARCHAR}");
sql.SET("openning_bank_code = #{record.openningBankCode,jdbcType=VARCHAR}");
sql.SET("openning_bank_name = #{record.openningBankName,jdbcType=VARCHAR}");
sql.SET("openning_bank_license_url = #{record.openningBankLicenseUrl,jdbcType=VARCHAR}");
sql.SET("clearing_bank_code = #{record.clearingBankCode,jdbcType=VARCHAR}");
sql.SET("settle_id_card_name = #{record.settleIdCardName,jdbcType=VARCHAR}");
sql.SET("settle_id_card_no = #{record.settleIdCardNo,jdbcType=VARCHAR}");
sql.SET("settle_id_card_address = #{record.settleIdCardAddress,jdbcType=VARCHAR}");
sql.SET("settle_id_card_portrait_img = #{record.settleIdCardPortraitImg,jdbcType=VARCHAR}");
sql.SET("settle_id_card_national_emblem_img = #{record.settleIdCardNationalEmblemImg,jdbcType=VARCHAR}");
sql.SET("settle_id_period_type = #{record.settleIdPeriodType,jdbcType=INTEGER}");
sql.SET("settle_id_card_period_start = #{record.settleIdCardPeriodStart,jdbcType=VARCHAR}");
sql.SET("settle_id_card_period_end = #{record.settleIdCardPeriodEnd,jdbcType=VARCHAR}");
sql.SET("electronic_pact = #{record.electronicPact,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("reject_reason = #{record.rejectReason,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
BsMerSettleAcctApplyExample example = (BsMerSettleAcctApplyExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsMerSettleAcctApply record) {
SQL sql = new SQL();
sql.UPDATE("bs_mer_settle_acct_apply");
if (record.getApplyNo() != null) {
sql.SET("apply_no = #{applyNo,jdbcType=VARCHAR}");
}
if (record.getApplyType() != null) {
sql.SET("apply_type = #{applyType,jdbcType=INTEGER}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getSettleType() != null) {
sql.SET("settle_type = #{settleType,jdbcType=INTEGER}");
}
if (record.getCommissionImg() != null) {
sql.SET("commission_img = #{commissionImg,jdbcType=VARCHAR}");
}
if (record.getBankCardImg() != null) {
sql.SET("bank_card_img = #{bankCardImg,jdbcType=VARCHAR}");
}
if (record.getBankName() != null) {
sql.SET("bank_name = #{bankName,jdbcType=VARCHAR}");
}
if (record.getBankCardNo() != null) {
sql.SET("bank_card_no = #{bankCardNo,jdbcType=VARCHAR}");
}
if (record.getBankCardHolder() != null) {
sql.SET("bank_card_holder = #{bankCardHolder,jdbcType=VARCHAR}");
}
if (record.getOpenningBankCityCode() != null) {
sql.SET("openning_bank_city_code = #{openningBankCityCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankCityName() != null) {
sql.SET("openning_bank_city_name = #{openningBankCityName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankAreaCode() != null) {
sql.SET("openning_bank_area_code = #{openningBankAreaCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankAreaName() != null) {
sql.SET("openning_bank_area_name = #{openningBankAreaName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankProvinceCode() != null) {
sql.SET("openning_bank_province_code = #{openningBankProvinceCode,jdbcType=BIGINT}");
}
if (record.getOpenningBankProvinceName() != null) {
sql.SET("openning_bank_province_name = #{openningBankProvinceName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankCode() != null) {
sql.SET("openning_bank_code = #{openningBankCode,jdbcType=VARCHAR}");
}
if (record.getOpenningBankName() != null) {
sql.SET("openning_bank_name = #{openningBankName,jdbcType=VARCHAR}");
}
if (record.getOpenningBankLicenseUrl() != null) {
sql.SET("openning_bank_license_url = #{openningBankLicenseUrl,jdbcType=VARCHAR}");
}
if (record.getClearingBankCode() != null) {
sql.SET("clearing_bank_code = #{clearingBankCode,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardName() != null) {
sql.SET("settle_id_card_name = #{settleIdCardName,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardNo() != null) {
sql.SET("settle_id_card_no = #{settleIdCardNo,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardAddress() != null) {
sql.SET("settle_id_card_address = #{settleIdCardAddress,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardPortraitImg() != null) {
sql.SET("settle_id_card_portrait_img = #{settleIdCardPortraitImg,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardNationalEmblemImg() != null) {
sql.SET("settle_id_card_national_emblem_img = #{settleIdCardNationalEmblemImg,jdbcType=VARCHAR}");
}
if (record.getSettleIdPeriodType() != null) {
sql.SET("settle_id_period_type = #{settleIdPeriodType,jdbcType=INTEGER}");
}
if (record.getSettleIdCardPeriodStart() != null) {
sql.SET("settle_id_card_period_start = #{settleIdCardPeriodStart,jdbcType=VARCHAR}");
}
if (record.getSettleIdCardPeriodEnd() != null) {
sql.SET("settle_id_card_period_end = #{settleIdCardPeriodEnd,jdbcType=VARCHAR}");
}
if (record.getElectronicPact() != null) {
sql.SET("electronic_pact = #{electronicPact,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getRejectReason() != null) {
sql.SET("reject_reason = #{rejectReason,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsMerSettleAcctApplyExample 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());
}
}
}

@ -47,17 +47,19 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"qr_code_id, qr_code_sn, ",
"platform_type, platform_mer_no, ",
"platform_trade_no, platform_log_no, ",
"platform_appid, pay_user_id, ",
"platform_appid, platform_rate, ",
"platform_commission, pay_user_id, ",
"pay_mode, out_trade_no, ",
"trade_amount, store_discount_satisfy, ",
"store_discount_id, store_discount_name, ",
"store_discount_type, store_discount_condition, ",
"store_discount_price, store_discount_final_cost_price, ",
"store_discount_actual_price, user_id, ",
"user_phone, user_discount_id, ",
"user_discount_name, user_discount_type, ",
"user_discount_price, user_discount_actual_price, ",
"trade_actual_amount, acc_trade_no, ",
"store_discount_actual_price, store_discount_profit_price, ",
"user_id, user_phone, ",
"user_discount_id, user_discount_name, ",
"user_discount_type, user_discount_price, ",
"user_discount_actual_price, trade_actual_amount, ",
"income_amout, acc_trade_no, ",
"acc_mdiscount_amount, acc_discount_amount, ",
"acc_payment_code, card_type, ",
"`status`, profit_sharing_status, ",
@ -72,17 +74,19 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ",
"#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ",
"#{platformTradeNo,jdbcType=VARCHAR}, #{platformLogNo,jdbcType=VARCHAR}, ",
"#{platformAppid,jdbcType=VARCHAR}, #{payUserId,jdbcType=VARCHAR}, ",
"#{platformAppid,jdbcType=VARCHAR}, #{platformRate,jdbcType=DECIMAL}, ",
"#{platformCommission,jdbcType=DECIMAL}, #{payUserId,jdbcType=VARCHAR}, ",
"#{payMode,jdbcType=VARCHAR}, #{outTradeNo,jdbcType=VARCHAR}, ",
"#{tradeAmount,jdbcType=DECIMAL}, #{storeDiscountSatisfy,jdbcType=BIT}, ",
"#{storeDiscountId,jdbcType=BIGINT}, #{storeDiscountName,jdbcType=VARCHAR}, ",
"#{storeDiscountType,jdbcType=INTEGER}, #{storeDiscountCondition,jdbcType=DECIMAL}, ",
"#{storeDiscountPrice,jdbcType=DECIMAL}, #{storeDiscountFinalCostPrice,jdbcType=DECIMAL}, ",
"#{storeDiscountActualPrice,jdbcType=DECIMAL}, #{userId,jdbcType=INTEGER}, ",
"#{userPhone,jdbcType=VARCHAR}, #{userDiscountId,jdbcType=BIGINT}, ",
"#{userDiscountName,jdbcType=VARCHAR}, #{userDiscountType,jdbcType=INTEGER}, ",
"#{userDiscountPrice,jdbcType=DECIMAL}, #{userDiscountActualPrice,jdbcType=DECIMAL}, ",
"#{tradeActualAmount,jdbcType=DECIMAL}, #{accTradeNo,jdbcType=VARCHAR}, ",
"#{storeDiscountActualPrice,jdbcType=DECIMAL}, #{storeDiscountProfitPrice,jdbcType=DECIMAL}, ",
"#{userId,jdbcType=INTEGER}, #{userPhone,jdbcType=VARCHAR}, ",
"#{userDiscountId,jdbcType=BIGINT}, #{userDiscountName,jdbcType=VARCHAR}, ",
"#{userDiscountType,jdbcType=INTEGER}, #{userDiscountPrice,jdbcType=DECIMAL}, ",
"#{userDiscountActualPrice,jdbcType=DECIMAL}, #{tradeActualAmount,jdbcType=DECIMAL}, ",
"#{incomeAmout,jdbcType=DECIMAL}, #{accTradeNo,jdbcType=VARCHAR}, ",
"#{accMdiscountAmount,jdbcType=DECIMAL}, #{accDiscountAmount,jdbcType=DECIMAL}, ",
"#{accPaymentCode,jdbcType=VARCHAR}, #{cardType,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{profitSharingStatus,jdbcType=BIT}, ",
@ -118,6 +122,8 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_appid", property="platformAppid", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_rate", property="platformRate", jdbcType=JdbcType.DECIMAL),
@Result(column="platform_commission", property="platformCommission", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR),
@Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
@ -130,6 +136,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="store_discount_final_cost_price", property="storeDiscountFinalCostPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="store_discount_profit_price", property="storeDiscountProfitPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT),
@ -138,6 +145,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="income_amout", property="incomeAmout", jdbcType=JdbcType.DECIMAL),
@Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL),
@ -159,14 +167,15 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"select",
"id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_no, ",
"store_id, store_name, device_id, device_sn, qr_code_id, qr_code_sn, platform_type, ",
"platform_mer_no, platform_trade_no, platform_log_no, platform_appid, pay_user_id, ",
"pay_mode, out_trade_no, trade_amount, store_discount_satisfy, store_discount_id, ",
"store_discount_name, store_discount_type, store_discount_condition, store_discount_price, ",
"store_discount_final_cost_price, store_discount_actual_price, user_id, user_phone, ",
"user_discount_id, user_discount_name, user_discount_type, user_discount_price, ",
"user_discount_actual_price, trade_actual_amount, acc_trade_no, acc_mdiscount_amount, ",
"acc_discount_amount, acc_payment_code, card_type, `status`, profit_sharing_status, ",
"pay_time, create_time, cancel_time, update_time, ext_1, ext_2, ext_3",
"platform_mer_no, platform_trade_no, platform_log_no, platform_appid, platform_rate, ",
"platform_commission, pay_user_id, pay_mode, out_trade_no, trade_amount, store_discount_satisfy, ",
"store_discount_id, store_discount_name, store_discount_type, store_discount_condition, ",
"store_discount_price, store_discount_final_cost_price, store_discount_actual_price, ",
"store_discount_profit_price, user_id, user_phone, user_discount_id, user_discount_name, ",
"user_discount_type, user_discount_price, user_discount_actual_price, trade_actual_amount, ",
"income_amout, acc_trade_no, acc_mdiscount_amount, acc_discount_amount, acc_payment_code, ",
"card_type, `status`, profit_sharing_status, pay_time, create_time, cancel_time, ",
"update_time, ext_1, ext_2, ext_3",
"from bs_trade_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -190,6 +199,8 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_appid", property="platformAppid", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_rate", property="platformRate", jdbcType=JdbcType.DECIMAL),
@Result(column="platform_commission", property="platformCommission", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR),
@Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR),
@ -202,6 +213,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="store_discount_final_cost_price", property="storeDiscountFinalCostPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="store_discount_profit_price", property="storeDiscountProfitPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT),
@ -210,6 +222,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="income_amout", property="incomeAmout", jdbcType=JdbcType.DECIMAL),
@Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL),
@ -256,6 +269,8 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},",
"platform_log_no = #{platformLogNo,jdbcType=VARCHAR},",
"platform_appid = #{platformAppid,jdbcType=VARCHAR},",
"platform_rate = #{platformRate,jdbcType=DECIMAL},",
"platform_commission = #{platformCommission,jdbcType=DECIMAL},",
"pay_user_id = #{payUserId,jdbcType=VARCHAR},",
"pay_mode = #{payMode,jdbcType=VARCHAR},",
"out_trade_no = #{outTradeNo,jdbcType=VARCHAR},",
@ -268,6 +283,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL},",
"store_discount_final_cost_price = #{storeDiscountFinalCostPrice,jdbcType=DECIMAL},",
"store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL},",
"store_discount_profit_price = #{storeDiscountProfitPrice,jdbcType=DECIMAL},",
"user_id = #{userId,jdbcType=INTEGER},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"user_discount_id = #{userDiscountId,jdbcType=BIGINT},",
@ -276,6 +292,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL},",
"user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL},",
"trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL},",
"income_amout = #{incomeAmout,jdbcType=DECIMAL},",
"acc_trade_no = #{accTradeNo,jdbcType=VARCHAR},",
"acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL},",
"acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL},",

@ -100,6 +100,14 @@ public class BsTradeOrderSqlProvider {
sql.VALUES("platform_appid", "#{platformAppid,jdbcType=VARCHAR}");
}
if (record.getPlatformRate() != null) {
sql.VALUES("platform_rate", "#{platformRate,jdbcType=DECIMAL}");
}
if (record.getPlatformCommission() != null) {
sql.VALUES("platform_commission", "#{platformCommission,jdbcType=DECIMAL}");
}
if (record.getPayUserId() != null) {
sql.VALUES("pay_user_id", "#{payUserId,jdbcType=VARCHAR}");
}
@ -148,6 +156,10 @@ public class BsTradeOrderSqlProvider {
sql.VALUES("store_discount_actual_price", "#{storeDiscountActualPrice,jdbcType=DECIMAL}");
}
if (record.getStoreDiscountProfitPrice() != null) {
sql.VALUES("store_discount_profit_price", "#{storeDiscountProfitPrice,jdbcType=DECIMAL}");
}
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}");
}
@ -180,6 +192,10 @@ public class BsTradeOrderSqlProvider {
sql.VALUES("trade_actual_amount", "#{tradeActualAmount,jdbcType=DECIMAL}");
}
if (record.getIncomeAmout() != null) {
sql.VALUES("income_amout", "#{incomeAmout,jdbcType=DECIMAL}");
}
if (record.getAccTradeNo() != null) {
sql.VALUES("acc_trade_no", "#{accTradeNo,jdbcType=VARCHAR}");
}
@ -264,6 +280,8 @@ public class BsTradeOrderSqlProvider {
sql.SELECT("platform_trade_no");
sql.SELECT("platform_log_no");
sql.SELECT("platform_appid");
sql.SELECT("platform_rate");
sql.SELECT("platform_commission");
sql.SELECT("pay_user_id");
sql.SELECT("pay_mode");
sql.SELECT("out_trade_no");
@ -276,6 +294,7 @@ public class BsTradeOrderSqlProvider {
sql.SELECT("store_discount_price");
sql.SELECT("store_discount_final_cost_price");
sql.SELECT("store_discount_actual_price");
sql.SELECT("store_discount_profit_price");
sql.SELECT("user_id");
sql.SELECT("user_phone");
sql.SELECT("user_discount_id");
@ -284,6 +303,7 @@ public class BsTradeOrderSqlProvider {
sql.SELECT("user_discount_price");
sql.SELECT("user_discount_actual_price");
sql.SELECT("trade_actual_amount");
sql.SELECT("income_amout");
sql.SELECT("acc_trade_no");
sql.SELECT("acc_mdiscount_amount");
sql.SELECT("acc_discount_amount");
@ -391,6 +411,14 @@ public class BsTradeOrderSqlProvider {
sql.SET("platform_appid = #{record.platformAppid,jdbcType=VARCHAR}");
}
if (record.getPlatformRate() != null) {
sql.SET("platform_rate = #{record.platformRate,jdbcType=DECIMAL}");
}
if (record.getPlatformCommission() != null) {
sql.SET("platform_commission = #{record.platformCommission,jdbcType=DECIMAL}");
}
if (record.getPayUserId() != null) {
sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}");
}
@ -439,6 +467,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}");
}
if (record.getStoreDiscountProfitPrice() != null) {
sql.SET("store_discount_profit_price = #{record.storeDiscountProfitPrice,jdbcType=DECIMAL}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}");
}
@ -471,6 +503,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}");
}
if (record.getIncomeAmout() != null) {
sql.SET("income_amout = #{record.incomeAmout,jdbcType=DECIMAL}");
}
if (record.getAccTradeNo() != null) {
sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}");
}
@ -554,6 +590,8 @@ public class BsTradeOrderSqlProvider {
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}");
sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}");
sql.SET("platform_appid = #{record.platformAppid,jdbcType=VARCHAR}");
sql.SET("platform_rate = #{record.platformRate,jdbcType=DECIMAL}");
sql.SET("platform_commission = #{record.platformCommission,jdbcType=DECIMAL}");
sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}");
sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}");
sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}");
@ -566,6 +604,7 @@ public class BsTradeOrderSqlProvider {
sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}");
sql.SET("store_discount_final_cost_price = #{record.storeDiscountFinalCostPrice,jdbcType=DECIMAL}");
sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}");
sql.SET("store_discount_profit_price = #{record.storeDiscountProfitPrice,jdbcType=DECIMAL}");
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}");
@ -574,6 +613,7 @@ public class BsTradeOrderSqlProvider {
sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}");
sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}");
sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}");
sql.SET("income_amout = #{record.incomeAmout,jdbcType=DECIMAL}");
sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}");
sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}");
sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}");
@ -670,6 +710,14 @@ public class BsTradeOrderSqlProvider {
sql.SET("platform_appid = #{platformAppid,jdbcType=VARCHAR}");
}
if (record.getPlatformRate() != null) {
sql.SET("platform_rate = #{platformRate,jdbcType=DECIMAL}");
}
if (record.getPlatformCommission() != null) {
sql.SET("platform_commission = #{platformCommission,jdbcType=DECIMAL}");
}
if (record.getPayUserId() != null) {
sql.SET("pay_user_id = #{payUserId,jdbcType=VARCHAR}");
}
@ -718,6 +766,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL}");
}
if (record.getStoreDiscountProfitPrice() != null) {
sql.SET("store_discount_profit_price = #{storeDiscountProfitPrice,jdbcType=DECIMAL}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=INTEGER}");
}
@ -750,6 +802,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL}");
}
if (record.getIncomeAmout() != null) {
sql.SET("income_amout = #{incomeAmout,jdbcType=DECIMAL}");
}
if (record.getAccTradeNo() != null) {
sql.SET("acc_trade_no = #{accTradeNo,jdbcType=VARCHAR}");
}

@ -0,0 +1,616 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
/**
* bs_mer_settle_acct_apply
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsMerSettleAcctApply implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 申请编号
*/
private String applyNo;
/**
* 申请类型 1修改结算
*/
private Integer applyType;
/**
* 商户id
*/
private Long merId;
/**
* 结算类型 1对公结算 2对私法人结算 3对私非法人结算
*/
private Integer settleType;
/**
* 委托书
*/
private String commissionImg;
/**
* 银行卡照片
*/
private String bankCardImg;
/**
* 银行名称
*/
private String bankName;
/**
* 银行卡号
*/
private String bankCardNo;
/**
* 银行卡持有人
*/
private String bankCardHolder;
/**
* 开户行市级编码
*/
private Long openningBankCityCode;
/**
* 开户行市级名称
*/
private String openningBankCityName;
/**
* 开会行区级编码
*/
private Long openningBankAreaCode;
/**
* 开户行区级名称
*/
private String openningBankAreaName;
/**
* 开户行省级编码
*/
private Long openningBankProvinceCode;
/**
* 开户行省级名称
*/
private String openningBankProvinceName;
/**
* 开户行号
*/
private String openningBankCode;
/**
* 开户行名称
*/
private String openningBankName;
/**
* 开户许可证照片
*/
private String openningBankLicenseUrl;
/**
* 账户清算行号
*/
private String clearingBankCode;
/**
* 结算人身份证姓名
*/
private String settleIdCardName;
/**
* 结算人身份证号
*/
private String settleIdCardNo;
/**
* 结算人身份证住址
*/
private String settleIdCardAddress;
/**
* 结算人身份证人像面图片
*/
private String settleIdCardPortraitImg;
/**
* 结算人身份证国徽面图片
*/
private String settleIdCardNationalEmblemImg;
/**
* 结算人身份证有效期类型 1有效期 2长期
*/
private Integer settleIdPeriodType;
/**
* 结算人身份证有效期开始时间
*/
private String settleIdCardPeriodStart;
/**
* 结算人身份证有效期结束时间
*/
private String settleIdCardPeriodEnd;
/**
* 电子协议
*/
private String electronicPact;
/**
* 状态 0删除 1待提交 2审核中 3通过 4驳回
*/
private Integer status;
/**
* 驳回原因
*/
private String rejectReason;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getApplyNo() {
return applyNo;
}
public void setApplyNo(String applyNo) {
this.applyNo = applyNo;
}
public Integer getApplyType() {
return applyType;
}
public void setApplyType(Integer applyType) {
this.applyType = applyType;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public Integer getSettleType() {
return settleType;
}
public void setSettleType(Integer settleType) {
this.settleType = settleType;
}
public String getCommissionImg() {
return commissionImg;
}
public void setCommissionImg(String commissionImg) {
this.commissionImg = commissionImg;
}
public String getBankCardImg() {
return bankCardImg;
}
public void setBankCardImg(String bankCardImg) {
this.bankCardImg = bankCardImg;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getBankCardNo() {
return bankCardNo;
}
public void setBankCardNo(String bankCardNo) {
this.bankCardNo = bankCardNo;
}
public String getBankCardHolder() {
return bankCardHolder;
}
public void setBankCardHolder(String bankCardHolder) {
this.bankCardHolder = bankCardHolder;
}
public Long getOpenningBankCityCode() {
return openningBankCityCode;
}
public void setOpenningBankCityCode(Long openningBankCityCode) {
this.openningBankCityCode = openningBankCityCode;
}
public String getOpenningBankCityName() {
return openningBankCityName;
}
public void setOpenningBankCityName(String openningBankCityName) {
this.openningBankCityName = openningBankCityName;
}
public Long getOpenningBankAreaCode() {
return openningBankAreaCode;
}
public void setOpenningBankAreaCode(Long openningBankAreaCode) {
this.openningBankAreaCode = openningBankAreaCode;
}
public String getOpenningBankAreaName() {
return openningBankAreaName;
}
public void setOpenningBankAreaName(String openningBankAreaName) {
this.openningBankAreaName = openningBankAreaName;
}
public Long getOpenningBankProvinceCode() {
return openningBankProvinceCode;
}
public void setOpenningBankProvinceCode(Long openningBankProvinceCode) {
this.openningBankProvinceCode = openningBankProvinceCode;
}
public String getOpenningBankProvinceName() {
return openningBankProvinceName;
}
public void setOpenningBankProvinceName(String openningBankProvinceName) {
this.openningBankProvinceName = openningBankProvinceName;
}
public String getOpenningBankCode() {
return openningBankCode;
}
public void setOpenningBankCode(String openningBankCode) {
this.openningBankCode = openningBankCode;
}
public String getOpenningBankName() {
return openningBankName;
}
public void setOpenningBankName(String openningBankName) {
this.openningBankName = openningBankName;
}
public String getOpenningBankLicenseUrl() {
return openningBankLicenseUrl;
}
public void setOpenningBankLicenseUrl(String openningBankLicenseUrl) {
this.openningBankLicenseUrl = openningBankLicenseUrl;
}
public String getClearingBankCode() {
return clearingBankCode;
}
public void setClearingBankCode(String clearingBankCode) {
this.clearingBankCode = clearingBankCode;
}
public String getSettleIdCardName() {
return settleIdCardName;
}
public void setSettleIdCardName(String settleIdCardName) {
this.settleIdCardName = settleIdCardName;
}
public String getSettleIdCardNo() {
return settleIdCardNo;
}
public void setSettleIdCardNo(String settleIdCardNo) {
this.settleIdCardNo = settleIdCardNo;
}
public String getSettleIdCardAddress() {
return settleIdCardAddress;
}
public void setSettleIdCardAddress(String settleIdCardAddress) {
this.settleIdCardAddress = settleIdCardAddress;
}
public String getSettleIdCardPortraitImg() {
return settleIdCardPortraitImg;
}
public void setSettleIdCardPortraitImg(String settleIdCardPortraitImg) {
this.settleIdCardPortraitImg = settleIdCardPortraitImg;
}
public String getSettleIdCardNationalEmblemImg() {
return settleIdCardNationalEmblemImg;
}
public void setSettleIdCardNationalEmblemImg(String settleIdCardNationalEmblemImg) {
this.settleIdCardNationalEmblemImg = settleIdCardNationalEmblemImg;
}
public Integer getSettleIdPeriodType() {
return settleIdPeriodType;
}
public void setSettleIdPeriodType(Integer settleIdPeriodType) {
this.settleIdPeriodType = settleIdPeriodType;
}
public String getSettleIdCardPeriodStart() {
return settleIdCardPeriodStart;
}
public void setSettleIdCardPeriodStart(String settleIdCardPeriodStart) {
this.settleIdCardPeriodStart = settleIdCardPeriodStart;
}
public String getSettleIdCardPeriodEnd() {
return settleIdCardPeriodEnd;
}
public void setSettleIdCardPeriodEnd(String settleIdCardPeriodEnd) {
this.settleIdCardPeriodEnd = settleIdCardPeriodEnd;
}
public String getElectronicPact() {
return electronicPact;
}
public void setElectronicPact(String electronicPact) {
this.electronicPact = electronicPact;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BsMerSettleAcctApply other = (BsMerSettleAcctApply) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getApplyNo() == null ? other.getApplyNo() == null : this.getApplyNo().equals(other.getApplyNo()))
&& (this.getApplyType() == null ? other.getApplyType() == null : this.getApplyType().equals(other.getApplyType()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getSettleType() == null ? other.getSettleType() == null : this.getSettleType().equals(other.getSettleType()))
&& (this.getCommissionImg() == null ? other.getCommissionImg() == null : this.getCommissionImg().equals(other.getCommissionImg()))
&& (this.getBankCardImg() == null ? other.getBankCardImg() == null : this.getBankCardImg().equals(other.getBankCardImg()))
&& (this.getBankName() == null ? other.getBankName() == null : this.getBankName().equals(other.getBankName()))
&& (this.getBankCardNo() == null ? other.getBankCardNo() == null : this.getBankCardNo().equals(other.getBankCardNo()))
&& (this.getBankCardHolder() == null ? other.getBankCardHolder() == null : this.getBankCardHolder().equals(other.getBankCardHolder()))
&& (this.getOpenningBankCityCode() == null ? other.getOpenningBankCityCode() == null : this.getOpenningBankCityCode().equals(other.getOpenningBankCityCode()))
&& (this.getOpenningBankCityName() == null ? other.getOpenningBankCityName() == null : this.getOpenningBankCityName().equals(other.getOpenningBankCityName()))
&& (this.getOpenningBankAreaCode() == null ? other.getOpenningBankAreaCode() == null : this.getOpenningBankAreaCode().equals(other.getOpenningBankAreaCode()))
&& (this.getOpenningBankAreaName() == null ? other.getOpenningBankAreaName() == null : this.getOpenningBankAreaName().equals(other.getOpenningBankAreaName()))
&& (this.getOpenningBankProvinceCode() == null ? other.getOpenningBankProvinceCode() == null : this.getOpenningBankProvinceCode().equals(other.getOpenningBankProvinceCode()))
&& (this.getOpenningBankProvinceName() == null ? other.getOpenningBankProvinceName() == null : this.getOpenningBankProvinceName().equals(other.getOpenningBankProvinceName()))
&& (this.getOpenningBankCode() == null ? other.getOpenningBankCode() == null : this.getOpenningBankCode().equals(other.getOpenningBankCode()))
&& (this.getOpenningBankName() == null ? other.getOpenningBankName() == null : this.getOpenningBankName().equals(other.getOpenningBankName()))
&& (this.getOpenningBankLicenseUrl() == null ? other.getOpenningBankLicenseUrl() == null : this.getOpenningBankLicenseUrl().equals(other.getOpenningBankLicenseUrl()))
&& (this.getClearingBankCode() == null ? other.getClearingBankCode() == null : this.getClearingBankCode().equals(other.getClearingBankCode()))
&& (this.getSettleIdCardName() == null ? other.getSettleIdCardName() == null : this.getSettleIdCardName().equals(other.getSettleIdCardName()))
&& (this.getSettleIdCardNo() == null ? other.getSettleIdCardNo() == null : this.getSettleIdCardNo().equals(other.getSettleIdCardNo()))
&& (this.getSettleIdCardAddress() == null ? other.getSettleIdCardAddress() == null : this.getSettleIdCardAddress().equals(other.getSettleIdCardAddress()))
&& (this.getSettleIdCardPortraitImg() == null ? other.getSettleIdCardPortraitImg() == null : this.getSettleIdCardPortraitImg().equals(other.getSettleIdCardPortraitImg()))
&& (this.getSettleIdCardNationalEmblemImg() == null ? other.getSettleIdCardNationalEmblemImg() == null : this.getSettleIdCardNationalEmblemImg().equals(other.getSettleIdCardNationalEmblemImg()))
&& (this.getSettleIdPeriodType() == null ? other.getSettleIdPeriodType() == null : this.getSettleIdPeriodType().equals(other.getSettleIdPeriodType()))
&& (this.getSettleIdCardPeriodStart() == null ? other.getSettleIdCardPeriodStart() == null : this.getSettleIdCardPeriodStart().equals(other.getSettleIdCardPeriodStart()))
&& (this.getSettleIdCardPeriodEnd() == null ? other.getSettleIdCardPeriodEnd() == null : this.getSettleIdCardPeriodEnd().equals(other.getSettleIdCardPeriodEnd()))
&& (this.getElectronicPact() == null ? other.getElectronicPact() == null : this.getElectronicPact().equals(other.getElectronicPact()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getRejectReason() == null ? other.getRejectReason() == null : this.getRejectReason().equals(other.getRejectReason()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (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 + ((getApplyNo() == null) ? 0 : getApplyNo().hashCode());
result = prime * result + ((getApplyType() == null) ? 0 : getApplyType().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getSettleType() == null) ? 0 : getSettleType().hashCode());
result = prime * result + ((getCommissionImg() == null) ? 0 : getCommissionImg().hashCode());
result = prime * result + ((getBankCardImg() == null) ? 0 : getBankCardImg().hashCode());
result = prime * result + ((getBankName() == null) ? 0 : getBankName().hashCode());
result = prime * result + ((getBankCardNo() == null) ? 0 : getBankCardNo().hashCode());
result = prime * result + ((getBankCardHolder() == null) ? 0 : getBankCardHolder().hashCode());
result = prime * result + ((getOpenningBankCityCode() == null) ? 0 : getOpenningBankCityCode().hashCode());
result = prime * result + ((getOpenningBankCityName() == null) ? 0 : getOpenningBankCityName().hashCode());
result = prime * result + ((getOpenningBankAreaCode() == null) ? 0 : getOpenningBankAreaCode().hashCode());
result = prime * result + ((getOpenningBankAreaName() == null) ? 0 : getOpenningBankAreaName().hashCode());
result = prime * result + ((getOpenningBankProvinceCode() == null) ? 0 : getOpenningBankProvinceCode().hashCode());
result = prime * result + ((getOpenningBankProvinceName() == null) ? 0 : getOpenningBankProvinceName().hashCode());
result = prime * result + ((getOpenningBankCode() == null) ? 0 : getOpenningBankCode().hashCode());
result = prime * result + ((getOpenningBankName() == null) ? 0 : getOpenningBankName().hashCode());
result = prime * result + ((getOpenningBankLicenseUrl() == null) ? 0 : getOpenningBankLicenseUrl().hashCode());
result = prime * result + ((getClearingBankCode() == null) ? 0 : getClearingBankCode().hashCode());
result = prime * result + ((getSettleIdCardName() == null) ? 0 : getSettleIdCardName().hashCode());
result = prime * result + ((getSettleIdCardNo() == null) ? 0 : getSettleIdCardNo().hashCode());
result = prime * result + ((getSettleIdCardAddress() == null) ? 0 : getSettleIdCardAddress().hashCode());
result = prime * result + ((getSettleIdCardPortraitImg() == null) ? 0 : getSettleIdCardPortraitImg().hashCode());
result = prime * result + ((getSettleIdCardNationalEmblemImg() == null) ? 0 : getSettleIdCardNationalEmblemImg().hashCode());
result = prime * result + ((getSettleIdPeriodType() == null) ? 0 : getSettleIdPeriodType().hashCode());
result = prime * result + ((getSettleIdCardPeriodStart() == null) ? 0 : getSettleIdCardPeriodStart().hashCode());
result = prime * result + ((getSettleIdCardPeriodEnd() == null) ? 0 : getSettleIdCardPeriodEnd().hashCode());
result = prime * result + ((getElectronicPact() == null) ? 0 : getElectronicPact().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getRejectReason() == null) ? 0 : getRejectReason().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
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(", applyNo=").append(applyNo);
sb.append(", applyType=").append(applyType);
sb.append(", merId=").append(merId);
sb.append(", settleType=").append(settleType);
sb.append(", commissionImg=").append(commissionImg);
sb.append(", bankCardImg=").append(bankCardImg);
sb.append(", bankName=").append(bankName);
sb.append(", bankCardNo=").append(bankCardNo);
sb.append(", bankCardHolder=").append(bankCardHolder);
sb.append(", openningBankCityCode=").append(openningBankCityCode);
sb.append(", openningBankCityName=").append(openningBankCityName);
sb.append(", openningBankAreaCode=").append(openningBankAreaCode);
sb.append(", openningBankAreaName=").append(openningBankAreaName);
sb.append(", openningBankProvinceCode=").append(openningBankProvinceCode);
sb.append(", openningBankProvinceName=").append(openningBankProvinceName);
sb.append(", openningBankCode=").append(openningBankCode);
sb.append(", openningBankName=").append(openningBankName);
sb.append(", openningBankLicenseUrl=").append(openningBankLicenseUrl);
sb.append(", clearingBankCode=").append(clearingBankCode);
sb.append(", settleIdCardName=").append(settleIdCardName);
sb.append(", settleIdCardNo=").append(settleIdCardNo);
sb.append(", settleIdCardAddress=").append(settleIdCardAddress);
sb.append(", settleIdCardPortraitImg=").append(settleIdCardPortraitImg);
sb.append(", settleIdCardNationalEmblemImg=").append(settleIdCardNationalEmblemImg);
sb.append(", settleIdPeriodType=").append(settleIdPeriodType);
sb.append(", settleIdCardPeriodStart=").append(settleIdCardPeriodStart);
sb.append(", settleIdCardPeriodEnd=").append(settleIdCardPeriodEnd);
sb.append(", electronicPact=").append(electronicPact);
sb.append(", status=").append(status);
sb.append(", rejectReason=").append(rejectReason);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -109,6 +109,16 @@ public class BsTradeOrder implements Serializable {
*/
private String platformAppid;
/**
* 平台费率
*/
private BigDecimal platformRate;
/**
* 平台收取佣金
*/
private BigDecimal platformCommission;
/**
* 支付用户id
*/
@ -173,6 +183,11 @@ public class BsTradeOrder implements Serializable {
*/
private BigDecimal storeDiscountActualPrice;
/**
* 门店活动利润金额
*/
private BigDecimal storeDiscountProfitPrice;
/**
* 客户id
*/
@ -213,6 +228,11 @@ public class BsTradeOrder implements Serializable {
*/
private BigDecimal tradeActualAmount;
/**
* 商家交易入账金额
*/
private BigDecimal incomeAmout;
/**
* 账户端交易流水号
*/
@ -428,6 +448,22 @@ public class BsTradeOrder implements Serializable {
this.platformAppid = platformAppid;
}
public BigDecimal getPlatformRate() {
return platformRate;
}
public void setPlatformRate(BigDecimal platformRate) {
this.platformRate = platformRate;
}
public BigDecimal getPlatformCommission() {
return platformCommission;
}
public void setPlatformCommission(BigDecimal platformCommission) {
this.platformCommission = platformCommission;
}
public String getPayUserId() {
return payUserId;
}
@ -524,6 +560,14 @@ public class BsTradeOrder implements Serializable {
this.storeDiscountActualPrice = storeDiscountActualPrice;
}
public BigDecimal getStoreDiscountProfitPrice() {
return storeDiscountProfitPrice;
}
public void setStoreDiscountProfitPrice(BigDecimal storeDiscountProfitPrice) {
this.storeDiscountProfitPrice = storeDiscountProfitPrice;
}
public Integer getUserId() {
return userId;
}
@ -588,6 +632,14 @@ public class BsTradeOrder implements Serializable {
this.tradeActualAmount = tradeActualAmount;
}
public BigDecimal getIncomeAmout() {
return incomeAmout;
}
public void setIncomeAmout(BigDecimal incomeAmout) {
this.incomeAmout = incomeAmout;
}
public String getAccTradeNo() {
return accTradeNo;
}
@ -731,6 +783,8 @@ public class BsTradeOrder implements Serializable {
&& (this.getPlatformTradeNo() == null ? other.getPlatformTradeNo() == null : this.getPlatformTradeNo().equals(other.getPlatformTradeNo()))
&& (this.getPlatformLogNo() == null ? other.getPlatformLogNo() == null : this.getPlatformLogNo().equals(other.getPlatformLogNo()))
&& (this.getPlatformAppid() == null ? other.getPlatformAppid() == null : this.getPlatformAppid().equals(other.getPlatformAppid()))
&& (this.getPlatformRate() == null ? other.getPlatformRate() == null : this.getPlatformRate().equals(other.getPlatformRate()))
&& (this.getPlatformCommission() == null ? other.getPlatformCommission() == null : this.getPlatformCommission().equals(other.getPlatformCommission()))
&& (this.getPayUserId() == null ? other.getPayUserId() == null : this.getPayUserId().equals(other.getPayUserId()))
&& (this.getPayMode() == null ? other.getPayMode() == null : this.getPayMode().equals(other.getPayMode()))
&& (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo()))
@ -743,6 +797,7 @@ public class BsTradeOrder implements Serializable {
&& (this.getStoreDiscountPrice() == null ? other.getStoreDiscountPrice() == null : this.getStoreDiscountPrice().equals(other.getStoreDiscountPrice()))
&& (this.getStoreDiscountFinalCostPrice() == null ? other.getStoreDiscountFinalCostPrice() == null : this.getStoreDiscountFinalCostPrice().equals(other.getStoreDiscountFinalCostPrice()))
&& (this.getStoreDiscountActualPrice() == null ? other.getStoreDiscountActualPrice() == null : this.getStoreDiscountActualPrice().equals(other.getStoreDiscountActualPrice()))
&& (this.getStoreDiscountProfitPrice() == null ? other.getStoreDiscountProfitPrice() == null : this.getStoreDiscountProfitPrice().equals(other.getStoreDiscountProfitPrice()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getUserDiscountId() == null ? other.getUserDiscountId() == null : this.getUserDiscountId().equals(other.getUserDiscountId()))
@ -751,6 +806,7 @@ public class BsTradeOrder implements Serializable {
&& (this.getUserDiscountPrice() == null ? other.getUserDiscountPrice() == null : this.getUserDiscountPrice().equals(other.getUserDiscountPrice()))
&& (this.getUserDiscountActualPrice() == null ? other.getUserDiscountActualPrice() == null : this.getUserDiscountActualPrice().equals(other.getUserDiscountActualPrice()))
&& (this.getTradeActualAmount() == null ? other.getTradeActualAmount() == null : this.getTradeActualAmount().equals(other.getTradeActualAmount()))
&& (this.getIncomeAmout() == null ? other.getIncomeAmout() == null : this.getIncomeAmout().equals(other.getIncomeAmout()))
&& (this.getAccTradeNo() == null ? other.getAccTradeNo() == null : this.getAccTradeNo().equals(other.getAccTradeNo()))
&& (this.getAccMdiscountAmount() == null ? other.getAccMdiscountAmount() == null : this.getAccMdiscountAmount().equals(other.getAccMdiscountAmount()))
&& (this.getAccDiscountAmount() == null ? other.getAccDiscountAmount() == null : this.getAccDiscountAmount().equals(other.getAccDiscountAmount()))
@ -790,6 +846,8 @@ public class BsTradeOrder implements Serializable {
result = prime * result + ((getPlatformTradeNo() == null) ? 0 : getPlatformTradeNo().hashCode());
result = prime * result + ((getPlatformLogNo() == null) ? 0 : getPlatformLogNo().hashCode());
result = prime * result + ((getPlatformAppid() == null) ? 0 : getPlatformAppid().hashCode());
result = prime * result + ((getPlatformRate() == null) ? 0 : getPlatformRate().hashCode());
result = prime * result + ((getPlatformCommission() == null) ? 0 : getPlatformCommission().hashCode());
result = prime * result + ((getPayUserId() == null) ? 0 : getPayUserId().hashCode());
result = prime * result + ((getPayMode() == null) ? 0 : getPayMode().hashCode());
result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
@ -802,6 +860,7 @@ public class BsTradeOrder implements Serializable {
result = prime * result + ((getStoreDiscountPrice() == null) ? 0 : getStoreDiscountPrice().hashCode());
result = prime * result + ((getStoreDiscountFinalCostPrice() == null) ? 0 : getStoreDiscountFinalCostPrice().hashCode());
result = prime * result + ((getStoreDiscountActualPrice() == null) ? 0 : getStoreDiscountActualPrice().hashCode());
result = prime * result + ((getStoreDiscountProfitPrice() == null) ? 0 : getStoreDiscountProfitPrice().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getUserDiscountId() == null) ? 0 : getUserDiscountId().hashCode());
@ -810,6 +869,7 @@ public class BsTradeOrder implements Serializable {
result = prime * result + ((getUserDiscountPrice() == null) ? 0 : getUserDiscountPrice().hashCode());
result = prime * result + ((getUserDiscountActualPrice() == null) ? 0 : getUserDiscountActualPrice().hashCode());
result = prime * result + ((getTradeActualAmount() == null) ? 0 : getTradeActualAmount().hashCode());
result = prime * result + ((getIncomeAmout() == null) ? 0 : getIncomeAmout().hashCode());
result = prime * result + ((getAccTradeNo() == null) ? 0 : getAccTradeNo().hashCode());
result = prime * result + ((getAccMdiscountAmount() == null) ? 0 : getAccMdiscountAmount().hashCode());
result = prime * result + ((getAccDiscountAmount() == null) ? 0 : getAccDiscountAmount().hashCode());
@ -852,6 +912,8 @@ public class BsTradeOrder implements Serializable {
sb.append(", platformTradeNo=").append(platformTradeNo);
sb.append(", platformLogNo=").append(platformLogNo);
sb.append(", platformAppid=").append(platformAppid);
sb.append(", platformRate=").append(platformRate);
sb.append(", platformCommission=").append(platformCommission);
sb.append(", payUserId=").append(payUserId);
sb.append(", payMode=").append(payMode);
sb.append(", outTradeNo=").append(outTradeNo);
@ -864,6 +926,7 @@ public class BsTradeOrder implements Serializable {
sb.append(", storeDiscountPrice=").append(storeDiscountPrice);
sb.append(", storeDiscountFinalCostPrice=").append(storeDiscountFinalCostPrice);
sb.append(", storeDiscountActualPrice=").append(storeDiscountActualPrice);
sb.append(", storeDiscountProfitPrice=").append(storeDiscountProfitPrice);
sb.append(", userId=").append(userId);
sb.append(", userPhone=").append(userPhone);
sb.append(", userDiscountId=").append(userDiscountId);
@ -872,6 +935,7 @@ public class BsTradeOrder implements Serializable {
sb.append(", userDiscountPrice=").append(userDiscountPrice);
sb.append(", userDiscountActualPrice=").append(userDiscountActualPrice);
sb.append(", tradeActualAmount=").append(tradeActualAmount);
sb.append(", incomeAmout=").append(incomeAmout);
sb.append(", accTradeNo=").append(accTradeNo);
sb.append(", accMdiscountAmount=").append(accMdiscountAmount);
sb.append(", accDiscountAmount=").append(accDiscountAmount);

@ -1366,6 +1366,126 @@ public class BsTradeOrderExample {
return (Criteria) this;
}
public Criteria andPlatformRateIsNull() {
addCriterion("platform_rate is null");
return (Criteria) this;
}
public Criteria andPlatformRateIsNotNull() {
addCriterion("platform_rate is not null");
return (Criteria) this;
}
public Criteria andPlatformRateEqualTo(BigDecimal value) {
addCriterion("platform_rate =", value, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateNotEqualTo(BigDecimal value) {
addCriterion("platform_rate <>", value, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateGreaterThan(BigDecimal value) {
addCriterion("platform_rate >", value, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("platform_rate >=", value, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateLessThan(BigDecimal value) {
addCriterion("platform_rate <", value, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateLessThanOrEqualTo(BigDecimal value) {
addCriterion("platform_rate <=", value, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateIn(List<BigDecimal> values) {
addCriterion("platform_rate in", values, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateNotIn(List<BigDecimal> values) {
addCriterion("platform_rate not in", values, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("platform_rate between", value1, value2, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformRateNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("platform_rate not between", value1, value2, "platformRate");
return (Criteria) this;
}
public Criteria andPlatformCommissionIsNull() {
addCriterion("platform_commission is null");
return (Criteria) this;
}
public Criteria andPlatformCommissionIsNotNull() {
addCriterion("platform_commission is not null");
return (Criteria) this;
}
public Criteria andPlatformCommissionEqualTo(BigDecimal value) {
addCriterion("platform_commission =", value, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionNotEqualTo(BigDecimal value) {
addCriterion("platform_commission <>", value, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionGreaterThan(BigDecimal value) {
addCriterion("platform_commission >", value, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("platform_commission >=", value, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionLessThan(BigDecimal value) {
addCriterion("platform_commission <", value, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionLessThanOrEqualTo(BigDecimal value) {
addCriterion("platform_commission <=", value, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionIn(List<BigDecimal> values) {
addCriterion("platform_commission in", values, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionNotIn(List<BigDecimal> values) {
addCriterion("platform_commission not in", values, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("platform_commission between", value1, value2, "platformCommission");
return (Criteria) this;
}
public Criteria andPlatformCommissionNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("platform_commission not between", value1, value2, "platformCommission");
return (Criteria) this;
}
public Criteria andPayUserIdIsNull() {
addCriterion("pay_user_id is null");
return (Criteria) this;
@ -2126,6 +2246,66 @@ public class BsTradeOrderExample {
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceIsNull() {
addCriterion("store_discount_profit_price is null");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceIsNotNull() {
addCriterion("store_discount_profit_price is not null");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceEqualTo(BigDecimal value) {
addCriterion("store_discount_profit_price =", value, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceNotEqualTo(BigDecimal value) {
addCriterion("store_discount_profit_price <>", value, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceGreaterThan(BigDecimal value) {
addCriterion("store_discount_profit_price >", value, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("store_discount_profit_price >=", value, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceLessThan(BigDecimal value) {
addCriterion("store_discount_profit_price <", value, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("store_discount_profit_price <=", value, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceIn(List<BigDecimal> values) {
addCriterion("store_discount_profit_price in", values, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceNotIn(List<BigDecimal> values) {
addCriterion("store_discount_profit_price not in", values, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("store_discount_profit_price between", value1, value2, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andStoreDiscountProfitPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("store_discount_profit_price not between", value1, value2, "storeDiscountProfitPrice");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
@ -2626,6 +2806,66 @@ public class BsTradeOrderExample {
return (Criteria) this;
}
public Criteria andIncomeAmoutIsNull() {
addCriterion("income_amout is null");
return (Criteria) this;
}
public Criteria andIncomeAmoutIsNotNull() {
addCriterion("income_amout is not null");
return (Criteria) this;
}
public Criteria andIncomeAmoutEqualTo(BigDecimal value) {
addCriterion("income_amout =", value, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutNotEqualTo(BigDecimal value) {
addCriterion("income_amout <>", value, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutGreaterThan(BigDecimal value) {
addCriterion("income_amout >", value, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("income_amout >=", value, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutLessThan(BigDecimal value) {
addCriterion("income_amout <", value, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutLessThanOrEqualTo(BigDecimal value) {
addCriterion("income_amout <=", value, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutIn(List<BigDecimal> values) {
addCriterion("income_amout in", values, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutNotIn(List<BigDecimal> values) {
addCriterion("income_amout not in", values, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("income_amout between", value1, value2, "incomeAmout");
return (Criteria) this;
}
public Criteria andIncomeAmoutNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("income_amout not between", value1, value2, "incomeAmout");
return (Criteria) this;
}
public Criteria andAccTradeNoIsNull() {
addCriterion("acc_trade_no is null");
return (Criteria) this;

@ -0,0 +1,27 @@
package com.hfkj.service;
import com.hfkj.entity.BsMerSettleAcctApply;
/**
* @className: BsMerSettleAcctApplyService
* @author: HuRui
* @date: 2023/5/4
**/
public interface BsMerSettleAcctApplyService {
/**
* 编辑数据
* @param merSettleAcctApply
*/
void editData(BsMerSettleAcctApply merSettleAcctApply);
/**
* 修改结算申请
* @param merSettleAcctApply
* @return
*/
BsMerSettleAcctApply updateSettleAcctApply(BsMerSettleAcctApply merSettleAcctApply);
BsMerSettleAcctApply getApplyById(Long id);
}

@ -0,0 +1,53 @@
package com.hfkj.service.impl;
import com.hfkj.channel.saas.SaasMerService;
import com.hfkj.dao.BsMerSettleAcctApplyMapper;
import com.hfkj.entity.BsMerSettleAcct;
import com.hfkj.entity.BsMerSettleAcctApply;
import com.hfkj.service.BsMerSettleAcctApplyService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
/**
* @className: BsMerSettleAcctApplyServiceImpl
* @author: HuRui
* @date: 2023/5/6
**/
@Service("merSettleAcctApplyService")
public class BsMerSettleAcctApplyServiceImpl implements BsMerSettleAcctApplyService {
@Resource
private BsMerSettleAcctApplyMapper merSettleAcctApplyMapper;
@Resource
private SaasMerService saasMerService;
@Override
public void editData(BsMerSettleAcctApply merSettleAcctApply) {
if (merSettleAcctApply.getId() == null) {
merSettleAcctApply.setCreateTime(new Date());
merSettleAcctApply.setUpdateTime(new Date());
merSettleAcctApplyMapper.insert(merSettleAcctApply);
} else {
merSettleAcctApply.setUpdateTime(new Date());
merSettleAcctApplyMapper.updateByPrimaryKey(merSettleAcctApply);
}
}
@Override
public BsMerSettleAcctApply updateSettleAcctApply(BsMerSettleAcctApply merSettleAcctApply) {
editData(merSettleAcctApply);
return null;
}
@Override
public BsMerSettleAcctApply getApplyById(Long id) {
return merSettleAcctApplyMapper.selectByPrimaryKey(id);
}
}

@ -1,6 +1,7 @@
package com.hfkj.service.impl;
import com.hfkj.channel.ccb.CCBTradeService;
import com.hfkj.channel.hsg.HsgIntegralService;
import com.hfkj.channel.weixin.WeiXinPayService;
import com.hfkj.common.exception.BizException;
import com.hfkj.common.exception.ErrorCode;
@ -63,22 +64,36 @@ public class BsTradeOrderRefundServiceImpl implements BsTradeOrderRefundService
@Override
public Map<String, Object> tradeOrderRefund(BsTradeOrderRefund tradeOrderRefund) throws Exception {
boolean refundStatus = false;
// 交易订单
BsTradeOrder tradeOrder = tradeOrderService.getOrderByTradeNoId(tradeOrderRefund.getTradeOrderId());
try {
if (tradeOrder == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的交易订单");
}
if (StringUtils.isNotBlank(tradeOrder.getUserPhone())) {
if (HsgIntegralService.recycleIntegral(tradeOrder.getId().toString(),tradeOrder.getOutTradeNo()).equals(false)) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户积分不足,暂时无法退款");
}
}
editOrderRefund(tradeOrderRefund);
Map<String, Object> refund = new HashMap<>();
if (tradeOrderRefund.getPlatformType().equals(PlatformTypeEnum.type1.getNumber())) {
refund = laKaLaTradeService.refund(tradeOrderRefund.getRefundNo(), tradeOrderRefund.getRefundAmount());
refundStatus = true;
} else if (tradeOrderRefund.getPlatformType().equals(PlatformTypeEnum.type3.getNumber())) {
refund = ccbTradeService.refund(tradeOrderRefund.getRefundNo(), tradeOrderRefund.getRefundAmount());
refundStatus = true;
} else if (tradeOrderRefund.getPlatformType().equals(PlatformTypeEnum.type4.getNumber())) {
refund = weiXinPayService.refund(tradeOrderRefund.getRefundNo(), tradeOrderRefund.getRefundAmount());
refundStatus = true;
}
// 交易订单
BsTradeOrder tradeOrder = tradeOrderService.getOrderByTradeNoId(tradeOrderRefund.getTradeOrderId());
if (tradeOrder != null) {
// 退回门店优惠活动
if (tradeOrder.getStoreDiscountId() != null) {
@ -111,6 +126,8 @@ public class BsTradeOrderRefundServiceImpl implements BsTradeOrderRefundService
tradeOrderRefund.setStatus(TradeOrderRefundStatusEnum.status0.getNumber());
editOrderRefund(tradeOrderRefund);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage());
} finally {
HsgIntegralService.refundReturn(tradeOrder.getId().toString(),tradeOrder.getOutTradeNo(), refundStatus);
}
}

@ -109,23 +109,25 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setStoreDiscountSatisfy(false);
tradeOrder.setUserPhone(userPhone);
// 门店优惠
if (storeDiscount != null) {
tradeOrder.setStoreDiscountId(storeDiscount.getId());
tradeOrder.setStoreDiscountName(storeDiscount.getStoreName());
tradeOrder.setStoreDiscountName(storeDiscount.getName());
tradeOrder.setStoreDiscountType(storeDiscount.getDiscountType());
tradeOrder.setStoreDiscountCondition(storeDiscount.getDiscountCondition());
tradeOrder.setStoreDiscountPrice(storeDiscount.getDiscountPrice());
tradeOrder.setStoreDiscountFinalCostPrice(storeDiscount.getFinalCostPrice());
if (storeDiscount.getDiscountType().equals(StoreDiscountActivityTypeEnum.type1.getNumber())) {
// 未达到满减门槛
if (userDiscount.getDiscountCondition().compareTo(tradeOrder.getTradeAmount()) >= 0) {
tradeOrder.setStoreDiscountActualPrice(new BigDecimal(0));
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "满减优惠,未达到满减条件");
} else {
tradeOrder.setStoreDiscountSatisfy(true);
tradeOrder.setStoreDiscountActualPrice(storeDiscount.getDiscountPrice());
}
tradeOrder.setTradeActualAmount(tradeOrder.getTradeActualAmount().subtract(tradeOrder.getStoreDiscountActualPrice()));
// 实际交易金额 - 平台交易成本价 = 利润
tradeOrder.setStoreDiscountProfitPrice(tradeOrder.getStoreDiscountFinalCostPrice().subtract(tradeOrder.getStoreDiscountActualPrice()));
} else if (storeDiscount.getDiscountType().equals(StoreDiscountActivityTypeEnum.type3.getNumber())) {
// 优惠比例 / 100 = 最终优惠比例
@ -133,10 +135,16 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
BigDecimal priceRate = tradeOrder.getStoreDiscountPrice().divide(new BigDecimal("100").setScale(2, BigDecimal.ROUND_DOWN));
tradeOrder.setStoreDiscountActualPrice(tradeOrder.getTradeActualAmount().subtract(tradeOrder.getTradeActualAmount().multiply(priceRate).setScale(2, BigDecimal.ROUND_HALF_UP)));
tradeOrder.setTradeActualAmount(tradeOrder.getTradeActualAmount().subtract(tradeOrder.getStoreDiscountActualPrice()));
// 平台交易成本价
BigDecimal finalCostPrice = tradeOrder.getTradeAmount().multiply(tradeOrder.getStoreDiscountFinalCostPrice().divide(new BigDecimal("100"))).setScale(2, BigDecimal.ROUND_HALF_DOWN);
// 实际交易金额 - 平台交易成本价 = 利润
tradeOrder.setStoreDiscountProfitPrice(tradeOrder.getTradeActualAmount().subtract(finalCostPrice));
} else {
tradeOrder.setStoreDiscountSatisfy(true);
tradeOrder.setStoreDiscountActualPrice(storeDiscount.getDiscountPrice());
tradeOrder.setTradeActualAmount(tradeOrder.getTradeActualAmount().subtract(tradeOrder.getStoreDiscountActualPrice()));
// 实际交易金额 - 平台交易成本价 = 利润
tradeOrder.setStoreDiscountProfitPrice(tradeOrder.getStoreDiscountFinalCostPrice().subtract(tradeOrder.getStoreDiscountActualPrice()));
}
}
@ -146,7 +154,6 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.setUserDiscountName(userDiscount.getDiscountName());
tradeOrder.setUserDiscountType(userDiscount.getDiscountType());
tradeOrder.setUserDiscountPrice(userDiscount.getDiscountPrice());
if (userDiscount.getDiscountType().equals(UserDiscountTypeEnum.type1.getNumber())) {
if (userDiscount.getDiscountCondition().compareTo(tradeOrder.getTradeAmount()) > 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未达到满减门槛");
@ -239,7 +246,7 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
tradeOrder.getUserPhone(),
tradeOrder.getOutTradeNo(),
tradeOrder.getId(),
tradeOrder.getStoreDiscountActualPrice(),
tradeOrder.getStoreDiscountProfitPrice(),
tradeOrder.getStoreName(),
tradeOrder.getCreateTime());
@ -255,6 +262,17 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
userDiscountService.userDiscountUse(tradeOrder.getUserDiscountId(), tradeOrder.getUserPhone());
}
if (StringUtils.isNotBlank(tradeOrder.getUserPhone())) {
// 支付返积分
HsgIntegralService.rebate(RebateProductTypeEnum.type1,
tradeOrder.getUserPhone(),
tradeOrder.getOutTradeNo(),
tradeOrder.getId(),
tradeOrder.getTradeActualAmount(),
tradeOrder.getStoreName(),
tradeOrder.getCreateTime());
}
// 创建分账
if (tradeOrder.getProfitSharingStatus().equals(true)) {
tradeOrderProfitSharingService.createProfitSharing(tradeOrder);

@ -0,0 +1,53 @@
package com.hfkj.sysenum;
import java.util.Objects;
/**
* 商户修改结算申请状态
* @className: MerSettleAcctApply
* @author: HuRui
* @date: 2023/5/4
**/
public enum MerSettleAcctApplyStatus {
status0(0, "删除"),
status1(1, "待提交"),
status2(2, "审核中"),
status3(3, "通过"),
status4(3, "驳回"),
;
private Integer number;
private String name;
MerSettleAcctApplyStatus(int number, String name) {
this.number = number;
this.name = name;
}
public static MerSettleAcctApplyStatus getDataByNumber(Integer number) {
for (MerSettleAcctApplyStatus ele : values()) {
if (Objects.equals(number,ele.getNumber())) {
return ele;
}
}
return null;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -20,16 +20,30 @@ lkl_v2_private_key=/home/project/gratia-pay/cert/lakala/v2/OP00000003_private_ke
lkl_mer_contract_ret_url=https://gratia-pay.dctpay.com/brest/laKaLaNotify/merContract
lkl_micro_pay_ret_url=https://gratia-pay.dctpay.com/crest/laKaLaNotify/microPay
lkl_saas_client_id=testsit
lkl_saas_client_secret=EguwEckByf2I6u6z
lkl_saas_activity_id=37
lkl_saas_user_no=20000101
lkl_saas_request_mer_registration_token_url=https://test.wsmsd.cn/sit/htkauth/oauth/token
lkl_saas_request_mer_registration_url=https://test.wsmsd.cn/sit/htkregistration/merchant/
lkl_saas_request_mer_registration_common_url=https://test.wsmsd.cn/sit/htkregistration/
lkl_saas_request_mer_url=https://test.wsmsd.cn/sit/htkmerchants/
lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp5aV3ZiXG2R8Yd8Nxocv+cF7VAUHBc0TF4MNne7mI8wM2yEP2QgI+rK1qDf6G7ZFPhutpIHKQchpolbSuC0vgaHpSjO9OUs1fpnK/JjZq9o8DatUsA0n4Fccec9NBbV5dy5yrwro7xmDpsevp1/IeiIssi1+iD+nBWqqVFx7GVQIDAQAB
lkl_saas_private_key="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKnlpXdmJcbZHxh3w3Ghy/5wXtUBQcFzRMXgw2d7uYjzAzbIQ/ZCAj6srWoN/obtkU+G62kgcpByGmiVtK4LS+BoelKM705SzV+mcr8mNmr2jwNq1SwDSfgVxx5z00FtXl3LnKvCujvGYOmx6+nX8h6IiyyLX6IP6cFaqpUXHsZVAgMBAAECgYA4NpeM7etJ48T6H4Y3LsWEJkH6UDQlgbIblsaQkstMmLtTgOebrzN28UNfd8njcu9FVOrHGclOKbK7L+1cOLiduWsZKc/c/gAy9wAR4EhoLvlerH9EEPiPWFxdEDbMxPqlkpqLOo+PxHrhTn4vU4CaPdJtL2ujKn7nmsUdUDWo8QJBANS1TlM6nhPt2XlzN5kGfsJ4kBYNjuLXNA2YdNuC2ttYvEXHJ9T70FN/GnRBBIZu47uHH3Ie5nfep+qMk6a8RP8CQQDMecIyI0z1kVt+tOfWKw2ZFLsi74708qTaeR4W1ABtkngj1+bxoWWXr3KqhjqJkWxnhioSfXqu7CScNzjdM1CrAkAQd+ESjI1EmbumrYb2cAxMXi05p98SLPs4uj8B58WuCda5yEuLL9vXOxX/PjFtfxRepn2GxmGtki2J+UxNMnJdAkAFoORjlO0tZU7rcfdfwdeh+xwbnhSFUZiQGv1lC3jnizybX/oPdK3jOwUhBIjf+IzPXLYTxDh4UC/BzRNXo235AkEAhgYBk6H7RU2iIuvwz1c6CtE1gJ8DvEp1F0KOMWMFB0KCpDXUToix0dlMz962FozYENi4X4zYQo6nFwlXeS3Pfw==
#lkl_saas_client_id=testsit
#lkl_saas_client_secret=EguwEckByf2I6u6z
#lkl_saas_activity_id=37
#lkl_saas_user_no=20000101
#lkl_saas_request_mer_registration_token_url=https://test.wsmsd.cn/sit/htkauth/oauth/token
#lkl_saas_request_mer_registration_url=https://test.wsmsd.cn/sit/htkregistration/merchant/
#lkl_saas_request_mer_update_url=https://test.wsmsd.cn/sit/htk-api/
#lkl_saas_request_mer_registration_common_url=https://test.wsmsd.cn/sit/htkregistration/
#lkl_saas_request_mer_url=https://test.wsmsd.cn/sit/htkmerchants/
#lkl_saas_public_key=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCp5aV3ZiXG2R8Yd8Nxocv+cF7VAUHBc0TF4MNne7mI8wM2yEP2QgI+rK1qDf6G7ZFPhutpIHKQchpolbSuC0vgaHpSjO9OUs1fpnK/JjZq9o8DatUsA0n4Fccec9NBbV5dy5yrwro7xmDpsevp1/IeiIssi1+iD+nBWqqVFx7GVQIDAQAB
#lkl_saas_private_key="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAKnlpXdmJcbZHxh3w3Ghy/5wXtUBQcFzRMXgw2d7uYjzAzbIQ/ZCAj6srWoN/obtkU+G62kgcpByGmiVtK4LS+BoelKM705SzV+mcr8mNmr2jwNq1SwDSfgVxx5z00FtXl3LnKvCujvGYOmx6+nX8h6IiyyLX6IP6cFaqpUXHsZVAgMBAAECgYA4NpeM7etJ48T6H4Y3LsWEJkH6UDQlgbIblsaQkstMmLtTgOebrzN28UNfd8njcu9FVOrHGclOKbK7L+1cOLiduWsZKc/c/gAy9wAR4EhoLvlerH9EEPiPWFxdEDbMxPqlkpqLOo+PxHrhTn4vU4CaPdJtL2ujKn7nmsUdUDWo8QJBANS1TlM6nhPt2XlzN5kGfsJ4kBYNjuLXNA2YdNuC2ttYvEXHJ9T70FN/GnRBBIZu47uHH3Ie5nfep+qMk6a8RP8CQQDMecIyI0z1kVt+tOfWKw2ZFLsi74708qTaeR4W1ABtkngj1+bxoWWXr3KqhjqJkWxnhioSfXqu7CScNzjdM1CrAkAQd+ESjI1EmbumrYb2cAxMXi05p98SLPs4uj8B58WuCda5yEuLL9vXOxX/PjFtfxRepn2GxmGtki2J+UxNMnJdAkAFoORjlO0tZU7rcfdfwdeh+xwbnhSFUZiQGv1lC3jnizybX/oPdK3jOwUhBIjf+IzPXLYTxDh4UC/BzRNXo235AkEAhgYBk6H7RU2iIuvwz1c6CtE1gJ8DvEp1F0KOMWMFB0KCpDXUToix0dlMz962FozYENi4X4zYQo6nFwlXeS3Pfw==
lkl_saas_client_id=huifu
lkl_saas_client_secret=f65VVjqJfLtc177F
lkl_saas_activity_id=12
lkl_saas_user_no=22206482
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://gratia-pay.dctpay.com/crest/weiXinNotify/jsapiPay

@ -23,6 +23,7 @@ lkl_saas_activity_id=12
lkl_saas_user_no=22206482
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

Loading…
Cancel
Save