From 5f4f05cb6afd038218664cd22c3529ca9cb101a7 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 24 Feb 2023 17:18:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bweb/src/main/resources/prod/application.yml | 21 +- .../src/main/resources/prod/config.properties | 4 +- .../com/cweb/controller/TestController.java | 108 +- .../com/cweb/notify/WeiXinController.java | 46 +- cweb/src/main/resources/dev/logback.xml | 22 + cweb/src/main/resources/prod/application.yml | 20 +- .../src/main/resources/prod/config.properties | 4 +- .../com/hfkj/schedule/TradeOrderSchedule.java | 146 ++ .../src/main/resources/dev/application.yml | 37 + .../src/main/resources/prod/application.yml | 20 +- service/pom.xml | 5 + .../hfkj/channel/alipay/AlipayMerService.java | 81 + .../channel/alipay/utils/AlipayRequest.java | 182 +++ .../channel/alipay/utils/AlipayUtils.java | 51 + .../hfkj/channel/weixin/WeiXinMerService.java | 2 +- .../hfkj/channel/weixin/WeiXinPayService.java | 44 +- .../channel/weixin/utils/WxOrderConfig.java | 204 ++- .../java/com/hfkj/config/CommonSysConfig.java | 6 + .../config/mqtt/MqttProviderCallBack.java | 2 - .../java/com/hfkj/dao/BsTradeOrderMapper.java | 75 +- .../dao/BsTradeOrderProfitSharingMapper.java | 151 ++ .../BsTradeOrderProfitSharingMapperExt.java | 68 + ...TradeOrderProfitSharingReceiverMapper.java | 151 ++ ...deOrderProfitSharingReceiverMapperExt.java | 7 + ...OrderProfitSharingReceiverSqlProvider.java | 416 +++++ .../BsTradeOrderProfitSharingSqlProvider.java | 416 +++++ .../com/hfkj/dao/BsTradeOrderSqlProvider.java | 28 + .../java/com/hfkj/entity/BsTradeOrder.java | 32 + .../com/hfkj/entity/BsTradeOrderExample.java | 130 ++ .../entity/BsTradeOrderProfitSharing.java | 329 ++++ .../BsTradeOrderProfitSharingExample.java | 1394 +++++++++++++++++ .../BsTradeOrderProfitSharingReceiver.java | 329 ++++ ...radeOrderProfitSharingReceiverExample.java | 1374 ++++++++++++++++ ...radeOrderProfitSharingReceiverService.java | 29 + .../BsTradeOrderProfitSharingService.java | 39 + .../impl/BsMerPlatformNoRateServiceImpl.java | 8 +- ...OrderProfitSharingReceiverServiceImpl.java | 55 + .../BsTradeOrderProfitSharingServiceImpl.java | 126 ++ .../service/impl/BsTradeOrderServiceImpl.java | 2 + .../ProfitSharingReceiverObjectType.java | 49 + .../resources/dev/commonConfig.properties | 3 +- .../resources/prod/commonConfig.properties | 25 +- 42 files changed, 6140 insertions(+), 101 deletions(-) create mode 100644 schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java create mode 100644 service/src/main/java/com/hfkj/channel/alipay/AlipayMerService.java create mode 100644 service/src/main/java/com/hfkj/channel/alipay/utils/AlipayRequest.java create mode 100644 service/src/main/java/com/hfkj/channel/alipay/utils/AlipayUtils.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharing.java create mode 100644 service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingExample.java create mode 100644 service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiver.java create mode 100644 service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiverExample.java create mode 100644 service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingReceiverService.java create mode 100644 service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingService.java create mode 100644 service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingReceiverServiceImpl.java create mode 100644 service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingServiceImpl.java create mode 100644 service/src/main/java/com/hfkj/sysenum/ProfitSharingReceiverObjectType.java diff --git a/bweb/src/main/resources/prod/application.yml b/bweb/src/main/resources/prod/application.yml index be04b41..d5ba156 100644 --- a/bweb/src/main/resources/prod/application.yml +++ b/bweb/src/main/resources/prod/application.yml @@ -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 diff --git a/bweb/src/main/resources/prod/config.properties b/bweb/src/main/resources/prod/config.properties index bc046fa..417725a 100644 --- a/bweb/src/main/resources/prod/config.properties +++ b/bweb/src/main/resources/prod/config.properties @@ -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 diff --git a/cweb/src/main/java/com/cweb/controller/TestController.java b/cweb/src/main/java/com/cweb/controller/TestController.java index 7b13c99..b85ac86 100644 --- a/cweb/src/main/java/com/cweb/controller/TestController.java +++ b/cweb/src/main/java/com/cweb/controller/TestController.java @@ -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 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 businessAddress = new HashMap<>(); + businessAddress.put("city_code", ""); + businessAddress.put("district_code", ""); + businessAddress.put("address", ""); + businessAddress.put("province_code", ""); + body.put("business_address", businessAddress); + + + Map 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 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 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 sites = new HashMap<>(); + body.put("sites", sites); + + Map 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); + } + } + } diff --git a/cweb/src/main/java/com/cweb/notify/WeiXinController.java b/cweb/src/main/java/com/cweb/notify/WeiXinController.java index 1a4bef8..6ac2fbc 100644 --- a/cweb/src/main/java/com/cweb/notify/WeiXinController.java +++ b/cweb/src/main/java/com/cweb/notify/WeiXinController.java @@ -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 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 = "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + "\n" + + ""; + + 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); + } + } } diff --git a/cweb/src/main/resources/dev/logback.xml b/cweb/src/main/resources/dev/logback.xml index 9382585..80ee421 100644 --- a/cweb/src/main/resources/dev/logback.xml +++ b/cweb/src/main/resources/dev/logback.xml @@ -69,4 +69,26 @@ + + + + log/alipay/alipaylog.log + + log/alipay.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + diff --git a/cweb/src/main/resources/prod/application.yml b/cweb/src/main/resources/prod/application.yml index 6c3b729..508af72 100644 --- a/cweb/src/main/resources/prod/application.yml +++ b/cweb/src/main/resources/prod/application.yml @@ -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 diff --git a/cweb/src/main/resources/prod/config.properties b/cweb/src/main/resources/prod/config.properties index bc58e52..5bfbba3 100644 --- a/cweb/src/main/resources/prod/config.properties +++ b/cweb/src/main/resources/prod/config.properties @@ -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 diff --git a/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java b/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java new file mode 100644 index 0000000..3945c4d --- /dev/null +++ b/schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java @@ -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 tradeOrderProfitSharingList = tradeOrderProfitSharingService.getNeedProfitSharingOrder(); + for (BsTradeOrderProfitSharing tradeOrderProfitSharing : tradeOrderProfitSharingList) { + try { + + List> receiversList = new ArrayList<>(); + Map receiversMap; + + // 分账接收方 + Map param = new HashMap<>(); + param.put("tradeOrderProfitSharingId", tradeOrderProfitSharing.getId()); + List 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 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 tradeOrderProfitSharingList = tradeOrderProfitSharingService.getNeedFinishProfitSharingOrder(); + for (BsTradeOrderProfitSharing tradeOrderProfitSharing : tradeOrderProfitSharingList) { + try { + + TreeMap 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 param = new HashMap<>(); + param.put("tradeOrderProfitSharingId", tradeOrderProfitSharing.getId()); + List 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); + } + } + } + +} diff --git a/schedule/src/main/resources/dev/application.yml b/schedule/src/main/resources/dev/application.yml index 63753da..ae53c29 100644 --- a/schedule/src/main/resources/dev/application.yml +++ b/schedule/src/main/resources/dev/application.yml @@ -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 diff --git a/schedule/src/main/resources/prod/application.yml b/schedule/src/main/resources/prod/application.yml index c325292..9e0d102 100644 --- a/schedule/src/main/resources/prod/application.yml +++ b/schedule/src/main/resources/prod/application.yml @@ -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: diff --git a/service/pom.xml b/service/pom.xml index f4690b2..5d3917a 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -367,6 +367,11 @@ wechatpay-apache-httpclient 0.4.8 + + com.alipay.sdk + alipay-sdk-java + 4.34.0.ALL + getCorporateAdvertising() error!", e); + } + return null; + } + + /* *//** + * 【微信】回退分账 + * @param appId + * @param subMchId + * @param transactionId 第三方交易订单号 + * @param outOrderNo 交易订单号 + *//* + public static TreeMap returnProfitsharing(String subMchId, + String profitsharingOrderNo, + String return_mchid, + String amount, + String description) { + try { + Map 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> receiversList = new ArrayList<>(); + Map 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 profitSharingFinish(String appId, + String subMchId, + String transactionId, + String profitSharingOrderNo, + String description) { + try { + Map 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 { //双向证书的认证 diff --git a/service/src/main/java/com/hfkj/config/CommonSysConfig.java b/service/src/main/java/com/hfkj/config/CommonSysConfig.java index ab485a2..980fef6 100644 --- a/service/src/main/java/com/hfkj/config/CommonSysConfig.java +++ b/service/src/main/java/com/hfkj/config/CommonSysConfig.java @@ -86,6 +86,12 @@ public class CommonSysConfig { */ private String lkl_micro_pay_ret_url; + /** + * 微信支付回调 + */ + private String wechat_pay_notify_url; + + /** * 文件存放地址 不可访问 */ diff --git a/service/src/main/java/com/hfkj/config/mqtt/MqttProviderCallBack.java b/service/src/main/java/com/hfkj/config/mqtt/MqttProviderCallBack.java index 7684c9b..ebe2190 100644 --- a/service/src/main/java/com/hfkj/config/mqtt/MqttProviderCallBack.java +++ b/service/src/main/java/com/hfkj/config/mqtt/MqttProviderCallBack.java @@ -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) { - } } diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java index f02e673..e8a114e 100644 --- a/service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderMapper.java @@ -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},", diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapper.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapper.java new file mode 100644 index 0000000..a5157cf --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapperExt.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapperExt.java new file mode 100644 index 0000000..9af571c --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingMapperExt.java @@ -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 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 getNeedFinishProfitSharingOrder(); +} diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapper.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapper.java new file mode 100644 index 0000000..3b46d25 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapper.java @@ -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 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); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapperExt.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapperExt.java new file mode 100644 index 0000000..78716fc --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsTradeOrderProfitSharingReceiverMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverSqlProvider.java new file mode 100644 index 0000000..fe9c753 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingReceiverSqlProvider.java @@ -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 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 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 oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingSqlProvider.java new file mode 100644 index 0000000..3ee5d5e --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderProfitSharingSqlProvider.java @@ -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 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 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 oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java index 64219d6..fc14eef 100644 --- a/service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsTradeOrderSqlProvider.java @@ -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}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsTradeOrder.java b/service/src/main/java/com/hfkj/entity/BsTradeOrder.java index b866354..be32dc8 100644 --- a/service/src/main/java/com/hfkj/entity/BsTradeOrder.java +++ b/service/src/main/java/com/hfkj/entity/BsTradeOrder.java @@ -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); diff --git a/service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java b/service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java index 6728d94..7406abc 100644 --- a/service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java +++ b/service/src/main/java/com/hfkj/entity/BsTradeOrderExample.java @@ -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 values) { + addCriterion("platform_appid in", values, "platformAppid"); + return (Criteria) this; + } + + public Criteria andPlatformAppidNotIn(List 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 values) { + addCriterion("profit_sharing_status in", values, "profitSharingStatus"); + return (Criteria) this; + } + + public Criteria andProfitSharingStatusNotIn(List 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; diff --git a/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharing.java b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharing.java new file mode 100644 index 0000000..0327baf --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharing.java @@ -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(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingExample.java b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingExample.java new file mode 100644 index 0000000..7df5521 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingExample.java @@ -0,0 +1,1394 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsTradeOrderProfitSharingExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsTradeOrderProfitSharingExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdIsNull() { + addCriterion("trade_order_id is null"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdIsNotNull() { + addCriterion("trade_order_id is not null"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdEqualTo(Long value) { + addCriterion("trade_order_id =", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdNotEqualTo(Long value) { + addCriterion("trade_order_id <>", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdGreaterThan(Long value) { + addCriterion("trade_order_id >", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("trade_order_id >=", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdLessThan(Long value) { + addCriterion("trade_order_id <", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdLessThanOrEqualTo(Long value) { + addCriterion("trade_order_id <=", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdIn(List values) { + addCriterion("trade_order_id in", values, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdNotIn(List values) { + addCriterion("trade_order_id not in", values, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdBetween(Long value1, Long value2) { + addCriterion("trade_order_id between", value1, value2, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdNotBetween(Long value1, Long value2) { + addCriterion("trade_order_id not between", value1, value2, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoIsNull() { + addCriterion("trade_order_no is null"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoIsNotNull() { + addCriterion("trade_order_no is not null"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoEqualTo(String value) { + addCriterion("trade_order_no =", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotEqualTo(String value) { + addCriterion("trade_order_no <>", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoGreaterThan(String value) { + addCriterion("trade_order_no >", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("trade_order_no >=", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoLessThan(String value) { + addCriterion("trade_order_no <", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoLessThanOrEqualTo(String value) { + addCriterion("trade_order_no <=", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoLike(String value) { + addCriterion("trade_order_no like", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotLike(String value) { + addCriterion("trade_order_no not like", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoIn(List values) { + addCriterion("trade_order_no in", values, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotIn(List values) { + addCriterion("trade_order_no not in", values, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoBetween(String value1, String value2) { + addCriterion("trade_order_no between", value1, value2, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotBetween(String value1, String value2) { + addCriterion("trade_order_no not between", value1, value2, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoIsNull() { + addCriterion("profit_sharing_order_no is null"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoIsNotNull() { + addCriterion("profit_sharing_order_no is not null"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoEqualTo(String value) { + addCriterion("profit_sharing_order_no =", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoNotEqualTo(String value) { + addCriterion("profit_sharing_order_no <>", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoGreaterThan(String value) { + addCriterion("profit_sharing_order_no >", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("profit_sharing_order_no >=", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoLessThan(String value) { + addCriterion("profit_sharing_order_no <", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoLessThanOrEqualTo(String value) { + addCriterion("profit_sharing_order_no <=", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoLike(String value) { + addCriterion("profit_sharing_order_no like", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoNotLike(String value) { + addCriterion("profit_sharing_order_no not like", value, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoIn(List values) { + addCriterion("profit_sharing_order_no in", values, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoNotIn(List values) { + addCriterion("profit_sharing_order_no not in", values, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoBetween(String value1, String value2) { + addCriterion("profit_sharing_order_no between", value1, value2, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingOrderNoNotBetween(String value1, String value2) { + addCriterion("profit_sharing_order_no not between", value1, value2, "profitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNull() { + addCriterion("platform_type is null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNotNull() { + addCriterion("platform_type is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeEqualTo(Integer value) { + addCriterion("platform_type =", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotEqualTo(Integer value) { + addCriterion("platform_type <>", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThan(Integer value) { + addCriterion("platform_type >", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("platform_type >=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThan(Integer value) { + addCriterion("platform_type <", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThanOrEqualTo(Integer value) { + addCriterion("platform_type <=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIn(List values) { + addCriterion("platform_type in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotIn(List values) { + addCriterion("platform_type not in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeBetween(Integer value1, Integer value2) { + addCriterion("platform_type between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotBetween(Integer value1, Integer value2) { + addCriterion("platform_type not between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoIsNull() { + addCriterion("platform_profit_sharing_order_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoIsNotNull() { + addCriterion("platform_profit_sharing_order_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoEqualTo(String value) { + addCriterion("platform_profit_sharing_order_no =", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoNotEqualTo(String value) { + addCriterion("platform_profit_sharing_order_no <>", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoGreaterThan(String value) { + addCriterion("platform_profit_sharing_order_no >", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_profit_sharing_order_no >=", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoLessThan(String value) { + addCriterion("platform_profit_sharing_order_no <", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoLessThanOrEqualTo(String value) { + addCriterion("platform_profit_sharing_order_no <=", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoLike(String value) { + addCriterion("platform_profit_sharing_order_no like", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoNotLike(String value) { + addCriterion("platform_profit_sharing_order_no not like", value, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoIn(List values) { + addCriterion("platform_profit_sharing_order_no in", values, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoNotIn(List values) { + addCriterion("platform_profit_sharing_order_no not in", values, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoBetween(String value1, String value2) { + addCriterion("platform_profit_sharing_order_no between", value1, value2, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformProfitSharingOrderNoNotBetween(String value1, String value2) { + addCriterion("platform_profit_sharing_order_no not between", value1, value2, "platformProfitSharingOrderNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIsNull() { + addCriterion("platform_mer_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIsNotNull() { + addCriterion("platform_mer_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoEqualTo(String value) { + addCriterion("platform_mer_no =", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotEqualTo(String value) { + addCriterion("platform_mer_no <>", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoGreaterThan(String value) { + addCriterion("platform_mer_no >", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_mer_no >=", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLessThan(String value) { + addCriterion("platform_mer_no <", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLessThanOrEqualTo(String value) { + addCriterion("platform_mer_no <=", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLike(String value) { + addCriterion("platform_mer_no like", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotLike(String value) { + addCriterion("platform_mer_no not like", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIn(List values) { + addCriterion("platform_mer_no in", values, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotIn(List values) { + addCriterion("platform_mer_no not in", values, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoBetween(String value1, String value2) { + addCriterion("platform_mer_no between", value1, value2, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotBetween(String value1, String value2) { + addCriterion("platform_mer_no not between", value1, value2, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIsNull() { + addCriterion("platform_trade_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIsNotNull() { + addCriterion("platform_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoEqualTo(String value) { + addCriterion("platform_trade_no =", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotEqualTo(String value) { + addCriterion("platform_trade_no <>", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoGreaterThan(String value) { + addCriterion("platform_trade_no >", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_trade_no >=", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLessThan(String value) { + addCriterion("platform_trade_no <", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLessThanOrEqualTo(String value) { + addCriterion("platform_trade_no <=", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLike(String value) { + addCriterion("platform_trade_no like", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotLike(String value) { + addCriterion("platform_trade_no not like", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIn(List values) { + addCriterion("platform_trade_no in", values, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotIn(List values) { + addCriterion("platform_trade_no not in", values, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoBetween(String value1, String value2) { + addCriterion("platform_trade_no between", value1, value2, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotBetween(String value1, String value2) { + addCriterion("platform_trade_no not between", value1, value2, "platformTradeNo"); + 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 values) { + addCriterion("platform_appid in", values, "platformAppid"); + return (Criteria) this; + } + + public Criteria andPlatformAppidNotIn(List 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 andRatioIsNull() { + addCriterion("ratio is null"); + return (Criteria) this; + } + + public Criteria andRatioIsNotNull() { + addCriterion("ratio is not null"); + return (Criteria) this; + } + + public Criteria andRatioEqualTo(BigDecimal value) { + addCriterion("ratio =", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotEqualTo(BigDecimal value) { + addCriterion("ratio <>", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioGreaterThan(BigDecimal value) { + addCriterion("ratio >", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("ratio >=", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioLessThan(BigDecimal value) { + addCriterion("ratio <", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioLessThanOrEqualTo(BigDecimal value) { + addCriterion("ratio <=", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioIn(List values) { + addCriterion("ratio in", values, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotIn(List values) { + addCriterion("ratio not in", values, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("ratio between", value1, value2, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("ratio not between", value1, value2, "ratio"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounIsNull() { + addCriterion("profit_sharing_amoun is null"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounIsNotNull() { + addCriterion("profit_sharing_amoun is not null"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amoun =", value, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounNotEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amoun <>", value, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounGreaterThan(BigDecimal value) { + addCriterion("profit_sharing_amoun >", value, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amoun >=", value, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounLessThan(BigDecimal value) { + addCriterion("profit_sharing_amoun <", value, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounLessThanOrEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amoun <=", value, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounIn(List values) { + addCriterion("profit_sharing_amoun in", values, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounNotIn(List values) { + addCriterion("profit_sharing_amoun not in", values, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("profit_sharing_amoun between", value1, value2, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmounNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("profit_sharing_amoun not between", value1, value2, "profitSharingAmoun"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeIsNull() { + addCriterion("profit_sharing_time is null"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeIsNotNull() { + addCriterion("profit_sharing_time is not null"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeEqualTo(Date value) { + addCriterion("profit_sharing_time =", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeNotEqualTo(Date value) { + addCriterion("profit_sharing_time <>", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeGreaterThan(Date value) { + addCriterion("profit_sharing_time >", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeGreaterThanOrEqualTo(Date value) { + addCriterion("profit_sharing_time >=", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeLessThan(Date value) { + addCriterion("profit_sharing_time <", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeLessThanOrEqualTo(Date value) { + addCriterion("profit_sharing_time <=", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeIn(List values) { + addCriterion("profit_sharing_time in", values, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeNotIn(List values) { + addCriterion("profit_sharing_time not in", values, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeBetween(Date value1, Date value2) { + addCriterion("profit_sharing_time between", value1, value2, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeNotBetween(Date value1, Date value2) { + addCriterion("profit_sharing_time not between", value1, value2, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNull() { + addCriterion("finish_time is null"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNotNull() { + addCriterion("finish_time is not null"); + return (Criteria) this; + } + + public Criteria andFinishTimeEqualTo(Date value) { + addCriterion("finish_time =", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotEqualTo(Date value) { + addCriterion("finish_time <>", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThan(Date value) { + addCriterion("finish_time >", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThanOrEqualTo(Date value) { + addCriterion("finish_time >=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThan(Date value) { + addCriterion("finish_time <", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThanOrEqualTo(Date value) { + addCriterion("finish_time <=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIn(List values) { + addCriterion("finish_time in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotIn(List values) { + addCriterion("finish_time not in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeBetween(Date value1, Date value2) { + addCriterion("finish_time between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotBetween(Date value1, Date value2) { + addCriterion("finish_time not between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiver.java b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiver.java new file mode 100644 index 0000000..83029a4 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiver.java @@ -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(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiverExample.java b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiverExample.java new file mode 100644 index 0000000..aaca2c9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsTradeOrderProfitSharingReceiverExample.java @@ -0,0 +1,1374 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsTradeOrderProfitSharingReceiverExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsTradeOrderProfitSharingReceiverExample() { + oredCriteria = new ArrayList(); + } + + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + public String getOrderByClause() { + return orderByClause; + } + + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + public boolean isDistinct() { + return distinct; + } + + public List getOredCriteria() { + return oredCriteria; + } + + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + public void setLimit(Integer limit) { + this.limit = limit; + } + + public Integer getLimit() { + return limit; + } + + public void setOffset(Long offset) { + this.offset = offset; + } + + public Long getOffset() { + return offset; + } + + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdIsNull() { + addCriterion("trade_order_profit_sharing_id is null"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdIsNotNull() { + addCriterion("trade_order_profit_sharing_id is not null"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdEqualTo(Long value) { + addCriterion("trade_order_profit_sharing_id =", value, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdNotEqualTo(Long value) { + addCriterion("trade_order_profit_sharing_id <>", value, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdGreaterThan(Long value) { + addCriterion("trade_order_profit_sharing_id >", value, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdGreaterThanOrEqualTo(Long value) { + addCriterion("trade_order_profit_sharing_id >=", value, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdLessThan(Long value) { + addCriterion("trade_order_profit_sharing_id <", value, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdLessThanOrEqualTo(Long value) { + addCriterion("trade_order_profit_sharing_id <=", value, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdIn(List values) { + addCriterion("trade_order_profit_sharing_id in", values, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdNotIn(List values) { + addCriterion("trade_order_profit_sharing_id not in", values, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdBetween(Long value1, Long value2) { + addCriterion("trade_order_profit_sharing_id between", value1, value2, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderProfitSharingIdNotBetween(Long value1, Long value2) { + addCriterion("trade_order_profit_sharing_id not between", value1, value2, "tradeOrderProfitSharingId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdIsNull() { + addCriterion("trade_order_id is null"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdIsNotNull() { + addCriterion("trade_order_id is not null"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdEqualTo(Long value) { + addCriterion("trade_order_id =", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdNotEqualTo(Long value) { + addCriterion("trade_order_id <>", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdGreaterThan(Long value) { + addCriterion("trade_order_id >", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("trade_order_id >=", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdLessThan(Long value) { + addCriterion("trade_order_id <", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdLessThanOrEqualTo(Long value) { + addCriterion("trade_order_id <=", value, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdIn(List values) { + addCriterion("trade_order_id in", values, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdNotIn(List values) { + addCriterion("trade_order_id not in", values, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdBetween(Long value1, Long value2) { + addCriterion("trade_order_id between", value1, value2, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderIdNotBetween(Long value1, Long value2) { + addCriterion("trade_order_id not between", value1, value2, "tradeOrderId"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoIsNull() { + addCriterion("trade_order_no is null"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoIsNotNull() { + addCriterion("trade_order_no is not null"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoEqualTo(String value) { + addCriterion("trade_order_no =", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotEqualTo(String value) { + addCriterion("trade_order_no <>", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoGreaterThan(String value) { + addCriterion("trade_order_no >", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("trade_order_no >=", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoLessThan(String value) { + addCriterion("trade_order_no <", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoLessThanOrEqualTo(String value) { + addCriterion("trade_order_no <=", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoLike(String value) { + addCriterion("trade_order_no like", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotLike(String value) { + addCriterion("trade_order_no not like", value, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoIn(List values) { + addCriterion("trade_order_no in", values, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotIn(List values) { + addCriterion("trade_order_no not in", values, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoBetween(String value1, String value2) { + addCriterion("trade_order_no between", value1, value2, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andTradeOrderNoNotBetween(String value1, String value2) { + addCriterion("trade_order_no not between", value1, value2, "tradeOrderNo"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountIsNull() { + addCriterion("profit_sharing_amount is null"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountIsNotNull() { + addCriterion("profit_sharing_amount is not null"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amount =", value, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountNotEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amount <>", value, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountGreaterThan(BigDecimal value) { + addCriterion("profit_sharing_amount >", value, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amount >=", value, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountLessThan(BigDecimal value) { + addCriterion("profit_sharing_amount <", value, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("profit_sharing_amount <=", value, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountIn(List values) { + addCriterion("profit_sharing_amount in", values, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountNotIn(List values) { + addCriterion("profit_sharing_amount not in", values, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("profit_sharing_amount between", value1, value2, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andProfitSharingAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("profit_sharing_amount not between", value1, value2, "profitSharingAmount"); + return (Criteria) this; + } + + public Criteria andRatioIsNull() { + addCriterion("ratio is null"); + return (Criteria) this; + } + + public Criteria andRatioIsNotNull() { + addCriterion("ratio is not null"); + return (Criteria) this; + } + + public Criteria andRatioEqualTo(BigDecimal value) { + addCriterion("ratio =", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotEqualTo(BigDecimal value) { + addCriterion("ratio <>", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioGreaterThan(BigDecimal value) { + addCriterion("ratio >", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("ratio >=", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioLessThan(BigDecimal value) { + addCriterion("ratio <", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioLessThanOrEqualTo(BigDecimal value) { + addCriterion("ratio <=", value, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioIn(List values) { + addCriterion("ratio in", values, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotIn(List values) { + addCriterion("ratio not in", values, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("ratio between", value1, value2, "ratio"); + return (Criteria) this; + } + + public Criteria andRatioNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("ratio not between", value1, value2, "ratio"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeIsNull() { + addCriterion("receiver_object_type is null"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeIsNotNull() { + addCriterion("receiver_object_type is not null"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeEqualTo(Integer value) { + addCriterion("receiver_object_type =", value, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeNotEqualTo(Integer value) { + addCriterion("receiver_object_type <>", value, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeGreaterThan(Integer value) { + addCriterion("receiver_object_type >", value, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("receiver_object_type >=", value, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeLessThan(Integer value) { + addCriterion("receiver_object_type <", value, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeLessThanOrEqualTo(Integer value) { + addCriterion("receiver_object_type <=", value, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeIn(List values) { + addCriterion("receiver_object_type in", values, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeNotIn(List values) { + addCriterion("receiver_object_type not in", values, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeBetween(Integer value1, Integer value2) { + addCriterion("receiver_object_type between", value1, value2, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectTypeNotBetween(Integer value1, Integer value2) { + addCriterion("receiver_object_type not between", value1, value2, "receiverObjectType"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdIsNull() { + addCriterion("receiver_object_id is null"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdIsNotNull() { + addCriterion("receiver_object_id is not null"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdEqualTo(String value) { + addCriterion("receiver_object_id =", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdNotEqualTo(String value) { + addCriterion("receiver_object_id <>", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdGreaterThan(String value) { + addCriterion("receiver_object_id >", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdGreaterThanOrEqualTo(String value) { + addCriterion("receiver_object_id >=", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdLessThan(String value) { + addCriterion("receiver_object_id <", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdLessThanOrEqualTo(String value) { + addCriterion("receiver_object_id <=", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdLike(String value) { + addCriterion("receiver_object_id like", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdNotLike(String value) { + addCriterion("receiver_object_id not like", value, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdIn(List values) { + addCriterion("receiver_object_id in", values, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdNotIn(List values) { + addCriterion("receiver_object_id not in", values, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdBetween(String value1, String value2) { + addCriterion("receiver_object_id between", value1, value2, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverObjectIdNotBetween(String value1, String value2) { + addCriterion("receiver_object_id not between", value1, value2, "receiverObjectId"); + return (Criteria) this; + } + + public Criteria andReceiverAccountIsNull() { + addCriterion("receiver_account is null"); + return (Criteria) this; + } + + public Criteria andReceiverAccountIsNotNull() { + addCriterion("receiver_account is not null"); + return (Criteria) this; + } + + public Criteria andReceiverAccountEqualTo(String value) { + addCriterion("receiver_account =", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountNotEqualTo(String value) { + addCriterion("receiver_account <>", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountGreaterThan(String value) { + addCriterion("receiver_account >", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountGreaterThanOrEqualTo(String value) { + addCriterion("receiver_account >=", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountLessThan(String value) { + addCriterion("receiver_account <", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountLessThanOrEqualTo(String value) { + addCriterion("receiver_account <=", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountLike(String value) { + addCriterion("receiver_account like", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountNotLike(String value) { + addCriterion("receiver_account not like", value, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountIn(List values) { + addCriterion("receiver_account in", values, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountNotIn(List values) { + addCriterion("receiver_account not in", values, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountBetween(String value1, String value2) { + addCriterion("receiver_account between", value1, value2, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverAccountNotBetween(String value1, String value2) { + addCriterion("receiver_account not between", value1, value2, "receiverAccount"); + return (Criteria) this; + } + + public Criteria andReceiverNameIsNull() { + addCriterion("receiver_name is null"); + return (Criteria) this; + } + + public Criteria andReceiverNameIsNotNull() { + addCriterion("receiver_name is not null"); + return (Criteria) this; + } + + public Criteria andReceiverNameEqualTo(String value) { + addCriterion("receiver_name =", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameNotEqualTo(String value) { + addCriterion("receiver_name <>", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameGreaterThan(String value) { + addCriterion("receiver_name >", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameGreaterThanOrEqualTo(String value) { + addCriterion("receiver_name >=", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameLessThan(String value) { + addCriterion("receiver_name <", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameLessThanOrEqualTo(String value) { + addCriterion("receiver_name <=", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameLike(String value) { + addCriterion("receiver_name like", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameNotLike(String value) { + addCriterion("receiver_name not like", value, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameIn(List values) { + addCriterion("receiver_name in", values, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameNotIn(List values) { + addCriterion("receiver_name not in", values, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameBetween(String value1, String value2) { + addCriterion("receiver_name between", value1, value2, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverNameNotBetween(String value1, String value2) { + addCriterion("receiver_name not between", value1, value2, "receiverName"); + return (Criteria) this; + } + + public Criteria andReceiverAmountIsNull() { + addCriterion("receiver_amount is null"); + return (Criteria) this; + } + + public Criteria andReceiverAmountIsNotNull() { + addCriterion("receiver_amount is not null"); + return (Criteria) this; + } + + public Criteria andReceiverAmountEqualTo(BigDecimal value) { + addCriterion("receiver_amount =", value, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountNotEqualTo(BigDecimal value) { + addCriterion("receiver_amount <>", value, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountGreaterThan(BigDecimal value) { + addCriterion("receiver_amount >", value, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("receiver_amount >=", value, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountLessThan(BigDecimal value) { + addCriterion("receiver_amount <", value, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("receiver_amount <=", value, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountIn(List values) { + addCriterion("receiver_amount in", values, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountNotIn(List values) { + addCriterion("receiver_amount not in", values, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("receiver_amount between", value1, value2, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andReceiverAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("receiver_amount not between", value1, value2, "receiverAmount"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeIsNull() { + addCriterion("profit_sharing_time is null"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeIsNotNull() { + addCriterion("profit_sharing_time is not null"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeEqualTo(Date value) { + addCriterion("profit_sharing_time =", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeNotEqualTo(Date value) { + addCriterion("profit_sharing_time <>", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeGreaterThan(Date value) { + addCriterion("profit_sharing_time >", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeGreaterThanOrEqualTo(Date value) { + addCriterion("profit_sharing_time >=", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeLessThan(Date value) { + addCriterion("profit_sharing_time <", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeLessThanOrEqualTo(Date value) { + addCriterion("profit_sharing_time <=", value, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeIn(List values) { + addCriterion("profit_sharing_time in", values, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeNotIn(List values) { + addCriterion("profit_sharing_time not in", values, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeBetween(Date value1, Date value2) { + addCriterion("profit_sharing_time between", value1, value2, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andProfitSharingTimeNotBetween(Date value1, Date value2) { + addCriterion("profit_sharing_time not between", value1, value2, "profitSharingTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNull() { + addCriterion("finish_time is null"); + return (Criteria) this; + } + + public Criteria andFinishTimeIsNotNull() { + addCriterion("finish_time is not null"); + return (Criteria) this; + } + + public Criteria andFinishTimeEqualTo(Date value) { + addCriterion("finish_time =", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotEqualTo(Date value) { + addCriterion("finish_time <>", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThan(Date value) { + addCriterion("finish_time >", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeGreaterThanOrEqualTo(Date value) { + addCriterion("finish_time >=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThan(Date value) { + addCriterion("finish_time <", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeLessThanOrEqualTo(Date value) { + addCriterion("finish_time <=", value, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeIn(List values) { + addCriterion("finish_time in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotIn(List values) { + addCriterion("finish_time not in", values, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeBetween(Date value1, Date value2) { + addCriterion("finish_time between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andFinishTimeNotBetween(Date value1, Date value2) { + addCriterion("finish_time not between", value1, value2, "finishTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingReceiverService.java b/service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingReceiverService.java new file mode 100644 index 0000000..95b6f20 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingReceiverService.java @@ -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 getProfitSharingList(Map param); + +} diff --git a/service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingService.java b/service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingService.java new file mode 100644 index 0000000..4b0a5ee --- /dev/null +++ b/service/src/main/java/com/hfkj/service/BsTradeOrderProfitSharingService.java @@ -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 getNeedProfitSharingOrder(); + + /** + * 获取需要完结的订单 + * @return + */ + List getNeedFinishProfitSharingOrder(); +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoRateServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoRateServiceImpl.java index 5738121..d6d0b48 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoRateServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsMerPlatformNoRateServiceImpl.java @@ -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 list = merPlatformNoRateMapper.selectByExample(example); if (list.size() > 0) { return list.get(0); diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingReceiverServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingReceiverServiceImpl.java new file mode 100644 index 0000000..ac910e6 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingReceiverServiceImpl.java @@ -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 getProfitSharingList(Map 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); + } +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingServiceImpl.java new file mode 100644 index 0000000..28e3c1d --- /dev/null +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderProfitSharingServiceImpl.java @@ -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 getNeedProfitSharingOrder() { + return tradeOrderProfitSharingMapper.getNeedProfitSharingOrder(); + } + + @Override + public List getNeedFinishProfitSharingOrder() { + return tradeOrderProfitSharingMapper.getNeedFinishProfitSharingOrder(); + } +} diff --git a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java index f546f6a..9290c70 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsTradeOrderServiceImpl.java @@ -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 returnParam = new HashMap<>(); diff --git a/service/src/main/java/com/hfkj/sysenum/ProfitSharingReceiverObjectType.java b/service/src/main/java/com/hfkj/sysenum/ProfitSharingReceiverObjectType.java new file mode 100644 index 0000000..b6ed457 --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/ProfitSharingReceiverObjectType.java @@ -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 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; + } +} diff --git a/service/src/main/resources/dev/commonConfig.properties b/service/src/main/resources/dev/commonConfig.properties index a79134d..821497c 100644 --- a/service/src/main/resources/dev/commonConfig.properties +++ b/service/src/main/resources/dev/commonConfig.properties @@ -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 diff --git a/service/src/main/resources/prod/commonConfig.properties b/service/src/main/resources/prod/commonConfig.properties index fd40df1..d0d60bd 100644 --- a/service/src/main/resources/prod/commonConfig.properties +++ b/service/src/main/resources/prod/commonConfig.properties @@ -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/