提交代码

yy_dev
胡锐 2 years ago
parent f98143bc9d
commit 5f4f05cb6a
  1. 21
      bweb/src/main/resources/prod/application.yml
  2. 4
      bweb/src/main/resources/prod/config.properties
  3. 108
      cweb/src/main/java/com/cweb/controller/TestController.java
  4. 46
      cweb/src/main/java/com/cweb/notify/WeiXinController.java
  5. 22
      cweb/src/main/resources/dev/logback.xml
  6. 20
      cweb/src/main/resources/prod/application.yml
  7. 4
      cweb/src/main/resources/prod/config.properties
  8. 146
      schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java
  9. 37
      schedule/src/main/resources/dev/application.yml
  10. 20
      schedule/src/main/resources/prod/application.yml
  11. 5
      service/pom.xml
  12. 81
      service/src/main/java/com/hfkj/channel/alipay/AlipayMerService.java
  13. 182
      service/src/main/java/com/hfkj/channel/alipay/utils/AlipayRequest.java
  14. 51
      service/src/main/java/com/hfkj/channel/alipay/utils/AlipayUtils.java
  15. 2
      service/src/main/java/com/hfkj/channel/weixin/WeiXinMerService.java
  16. 44
      service/src/main/java/com/hfkj/channel/weixin/WeiXinPayService.java
  17. 204
      service/src/main/java/com/hfkj/channel/weixin/utils/WxOrderConfig.java
  18. 6
      service/src/main/java/com/hfkj/config/CommonSysConfig.java
  19. 2
      service/src/main/java/com/hfkj/config/mqtt/MqttProviderCallBack.java
  20. 75
      service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java
  21. 151
      service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapper.java
  22. 68
      service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapperExt.java
  23. 151
      service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapper.java
  24. 7
      service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapperExt.java
  25. 416
      service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverSqlProvider.java
  26. 416
      service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingSqlProvider.java
  27. 28
      service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java
  28. 32
      service/src/main/java/com/hfkj/entity/BsTradeOrder.java
  29. 130
      service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java
  30. 329
      service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharing.java
  31. 1394
      service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingExample.java
  32. 329
      service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiver.java
  33. 1374
      service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiverExample.java
  34. 29
      service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingReceiverService.java
  35. 39
      service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingService.java
  36. 8
      service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoRateServiceImpl.java
  37. 55
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingReceiverServiceImpl.java
  38. 126
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingServiceImpl.java
  39. 2
      service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java
  40. 49
      service/src/main/java/com/hfkj/sysenum/ProfitSharingReceiverObjectType.java
  41. 3
      service/src/main/resources/dev/commonConfig.properties
  42. 25
      service/src/main/resources/prod/commonConfig.properties

@ -9,9 +9,9 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://121.36.196.210:12001/xuan_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=&useSSL=false
username: mysql
password: HF123456@mysql
url: jdbc:mysql://192.168.0.63:21100/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: gratia_pay
password: HUfukeji123456!@#
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
@ -43,7 +43,20 @@ spring:
jackson:
serialization:
write-dates-as-timestamps: true
#MQTT配置信息
mqtt:
#MQTT服务地址
url: ws://140.210.192.36:8083/mqtt
#用户名
username: printer_provider
#密码
password: abcd123!
#客户端id(不能重复)
# client:
# id: provider-id
#MQTT默认的消息推送主题,实际可在调用接口是指定
# default:
# topic: topic
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml

@ -1,2 +1,2 @@
fileUrl=/home/project/xuan-pay/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/gratia-pay/filesystem
cmsPath=/home/project/gratia-pay/filesystem/cmsPath

