From b3482bf70f81e289007250fc17426b4553fd3516 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 14 Jun 2024 17:25:56 +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/controller/BsDiscountController.java | 12 +- .../BsGasOilPriceTaskController.java | 6 +- .../bweb/controller/BsMerchantController.java | 2 + .../main/java/com/cweb/config/AuthConfig.java | 2 + .../com/cweb/controller/BsUserController.java | 22 + .../controller/order/GasOrderController.java | 2 +- .../controller/order/OrderPayController.java | 12 +- service/pom.xml | 5 + .../com/hfkj/common/alipay/AlipayRequest.java | 182 +++ .../com/hfkj/common/alipay/AlipayUtils.java | 49 + .../{utils => alipay}/AliyunService.java | 3 +- .../hfkj/dao/BsOrderSettleLedgerMapper.java | 134 ++ .../dao/BsOrderSettleLedgerMapperExt.java | 7 + .../dao/BsOrderSettleLedgerSqlProvider.java | 360 ++++++ .../com/hfkj/dao/BsOrderSettleMapper.java | 133 ++ .../com/hfkj/dao/BsOrderSettleMapperExt.java | 7 + .../hfkj/dao/BsOrderSettleSqlProvider.java | 360 ++++++ .../java/com/hfkj/entity/BsOrderSettle.java | 265 ++++ .../com/hfkj/entity/BsOrderSettleExample.java | 1134 +++++++++++++++++ .../com/hfkj/entity/BsOrderSettleLedger.java | 265 ++++ .../entity/BsOrderSettleLedgerExample.java | 1114 ++++++++++++++++ .../main/java/com/hfkj/pay/HuiPayService.java | 7 +- .../service/gas/BsGasOilGunNoService.java | 8 + .../gas/impl/BsGasOilGunNoServiceImpl.java | 6 + .../gas/impl/BsGasOrderServiceImpl.java | 2 +- .../service/gas/impl/BsGasServiceImpl.java | 20 +- .../service/impl/BsDiscountServiceImpl.java | 4 +- .../service/order/OrderCreateService.java | 6 +- .../service/order/OrderPaySuccessService.java | 1 + .../order/impl/BsOrderServiceImpl.java | 24 +- .../sec/impl/SecUserLoginLogServiceImpl.java | 2 +- .../user/impl/BsUserLoginLogServiceImpl.java | 2 +- .../order/OrderSettleLedgerStatusEnum.java | 42 + 33 files changed, 4154 insertions(+), 46 deletions(-) create mode 100644 service/src/main/java/com/hfkj/common/alipay/AlipayRequest.java create mode 100644 service/src/main/java/com/hfkj/common/alipay/AlipayUtils.java rename service/src/main/java/com/hfkj/common/{utils => alipay}/AliyunService.java (95%) create mode 100644 service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/dao/BsOrderSettleMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsOrderSettleMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsOrderSettleSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/BsOrderSettle.java create mode 100644 service/src/main/java/com/hfkj/entity/BsOrderSettleExample.java create mode 100644 service/src/main/java/com/hfkj/entity/BsOrderSettleLedger.java create mode 100644 service/src/main/java/com/hfkj/entity/BsOrderSettleLedgerExample.java create mode 100644 service/src/main/java/com/hfkj/sysenum/order/OrderSettleLedgerStatusEnum.java diff --git a/bweb/src/main/java/com/bweb/controller/BsDiscountController.java b/bweb/src/main/java/com/bweb/controller/BsDiscountController.java index caf915d..acfee96 100644 --- a/bweb/src/main/java/com/bweb/controller/BsDiscountController.java +++ b/bweb/src/main/java/com/bweb/controller/BsDiscountController.java @@ -13,6 +13,7 @@ import com.hfkj.entity.BsDevice; import com.hfkj.entity.BsDiscount; import com.hfkj.entity.BsMerchant; import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; import com.hfkj.service.BsDeviceService; import com.hfkj.service.BsDiscountService; import com.hfkj.service.BsMerchantService; @@ -40,6 +41,8 @@ public class BsDiscountController { private BsDiscountService discountService; @Resource private BsMerchantService merchantService; + @Resource + private UserCenter userCenter; @RequestMapping(value="/editDiscount",method = RequestMethod.POST) @ResponseBody @@ -231,8 +234,15 @@ public class BsDiscountController { @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { + SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); Map param = new HashMap<>(); - param.put("merNo", merNo); + if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { + param.put("merNo", merNo); + + } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode()) + || userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type3.getCode())) { + param.put("merNo", userInfoModel.getMerchant().getMerNo()); + } param.put("discountName", discountName); param.put("discountType", discountType); param.put("status", status); diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java index 3225769..09addd9 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceTaskController.java @@ -206,7 +206,6 @@ public class BsGasOilPriceTaskController { try { SecUserSessionObject userInfoModel = userCenter.getSessionModel(SecUserSessionObject.class); if (userInfoModel == null) { - log.error("HighGasController -> disabledOil() error!",""); throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); } @@ -219,8 +218,9 @@ public class BsGasOilPriceTaskController { if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { - } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { - param.put("merId", userInfoModel.getAccount().getId()); + } else if (userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode()) + || userInfoModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type3.getCode())) { + param.put("merId", userInfoModel.getMerchant().getId()); } param.put("oilType", oilType); param.put("oilNo", oilNo); diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantController.java index b784f1f..fdcb985 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerchantController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantController.java @@ -13,6 +13,7 @@ import com.hfkj.model.ResponseData; import com.hfkj.service.*; import com.hfkj.service.gas.BsGasOilGunNoService; import com.hfkj.service.gas.BsGasOilPriceService; +import com.hfkj.sysenum.MerchantSourceTypeEnum; import com.hfkj.sysenum.MerchantStatusEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -103,6 +104,7 @@ public class BsMerchantController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的省级"); } + merchant.setSourceType(MerchantSourceTypeEnum.type1.getNumber()); merchant.setProvinceCode(provinceRegion.getRegionId()); merchant.setProvinceName(provinceRegion.getRegionName()); merchant.setCityCode(cityRegion.getRegionId()); diff --git a/cweb/src/main/java/com/cweb/config/AuthConfig.java b/cweb/src/main/java/com/cweb/config/AuthConfig.java index d749003..4263028 100644 --- a/cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -89,6 +89,8 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/sms/*") .excludePathPatterns("/gas/*") .excludePathPatterns("/order/*") + .excludePathPatterns("/gasOrder/*") + .excludePathPatterns("/pay/*") .excludePathPatterns("/user/*") .excludePathPatterns("/notify/*") ; diff --git a/cweb/src/main/java/com/cweb/controller/BsUserController.java b/cweb/src/main/java/com/cweb/controller/BsUserController.java index 1c7f4b9..d9ed37b 100644 --- a/cweb/src/main/java/com/cweb/controller/BsUserController.java +++ b/cweb/src/main/java/com/cweb/controller/BsUserController.java @@ -1,6 +1,9 @@ package com.cweb.controller; import com.alibaba.fastjson.JSONObject; +import com.alipay.api.request.AlipaySystemOauthTokenRequest; +import com.alipay.api.response.AlipaySystemOauthTokenResponse; +import com.hfkj.common.alipay.AlipayUtils; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; @@ -158,4 +161,23 @@ public class BsUserController { } } + @RequestMapping(value="/getAlipayUserId",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取支付宝用户id") + public ResponseData getAlipayUserId(@RequestParam(value = "code", required = true) String code) { + try { + AlipaySystemOauthTokenRequest request = new AlipaySystemOauthTokenRequest(); + request.setGrantType("authorization_code"); + request.setCode(code); + AlipaySystemOauthTokenResponse response = AlipayUtils.initClient().certificateExecute(request); + if(response.isSuccess()){ + return ResponseMsgUtil.success(response); + } + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取失败"); + + } catch (Exception e) { + log.error(e.getMessage(), e); + return ResponseMsgUtil.exception(e); + } + } } diff --git a/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java b/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java index f253883..f9b1e01 100644 --- a/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java +++ b/cweb/src/main/java/com/cweb/controller/order/GasOrderController.java @@ -46,7 +46,7 @@ public class GasOrderController { Map param = new HashMap<>(); param.put("userId", userSession.getUser().getId()); param.put("orderNo", orderNo); - param.put("orderStatus", orderStatus); + param.put("status", orderStatus); PageHelper.startPage(pageNum,pageSize); return ResponseMsgUtil.success(new PageInfo<>(gasOrderService.getGasOrderList(param))); diff --git a/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java b/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java index 615c15b..45a7966 100644 --- a/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java +++ b/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java @@ -7,6 +7,7 @@ import com.hfkj.common.exception.SysCode; import com.hfkj.common.security.UserCenter; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsMerchantPayConfig; +import com.hfkj.entity.BsOrderSettle; import com.hfkj.model.ResponseData; import com.hfkj.model.UserSessionObject; import com.hfkj.model.order.OrderChildModel; @@ -74,8 +75,15 @@ public class OrderPayController { } order.setPayType(OrderPayTypeEnum.type1.getCode()); // 请求支付渠道 - Map preorder = HuiPayService.preorder(merPay.getChannelMerNo(), merPay.getChannelMerKey(), body.getString("userId"), order); + Map preorder = HuiPayService.preorder(merPay.getChannelMerNo(), merPay.getChannelMerKey(), body.getString("userId"), merPay.getLedgerAccountFlag(), order); + // 交易入账 + BsOrderSettle orderSettle = new BsOrderSettle(); + orderSettle.setOrderNo(order.getOrderNo()); + orderSettle.setSettleMerNo(merPay.getChannelMerNo()); + orderSettle.setSettleMerKey(merPay.getChannelMerKey()); + orderSettle.setSettleAmount(order.getPayRealPrice()); + orderSettle.setLedgerFlag(merPay.getLedgerAccountFlag()); return ResponseMsgUtil.success(preorder); } catch (Exception e) { @@ -111,7 +119,7 @@ public class OrderPayController { } order.setPayType(OrderPayTypeEnum.type2.getCode()); // 请求支付渠道 - Map preorder = HuiPayService.preorder(merPay.getChannelMerNo(), merPay.getChannelMerKey(), body.getString("userId"), order); + Map preorder = HuiPayService.preorder(merPay.getChannelMerNo(), merPay.getChannelMerKey(), body.getString("userId"), merPay.getLedgerAccountFlag(), order); return ResponseMsgUtil.success(preorder); } catch (Exception e) { diff --git a/service/pom.xml b/service/pom.xml index d3a58a9..2a4b391 100644 --- a/service/pom.xml +++ b/service/pom.xml @@ -260,6 +260,11 @@ rocketmq-spring-boot-starter 2.2.2 + + com.alipay.sdk + alipay-sdk-java + 4.39.104.ALL + org.projectlombok lombok diff --git a/service/src/main/java/com/hfkj/common/alipay/AlipayRequest.java b/service/src/main/java/com/hfkj/common/alipay/AlipayRequest.java new file mode 100644 index 0000000..8aaa998 --- /dev/null +++ b/service/src/main/java/com/hfkj/common/alipay/AlipayRequest.java @@ -0,0 +1,182 @@ +package com.hfkj.common.alipay; + +import com.alipay.api.AlipayClient; +import com.alipay.api.FileItem; +import com.alipay.api.domain.ZftSubMerchantOrder; +import com.alipay.api.request.AntMerchantExpandIndirectImageUploadRequest; +import com.alipay.api.request.AntMerchantExpandIndirectZftConsultRequest; +import com.alipay.api.request.AntMerchantExpandIndirectZftSettlementmodifyRequest; +import com.alipay.api.request.AntMerchantExpandIndirectZftorderQueryRequest; +import com.alipay.api.response.AntMerchantExpandIndirectImageUploadResponse; +import com.alipay.api.response.AntMerchantExpandIndirectZftConsultResponse; +import com.alipay.api.response.AntMerchantExpandIndirectZftSettlementmodifyResponse; +import com.alipay.api.response.AntMerchantExpandIndirectZftorderQueryResponse; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.util.List; + +/** + * 支付业务请求 + * @className: MerchantRequest + * @author: HuRui + * @date: 2023/2/17 + **/ +public class AlipayRequest { + + private static Logger log = LoggerFactory.getLogger(AlipayRequest.class); + + /** + * 商户创建预校验咨询 + * @param bizContent 进件参数 + * @return + * @throws Exception + */ + public static void merchantIndirectConsult(String bizContent) { + log.info("========== START 商户创建预校验咨询 =========="); + log.info("请求参数:" + bizContent); + try { + AlipayClient alipayClient = AlipayUtils.initClient(); + AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest(); + request.setBizContent(bizContent); + AntMerchantExpandIndirectZftConsultResponse response = alipayClient.certificateExecute(request); + log.info("响应参数:" + response); + if (response.isSuccess() != true || response.getAccountAudit() != true || response.getRiskAudit() != true) { + throw new Exception(response.getSubMsg()); + } + } catch (Exception e) { + log.info("出现异常:" + e); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); + } finally { + log.info("========== END 商户创建预校验咨询 =========="); + } + } + + /** + * 商户创建 + * @param bizContent 进件参数 + * @return 申请单号 + * @throws Exception + */ + public static String merchantIndirectCreate(String bizContent) { + log.info("========== START 商户创建 =========="); + log.info("请求参数:" + bizContent); + try { + AlipayClient alipayClient = AlipayUtils.initClient(); + AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest(); + request.setBizContent(bizContent); + AntMerchantExpandIndirectZftConsultResponse response = alipayClient.certificateExecute(request); + log.info("响应参数:" + response); + if (response.isSuccess()) { + return response.getOrderId(); + } + throw new Exception(response.getSubMsg()); + + } catch (Exception e) { + log.info("出现异常:" + e); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); + + } finally { + log.info("========== END 商户创建 =========="); + } + } + + /** + * 商户入驻进度查询 + * @param bizContent 进件参数 + * @return 申请单号 + * @throws Exception + */ + public static List merchantIndirectQuery(String bizContent) { + log.info("========== START 商户入驻进度查询 =========="); + log.info("请求参数:" + bizContent); + try { + AlipayClient alipayClient = AlipayUtils.initClient(); + AntMerchantExpandIndirectZftorderQueryRequest request = new AntMerchantExpandIndirectZftorderQueryRequest(); + request.setBizContent(bizContent); + AntMerchantExpandIndirectZftorderQueryResponse response = alipayClient.certificateExecute(request); + log.info("响应参数:" + response); + if (response.isSuccess()) { + return response.getOrders(); + } + throw new Exception(response.getSubMsg()); + + } catch (Exception e) { + log.info("出现异常:" + e); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); + + } finally { + log.info("========== END 商户入驻进度查询 =========="); + } + } + + /** + * 商户结算信息修改 + * @param bizContent 参数 + * @return + * @throws Exception + */ + public static String merchantIndirectSettlementModify(String bizContent) { + log.info("========== START 商户结算信息修改 =========="); + log.info("请求参数:" + bizContent); + try { + AlipayClient alipayClient = AlipayUtils.initClient(); + AntMerchantExpandIndirectZftSettlementmodifyRequest request = new AntMerchantExpandIndirectZftSettlementmodifyRequest (); + request.setBizContent(bizContent); + AntMerchantExpandIndirectZftSettlementmodifyResponse response = alipayClient.certificateExecute(request); + log.info("响应参数:" + response); + if (response.isSuccess()) { + return response.getOrderId(); + } + throw new Exception(response.getSubMsg()); + + } catch (Exception e) { + log.info("出现异常:" + e); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); + + } finally { + log.info("========== END 商户结算信息修改 =========="); + } + } + + /** + * 图片上传 + * @param fileUrl 本地路径 + * @return + * @throws Exception + */ + public static String imageUpload(String fileUrl) { + log.info("========== START 图片上传 =========="); + log.info("请求参数:" + fileUrl); + try { + AlipayClient alipayClient = AlipayUtils.initClient(); + // 读取本地文件 + FileItem imageContent = new FileItem(fileUrl); + + // 截取文件格式 + String imageType = StringUtils.substringAfterLast(fileUrl, "."); + + AntMerchantExpandIndirectImageUploadRequest request = new AntMerchantExpandIndirectImageUploadRequest(); + request.setImageContent(imageContent); + request.setImageType(imageType); + AntMerchantExpandIndirectImageUploadResponse response = alipayClient.certificateExecute(request); + log.info("响应参数:" + response); + if (response.isSuccess()) { + return response.getImageId(); + } + throw new Exception(response.getSubMsg()); + + } catch (Exception e) { + log.info("出现异常:" + e); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); + + } finally { + log.info("========== END 图片上传 =========="); + } + } + +} diff --git a/service/src/main/java/com/hfkj/common/alipay/AlipayUtils.java b/service/src/main/java/com/hfkj/common/alipay/AlipayUtils.java new file mode 100644 index 0000000..4440cf9 --- /dev/null +++ b/service/src/main/java/com/hfkj/common/alipay/AlipayUtils.java @@ -0,0 +1,49 @@ +package com.hfkj.common.alipay; + +import com.alipay.api.AlipayClient; +import com.alipay.api.AlipayConfig; +import com.alipay.api.DefaultAlipayClient; + +/** + * 支付宝配置 + * @className: AlipayConfig + * @author: HuRui + * @date: 2023/2/13 + **/ +public class AlipayUtils { + private final static String serverUrl = "https://openapi.alipay.com/gateway.do"; + private final static String appId = "2021004149636316"; + private final static String APP_PRIVATE_KEY = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCBObA50oioZEmUGTsSPJghAUf/lRT+TC+9HNyu0To3bSkLZSlEide2kszQnJk32+60QM26OudBaUnUCHkzv0++232hKPzSXHVVUykvu74itAtH66YxO2RqLt/OuTRBnFpiYPs0lXEoNeAsUQ92I6TOCrS8db/76Tvuye0nSH5lAJ6mwq8Hgo/+RQNRvIq3RFvWQOMD5lTp2lWsZ7x4FONtSmPCXd4fdYbKd1QrBHMZCQjBAn12YA+X+lmSNlnFo/xOu5rvKwMGJgvFLYxFdNHXgZUZfrjzOKA+sqq8lRfyVo4YHqRDi5bH1Ln2VUqZL9HidIHZx0YSKlfvdeuzR8abAgMBAAECggEAOOpwrLcGy6wIIDuQofKgSoEm9fHyoiJqMFAC/thWXM0uc79lkrNnmBlGLmeasFik5S1Zrzl8W3oFM2dcAqezdutzhMTpvblNUHxlOonlL6G/CjlHJI31JzNoDcPSuUclJAl0+u8LPNul1b8KIU2Hq9xZSFxQZ6KNbBnx4whx6wfZBvV06oy7hu7vfnWvobidooiGAxJuffRKuWQS8w6BPC7h2vz8AbiADHMA1YgCwIwroPbhU8QFY07PGeirAyJnrphZOIKSKwY9m8RK/AyBKL0iDopX/7nhdJ1LEiVbBlw50ej2VMAqfb0bA7z7zhhxwYCi6LN9DZfLQW9/Z3W8mQKBgQDyHdT/tex+s07zg4TUgAmTTqSyqp64j9Qbgdde2tTHUPjmOXXOpL5PvvT6xOu6dTwq5TwwqdsyVLh5T/cnYzqqXaZZzv6iWi1qajbLElf1r7bPquF2KCa0n2ZdxcYBH78bvIIuD7kGfmJDSA5a+1cgHJYZVer7MvYFf2id6H617wKBgQCIoqlgvYzTVDdXevI5LcOr1CfsBsuXoUdc8aUyFa1D6rj41wHXonqtmr/3tlo03HbUAQT0u/CjMf8raoW/2D1Sv7EnL3udb51qzYYj082x0DNUAs9CQq+AO8qhs8h4sXJGki7rjtJUtOfs1VFg84I5Z7IT9xKQMvsp2gmErpTGFQKBgQDIQYBxWEmZqjl9FKUDFjvVSVDULmdFhEEN12EJpbokeYbE9XXJS13Vm74IxGOtP1ZarGwSXAtfH8/NFyT3wQ0+6GK1GY5nPmsd/2f+otd58LImJdKB5kfNUaJboT9aoqVxDYQnEP4aruIbgDfPbN/tQXes0PGgf9AZT/55zVkwpQKBgFD9kkbctKADuHYrU28fOHAe5rcaZA3yNHncZt5kSPsMJC6kS9xE3FERfJ7ZwWi6Edmi7QwgZwhlN2rFzpgkFl15cQnYNH7izT2kq9GK18+BqRswOyh8nMj3KCpnhfo8vI8mUZehZf196kfRPlaooNVkKQN6nc9J2OU68A9s6JTtAoGBAOTabPjBoxWeNQwF2pR4E5SfXaMBKC7a6/+AMn9oUb9lvTPZtxXkIZkvn5iRz2UmrygLw4UCWKC3T7ujFIO0lHWktzVv2qPbINbfW10p0S/ioFvNxzP+ZDfSFrN03Zoh05H+0NXj1e4REMtIrbx5R+sJn6CVftpYfFcQd/lXy8MR"; + private final static String APP_CERT_PATH = "/home/project/oil/cert/alipay/appCertPublicKey_2021004149636316.crt"; + private final static String ALIPAY_CERT_PATH = "/home/project/oil/cert/alipay/alipayCertPublicKey_RSA2.crt"; + private final static String ALIPAY_ROOT_CERT_PATH = "/home/project/oil/cert/alipay/alipayRootCert.crt"; + + /** + * 初始化客户端请求 + * @return + */ + public static AlipayClient initClient() throws Exception { + AlipayConfig alipayConfig = new AlipayConfig(); + // 设置网关地址 + alipayConfig.setServerUrl(serverUrl); + // 设置应用APPID + alipayConfig.setAppId(appId); + // 设置应用私钥 + alipayConfig.setPrivateKey(APP_PRIVATE_KEY); + // 设置应用公钥证书路径 + alipayConfig.setAppCertPath(APP_CERT_PATH); + // 设置支付宝公钥证书路径 + alipayConfig.setAlipayPublicCertPath(ALIPAY_CERT_PATH); + // 设置支付宝根证书路径 + alipayConfig.setRootCertPath(ALIPAY_ROOT_CERT_PATH); + // 设置请求格式,固定值json + alipayConfig.setFormat("json"); + // 设置字符集 + alipayConfig.setCharset("utf-8"); + // 设置签名类型 + alipayConfig.setSignType("RSA2"); + return new DefaultAlipayClient(alipayConfig); + } + + +} diff --git a/service/src/main/java/com/hfkj/common/utils/AliyunService.java b/service/src/main/java/com/hfkj/common/alipay/AliyunService.java similarity index 95% rename from service/src/main/java/com/hfkj/common/utils/AliyunService.java rename to service/src/main/java/com/hfkj/common/alipay/AliyunService.java index 2ced96b..4d9a267 100644 --- a/service/src/main/java/com/hfkj/common/utils/AliyunService.java +++ b/service/src/main/java/com/hfkj/common/alipay/AliyunService.java @@ -1,6 +1,7 @@ -package com.hfkj.common.utils; +package com.hfkj.common.alipay; import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.utils.HttpUtils; import org.apache.http.HttpResponse; import org.apache.http.util.EntityUtils; diff --git a/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapper.java new file mode 100644 index 0000000..eb0cf74 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapper.java @@ -0,0 +1,134 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsOrderSettleLedger; +import com.hfkj.entity.BsOrderSettleLedgerExample; +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 BsOrderSettleLedgerMapper extends BsOrderSettleLedgerMapperExt { + @SelectProvider(type=BsOrderSettleLedgerSqlProvider.class, method="countByExample") + long countByExample(BsOrderSettleLedgerExample example); + + @DeleteProvider(type=BsOrderSettleLedgerSqlProvider.class, method="deleteByExample") + int deleteByExample(BsOrderSettleLedgerExample example); + + @Delete({ + "delete from bs_order_settle_ledger", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_order_settle_ledger (order_settle_id, ratio, ", + "sharing_amount, receiver_mer_no, ", + "receiver_mer_name, receiver_amount, ", + "`status`, create_time, ", + "profit_sharing_time, finish_time, ", + "ext_1, ext_2, ext_3)", + "values (#{orderSettleId,jdbcType=BIGINT}, #{ratio,jdbcType=DECIMAL}, ", + "#{sharingAmount,jdbcType=DECIMAL}, #{receiverMerNo,jdbcType=VARCHAR}, ", + "#{receiverMerName,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(BsOrderSettleLedger record); + + @InsertProvider(type=BsOrderSettleLedgerSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsOrderSettleLedger record); + + @SelectProvider(type=BsOrderSettleLedgerSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="order_settle_id", property="orderSettleId", jdbcType=JdbcType.BIGINT), + @Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL), + @Result(column="sharing_amount", property="sharingAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="receiver_mer_no", property="receiverMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="receiver_mer_name", property="receiverMerName", 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(BsOrderSettleLedgerExample example); + + @Select({ + "select", + "id, order_settle_id, ratio, sharing_amount, receiver_mer_no, receiver_mer_name, ", + "receiver_amount, `status`, create_time, profit_sharing_time, finish_time, ext_1, ", + "ext_2, ext_3", + "from bs_order_settle_ledger", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="order_settle_id", property="orderSettleId", jdbcType=JdbcType.BIGINT), + @Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL), + @Result(column="sharing_amount", property="sharingAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="receiver_mer_no", property="receiverMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="receiver_mer_name", property="receiverMerName", 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) + }) + BsOrderSettleLedger selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsOrderSettleLedgerSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsOrderSettleLedger record, @Param("example") BsOrderSettleLedgerExample example); + + @UpdateProvider(type=BsOrderSettleLedgerSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsOrderSettleLedger record, @Param("example") BsOrderSettleLedgerExample example); + + @UpdateProvider(type=BsOrderSettleLedgerSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsOrderSettleLedger record); + + @Update({ + "update bs_order_settle_ledger", + "set order_settle_id = #{orderSettleId,jdbcType=BIGINT},", + "ratio = #{ratio,jdbcType=DECIMAL},", + "sharing_amount = #{sharingAmount,jdbcType=DECIMAL},", + "receiver_mer_no = #{receiverMerNo,jdbcType=VARCHAR},", + "receiver_mer_name = #{receiverMerName,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(BsOrderSettleLedger record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapperExt.java b/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapperExt.java new file mode 100644 index 0000000..e48a67c --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsOrderSettleLedgerMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerSqlProvider.java new file mode 100644 index 0000000..8fd4bd3 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsOrderSettleLedgerSqlProvider.java @@ -0,0 +1,360 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsOrderSettleLedger; +import com.hfkj.entity.BsOrderSettleLedgerExample.Criteria; +import com.hfkj.entity.BsOrderSettleLedgerExample.Criterion; +import com.hfkj.entity.BsOrderSettleLedgerExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsOrderSettleLedgerSqlProvider { + + public String countByExample(BsOrderSettleLedgerExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_order_settle_ledger"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsOrderSettleLedgerExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_order_settle_ledger"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsOrderSettleLedger record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_order_settle_ledger"); + + if (record.getOrderSettleId() != null) { + sql.VALUES("order_settle_id", "#{orderSettleId,jdbcType=BIGINT}"); + } + + if (record.getRatio() != null) { + sql.VALUES("ratio", "#{ratio,jdbcType=DECIMAL}"); + } + + if (record.getSharingAmount() != null) { + sql.VALUES("sharing_amount", "#{sharingAmount,jdbcType=DECIMAL}"); + } + + if (record.getReceiverMerNo() != null) { + sql.VALUES("receiver_mer_no", "#{receiverMerNo,jdbcType=VARCHAR}"); + } + + if (record.getReceiverMerName() != null) { + sql.VALUES("receiver_mer_name", "#{receiverMerName,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(BsOrderSettleLedgerExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("order_settle_id"); + sql.SELECT("ratio"); + sql.SELECT("sharing_amount"); + sql.SELECT("receiver_mer_no"); + sql.SELECT("receiver_mer_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_order_settle_ledger"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsOrderSettleLedger record = (BsOrderSettleLedger) parameter.get("record"); + BsOrderSettleLedgerExample example = (BsOrderSettleLedgerExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_order_settle_ledger"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getOrderSettleId() != null) { + sql.SET("order_settle_id = #{record.orderSettleId,jdbcType=BIGINT}"); + } + + if (record.getRatio() != null) { + sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}"); + } + + if (record.getSharingAmount() != null) { + sql.SET("sharing_amount = #{record.sharingAmount,jdbcType=DECIMAL}"); + } + + if (record.getReceiverMerNo() != null) { + sql.SET("receiver_mer_no = #{record.receiverMerNo,jdbcType=VARCHAR}"); + } + + if (record.getReceiverMerName() != null) { + sql.SET("receiver_mer_name = #{record.receiverMerName,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_order_settle_ledger"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("order_settle_id = #{record.orderSettleId,jdbcType=BIGINT}"); + sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}"); + sql.SET("sharing_amount = #{record.sharingAmount,jdbcType=DECIMAL}"); + sql.SET("receiver_mer_no = #{record.receiverMerNo,jdbcType=VARCHAR}"); + sql.SET("receiver_mer_name = #{record.receiverMerName,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}"); + + BsOrderSettleLedgerExample example = (BsOrderSettleLedgerExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsOrderSettleLedger record) { + SQL sql = new SQL(); + sql.UPDATE("bs_order_settle_ledger"); + + if (record.getOrderSettleId() != null) { + sql.SET("order_settle_id = #{orderSettleId,jdbcType=BIGINT}"); + } + + if (record.getRatio() != null) { + sql.SET("ratio = #{ratio,jdbcType=DECIMAL}"); + } + + if (record.getSharingAmount() != null) { + sql.SET("sharing_amount = #{sharingAmount,jdbcType=DECIMAL}"); + } + + if (record.getReceiverMerNo() != null) { + sql.SET("receiver_mer_no = #{receiverMerNo,jdbcType=VARCHAR}"); + } + + if (record.getReceiverMerName() != null) { + sql.SET("receiver_mer_name = #{receiverMerName,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, BsOrderSettleLedgerExample 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/BsOrderSettleMapper.java b/service/src/main/java/com/hfkj/dao/BsOrderSettleMapper.java new file mode 100644 index 0000000..22d4f7c --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsOrderSettleMapper.java @@ -0,0 +1,133 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsOrderSettle; +import com.hfkj.entity.BsOrderSettleExample; +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 BsOrderSettleMapper extends BsOrderSettleMapperExt { + @SelectProvider(type=BsOrderSettleSqlProvider.class, method="countByExample") + long countByExample(BsOrderSettleExample example); + + @DeleteProvider(type=BsOrderSettleSqlProvider.class, method="deleteByExample") + int deleteByExample(BsOrderSettleExample example); + + @Delete({ + "delete from bs_order_settle", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_order_settle (order_no, settle_mer_no, ", + "settle_mer_key, settle_amount, ", + "ledger_flag, ledger_order_no, ", + "ledger_amount, ledger_status, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{orderNo,jdbcType=VARCHAR}, #{settleMerNo,jdbcType=VARCHAR}, ", + "#{settleMerKey,jdbcType=VARCHAR}, #{settleAmount,jdbcType=DECIMAL}, ", + "#{ledgerFlag,jdbcType=BIT}, #{ledgerOrderNo,jdbcType=VARCHAR}, ", + "#{ledgerAmount,jdbcType=DECIMAL}, #{ledgerStatus,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsOrderSettle record); + + @InsertProvider(type=BsOrderSettleSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsOrderSettle record); + + @SelectProvider(type=BsOrderSettleSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_mer_no", property="settleMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_mer_key", property="settleMerKey", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="ledger_flag", property="ledgerFlag", jdbcType=JdbcType.BIT), + @Result(column="ledger_order_no", property="ledgerOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="ledger_amount", property="ledgerAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="ledger_status", property="ledgerStatus", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(BsOrderSettleExample example); + + @Select({ + "select", + "id, order_no, settle_mer_no, settle_mer_key, settle_amount, ledger_flag, ledger_order_no, ", + "ledger_amount, ledger_status, create_time, update_time, ext_1, ext_2, ext_3", + "from bs_order_settle", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_mer_no", property="settleMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_mer_key", property="settleMerKey", jdbcType=JdbcType.VARCHAR), + @Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="ledger_flag", property="ledgerFlag", jdbcType=JdbcType.BIT), + @Result(column="ledger_order_no", property="ledgerOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="ledger_amount", property="ledgerAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="ledger_status", property="ledgerStatus", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + BsOrderSettle selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsOrderSettleSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsOrderSettle record, @Param("example") BsOrderSettleExample example); + + @UpdateProvider(type=BsOrderSettleSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsOrderSettle record, @Param("example") BsOrderSettleExample example); + + @UpdateProvider(type=BsOrderSettleSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsOrderSettle record); + + @Update({ + "update bs_order_settle", + "set order_no = #{orderNo,jdbcType=VARCHAR},", + "settle_mer_no = #{settleMerNo,jdbcType=VARCHAR},", + "settle_mer_key = #{settleMerKey,jdbcType=VARCHAR},", + "settle_amount = #{settleAmount,jdbcType=DECIMAL},", + "ledger_flag = #{ledgerFlag,jdbcType=BIT},", + "ledger_order_no = #{ledgerOrderNo,jdbcType=VARCHAR},", + "ledger_amount = #{ledgerAmount,jdbcType=DECIMAL},", + "ledger_status = #{ledgerStatus,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsOrderSettle record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsOrderSettleMapperExt.java b/service/src/main/java/com/hfkj/dao/BsOrderSettleMapperExt.java new file mode 100644 index 0000000..91f0a81 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsOrderSettleMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsOrderSettleMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsOrderSettleSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsOrderSettleSqlProvider.java new file mode 100644 index 0000000..b725e8a --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsOrderSettleSqlProvider.java @@ -0,0 +1,360 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsOrderSettle; +import com.hfkj.entity.BsOrderSettleExample.Criteria; +import com.hfkj.entity.BsOrderSettleExample.Criterion; +import com.hfkj.entity.BsOrderSettleExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsOrderSettleSqlProvider { + + public String countByExample(BsOrderSettleExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_order_settle"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsOrderSettleExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_order_settle"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsOrderSettle record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_order_settle"); + + if (record.getOrderNo() != null) { + sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleMerNo() != null) { + sql.VALUES("settle_mer_no", "#{settleMerNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleMerKey() != null) { + sql.VALUES("settle_mer_key", "#{settleMerKey,jdbcType=VARCHAR}"); + } + + if (record.getSettleAmount() != null) { + sql.VALUES("settle_amount", "#{settleAmount,jdbcType=DECIMAL}"); + } + + if (record.getLedgerFlag() != null) { + sql.VALUES("ledger_flag", "#{ledgerFlag,jdbcType=BIT}"); + } + + if (record.getLedgerOrderNo() != null) { + sql.VALUES("ledger_order_no", "#{ledgerOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getLedgerAmount() != null) { + sql.VALUES("ledger_amount", "#{ledgerAmount,jdbcType=DECIMAL}"); + } + + if (record.getLedgerStatus() != null) { + sql.VALUES("ledger_status", "#{ledgerStatus,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.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(BsOrderSettleExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("order_no"); + sql.SELECT("settle_mer_no"); + sql.SELECT("settle_mer_key"); + sql.SELECT("settle_amount"); + sql.SELECT("ledger_flag"); + sql.SELECT("ledger_order_no"); + sql.SELECT("ledger_amount"); + sql.SELECT("ledger_status"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_order_settle"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsOrderSettle record = (BsOrderSettle) parameter.get("record"); + BsOrderSettleExample example = (BsOrderSettleExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_order_settle"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleMerNo() != null) { + sql.SET("settle_mer_no = #{record.settleMerNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleMerKey() != null) { + sql.SET("settle_mer_key = #{record.settleMerKey,jdbcType=VARCHAR}"); + } + + if (record.getSettleAmount() != null) { + sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); + } + + if (record.getLedgerFlag() != null) { + sql.SET("ledger_flag = #{record.ledgerFlag,jdbcType=BIT}"); + } + + if (record.getLedgerOrderNo() != null) { + sql.SET("ledger_order_no = #{record.ledgerOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getLedgerAmount() != null) { + sql.SET("ledger_amount = #{record.ledgerAmount,jdbcType=DECIMAL}"); + } + + if (record.getLedgerStatus() != null) { + sql.SET("ledger_status = #{record.ledgerStatus,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.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_order_settle"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); + sql.SET("settle_mer_no = #{record.settleMerNo,jdbcType=VARCHAR}"); + sql.SET("settle_mer_key = #{record.settleMerKey,jdbcType=VARCHAR}"); + sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); + sql.SET("ledger_flag = #{record.ledgerFlag,jdbcType=BIT}"); + sql.SET("ledger_order_no = #{record.ledgerOrderNo,jdbcType=VARCHAR}"); + sql.SET("ledger_amount = #{record.ledgerAmount,jdbcType=DECIMAL}"); + sql.SET("ledger_status = #{record.ledgerStatus,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsOrderSettleExample example = (BsOrderSettleExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsOrderSettle record) { + SQL sql = new SQL(); + sql.UPDATE("bs_order_settle"); + + if (record.getOrderNo() != null) { + sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleMerNo() != null) { + sql.SET("settle_mer_no = #{settleMerNo,jdbcType=VARCHAR}"); + } + + if (record.getSettleMerKey() != null) { + sql.SET("settle_mer_key = #{settleMerKey,jdbcType=VARCHAR}"); + } + + if (record.getSettleAmount() != null) { + sql.SET("settle_amount = #{settleAmount,jdbcType=DECIMAL}"); + } + + if (record.getLedgerFlag() != null) { + sql.SET("ledger_flag = #{ledgerFlag,jdbcType=BIT}"); + } + + if (record.getLedgerOrderNo() != null) { + sql.SET("ledger_order_no = #{ledgerOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getLedgerAmount() != null) { + sql.SET("ledger_amount = #{ledgerAmount,jdbcType=DECIMAL}"); + } + + if (record.getLedgerStatus() != null) { + sql.SET("ledger_status = #{ledgerStatus,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.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, BsOrderSettleExample 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/entity/BsOrderSettle.java b/service/src/main/java/com/hfkj/entity/BsOrderSettle.java new file mode 100644 index 0000000..6b924ad --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsOrderSettle.java @@ -0,0 +1,265 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_order_settle + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsOrderSettle implements Serializable { + /** + * 主键ID + */ + private Long id; + + /** + * 订单号 + */ + private String orderNo; + + /** + * 入账商户号 + */ + private String settleMerNo; + + /** + * 入账商户key + */ + private String settleMerKey; + + /** + * 入账金额 + */ + private BigDecimal settleAmount; + + /** + * 是否分账 0:否 1:是 + */ + private Boolean ledgerFlag; + + /** + * 分账订单号 + */ + private String ledgerOrderNo; + + /** + * 分账金额 + */ + private BigDecimal ledgerAmount; + + /** + * 分账状态 0:待处理 1:已完成 2:处理中 3:已受理 4:失败 + */ + private Integer ledgerStatus; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getOrderNo() { + return orderNo; + } + + public void setOrderNo(String orderNo) { + this.orderNo = orderNo; + } + + public String getSettleMerNo() { + return settleMerNo; + } + + public void setSettleMerNo(String settleMerNo) { + this.settleMerNo = settleMerNo; + } + + public String getSettleMerKey() { + return settleMerKey; + } + + public void setSettleMerKey(String settleMerKey) { + this.settleMerKey = settleMerKey; + } + + public BigDecimal getSettleAmount() { + return settleAmount; + } + + public void setSettleAmount(BigDecimal settleAmount) { + this.settleAmount = settleAmount; + } + + public Boolean getLedgerFlag() { + return ledgerFlag; + } + + public void setLedgerFlag(Boolean ledgerFlag) { + this.ledgerFlag = ledgerFlag; + } + + public String getLedgerOrderNo() { + return ledgerOrderNo; + } + + public void setLedgerOrderNo(String ledgerOrderNo) { + this.ledgerOrderNo = ledgerOrderNo; + } + + public BigDecimal getLedgerAmount() { + return ledgerAmount; + } + + public void setLedgerAmount(BigDecimal ledgerAmount) { + this.ledgerAmount = ledgerAmount; + } + + public Integer getLedgerStatus() { + return ledgerStatus; + } + + public void setLedgerStatus(Integer ledgerStatus) { + this.ledgerStatus = ledgerStatus; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsOrderSettle other = (BsOrderSettle) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) + && (this.getSettleMerNo() == null ? other.getSettleMerNo() == null : this.getSettleMerNo().equals(other.getSettleMerNo())) + && (this.getSettleMerKey() == null ? other.getSettleMerKey() == null : this.getSettleMerKey().equals(other.getSettleMerKey())) + && (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount())) + && (this.getLedgerFlag() == null ? other.getLedgerFlag() == null : this.getLedgerFlag().equals(other.getLedgerFlag())) + && (this.getLedgerOrderNo() == null ? other.getLedgerOrderNo() == null : this.getLedgerOrderNo().equals(other.getLedgerOrderNo())) + && (this.getLedgerAmount() == null ? other.getLedgerAmount() == null : this.getLedgerAmount().equals(other.getLedgerAmount())) + && (this.getLedgerStatus() == null ? other.getLedgerStatus() == null : this.getLedgerStatus().equals(other.getLedgerStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); + result = prime * result + ((getSettleMerNo() == null) ? 0 : getSettleMerNo().hashCode()); + result = prime * result + ((getSettleMerKey() == null) ? 0 : getSettleMerKey().hashCode()); + result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode()); + result = prime * result + ((getLedgerFlag() == null) ? 0 : getLedgerFlag().hashCode()); + result = prime * result + ((getLedgerOrderNo() == null) ? 0 : getLedgerOrderNo().hashCode()); + result = prime * result + ((getLedgerAmount() == null) ? 0 : getLedgerAmount().hashCode()); + result = prime * result + ((getLedgerStatus() == null) ? 0 : getLedgerStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", orderNo=").append(orderNo); + sb.append(", settleMerNo=").append(settleMerNo); + sb.append(", settleMerKey=").append(settleMerKey); + sb.append(", settleAmount=").append(settleAmount); + sb.append(", ledgerFlag=").append(ledgerFlag); + sb.append(", ledgerOrderNo=").append(ledgerOrderNo); + sb.append(", ledgerAmount=").append(ledgerAmount); + sb.append(", ledgerStatus=").append(ledgerStatus); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsOrderSettleExample.java b/service/src/main/java/com/hfkj/entity/BsOrderSettleExample.java new file mode 100644 index 0000000..1127856 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsOrderSettleExample.java @@ -0,0 +1,1134 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsOrderSettleExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsOrderSettleExample() { + 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 andOrderNoIsNull() { + addCriterion("order_no is null"); + return (Criteria) this; + } + + public Criteria andOrderNoIsNotNull() { + addCriterion("order_no is not null"); + return (Criteria) this; + } + + public Criteria andOrderNoEqualTo(String value) { + addCriterion("order_no =", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotEqualTo(String value) { + addCriterion("order_no <>", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThan(String value) { + addCriterion("order_no >", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("order_no >=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThan(String value) { + addCriterion("order_no <", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLessThanOrEqualTo(String value) { + addCriterion("order_no <=", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoLike(String value) { + addCriterion("order_no like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotLike(String value) { + addCriterion("order_no not like", value, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoIn(List values) { + addCriterion("order_no in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotIn(List values) { + addCriterion("order_no not in", values, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoBetween(String value1, String value2) { + addCriterion("order_no between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andOrderNoNotBetween(String value1, String value2) { + addCriterion("order_no not between", value1, value2, "orderNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoIsNull() { + addCriterion("settle_mer_no is null"); + return (Criteria) this; + } + + public Criteria andSettleMerNoIsNotNull() { + addCriterion("settle_mer_no is not null"); + return (Criteria) this; + } + + public Criteria andSettleMerNoEqualTo(String value) { + addCriterion("settle_mer_no =", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoNotEqualTo(String value) { + addCriterion("settle_mer_no <>", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoGreaterThan(String value) { + addCriterion("settle_mer_no >", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoGreaterThanOrEqualTo(String value) { + addCriterion("settle_mer_no >=", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoLessThan(String value) { + addCriterion("settle_mer_no <", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoLessThanOrEqualTo(String value) { + addCriterion("settle_mer_no <=", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoLike(String value) { + addCriterion("settle_mer_no like", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoNotLike(String value) { + addCriterion("settle_mer_no not like", value, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoIn(List values) { + addCriterion("settle_mer_no in", values, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoNotIn(List values) { + addCriterion("settle_mer_no not in", values, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoBetween(String value1, String value2) { + addCriterion("settle_mer_no between", value1, value2, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerNoNotBetween(String value1, String value2) { + addCriterion("settle_mer_no not between", value1, value2, "settleMerNo"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyIsNull() { + addCriterion("settle_mer_key is null"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyIsNotNull() { + addCriterion("settle_mer_key is not null"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyEqualTo(String value) { + addCriterion("settle_mer_key =", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyNotEqualTo(String value) { + addCriterion("settle_mer_key <>", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyGreaterThan(String value) { + addCriterion("settle_mer_key >", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyGreaterThanOrEqualTo(String value) { + addCriterion("settle_mer_key >=", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyLessThan(String value) { + addCriterion("settle_mer_key <", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyLessThanOrEqualTo(String value) { + addCriterion("settle_mer_key <=", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyLike(String value) { + addCriterion("settle_mer_key like", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyNotLike(String value) { + addCriterion("settle_mer_key not like", value, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyIn(List values) { + addCriterion("settle_mer_key in", values, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyNotIn(List values) { + addCriterion("settle_mer_key not in", values, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyBetween(String value1, String value2) { + addCriterion("settle_mer_key between", value1, value2, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleMerKeyNotBetween(String value1, String value2) { + addCriterion("settle_mer_key not between", value1, value2, "settleMerKey"); + return (Criteria) this; + } + + public Criteria andSettleAmountIsNull() { + addCriterion("settle_amount is null"); + return (Criteria) this; + } + + public Criteria andSettleAmountIsNotNull() { + addCriterion("settle_amount is not null"); + return (Criteria) this; + } + + public Criteria andSettleAmountEqualTo(BigDecimal value) { + addCriterion("settle_amount =", value, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountNotEqualTo(BigDecimal value) { + addCriterion("settle_amount <>", value, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountGreaterThan(BigDecimal value) { + addCriterion("settle_amount >", value, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("settle_amount >=", value, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountLessThan(BigDecimal value) { + addCriterion("settle_amount <", value, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("settle_amount <=", value, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountIn(List values) { + addCriterion("settle_amount in", values, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountNotIn(List values) { + addCriterion("settle_amount not in", values, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("settle_amount between", value1, value2, "settleAmount"); + return (Criteria) this; + } + + public Criteria andSettleAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("settle_amount not between", value1, value2, "settleAmount"); + return (Criteria) this; + } + + public Criteria andLedgerFlagIsNull() { + addCriterion("ledger_flag is null"); + return (Criteria) this; + } + + public Criteria andLedgerFlagIsNotNull() { + addCriterion("ledger_flag is not null"); + return (Criteria) this; + } + + public Criteria andLedgerFlagEqualTo(Boolean value) { + addCriterion("ledger_flag =", value, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagNotEqualTo(Boolean value) { + addCriterion("ledger_flag <>", value, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagGreaterThan(Boolean value) { + addCriterion("ledger_flag >", value, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagGreaterThanOrEqualTo(Boolean value) { + addCriterion("ledger_flag >=", value, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagLessThan(Boolean value) { + addCriterion("ledger_flag <", value, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagLessThanOrEqualTo(Boolean value) { + addCriterion("ledger_flag <=", value, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagIn(List values) { + addCriterion("ledger_flag in", values, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagNotIn(List values) { + addCriterion("ledger_flag not in", values, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagBetween(Boolean value1, Boolean value2) { + addCriterion("ledger_flag between", value1, value2, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerFlagNotBetween(Boolean value1, Boolean value2) { + addCriterion("ledger_flag not between", value1, value2, "ledgerFlag"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoIsNull() { + addCriterion("ledger_order_no is null"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoIsNotNull() { + addCriterion("ledger_order_no is not null"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoEqualTo(String value) { + addCriterion("ledger_order_no =", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoNotEqualTo(String value) { + addCriterion("ledger_order_no <>", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoGreaterThan(String value) { + addCriterion("ledger_order_no >", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("ledger_order_no >=", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoLessThan(String value) { + addCriterion("ledger_order_no <", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoLessThanOrEqualTo(String value) { + addCriterion("ledger_order_no <=", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoLike(String value) { + addCriterion("ledger_order_no like", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoNotLike(String value) { + addCriterion("ledger_order_no not like", value, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoIn(List values) { + addCriterion("ledger_order_no in", values, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoNotIn(List values) { + addCriterion("ledger_order_no not in", values, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoBetween(String value1, String value2) { + addCriterion("ledger_order_no between", value1, value2, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerOrderNoNotBetween(String value1, String value2) { + addCriterion("ledger_order_no not between", value1, value2, "ledgerOrderNo"); + return (Criteria) this; + } + + public Criteria andLedgerAmountIsNull() { + addCriterion("ledger_amount is null"); + return (Criteria) this; + } + + public Criteria andLedgerAmountIsNotNull() { + addCriterion("ledger_amount is not null"); + return (Criteria) this; + } + + public Criteria andLedgerAmountEqualTo(BigDecimal value) { + addCriterion("ledger_amount =", value, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountNotEqualTo(BigDecimal value) { + addCriterion("ledger_amount <>", value, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountGreaterThan(BigDecimal value) { + addCriterion("ledger_amount >", value, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("ledger_amount >=", value, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountLessThan(BigDecimal value) { + addCriterion("ledger_amount <", value, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("ledger_amount <=", value, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountIn(List values) { + addCriterion("ledger_amount in", values, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountNotIn(List values) { + addCriterion("ledger_amount not in", values, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("ledger_amount between", value1, value2, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("ledger_amount not between", value1, value2, "ledgerAmount"); + return (Criteria) this; + } + + public Criteria andLedgerStatusIsNull() { + addCriterion("ledger_status is null"); + return (Criteria) this; + } + + public Criteria andLedgerStatusIsNotNull() { + addCriterion("ledger_status is not null"); + return (Criteria) this; + } + + public Criteria andLedgerStatusEqualTo(Integer value) { + addCriterion("ledger_status =", value, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusNotEqualTo(Integer value) { + addCriterion("ledger_status <>", value, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusGreaterThan(Integer value) { + addCriterion("ledger_status >", value, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("ledger_status >=", value, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusLessThan(Integer value) { + addCriterion("ledger_status <", value, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusLessThanOrEqualTo(Integer value) { + addCriterion("ledger_status <=", value, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusIn(List values) { + addCriterion("ledger_status in", values, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusNotIn(List values) { + addCriterion("ledger_status not in", values, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusBetween(Integer value1, Integer value2) { + addCriterion("ledger_status between", value1, value2, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andLedgerStatusNotBetween(Integer value1, Integer value2) { + addCriterion("ledger_status not between", value1, value2, "ledgerStatus"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria 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/BsOrderSettleLedger.java b/service/src/main/java/com/hfkj/entity/BsOrderSettleLedger.java new file mode 100644 index 0000000..acebe40 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsOrderSettleLedger.java @@ -0,0 +1,265 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_order_settle_ledger + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsOrderSettleLedger implements Serializable { + /** + * 主键ID + */ + private Long id; + + /** + * 交易入账记录id + */ + private Long orderSettleId; + + /** + * 分账比例 单位:% + */ + private BigDecimal ratio; + + /** + * 分账金额 + */ + private BigDecimal sharingAmount; + + /** + * 分账接收方账户编号 + */ + private String receiverMerNo; + + /** + * 分账接收方账户名称 + */ + private String receiverMerName; + + /** + * 分账接收金额 + */ + private BigDecimal receiverAmount; + + /** + * 分账状态 0:未分账 1:已分账 + */ + 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 getOrderSettleId() { + return orderSettleId; + } + + public void setOrderSettleId(Long orderSettleId) { + this.orderSettleId = orderSettleId; + } + + public BigDecimal getRatio() { + return ratio; + } + + public void setRatio(BigDecimal ratio) { + this.ratio = ratio; + } + + public BigDecimal getSharingAmount() { + return sharingAmount; + } + + public void setSharingAmount(BigDecimal sharingAmount) { + this.sharingAmount = sharingAmount; + } + + public String getReceiverMerNo() { + return receiverMerNo; + } + + public void setReceiverMerNo(String receiverMerNo) { + this.receiverMerNo = receiverMerNo; + } + + public String getReceiverMerName() { + return receiverMerName; + } + + public void setReceiverMerName(String receiverMerName) { + this.receiverMerName = receiverMerName; + } + + 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; + } + BsOrderSettleLedger other = (BsOrderSettleLedger) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getOrderSettleId() == null ? other.getOrderSettleId() == null : this.getOrderSettleId().equals(other.getOrderSettleId())) + && (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio())) + && (this.getSharingAmount() == null ? other.getSharingAmount() == null : this.getSharingAmount().equals(other.getSharingAmount())) + && (this.getReceiverMerNo() == null ? other.getReceiverMerNo() == null : this.getReceiverMerNo().equals(other.getReceiverMerNo())) + && (this.getReceiverMerName() == null ? other.getReceiverMerName() == null : this.getReceiverMerName().equals(other.getReceiverMerName())) + && (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 + ((getOrderSettleId() == null) ? 0 : getOrderSettleId().hashCode()); + result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode()); + result = prime * result + ((getSharingAmount() == null) ? 0 : getSharingAmount().hashCode()); + result = prime * result + ((getReceiverMerNo() == null) ? 0 : getReceiverMerNo().hashCode()); + result = prime * result + ((getReceiverMerName() == null) ? 0 : getReceiverMerName().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(", orderSettleId=").append(orderSettleId); + sb.append(", ratio=").append(ratio); + sb.append(", sharingAmount=").append(sharingAmount); + sb.append(", receiverMerNo=").append(receiverMerNo); + sb.append(", receiverMerName=").append(receiverMerName); + 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/BsOrderSettleLedgerExample.java b/service/src/main/java/com/hfkj/entity/BsOrderSettleLedgerExample.java new file mode 100644 index 0000000..0396eb9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsOrderSettleLedgerExample.java @@ -0,0 +1,1114 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsOrderSettleLedgerExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsOrderSettleLedgerExample() { + 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 andOrderSettleIdIsNull() { + addCriterion("order_settle_id is null"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdIsNotNull() { + addCriterion("order_settle_id is not null"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdEqualTo(Long value) { + addCriterion("order_settle_id =", value, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdNotEqualTo(Long value) { + addCriterion("order_settle_id <>", value, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdGreaterThan(Long value) { + addCriterion("order_settle_id >", value, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdGreaterThanOrEqualTo(Long value) { + addCriterion("order_settle_id >=", value, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdLessThan(Long value) { + addCriterion("order_settle_id <", value, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdLessThanOrEqualTo(Long value) { + addCriterion("order_settle_id <=", value, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdIn(List values) { + addCriterion("order_settle_id in", values, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdNotIn(List values) { + addCriterion("order_settle_id not in", values, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdBetween(Long value1, Long value2) { + addCriterion("order_settle_id between", value1, value2, "orderSettleId"); + return (Criteria) this; + } + + public Criteria andOrderSettleIdNotBetween(Long value1, Long value2) { + addCriterion("order_settle_id not between", value1, value2, "orderSettleId"); + 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 andSharingAmountIsNull() { + addCriterion("sharing_amount is null"); + return (Criteria) this; + } + + public Criteria andSharingAmountIsNotNull() { + addCriterion("sharing_amount is not null"); + return (Criteria) this; + } + + public Criteria andSharingAmountEqualTo(BigDecimal value) { + addCriterion("sharing_amount =", value, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountNotEqualTo(BigDecimal value) { + addCriterion("sharing_amount <>", value, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountGreaterThan(BigDecimal value) { + addCriterion("sharing_amount >", value, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("sharing_amount >=", value, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountLessThan(BigDecimal value) { + addCriterion("sharing_amount <", value, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("sharing_amount <=", value, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountIn(List values) { + addCriterion("sharing_amount in", values, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountNotIn(List values) { + addCriterion("sharing_amount not in", values, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("sharing_amount between", value1, value2, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andSharingAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("sharing_amount not between", value1, value2, "sharingAmount"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoIsNull() { + addCriterion("receiver_mer_no is null"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoIsNotNull() { + addCriterion("receiver_mer_no is not null"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoEqualTo(String value) { + addCriterion("receiver_mer_no =", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoNotEqualTo(String value) { + addCriterion("receiver_mer_no <>", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoGreaterThan(String value) { + addCriterion("receiver_mer_no >", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoGreaterThanOrEqualTo(String value) { + addCriterion("receiver_mer_no >=", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoLessThan(String value) { + addCriterion("receiver_mer_no <", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoLessThanOrEqualTo(String value) { + addCriterion("receiver_mer_no <=", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoLike(String value) { + addCriterion("receiver_mer_no like", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoNotLike(String value) { + addCriterion("receiver_mer_no not like", value, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoIn(List values) { + addCriterion("receiver_mer_no in", values, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoNotIn(List values) { + addCriterion("receiver_mer_no not in", values, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoBetween(String value1, String value2) { + addCriterion("receiver_mer_no between", value1, value2, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNoNotBetween(String value1, String value2) { + addCriterion("receiver_mer_no not between", value1, value2, "receiverMerNo"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameIsNull() { + addCriterion("receiver_mer_name is null"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameIsNotNull() { + addCriterion("receiver_mer_name is not null"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameEqualTo(String value) { + addCriterion("receiver_mer_name =", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameNotEqualTo(String value) { + addCriterion("receiver_mer_name <>", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameGreaterThan(String value) { + addCriterion("receiver_mer_name >", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameGreaterThanOrEqualTo(String value) { + addCriterion("receiver_mer_name >=", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameLessThan(String value) { + addCriterion("receiver_mer_name <", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameLessThanOrEqualTo(String value) { + addCriterion("receiver_mer_name <=", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameLike(String value) { + addCriterion("receiver_mer_name like", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameNotLike(String value) { + addCriterion("receiver_mer_name not like", value, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameIn(List values) { + addCriterion("receiver_mer_name in", values, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameNotIn(List values) { + addCriterion("receiver_mer_name not in", values, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameBetween(String value1, String value2) { + addCriterion("receiver_mer_name between", value1, value2, "receiverMerName"); + return (Criteria) this; + } + + public Criteria andReceiverMerNameNotBetween(String value1, String value2) { + addCriterion("receiver_mer_name not between", value1, value2, "receiverMerName"); + 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/pay/HuiPayService.java b/service/src/main/java/com/hfkj/pay/HuiPayService.java index 692482e..9bd08de 100644 --- a/service/src/main/java/com/hfkj/pay/HuiPayService.java +++ b/service/src/main/java/com/hfkj/pay/HuiPayService.java @@ -37,7 +37,7 @@ public class HuiPayService { * @return * @throws Exception */ - public static Map preorder(String merNo,String merKey,String openId,OrderModel order) throws Exception { + public static Map preorder(String merNo,String merKey,String openId,boolean profitSharing,OrderModel order) throws Exception { try { log.info("=============== start 惠支付 start =================="); Map param = new HashMap<>(); @@ -50,8 +50,8 @@ public class HuiPayService { param.put("payMode", "ALIPAY"); } param.put("totalAmount", order.getPayRealPrice()); - param.put("profitSharing", "0"); - param.put("subject", "购买产品"); + param.put("profitSharing", profitSharing?1:0); + param.put("subject", "在线加油"); param.put("userId", openId); param.put("notifyUrl", CommonSysConst.getSysConfig().getHuiPayPreorderNotifyUrl()); param.put("sign", SignatureUtil.createSign(param, merKey)); @@ -61,7 +61,6 @@ public class HuiPayService { JSONObject response = HttpsUtils.doPost(REQUEST_URL + "trade/preorder", param, new HashMap<>()); log.info("响应参数:" + response.toJSONString()); - if (response != null && response.getString("return_code").equals("000000")) { JSONObject payParam = response.getJSONObject("return_data").getJSONObject("payParam"); SortedMap sortedMap = new TreeMap<>(); diff --git a/service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java b/service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java index 39a71ed..34e1bc4 100644 --- a/service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java +++ b/service/src/main/java/com/hfkj/service/gas/BsGasOilGunNoService.java @@ -37,6 +37,14 @@ public interface BsGasOilGunNoService { */ List getOilGunNoList(String merNo); + /** + * 查询油站枪号列表 + * @param merNo + * @param oilNo + * @return + */ + List getOilGunNoList(String merNo,String oilNo); + /** * 查询详情 * @param merNo 商户号 diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java index f3a5f7e..6069105 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilGunNoServiceImpl.java @@ -13,6 +13,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.util.Date; import java.util.List; +import java.util.stream.Collectors; /** * @className: BsGasOilGunNoServiceImpl @@ -72,6 +73,11 @@ public class BsGasOilGunNoServiceImpl implements BsGasOilGunNoService { return joinCache(merNo); } + @Override + public List getOilGunNoList(String merNo, String oilNo) { + return getOilGunNoList(merNo).stream().filter(o->o.getOilNo().equals(oilNo)).collect(Collectors.toList()); + } + @Override public BsGasOilGunNo getDetail(String merNo, String oilNo, String gunNo) { BsGasOilGunNoExample example = new BsGasOilGunNoExample(); diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java index 83a09fa..59d3aa7 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java @@ -54,7 +54,7 @@ public class BsGasOrderServiceImpl implements BsGasOrderService { BsGasOrderExample example = new BsGasOrderExample(); example.createCriteria().andOrderNoEqualTo(orderNo); List list = gasOrderMapper.selectByExample(example); - if (list.size() > 0) { + if (!list.isEmpty()) { return list.get(0); } return null; diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java index 542a0ed..be96e42 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java @@ -59,7 +59,6 @@ public class BsGasServiceImpl implements BsGasService { if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站"); } - // 优惠比例 BigDecimal discount = new BigDecimal("100"); @@ -109,26 +108,17 @@ public class BsGasServiceImpl implements BsGasService { // 平台价 payPriceModel.setPricePlatform(pricePlatform); - // 加油升数,计算方式:加油金额 / 枪价 - payPriceModel.setOilLiters(refuelPrice.divide(priceGun, 2, BigDecimal.ROUND_HALF_DOWN)); + // 加油升数,计算方式:加油金额 / 国标价 + payPriceModel.setOilLiters(refuelPrice.divide(priceOfficial, 2, BigDecimal.ROUND_HALF_DOWN)); // 平台折扣,我们平台或者代理商设置的折扣 payPriceModel.setDiscount(discount.compareTo(new BigDecimal("1.00")) == 0 ? new BigDecimal("1.00") : discount); - // 加油补贴, 计算方式:加油站枪价 - 加油站VIP价 - // payPriceModel.setOilSubsidy(priceGun.subtract(priceVip)); - - // 折扣,1 -平台折扣 - BigDecimal decimal1 = new BigDecimal("1").subtract(discount); - - // 油枪价 - 平台补贴 - // BigDecimal price = payPriceModel.getPriceGun().subtract(preferentialMargin); - // 优惠价格 油站VIP价 * 系统折扣 payPriceModel.setPricePreferences(priceVip.multiply(discount).setScale(2, BigDecimal.ROUND_HALF_UP)); - // 每升优惠 油站价 - 优惠价格 - payPriceModel.setLitersPreferences(payPriceModel.getPriceGun().subtract(payPriceModel.getPricePreferences())); + // 每升优惠 国标价 - 优惠价格 + payPriceModel.setLitersPreferences(payPriceModel.getPriceOfficial().subtract(payPriceModel.getPricePreferences())); // 本次优惠 加油升数 * 每升优惠 payPriceModel.setTotalPreferences(payPriceModel.getOilLiters().multiply(payPriceModel.getLitersPreferences()).setScale(2, BigDecimal.ROUND_HALF_UP)); @@ -162,7 +152,7 @@ public class BsGasServiceImpl implements BsGasService { GasOilPriceModel oilNo = new GasOilPriceModel(); BeanUtils.copyProperties(gasOilPrice, oilNo); // 查询抢号 - oilNo.setGasOilGunNo(gasOilGunNoService.getOilGunNoList(merNo)); + oilNo.setGasOilGunNo(gasOilGunNoService.getOilGunNoList(merNo, gasOilPrice.getOilNo())); oilNoModelList.add(oilNo); } diff --git a/service/src/main/java/com/hfkj/service/impl/BsDiscountServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/BsDiscountServiceImpl.java index 291fb04..9ee713f 100644 --- a/service/src/main/java/com/hfkj/service/impl/BsDiscountServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/impl/BsDiscountServiceImpl.java @@ -129,8 +129,8 @@ public class BsDiscountServiceImpl implements BsDiscountService { BsDiscountExample example = new BsDiscountExample(); BsDiscountExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(DiscountStatusEnum.status0.getCode()); - if (StringUtils.isNotBlank(MapUtils.getString(param, ""))) { - criteria.andMerNoEqualTo(MapUtils.getString(param, "")); + if (StringUtils.isNotBlank(MapUtils.getString(param, "merNo"))) { + criteria.andMerNoEqualTo(MapUtils.getString(param, "merNo")); } if (StringUtils.isNotBlank(MapUtils.getString(param, "discountName"))) { diff --git a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java index e1e95e2..e08d299 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java @@ -82,6 +82,11 @@ public class OrderCreateService { gasOrder.setMerAddress(merchant.getAddress()); gasOrder.setStatus(OrderOilStatus.STATUS1.getNumber()); + gasOrder.setDeductionCouponPrice(new BigDecimal("0")); + gasOrder.setDeductionOilPrice(priceModel.getTotalPreferences()); + gasOrder.setPayablePrice(priceModel.getPayPrice()); + gasOrder.setTotalDeductionPrice(gasOrder.getDeductionOilPrice().add(gasOrder.getDeductionCouponPrice())); + // 油价信息 gasOrder.setGasRefuelPrice(orderChild.getProductPrice()); gasOrder.setGasOilNo(orderChild.getGasOilNo()); @@ -135,7 +140,6 @@ public class OrderCreateService { orderChild.setProductSpecName("默认"); orderChild.setProductCount(1); orderChild.setProductActualPrice(gasOrder.getPayablePrice()); - orderChild.setProductTotalPrice(new BigDecimal(orderChild.getProductPrice().toString()).multiply(orderChild.getProductPrice())); return orderChild; } diff --git a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java index f5b9577..c657e13 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java @@ -61,6 +61,7 @@ public class OrderPaySuccessService { gasOrder.setTotalDeductionPrice(order.getDeduction().getTotalDeductionPrice()); gasOrder.setDeductionCouponPrice(order.getDeduction().getCouponDiscountPrice()); gasOrder.setPayIntegral(order.getDeduction().getIntegralDiscountPrice()); + gasOrder.setActualPayPrice(order.getPayRealPrice()); gasOrder.setPayType(order.getPayType()); gasOrder.setPayTime(order.getPayTime()); gasOrder.setStatus(OrderOilStatus.STATUS2.getNumber()); diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java index f9761fe..aaf162b 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java @@ -1,6 +1,5 @@ package com.hfkj.service.order.impl; -import com.hfkj.common.exception.BaseException; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; @@ -8,10 +7,7 @@ import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.RandomUtils; import com.hfkj.common.utils.RedisUtil; import com.hfkj.dao.BsOrderMapper; -import com.hfkj.entity.BsOrder; -import com.hfkj.entity.BsOrderChild; -import com.hfkj.entity.BsOrderDeduction; -import com.hfkj.entity.BsOrderExample; +import com.hfkj.entity.*; import com.hfkj.model.order.OrderChildModel; import com.hfkj.model.order.OrderModel; import com.hfkj.mqtopic.OrderTopic; @@ -105,6 +101,13 @@ public class BsOrderServiceImpl implements BsOrderService { order.setOrderNo(DateUtil.date2String(new Date(), "yyMMddHHmmss") + RandomUtils.number(6, false)); editData(order); + /*****初始化优惠*****/ + BsOrderDeduction deduction = order.getDeduction()==null?new BsOrderDeduction():order.getDeduction(); + deduction.setOrderId(order.getId()); + deduction.setOrderNo(order.getOrderNo()); + deduction.setIntegralDiscountPrice(deduction.getIntegralDiscountPrice()==null?0L: deduction.getIntegralDiscountPrice()); + /*****初始化优惠*****/ + // 订单总金额 BigDecimal totalPrice = new BigDecimal("0"); // 商品总金额 @@ -117,9 +120,9 @@ public class BsOrderServiceImpl implements BsOrderService { child.setChildOrderNo(order.getId()+RandomUtils.number(4, false)); // 提交订单前业务处理 if (child.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) { - child = orderCreateService.oilHandle(order, null, child); + child = orderCreateService.oilHandle(order, deduction, child); } - child.setProductTotalPrice(child.getProductPrice().multiply(new BigDecimal(child.getProductCount().toString()))); + child.setProductTotalPrice(child.getProductActualPrice().multiply(new BigDecimal(child.getProductCount().toString()))); child.setStatus(OrderChildStatusEnum.status1.getCode()); productTotalPrice = productTotalPrice.add(child.getProductTotalPrice()); @@ -130,13 +133,9 @@ public class BsOrderServiceImpl implements BsOrderService { order.setProductTotalPrice(productTotalPrice); /************ 交易优惠 **************/ - BsOrderDeduction deduction = new BsOrderDeduction(); - deduction.setOrderId(order.getId()); - deduction.setOrderNo(order.getOrderNo()); - deduction.setTotalDeductionPrice(new BigDecimal("0")); deduction.setCouponDiscountPrice(new BigDecimal("0")); deduction.setCouponDiscountActualPrice(new BigDecimal("0")); - deduction.setIntegralDiscountPrice(0L); + deduction.setTotalDeductionPrice(deduction.getCouponDiscountActualPrice().add(new BigDecimal(deduction.getIntegralDiscountPrice().toString()).divide(new BigDecimal("100")))); order.setDeduction(deduction); /* BsOrderDeduction deduction = order.getDeduction()==null?new BsOrderDeduction():order.getDeduction(); deduction.setOrderId(order.getId()); @@ -361,7 +360,6 @@ public class BsOrderServiceImpl implements BsOrderService { childOrder.setStatus(OrderChildStatusEnum.status2.getCode()); orderChildService.editData(childOrder); } - // 处理业务 orderPaySuccessService.orderBusHandle(order); } diff --git a/service/src/main/java/com/hfkj/service/sec/impl/SecUserLoginLogServiceImpl.java b/service/src/main/java/com/hfkj/service/sec/impl/SecUserLoginLogServiceImpl.java index e47075a..6aa9d51 100644 --- a/service/src/main/java/com/hfkj/service/sec/impl/SecUserLoginLogServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/sec/impl/SecUserLoginLogServiceImpl.java @@ -1,7 +1,7 @@ package com.hfkj.service.sec.impl; import com.alibaba.fastjson.JSONObject; -import com.hfkj.common.utils.AliyunService; +import com.hfkj.common.alipay.AliyunService; import com.hfkj.common.utils.RequestUtils; import com.hfkj.dao.SecUserLoginLogMapper; import com.hfkj.entity.SecUser; diff --git a/service/src/main/java/com/hfkj/service/user/impl/BsUserLoginLogServiceImpl.java b/service/src/main/java/com/hfkj/service/user/impl/BsUserLoginLogServiceImpl.java index c874b28..ef3a7fc 100644 --- a/service/src/main/java/com/hfkj/service/user/impl/BsUserLoginLogServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/user/impl/BsUserLoginLogServiceImpl.java @@ -1,7 +1,7 @@ package com.hfkj.service.user.impl; import com.alibaba.fastjson.JSONObject; -import com.hfkj.common.utils.AliyunService; +import com.hfkj.common.alipay.AliyunService; import com.hfkj.common.utils.RequestUtils; import com.hfkj.dao.BsUserLoginLogMapper; import com.hfkj.entity.BsUser; diff --git a/service/src/main/java/com/hfkj/sysenum/order/OrderSettleLedgerStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/order/OrderSettleLedgerStatusEnum.java new file mode 100644 index 0000000..ac60985 --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/order/OrderSettleLedgerStatusEnum.java @@ -0,0 +1,42 @@ +package com.hfkj.sysenum.order; + +import lombok.Getter; + +/** + * @className: OrderSettleLedgerStatusEnum + * @author: HuRui + * @date: 2024/6/14 + **/ +@Getter +public enum OrderSettleLedgerStatusEnum { + /** + * 待处理 + */ + status0(0, "待处理"), + /** + * 已完成 + */ + status1(1, "已完成"), + /** + * 处理中 + */ + status2(2, "处理中"), + /** + * 已受理 + */ + status3(3, "已受理"), + /** + * 失败 + */ + status4(4, "失败"), + ; + + private final int code; + + private final String name; + + OrderSettleLedgerStatusEnum(int code, String name) { + this.code = code; + this.name = name; + } +}