@ -1,9 +1,11 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.alipay.utils.AlipayRequest;
import com.hfkj.channel.lakala.config.LaKaLaConfig;
import com.hfkj.channel.weixin.WeiXinMerService;
import com.hfkj.channel.weixin.utils.HttpClientBuilder;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.config.device.SoundService;
import com.hfkj.config.mqtt.MqttProviderService;
@ -17,6 +19,10 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/test")
@ -69,9 +75,95 @@ public class TestController {
public ResponseData soundSendMsg() {
try {
soundService.sendPayMsg("898604A2192181729951", new BigDecimal("12.99"));
/* AlipayClient alipayClient = AlipayUtils.initClient();
AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest();
request.setBizContent("");
AntMerchantExpandIndirectZftConsultResponse execute = alipayClient.certificateExecute(request);*/
// soundService.sendPayMsg("898604A2192181729951", new BigDecimal("12.99"));
soundService.geSoundInfo("898604A2192181729951");
return ResponseMsgUtil.success("");
// soundService.geSoundDetail("898604A2192181729951");
// return ResponseMsgUtil.success(AlipayRequest.imageUpload("C:/Users/hurui/Desktop/default_oil_station.jpg"));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/merchantIndirectConsult",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "图片上传")
public ResponseData merchantIndirectConsult() {
try {
Map<String,Object> body = new HashMap<>();
body.put("external_id", System.currentTimeMillis());
body.put("name", "");
body.put("alias_name", "");
body.put("merchant_type", "");
body.put("mcc", "");
body.put("cert_no", "");
body.put("cert_type", "");
body.put("cert_image", "");
body.put("cert_name", "");
body.put("cert_image_back", "");
body.put("legal_name", "");
body.put("legal_cert_no", "");
body.put("legal_cert_front_image", "");
body.put("legal_cert_back_image", "");
body.put("service_phone", "");
Map<String,Object> businessAddress = new HashMap<>();
businessAddress.put("city_code", "");
businessAddress.put("district_code", "");
businessAddress.put("address", "");
businessAddress.put("province_code", "");
body.put("business_address", businessAddress);
Map<String,Object> contactInfos = new HashMap<>();
contactInfos.put("name", "");
contactInfos.put("phone", "");
contactInfos.put("mobile", "");
contactInfos.put("email", "");
contactInfos.put("id_card_no", "");
body.put("contact_infos", contactInfos);
Map<String,Object> bizCards = new HashMap<>();
bizCards.put("account_holder_name", "");
bizCards.put("account_no", "");
bizCards.put("account_inst_province", "");
bizCards.put("account_inst_city", "");
bizCards.put("account_branch_name", "");
bizCards.put("usage_type", "");
bizCards.put("account_type", "");
bizCards.put("account_inst_name", "");
bizCards.put("account_inst_id", "");
bizCards.put("bank_code", "");
body.put("biz_cards", bizCards);
Map<String,Object> qualifications = new HashMap<>();
qualifications.put("industry_qualification_type", "");
qualifications.put("industry_qualification_image", "");
body.put("qualifications", qualifications);
body.put("out_door_images", "");
// body.put("service", ['当面付', 'app支付', 'wap支付', '电脑支付']);
body.put("sign_time_with_isv", DateUtil.date2String(new Date(), "yyyy-MM-dd"));
Map<String,Object> sites = new HashMap<>();
body.put("sites", sites);
Map<String,Object> invoiceInfo = new HashMap<>();
body.put("invoice_info", invoiceInfo);
AlipayRequest.merchantIndirectConsult(JSONObject.toJSONString(body));
return ResponseMsgUtil.success("");
} catch (Exception e) {
@ -80,4 +172,18 @@ public class TestController {
}
}
@RequestMapping(value="/imageUpload",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "图片上传")
public ResponseData imageUpload() {
try {
return ResponseMsgUtil.success(AlipayRequest.imageUpload("C:/Users/hurui/Desktop/default_oil_station.jpg"));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -6,8 +6,10 @@ import com.hfkj.config.device.SoundService;
import com.hfkj.entity.BsDevice;
import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.BsTradeOrderMsg;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.service.BsDeviceService;
import com.hfkj.service.BsTradeOrderMsgService;
import com.hfkj.service.BsTradeOrderProfitSharingService;
import com.hfkj.service.BsTradeOrderService;
import com.hfkj.sysenum.*;
import io.swagger.annotations.Api;
@ -19,11 +21,14 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.xml.sax.SAXException;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.xml.parsers.ParserConfigurationException;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.*;
@ -51,6 +56,9 @@ public class WeiXinController {
@Resource
private BsTradeOrderService tradeOrderService;
@Resource
private BsTradeOrderProfitSharingService tradeOrderProfitSharingService;
@RequestMapping(value="/jsapiPay",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "交易【主扫】通知")
@ -74,16 +82,21 @@ public class WeiXinController {
if ("SUCCESS".equals(map.get("return_code")) && "SUCCESS".equals(map.get("result_code"))) {
// 查询订单
BsTradeOrder order = tradeOrderService.getOrderByOutTradeNo(map.get("out_trade_no"));
if (order != null) {
if (order != null && order.getStatus().equals(TradeOrderStatusEnum.status1.getNumber())) {
order.setPayMode(TradeOrderPayModeEnum.WECHAT.getCode());
order.setPlatformType(PlatformTypeEnum.type1.getNumber());
order.setPlatformMerNo(map.get("mch_id"));
order.setPlatformType(PlatformTypeEnum.type4.getNumber());
order.setPlatformMerNo(map.get("sub_mch_id"));
order.setPlatformTradeNo(map.get("transaction_id"));
order.setTradeActualAmount(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100")));
order.setStatus(TradeOrderStatusEnum.status3.getNumber());
order.setPayTime(new Date());
tradeOrderService.editOrder(order);
// 创建分账
if (order.getProfitSharingStatus().equals(true)) {
tradeOrderProfitSharingService.createProfitSharing(order);
}
Map<String,Object> param = new HashMap<>();
param.put("storeId", order.getStoreId());
param.put("deviceType", DeviceTypeEnum.type1.getNumber());
@ -103,4 +116,31 @@ public class WeiXinController {
log.error("login error!",e);
}
}
public static void main(String[] args) {
String data = "<xml>\n" +
"<return_code><![CDATA[SUCCESS]]></return_code>\n" +
"<result_code><![CDATA[SUCCESS]]></result_code>\n" +
"<mch_id><![CDATA[1289663601]]></mch_id>\n" +
"<sub_mch_id><![CDATA[1609882817]]></sub_mch_id>\n" +
"<appid><![CDATA[wxa075e8509802f826]]></appid>\n" +
"<nonce_str><![CDATA[024df22ae6778ce5]]></nonce_str>\n" +
"<sign><![CDATA[1EA7934B67673EBB41B26671A1F1E09526AC2BB0F51A519DAED34F8421093327]]></sign>\n" +
"<transaction_id><![CDATA[4200001727202302237548265962]]></transaction_id>\n" +
"<out_order_no><![CDATA[ZF1130202302231540413358944000]]></out_order_no>\n" +
"<order_id><![CDATA[30000200502023022344319434800]]></order_id>\n" +
"<receivers><![CDATA[[{\"type\":\"MERCHANT_ID\",\"account\":\"1603942866\",\"amount\":1,\"description\":\"分给商户:惠昕石化\",\"result\":\"CLOSED\",\"finish_time\":\"20230223160731\",\"detail_id\":\"36000200502023022362619327881\"},{\"type\":\"MERCHANT_ID\",\"account\":\"1609882817\",\"amount\":99,\"description\":\"解冻给分账方\",\"result\":\"SUCCESS\",\"finish_time\":\"20230223160731\",\"detail_id\":\"36000200502023022362619327882\"}]]]></receivers>\n" +
"<status><![CDATA[FINISHED]]></status>\n" +
"</xml>";
try {
System.out.println(XmlUtil.parseXmlToTreeMap(data, "utf-8"));
} catch (ParserConfigurationException e) {
throw new RuntimeException(e);
} catch (IOException e) {
throw new RuntimeException(e);
} catch (SAXException e) {
throw new RuntimeException(e);
}
}
}

@ -69,4 +69,26 @@
<logger name="com.hfkj" level="ERROR">
<appender-ref ref="errorlog" />
</logger>
<appender name="alipaylog" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>log/alipay/alipaylog.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>log/alipay.log.%d.%i</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 64 MB -->
<maxFileSize>64 MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>
%d %p (%file:%line\)- %m%n
</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
</appender>
<logger name="com.hfkj.channel.alipay" level="INFO">
<appender-ref ref="alipaylog" />
</logger>
</configuration>

@ -9,9 +9,9 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://121.36.196.210:12001/xuan_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: mysql
password: HF123456@mysql
url: jdbc:mysql://192.168.0.63:21100/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: gratia_pay
password: HUfukeji123456!@#
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
@ -44,6 +44,20 @@ spring:
jackson:
serialization:
write-dates-as-timestamps: true
#MQTT配置信息
mqtt:
#MQTT服务地址
url: ws://140.210.192.36:8083/mqtt
#用户名
username: printer_provider
#密码
password: abcd123!
#客户端id(不能重复)
# client:
# id: provider-id
#MQTT默认的消息推送主题,实际可在调用接口是指定
# default:
# topic: topic
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml

@ -1,5 +1,5 @@
fileUrl=/home/project/xuan-pay/filesystem
cmsPath=/home/project/xuan-pay/filesystem/cmsPath
fileUrl=/home/project/gratia-pay/filesystem
cmsPath=/home/project/gratia-pay/filesystem/cmsPath
wxAppId=wxa075e8509802f826
wxAppSecret=0e606fc1378d35e359fcf3f15570b2c5

@ -0,0 +1,146 @@
package com.hfkj.schedule;
import com.hfkj.channel.weixin.utils.WxOrderConfig;
import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import com.hfkj.service.BsTradeOrderProfitSharingReceiverService;
import com.hfkj.service.BsTradeOrderProfitSharingService;
import com.hfkj.service.BsTradeOrderService;
import com.hfkj.sysenum.PlatformTypeEnum;
import com.hfkj.sysenum.TradeOrderPayModeEnum;
import com.hfkj.sysenum.TradeOrderStatusEnum;
import org.apache.commons.collections4.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.Scheduled;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.*;
/**
* 交易订单定时任务
*
*/
@Configuration
public class TradeOrderSchedule {
private static final Logger log = LoggerFactory.getLogger(TradeOrderSchedule.class);
@Resource
private BsTradeOrderService tradeOrderService;
@Resource
private BsTradeOrderProfitSharingService tradeOrderProfitSharingService;
@Resource
private BsTradeOrderProfitSharingReceiverService tradeOrderProfitSharingReceiverService;
/**
* 订单发起分账
* 5分钟扫描一次需要分账的订单
*/
@Scheduled(cron="0 0/1 * * * ?")
public void profitSharing() {
List<BsTradeOrderProfitSharing> tradeOrderProfitSharingList = tradeOrderProfitSharingService.getNeedProfitSharingOrder();
for (BsTradeOrderProfitSharing tradeOrderProfitSharing : tradeOrderProfitSharingList) {
try {
List<Map<String,Object>> receiversList = new ArrayList<>();
Map<String,Object> receiversMap;
// 分账接收方
Map<String,Object> param = new HashMap<>();
param.put("tradeOrderProfitSharingId", tradeOrderProfitSharing.getId());
List<BsTradeOrderProfitSharingReceiver> profitSharingReceivers = tradeOrderProfitSharingReceiverService.getProfitSharingList(param);
for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceivers) {
receiversMap = new HashMap<>();
receiversMap.put("type", "MERCHANT_ID");
receiversMap.put("account", receiver.getReceiverAccount());
receiversMap.put("amount", receiver.getReceiverAmount().multiply(new BigDecimal("100")).intValue());
receiversMap.put("description", "分给商户:" + receiver.getReceiverName());
receiversList.add(receiversMap);
}
if (tradeOrderProfitSharing.getPlatformType().equals(PlatformTypeEnum.type4.getNumber())) {
// 微信分账
TreeMap<String, String> refundModel = WxOrderConfig.createProfitsharing(
tradeOrderProfitSharing.getPlatformAppid(),
tradeOrderProfitSharing.getPlatformMerNo(),
tradeOrderProfitSharing.getPlatformTradeNo(),
tradeOrderProfitSharing.getTradeOrderNo(),
receiversList
);
if("SUCCESS".equals(MapUtils.getString(refundModel, "return_code"))
&& "SUCCESS".equals(MapUtils.getString(refundModel, "result_code"))) {
tradeOrderProfitSharing.setPlatformProfitSharingOrderNo(MapUtils.getString(refundModel, "order_id"));
tradeOrderProfitSharing.setStatus(1);
tradeOrderProfitSharing.setProfitSharingTime(new Date());
tradeOrderProfitSharingService.editData(tradeOrderProfitSharing);
for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceivers) {
receiver.setStatus(1);
receiver.setProfitSharingTime(new Date());
tradeOrderProfitSharingReceiverService.editData(receiver);
}
} else {
tradeOrderProfitSharing.setExt1(MapUtils.getString(refundModel,"description"));
tradeOrderProfitSharingService.editData(tradeOrderProfitSharing);
}
}
} catch (Exception e) {
tradeOrderProfitSharing.setExt1("分账失败");
tradeOrderProfitSharingService.editData(tradeOrderProfitSharing);
}
}
}
/**
* 完结分账
* 每分钟扫描一次需要完结的订单
*/
@Scheduled(cron="0 0/1 * * * ?")
public void profitSharingFinish() {
List<BsTradeOrderProfitSharing> tradeOrderProfitSharingList = tradeOrderProfitSharingService.getNeedFinishProfitSharingOrder();
for (BsTradeOrderProfitSharing tradeOrderProfitSharing : tradeOrderProfitSharingList) {
try {
TreeMap<String, String> refundModel = WxOrderConfig.profitSharingFinish(
tradeOrderProfitSharing.getPlatformAppid(),
tradeOrderProfitSharing.getPlatformMerNo(),
tradeOrderProfitSharing.getPlatformTradeNo(),
tradeOrderProfitSharing.getPlatformProfitSharingOrderNo(),
"分账已完成");
if("SUCCESS".equals(MapUtils.getString(refundModel, "return_code"))
&& "SUCCESS".equals(MapUtils.getString(refundModel, "result_code"))) {
tradeOrderProfitSharing.setPlatformProfitSharingOrderNo(MapUtils.getString(refundModel, "order_id"));
tradeOrderProfitSharing.setStatus(2);
tradeOrderProfitSharing.setFinishTime(new Date());
tradeOrderProfitSharingService.editData(tradeOrderProfitSharing);
// 分账接收方
Map<String,Object> param = new HashMap<>();
param.put("tradeOrderProfitSharingId", tradeOrderProfitSharing.getId());
List<BsTradeOrderProfitSharingReceiver> profitSharingReceivers = tradeOrderProfitSharingReceiverService.getProfitSharingList(param);
for (BsTradeOrderProfitSharingReceiver receiver : profitSharingReceivers) {
receiver.setStatus(2);
receiver.setFinishTime(new Date());
tradeOrderProfitSharingReceiverService.editData(receiver);
}
} else {
tradeOrderProfitSharing.setExt1(MapUtils.getString(refundModel,"description"));
tradeOrderProfitSharingService.editData(tradeOrderProfitSharing);
}
} catch (Exception e) {
tradeOrderProfitSharing.setExt1("完结分账失败");
tradeOrderProfitSharingService.editData(tradeOrderProfitSharing);
}
}
}
}

@ -43,6 +43,43 @@ spring:
jackson:
serialization:
write-dates-as-timestamps: true
#MQTT配置信息
mqtt:
#MQTT服务地址
url: ws://139.159.177.244:8083/mqtt
#用户名
username: printer_provider
#密码
password: 123654
#客户端id(不能重复)
# client:
# id: provider-id
#MQTT默认的消息推送主题,实际可在调用接口是指定
# default:
# topic: topic
jetcache:
statIntervalMinutes: 15
areaInCacheName: false
local:
default:
type: linkedhashmap
keyConvertor: fastjson
remote:
default:
type: redis
host: 139.159.177.244
port: 36379
password: HF123456.Redis
database: 6
keyConvertor: fastjson
broadcastChannel: projectA
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
mybatis:
mapperLocations:
- classpath*:sqlmap*/*.xml

@ -9,9 +9,9 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/xuan_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
username: root
password: HF123456.
url: jdbc:mysql://192.168.0.63:21100/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: gratia_pay
password: HUfukeji123456!@#
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
filters: stat
@ -45,6 +45,20 @@ spring:
jackson:
serialization:
write-dates-as-timestamps: true
#MQTT配置信息
mqtt:
#MQTT服务地址
url: ws://140.210.192.36:8083/mqtt
#用户名
username: printer_provider
#密码
password: abcd123!
#客户端id(不能重复)
# client:
# id: provider-id
#MQTT默认的消息推送主题,实际可在调用接口是指定
# default:
# topic: topic
mybatis:
mapperLocations:

@ -367,6 +367,11 @@
<artifactId>wechatpay-apache-httpclient</artifactId>
<version>0.4.8</version>
</dependency>
<dependency>
<groupId>com.alipay.sdk</groupId>
<artifactId>alipay-sdk-java</artifactId>
<version>4.34.0.ALL</version>
</dependency>
<!--<dependency>
<groupId>com.huaweicloud</groupId>
<artifactId>esdk-obs-java</artifactId>

@ -0,0 +1,81 @@
package com.hfkj.channel.alipay;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.entity.BsMerAttach;
import com.hfkj.model.MerBasisModel;
import com.hfkj.service.BsMerAttachService;
import com.hfkj.service.BsMerContractRecordService;
import com.hfkj.service.BsMerService;
import com.hfkj.sysenum.MerAttachType;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @className: AlipayMerService
* @author: HuRui
* @date: 2023/2/20
**/
@Service("alipayMerService")
public class AlipayMerService {
@Resource
private BsMerService merService;
@Resource
private BsMerAttachService merAttachService;
@Resource
private BsMerContractRecordService merContractRecordService;
private List<BsMerAttach> merAttachList;
public void add(Long merId) {
MerBasisModel basisModel = merService.getMerDetail(merId);
// 查询商户附件列表
merAttachList = merAttachService.getAttachListByMer(merId, null);
Map<String,Object> body = new HashMap<>();
body.put("external_id", basisModel.getMerNo());
body.put("name", basisModel.getMerName());
body.put("alias_name", basisModel.getMerAbbreviate());
body.put("merchant_type", "");
body.put("mcc", "");
body.put("cert_no", "");
body.put("cert_type", "");
body.put("cert_image", "");
body.put("cert_name", "");
body.put("cert_image_back", "");
body.put("legal_name", "");
body.put("legal_cert_no", "");
body.put("legal_cert_front_image", "");
body.put("legal_cert_back_image", "");
body.put("service_phone", "");
}
/**
* 获取商户附件
* @param attachType
* @return
*/
private List<BsMerAttach> getMerAttach(MerAttachType attachType) {
if (merAttachList == null || merAttachList.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未上传相关图片");
}
List<BsMerAttach> collect = merAttachList.stream()
.filter(o -> o.getType().equals(attachType.getNumber()))
.collect(Collectors.toList());
if (collect.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未上传" + attachType.getName() + "图片");
}
return collect;
}
}

@ -0,0 +1,182 @@
package com.hfkj.channel.alipay.utils;
import com.alipay.api.AlipayClient;
import com.alipay.api.FileItem;
import com.alipay.api.domain.ZftSubMerchantOrder;
import com.alipay.api.request.AntMerchantExpandIndirectImageUploadRequest;
import com.alipay.api.request.AntMerchantExpandIndirectZftConsultRequest;
import com.alipay.api.request.AntMerchantExpandIndirectZftSettlementmodifyRequest;
import com.alipay.api.request.AntMerchantExpandIndirectZftorderQueryRequest;
import com.alipay.api.response.AntMerchantExpandIndirectImageUploadResponse;
import com.alipay.api.response.AntMerchantExpandIndirectZftConsultResponse;
import com.alipay.api.response.AntMerchantExpandIndirectZftSettlementmodifyResponse;
import com.alipay.api.response.AntMerchantExpandIndirectZftorderQueryResponse;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* 支付业务请求
* @className: MerchantRequest
* @author: HuRui
* @date: 2023/2/17
**/
public class AlipayRequest {
private static Logger log = LoggerFactory.getLogger(AlipayRequest.class);
/**
* 商户创建预校验咨询
* @param bizContent 进件参数
* @return
* @throws Exception
*/
public static void merchantIndirectConsult(String bizContent) {
log.info("========== START 商户创建预校验咨询 ==========");
log.info("请求参数:" + bizContent);
try {
AlipayClient alipayClient = AlipayUtils.initClient();
AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest();
request.setBizContent(bizContent);
AntMerchantExpandIndirectZftConsultResponse response = alipayClient.certificateExecute(request);
log.info("响应参数:" + response);
if (response.isSuccess() != true || response.getAccountAudit() != true || response.getRiskAudit() != true) {
throw new Exception(response.getSubMsg());
}
} catch (Exception e) {
log.info("出现异常:" + e);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage());
} finally {
log.info("========== END 商户创建预校验咨询 ==========");
}
}
/**
* 商户创建
* @param bizContent 进件参数
* @return 申请单号
* @throws Exception
*/
public static String merchantIndirectCreate(String bizContent) {
log.info("========== START 商户创建 ==========");
log.info("请求参数:" + bizContent);
try {
AlipayClient alipayClient = AlipayUtils.initClient();
AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest();
request.setBizContent(bizContent);
AntMerchantExpandIndirectZftConsultResponse response = alipayClient.certificateExecute(request);
log.info("响应参数:" + response);
if (response.isSuccess()) {
return response.getOrderId();
}
throw new Exception(response.getSubMsg());
} catch (Exception e) {
log.info("出现异常:" + e);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage());
} finally {
log.info("========== END 商户创建 ==========");
}
}
/**
* 商户入驻进度查询
* @param bizContent 进件参数
* @return 申请单号
* @throws Exception
*/
public static List<ZftSubMerchantOrder> merchantIndirectQuery(String bizContent) {
log.info("========== START 商户入驻进度查询 ==========");
log.info("请求参数:" + bizContent);
try {
AlipayClient alipayClient = AlipayUtils.initClient();
AntMerchantExpandIndirectZftorderQueryRequest request = new AntMerchantExpandIndirectZftorderQueryRequest();
request.setBizContent(bizContent);
AntMerchantExpandIndirectZftorderQueryResponse response = alipayClient.certificateExecute(request);
log.info("响应参数:" + response);
if (response.isSuccess()) {
return response.getOrders();
}
throw new Exception(response.getSubMsg());
} catch (Exception e) {
log.info("出现异常:" + e);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage());
} finally {
log.info("========== END 商户入驻进度查询 ==========");
}
}
/**
* 商户结算信息修改
* @param bizContent 参数
* @return
* @throws Exception
*/
public static String merchantIndirectSettlementModify(String bizContent) {
log.info("========== START 商户结算信息修改 ==========");
log.info("请求参数:" + bizContent);
try {
AlipayClient alipayClient = AlipayUtils.initClient();
AntMerchantExpandIndirectZftSettlementmodifyRequest request = new AntMerchantExpandIndirectZftSettlementmodifyRequest ();
request.setBizContent(bizContent);
AntMerchantExpandIndirectZftSettlementmodifyResponse response = alipayClient.certificateExecute(request);
log.info("响应参数:" + response);
if (response.isSuccess()) {
return response.getOrderId();
}
throw new Exception(response.getSubMsg());
} catch (Exception e) {
log.info("出现异常:" + e);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage());
} finally {
log.info("========== END 商户结算信息修改 ==========");
}
}
/**
* 图片上传
* @param fileUrl 本地路径
* @return
* @throws Exception
*/
public static String imageUpload(String fileUrl) {
log.info("========== START 图片上传 ==========");
log.info("请求参数:" + fileUrl);
try {
AlipayClient alipayClient = AlipayUtils.initClient();
// 读取本地文件
FileItem imageContent = new FileItem(fileUrl);
// 截取文件格式
String imageType = StringUtils.substringAfterLast(fileUrl, ".");
AntMerchantExpandIndirectImageUploadRequest request = new AntMerchantExpandIndirectImageUploadRequest();
request.setImageContent(imageContent);
request.setImageType(imageType);
AntMerchantExpandIndirectImageUploadResponse response = alipayClient.certificateExecute(request);
log.info("响应参数:" + response);
if (response.isSuccess()) {
return response.getImageId();
}
throw new Exception(response.getSubMsg());
} catch (Exception e) {
log.info("出现异常:" + e);
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage());
} finally {
log.info("========== END 图片上传 ==========");
}
}
}

@ -0,0 +1,51 @@
package com.hfkj.channel.alipay.utils;
import com.alipay.api.AlipayClient;
import com.alipay.api.AlipayConfig;
import com.alipay.api.DefaultAlipayClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 支付宝配置
* @className: AlipayConfig
* @author: HuRui
* @date: 2023/2/13
**/
public class AlipayUtils {
private final static String serverUrl = "https://openapi.alipay.com/gateway.do";
private final static String appId = "2021003176605875";
private final static String APP_PRIVATE_KEY = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQD8W2fFUHki5Qyt6m9LO00u6AoW/XjsLtVP1uvwYbRRcRDnTk3lTEAPcopULgqjUgMIIY7xaEan3EnVQbrV+OAXA2Xs0CmBTC5kR5zfZnytUameAmkJlo5ixAfT8om6gkKOTIm0PmqcW7WvcOZtHl28G8RXFH676YBnaCS58/j3w+N9vom4tqADcHLfg9HkhFnRn2mfXbvmasgXIIPSP5XgrirLoYz3YK7OXhChFHUaip675oTHMSGe/iYcaNXfOENpI2z8RDyGwXHVFojdLX45gRkS0odGPeskuMh27wfMf9BGfeGrSSs7xjcjtauG1g8fcRpnnW1aBUD5tA0C370DAgMBAAECggEAW0tCDkrfl/UfEifWnXPVp1uAkvKd9Wu39cs9zde64R+zSsq0OXjNUAlS68NAS/dWa3GggcsEjKOP/ltqGRCRGSI8lGB2M3V47wRNRzCPeDAr2aLrlvFlj2t1nYKHuvZ2133u70sJTImM/+wrIFy08mFlNU+PzbFap44wgyk074Sxdxh3tj1a6NRfLOiBFwqI54wxoXMtvbS+YJ4rTR2PWBtv3NQrGs2AvcNHhZHsnyRDaSz0RmJ+4ifi9rGhOhfSfAvn53+r+ycJ/5rTDqZ67TWd51LkO2KyqEkPqFzN7J8cZ3tnR5+Mmlkz3QPmDsCL1n5vmZO9n2pL7I/hiDDZIQKBgQD/W92MoX+tCqPht3CjO+XQPn0h3tYrUYdyIofKUu89fw2kHhwi+nagUqEu5mrEKyC8rhlNu+KQPCEutZeflgd6CIlsJV2EINfTh5hXWlRSMW6bumAHOTEBgEnu1jNkvRhw78S8K38Wa1JWvgh5b23Zrj4hbwgN2Mzo7q6YmR5HUQKBgQD8/ZxJIWVjTtePFJP0TXhYz9vFJfbSMGD8g9/p+bS8eoSSSwv8LUJiwXJi2SwJnXYOhkFssZecVrUiAK0rqgBPXbQfiFp3G2MtDPft1mexpOxD08/ZorSsoBWpo4kMEqoO26H/wCJRFmbJn2nvzErjDmBrJ8asNYppp8soVSDSEwKBgE2iy2/XJe8hPgQA9oDaVBuE9BxZGHohFnHv56LupgfnWelcsic8SNajaJfOvAUaK6DRuaW1isNZVKlT0l5Vib5jXAyCK7VhGt0X64wbTWmT19IGzu1DSQ/wxgmUHBnzl7u2WfTvsHrLdEQlEISDCT3WSNN3Y1Z6ZIopDvIcE2WRAoGBAM+uwiWmrLyhdIOYuPzMvAbsW9W0HLLf1D53Y9GHk79GNJ6DzQrvfJflhilvbp9WDBxQSlUYVQWaiIepVn+Jx0df/QYFwX4VlYzeIIm2gNlsMihcMTzQPNGZeS8ReOfYSpJ36r0w1PsMEMVjgGvCoZdTrgNJW+by7PVfMX+iopbRAoGAQo17bUcWI72CxMRVYkaqTbkbyGdLLHMUp9XoUhYsmzWGdvbwas9OF0tPEfIjfBIfue2yTWnQRDMV7X13uvt6nvZDpeGf+eLekd/GQMZZzoKHSqIP3NjQFC+Ao9QkGRYcRcEiWd7M9fwysKudQ78oSqdbGYmH+hejKDyS5mUNVCs=";
private final static String APP_CERT_PATH = "D:/home/project/gratia-pay/cert/alipay/appCertPublicKey_2021003176605875.crt";
private final static String ALIPAY_CERT_PATH = "D:/home/project/gratia-pay/cert/alipay/alipayCertPublicKey_RSA2.crt";
private final static String ALIPAY_ROOT_CERT_PATH = "D:/home/project/gratia-pay/cert/alipay/alipayRootCert.crt";
/**
* 初始化客户端请求
* @return
*/
public static AlipayClient initClient() throws Exception {
AlipayConfig alipayConfig = new AlipayConfig();
// 设置网关地址
alipayConfig.setServerUrl(serverUrl);
// 设置应用APPID
alipayConfig.setAppId(appId);
// 设置应用私钥
alipayConfig.setPrivateKey(APP_PRIVATE_KEY);
// 设置应用公钥证书路径
alipayConfig.setAppCertPath(APP_CERT_PATH);
// 设置支付宝公钥证书路径
alipayConfig.setAlipayPublicCertPath(ALIPAY_CERT_PATH);
// 设置支付宝根证书路径
alipayConfig.setRootCertPath(ALIPAY_ROOT_CERT_PATH);
// 设置请求格式,固定值json
alipayConfig.setFormat("json");
// 设置字符集
alipayConfig.setCharset("utf-8");
// 设置签名类型
alipayConfig.setSignType("RSA2");
return new DefaultAlipayClient(alipayConfig);
}
}

@ -193,7 +193,7 @@ public class WeiXinMerService {
bankAccountInfo.put("account_name",HttpClientBuilder.rsaEncryptOAEP(basisModel.getRegName()));
}
bankAccountInfo.put("account_bank", basisModel.getMerSettleAcct().getBankName());
bankAccountInfo.put("bank_address_code", "110000");
bankAccountInfo.put("bank_address_code", basisModel.getMerSettleAcct().getOpenningBankCityCode());
bankAccountInfo.put("account_number", HttpClientBuilder.rsaEncryptOAEP(basisModel.getMerSettleAcct().getBankCardNo()));
body.put("bank_account_info", bankAccountInfo);

@ -9,6 +9,7 @@ import com.hfkj.channel.weixin.utils.XmlUtil;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.config.CommonSysConst;
import com.hfkj.entity.*;
import com.hfkj.service.BsMerPlatformNoService;
import com.hfkj.service.BsMerService;
@ -74,15 +75,13 @@ public class WeiXinPayService {
if (mer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户信息");
}
// 是否分账
String profitSharing = "N";
String subAppid = "wxa075e8509802f826";
// 微信支付
WeChatPayReqInfo weChatPayReqInfo = new WeChatPayReqInfo();
weChatPayReqInfo.setAppid("wx637bd6f7314daa46"); // 服务商appid
weChatPayReqInfo.setMch_id("1289663601"); // 服务商商户号
weChatPayReqInfo.setSub_appid("wxa075e8509802f826"); // 公众号
weChatPayReqInfo.setSub_mch_id("1609882817");
weChatPayReqInfo.setSub_appid(subAppid); // 公众号
weChatPayReqInfo.setSub_mch_id(platformNo.getPlatformNo());
// weChatPayReqInfo.setOpenid(openId);
weChatPayReqInfo.setSub_openid(order.getPayUserId());
@ -91,9 +90,9 @@ public class WeiXinPayService {
weChatPayReqInfo.setOut_trade_no(order.getOutTradeNo()); // 商户订单号
weChatPayReqInfo.setTotal_fee(order.getTradeActualAmount().multiply(new BigDecimal("100")).intValue()); // 总金额
weChatPayReqInfo.setSpbill_create_ip("122.9.135.148"); // 终端ip
weChatPayReqInfo.setNotify_url("https://gratia-pay.dctpay.com/crest/weiXinNotify/jsapiPay"); // 通知url
weChatPayReqInfo.setNotify_url(CommonSysConst.getSysConfig().getWechat_pay_notify_url()); // 通知url
weChatPayReqInfo.setTrade_type("JSAPI"); // 交易类型
weChatPayReqInfo.setProfit_sharing(profitSharing);
weChatPayReqInfo.setProfit_sharing(order.getProfitSharingStatus().equals(true)?"Y":"N");
//附加数据,区分订单类型
Map<String,String> payMap = new HashMap<>();
@ -102,6 +101,8 @@ public class WeiXinPayService {
payMap.put("unified_order_url", "https://api.mch.weixin.qq.com/pay/unifiedorder");
SortedMap<Object, Object> sortedMap = wechatPayUtil.goWechatPay(weChatPayReqInfo,payMap);
order.setPlatformAppid(subAppid);
tradeOrderService.editOrder(order);
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("order", order);
@ -110,6 +111,13 @@ public class WeiXinPayService {
return returnMap;
}
/**
* 交易订单
* @param refundNo 退款订单号
* @param refundMoney 退款金额
* @return
* @throws Exception
*/
public Map<String, Object> refund(String refundNo, BigDecimal refundMoney) throws Exception {
// 查询交易订单
BsTradeOrderRefund orderRefund = tradeOrderRefundService.getRefundByRefundNo(refundNo);
@ -119,6 +127,7 @@ public class WeiXinPayService {
if (!orderRefund.getStatus().equals(TradeOrderRefundStatusEnum.status1.getNumber())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单不处于退款中状态");
}
// 查询交易订单
BsTradeOrder order = tradeOrderService.getOrderByOutTradeNo(orderRefund.getOutTradeNo());
if (order == null) {
@ -127,14 +136,23 @@ public class WeiXinPayService {
OrderRefundModel refundModel = WxOrderConfig.orderToRefund(
order.getPlatformTradeNo(),
order.getTradeAmount(),
order.getPlatformTradeNo(),
orderRefund.getRefundNo(),
order.getPlatformMerNo(),
order.getTradeActualAmount(),
orderRefund.getRefundAmount()
);
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("order", order);
returnMap.put("orderRefund", orderRefund);
return returnMap;
if("SUCCESS".equals(refundModel.getReturn_code()) && "SUCCESS".equals(refundModel.getResult_code())) {
order.setStatus(TradeOrderStatusEnum.status6.getNumber());
tradeOrderService.editOrder(order);
Map<String, Object> returnMap = new HashMap<>();
returnMap.put("order", order);
returnMap.put("orderRefund", orderRefund);
return returnMap;
}
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, refundModel.getErr_code_des());
}
}

@ -1,5 +1,6 @@
package com.hfkj.channel.weixin.utils;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.channel.weixin.entity.OrderRefundModel;
import com.hfkj.channel.weixin.utils.sdk.WXPayConstants;
import com.hfkj.config.CommonSysConst;
@ -19,9 +20,7 @@ import javax.net.ssl.SSLContext;
import java.io.FileInputStream;
import java.math.BigDecimal;
import java.security.KeyStore;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.*;
/**
* 微信订单处理m
@ -60,15 +59,24 @@ public class WxOrderConfig {
*/
public static final String MCH_ID_1624126902 = "1624126902";
public static OrderRefundModel orderToRefund(String paySerialNo, BigDecimal totalFee, BigDecimal refundFee) throws Exception {
/**
* 订单退款
* @param paySerialNo 第三方支付流水
* @param outRefundNo 退款订单号
* @param subMchId 商户号
* @param totalFee 交易总金额
* @param refundFee 退款金额
* @return
* @throws Exception
*/
public static OrderRefundModel orderToRefund(String paySerialNo, String outRefundNo, String subMchId, BigDecimal totalFee, BigDecimal refundFee) throws Exception {
Map<String,String> param = new HashMap<>();
param.put("appid", "wx637bd6f7314daa46");
param.put("mch_id", "1289663601");
param.put("sub_mch_id" , "1624126902");
param.put("sub_mch_id" , subMchId);
param.put("nonce_str", WxUtils.makeNonStr());
param.put("transaction_id", paySerialNo);
param.put("out_refund_no", "HFR" + new Date().getTime());
param.put("out_refund_no", outRefundNo);
param.put("total_fee", String.valueOf(totalFee.multiply(new BigDecimal("100")).intValue()));
param.put("refund_fee", String.valueOf(refundFee.multiply(new BigDecimal("100")).intValue()));
param.put("sign_type", "HMAC-SHA256");
@ -78,23 +86,175 @@ public class WxOrderConfig {
return XmlUtil.getObjectFromXML(resultXmL, OrderRefundModel.class);
}
public static OrderRefundModel orderToRefund(String paySerialNo,BigDecimal totalFee, String subMchId , BigDecimal refundFee) throws Exception {
Map<String,String> param = new HashMap<>();
param.put("appid", "wx637bd6f7314daa46");
param.put("mch_id", "1289663601");
param.put("sub_mch_id" , subMchId);
param.put("nonce_str", WxUtils.makeNonStr());
param.put("transaction_id", paySerialNo);
param.put("out_refund_no", "HFR"+new Date().getTime());
param.put("total_fee", String.valueOf(totalFee.multiply(new BigDecimal("100")).intValue()));
param.put("refund_fee", String.valueOf(refundFee.multiply(new BigDecimal("100")).intValue()));
param.put("sign_type", "HMAC-SHA256");
String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256);
param.put("sign", signStr);
String resultXmL = doSSLRequest(param.get("mch_id"), "https://api.mch.weixin.qq.com/secapi/pay/refund", WxUtils.mapToXml(param));
return XmlUtil.getObjectFromXML(resultXmL, OrderRefundModel.class);
/**
* 微信创建分账
* @param appId
* @param subMchId
* @param transactionId 第三方交易订单号
* @param outOrderNo 交易订单号
*/
public static TreeMap<String,String> createProfitsharing(String appId,
String subMchId,
String transactionId,
String outOrderNo,
List<Map<String,Object>> receiversList) {
try {
Map<String,String> param = new LinkedHashMap<>();
param.put("appid", appId);
param.put("mch_id", "1289663601");
param.put("sub_mch_id" , subMchId);
param.put("transaction_id" , transactionId);
param.put("out_order_no" , outOrderNo);
param.put("nonce_str" , WxUtils.makeNonStr());
/* List<Map<String,Object>> receiversList = new ArrayList<>();
Map<String,Object> receiversMap = new LinkedHashMap<>();
receiversMap.put("type", "MERCHANT_ID");
receiversMap.put("account", receiversAccount);
receiversMap.put("amount", amount.multiply(new BigDecimal("100")).intValue());
receiversMap.put("description", "分给商户:" + receiversAccountName);
receiversList.add(receiversMap);*/
param.put("receivers" , JSONObject.toJSONString(receiversList));
String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256);
param.put("sign" , signStr);
// 请求分账返回的结果
String resultXmL = wechatRequest("https://api.mch.weixin.qq.com/secapi/pay/profitsharing", param.get("mch_id"), WxUtils.mapToXml(param));
return XmlUtil.parseXmlToTreeMap(resultXmL, "utf-8");
} catch (Exception e) {
log.error("CmsContentController --> getCorporateAdvertising() error!", e);
}
return null;
}
/* *//**
* 微信回退分账
* @param appId
* @param subMchId
* @param transactionId 第三方交易订单号
* @param outOrderNo 交易订单号
*//*
public static TreeMap<String,String> returnProfitsharing(String subMchId,
String profitsharingOrderNo,
String return_mchid,
String amount,
String description) {
try {
Map<String,String> param = new LinkedHashMap<>();
param.put("sub_mchid" , subMchId);
param.put("transaction_id" , transactionId);
param.put("out_order_no" , outOrderNo);
param.put("nonce_str" , WxUtils.makeNonStr());
*//* List<Map<String,Object>> receiversList = new ArrayList<>();
Map<String,Object> receiversMap = new LinkedHashMap<>();
receiversMap.put("type", "MERCHANT_ID");
receiversMap.put("account", receiversAccount);
receiversMap.put("amount", amount.multiply(new BigDecimal("100")).intValue());
receiversMap.put("description", "分给商户:" + receiversAccountName);
receiversList.add(receiversMap);*//*
String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256);
param.put("sign" , signStr);
// 请求分账返回的结果
String resultXmL = wechatRequest("https://api.mch.weixin.qq.com/v3/profitsharing/return-orders", param.get("mch_id"), WxUtils.mapToXml(param));
return XmlUtil.parseXmlToTreeMap(resultXmL, "utf-8");
} catch (Exception e) {
log.error("CmsContentController --> getCorporateAdvertising() error!", e);
}
return null;
}*/
/**
* 微信完结分账
* @param appId
* @param subMchId
* @param transactionId 第三方交易订单号
* @param profitSharingOrderNo 分账订单号
* @param description 交易订单号
*/
public static TreeMap<String,String> profitSharingFinish(String appId,
String subMchId,
String transactionId,
String profitSharingOrderNo,
String description) {
try {
Map<String,String> param = new LinkedHashMap<>();
param.put("appid", appId);
param.put("mch_id", "1289663601");
param.put("sub_mch_id", subMchId);
param.put("transaction_id" , transactionId);
param.put("out_order_no" , profitSharingOrderNo);
param.put("description" , description);
param.put("nonce_str" , WxUtils.makeNonStr());
String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5" , WXPayConstants.SignType.HMACSHA256);
param.put("sign" , signStr);
// 请求分账返回的结果
String resultXmL = wechatRequest("https://api.mch.weixin.qq.com/secapi/pay/profitsharingfinish", "1289663601", WxUtils.mapToXml(param));
return XmlUtil.parseXmlToTreeMap(resultXmL, "utf-8");
} catch (Exception e) {
log.error("CmsContentController --> getCorporateAdvertising() error!", e);
}
return null;
}
/**
* 微信请求
* @param mchId
* @param data
* @return
* @throws Exception
*/
public static String wechatRequest(String url,String mchId, String data) throws Exception {
/**
* 注意PKCS12证书 是从微信商户平台-账户设置- API安全 中下载的
*/
KeyStore keyStore = KeyStore.getInstance("PKCS12");
//P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径
FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12");
try {
keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID
} finally {
instream.close();
}
SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier());
//小程序退款需要调用双向证书的认证
CloseableHttpClient httpClient = HttpClients.custom().setSSLSocketFactory(sslsf).build();
try {
HttpPost httpost = new HttpPost(url); // 设置响应头信息
httpost.addHeader("Connection", "keep-alive");
httpost.addHeader("Accept", "*/*");
httpost.addHeader("Content-Type", "text/xml");
httpost.addHeader("Host", "api.mch.weixin.qq.com");
httpost.addHeader("X-Requested-With", "XMLHttpRequest");
httpost.addHeader("Cache-Control", "max-age=0");
httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) ");
httpost.setEntity(new StringEntity(data, "UTF-8"));
CloseableHttpResponse response = httpClient.execute(httpost);
try {
HttpEntity entity = response.getEntity();
String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8");
EntityUtils.consume(entity);
return jsonStr;
} finally {
response.close();
}
} catch (Exception e){
throw new RuntimeException(e);
} finally {
httpClient.close();
}
}
private static String doSSLRequest(String mchId, String url, String data) throws Exception {
//双向证书的认证

@ -86,6 +86,12 @@ public class CommonSysConfig {
*/
private String lkl_micro_pay_ret_url;
/**
* 微信支付回调
*/
private String wechat_pay_notify_url;
/**
* 文件存放地址 不可访问
*/

@ -25,7 +25,6 @@ public class MqttProviderCallBack implements MqttCallback {
*/
@Override
public void messageArrived(String s, MqttMessage mqttMessage) throws Exception {
}
/**
@ -34,6 +33,5 @@ public class MqttProviderCallBack implements MqttCallback {
*/
@Override
public void deliveryComplete(IMqttDeliveryToken iMqttDeliveryToken) {
}
}

@ -47,19 +47,20 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"qr_code_id, qr_code_sn, ",
"platform_type, platform_mer_no, ",
"platform_trade_no, platform_log_no, ",
"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_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`, pay_time, ",
"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_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)",
@ -71,19 +72,20 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ",
"#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ",
"#{platformTradeNo,jdbcType=VARCHAR}, #{platformLogNo,jdbcType=VARCHAR}, ",
"#{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}, ",
"#{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}, ",
"#{accMdiscountAmount,jdbcType=DECIMAL}, #{accDiscountAmount,jdbcType=DECIMAL}, ",
"#{accPaymentCode,jdbcType=VARCHAR}, #{cardType,jdbcType=VARCHAR}, ",
"#{status,jdbcType=INTEGER}, #{payTime,jdbcType=TIMESTAMP}, ",
"#{platformAppid,jdbcType=VARCHAR}, #{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}, #{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}, #{accMdiscountAmount,jdbcType=DECIMAL}, ",
"#{accDiscountAmount,jdbcType=DECIMAL}, #{accPaymentCode,jdbcType=VARCHAR}, ",
"#{cardType,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{profitSharingStatus,jdbcType=BIT}, #{payTime,jdbcType=TIMESTAMP}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
@ -115,6 +117,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@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="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),
@ -140,6 +143,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR),
@Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@ -154,13 +158,14 @@ 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, 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_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`, ",
"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, 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_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",
"from bs_trade_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -183,6 +188,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@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="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),
@ -208,6 +214,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
@Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR),
@Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@ -246,6 +253,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"platform_mer_no = #{platformMerNo,jdbcType=VARCHAR},",
"platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},",
"platform_log_no = #{platformLogNo,jdbcType=VARCHAR},",
"platform_appid = #{platformAppid,jdbcType=VARCHAR},",
"pay_user_id = #{payUserId,jdbcType=VARCHAR},",
"pay_mode = #{payMode,jdbcType=VARCHAR},",
"out_trade_no = #{outTradeNo,jdbcType=VARCHAR},",
@ -271,6 +279,7 @@ public interface BsTradeOrderMapper extends BsTradeOrderMapperExt {
"acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR},",
"card_type = #{cardType,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"profit_sharing_status = #{profitSharingStatus,jdbcType=BIT},",
"pay_time = #{payTime,jdbcType=TIMESTAMP},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"cancel_time = #{cancelTime,jdbcType=TIMESTAMP},",

@ -0,0 +1,151 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingExample;
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 BsTradeOrderProfitSharingMapper extends BsTradeOrderProfitSharingMapperExt {
@SelectProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="countByExample")
long countByExample(BsTradeOrderProfitSharingExample example);
@DeleteProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="deleteByExample")
int deleteByExample(BsTradeOrderProfitSharingExample example);
@Delete({
"delete from bs_trade_order_profit_sharing",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_trade_order_profit_sharing (trade_order_id, trade_order_no, ",
"profit_sharing_order_no, platform_type, ",
"platform_profit_sharing_order_no, platform_mer_no, ",
"platform_trade_no, platform_appid, ",
"ratio, profit_sharing_amoun, ",
"`status`, create_time, ",
"profit_sharing_time, finish_time, ",
"ext_1, ext_2, ext_3)",
"values (#{tradeOrderId,jdbcType=BIGINT}, #{tradeOrderNo,jdbcType=VARCHAR}, ",
"#{profitSharingOrderNo,jdbcType=VARCHAR}, #{platformType,jdbcType=INTEGER}, ",
"#{platformProfitSharingOrderNo,jdbcType=VARCHAR}, #{platformMerNo,jdbcType=VARCHAR}, ",
"#{platformTradeNo,jdbcType=VARCHAR}, #{platformAppid,jdbcType=VARCHAR}, ",
"#{ratio,jdbcType=DECIMAL}, #{profitSharingAmoun,jdbcType=DECIMAL}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{profitSharingTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsTradeOrderProfitSharing record);
@InsertProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsTradeOrderProfitSharing record);
@SelectProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="trade_order_id", property="tradeOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_no", property="tradeOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_order_no", property="profitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_profit_sharing_order_no", property="platformProfitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_appid", property="platformAppid", jdbcType=JdbcType.VARCHAR),
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL),
@Result(column="profit_sharing_amoun", property="profitSharingAmoun", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", 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<BsTradeOrderProfitSharing> selectByExample(BsTradeOrderProfitSharingExample example);
@Select({
"select",
"id, trade_order_id, trade_order_no, profit_sharing_order_no, platform_type, ",
"platform_profit_sharing_order_no, platform_mer_no, platform_trade_no, platform_appid, ",
"ratio, profit_sharing_amoun, `status`, create_time, profit_sharing_time, finish_time, ",
"ext_1, ext_2, ext_3",
"from bs_trade_order_profit_sharing",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="trade_order_id", property="tradeOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_no", property="tradeOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_order_no", property="profitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_profit_sharing_order_no", property="platformProfitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_appid", property="platformAppid", jdbcType=JdbcType.VARCHAR),
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL),
@Result(column="profit_sharing_amoun", property="profitSharingAmoun", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", 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)
})
BsTradeOrderProfitSharing selectByPrimaryKey(Long id);
@UpdateProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsTradeOrderProfitSharing record, @Param("example") BsTradeOrderProfitSharingExample example);
@UpdateProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsTradeOrderProfitSharing record, @Param("example") BsTradeOrderProfitSharingExample example);
@UpdateProvider(type=BsTradeOrderProfitSharingSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsTradeOrderProfitSharing record);
@Update({
"update bs_trade_order_profit_sharing",
"set trade_order_id = #{tradeOrderId,jdbcType=BIGINT},",
"trade_order_no = #{tradeOrderNo,jdbcType=VARCHAR},",
"profit_sharing_order_no = #{profitSharingOrderNo,jdbcType=VARCHAR},",
"platform_type = #{platformType,jdbcType=INTEGER},",
"platform_profit_sharing_order_no = #{platformProfitSharingOrderNo,jdbcType=VARCHAR},",
"platform_mer_no = #{platformMerNo,jdbcType=VARCHAR},",
"platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},",
"platform_appid = #{platformAppid,jdbcType=VARCHAR},",
"ratio = #{ratio,jdbcType=DECIMAL},",
"profit_sharing_amoun = #{profitSharingAmoun,jdbcType=DECIMAL},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"profit_sharing_time = #{profitSharingTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsTradeOrderProfitSharing record);
}

@ -0,0 +1,68 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.type.JdbcType;
import java.util.List;
/**
* mapper扩展类
*/
public interface BsTradeOrderProfitSharingMapperExt {
@Select({" SELECT a.* FROM bs_trade_order_profit_sharing a " +
" LEFT JOIN bs_trade_order b on b.id = a.trade_order_id " +
" where b.`status` = 3 and a.`status` = 0 " +
" and a.create_time <= DATE_SUB(NOW(), INTERVAL 5 MINUTE) "})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="trade_order_id", property="tradeOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_no", property="tradeOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_order_no", property="profitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_profit_sharing_order_no", property="platformProfitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_appid", property="platformAppid", jdbcType=JdbcType.VARCHAR),
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL),
@Result(column="profit_sharing_amoun", property="profitSharingAmoun", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", 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<BsTradeOrderProfitSharing> getNeedProfitSharingOrder();
@Select({" SELECT a.* FROM bs_trade_order_profit_sharing a " +
" LEFT JOIN bs_trade_order b on b.id = a.trade_order_id " +
" where b.`status` = 3 and a.`status` = 1 " +
" and a.profit_sharing_time <= DATE_SUB(NOW(), INTERVAL 2 MINUTE) "})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="trade_order_id", property="tradeOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_no", property="tradeOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_order_no", property="profitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER),
@Result(column="platform_profit_sharing_order_no", property="platformProfitSharingOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR),
@Result(column="platform_appid", property="platformAppid", jdbcType=JdbcType.VARCHAR),
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL),
@Result(column="profit_sharing_amoun", property="profitSharingAmoun", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", 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<BsTradeOrderProfitSharing> getNeedFinishProfitSharingOrder();
}

@ -0,0 +1,151 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiverExample;
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 BsTradeOrderProfitSharingReceiverMapper extends BsTradeOrderProfitSharingReceiverMapperExt {
@SelectProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="countByExample")
long countByExample(BsTradeOrderProfitSharingReceiverExample example);
@DeleteProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="deleteByExample")
int deleteByExample(BsTradeOrderProfitSharingReceiverExample example);
@Delete({
"delete from bs_trade_order_profit_sharing_receiver",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_trade_order_profit_sharing_receiver (trade_order_profit_sharing_id, trade_order_id, ",
"trade_order_no, profit_sharing_amount, ",
"ratio, receiver_object_type, ",
"receiver_object_id, receiver_account, ",
"receiver_name, receiver_amount, ",
"`status`, create_time, ",
"profit_sharing_time, finish_time, ",
"ext_1, ext_2, ext_3)",
"values (#{tradeOrderProfitSharingId,jdbcType=BIGINT}, #{tradeOrderId,jdbcType=BIGINT}, ",
"#{tradeOrderNo,jdbcType=VARCHAR}, #{profitSharingAmount,jdbcType=DECIMAL}, ",
"#{ratio,jdbcType=DECIMAL}, #{receiverObjectType,jdbcType=INTEGER}, ",
"#{receiverObjectId,jdbcType=VARCHAR}, #{receiverAccount,jdbcType=VARCHAR}, ",
"#{receiverName,jdbcType=VARCHAR}, #{receiverAmount,jdbcType=DECIMAL}, ",
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{profitSharingTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsTradeOrderProfitSharingReceiver record);
@InsertProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsTradeOrderProfitSharingReceiver record);
@SelectProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="trade_order_profit_sharing_id", property="tradeOrderProfitSharingId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_id", property="tradeOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_no", property="tradeOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_amount", property="profitSharingAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL),
@Result(column="receiver_object_type", property="receiverObjectType", jdbcType=JdbcType.INTEGER),
@Result(column="receiver_object_id", property="receiverObjectId", jdbcType=JdbcType.VARCHAR),
@Result(column="receiver_account", property="receiverAccount", jdbcType=JdbcType.VARCHAR),
@Result(column="receiver_name", property="receiverName", jdbcType=JdbcType.VARCHAR),
@Result(column="receiver_amount", property="receiverAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", 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<BsTradeOrderProfitSharingReceiver> selectByExample(BsTradeOrderProfitSharingReceiverExample example);
@Select({
"select",
"id, trade_order_profit_sharing_id, trade_order_id, trade_order_no, profit_sharing_amount, ",
"ratio, receiver_object_type, receiver_object_id, receiver_account, receiver_name, ",
"receiver_amount, `status`, create_time, profit_sharing_time, finish_time, ext_1, ",
"ext_2, ext_3",
"from bs_trade_order_profit_sharing_receiver",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="trade_order_profit_sharing_id", property="tradeOrderProfitSharingId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_id", property="tradeOrderId", jdbcType=JdbcType.BIGINT),
@Result(column="trade_order_no", property="tradeOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_amount", property="profitSharingAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL),
@Result(column="receiver_object_type", property="receiverObjectType", jdbcType=JdbcType.INTEGER),
@Result(column="receiver_object_id", property="receiverObjectId", jdbcType=JdbcType.VARCHAR),
@Result(column="receiver_account", property="receiverAccount", jdbcType=JdbcType.VARCHAR),
@Result(column="receiver_name", property="receiverName", jdbcType=JdbcType.VARCHAR),
@Result(column="receiver_amount", property="receiverAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", 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)
})
BsTradeOrderProfitSharingReceiver selectByPrimaryKey(Long id);
@UpdateProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsTradeOrderProfitSharingReceiver record, @Param("example") BsTradeOrderProfitSharingReceiverExample example);
@UpdateProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsTradeOrderProfitSharingReceiver record, @Param("example") BsTradeOrderProfitSharingReceiverExample example);
@UpdateProvider(type=BsTradeOrderProfitSharingReceiverSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsTradeOrderProfitSharingReceiver record);
@Update({
"update bs_trade_order_profit_sharing_receiver",
"set trade_order_profit_sharing_id = #{tradeOrderProfitSharingId,jdbcType=BIGINT},",
"trade_order_id = #{tradeOrderId,jdbcType=BIGINT},",
"trade_order_no = #{tradeOrderNo,jdbcType=VARCHAR},",
"profit_sharing_amount = #{profitSharingAmount,jdbcType=DECIMAL},",
"ratio = #{ratio,jdbcType=DECIMAL},",
"receiver_object_type = #{receiverObjectType,jdbcType=INTEGER},",
"receiver_object_id = #{receiverObjectId,jdbcType=VARCHAR},",
"receiver_account = #{receiverAccount,jdbcType=VARCHAR},",
"receiver_name = #{receiverName,jdbcType=VARCHAR},",
"receiver_amount = #{receiverAmount,jdbcType=DECIMAL},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"profit_sharing_time = #{profitSharingTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsTradeOrderProfitSharingReceiver record);
}

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

@ -0,0 +1,416 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiverExample.Criteria;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiverExample.Criterion;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiverExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsTradeOrderProfitSharingReceiverSqlProvider {
public String countByExample(BsTradeOrderProfitSharingReceiverExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_trade_order_profit_sharing_receiver");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsTradeOrderProfitSharingReceiverExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_trade_order_profit_sharing_receiver");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsTradeOrderProfitSharingReceiver record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_trade_order_profit_sharing_receiver");
if (record.getTradeOrderProfitSharingId() != null) {
sql.VALUES("trade_order_profit_sharing_id", "#{tradeOrderProfitSharingId,jdbcType=BIGINT}");
}
if (record.getTradeOrderId() != null) {
sql.VALUES("trade_order_id", "#{tradeOrderId,jdbcType=BIGINT}");
}
if (record.getTradeOrderNo() != null) {
sql.VALUES("trade_order_no", "#{tradeOrderNo,jdbcType=VARCHAR}");
}
if (record.getProfitSharingAmount() != null) {
sql.VALUES("profit_sharing_amount", "#{profitSharingAmount,jdbcType=DECIMAL}");
}
if (record.getRatio() != null) {
sql.VALUES("ratio", "#{ratio,jdbcType=DECIMAL}");
}
if (record.getReceiverObjectType() != null) {
sql.VALUES("receiver_object_type", "#{receiverObjectType,jdbcType=INTEGER}");
}
if (record.getReceiverObjectId() != null) {
sql.VALUES("receiver_object_id", "#{receiverObjectId,jdbcType=VARCHAR}");
}
if (record.getReceiverAccount() != null) {
sql.VALUES("receiver_account", "#{receiverAccount,jdbcType=VARCHAR}");
}
if (record.getReceiverName() != null) {
sql.VALUES("receiver_name", "#{receiverName,jdbcType=VARCHAR}");
}
if (record.getReceiverAmount() != null) {
sql.VALUES("receiver_amount", "#{receiverAmount,jdbcType=DECIMAL}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getProfitSharingTime() != null) {
sql.VALUES("profit_sharing_time", "#{profitSharingTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.VALUES("finish_time", "#{finishTime,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(BsTradeOrderProfitSharingReceiverExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("trade_order_profit_sharing_id");
sql.SELECT("trade_order_id");
sql.SELECT("trade_order_no");
sql.SELECT("profit_sharing_amount");
sql.SELECT("ratio");
sql.SELECT("receiver_object_type");
sql.SELECT("receiver_object_id");
sql.SELECT("receiver_account");
sql.SELECT("receiver_name");
sql.SELECT("receiver_amount");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("profit_sharing_time");
sql.SELECT("finish_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_trade_order_profit_sharing_receiver");
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) {
BsTradeOrderProfitSharingReceiver record = (BsTradeOrderProfitSharingReceiver) parameter.get("record");
BsTradeOrderProfitSharingReceiverExample example = (BsTradeOrderProfitSharingReceiverExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_trade_order_profit_sharing_receiver");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getTradeOrderProfitSharingId() != null) {
sql.SET("trade_order_profit_sharing_id = #{record.tradeOrderProfitSharingId,jdbcType=BIGINT}");
}
if (record.getTradeOrderId() != null) {
sql.SET("trade_order_id = #{record.tradeOrderId,jdbcType=BIGINT}");
}
if (record.getTradeOrderNo() != null) {
sql.SET("trade_order_no = #{record.tradeOrderNo,jdbcType=VARCHAR}");
}
if (record.getProfitSharingAmount() != null) {
sql.SET("profit_sharing_amount = #{record.profitSharingAmount,jdbcType=DECIMAL}");
}
if (record.getRatio() != null) {
sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}");
}
if (record.getReceiverObjectType() != null) {
sql.SET("receiver_object_type = #{record.receiverObjectType,jdbcType=INTEGER}");
}
if (record.getReceiverObjectId() != null) {
sql.SET("receiver_object_id = #{record.receiverObjectId,jdbcType=VARCHAR}");
}
if (record.getReceiverAccount() != null) {
sql.SET("receiver_account = #{record.receiverAccount,jdbcType=VARCHAR}");
}
if (record.getReceiverName() != null) {
sql.SET("receiver_name = #{record.receiverName,jdbcType=VARCHAR}");
}
if (record.getReceiverAmount() != null) {
sql.SET("receiver_amount = #{record.receiverAmount,jdbcType=DECIMAL}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getProfitSharingTime() != null) {
sql.SET("profit_sharing_time = #{record.profitSharingTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{record.finishTime,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_trade_order_profit_sharing_receiver");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("trade_order_profit_sharing_id = #{record.tradeOrderProfitSharingId,jdbcType=BIGINT}");
sql.SET("trade_order_id = #{record.tradeOrderId,jdbcType=BIGINT}");
sql.SET("trade_order_no = #{record.tradeOrderNo,jdbcType=VARCHAR}");
sql.SET("profit_sharing_amount = #{record.profitSharingAmount,jdbcType=DECIMAL}");
sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}");
sql.SET("receiver_object_type = #{record.receiverObjectType,jdbcType=INTEGER}");
sql.SET("receiver_object_id = #{record.receiverObjectId,jdbcType=VARCHAR}");
sql.SET("receiver_account = #{record.receiverAccount,jdbcType=VARCHAR}");
sql.SET("receiver_name = #{record.receiverName,jdbcType=VARCHAR}");
sql.SET("receiver_amount = #{record.receiverAmount,jdbcType=DECIMAL}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("profit_sharing_time = #{record.profitSharingTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,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}");
BsTradeOrderProfitSharingReceiverExample example = (BsTradeOrderProfitSharingReceiverExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsTradeOrderProfitSharingReceiver record) {
SQL sql = new SQL();
sql.UPDATE("bs_trade_order_profit_sharing_receiver");
if (record.getTradeOrderProfitSharingId() != null) {
sql.SET("trade_order_profit_sharing_id = #{tradeOrderProfitSharingId,jdbcType=BIGINT}");
}
if (record.getTradeOrderId() != null) {
sql.SET("trade_order_id = #{tradeOrderId,jdbcType=BIGINT}");
}
if (record.getTradeOrderNo() != null) {
sql.SET("trade_order_no = #{tradeOrderNo,jdbcType=VARCHAR}");
}
if (record.getProfitSharingAmount() != null) {
sql.SET("profit_sharing_amount = #{profitSharingAmount,jdbcType=DECIMAL}");
}
if (record.getRatio() != null) {
sql.SET("ratio = #{ratio,jdbcType=DECIMAL}");
}
if (record.getReceiverObjectType() != null) {
sql.SET("receiver_object_type = #{receiverObjectType,jdbcType=INTEGER}");
}
if (record.getReceiverObjectId() != null) {
sql.SET("receiver_object_id = #{receiverObjectId,jdbcType=VARCHAR}");
}
if (record.getReceiverAccount() != null) {
sql.SET("receiver_account = #{receiverAccount,jdbcType=VARCHAR}");
}
if (record.getReceiverName() != null) {
sql.SET("receiver_name = #{receiverName,jdbcType=VARCHAR}");
}
if (record.getReceiverAmount() != null) {
sql.SET("receiver_amount = #{receiverAmount,jdbcType=DECIMAL}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getProfitSharingTime() != null) {
sql.SET("profit_sharing_time = #{profitSharingTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,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, BsTradeOrderProfitSharingReceiverExample 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());
}
}
}

@ -0,0 +1,416 @@
package com.hfkj.dao;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingExample.Criteria;
import com.hfkj.entity.BsTradeOrderProfitSharingExample.Criterion;
import com.hfkj.entity.BsTradeOrderProfitSharingExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsTradeOrderProfitSharingSqlProvider {
public String countByExample(BsTradeOrderProfitSharingExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_trade_order_profit_sharing");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsTradeOrderProfitSharingExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_trade_order_profit_sharing");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsTradeOrderProfitSharing record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_trade_order_profit_sharing");
if (record.getTradeOrderId() != null) {
sql.VALUES("trade_order_id", "#{tradeOrderId,jdbcType=BIGINT}");
}
if (record.getTradeOrderNo() != null) {
sql.VALUES("trade_order_no", "#{tradeOrderNo,jdbcType=VARCHAR}");
}
if (record.getProfitSharingOrderNo() != null) {
sql.VALUES("profit_sharing_order_no", "#{profitSharingOrderNo,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformProfitSharingOrderNo() != null) {
sql.VALUES("platform_profit_sharing_order_no", "#{platformProfitSharingOrderNo,jdbcType=VARCHAR}");
}
if (record.getPlatformMerNo() != null) {
sql.VALUES("platform_mer_no", "#{platformMerNo,jdbcType=VARCHAR}");
}
if (record.getPlatformTradeNo() != null) {
sql.VALUES("platform_trade_no", "#{platformTradeNo,jdbcType=VARCHAR}");
}
if (record.getPlatformAppid() != null) {
sql.VALUES("platform_appid", "#{platformAppid,jdbcType=VARCHAR}");
}
if (record.getRatio() != null) {
sql.VALUES("ratio", "#{ratio,jdbcType=DECIMAL}");
}
if (record.getProfitSharingAmoun() != null) {
sql.VALUES("profit_sharing_amoun", "#{profitSharingAmoun,jdbcType=DECIMAL}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getProfitSharingTime() != null) {
sql.VALUES("profit_sharing_time", "#{profitSharingTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.VALUES("finish_time", "#{finishTime,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(BsTradeOrderProfitSharingExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("trade_order_id");
sql.SELECT("trade_order_no");
sql.SELECT("profit_sharing_order_no");
sql.SELECT("platform_type");
sql.SELECT("platform_profit_sharing_order_no");
sql.SELECT("platform_mer_no");
sql.SELECT("platform_trade_no");
sql.SELECT("platform_appid");
sql.SELECT("ratio");
sql.SELECT("profit_sharing_amoun");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("profit_sharing_time");
sql.SELECT("finish_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_trade_order_profit_sharing");
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) {
BsTradeOrderProfitSharing record = (BsTradeOrderProfitSharing) parameter.get("record");
BsTradeOrderProfitSharingExample example = (BsTradeOrderProfitSharingExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_trade_order_profit_sharing");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getTradeOrderId() != null) {
sql.SET("trade_order_id = #{record.tradeOrderId,jdbcType=BIGINT}");
}
if (record.getTradeOrderNo() != null) {
sql.SET("trade_order_no = #{record.tradeOrderNo,jdbcType=VARCHAR}");
}
if (record.getProfitSharingOrderNo() != null) {
sql.SET("profit_sharing_order_no = #{record.profitSharingOrderNo,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
}
if (record.getPlatformProfitSharingOrderNo() != null) {
sql.SET("platform_profit_sharing_order_no = #{record.platformProfitSharingOrderNo,jdbcType=VARCHAR}");
}
if (record.getPlatformMerNo() != null) {
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}");
}
if (record.getPlatformTradeNo() != null) {
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}");
}
if (record.getPlatformAppid() != null) {
sql.SET("platform_appid = #{record.platformAppid,jdbcType=VARCHAR}");
}
if (record.getRatio() != null) {
sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}");
}
if (record.getProfitSharingAmoun() != null) {
sql.SET("profit_sharing_amoun = #{record.profitSharingAmoun,jdbcType=DECIMAL}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getProfitSharingTime() != null) {
sql.SET("profit_sharing_time = #{record.profitSharingTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{record.finishTime,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_trade_order_profit_sharing");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("trade_order_id = #{record.tradeOrderId,jdbcType=BIGINT}");
sql.SET("trade_order_no = #{record.tradeOrderNo,jdbcType=VARCHAR}");
sql.SET("profit_sharing_order_no = #{record.profitSharingOrderNo,jdbcType=VARCHAR}");
sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}");
sql.SET("platform_profit_sharing_order_no = #{record.platformProfitSharingOrderNo,jdbcType=VARCHAR}");
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}");
sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}");
sql.SET("platform_appid = #{record.platformAppid,jdbcType=VARCHAR}");
sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}");
sql.SET("profit_sharing_amoun = #{record.profitSharingAmoun,jdbcType=DECIMAL}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("profit_sharing_time = #{record.profitSharingTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,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}");
BsTradeOrderProfitSharingExample example = (BsTradeOrderProfitSharingExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsTradeOrderProfitSharing record) {
SQL sql = new SQL();
sql.UPDATE("bs_trade_order_profit_sharing");
if (record.getTradeOrderId() != null) {
sql.SET("trade_order_id = #{tradeOrderId,jdbcType=BIGINT}");
}
if (record.getTradeOrderNo() != null) {
sql.SET("trade_order_no = #{tradeOrderNo,jdbcType=VARCHAR}");
}
if (record.getProfitSharingOrderNo() != null) {
sql.SET("profit_sharing_order_no = #{profitSharingOrderNo,jdbcType=VARCHAR}");
}
if (record.getPlatformType() != null) {
sql.SET("platform_type = #{platformType,jdbcType=INTEGER}");
}
if (record.getPlatformProfitSharingOrderNo() != null) {
sql.SET("platform_profit_sharing_order_no = #{platformProfitSharingOrderNo,jdbcType=VARCHAR}");
}
if (record.getPlatformMerNo() != null) {
sql.SET("platform_mer_no = #{platformMerNo,jdbcType=VARCHAR}");
}
if (record.getPlatformTradeNo() != null) {
sql.SET("platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR}");
}
if (record.getPlatformAppid() != null) {
sql.SET("platform_appid = #{platformAppid,jdbcType=VARCHAR}");
}
if (record.getRatio() != null) {
sql.SET("ratio = #{ratio,jdbcType=DECIMAL}");
}
if (record.getProfitSharingAmoun() != null) {
sql.SET("profit_sharing_amoun = #{profitSharingAmoun,jdbcType=DECIMAL}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getProfitSharingTime() != null) {
sql.SET("profit_sharing_time = #{profitSharingTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,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, BsTradeOrderProfitSharingExample 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());
}
}
}

@ -96,6 +96,10 @@ public class BsTradeOrderSqlProvider {
sql.VALUES("platform_log_no", "#{platformLogNo,jdbcType=VARCHAR}");
}
if (record.getPlatformAppid() != null) {
sql.VALUES("platform_appid", "#{platformAppid,jdbcType=VARCHAR}");
}
if (record.getPayUserId() != null) {
sql.VALUES("pay_user_id", "#{payUserId,jdbcType=VARCHAR}");
}
@ -196,6 +200,10 @@ public class BsTradeOrderSqlProvider {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getProfitSharingStatus() != null) {
sql.VALUES("profit_sharing_status", "#{profitSharingStatus,jdbcType=BIT}");
}
if (record.getPayTime() != null) {
sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}");
}
@ -251,6 +259,7 @@ public class BsTradeOrderSqlProvider {
sql.SELECT("platform_mer_no");
sql.SELECT("platform_trade_no");
sql.SELECT("platform_log_no");
sql.SELECT("platform_appid");
sql.SELECT("pay_user_id");
sql.SELECT("pay_mode");
sql.SELECT("out_trade_no");
@ -276,6 +285,7 @@ public class BsTradeOrderSqlProvider {
sql.SELECT("acc_payment_code");
sql.SELECT("card_type");
sql.SELECT("`status`");
sql.SELECT("profit_sharing_status");
sql.SELECT("pay_time");
sql.SELECT("create_time");
sql.SELECT("cancel_time");
@ -372,6 +382,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}");
}
if (record.getPlatformAppid() != null) {
sql.SET("platform_appid = #{record.platformAppid,jdbcType=VARCHAR}");
}
if (record.getPayUserId() != null) {
sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}");
}
@ -472,6 +486,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getProfitSharingStatus() != null) {
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
}
@ -526,6 +544,7 @@ public class BsTradeOrderSqlProvider {
sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}");
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("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}");
sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}");
sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}");
@ -551,6 +570,7 @@ public class BsTradeOrderSqlProvider {
sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}");
sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("profit_sharing_status = #{record.profitSharingStatus,jdbcType=BIT}");
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}");
@ -636,6 +656,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("platform_log_no = #{platformLogNo,jdbcType=VARCHAR}");
}
if (record.getPlatformAppid() != null) {
sql.SET("platform_appid = #{platformAppid,jdbcType=VARCHAR}");
}
if (record.getPayUserId() != null) {
sql.SET("pay_user_id = #{payUserId,jdbcType=VARCHAR}");
}
@ -736,6 +760,10 @@ public class BsTradeOrderSqlProvider {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getProfitSharingStatus() != null) {
sql.SET("profit_sharing_status = #{profitSharingStatus,jdbcType=BIT}");
}
if (record.getPayTime() != null) {
sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}");
}

@ -104,6 +104,11 @@ public class BsTradeOrder implements Serializable {
*/
private String platformLogNo;
/**
* 平台appid
*/
private String platformAppid;
/**
* 支付用户id
*/
@ -233,6 +238,11 @@ public class BsTradeOrder implements Serializable {
*/
private Integer status;
/**
* 是否分账 0 1
*/
private Boolean profitSharingStatus;
/**
* 支付时间
*/
@ -405,6 +415,14 @@ public class BsTradeOrder implements Serializable {
this.platformLogNo = platformLogNo;
}
public String getPlatformAppid() {
return platformAppid;
}
public void setPlatformAppid(String platformAppid) {
this.platformAppid = platformAppid;
}
public String getPayUserId() {
return payUserId;
}
@ -605,6 +623,14 @@ public class BsTradeOrder implements Serializable {
this.status = status;
}
public Boolean getProfitSharingStatus() {
return profitSharingStatus;
}
public void setProfitSharingStatus(Boolean profitSharingStatus) {
this.profitSharingStatus = profitSharingStatus;
}
public Date getPayTime() {
return payTime;
}
@ -691,6 +717,7 @@ public class BsTradeOrder implements Serializable {
&& (this.getPlatformMerNo() == null ? other.getPlatformMerNo() == null : this.getPlatformMerNo().equals(other.getPlatformMerNo()))
&& (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.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()))
@ -716,6 +743,7 @@ public class BsTradeOrder implements Serializable {
&& (this.getAccPaymentCode() == null ? other.getAccPaymentCode() == null : this.getAccPaymentCode().equals(other.getAccPaymentCode()))
&& (this.getCardType() == null ? other.getCardType() == null : this.getCardType().equals(other.getCardType()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getProfitSharingStatus() == null ? other.getProfitSharingStatus() == null : this.getProfitSharingStatus().equals(other.getProfitSharingStatus()))
&& (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
@ -747,6 +775,7 @@ public class BsTradeOrder implements Serializable {
result = prime * result + ((getPlatformMerNo() == null) ? 0 : getPlatformMerNo().hashCode());
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 + ((getPayUserId() == null) ? 0 : getPayUserId().hashCode());
result = prime * result + ((getPayMode() == null) ? 0 : getPayMode().hashCode());
result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode());
@ -772,6 +801,7 @@ public class BsTradeOrder implements Serializable {
result = prime * result + ((getAccPaymentCode() == null) ? 0 : getAccPaymentCode().hashCode());
result = prime * result + ((getCardType() == null) ? 0 : getCardType().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getProfitSharingStatus() == null) ? 0 : getProfitSharingStatus().hashCode());
result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode());
@ -806,6 +836,7 @@ public class BsTradeOrder implements Serializable {
sb.append(", platformMerNo=").append(platformMerNo);
sb.append(", platformTradeNo=").append(platformTradeNo);
sb.append(", platformLogNo=").append(platformLogNo);
sb.append(", platformAppid=").append(platformAppid);
sb.append(", payUserId=").append(payUserId);
sb.append(", payMode=").append(payMode);
sb.append(", outTradeNo=").append(outTradeNo);
@ -831,6 +862,7 @@ public class BsTradeOrder implements Serializable {
sb.append(", accPaymentCode=").append(accPaymentCode);
sb.append(", cardType=").append(cardType);
sb.append(", status=").append(status);
sb.append(", profitSharingStatus=").append(profitSharingStatus);
sb.append(", payTime=").append(payTime);
sb.append(", createTime=").append(createTime);
sb.append(", cancelTime=").append(cancelTime);

@ -1296,6 +1296,76 @@ public class BsTradeOrderExample {
return (Criteria) this;
}
public Criteria andPlatformAppidIsNull() {
addCriterion("platform_appid is null");
return (Criteria) this;
}
public Criteria andPlatformAppidIsNotNull() {
addCriterion("platform_appid is not null");
return (Criteria) this;
}
public Criteria andPlatformAppidEqualTo(String value) {
addCriterion("platform_appid =", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidNotEqualTo(String value) {
addCriterion("platform_appid <>", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidGreaterThan(String value) {
addCriterion("platform_appid >", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidGreaterThanOrEqualTo(String value) {
addCriterion("platform_appid >=", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidLessThan(String value) {
addCriterion("platform_appid <", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidLessThanOrEqualTo(String value) {
addCriterion("platform_appid <=", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidLike(String value) {
addCriterion("platform_appid like", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidNotLike(String value) {
addCriterion("platform_appid not like", value, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidIn(List<String> values) {
addCriterion("platform_appid in", values, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidNotIn(List<String> values) {
addCriterion("platform_appid not in", values, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidBetween(String value1, String value2) {
addCriterion("platform_appid between", value1, value2, "platformAppid");
return (Criteria) this;
}
public Criteria andPlatformAppidNotBetween(String value1, String value2) {
addCriterion("platform_appid not between", value1, value2, "platformAppid");
return (Criteria) this;
}
public Criteria andPayUserIdIsNull() {
addCriterion("pay_user_id is null");
return (Criteria) this;
@ -2886,6 +2956,66 @@ public class BsTradeOrderExample {
return (Criteria) this;
}
public Criteria andProfitSharingStatusIsNull() {
addCriterion("profit_sharing_status is null");
return (Criteria) this;
}
public Criteria andProfitSharingStatusIsNotNull() {
addCriterion("profit_sharing_status is not null");
return (Criteria) this;
}
public Criteria andProfitSharingStatusEqualTo(Boolean value) {
addCriterion("profit_sharing_status =", value, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusNotEqualTo(Boolean value) {
addCriterion("profit_sharing_status <>", value, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusGreaterThan(Boolean value) {
addCriterion("profit_sharing_status >", value, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusGreaterThanOrEqualTo(Boolean value) {
addCriterion("profit_sharing_status >=", value, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusLessThan(Boolean value) {
addCriterion("profit_sharing_status <", value, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusLessThanOrEqualTo(Boolean value) {
addCriterion("profit_sharing_status <=", value, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusIn(List<Boolean> values) {
addCriterion("profit_sharing_status in", values, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusNotIn(List<Boolean> values) {
addCriterion("profit_sharing_status not in", values, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusBetween(Boolean value1, Boolean value2) {
addCriterion("profit_sharing_status between", value1, value2, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andProfitSharingStatusNotBetween(Boolean value1, Boolean value2) {
addCriterion("profit_sharing_status not between", value1, value2, "profitSharingStatus");
return (Criteria) this;
}
public Criteria andPayTimeIsNull() {
addCriterion("pay_time is null");
return (Criteria) this;

@ -0,0 +1,329 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* bs_trade_order_profit_sharing
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsTradeOrderProfitSharing implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 交易id
*/
private Long tradeOrderId;
/**
* 交易订单号
*/
private String tradeOrderNo;
/**
* 分账单号
*/
private String profitSharingOrderNo;
/**
* 平台类型 1拉卡拉
*/
private Integer platformType;
/**
* 平台分账单号
*/
private String platformProfitSharingOrderNo;
/**
* 平台商户号
*/
private String platformMerNo;
/**
* 平台流水号
*/
private String platformTradeNo;
/**
* 平台appid
*/
private String platformAppid;
/**
* 分账比例 单位%
*/
private BigDecimal ratio;
/**
* 分账金额
*/
private BigDecimal profitSharingAmoun;
/**
* 分账状态 0未分账 1已分账 2已完成
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 分账时间
*/
private Date profitSharingTime;
/**
* 完成时间
*/
private Date finishTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTradeOrderId() {
return tradeOrderId;
}
public void setTradeOrderId(Long tradeOrderId) {
this.tradeOrderId = tradeOrderId;
}
public String getTradeOrderNo() {
return tradeOrderNo;
}
public void setTradeOrderNo(String tradeOrderNo) {
this.tradeOrderNo = tradeOrderNo;
}
public String getProfitSharingOrderNo() {
return profitSharingOrderNo;
}
public void setProfitSharingOrderNo(String profitSharingOrderNo) {
this.profitSharingOrderNo = profitSharingOrderNo;
}
public Integer getPlatformType() {
return platformType;
}
public void setPlatformType(Integer platformType) {
this.platformType = platformType;
}
public String getPlatformProfitSharingOrderNo() {
return platformProfitSharingOrderNo;
}
public void setPlatformProfitSharingOrderNo(String platformProfitSharingOrderNo) {
this.platformProfitSharingOrderNo = platformProfitSharingOrderNo;
}
public String getPlatformMerNo() {
return platformMerNo;
}
public void setPlatformMerNo(String platformMerNo) {
this.platformMerNo = platformMerNo;
}
public String getPlatformTradeNo() {
return platformTradeNo;
}
public void setPlatformTradeNo(String platformTradeNo) {
this.platformTradeNo = platformTradeNo;
}
public String getPlatformAppid() {
return platformAppid;
}
public void setPlatformAppid(String platformAppid) {
this.platformAppid = platformAppid;
}
public BigDecimal getRatio() {
return ratio;
}
public void setRatio(BigDecimal ratio) {
this.ratio = ratio;
}
public BigDecimal getProfitSharingAmoun() {
return profitSharingAmoun;
}
public void setProfitSharingAmoun(BigDecimal profitSharingAmoun) {
this.profitSharingAmoun = profitSharingAmoun;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getProfitSharingTime() {
return profitSharingTime;
}
public void setProfitSharingTime(Date profitSharingTime) {
this.profitSharingTime = profitSharingTime;
}
public Date getFinishTime() {
return finishTime;
}
public void setFinishTime(Date finishTime) {
this.finishTime = finishTime;
}
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;
}
BsTradeOrderProfitSharing other = (BsTradeOrderProfitSharing) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTradeOrderId() == null ? other.getTradeOrderId() == null : this.getTradeOrderId().equals(other.getTradeOrderId()))
&& (this.getTradeOrderNo() == null ? other.getTradeOrderNo() == null : this.getTradeOrderNo().equals(other.getTradeOrderNo()))
&& (this.getProfitSharingOrderNo() == null ? other.getProfitSharingOrderNo() == null : this.getProfitSharingOrderNo().equals(other.getProfitSharingOrderNo()))
&& (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType()))
&& (this.getPlatformProfitSharingOrderNo() == null ? other.getPlatformProfitSharingOrderNo() == null : this.getPlatformProfitSharingOrderNo().equals(other.getPlatformProfitSharingOrderNo()))
&& (this.getPlatformMerNo() == null ? other.getPlatformMerNo() == null : this.getPlatformMerNo().equals(other.getPlatformMerNo()))
&& (this.getPlatformTradeNo() == null ? other.getPlatformTradeNo() == null : this.getPlatformTradeNo().equals(other.getPlatformTradeNo()))
&& (this.getPlatformAppid() == null ? other.getPlatformAppid() == null : this.getPlatformAppid().equals(other.getPlatformAppid()))
&& (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio()))
&& (this.getProfitSharingAmoun() == null ? other.getProfitSharingAmoun() == null : this.getProfitSharingAmoun().equals(other.getProfitSharingAmoun()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getProfitSharingTime() == null ? other.getProfitSharingTime() == null : this.getProfitSharingTime().equals(other.getProfitSharingTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (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 + ((getTradeOrderId() == null) ? 0 : getTradeOrderId().hashCode());
result = prime * result + ((getTradeOrderNo() == null) ? 0 : getTradeOrderNo().hashCode());
result = prime * result + ((getProfitSharingOrderNo() == null) ? 0 : getProfitSharingOrderNo().hashCode());
result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode());
result = prime * result + ((getPlatformProfitSharingOrderNo() == null) ? 0 : getPlatformProfitSharingOrderNo().hashCode());
result = prime * result + ((getPlatformMerNo() == null) ? 0 : getPlatformMerNo().hashCode());
result = prime * result + ((getPlatformTradeNo() == null) ? 0 : getPlatformTradeNo().hashCode());
result = prime * result + ((getPlatformAppid() == null) ? 0 : getPlatformAppid().hashCode());
result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode());
result = prime * result + ((getProfitSharingAmoun() == null) ? 0 : getProfitSharingAmoun().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getProfitSharingTime() == null) ? 0 : getProfitSharingTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().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(", tradeOrderId=").append(tradeOrderId);
sb.append(", tradeOrderNo=").append(tradeOrderNo);
sb.append(", profitSharingOrderNo=").append(profitSharingOrderNo);
sb.append(", platformType=").append(platformType);
sb.append(", platformProfitSharingOrderNo=").append(platformProfitSharingOrderNo);
sb.append(", platformMerNo=").append(platformMerNo);
sb.append(", platformTradeNo=").append(platformTradeNo);
sb.append(", platformAppid=").append(platformAppid);
sb.append(", ratio=").append(ratio);
sb.append(", profitSharingAmoun=").append(profitSharingAmoun);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", profitSharingTime=").append(profitSharingTime);
sb.append(", finishTime=").append(finishTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,329 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* bs_trade_order_profit_sharing_receiver
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsTradeOrderProfitSharingReceiver implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 交易分账记录id
*/
private Long tradeOrderProfitSharingId;
/**
* 交易id
*/
private Long tradeOrderId;
/**
* 交易订单号
*/
private String tradeOrderNo;
/**
* 分账金额
*/
private BigDecimal profitSharingAmount;
/**
* 分账比例 单位%
*/
private BigDecimal ratio;
/**
* 分账接收方类型 1. 运营公司 2. 分公司 3. 代理商
*/
private Integer receiverObjectType;
/**
* 分账接收方id
*/
private String receiverObjectId;
/**
* 分账接收方账户
*/
private String receiverAccount;
/**
* 分账接收方姓名
*/
private String receiverName;
/**
* 分账接收金额
*/
private BigDecimal receiverAmount;
/**
* 分账状态 0未分账 1已分账 2已完成
*/
private Integer status;
/**
* 创建时间
*/
private Date createTime;
/**
* 分账时间
*/
private Date profitSharingTime;
/**
* 完成时间
*/
private Date finishTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getTradeOrderProfitSharingId() {
return tradeOrderProfitSharingId;
}
public void setTradeOrderProfitSharingId(Long tradeOrderProfitSharingId) {
this.tradeOrderProfitSharingId = tradeOrderProfitSharingId;
}
public Long getTradeOrderId() {
return tradeOrderId;
}
public void setTradeOrderId(Long tradeOrderId) {
this.tradeOrderId = tradeOrderId;
}
public String getTradeOrderNo() {
return tradeOrderNo;
}
public void setTradeOrderNo(String tradeOrderNo) {
this.tradeOrderNo = tradeOrderNo;
}
public BigDecimal getProfitSharingAmount() {
return profitSharingAmount;
}
public void setProfitSharingAmount(BigDecimal profitSharingAmount) {
this.profitSharingAmount = profitSharingAmount;
}
public BigDecimal getRatio() {
return ratio;
}
public void setRatio(BigDecimal ratio) {
this.ratio = ratio;
}
public Integer getReceiverObjectType() {
return receiverObjectType;
}
public void setReceiverObjectType(Integer receiverObjectType) {
this.receiverObjectType = receiverObjectType;
}
public String getReceiverObjectId() {
return receiverObjectId;
}
public void setReceiverObjectId(String receiverObjectId) {
this.receiverObjectId = receiverObjectId;
}
public String getReceiverAccount() {
return receiverAccount;
}
public void setReceiverAccount(String receiverAccount) {
this.receiverAccount = receiverAccount;
}
public String getReceiverName() {
return receiverName;
}
public void setReceiverName(String receiverName) {
this.receiverName = receiverName;
}
public BigDecimal getReceiverAmount() {
return receiverAmount;
}
public void setReceiverAmount(BigDecimal receiverAmount) {
this.receiverAmount = receiverAmount;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getProfitSharingTime() {
return profitSharingTime;
}
public void setProfitSharingTime(Date profitSharingTime) {
this.profitSharingTime = profitSharingTime;
}
public Date getFinishTime() {
return finishTime;
}
public void setFinishTime(Date finishTime) {
this.finishTime = finishTime;
}
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;
}
BsTradeOrderProfitSharingReceiver other = (BsTradeOrderProfitSharingReceiver) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getTradeOrderProfitSharingId() == null ? other.getTradeOrderProfitSharingId() == null : this.getTradeOrderProfitSharingId().equals(other.getTradeOrderProfitSharingId()))
&& (this.getTradeOrderId() == null ? other.getTradeOrderId() == null : this.getTradeOrderId().equals(other.getTradeOrderId()))
&& (this.getTradeOrderNo() == null ? other.getTradeOrderNo() == null : this.getTradeOrderNo().equals(other.getTradeOrderNo()))
&& (this.getProfitSharingAmount() == null ? other.getProfitSharingAmount() == null : this.getProfitSharingAmount().equals(other.getProfitSharingAmount()))
&& (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio()))
&& (this.getReceiverObjectType() == null ? other.getReceiverObjectType() == null : this.getReceiverObjectType().equals(other.getReceiverObjectType()))
&& (this.getReceiverObjectId() == null ? other.getReceiverObjectId() == null : this.getReceiverObjectId().equals(other.getReceiverObjectId()))
&& (this.getReceiverAccount() == null ? other.getReceiverAccount() == null : this.getReceiverAccount().equals(other.getReceiverAccount()))
&& (this.getReceiverName() == null ? other.getReceiverName() == null : this.getReceiverName().equals(other.getReceiverName()))
&& (this.getReceiverAmount() == null ? other.getReceiverAmount() == null : this.getReceiverAmount().equals(other.getReceiverAmount()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getProfitSharingTime() == null ? other.getProfitSharingTime() == null : this.getProfitSharingTime().equals(other.getProfitSharingTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (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 + ((getTradeOrderProfitSharingId() == null) ? 0 : getTradeOrderProfitSharingId().hashCode());
result = prime * result + ((getTradeOrderId() == null) ? 0 : getTradeOrderId().hashCode());
result = prime * result + ((getTradeOrderNo() == null) ? 0 : getTradeOrderNo().hashCode());
result = prime * result + ((getProfitSharingAmount() == null) ? 0 : getProfitSharingAmount().hashCode());
result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode());
result = prime * result + ((getReceiverObjectType() == null) ? 0 : getReceiverObjectType().hashCode());
result = prime * result + ((getReceiverObjectId() == null) ? 0 : getReceiverObjectId().hashCode());
result = prime * result + ((getReceiverAccount() == null) ? 0 : getReceiverAccount().hashCode());
result = prime * result + ((getReceiverName() == null) ? 0 : getReceiverName().hashCode());
result = prime * result + ((getReceiverAmount() == null) ? 0 : getReceiverAmount().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getProfitSharingTime() == null) ? 0 : getProfitSharingTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().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(", tradeOrderProfitSharingId=").append(tradeOrderProfitSharingId);
sb.append(", tradeOrderId=").append(tradeOrderId);
sb.append(", tradeOrderNo=").append(tradeOrderNo);
sb.append(", profitSharingAmount=").append(profitSharingAmount);
sb.append(", ratio=").append(ratio);
sb.append(", receiverObjectType=").append(receiverObjectType);
sb.append(", receiverObjectId=").append(receiverObjectId);
sb.append(", receiverAccount=").append(receiverAccount);
sb.append(", receiverName=").append(receiverName);
sb.append(", receiverAmount=").append(receiverAmount);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", profitSharingTime=").append(profitSharingTime);
sb.append(", finishTime=").append(finishTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,29 @@
package com.hfkj.service;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import java.util.List;
import java.util.Map;
/**
* @className: BsTradeOrderProfitSharingReceiverService
* @author: HuRui
* @date: 2023/2/22
**/
public interface BsTradeOrderProfitSharingReceiverService {
/**
* 编辑数据
* @param profitSharingReceiver
*/
void editData(BsTradeOrderProfitSharingReceiver profitSharingReceiver);
/**
* 查询分账列表
* @param param
* @return
*/
List<BsTradeOrderProfitSharingReceiver> getProfitSharingList(Map<String, Object> param);
}

@ -0,0 +1,39 @@
package com.hfkj.service;
import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import java.util.List;
/**
* 交易订单分账记录
* @className: BsTradeOrderProfitSharingService
* @author: HuRui
* @date: 2023/2/22
**/
public interface BsTradeOrderProfitSharingService {
/**
* 编辑数据
* @param profitSharing
*/
void editData(BsTradeOrderProfitSharing profitSharing);
/**
* 创建分账
* @param tradeOrder
*/
void createProfitSharing(BsTradeOrder tradeOrder);
/**
* 获取需要分账的订单
* @return
*/
List<BsTradeOrderProfitSharing> getNeedProfitSharingOrder();
/**
* 获取需要完结的订单
* @return
*/
List<BsTradeOrderProfitSharing> getNeedFinishProfitSharingOrder();
}

@ -35,11 +35,15 @@ public class BsMerPlatformNoRateServiceImpl implements BsMerPlatformNoRateServic
@Override
public BsMerPlatformNoRate getDetail(Long merId, Integer platformType, Integer rateTypeCode) {
BsMerPlatformNoRateExample example = new BsMerPlatformNoRateExample();
example.createCriteria()
BsMerPlatformNoRateExample.Criteria criteria = example.createCriteria()
.andMerIdEqualTo(merId)
.andPlatformTypeEqualTo(platformType)
.andRateTypeCodeEqualTo(rateTypeCode)
.andStatusEqualTo(1);
if (rateTypeCode != null) {
criteria.andRateTypeCodeEqualTo(rateTypeCode);
}
List<BsMerPlatformNoRate> list = merPlatformNoRateMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);

@ -0,0 +1,55 @@
package com.hfkj.service.impl;
import com.hfkj.dao.BsTradeOrderProfitSharingMapper;
import com.hfkj.dao.BsTradeOrderProfitSharingReceiverMapper;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingExample;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiverExample;
import com.hfkj.service.BsTradeOrderProfitSharingReceiverService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @className: BsTradeOrderProfitSharingReceiverServiceImpl
* @author: HuRui
* @date: 2023/2/22
**/
@Service("tradeOrderProfitSharingReceiverService")
public class BsTradeOrderProfitSharingReceiverServiceImpl implements BsTradeOrderProfitSharingReceiverService {
@Resource
private BsTradeOrderProfitSharingReceiverMapper tradeOrderProfitSharingReceiverMapper;
@Override
public void editData(BsTradeOrderProfitSharingReceiver profitSharingReceiver) {
if (profitSharingReceiver.getId() == null) {
profitSharingReceiver.setCreateTime(new Date());
profitSharingReceiver.setStatus(0);
tradeOrderProfitSharingReceiverMapper.insert(profitSharingReceiver);
} else {
tradeOrderProfitSharingReceiverMapper.updateByPrimaryKeySelective(profitSharingReceiver);
}
}
@Override
public List<BsTradeOrderProfitSharingReceiver> getProfitSharingList(Map<String, Object> param) {
BsTradeOrderProfitSharingReceiverExample example = new BsTradeOrderProfitSharingReceiverExample();
BsTradeOrderProfitSharingReceiverExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(param, "tradeOrderProfitSharingId") != null) {
criteria.andTradeOrderProfitSharingIdEqualTo(MapUtils.getLong(param, "tradeOrderProfitSharingId"));
}
if (MapUtils.getInteger(param, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(param, "status"));
}
return tradeOrderProfitSharingReceiverMapper.selectByExample(example);
}
}

@ -0,0 +1,126 @@
package com.hfkj.service.impl;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.IDGenerator;
import com.hfkj.dao.BsTradeOrderProfitSharingMapper;
import com.hfkj.entity.BsMerPlatformNoRate;
import com.hfkj.entity.BsTradeOrder;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import com.hfkj.service.BsMerPlatformNoRateService;
import com.hfkj.service.BsTradeOrderProfitSharingReceiverService;
import com.hfkj.service.BsTradeOrderProfitSharingService;
import com.hfkj.service.BsTradeOrderService;
import com.hfkj.sysenum.PlatformTypeEnum;
import com.hfkj.sysenum.ProfitSharingReceiverObjectType;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @className: BsTradeOrderProfitSharingServiceImpl
* @author: HuRui
* @date: 2023/2/22
**/
@Service("tradeOrderProfitSharingService")
public class BsTradeOrderProfitSharingServiceImpl implements BsTradeOrderProfitSharingService {
@Resource
private BsTradeOrderProfitSharingMapper tradeOrderProfitSharingMapper;
@Resource
private BsTradeOrderProfitSharingReceiverService tradeOrderProfitSharingReceiverService;
@Resource
private BsTradeOrderService tradeOrderService;
@Resource
private BsMerPlatformNoRateService merPlatformNoRateService;
@Override
public void editData(BsTradeOrderProfitSharing profitSharing) {
if (profitSharing.getId() == null) {
profitSharing.setCreateTime(new Date());
profitSharing.setStatus(0);
tradeOrderProfitSharingMapper.insert(profitSharing);
} else {
tradeOrderProfitSharingMapper.updateByPrimaryKeySelective(profitSharing);
}
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void createProfitSharing(BsTradeOrder tradeOrder) {
if (tradeOrder.getProfitSharingStatus() != null && tradeOrder.getProfitSharingStatus().equals(true)) {
// 比例
BsMerPlatformNoRate rate = merPlatformNoRateService.getDetail(tradeOrder.getMerId(), PlatformTypeEnum.type4.getNumber(), null);
if (rate == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未配置比例");
}
BsTradeOrderProfitSharing tradeOrderProfitSharing = new BsTradeOrderProfitSharing();
tradeOrderProfitSharing.setProfitSharingOrderNo("1530"+ DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(10));
tradeOrderProfitSharing.setTradeOrderId(tradeOrder.getId());
tradeOrderProfitSharing.setTradeOrderNo(tradeOrder.getOutTradeNo());
tradeOrderProfitSharing.setPlatformType(tradeOrder.getPlatformType());
tradeOrderProfitSharing.setPlatformMerNo(tradeOrder.getPlatformMerNo());
tradeOrderProfitSharing.setPlatformTradeNo(tradeOrder.getPlatformTradeNo());
tradeOrderProfitSharing.setPlatformAppid(tradeOrder.getPlatformAppid());
editData(tradeOrderProfitSharing);
// 平台手续费
BigDecimal platformServiceCharge = null;
if (tradeOrder.getPlatformType().equals(PlatformTypeEnum.type4.getNumber())) {
platformServiceCharge = new BigDecimal("0.002");
}
// 平台手续费 (四舍五入向上取取整)
BigDecimal platformServiceChargeAmount = tradeOrder.getTradeActualAmount().multiply(platformServiceCharge).setScale(2, BigDecimal.ROUND_HALF_DOWN);
// 实际到账金额 = 交易金额 - 平台手续费
BigDecimal amount = tradeOrder.getTradeActualAmount().subtract(platformServiceChargeAmount);
for (ProfitSharingReceiverObjectType receiverObjectType : ProfitSharingReceiverObjectType.getDataList()) {
if (receiverObjectType.getType().equals(ProfitSharingReceiverObjectType.operating.getType())) {
} else if (receiverObjectType.getType().equals(ProfitSharingReceiverObjectType.company.getType())) {
// 公司抽成
BigDecimal companyAmount = amount.multiply(rate.getRatePct()).setScale(2, BigDecimal.ROUND_HALF_DOWN);
BsTradeOrderProfitSharingReceiver profitSharingReceiver = new BsTradeOrderProfitSharingReceiver();
profitSharingReceiver.setTradeOrderProfitSharingId(tradeOrderProfitSharing.getId());
profitSharingReceiver.setTradeOrderId(tradeOrder.getId());
profitSharingReceiver.setTradeOrderNo(tradeOrder.getOutTradeNo());
profitSharingReceiver.setProfitSharingAmount(amount);
profitSharingReceiver.setRatio(rate.getRatePct());
profitSharingReceiver.setReceiverObjectType(2);
profitSharingReceiver.setReceiverObjectId(tradeOrder.getCompanyId()!=null?tradeOrder.getCompanyId().toString():null);
profitSharingReceiver.setReceiverAccount("1603942866");
profitSharingReceiver.setReceiverName("惠昕石化");
profitSharingReceiver.setReceiverAmount(companyAmount);
tradeOrderProfitSharingReceiverService.editData(profitSharingReceiver);
} else if (receiverObjectType.getType().equals(ProfitSharingReceiverObjectType.agent.getType())) {
}
}
}
}
@Override
public List<BsTradeOrderProfitSharing> getNeedProfitSharingOrder() {
return tradeOrderProfitSharingMapper.getNeedProfitSharingOrder();
}
@Override
public List<BsTradeOrderProfitSharing> getNeedFinishProfitSharingOrder() {
return tradeOrderProfitSharingMapper.getNeedFinishProfitSharingOrder();
}
}

@ -171,6 +171,8 @@ public class BsTradeOrderServiceImpl implements BsTradeOrderService {
if (MapUtils.getLong(param, "qrCodeId") != null) {
tradeOrder.setQrCodeId(MapUtils.getLong(param, "qrCodeId"));
}
tradeOrder.setProfitSharingStatus(true);
editOrder(tradeOrder);
Map<String, Object> returnParam = new HashMap<>();

@ -0,0 +1,49 @@
package com.hfkj.sysenum;
import java.util.EnumSet;
/**
* @className: TradeOrderProfitSharingReceiverObjectType
* @author: HuRui
* @date: 2023/2/22
**/
public enum ProfitSharingReceiverObjectType {
operating(1, "运营公司"),
company(2, "公司"),
agent(3, "代理商"),
;
private Integer type;
private String name;
ProfitSharingReceiverObjectType(int type, String name) {
this.type = type;
this.name = name;
}
/**
* 获取枚举数据
* @return
*/
public static EnumSet<ProfitSharingReceiverObjectType> getDataList() {
return EnumSet.allOf(ProfitSharingReceiverObjectType.class);
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -14,10 +14,11 @@ lkl_v3_private_key=/home/project/xuan-pay/cert/lakala/v3/private.text
lkl_v2_appid=800000010334001
lkl_v2_serial_no=48066e7ce3551149cd9ebdaf924582794137feb6
lkl_v2_private_key=/home/project/xuan-pay/cert/lakala/v2/private.text
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
wechat_pay_notify_url=https://gratia-pay.dctpay.com/crest/weiXinNotify/jsapiPay
file_url=/home/project/gratia-pay/file
filesystem=/home/project/gratia-pay/filesystem

@ -1,19 +1,26 @@
obs_bucket_name=xuan-pay-private
obs_url=https://xuan-pay-private.obs.cn-southwest-2.myhuaweicloud.com
qr_code_data_url=https://paycs.dctpay.com/scanPay
qr_code_url=https://paycs.dctpay.com/filesystem/payQrCode/
obs_end_point=https://obs.cn-east-3.myhuaweicloud.com
obs_url=https://gratia-pay-test.obs.cn-east-3.myhuaweicloud.com
qr_code_data_url=https://pay.dctpay.com/scanPay
qr_code_url=https://pay.dctpay.com/filesystem/payQrCode/
lkl_request_url=https://s2.lakala.com
lkl_org_code=950386
lkl_v3_appid=OP00000066
lkl_v3_serial_no=017f2990c583
lkl_v3_private_key=/home/project/xuan-pay/cert/lakala/v3/prod_private.text
lkl_v3_private_key=/home/project/gratia-pay/cert/lakala/v3/prod_private.text
lkl_v2_appid=OP00000066
lkl_v2_serial_no=017f2990c583
lkl_v2_private_key=/home/project/xuan-pay/cert/lakala/v2/prod_private.text
lkl_mer_contract_ret_url=https://pay.bxb.cn/brest/laKaLaNotify/merContract
lkl_micro_pay_ret_url=https://pay.bxb.cn/crest/laKaLaNotify/microPay
lkl_v2_private_key=/home/project/gratia-pay/cert/lakala/v2/prod_private.text
lkl_mer_contract_ret_url=https://pay.dctpay.com/brest/laKaLaNotify/merContract
lkl_micro_pay_ret_url=https://pay.dctpay.com/crest/laKaLaNotify/microPay
wechat_pay_notify_url=https://pay.dctpay.com/crest/weiXinNotify/jsapiPay
file_url=/home/project/gratia-pay/file
filesystem=/home/project/gratia-pay/filesystem
file_url=/home/project/xuan-pay/file
filesystem=/home/project/xuan-pay/filesystem
hsg_domain_name=https://hsg.dctpay.com/

Loading…
Cancel
Save