diff --git a/bweb/src/main/java/com/bweb/config/AuthConfig.java b/bweb/src/main/java/com/bweb/config/AuthConfig.java index 77272d9..09c5d69 100644 --- a/bweb/src/main/java/com/bweb/config/AuthConfig.java +++ b/bweb/src/main/java/com/bweb/config/AuthConfig.java @@ -95,6 +95,8 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/newLinkNotify/*") .excludePathPatterns("/merchantPayConfig/editConfig") .excludePathPatterns("/test/*") + .excludePathPatterns("/merchantChainBrand/*") + .excludePathPatterns("/merchantChainBrandAccount") ; } diff --git a/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java b/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java index c4147f2..bd036c1 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasChannelConfigController.java @@ -9,11 +9,10 @@ import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsGasChannelConfig; import com.hfkj.model.ResponseData; import com.hfkj.service.order.BsGasChannelConfigService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.order.OrderPayChannelEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; -import io.swagger.models.auth.In; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java index c663834..1502bb7 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOilPriceController.java @@ -17,7 +17,7 @@ import com.hfkj.service.gas.BsGasOilPriceWeekService; import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.service.CommonService; import com.hfkj.service.gas.BsGasService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; import com.hfkj.sysenum.SecUserObjectTypeEnum; import com.hfkj.sysenum.gas.GasOilPriceWeekEnum; @@ -31,8 +31,6 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.math.BigDecimal; -import java.time.LocalDate; -import java.util.Calendar; import java.util.HashMap; import java.util.Map; diff --git a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java index 09be0c7..a480df6 100644 --- a/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java +++ b/bweb/src/main/java/com/bweb/controller/BsGasOrderController.java @@ -2,7 +2,6 @@ package com.bweb.controller; import com.alibaba.excel.EasyExcel; import com.alibaba.fastjson.JSONObject; -import com.bweb.config.SysConst; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hfkj.common.exception.ErrorCode; @@ -12,16 +11,13 @@ import com.hfkj.common.security.UserCenter; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.config.CommonSysConst; import com.hfkj.entity.BsGasOrder; -import com.hfkj.entity.BsOrderSettle; import com.hfkj.model.ResponseData; import com.hfkj.model.SecUserSessionObject; -import com.hfkj.model.UserSessionObject; import com.hfkj.model.order.ExportGasOrderModel; import com.hfkj.service.BsDeviceService; import com.hfkj.service.gas.BsGasOrderService; import com.hfkj.service.order.BsOrderService; -import com.hfkj.service.order.OrderPaySuccessService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.SecUserObjectTypeEnum; import com.hfkj.sysenum.gas.OrderOilStatus; import com.hfkj.sysenum.order.OrderPayTypeEnum; @@ -115,6 +111,10 @@ public class BsGasOrderController { } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type5.getCode())) { param.put("agentStaffId", sessionObject.getAccount().getObjectId()); param.put("merName", merName); + + } else if (sessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type6.getCode())) { + param.put("merChainBrandId", sessionObject.getAccount().getObjectId()); + param.put("merName", merName); } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); } diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantAccountController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantAccountController.java index ab07b63..e067106 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerchantAccountController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantAccountController.java @@ -13,6 +13,8 @@ import com.hfkj.entity.BsMerchant; import com.hfkj.model.ResponseData; import com.hfkj.service.merchant.BsMerchantAccountRecordService; import com.hfkj.service.merchant.BsMerchantAccountService; +import com.hfkj.service.merchant.BsMerchantService; +import com.hfkj.sysenum.merchant.MerchantChainBrandSettleTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -41,6 +43,8 @@ public class BsMerchantAccountController { @Resource private BsMerchantAccountService merchantAccountService; @Resource + private BsMerchantService merchantService; + @Resource private BsMerchantAccountRecordService merchantAccountRecordService; @RequestMapping(value = "/getAccount", method = RequestMethod.GET) @@ -69,6 +73,16 @@ public class BsMerchantAccountController { ) { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } + + // 查询商户 + BsMerchant merchant = merchantService.getMerchant(body.getString("merNo")); + if (merchant == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的商户"); + } + if (merchant.getChainBrandId() != null + && merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type1.getNumber())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "结算方式为连锁额度,不可以进行充值。"); + } // 账户充值 merchantAccountService.recharge(body.getString("merNo"), body.getBigDecimal("amount")); diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantChainBrandAccountController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantChainBrandAccountController.java new file mode 100644 index 0000000..9a5a59d --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantChainBrandAccountController.java @@ -0,0 +1,116 @@ +package com.bweb.controller; + +import com.alibaba.fastjson.JSONObject; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsAgentMerAccount; +import com.hfkj.entity.BsAgentStaff; +import com.hfkj.entity.BsMerchantChainBrand; +import com.hfkj.entity.BsMerchantChainBrandAccount; +import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountRecordService; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; +import com.hfkj.service.merchant.BsMerchantChainBrandService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandController + * @author: HuRui + * @date: 2024/8/15 + **/ +@Controller +@RequestMapping(value = "/merchantChainBrandAccount") +@Api(value = "商户连锁管理") +public class BsMerchantChainBrandAccountController { + private static Logger log = LoggerFactory.getLogger(BsMerchantChainBrandAccountController.class); + @Resource + private BsMerchantChainBrandAccountService merchantChainBrandAccountService; + @Resource + private BsMerchantChainBrandAccountRecordService merchantChainBrandAccountRecordService; + @Resource + private UserCenter userCenter; + + @RequestMapping(value = "/getAccount", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询账户") + public ResponseData getAccount(@RequestParam(value = "chainBrandId", required = true) Long chainBrandId) { + try { + // 查询账户 + return ResponseMsgUtil.success(merchantChainBrandAccountService.getAccount(chainBrandId)); + + } catch (Exception e) { + log.error("BsMerchantChainBrandAccountController --> getAccount() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/recharge", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "充值") + public ResponseData recharge(@RequestBody JSONObject body) { + try { + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + if (SecUserObjectTypeEnum.type1.getCode() != userSession.getAccount().getObjectType()) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } + if (body == null + || body.getLong("chainBrandId") == null + || body.getBigDecimal("amount") == null + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + // 账户充值 + merchantChainBrandAccountService.recharge(body.getLong("chainBrandId"), body.getBigDecimal("amount")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("BsMerchantChainBrandAccountController --> recharge() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getRecordList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "记录列表") + public ResponseData getRecordList(@RequestParam(value = "chainBrandId", required = true) Long chainBrandId, + @RequestParam(value = "merNo", required = false) String merNo, + @RequestParam(value = "pageNum", required = true) Integer pageNum, + @RequestParam(value = "pageSize", required = true) Integer pageSize) { + try { + + // 查询账户 + BsMerchantChainBrandAccount account = merchantChainBrandAccountService.getAccount(chainBrandId); + + Map param = new HashMap<>(); + param.put("merChainBrandAccountId", account.getId()); + param.put("merNo", merNo); + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(merchantChainBrandAccountRecordService.getList(param))); + + } catch (Exception e) { + log.error("BsMerchantChainBrandAccountController --> getRecordList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantChainBrandController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantChainBrandController.java new file mode 100644 index 0000000..40904b1 --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantChainBrandController.java @@ -0,0 +1,122 @@ +package com.bweb.controller; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.BsMerchantChainBrand; +import com.hfkj.model.ResponseData; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; +import com.hfkj.service.merchant.BsMerchantChainBrandService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandController + * @author: HuRui + * @date: 2024/8/14 + **/ +@Controller +@RequestMapping(value = "/merchantChainBrand") +@Api(value = "商户连锁管理") +public class BsMerchantChainBrandController { + private static Logger log = LoggerFactory.getLogger(BsMerchantChainBrandController.class); + @Resource + private BsMerchantChainBrandService merchantChainBrandService; + @Resource + private BsMerchantChainBrandAccountService merchantChainBrandAccountService; + + @RequestMapping(value = "/editChainBrand", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "编辑商户连锁") + public ResponseData editChainBrand(@RequestBody BsMerchantChainBrand body) { + try { + if (body == null + || StringUtils.isBlank(body.getName()) + || StringUtils.isBlank(body.getContactsName()) + || StringUtils.isBlank(body.getContactsTelephone()) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + BsMerchantChainBrand chainBrand; + if (body.getId() != null) { + // 查询商户连锁 + chainBrand = merchantChainBrandService.getDetail(body.getId()); + if (chainBrand == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到数据"); + } + } else { + chainBrand = new BsMerchantChainBrand(); + chainBrand.setStatus(1); + } + chainBrand.setName(body.getName()); + chainBrand.setContactsName(body.getContactsName()); + chainBrand.setContactsTelephone(body.getContactsTelephone()); + if (body.getId() != null) { + merchantChainBrandService.update(chainBrand); + } else { + merchantChainBrandService.create(chainBrand); + } + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("BsMerchantChainBrandController --> editChainBrand() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value = "/getDetail", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询") + public ResponseData getDetail(@RequestParam(name = "id", required = true) Long id) { + try { + // 查询商户连锁 + BsMerchantChainBrand chainBrand = merchantChainBrandService.getDetail(id); + if (chainBrand == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到数据"); + } + Map param = new HashMap<>(); + param.put("chainBrand", chainBrand); + param.put("account", merchantChainBrandAccountService.getAccount(chainBrand.getId())); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error("BsMerchantChainBrandController --> editChainBrand() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value = "/getList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询商户连锁列表") + public ResponseData getList(@RequestParam(name = "name", required = false) String name, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + Map param = new HashMap<>(); + param.put("name", name); + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(merchantChainBrandService.getList(param))); + + } catch (Exception e) { + log.error("BsMerchantChainBrandController --> getList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantController.java index 3c1917b..1236c85 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerchantController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantController.java @@ -13,9 +13,11 @@ import com.hfkj.model.ResponseData; import com.hfkj.service.*; import com.hfkj.service.gas.BsGasOilGunNoService; import com.hfkj.service.gas.BsGasOilPriceService; +import com.hfkj.service.merchant.BsMerchantChainBrandService; import com.hfkj.service.merchant.BsMerchantService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; -import com.hfkj.sysenum.MerchantStatusEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantStatusEnum; +import com.hfkj.sysenum.merchant.MerchantChainBrandSettleTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; @@ -44,7 +46,7 @@ public class BsMerchantController { @Resource private BsGasOilGunNoService gasOilGunNoService; @Resource - private UserCenter userCenter; + private BsMerchantChainBrandService merchantChainBrandService; @Resource private CommonService commonService; @@ -104,6 +106,22 @@ public class BsMerchantController { if (provinceRegion == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的省级"); } + // 连锁品牌 + if (body.getChainBrandId() != null) { + // 查询连锁品牌 + BsMerchantChainBrand chainBrand = merchantChainBrandService.getDetail(body.getChainBrandId()); + if (chainBrand == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "连锁品牌未配置"); + } + merchant.setChainBrandId(chainBrand.getId()); + merchant.setChainBrandName(chainBrand.getName()); + // 连锁品牌结算类型 + MerchantChainBrandSettleTypeEnum data = MerchantChainBrandSettleTypeEnum.getDataByType(body.getChainBrandSettleType()); + if (data == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知连锁结算类型"); + } + merchant.setChainBrandSettleType(data.getNumber()); + } merchant.setSourceType(MerchantSourceTypeEnum.type1.getNumber()); merchant.setProvinceCode(provinceRegion.getRegionId()); @@ -259,6 +277,7 @@ public class BsMerchantController { @RequestParam(value = "merNo", required = false) String merNo, @RequestParam(value = "merName", required = false) String merName, @RequestParam(value = "provinceCode", required = false) String provinceCode, + @RequestParam(value = "chainBrandId", required = false) Long chainBrandId, @RequestParam(value = "cityCode", required = false) String cityCode, @RequestParam(value = "areaCode", required = false) String areaCode, @RequestParam(value = "pageNum", required = true) Integer pageNum, @@ -269,6 +288,7 @@ public class BsMerchantController { map.put("merNo", merNo); map.put("merName", merName); map.put("provinceCode", provinceCode); + map.put("chainBrandId", chainBrandId); map.put("cityCode", cityCode); map.put("areaCode", areaCode); diff --git a/bweb/src/main/java/com/bweb/controller/BsMerchantQrCodeController.java b/bweb/src/main/java/com/bweb/controller/BsMerchantQrCodeController.java index 8d4f99a..86a5595 100644 --- a/bweb/src/main/java/com/bweb/controller/BsMerchantQrCodeController.java +++ b/bweb/src/main/java/com/bweb/controller/BsMerchantQrCodeController.java @@ -7,7 +7,7 @@ import com.hfkj.common.exception.SysCode; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.model.ResponseData; import com.hfkj.service.merchant.BsMerchantQrCodeService; -import com.hfkj.sysenum.MerchantQrCodeStatusEnum; +import com.hfkj.sysenum.merchant.MerchantQrCodeStatusEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; diff --git a/cweb/src/main/java/com/cweb/controller/BsGasController.java b/cweb/src/main/java/com/cweb/controller/BsGasController.java index 652154d..19a2268 100644 --- a/cweb/src/main/java/com/cweb/controller/BsGasController.java +++ b/cweb/src/main/java/com/cweb/controller/BsGasController.java @@ -12,16 +12,13 @@ import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsAgentPrice; -import com.hfkj.entity.BsDevice; import com.hfkj.entity.BsGasOilPrice; import com.hfkj.model.GasListModel; import com.hfkj.model.GasModel; import com.hfkj.model.ResponseData; -import com.hfkj.service.BsDeviceService; import com.hfkj.service.agent.BsAgentPriceService; -import com.hfkj.service.gas.BsGasOilPriceWeekService; import com.hfkj.service.gas.BsGasService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.agent.AgentPriceTypeEnum; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -32,7 +29,6 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.math.BigDecimal; -import java.time.LocalDate; @Controller @RequestMapping(value = "/gas") diff --git a/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java b/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java index 395dc83..cb0d78d 100644 --- a/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java +++ b/cweb/src/main/java/com/cweb/controller/order/GasOrderReceiptController.java @@ -23,7 +23,7 @@ import java.util.stream.Collectors; @Controller @RequestMapping(value = "/gasOrderReceipt") -@Api(value = "加油订单业务") +@Api(value = "加油订单开票业务") public class GasOrderReceiptController { private static Logger log = LoggerFactory.getLogger(GasOrderReceiptController.class); @Resource 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 1227ab8..7a0d707 100644 --- a/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java +++ b/cweb/src/main/java/com/cweb/controller/order/OrderPayController.java @@ -20,7 +20,7 @@ import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.service.order.BsGasChannelConfigService; import com.hfkj.service.order.BsOrderService; import com.hfkj.service.order.BsOrderSettleService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.order.OrderPayTypeEnum; import com.hfkj.sysenum.order.OrderSettleLedgerStatusEnum; import com.hfkj.sysenum.order.OrderStatusEnum; diff --git a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java index 0b4d8df..5d766e1 100644 --- a/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java +++ b/service/src/main/java/com/hfkj/channel/gas/newlink/NewLinkGasService.java @@ -5,19 +5,15 @@ import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.hfkj.entity.BsGasOilGunNo; import com.hfkj.entity.BsGasOilPrice; -import com.hfkj.entity.BsGasOilPriceExample; import com.hfkj.entity.BsMerchant; import com.hfkj.service.gas.BsGasOilGunNoService; import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.gas.BsGasService; -import com.hfkj.service.gas.impl.BsGasOilGunNoServiceImpl; import com.hfkj.service.merchant.BsMerchantService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; -import com.hfkj.sysenum.MerchantStatusEnum; -import com.hfkj.sysenum.gas.GasOilNoEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantStatusEnum; import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.util.StringUtil; import org.springframework.stereotype.Component; import javax.annotation.Resource; diff --git a/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java b/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java index 9017c6b..b1f0285 100644 --- a/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java +++ b/service/src/main/java/com/hfkj/channel/gas/shell/CqShellPetroleumGasService.java @@ -10,8 +10,8 @@ import com.hfkj.service.gas.BsGasOilGunNoService; import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.gas.BsGasService; import com.hfkj.service.merchant.BsMerchantService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; -import com.hfkj.sysenum.MerchantStatusEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantStatusEnum; import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; import org.springframework.stereotype.Component; diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java b/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java index ec99040..a45e648 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderMapper.java @@ -44,6 +44,7 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "agent_id, agent_name, ", "agent_staff_id, agent_staff_name, ", "user_id, user_phone, ", + "mer_chain_brand_id, mer_chain_brand_name, ", "mer_id, mer_no, mer_name, ", "mer_address, total_deduction_price, ", "deduction_coupon_price, deduction_oil_price, ", @@ -72,6 +73,7 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "#{agentId,jdbcType=BIGINT}, #{agentName,jdbcType=VARCHAR}, ", "#{agentStaffId,jdbcType=BIGINT}, #{agentStaffName,jdbcType=VARCHAR}, ", "#{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ", + "#{merChainBrandId,jdbcType=BIGINT}, #{merChainBrandName,jdbcType=VARCHAR}, ", "#{merId,jdbcType=BIGINT}, #{merNo,jdbcType=VARCHAR}, #{merName,jdbcType=VARCHAR}, ", "#{merAddress,jdbcType=VARCHAR}, #{totalDeductionPrice,jdbcType=DECIMAL}, ", "#{deductionCouponPrice,jdbcType=DECIMAL}, #{deductionOilPrice,jdbcType=DECIMAL}, ", @@ -116,6 +118,8 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { @Result(column="agent_staff_name", property="agentStaffName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_chain_brand_id", property="merChainBrandId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_chain_brand_name", property="merChainBrandName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @@ -170,10 +174,10 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { @Select({ "select", "id, order_no, order_child_no, channel_type, channel_order_no, agent_id, agent_name, ", - "agent_staff_id, agent_staff_name, user_id, user_phone, mer_id, mer_no, mer_name, ", - "mer_address, total_deduction_price, deduction_coupon_price, deduction_oil_price, ", - "pay_integral, payable_price, actual_pay_price, gas_refuel_price, gas_oil_no, ", - "gas_gun_no, gas_oil_type, gas_price_official, gas_price_gun, gas_price_vip, ", + "agent_staff_id, agent_staff_name, user_id, user_phone, mer_chain_brand_id, mer_chain_brand_name, ", + "mer_id, mer_no, mer_name, mer_address, total_deduction_price, deduction_coupon_price, ", + "deduction_oil_price, pay_integral, payable_price, actual_pay_price, gas_refuel_price, ", + "gas_oil_no, gas_gun_no, gas_oil_type, gas_price_official, gas_price_gun, gas_price_vip, ", "gas_price_platform, gas_price_cost, gas_oil_liters, gas_discount, gas_oil_subsidy, ", "gas_liters_preferences, gas_price_preferences, gas_class_group_id, gas_class_group_name, ", "gas_class_group_task_id, gas_staff_id, gas_staff_name, pay_type, pay_serial_no, ", @@ -195,6 +199,8 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { @Result(column="agent_staff_name", property="agentStaffName", jdbcType=JdbcType.VARCHAR), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_chain_brand_id", property="merChainBrandId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_chain_brand_name", property="merChainBrandName", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @@ -267,6 +273,8 @@ public interface BsGasOrderMapper extends BsGasOrderMapperExt { "agent_staff_name = #{agentStaffName,jdbcType=VARCHAR},", "user_id = #{userId,jdbcType=BIGINT},", "user_phone = #{userPhone,jdbcType=VARCHAR},", + "mer_chain_brand_id = #{merChainBrandId,jdbcType=BIGINT},", + "mer_chain_brand_name = #{merChainBrandName,jdbcType=VARCHAR},", "mer_id = #{merId,jdbcType=BIGINT},", "mer_no = #{merNo,jdbcType=VARCHAR},", "mer_name = #{merName,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java index 5097104..994b5c4 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java @@ -19,6 +19,7 @@ public interface BsGasOrderMapperExt { " FROM" + " bs_gas_order" + " where 1 = 1" + + " and mer_chain_brand_id = #{param.merChainBrandId} " + " and mer_id = #{param.merId} " + " and mer_no = #{param.merNo} " + " and mer_name like concat('%',#{param.merName},'%') " + diff --git a/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java index 77e34dc..163b5d9 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderSqlProvider.java @@ -68,6 +68,14 @@ public class BsGasOrderSqlProvider { sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); } + if (record.getMerChainBrandId() != null) { + sql.VALUES("mer_chain_brand_id", "#{merChainBrandId,jdbcType=BIGINT}"); + } + + if (record.getMerChainBrandName() != null) { + sql.VALUES("mer_chain_brand_name", "#{merChainBrandName,jdbcType=VARCHAR}"); + } + if (record.getMerId() != null) { sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); } @@ -280,6 +288,8 @@ public class BsGasOrderSqlProvider { sql.SELECT("agent_staff_name"); sql.SELECT("user_id"); sql.SELECT("user_phone"); + sql.SELECT("mer_chain_brand_id"); + sql.SELECT("mer_chain_brand_name"); sql.SELECT("mer_id"); sql.SELECT("mer_no"); sql.SELECT("mer_name"); @@ -389,6 +399,14 @@ public class BsGasOrderSqlProvider { sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); } + if (record.getMerChainBrandId() != null) { + sql.SET("mer_chain_brand_id = #{record.merChainBrandId,jdbcType=BIGINT}"); + } + + if (record.getMerChainBrandName() != null) { + sql.SET("mer_chain_brand_name = #{record.merChainBrandName,jdbcType=VARCHAR}"); + } + if (record.getMerId() != null) { sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); } @@ -600,6 +618,8 @@ public class BsGasOrderSqlProvider { sql.SET("agent_staff_name = #{record.agentStaffName,jdbcType=VARCHAR}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + sql.SET("mer_chain_brand_id = #{record.merChainBrandId,jdbcType=BIGINT}"); + sql.SET("mer_chain_brand_name = #{record.merChainBrandName,jdbcType=VARCHAR}"); sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); @@ -698,6 +718,14 @@ public class BsGasOrderSqlProvider { sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); } + if (record.getMerChainBrandId() != null) { + sql.SET("mer_chain_brand_id = #{merChainBrandId,jdbcType=BIGINT}"); + } + + if (record.getMerChainBrandName() != null) { + sql.SET("mer_chain_brand_name = #{merChainBrandName,jdbcType=VARCHAR}"); + } + if (record.getMerId() != null) { sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); } diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountMapper.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountMapper.java new file mode 100644 index 0000000..8433c31 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountMapper.java @@ -0,0 +1,117 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerchantChainBrandAccount; +import com.hfkj.entity.BsMerchantChainBrandAccountExample; +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 BsMerchantChainBrandAccountMapper extends BsMerchantChainBrandAccountMapperExt { + @SelectProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="countByExample") + long countByExample(BsMerchantChainBrandAccountExample example); + + @DeleteProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMerchantChainBrandAccountExample example); + + @Delete({ + "delete from bs_merchant_chain_brand_account", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_merchant_chain_brand_account (mer_chain_brand_id, amount, ", + "amount_consume, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{merChainBrandId,jdbcType=BIGINT}, #{amount,jdbcType=DECIMAL}, ", + "#{amountConsume,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMerchantChainBrandAccount record); + + @InsertProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMerchantChainBrandAccount record); + + @SelectProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_chain_brand_id", property="merChainBrandId", jdbcType=JdbcType.BIGINT), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="amount_consume", property="amountConsume", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", 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(BsMerchantChainBrandAccountExample example); + + @Select({ + "select", + "id, mer_chain_brand_id, amount, amount_consume, `status`, create_time, update_time, ", + "ext_1, ext_2, ext_3", + "from bs_merchant_chain_brand_account", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_chain_brand_id", property="merChainBrandId", jdbcType=JdbcType.BIGINT), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="amount_consume", property="amountConsume", jdbcType=JdbcType.DECIMAL), + @Result(column="status", property="status", 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) + }) + BsMerchantChainBrandAccount selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMerchantChainBrandAccount record, @Param("example") BsMerchantChainBrandAccountExample example); + + @UpdateProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMerchantChainBrandAccount record, @Param("example") BsMerchantChainBrandAccountExample example); + + @UpdateProvider(type=BsMerchantChainBrandAccountSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMerchantChainBrandAccount record); + + @Update({ + "update bs_merchant_chain_brand_account", + "set mer_chain_brand_id = #{merChainBrandId,jdbcType=BIGINT},", + "amount = #{amount,jdbcType=DECIMAL},", + "amount_consume = #{amountConsume,jdbcType=DECIMAL},", + "`status` = #{status,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(BsMerchantChainBrandAccount record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountMapperExt.java new file mode 100644 index 0000000..4ceb8b9 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMerchantChainBrandAccountMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordMapper.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordMapper.java new file mode 100644 index 0000000..a611415 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordMapper.java @@ -0,0 +1,167 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerchantChainBrandAccountRecord; +import com.hfkj.entity.BsMerchantChainBrandAccountRecordExample; +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 BsMerchantChainBrandAccountRecordMapper extends BsMerchantChainBrandAccountRecordMapperExt { + @SelectProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="countByExample") + long countByExample(BsMerchantChainBrandAccountRecordExample example); + + @DeleteProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMerchantChainBrandAccountRecordExample example); + + @Delete({ + "delete from bs_merchant_chain_brand_account_record", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_merchant_chain_brand_account_record (mer_chain_brand_account_id, mer_id, ", + "mer_no, mer_name, ", + "`type`, transaction_amount, ", + "before_amount, after_amount, ", + "source_type, source_id, ", + "source_order_no, source_content, ", + "`status`, create_time, ", + "op_user_type, op_user_id, ", + "op_user_name, op_user_phone, ", + "ext_1, ext_2, ext_3)", + "values (#{merChainBrandAccountId,jdbcType=BIGINT}, #{merId,jdbcType=BIGINT}, ", + "#{merNo,jdbcType=VARCHAR}, #{merName,jdbcType=VARCHAR}, ", + "#{type,jdbcType=INTEGER}, #{transactionAmount,jdbcType=DECIMAL}, ", + "#{beforeAmount,jdbcType=DECIMAL}, #{afterAmount,jdbcType=DECIMAL}, ", + "#{sourceType,jdbcType=INTEGER}, #{sourceId,jdbcType=BIGINT}, ", + "#{sourceOrderNo,jdbcType=VARCHAR}, #{sourceContent,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{opUserType,jdbcType=INTEGER}, #{opUserId,jdbcType=BIGINT}, ", + "#{opUserName,jdbcType=VARCHAR}, #{opUserPhone,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMerchantChainBrandAccountRecord record); + + @InsertProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMerchantChainBrandAccountRecord record); + + @SelectProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_chain_brand_account_id", property="merChainBrandAccountId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="transaction_amount", property="transactionAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), + @Result(column="source_order_no", property="sourceOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_type", property="opUserType", jdbcType=JdbcType.INTEGER), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), + @Result(column="op_user_phone", property="opUserPhone", jdbcType=JdbcType.VARCHAR), + @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(BsMerchantChainBrandAccountRecordExample example); + + @Select({ + "select", + "id, mer_chain_brand_account_id, mer_id, mer_no, mer_name, `type`, transaction_amount, ", + "before_amount, after_amount, source_type, source_id, source_order_no, source_content, ", + "`status`, create_time, op_user_type, op_user_id, op_user_name, op_user_phone, ", + "ext_1, ext_2, ext_3", + "from bs_merchant_chain_brand_account_record", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="mer_chain_brand_account_id", property="merChainBrandAccountId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="transaction_amount", property="transactionAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="before_amount", property="beforeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="after_amount", property="afterAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="source_type", property="sourceType", jdbcType=JdbcType.INTEGER), + @Result(column="source_id", property="sourceId", jdbcType=JdbcType.BIGINT), + @Result(column="source_order_no", property="sourceOrderNo", jdbcType=JdbcType.VARCHAR), + @Result(column="source_content", property="sourceContent", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_type", property="opUserType", jdbcType=JdbcType.INTEGER), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR), + @Result(column="op_user_phone", property="opUserPhone", jdbcType=JdbcType.VARCHAR), + @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) + }) + BsMerchantChainBrandAccountRecord selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMerchantChainBrandAccountRecord record, @Param("example") BsMerchantChainBrandAccountRecordExample example); + + @UpdateProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMerchantChainBrandAccountRecord record, @Param("example") BsMerchantChainBrandAccountRecordExample example); + + @UpdateProvider(type=BsMerchantChainBrandAccountRecordSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMerchantChainBrandAccountRecord record); + + @Update({ + "update bs_merchant_chain_brand_account_record", + "set mer_chain_brand_account_id = #{merChainBrandAccountId,jdbcType=BIGINT},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "`type` = #{type,jdbcType=INTEGER},", + "transaction_amount = #{transactionAmount,jdbcType=DECIMAL},", + "before_amount = #{beforeAmount,jdbcType=DECIMAL},", + "after_amount = #{afterAmount,jdbcType=DECIMAL},", + "source_type = #{sourceType,jdbcType=INTEGER},", + "source_id = #{sourceId,jdbcType=BIGINT},", + "source_order_no = #{sourceOrderNo,jdbcType=VARCHAR},", + "source_content = #{sourceContent,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "op_user_type = #{opUserType,jdbcType=INTEGER},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "op_user_phone = #{opUserPhone,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsMerchantChainBrandAccountRecord record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordMapperExt.java new file mode 100644 index 0000000..b661856 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsMerchantChainBrandAccountRecordMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordSqlProvider.java new file mode 100644 index 0000000..1bdcbd7 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountRecordSqlProvider.java @@ -0,0 +1,472 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerchantChainBrandAccountRecord; +import com.hfkj.entity.BsMerchantChainBrandAccountRecordExample.Criteria; +import com.hfkj.entity.BsMerchantChainBrandAccountRecordExample.Criterion; +import com.hfkj.entity.BsMerchantChainBrandAccountRecordExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMerchantChainBrandAccountRecordSqlProvider { + + public String countByExample(BsMerchantChainBrandAccountRecordExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_merchant_chain_brand_account_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMerchantChainBrandAccountRecordExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_merchant_chain_brand_account_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMerchantChainBrandAccountRecord record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_merchant_chain_brand_account_record"); + + if (record.getMerChainBrandAccountId() != null) { + sql.VALUES("mer_chain_brand_account_id", "#{merChainBrandAccountId,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getTransactionAmount() != null) { + sql.VALUES("transaction_amount", "#{transactionAmount,jdbcType=DECIMAL}"); + } + + if (record.getBeforeAmount() != null) { + sql.VALUES("before_amount", "#{beforeAmount,jdbcType=DECIMAL}"); + } + + if (record.getAfterAmount() != null) { + sql.VALUES("after_amount", "#{afterAmount,jdbcType=DECIMAL}"); + } + + if (record.getSourceType() != null) { + sql.VALUES("source_type", "#{sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.VALUES("source_id", "#{sourceId,jdbcType=BIGINT}"); + } + + if (record.getSourceOrderNo() != null) { + sql.VALUES("source_order_no", "#{sourceOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getSourceContent() != null) { + sql.VALUES("source_content", "#{sourceContent,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpUserType() != null) { + sql.VALUES("op_user_type", "#{opUserType,jdbcType=INTEGER}"); + } + + if (record.getOpUserId() != null) { + sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.VALUES("op_user_name", "#{opUserName,jdbcType=VARCHAR}"); + } + + if (record.getOpUserPhone() != null) { + sql.VALUES("op_user_phone", "#{opUserPhone,jdbcType=VARCHAR}"); + } + + 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(BsMerchantChainBrandAccountRecordExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_chain_brand_account_id"); + sql.SELECT("mer_id"); + sql.SELECT("mer_no"); + sql.SELECT("mer_name"); + sql.SELECT("`type`"); + sql.SELECT("transaction_amount"); + sql.SELECT("before_amount"); + sql.SELECT("after_amount"); + sql.SELECT("source_type"); + sql.SELECT("source_id"); + sql.SELECT("source_order_no"); + sql.SELECT("source_content"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("op_user_type"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("op_user_phone"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_merchant_chain_brand_account_record"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMerchantChainBrandAccountRecord record = (BsMerchantChainBrandAccountRecord) parameter.get("record"); + BsMerchantChainBrandAccountRecordExample example = (BsMerchantChainBrandAccountRecordExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_merchant_chain_brand_account_record"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerChainBrandAccountId() != null) { + sql.SET("mer_chain_brand_account_id = #{record.merChainBrandAccountId,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getTransactionAmount() != null) { + sql.SET("transaction_amount = #{record.transactionAmount,jdbcType=DECIMAL}"); + } + + if (record.getBeforeAmount() != null) { + sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); + } + + if (record.getAfterAmount() != null) { + sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); + } + + if (record.getSourceType() != null) { + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); + } + + if (record.getSourceOrderNo() != null) { + sql.SET("source_order_no = #{record.sourceOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getSourceContent() != null) { + sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); + } + + 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.getOpUserType() != null) { + sql.SET("op_user_type = #{record.opUserType,jdbcType=INTEGER}"); + } + + if (record.getOpUserId() != null) { + sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); + } + + if (record.getOpUserPhone() != null) { + sql.SET("op_user_phone = #{record.opUserPhone,jdbcType=VARCHAR}"); + } + + 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_merchant_chain_brand_account_record"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_chain_brand_account_id = #{record.merChainBrandAccountId,jdbcType=BIGINT}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("transaction_amount = #{record.transactionAmount,jdbcType=DECIMAL}"); + sql.SET("before_amount = #{record.beforeAmount,jdbcType=DECIMAL}"); + sql.SET("after_amount = #{record.afterAmount,jdbcType=DECIMAL}"); + sql.SET("source_type = #{record.sourceType,jdbcType=INTEGER}"); + sql.SET("source_id = #{record.sourceId,jdbcType=BIGINT}"); + sql.SET("source_order_no = #{record.sourceOrderNo,jdbcType=VARCHAR}"); + sql.SET("source_content = #{record.sourceContent,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("op_user_type = #{record.opUserType,jdbcType=INTEGER}"); + sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}"); + sql.SET("op_user_phone = #{record.opUserPhone,jdbcType=VARCHAR}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + BsMerchantChainBrandAccountRecordExample example = (BsMerchantChainBrandAccountRecordExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMerchantChainBrandAccountRecord record) { + SQL sql = new SQL(); + sql.UPDATE("bs_merchant_chain_brand_account_record"); + + if (record.getMerChainBrandAccountId() != null) { + sql.SET("mer_chain_brand_account_id = #{merChainBrandAccountId,jdbcType=BIGINT}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getTransactionAmount() != null) { + sql.SET("transaction_amount = #{transactionAmount,jdbcType=DECIMAL}"); + } + + if (record.getBeforeAmount() != null) { + sql.SET("before_amount = #{beforeAmount,jdbcType=DECIMAL}"); + } + + if (record.getAfterAmount() != null) { + sql.SET("after_amount = #{afterAmount,jdbcType=DECIMAL}"); + } + + if (record.getSourceType() != null) { + sql.SET("source_type = #{sourceType,jdbcType=INTEGER}"); + } + + if (record.getSourceId() != null) { + sql.SET("source_id = #{sourceId,jdbcType=BIGINT}"); + } + + if (record.getSourceOrderNo() != null) { + sql.SET("source_order_no = #{sourceOrderNo,jdbcType=VARCHAR}"); + } + + if (record.getSourceContent() != null) { + sql.SET("source_content = #{sourceContent,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpUserType() != null) { + sql.SET("op_user_type = #{opUserType,jdbcType=INTEGER}"); + } + + if (record.getOpUserId() != null) { + sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{opUserName,jdbcType=VARCHAR}"); + } + + if (record.getOpUserPhone() != null) { + sql.SET("op_user_phone = #{opUserPhone,jdbcType=VARCHAR}"); + } + + 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, BsMerchantChainBrandAccountRecordExample 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/BsMerchantChainBrandAccountSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountSqlProvider.java new file mode 100644 index 0000000..04183f0 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandAccountSqlProvider.java @@ -0,0 +1,304 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerchantChainBrandAccount; +import com.hfkj.entity.BsMerchantChainBrandAccountExample.Criteria; +import com.hfkj.entity.BsMerchantChainBrandAccountExample.Criterion; +import com.hfkj.entity.BsMerchantChainBrandAccountExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMerchantChainBrandAccountSqlProvider { + + public String countByExample(BsMerchantChainBrandAccountExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_merchant_chain_brand_account"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMerchantChainBrandAccountExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_merchant_chain_brand_account"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMerchantChainBrandAccount record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_merchant_chain_brand_account"); + + if (record.getMerChainBrandId() != null) { + sql.VALUES("mer_chain_brand_id", "#{merChainBrandId,jdbcType=BIGINT}"); + } + + if (record.getAmount() != null) { + sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); + } + + if (record.getAmountConsume() != null) { + sql.VALUES("amount_consume", "#{amountConsume,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.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(BsMerchantChainBrandAccountExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("mer_chain_brand_id"); + sql.SELECT("amount"); + sql.SELECT("amount_consume"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_merchant_chain_brand_account"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMerchantChainBrandAccount record = (BsMerchantChainBrandAccount) parameter.get("record"); + BsMerchantChainBrandAccountExample example = (BsMerchantChainBrandAccountExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_merchant_chain_brand_account"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getMerChainBrandId() != null) { + sql.SET("mer_chain_brand_id = #{record.merChainBrandId,jdbcType=BIGINT}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + } + + if (record.getAmountConsume() != null) { + sql.SET("amount_consume = #{record.amountConsume,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.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_merchant_chain_brand_account"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("mer_chain_brand_id = #{record.merChainBrandId,jdbcType=BIGINT}"); + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + sql.SET("amount_consume = #{record.amountConsume,jdbcType=DECIMAL}"); + sql.SET("`status` = #{record.status,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}"); + + BsMerchantChainBrandAccountExample example = (BsMerchantChainBrandAccountExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMerchantChainBrandAccount record) { + SQL sql = new SQL(); + sql.UPDATE("bs_merchant_chain_brand_account"); + + if (record.getMerChainBrandId() != null) { + sql.SET("mer_chain_brand_id = #{merChainBrandId,jdbcType=BIGINT}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{amount,jdbcType=DECIMAL}"); + } + + if (record.getAmountConsume() != null) { + sql.SET("amount_consume = #{amountConsume,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.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, BsMerchantChainBrandAccountExample 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/BsMerchantChainBrandMapper.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandMapper.java new file mode 100644 index 0000000..99a6aa4 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandMapper.java @@ -0,0 +1,117 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerchantChainBrand; +import com.hfkj.entity.BsMerchantChainBrandExample; +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 BsMerchantChainBrandMapper extends BsMerchantChainBrandMapperExt { + @SelectProvider(type=BsMerchantChainBrandSqlProvider.class, method="countByExample") + long countByExample(BsMerchantChainBrandExample example); + + @DeleteProvider(type=BsMerchantChainBrandSqlProvider.class, method="deleteByExample") + int deleteByExample(BsMerchantChainBrandExample example); + + @Delete({ + "delete from bs_merchant_chain_brand", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_merchant_chain_brand (`name`, contacts_name, ", + "contacts_telephone, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{name,jdbcType=VARCHAR}, #{contactsName,jdbcType=VARCHAR}, ", + "#{contactsTelephone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsMerchantChainBrand record); + + @InsertProvider(type=BsMerchantChainBrandSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsMerchantChainBrand record); + + @SelectProvider(type=BsMerchantChainBrandSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_name", property="contactsName", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_telephone", property="contactsTelephone", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", 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(BsMerchantChainBrandExample example); + + @Select({ + "select", + "id, `name`, contacts_name, contacts_telephone, `status`, create_time, update_time, ", + "ext_1, ext_2, ext_3", + "from bs_merchant_chain_brand", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_name", property="contactsName", jdbcType=JdbcType.VARCHAR), + @Result(column="contacts_telephone", property="contactsTelephone", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", 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) + }) + BsMerchantChainBrand selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsMerchantChainBrandSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsMerchantChainBrand record, @Param("example") BsMerchantChainBrandExample example); + + @UpdateProvider(type=BsMerchantChainBrandSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsMerchantChainBrand record, @Param("example") BsMerchantChainBrandExample example); + + @UpdateProvider(type=BsMerchantChainBrandSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsMerchantChainBrand record); + + @Update({ + "update bs_merchant_chain_brand", + "set `name` = #{name,jdbcType=VARCHAR},", + "contacts_name = #{contactsName,jdbcType=VARCHAR},", + "contacts_telephone = #{contactsTelephone,jdbcType=VARCHAR},", + "`status` = #{status,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(BsMerchantChainBrand record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandMapperExt.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandMapperExt.java new file mode 100644 index 0000000..c3acfc7 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandMapperExt.java @@ -0,0 +1,30 @@ +package com.hfkj.dao; + +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; +import java.util.Map; + +/** + * mapper扩展类 + */ +public interface BsMerchantChainBrandMapperExt { + + @Select("") + List> selectChainBrand(@Param("param") Map param); +} diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandSqlProvider.java new file mode 100644 index 0000000..10f95dd --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsMerchantChainBrandSqlProvider.java @@ -0,0 +1,304 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsMerchantChainBrand; +import com.hfkj.entity.BsMerchantChainBrandExample.Criteria; +import com.hfkj.entity.BsMerchantChainBrandExample.Criterion; +import com.hfkj.entity.BsMerchantChainBrandExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsMerchantChainBrandSqlProvider { + + public String countByExample(BsMerchantChainBrandExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_merchant_chain_brand"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsMerchantChainBrandExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_merchant_chain_brand"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsMerchantChainBrand record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_merchant_chain_brand"); + + if (record.getName() != null) { + sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); + } + + if (record.getContactsName() != null) { + sql.VALUES("contacts_name", "#{contactsName,jdbcType=VARCHAR}"); + } + + if (record.getContactsTelephone() != null) { + sql.VALUES("contacts_telephone", "#{contactsTelephone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,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(BsMerchantChainBrandExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("`name`"); + sql.SELECT("contacts_name"); + sql.SELECT("contacts_telephone"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_merchant_chain_brand"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsMerchantChainBrand record = (BsMerchantChainBrand) parameter.get("record"); + BsMerchantChainBrandExample example = (BsMerchantChainBrandExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_merchant_chain_brand"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + } + + if (record.getContactsName() != null) { + sql.SET("contacts_name = #{record.contactsName,jdbcType=VARCHAR}"); + } + + if (record.getContactsTelephone() != null) { + sql.SET("contacts_telephone = #{record.contactsTelephone,jdbcType=VARCHAR}"); + } + + 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.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_merchant_chain_brand"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + sql.SET("contacts_name = #{record.contactsName,jdbcType=VARCHAR}"); + sql.SET("contacts_telephone = #{record.contactsTelephone,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,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}"); + + BsMerchantChainBrandExample example = (BsMerchantChainBrandExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsMerchantChainBrand record) { + SQL sql = new SQL(); + sql.UPDATE("bs_merchant_chain_brand"); + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getContactsName() != null) { + sql.SET("contacts_name = #{contactsName,jdbcType=VARCHAR}"); + } + + if (record.getContactsTelephone() != null) { + sql.SET("contacts_telephone = #{contactsTelephone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,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, BsMerchantChainBrandExample 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/BsMerchantMapper.java b/service/src/main/java/com/hfkj/dao/BsMerchantMapper.java index 899c255..9e0bf44 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerchantMapper.java +++ b/service/src/main/java/com/hfkj/dao/BsMerchantMapper.java @@ -43,26 +43,28 @@ public interface BsMerchantMapper extends BsMerchantMapperExt { "province_name, city_code, ", "city_name, area_code, ", "area_name, oil_price_zone_id, ", - "oil_price_zone_name, mer_no, ", - "mer_logo, mer_name, ", - "contacts_name, contacts_tel, ", - "customer_service_tel, address, ", - "longitude, latitude, ", - "mer_label, list_show, ", - "`status`, create_time, ", + "oil_price_zone_name, chain_brand_id, ", + "chain_brand_name, chain_brand_settle_type, ", + "mer_no, mer_logo, ", + "mer_name, contacts_name, ", + "contacts_tel, customer_service_tel, ", + "address, longitude, ", + "latitude, mer_label, ", + "list_show, `status`, create_time, ", "update_time, ext_1, ", "ext_2, ext_3)", "values (#{sourceType,jdbcType=INTEGER}, #{provinceCode,jdbcType=BIGINT}, ", "#{provinceName,jdbcType=VARCHAR}, #{cityCode,jdbcType=BIGINT}, ", "#{cityName,jdbcType=VARCHAR}, #{areaCode,jdbcType=BIGINT}, ", "#{areaName,jdbcType=VARCHAR}, #{oilPriceZoneId,jdbcType=INTEGER}, ", - "#{oilPriceZoneName,jdbcType=VARCHAR}, #{merNo,jdbcType=VARCHAR}, ", - "#{merLogo,jdbcType=VARCHAR}, #{merName,jdbcType=VARCHAR}, ", - "#{contactsName,jdbcType=VARCHAR}, #{contactsTel,jdbcType=VARCHAR}, ", - "#{customerServiceTel,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ", - "#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, ", - "#{merLabel,jdbcType=VARCHAR}, #{listShow,jdbcType=BIT}, ", - "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{oilPriceZoneName,jdbcType=VARCHAR}, #{chainBrandId,jdbcType=BIGINT}, ", + "#{chainBrandName,jdbcType=VARCHAR}, #{chainBrandSettleType,jdbcType=INTEGER}, ", + "#{merNo,jdbcType=VARCHAR}, #{merLogo,jdbcType=VARCHAR}, ", + "#{merName,jdbcType=VARCHAR}, #{contactsName,jdbcType=VARCHAR}, ", + "#{contactsTel,jdbcType=VARCHAR}, #{customerServiceTel,jdbcType=VARCHAR}, ", + "#{address,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR}, ", + "#{latitude,jdbcType=VARCHAR}, #{merLabel,jdbcType=VARCHAR}, ", + "#{listShow,jdbcType=BIT}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -85,6 +87,9 @@ public interface BsMerchantMapper extends BsMerchantMapperExt { @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_price_zone_id", property="oilPriceZoneId", jdbcType=JdbcType.INTEGER), @Result(column="oil_price_zone_name", property="oilPriceZoneName", jdbcType=JdbcType.VARCHAR), + @Result(column="chain_brand_id", property="chainBrandId", jdbcType=JdbcType.BIGINT), + @Result(column="chain_brand_name", property="chainBrandName", jdbcType=JdbcType.VARCHAR), + @Result(column="chain_brand_settle_type", property="chainBrandSettleType", jdbcType=JdbcType.INTEGER), @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_logo", property="merLogo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @@ -108,9 +113,10 @@ public interface BsMerchantMapper extends BsMerchantMapperExt { @Select({ "select", "id, source_type, province_code, province_name, city_code, city_name, area_code, ", - "area_name, oil_price_zone_id, oil_price_zone_name, mer_no, mer_logo, mer_name, ", - "contacts_name, contacts_tel, customer_service_tel, address, longitude, latitude, ", - "mer_label, list_show, `status`, create_time, update_time, ext_1, ext_2, ext_3", + "area_name, oil_price_zone_id, oil_price_zone_name, chain_brand_id, chain_brand_name, ", + "chain_brand_settle_type, mer_no, mer_logo, mer_name, contacts_name, contacts_tel, ", + "customer_service_tel, address, longitude, latitude, mer_label, list_show, `status`, ", + "create_time, update_time, ext_1, ext_2, ext_3", "from bs_merchant", "where id = #{id,jdbcType=BIGINT}" }) @@ -125,6 +131,9 @@ public interface BsMerchantMapper extends BsMerchantMapperExt { @Result(column="area_name", property="areaName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_price_zone_id", property="oilPriceZoneId", jdbcType=JdbcType.INTEGER), @Result(column="oil_price_zone_name", property="oilPriceZoneName", jdbcType=JdbcType.VARCHAR), + @Result(column="chain_brand_id", property="chainBrandId", jdbcType=JdbcType.BIGINT), + @Result(column="chain_brand_name", property="chainBrandName", jdbcType=JdbcType.VARCHAR), + @Result(column="chain_brand_settle_type", property="chainBrandSettleType", jdbcType=JdbcType.INTEGER), @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_logo", property="merLogo", jdbcType=JdbcType.VARCHAR), @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), @@ -165,6 +174,9 @@ public interface BsMerchantMapper extends BsMerchantMapperExt { "area_name = #{areaName,jdbcType=VARCHAR},", "oil_price_zone_id = #{oilPriceZoneId,jdbcType=INTEGER},", "oil_price_zone_name = #{oilPriceZoneName,jdbcType=VARCHAR},", + "chain_brand_id = #{chainBrandId,jdbcType=BIGINT},", + "chain_brand_name = #{chainBrandName,jdbcType=VARCHAR},", + "chain_brand_settle_type = #{chainBrandSettleType,jdbcType=INTEGER},", "mer_no = #{merNo,jdbcType=VARCHAR},", "mer_logo = #{merLogo,jdbcType=VARCHAR},", "mer_name = #{merName,jdbcType=VARCHAR},", diff --git a/service/src/main/java/com/hfkj/dao/BsMerchantSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsMerchantSqlProvider.java index 3ab66c2..21ef759 100644 --- a/service/src/main/java/com/hfkj/dao/BsMerchantSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/BsMerchantSqlProvider.java @@ -64,6 +64,18 @@ public class BsMerchantSqlProvider { sql.VALUES("oil_price_zone_name", "#{oilPriceZoneName,jdbcType=VARCHAR}"); } + if (record.getChainBrandId() != null) { + sql.VALUES("chain_brand_id", "#{chainBrandId,jdbcType=BIGINT}"); + } + + if (record.getChainBrandName() != null) { + sql.VALUES("chain_brand_name", "#{chainBrandName,jdbcType=VARCHAR}"); + } + + if (record.getChainBrandSettleType() != null) { + sql.VALUES("chain_brand_settle_type", "#{chainBrandSettleType,jdbcType=INTEGER}"); + } + if (record.getMerNo() != null) { sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); } @@ -151,6 +163,9 @@ public class BsMerchantSqlProvider { sql.SELECT("area_name"); sql.SELECT("oil_price_zone_id"); sql.SELECT("oil_price_zone_name"); + sql.SELECT("chain_brand_id"); + sql.SELECT("chain_brand_name"); + sql.SELECT("chain_brand_settle_type"); sql.SELECT("mer_no"); sql.SELECT("mer_logo"); sql.SELECT("mer_name"); @@ -225,6 +240,18 @@ public class BsMerchantSqlProvider { sql.SET("oil_price_zone_name = #{record.oilPriceZoneName,jdbcType=VARCHAR}"); } + if (record.getChainBrandId() != null) { + sql.SET("chain_brand_id = #{record.chainBrandId,jdbcType=BIGINT}"); + } + + if (record.getChainBrandName() != null) { + sql.SET("chain_brand_name = #{record.chainBrandName,jdbcType=VARCHAR}"); + } + + if (record.getChainBrandSettleType() != null) { + sql.SET("chain_brand_settle_type = #{record.chainBrandSettleType,jdbcType=INTEGER}"); + } + if (record.getMerNo() != null) { sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); } @@ -311,6 +338,9 @@ public class BsMerchantSqlProvider { sql.SET("area_name = #{record.areaName,jdbcType=VARCHAR}"); sql.SET("oil_price_zone_id = #{record.oilPriceZoneId,jdbcType=INTEGER}"); sql.SET("oil_price_zone_name = #{record.oilPriceZoneName,jdbcType=VARCHAR}"); + sql.SET("chain_brand_id = #{record.chainBrandId,jdbcType=BIGINT}"); + sql.SET("chain_brand_name = #{record.chainBrandName,jdbcType=VARCHAR}"); + sql.SET("chain_brand_settle_type = #{record.chainBrandSettleType,jdbcType=INTEGER}"); sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); sql.SET("mer_logo = #{record.merLogo,jdbcType=VARCHAR}"); sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); @@ -374,6 +404,18 @@ public class BsMerchantSqlProvider { sql.SET("oil_price_zone_name = #{oilPriceZoneName,jdbcType=VARCHAR}"); } + if (record.getChainBrandId() != null) { + sql.SET("chain_brand_id = #{chainBrandId,jdbcType=BIGINT}"); + } + + if (record.getChainBrandName() != null) { + sql.SET("chain_brand_name = #{chainBrandName,jdbcType=VARCHAR}"); + } + + if (record.getChainBrandSettleType() != null) { + sql.SET("chain_brand_settle_type = #{chainBrandSettleType,jdbcType=INTEGER}"); + } + if (record.getMerNo() != null) { sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); } diff --git a/service/src/main/java/com/hfkj/entity/BsGasOrder.java b/service/src/main/java/com/hfkj/entity/BsGasOrder.java index e999376..123d4b0 100644 --- a/service/src/main/java/com/hfkj/entity/BsGasOrder.java +++ b/service/src/main/java/com/hfkj/entity/BsGasOrder.java @@ -69,6 +69,16 @@ public class BsGasOrder implements Serializable { */ private String userPhone; + /** + * 连锁品牌id + */ + private Long merChainBrandId; + + /** + * 连锁品牌名称 + */ + private String merChainBrandName; + /** * 商户id */ @@ -387,6 +397,22 @@ public class BsGasOrder implements Serializable { this.userPhone = userPhone; } + public Long getMerChainBrandId() { + return merChainBrandId; + } + + public void setMerChainBrandId(Long merChainBrandId) { + this.merChainBrandId = merChainBrandId; + } + + public String getMerChainBrandName() { + return merChainBrandName; + } + + public void setMerChainBrandName(String merChainBrandName) { + this.merChainBrandName = merChainBrandName; + } + public Long getMerId() { return merId; } @@ -794,6 +820,8 @@ public class BsGasOrder implements Serializable { && (this.getAgentStaffName() == null ? other.getAgentStaffName() == null : this.getAgentStaffName().equals(other.getAgentStaffName())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) + && (this.getMerChainBrandId() == null ? other.getMerChainBrandId() == null : this.getMerChainBrandId().equals(other.getMerChainBrandId())) + && (this.getMerChainBrandName() == null ? other.getMerChainBrandName() == null : this.getMerChainBrandName().equals(other.getMerChainBrandName())) && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) @@ -859,6 +887,8 @@ public class BsGasOrder implements Serializable { result = prime * result + ((getAgentStaffName() == null) ? 0 : getAgentStaffName().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); + result = prime * result + ((getMerChainBrandId() == null) ? 0 : getMerChainBrandId().hashCode()); + result = prime * result + ((getMerChainBrandName() == null) ? 0 : getMerChainBrandName().hashCode()); result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); @@ -927,6 +957,8 @@ public class BsGasOrder implements Serializable { sb.append(", agentStaffName=").append(agentStaffName); sb.append(", userId=").append(userId); sb.append(", userPhone=").append(userPhone); + sb.append(", merChainBrandId=").append(merChainBrandId); + sb.append(", merChainBrandName=").append(merChainBrandName); sb.append(", merId=").append(merId); sb.append(", merNo=").append(merNo); sb.append(", merName=").append(merName); diff --git a/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java b/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java index 5802c1d..76ecb77 100644 --- a/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java +++ b/service/src/main/java/com/hfkj/entity/BsGasOrderExample.java @@ -846,6 +846,136 @@ public class BsGasOrderExample { return (Criteria) this; } + public Criteria andMerChainBrandIdIsNull() { + addCriterion("mer_chain_brand_id is null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdIsNotNull() { + addCriterion("mer_chain_brand_id is not null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdEqualTo(Long value) { + addCriterion("mer_chain_brand_id =", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdNotEqualTo(Long value) { + addCriterion("mer_chain_brand_id <>", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdGreaterThan(Long value) { + addCriterion("mer_chain_brand_id >", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_chain_brand_id >=", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdLessThan(Long value) { + addCriterion("mer_chain_brand_id <", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdLessThanOrEqualTo(Long value) { + addCriterion("mer_chain_brand_id <=", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdIn(List values) { + addCriterion("mer_chain_brand_id in", values, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdNotIn(List values) { + addCriterion("mer_chain_brand_id not in", values, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdBetween(Long value1, Long value2) { + addCriterion("mer_chain_brand_id between", value1, value2, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdNotBetween(Long value1, Long value2) { + addCriterion("mer_chain_brand_id not between", value1, value2, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameIsNull() { + addCriterion("mer_chain_brand_name is null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameIsNotNull() { + addCriterion("mer_chain_brand_name is not null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameEqualTo(String value) { + addCriterion("mer_chain_brand_name =", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameNotEqualTo(String value) { + addCriterion("mer_chain_brand_name <>", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameGreaterThan(String value) { + addCriterion("mer_chain_brand_name >", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_chain_brand_name >=", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameLessThan(String value) { + addCriterion("mer_chain_brand_name <", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameLessThanOrEqualTo(String value) { + addCriterion("mer_chain_brand_name <=", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameLike(String value) { + addCriterion("mer_chain_brand_name like", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameNotLike(String value) { + addCriterion("mer_chain_brand_name not like", value, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameIn(List values) { + addCriterion("mer_chain_brand_name in", values, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameNotIn(List values) { + addCriterion("mer_chain_brand_name not in", values, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameBetween(String value1, String value2) { + addCriterion("mer_chain_brand_name between", value1, value2, "merChainBrandName"); + return (Criteria) this; + } + + public Criteria andMerChainBrandNameNotBetween(String value1, String value2) { + addCriterion("mer_chain_brand_name not between", value1, value2, "merChainBrandName"); + return (Criteria) this; + } + public Criteria andMerIdIsNull() { addCriterion("mer_id is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/entity/BsMerchant.java b/service/src/main/java/com/hfkj/entity/BsMerchant.java index 80d8ca0..55fd6d6 100644 --- a/service/src/main/java/com/hfkj/entity/BsMerchant.java +++ b/service/src/main/java/com/hfkj/entity/BsMerchant.java @@ -63,6 +63,21 @@ public class BsMerchant implements Serializable { */ private String oilPriceZoneName; + /** + * 连锁品牌id + */ + private Long chainBrandId; + + /** + * 连锁品牌名称 + */ + private String chainBrandName; + + /** + * 连锁品牌结算类型 1:连锁额度 2:商户额度 + */ + private Integer chainBrandSettleType; + /** * 商户编号 */ @@ -221,6 +236,30 @@ public class BsMerchant implements Serializable { this.oilPriceZoneName = oilPriceZoneName; } + public Long getChainBrandId() { + return chainBrandId; + } + + public void setChainBrandId(Long chainBrandId) { + this.chainBrandId = chainBrandId; + } + + public String getChainBrandName() { + return chainBrandName; + } + + public void setChainBrandName(String chainBrandName) { + this.chainBrandName = chainBrandName; + } + + public Integer getChainBrandSettleType() { + return chainBrandSettleType; + } + + public void setChainBrandSettleType(Integer chainBrandSettleType) { + this.chainBrandSettleType = chainBrandSettleType; + } + public String getMerNo() { return merNo; } @@ -379,6 +418,9 @@ public class BsMerchant implements Serializable { && (this.getAreaName() == null ? other.getAreaName() == null : this.getAreaName().equals(other.getAreaName())) && (this.getOilPriceZoneId() == null ? other.getOilPriceZoneId() == null : this.getOilPriceZoneId().equals(other.getOilPriceZoneId())) && (this.getOilPriceZoneName() == null ? other.getOilPriceZoneName() == null : this.getOilPriceZoneName().equals(other.getOilPriceZoneName())) + && (this.getChainBrandId() == null ? other.getChainBrandId() == null : this.getChainBrandId().equals(other.getChainBrandId())) + && (this.getChainBrandName() == null ? other.getChainBrandName() == null : this.getChainBrandName().equals(other.getChainBrandName())) + && (this.getChainBrandSettleType() == null ? other.getChainBrandSettleType() == null : this.getChainBrandSettleType().equals(other.getChainBrandSettleType())) && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) && (this.getMerLogo() == null ? other.getMerLogo() == null : this.getMerLogo().equals(other.getMerLogo())) && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) @@ -412,6 +454,9 @@ public class BsMerchant implements Serializable { result = prime * result + ((getAreaName() == null) ? 0 : getAreaName().hashCode()); result = prime * result + ((getOilPriceZoneId() == null) ? 0 : getOilPriceZoneId().hashCode()); result = prime * result + ((getOilPriceZoneName() == null) ? 0 : getOilPriceZoneName().hashCode()); + result = prime * result + ((getChainBrandId() == null) ? 0 : getChainBrandId().hashCode()); + result = prime * result + ((getChainBrandName() == null) ? 0 : getChainBrandName().hashCode()); + result = prime * result + ((getChainBrandSettleType() == null) ? 0 : getChainBrandSettleType().hashCode()); result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); result = prime * result + ((getMerLogo() == null) ? 0 : getMerLogo().hashCode()); result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); @@ -448,6 +493,9 @@ public class BsMerchant implements Serializable { sb.append(", areaName=").append(areaName); sb.append(", oilPriceZoneId=").append(oilPriceZoneId); sb.append(", oilPriceZoneName=").append(oilPriceZoneName); + sb.append(", chainBrandId=").append(chainBrandId); + sb.append(", chainBrandName=").append(chainBrandName); + sb.append(", chainBrandSettleType=").append(chainBrandSettleType); sb.append(", merNo=").append(merNo); sb.append(", merLogo=").append(merLogo); sb.append(", merName=").append(merName); diff --git a/service/src/main/java/com/hfkj/entity/BsMerchantChainBrand.java b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrand.java new file mode 100644 index 0000000..6d30b4d --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrand.java @@ -0,0 +1,200 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * bs_merchant_chain_brand + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMerchantChainBrand implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 连锁品牌名称 + */ + private String name; + + /** + * 负责人名称 + */ + private String contactsName; + + /** + * 负责人电话 + */ + private String contactsTelephone; + + /** + * 状态 0:删除 1:可用 + */ + private Integer status; + + /** + * 创建时间 + */ + 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 getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getContactsName() { + return contactsName; + } + + public void setContactsName(String contactsName) { + this.contactsName = contactsName; + } + + public String getContactsTelephone() { + return contactsTelephone; + } + + public void setContactsTelephone(String contactsTelephone) { + this.contactsTelephone = contactsTelephone; + } + + 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 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; + } + BsMerchantChainBrand other = (BsMerchantChainBrand) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getContactsName() == null ? other.getContactsName() == null : this.getContactsName().equals(other.getContactsName())) + && (this.getContactsTelephone() == null ? other.getContactsTelephone() == null : this.getContactsTelephone().equals(other.getContactsTelephone())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (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 + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getContactsName() == null) ? 0 : getContactsName().hashCode()); + result = prime * result + ((getContactsTelephone() == null) ? 0 : getContactsTelephone().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", name=").append(name); + sb.append(", contactsName=").append(contactsName); + sb.append(", contactsTelephone=").append(contactsTelephone); + sb.append(", status=").append(status); + 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/BsMerchantChainBrandAccount.java b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccount.java new file mode 100644 index 0000000..51f3c26 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccount.java @@ -0,0 +1,198 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_merchant_chain_brand_account + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMerchantChainBrandAccount implements Serializable { + private Long id; + + /** + * 商户连锁品牌id + */ + private Long merChainBrandId; + + /** + * 余额 + */ + private BigDecimal amount; + + /** + * 消费金额 + */ + private BigDecimal amountConsume; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + 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 Long getMerChainBrandId() { + return merChainBrandId; + } + + public void setMerChainBrandId(Long merChainBrandId) { + this.merChainBrandId = merChainBrandId; + } + + public BigDecimal getAmount() { + return amount; + } + + public void setAmount(BigDecimal amount) { + this.amount = amount; + } + + public BigDecimal getAmountConsume() { + return amountConsume; + } + + public void setAmountConsume(BigDecimal amountConsume) { + this.amountConsume = amountConsume; + } + + 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 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; + } + BsMerchantChainBrandAccount other = (BsMerchantChainBrandAccount) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerChainBrandId() == null ? other.getMerChainBrandId() == null : this.getMerChainBrandId().equals(other.getMerChainBrandId())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getAmountConsume() == null ? other.getAmountConsume() == null : this.getAmountConsume().equals(other.getAmountConsume())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (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 + ((getMerChainBrandId() == null) ? 0 : getMerChainBrandId().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getAmountConsume() == null) ? 0 : getAmountConsume().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", merChainBrandId=").append(merChainBrandId); + sb.append(", amount=").append(amount); + sb.append(", amountConsume=").append(amountConsume); + sb.append(", status=").append(status); + 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/BsMerchantChainBrandAccountExample.java b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccountExample.java new file mode 100644 index 0000000..a0b23e1 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccountExample.java @@ -0,0 +1,854 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMerchantChainBrandAccountExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMerchantChainBrandAccountExample() { + 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 andMerChainBrandIdIsNull() { + addCriterion("mer_chain_brand_id is null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdIsNotNull() { + addCriterion("mer_chain_brand_id is not null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdEqualTo(Long value) { + addCriterion("mer_chain_brand_id =", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdNotEqualTo(Long value) { + addCriterion("mer_chain_brand_id <>", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdGreaterThan(Long value) { + addCriterion("mer_chain_brand_id >", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_chain_brand_id >=", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdLessThan(Long value) { + addCriterion("mer_chain_brand_id <", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdLessThanOrEqualTo(Long value) { + addCriterion("mer_chain_brand_id <=", value, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdIn(List values) { + addCriterion("mer_chain_brand_id in", values, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdNotIn(List values) { + addCriterion("mer_chain_brand_id not in", values, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdBetween(Long value1, Long value2) { + addCriterion("mer_chain_brand_id between", value1, value2, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandIdNotBetween(Long value1, Long value2) { + addCriterion("mer_chain_brand_id not between", value1, value2, "merChainBrandId"); + return (Criteria) this; + } + + public Criteria andAmountIsNull() { + addCriterion("amount is null"); + return (Criteria) this; + } + + public Criteria andAmountIsNotNull() { + addCriterion("amount is not null"); + return (Criteria) this; + } + + public Criteria andAmountEqualTo(BigDecimal value) { + addCriterion("amount =", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotEqualTo(BigDecimal value) { + addCriterion("amount <>", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThan(BigDecimal value) { + addCriterion("amount >", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("amount >=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThan(BigDecimal value) { + addCriterion("amount <", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("amount <=", value, "amount"); + return (Criteria) this; + } + + public Criteria andAmountIn(List values) { + addCriterion("amount in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotIn(List values) { + addCriterion("amount not in", values, "amount"); + return (Criteria) this; + } + + public Criteria andAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount not between", value1, value2, "amount"); + return (Criteria) this; + } + + public Criteria andAmountConsumeIsNull() { + addCriterion("amount_consume is null"); + return (Criteria) this; + } + + public Criteria andAmountConsumeIsNotNull() { + addCriterion("amount_consume is not null"); + return (Criteria) this; + } + + public Criteria andAmountConsumeEqualTo(BigDecimal value) { + addCriterion("amount_consume =", value, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeNotEqualTo(BigDecimal value) { + addCriterion("amount_consume <>", value, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeGreaterThan(BigDecimal value) { + addCriterion("amount_consume >", value, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("amount_consume >=", value, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeLessThan(BigDecimal value) { + addCriterion("amount_consume <", value, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeLessThanOrEqualTo(BigDecimal value) { + addCriterion("amount_consume <=", value, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeIn(List values) { + addCriterion("amount_consume in", values, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeNotIn(List values) { + addCriterion("amount_consume not in", values, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount_consume between", value1, value2, "amountConsume"); + return (Criteria) this; + } + + public Criteria andAmountConsumeNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("amount_consume not between", value1, value2, "amountConsume"); + 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 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/BsMerchantChainBrandAccountRecord.java b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccountRecord.java new file mode 100644 index 0000000..7345591 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccountRecord.java @@ -0,0 +1,390 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_merchant_chain_brand_account_record + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsMerchantChainBrandAccountRecord implements Serializable { + private Long id; + + /** + * 商户连锁品牌账户id + */ + private Long merChainBrandAccountId; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户编号 + */ + private String merNo; + + /** + * 商户名称 + */ + private String merName; + + /** + * 类型 1:进账 2:出账 + */ + private Integer type; + + /** + * 交易金额 + */ + private BigDecimal transactionAmount; + + /** + * 变更前金额 + */ + private BigDecimal beforeAmount; + + /** + * 变更后金额 + */ + private BigDecimal afterAmount; + + /** + * 来源类型 1. 充值金额 2. 订单扣除 + */ + private Integer sourceType; + + /** + * 来源id + */ + private Long sourceId; + + /** + * 来源订单号 + */ + private String sourceOrderNo; + + /** + * 来源内容 + */ + private String sourceContent; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 操作人类型 1:管理员 2:客户 + */ + private Integer opUserType; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + /** + * 操作人电话 + */ + private String opUserPhone; + + 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 getMerChainBrandAccountId() { + return merChainBrandAccountId; + } + + public void setMerChainBrandAccountId(Long merChainBrandAccountId) { + this.merChainBrandAccountId = merChainBrandAccountId; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public BigDecimal getTransactionAmount() { + return transactionAmount; + } + + public void setTransactionAmount(BigDecimal transactionAmount) { + this.transactionAmount = transactionAmount; + } + + public BigDecimal getBeforeAmount() { + return beforeAmount; + } + + public void setBeforeAmount(BigDecimal beforeAmount) { + this.beforeAmount = beforeAmount; + } + + public BigDecimal getAfterAmount() { + return afterAmount; + } + + public void setAfterAmount(BigDecimal afterAmount) { + this.afterAmount = afterAmount; + } + + public Integer getSourceType() { + return sourceType; + } + + public void setSourceType(Integer sourceType) { + this.sourceType = sourceType; + } + + public Long getSourceId() { + return sourceId; + } + + public void setSourceId(Long sourceId) { + this.sourceId = sourceId; + } + + public String getSourceOrderNo() { + return sourceOrderNo; + } + + public void setSourceOrderNo(String sourceOrderNo) { + this.sourceOrderNo = sourceOrderNo; + } + + public String getSourceContent() { + return sourceContent; + } + + public void setSourceContent(String sourceContent) { + this.sourceContent = sourceContent; + } + + 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 Integer getOpUserType() { + return opUserType; + } + + public void setOpUserType(Integer opUserType) { + this.opUserType = opUserType; + } + + public Long getOpUserId() { + return opUserId; + } + + public void setOpUserId(Long opUserId) { + this.opUserId = opUserId; + } + + public String getOpUserName() { + return opUserName; + } + + public void setOpUserName(String opUserName) { + this.opUserName = opUserName; + } + + public String getOpUserPhone() { + return opUserPhone; + } + + public void setOpUserPhone(String opUserPhone) { + this.opUserPhone = opUserPhone; + } + + 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; + } + BsMerchantChainBrandAccountRecord other = (BsMerchantChainBrandAccountRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getMerChainBrandAccountId() == null ? other.getMerChainBrandAccountId() == null : this.getMerChainBrandAccountId().equals(other.getMerChainBrandAccountId())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getTransactionAmount() == null ? other.getTransactionAmount() == null : this.getTransactionAmount().equals(other.getTransactionAmount())) + && (this.getBeforeAmount() == null ? other.getBeforeAmount() == null : this.getBeforeAmount().equals(other.getBeforeAmount())) + && (this.getAfterAmount() == null ? other.getAfterAmount() == null : this.getAfterAmount().equals(other.getAfterAmount())) + && (this.getSourceType() == null ? other.getSourceType() == null : this.getSourceType().equals(other.getSourceType())) + && (this.getSourceId() == null ? other.getSourceId() == null : this.getSourceId().equals(other.getSourceId())) + && (this.getSourceOrderNo() == null ? other.getSourceOrderNo() == null : this.getSourceOrderNo().equals(other.getSourceOrderNo())) + && (this.getSourceContent() == null ? other.getSourceContent() == null : this.getSourceContent().equals(other.getSourceContent())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getOpUserType() == null ? other.getOpUserType() == null : this.getOpUserType().equals(other.getOpUserType())) + && (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (this.getOpUserPhone() == null ? other.getOpUserPhone() == null : this.getOpUserPhone().equals(other.getOpUserPhone())) + && (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 + ((getMerChainBrandAccountId() == null) ? 0 : getMerChainBrandAccountId().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getTransactionAmount() == null) ? 0 : getTransactionAmount().hashCode()); + result = prime * result + ((getBeforeAmount() == null) ? 0 : getBeforeAmount().hashCode()); + result = prime * result + ((getAfterAmount() == null) ? 0 : getAfterAmount().hashCode()); + result = prime * result + ((getSourceType() == null) ? 0 : getSourceType().hashCode()); + result = prime * result + ((getSourceId() == null) ? 0 : getSourceId().hashCode()); + result = prime * result + ((getSourceOrderNo() == null) ? 0 : getSourceOrderNo().hashCode()); + result = prime * result + ((getSourceContent() == null) ? 0 : getSourceContent().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getOpUserType() == null) ? 0 : getOpUserType().hashCode()); + result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().hashCode()); + result = prime * result + ((getOpUserPhone() == null) ? 0 : getOpUserPhone().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(", merChainBrandAccountId=").append(merChainBrandAccountId); + sb.append(", merId=").append(merId); + sb.append(", merNo=").append(merNo); + sb.append(", merName=").append(merName); + sb.append(", type=").append(type); + sb.append(", transactionAmount=").append(transactionAmount); + sb.append(", beforeAmount=").append(beforeAmount); + sb.append(", afterAmount=").append(afterAmount); + sb.append(", sourceType=").append(sourceType); + sb.append(", sourceId=").append(sourceId); + sb.append(", sourceOrderNo=").append(sourceOrderNo); + sb.append(", sourceContent=").append(sourceContent); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", opUserType=").append(opUserType); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + sb.append(", opUserPhone=").append(opUserPhone); + 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/BsMerchantChainBrandAccountRecordExample.java b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccountRecordExample.java new file mode 100644 index 0000000..667e87e --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandAccountRecordExample.java @@ -0,0 +1,1634 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMerchantChainBrandAccountRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMerchantChainBrandAccountRecordExample() { + 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 andMerChainBrandAccountIdIsNull() { + addCriterion("mer_chain_brand_account_id is null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdIsNotNull() { + addCriterion("mer_chain_brand_account_id is not null"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdEqualTo(Long value) { + addCriterion("mer_chain_brand_account_id =", value, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdNotEqualTo(Long value) { + addCriterion("mer_chain_brand_account_id <>", value, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdGreaterThan(Long value) { + addCriterion("mer_chain_brand_account_id >", value, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_chain_brand_account_id >=", value, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdLessThan(Long value) { + addCriterion("mer_chain_brand_account_id <", value, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdLessThanOrEqualTo(Long value) { + addCriterion("mer_chain_brand_account_id <=", value, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdIn(List values) { + addCriterion("mer_chain_brand_account_id in", values, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdNotIn(List values) { + addCriterion("mer_chain_brand_account_id not in", values, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdBetween(Long value1, Long value2) { + addCriterion("mer_chain_brand_account_id between", value1, value2, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerChainBrandAccountIdNotBetween(Long value1, Long value2) { + addCriterion("mer_chain_brand_account_id not between", value1, value2, "merChainBrandAccountId"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNoIsNull() { + addCriterion("mer_no is null"); + return (Criteria) this; + } + + public Criteria andMerNoIsNotNull() { + addCriterion("mer_no is not null"); + return (Criteria) this; + } + + public Criteria andMerNoEqualTo(String value) { + addCriterion("mer_no =", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotEqualTo(String value) { + addCriterion("mer_no <>", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThan(String value) { + addCriterion("mer_no >", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoGreaterThanOrEqualTo(String value) { + addCriterion("mer_no >=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThan(String value) { + addCriterion("mer_no <", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLessThanOrEqualTo(String value) { + addCriterion("mer_no <=", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoLike(String value) { + addCriterion("mer_no like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotLike(String value) { + addCriterion("mer_no not like", value, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoIn(List values) { + addCriterion("mer_no in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotIn(List values) { + addCriterion("mer_no not in", values, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoBetween(String value1, String value2) { + addCriterion("mer_no between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNoNotBetween(String value1, String value2) { + addCriterion("mer_no not between", value1, value2, "merNo"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTransactionAmountIsNull() { + addCriterion("transaction_amount is null"); + return (Criteria) this; + } + + public Criteria andTransactionAmountIsNotNull() { + addCriterion("transaction_amount is not null"); + return (Criteria) this; + } + + public Criteria andTransactionAmountEqualTo(BigDecimal value) { + addCriterion("transaction_amount =", value, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountNotEqualTo(BigDecimal value) { + addCriterion("transaction_amount <>", value, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountGreaterThan(BigDecimal value) { + addCriterion("transaction_amount >", value, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("transaction_amount >=", value, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountLessThan(BigDecimal value) { + addCriterion("transaction_amount <", value, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("transaction_amount <=", value, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountIn(List values) { + addCriterion("transaction_amount in", values, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountNotIn(List values) { + addCriterion("transaction_amount not in", values, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("transaction_amount between", value1, value2, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andTransactionAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("transaction_amount not between", value1, value2, "transactionAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountIsNull() { + addCriterion("before_amount is null"); + return (Criteria) this; + } + + public Criteria andBeforeAmountIsNotNull() { + addCriterion("before_amount is not null"); + return (Criteria) this; + } + + public Criteria andBeforeAmountEqualTo(BigDecimal value) { + addCriterion("before_amount =", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountNotEqualTo(BigDecimal value) { + addCriterion("before_amount <>", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountGreaterThan(BigDecimal value) { + addCriterion("before_amount >", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("before_amount >=", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountLessThan(BigDecimal value) { + addCriterion("before_amount <", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("before_amount <=", value, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountIn(List values) { + addCriterion("before_amount in", values, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountNotIn(List values) { + addCriterion("before_amount not in", values, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("before_amount between", value1, value2, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andBeforeAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("before_amount not between", value1, value2, "beforeAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountIsNull() { + addCriterion("after_amount is null"); + return (Criteria) this; + } + + public Criteria andAfterAmountIsNotNull() { + addCriterion("after_amount is not null"); + return (Criteria) this; + } + + public Criteria andAfterAmountEqualTo(BigDecimal value) { + addCriterion("after_amount =", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountNotEqualTo(BigDecimal value) { + addCriterion("after_amount <>", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountGreaterThan(BigDecimal value) { + addCriterion("after_amount >", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("after_amount >=", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountLessThan(BigDecimal value) { + addCriterion("after_amount <", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("after_amount <=", value, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountIn(List values) { + addCriterion("after_amount in", values, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountNotIn(List values) { + addCriterion("after_amount not in", values, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("after_amount between", value1, value2, "afterAmount"); + return (Criteria) this; + } + + public Criteria andAfterAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("after_amount not between", value1, value2, "afterAmount"); + return (Criteria) this; + } + + public Criteria andSourceTypeIsNull() { + addCriterion("source_type is null"); + return (Criteria) this; + } + + public Criteria andSourceTypeIsNotNull() { + addCriterion("source_type is not null"); + return (Criteria) this; + } + + public Criteria andSourceTypeEqualTo(Integer value) { + addCriterion("source_type =", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotEqualTo(Integer value) { + addCriterion("source_type <>", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeGreaterThan(Integer value) { + addCriterion("source_type >", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("source_type >=", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeLessThan(Integer value) { + addCriterion("source_type <", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeLessThanOrEqualTo(Integer value) { + addCriterion("source_type <=", value, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeIn(List values) { + addCriterion("source_type in", values, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotIn(List values) { + addCriterion("source_type not in", values, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeBetween(Integer value1, Integer value2) { + addCriterion("source_type between", value1, value2, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceTypeNotBetween(Integer value1, Integer value2) { + addCriterion("source_type not between", value1, value2, "sourceType"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNull() { + addCriterion("source_id is null"); + return (Criteria) this; + } + + public Criteria andSourceIdIsNotNull() { + addCriterion("source_id is not null"); + return (Criteria) this; + } + + public Criteria andSourceIdEqualTo(Long value) { + addCriterion("source_id =", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotEqualTo(Long value) { + addCriterion("source_id <>", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThan(Long value) { + addCriterion("source_id >", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdGreaterThanOrEqualTo(Long value) { + addCriterion("source_id >=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThan(Long value) { + addCriterion("source_id <", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdLessThanOrEqualTo(Long value) { + addCriterion("source_id <=", value, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdIn(List values) { + addCriterion("source_id in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotIn(List values) { + addCriterion("source_id not in", values, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdBetween(Long value1, Long value2) { + addCriterion("source_id between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceIdNotBetween(Long value1, Long value2) { + addCriterion("source_id not between", value1, value2, "sourceId"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoIsNull() { + addCriterion("source_order_no is null"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoIsNotNull() { + addCriterion("source_order_no is not null"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoEqualTo(String value) { + addCriterion("source_order_no =", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoNotEqualTo(String value) { + addCriterion("source_order_no <>", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoGreaterThan(String value) { + addCriterion("source_order_no >", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoGreaterThanOrEqualTo(String value) { + addCriterion("source_order_no >=", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoLessThan(String value) { + addCriterion("source_order_no <", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoLessThanOrEqualTo(String value) { + addCriterion("source_order_no <=", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoLike(String value) { + addCriterion("source_order_no like", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoNotLike(String value) { + addCriterion("source_order_no not like", value, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoIn(List values) { + addCriterion("source_order_no in", values, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoNotIn(List values) { + addCriterion("source_order_no not in", values, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoBetween(String value1, String value2) { + addCriterion("source_order_no between", value1, value2, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceOrderNoNotBetween(String value1, String value2) { + addCriterion("source_order_no not between", value1, value2, "sourceOrderNo"); + return (Criteria) this; + } + + public Criteria andSourceContentIsNull() { + addCriterion("source_content is null"); + return (Criteria) this; + } + + public Criteria andSourceContentIsNotNull() { + addCriterion("source_content is not null"); + return (Criteria) this; + } + + public Criteria andSourceContentEqualTo(String value) { + addCriterion("source_content =", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotEqualTo(String value) { + addCriterion("source_content <>", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentGreaterThan(String value) { + addCriterion("source_content >", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentGreaterThanOrEqualTo(String value) { + addCriterion("source_content >=", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentLessThan(String value) { + addCriterion("source_content <", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentLessThanOrEqualTo(String value) { + addCriterion("source_content <=", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentLike(String value) { + addCriterion("source_content like", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotLike(String value) { + addCriterion("source_content not like", value, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentIn(List values) { + addCriterion("source_content in", values, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotIn(List values) { + addCriterion("source_content not in", values, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentBetween(String value1, String value2) { + addCriterion("source_content between", value1, value2, "sourceContent"); + return (Criteria) this; + } + + public Criteria andSourceContentNotBetween(String value1, String value2) { + addCriterion("source_content not between", value1, value2, "sourceContent"); + 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 andOpUserTypeIsNull() { + addCriterion("op_user_type is null"); + return (Criteria) this; + } + + public Criteria andOpUserTypeIsNotNull() { + addCriterion("op_user_type is not null"); + return (Criteria) this; + } + + public Criteria andOpUserTypeEqualTo(Integer value) { + addCriterion("op_user_type =", value, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeNotEqualTo(Integer value) { + addCriterion("op_user_type <>", value, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeGreaterThan(Integer value) { + addCriterion("op_user_type >", value, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("op_user_type >=", value, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeLessThan(Integer value) { + addCriterion("op_user_type <", value, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeLessThanOrEqualTo(Integer value) { + addCriterion("op_user_type <=", value, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeIn(List values) { + addCriterion("op_user_type in", values, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeNotIn(List values) { + addCriterion("op_user_type not in", values, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeBetween(Integer value1, Integer value2) { + addCriterion("op_user_type between", value1, value2, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserTypeNotBetween(Integer value1, Integer value2) { + addCriterion("op_user_type not between", value1, value2, "opUserType"); + return (Criteria) this; + } + + public Criteria andOpUserIdIsNull() { + addCriterion("op_user_id is null"); + return (Criteria) this; + } + + public Criteria andOpUserIdIsNotNull() { + addCriterion("op_user_id is not null"); + return (Criteria) this; + } + + public Criteria andOpUserIdEqualTo(Long value) { + addCriterion("op_user_id =", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdNotEqualTo(Long value) { + addCriterion("op_user_id <>", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdGreaterThan(Long value) { + addCriterion("op_user_id >", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_user_id >=", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdLessThan(Long value) { + addCriterion("op_user_id <", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdLessThanOrEqualTo(Long value) { + addCriterion("op_user_id <=", value, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdIn(List values) { + addCriterion("op_user_id in", values, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdNotIn(List values) { + addCriterion("op_user_id not in", values, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdBetween(Long value1, Long value2) { + addCriterion("op_user_id between", value1, value2, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserIdNotBetween(Long value1, Long value2) { + addCriterion("op_user_id not between", value1, value2, "opUserId"); + return (Criteria) this; + } + + public Criteria andOpUserNameIsNull() { + addCriterion("op_user_name is null"); + return (Criteria) this; + } + + public Criteria andOpUserNameIsNotNull() { + addCriterion("op_user_name is not null"); + return (Criteria) this; + } + + public Criteria andOpUserNameEqualTo(String value) { + addCriterion("op_user_name =", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotEqualTo(String value) { + addCriterion("op_user_name <>", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameGreaterThan(String value) { + addCriterion("op_user_name >", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameGreaterThanOrEqualTo(String value) { + addCriterion("op_user_name >=", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameLessThan(String value) { + addCriterion("op_user_name <", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameLessThanOrEqualTo(String value) { + addCriterion("op_user_name <=", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameLike(String value) { + addCriterion("op_user_name like", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotLike(String value) { + addCriterion("op_user_name not like", value, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameIn(List values) { + addCriterion("op_user_name in", values, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotIn(List values) { + addCriterion("op_user_name not in", values, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameBetween(String value1, String value2) { + addCriterion("op_user_name between", value1, value2, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserNameNotBetween(String value1, String value2) { + addCriterion("op_user_name not between", value1, value2, "opUserName"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneIsNull() { + addCriterion("op_user_phone is null"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneIsNotNull() { + addCriterion("op_user_phone is not null"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneEqualTo(String value) { + addCriterion("op_user_phone =", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneNotEqualTo(String value) { + addCriterion("op_user_phone <>", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneGreaterThan(String value) { + addCriterion("op_user_phone >", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneGreaterThanOrEqualTo(String value) { + addCriterion("op_user_phone >=", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneLessThan(String value) { + addCriterion("op_user_phone <", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneLessThanOrEqualTo(String value) { + addCriterion("op_user_phone <=", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneLike(String value) { + addCriterion("op_user_phone like", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneNotLike(String value) { + addCriterion("op_user_phone not like", value, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneIn(List values) { + addCriterion("op_user_phone in", values, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneNotIn(List values) { + addCriterion("op_user_phone not in", values, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneBetween(String value1, String value2) { + addCriterion("op_user_phone between", value1, value2, "opUserPhone"); + return (Criteria) this; + } + + public Criteria andOpUserPhoneNotBetween(String value1, String value2) { + addCriterion("op_user_phone not between", value1, value2, "opUserPhone"); + 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/BsMerchantChainBrandExample.java b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandExample.java new file mode 100644 index 0000000..65f3cd7 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsMerchantChainBrandExample.java @@ -0,0 +1,883 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsMerchantChainBrandExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsMerchantChainBrandExample() { + 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 andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andContactsNameIsNull() { + addCriterion("contacts_name is null"); + return (Criteria) this; + } + + public Criteria andContactsNameIsNotNull() { + addCriterion("contacts_name is not null"); + return (Criteria) this; + } + + public Criteria andContactsNameEqualTo(String value) { + addCriterion("contacts_name =", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameNotEqualTo(String value) { + addCriterion("contacts_name <>", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameGreaterThan(String value) { + addCriterion("contacts_name >", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameGreaterThanOrEqualTo(String value) { + addCriterion("contacts_name >=", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameLessThan(String value) { + addCriterion("contacts_name <", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameLessThanOrEqualTo(String value) { + addCriterion("contacts_name <=", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameLike(String value) { + addCriterion("contacts_name like", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameNotLike(String value) { + addCriterion("contacts_name not like", value, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameIn(List values) { + addCriterion("contacts_name in", values, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameNotIn(List values) { + addCriterion("contacts_name not in", values, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameBetween(String value1, String value2) { + addCriterion("contacts_name between", value1, value2, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsNameNotBetween(String value1, String value2) { + addCriterion("contacts_name not between", value1, value2, "contactsName"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneIsNull() { + addCriterion("contacts_telephone is null"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneIsNotNull() { + addCriterion("contacts_telephone is not null"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneEqualTo(String value) { + addCriterion("contacts_telephone =", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneNotEqualTo(String value) { + addCriterion("contacts_telephone <>", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneGreaterThan(String value) { + addCriterion("contacts_telephone >", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneGreaterThanOrEqualTo(String value) { + addCriterion("contacts_telephone >=", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneLessThan(String value) { + addCriterion("contacts_telephone <", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneLessThanOrEqualTo(String value) { + addCriterion("contacts_telephone <=", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneLike(String value) { + addCriterion("contacts_telephone like", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneNotLike(String value) { + addCriterion("contacts_telephone not like", value, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneIn(List values) { + addCriterion("contacts_telephone in", values, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneNotIn(List values) { + addCriterion("contacts_telephone not in", values, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneBetween(String value1, String value2) { + addCriterion("contacts_telephone between", value1, value2, "contactsTelephone"); + return (Criteria) this; + } + + public Criteria andContactsTelephoneNotBetween(String value1, String value2) { + addCriterion("contacts_telephone not between", value1, value2, "contactsTelephone"); + 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 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/BsMerchantExample.java b/service/src/main/java/com/hfkj/entity/BsMerchantExample.java index e1e43de..360d632 100644 --- a/service/src/main/java/com/hfkj/entity/BsMerchantExample.java +++ b/service/src/main/java/com/hfkj/entity/BsMerchantExample.java @@ -765,6 +765,196 @@ public class BsMerchantExample { return (Criteria) this; } + public Criteria andChainBrandIdIsNull() { + addCriterion("chain_brand_id is null"); + return (Criteria) this; + } + + public Criteria andChainBrandIdIsNotNull() { + addCriterion("chain_brand_id is not null"); + return (Criteria) this; + } + + public Criteria andChainBrandIdEqualTo(Long value) { + addCriterion("chain_brand_id =", value, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdNotEqualTo(Long value) { + addCriterion("chain_brand_id <>", value, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdGreaterThan(Long value) { + addCriterion("chain_brand_id >", value, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdGreaterThanOrEqualTo(Long value) { + addCriterion("chain_brand_id >=", value, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdLessThan(Long value) { + addCriterion("chain_brand_id <", value, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdLessThanOrEqualTo(Long value) { + addCriterion("chain_brand_id <=", value, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdIn(List values) { + addCriterion("chain_brand_id in", values, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdNotIn(List values) { + addCriterion("chain_brand_id not in", values, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdBetween(Long value1, Long value2) { + addCriterion("chain_brand_id between", value1, value2, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandIdNotBetween(Long value1, Long value2) { + addCriterion("chain_brand_id not between", value1, value2, "chainBrandId"); + return (Criteria) this; + } + + public Criteria andChainBrandNameIsNull() { + addCriterion("chain_brand_name is null"); + return (Criteria) this; + } + + public Criteria andChainBrandNameIsNotNull() { + addCriterion("chain_brand_name is not null"); + return (Criteria) this; + } + + public Criteria andChainBrandNameEqualTo(String value) { + addCriterion("chain_brand_name =", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameNotEqualTo(String value) { + addCriterion("chain_brand_name <>", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameGreaterThan(String value) { + addCriterion("chain_brand_name >", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameGreaterThanOrEqualTo(String value) { + addCriterion("chain_brand_name >=", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameLessThan(String value) { + addCriterion("chain_brand_name <", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameLessThanOrEqualTo(String value) { + addCriterion("chain_brand_name <=", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameLike(String value) { + addCriterion("chain_brand_name like", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameNotLike(String value) { + addCriterion("chain_brand_name not like", value, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameIn(List values) { + addCriterion("chain_brand_name in", values, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameNotIn(List values) { + addCriterion("chain_brand_name not in", values, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameBetween(String value1, String value2) { + addCriterion("chain_brand_name between", value1, value2, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandNameNotBetween(String value1, String value2) { + addCriterion("chain_brand_name not between", value1, value2, "chainBrandName"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeIsNull() { + addCriterion("chain_brand_settle_type is null"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeIsNotNull() { + addCriterion("chain_brand_settle_type is not null"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeEqualTo(Integer value) { + addCriterion("chain_brand_settle_type =", value, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeNotEqualTo(Integer value) { + addCriterion("chain_brand_settle_type <>", value, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeGreaterThan(Integer value) { + addCriterion("chain_brand_settle_type >", value, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("chain_brand_settle_type >=", value, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeLessThan(Integer value) { + addCriterion("chain_brand_settle_type <", value, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeLessThanOrEqualTo(Integer value) { + addCriterion("chain_brand_settle_type <=", value, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeIn(List values) { + addCriterion("chain_brand_settle_type in", values, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeNotIn(List values) { + addCriterion("chain_brand_settle_type not in", values, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeBetween(Integer value1, Integer value2) { + addCriterion("chain_brand_settle_type between", value1, value2, "chainBrandSettleType"); + return (Criteria) this; + } + + public Criteria andChainBrandSettleTypeNotBetween(Integer value1, Integer value2) { + addCriterion("chain_brand_settle_type not between", value1, value2, "chainBrandSettleType"); + return (Criteria) this; + } + public Criteria andMerNoIsNull() { addCriterion("mer_no is null"); return (Criteria) this; diff --git a/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java index dc6e7bd..a2bb50c 100644 --- a/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/agent/impl/BsAgentMerServiceImpl.java @@ -11,7 +11,7 @@ import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.service.agent.BsAgentMerService; import com.hfkj.service.agent.BsAgentService; import com.hfkj.service.agent.BsAgentStaffService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceWeekServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceWeekServiceImpl.java index 7126e40..5bd7a65 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceWeekServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOilPriceWeekServiceImpl.java @@ -13,7 +13,7 @@ import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.gas.BsGasOilPriceWeekService; import com.hfkj.service.gas.BsGasService; import com.hfkj.service.merchant.BsMerchantService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.gas.GasOilNoEnum; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; diff --git a/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandAccountRecordService.java b/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandAccountRecordService.java new file mode 100644 index 0000000..b23222a --- /dev/null +++ b/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandAccountRecordService.java @@ -0,0 +1,35 @@ +package com.hfkj.service.merchant; + +import com.hfkj.entity.BsMerchantAccountRecord; +import com.hfkj.entity.BsMerchantChainBrandAccountRecord; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandAccountRecordService + * @author: HuRui + * @date: 2024/8/14 + **/ +public interface BsMerchantChainBrandAccountRecordService { + + /** + * 创建 + * @param data + */ + void create(BsMerchantChainBrandAccountRecord data); + + /** + * 查询详情 + * @param id + * @return + */ + BsMerchantChainBrandAccountRecord getDetail(Long id); + + /** + * 查询列表 + * @param param + * @return + */ + List getList(Map param); +} diff --git a/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandAccountService.java b/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandAccountService.java new file mode 100644 index 0000000..4064c83 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandAccountService.java @@ -0,0 +1,54 @@ +package com.hfkj.service.merchant; + +import com.hfkj.entity.BsMerchantChainBrandAccount; +import com.hfkj.entity.BsOrderRefund; + +import java.math.BigDecimal; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandAccountService + * @author: HuRui + * @date: 2024/8/14 + **/ +public interface BsMerchantChainBrandAccountService { + + /** + * 编辑数据 + * @param data + */ + void editData(BsMerchantChainBrandAccount data); + + /** + * 查询账户 + * @param chainBrandId 连锁品牌id + * @return + */ + BsMerchantChainBrandAccount getAccount(Long chainBrandId); + + /** + * 充值 + * @param chainBrandId 连锁品牌id + * @param amount 金额 + */ + void recharge(Long chainBrandId, BigDecimal amount) throws Exception; + + /** + * 扣除 + * @param chainBrandId 连锁品牌id + * @param merNo 商户 + * @param amount 金额 + * @param otherParam 其他参数 + */ + void consume(Long chainBrandId,String merNo, BigDecimal amount, Map otherParam) throws Exception; + + /** + * 退款 + * @param chainBrandId + * @param merNo + * @param amount + * @param orderRefund + */ + void refund(Long chainBrandId,String merNo, BigDecimal amount, BsOrderRefund orderRefund) throws Exception; + +} diff --git a/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandService.java b/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandService.java new file mode 100644 index 0000000..7f47e28 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/merchant/BsMerchantChainBrandService.java @@ -0,0 +1,45 @@ +package com.hfkj.service.merchant; + +import com.hfkj.entity.BsMerchantChainBrand; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandService + * @author: HuRui + * @date: 2024/8/14 + **/ +public interface BsMerchantChainBrandService { + + /** + * 编辑数据 + * @param data + */ + void editData(BsMerchantChainBrand data); + + /** + * 创建 + * @param chainBrand + */ + void create(BsMerchantChainBrand chainBrand) throws Exception; + + /** + * 修改 + * @param chainBrand + */ + void update(BsMerchantChainBrand chainBrand); + + /** + * 查询详情 + * @param id + */ + BsMerchantChainBrand getDetail(Long id); + + /** + * 查询列表 + * @param param + * @return + */ + List> getList(Map param); +} diff --git a/service/src/main/java/com/hfkj/service/merchant/BsMerchantQrCodeService.java b/service/src/main/java/com/hfkj/service/merchant/BsMerchantQrCodeService.java index d543a8c..a8a05d2 100644 --- a/service/src/main/java/com/hfkj/service/merchant/BsMerchantQrCodeService.java +++ b/service/src/main/java/com/hfkj/service/merchant/BsMerchantQrCodeService.java @@ -1,10 +1,9 @@ package com.hfkj.service.merchant; -import com.google.zxing.WriterException; import com.hfkj.entity.BsMerchant; import com.hfkj.entity.BsMerchantQrCode; -import com.hfkj.sysenum.MerchantQrCodeStatusEnum; -import com.hfkj.sysenum.MerchantQrCodeTypeEnum; +import com.hfkj.sysenum.merchant.MerchantQrCodeStatusEnum; +import com.hfkj.sysenum.merchant.MerchantQrCodeTypeEnum; import java.util.List; diff --git a/service/src/main/java/com/hfkj/service/merchant/BsMerchantService.java b/service/src/main/java/com/hfkj/service/merchant/BsMerchantService.java index b4515d9..6f8f2a6 100644 --- a/service/src/main/java/com/hfkj/service/merchant/BsMerchantService.java +++ b/service/src/main/java/com/hfkj/service/merchant/BsMerchantService.java @@ -1,7 +1,7 @@ package com.hfkj.service.merchant; import com.hfkj.entity.BsMerchant; -import com.hfkj.sysenum.MerchantStatusEnum; +import com.hfkj.sysenum.merchant.MerchantStatusEnum; import java.util.List; import java.util.Map; diff --git a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountRecordServiceImpl.java b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountRecordServiceImpl.java new file mode 100644 index 0000000..9ac9005 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountRecordServiceImpl.java @@ -0,0 +1,91 @@ +package com.hfkj.service.merchant.impl; + +import com.hfkj.common.security.UserCenter; +import com.hfkj.dao.BsMerchantChainBrandAccountRecordMapper; +import com.hfkj.entity.BsMerchantChainBrandAccountRecord; +import com.hfkj.entity.BsMerchantChainBrandAccountRecordExample; +import com.hfkj.model.SecUserSessionObject; +import com.hfkj.model.UserSessionObject; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountRecordService; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandAccountRecordServiceImpl + * @author: HuRui + * @date: 2024/8/14 + **/ +@Service("merchantChainBrandAccountRecordService") +public class BsMerchantChainBrandAccountRecordServiceImpl implements BsMerchantChainBrandAccountRecordService { + @Resource + private BsMerchantChainBrandAccountRecordMapper merchantChainBrandAccountRecordMapper; + @Resource + private UserCenter userCenter; + @Override + public void create(BsMerchantChainBrandAccountRecord data) { + data.setOpUserType(0); + data.setOpUserId(0L); + data.setOpUserName("未知"); + data.setOpUserPhone("未知"); + + try { + SecUserSessionObject secUserSessionObject = userCenter.getSessionModel(SecUserSessionObject.class); + if (secUserSessionObject != null) { + data.setOpUserType(1); + data.setOpUserId(secUserSessionObject.getAccount().getId()); + data.setOpUserName(secUserSessionObject.getAccount().getUserName()); + data.setOpUserPhone(secUserSessionObject.getAccount().getTelephone()); + } + } catch (Exception e) { + System.out.println("获取管理员信息失败"); + } + + try { + UserSessionObject userModel = userCenter.getSessionModel(UserSessionObject.class); + if (userModel != null) { + data.setOpUserType(2); + data.setOpUserId(userModel.getUser().getId()); + data.setOpUserName(userModel.getUser().getUserName()); + data.setOpUserPhone(userModel.getUser().getPhone()); + } + } catch (Exception e) { + System.out.println("获取客户信息失败"); + } + + data.setStatus(1); + data.setCreateTime(new Date()); + merchantChainBrandAccountRecordMapper.insert(data); + } + + @Override + public BsMerchantChainBrandAccountRecord getDetail(Long id) { + return merchantChainBrandAccountRecordMapper.selectByPrimaryKey(id); + } + + @Override + public List getList(Map param) { + BsMerchantChainBrandAccountRecordExample example = new BsMerchantChainBrandAccountRecordExample(); + BsMerchantChainBrandAccountRecordExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "merChainBrandAccountId") != null) { + criteria.andMerChainBrandAccountIdEqualTo(MapUtils.getLong(param, "merChainBrandAccountId")); + } + + if (MapUtils.getLong(param, "merId") != null) { + criteria.andMerIdEqualTo(MapUtils.getLong(param, "merId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "merNo"))) { + criteria.andMerNoEqualTo(MapUtils.getString(param, "merNo")); + } + + example.setOrderByClause("create_time desc"); + return merchantChainBrandAccountRecordMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountServiceImpl.java b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountServiceImpl.java new file mode 100644 index 0000000..9b6b550 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandAccountServiceImpl.java @@ -0,0 +1,202 @@ +package com.hfkj.service.merchant.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.DateUtil; +import com.hfkj.dao.BsMerchantChainBrandAccountMapper; +import com.hfkj.entity.*; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountRecordService; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; +import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantAccountRecordTypeEnum; +import org.apache.commons.collections4.MapUtils; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandAccountServiceImpl + * @author: HuRui + * @date: 2024/8/14 + **/ +@Service("merchantChainBrandAccountService ") +public class BsMerchantChainBrandAccountServiceImpl implements BsMerchantChainBrandAccountService { + @Resource + private BsMerchantChainBrandAccountMapper merchantChainBrandAccountMapper; + @Resource + private BsMerchantChainBrandAccountRecordService merchantChainBrandAccountRecordService; + @Resource + private RedisTemplate redisTemplate; + private final String LOCK_KEY = "MER_CHAIN_BRAND_ACCOUNT_LOCK_"; + @Override + public void editData(BsMerchantChainBrandAccount data) { + data.setUpdateTime(new Date()); + if (data.getId() == null) { + data.setCreateTime(new Date()); + merchantChainBrandAccountMapper.insert(data); + } else { + merchantChainBrandAccountMapper.updateByPrimaryKey(data); + } + } + + @Override + public BsMerchantChainBrandAccount getAccount(Long chainBrandId) { + BsMerchantChainBrandAccountExample example = new BsMerchantChainBrandAccountExample(); + example.createCriteria().andMerChainBrandIdEqualTo(chainBrandId).andStatusNotEqualTo(0); + List list = merchantChainBrandAccountMapper.selectByExample(example); + if (list.isEmpty()) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到账户"); + } + return list.get(0); + } + + @Override + public void recharge(Long chainBrandId, BigDecimal amount) throws Exception { + // 锁编号 + String lockKey = LOCK_KEY+chainBrandId; + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(lockKey, ""); + if (Boolean.TRUE.equals(lock)) { + try { + // 获取锁成功 + // 查询账户 + BsMerchantChainBrandAccount account = getAccount(chainBrandId); + // 变更前金额 + BigDecimal beforeAmount = account.getAmount(); + // 计算金额 + account.setAmount(account.getAmount().add(amount)); + editData(account); + // 变更后金额 + BigDecimal afterAmount = account.getAmount(); + + BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord(); + record.setMerChainBrandAccountId(account.getId()); + record.setType(MerchantAccountRecordTypeEnum.type1.getType()); + record.setTransactionAmount(amount); + record.setBeforeAmount(beforeAmount); + record.setAfterAmount(afterAmount); + record.setSourceType(MerchantAccountRecordSourceTypeEnum.type1.getType()); + try { + record.setSourceOrderNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); + } catch (Exception e) { + e.printStackTrace(); + } + record.setSourceContent("充值金额:" + record.getTransactionAmount()); + merchantChainBrandAccountRecordService.create(record); + // 释放锁 + redisTemplate.delete(lockKey); + + } catch (Exception e) { + e.printStackTrace(); + // 释放锁 + redisTemplate.delete(lockKey); + } + } else { + Thread.sleep(100); + recharge(chainBrandId, amount); + } + } + + @Override + public void consume(Long chainBrandId,String merNo, BigDecimal amount, Map otherParam) throws Exception { + // 锁编号 + String lockKey = LOCK_KEY+chainBrandId; + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(lockKey, ""); + if (Boolean.TRUE.equals(lock)) { + try { + // 获取锁成功 + /* // 余额 是否小于 消费余额 + if (merAccount.getAmount().compareTo(amount) == -1) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "余额不足"); + }*/ + // 查询账户 + BsMerchantChainBrandAccount account = getAccount(chainBrandId); + // 变更前金额 + BigDecimal beforeAmount = account.getAmount(); + // 计算消费后金额 + account.setAmount(account.getAmount().subtract(amount)); + // 累积消费金额 + account.setAmountConsume(account.getAmountConsume().add(amount)); + editData(account); + // 变更后金额 + BigDecimal afterAmount = account.getAmount(); + + BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord(); + record.setMerChainBrandAccountId(account.getId()); + record.setMerNo(merNo); + record.setType(MerchantAccountRecordTypeEnum.type2.getType()); + record.setTransactionAmount(amount); + record.setBeforeAmount(beforeAmount); + record.setAfterAmount(afterAmount); + record.setSourceType(MapUtils.getInteger(otherParam, "sourceType")); + record.setSourceId(MapUtils.getLong(otherParam, "sourceId")); + record.setSourceOrderNo(MapUtils.getString(otherParam, "sourceOrderNo")); + record.setSourceContent(MapUtils.getString(otherParam, "sourceContent")); + merchantChainBrandAccountRecordService.create(record); + // 释放锁 + redisTemplate.delete(lockKey); + + } catch (Exception e) { + e.printStackTrace(); + // 释放锁 + redisTemplate.delete(lockKey); + } + } else { + Thread.sleep(100); + consume(chainBrandId, merNo, amount, otherParam); + } + } + + @Override + public void refund(Long chainBrandId,String merNo, BigDecimal amount, BsOrderRefund orderRefund) throws Exception { + // 锁编号 + String lockKey = LOCK_KEY+chainBrandId; + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(lockKey, ""); + if (Boolean.TRUE.equals(lock)) { + try { + // 获取锁成功 + // 查询账户 + BsMerchantChainBrandAccount account = getAccount(chainBrandId); + // 变更前金额 + BigDecimal beforeAmount = account.getAmount(); + // 计算退款后的金额 + account.setAmount(account.getAmount().add(amount)); + // 累积消费金额 + account.setAmountConsume(account.getAmountConsume().subtract(amount)); + editData(account); + // 变更后金额 + BigDecimal afterAmount = account.getAmount(); + + BsMerchantChainBrandAccountRecord record = new BsMerchantChainBrandAccountRecord(); + record.setMerChainBrandAccountId(account.getId()); + record.setMerNo(merNo); + record.setType(MerchantAccountRecordTypeEnum.type1.getType()); + record.setTransactionAmount(amount); + record.setBeforeAmount(beforeAmount); + record.setAfterAmount(afterAmount); + record.setSourceType(MerchantAccountRecordSourceTypeEnum.type3.getType()); + record.setSourceId(orderRefund.getId()); + record.setSourceOrderNo(orderRefund.getRefundOrderNo()); + merchantChainBrandAccountRecordService.create(record); + // 释放锁 + redisTemplate.delete(lockKey); + + } catch (Exception e) { + e.printStackTrace(); + // 释放锁 + redisTemplate.delete(lockKey); + } + } else { + Thread.sleep(100); + refund(chainBrandId, merNo, amount, orderRefund); + } + } +} diff --git a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandServiceImpl.java b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandServiceImpl.java new file mode 100644 index 0000000..6fcce80 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantChainBrandServiceImpl.java @@ -0,0 +1,95 @@ +package com.hfkj.service.merchant.impl; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.utils.MD5Util; +import com.hfkj.dao.BsMerchantChainBrandMapper; +import com.hfkj.entity.BsMerchantChainBrand; +import com.hfkj.entity.BsMerchantChainBrandAccount; +import com.hfkj.entity.BsMerchantChainBrandAccountExample; +import com.hfkj.entity.SecUser; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; +import com.hfkj.service.merchant.BsMerchantChainBrandService; +import com.hfkj.service.sec.SecUserService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @className: BsMerchantChainBrandServiceImpl + * @author: HuRui + * @date: 2024/8/14 + **/ +@Service("merchantChainBrandService") +public class BsMerchantChainBrandServiceImpl implements BsMerchantChainBrandService { + @Resource + private BsMerchantChainBrandMapper merchantChainBrandMapper; + @Resource + private BsMerchantChainBrandAccountService merchantChainBrandAccountService; + @Resource + private SecUserService secUserService; + @Override + public void editData(BsMerchantChainBrand data) { + data.setUpdateTime(new Date()); + if (data.getId() == null) { + data.setCreateTime(new Date()); + merchantChainBrandMapper.insert(data); + } else { + merchantChainBrandMapper.updateByPrimaryKey(data); + } + } + + @Override + @Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class}) + public void create(BsMerchantChainBrand chainBrand) throws Exception { + editData(chainBrand); + + // 余额账户 + BsMerchantChainBrandAccount account = new BsMerchantChainBrandAccount(); + account.setMerChainBrandId(chainBrand.getId()); + account.setAmount(new BigDecimal("0")); + account.setAmountConsume(new BigDecimal("0")); + account.setStatus(1); + merchantChainBrandAccountService.editData(account); + + if (secUserService.getDetailByLoginName(chainBrand.getContactsTelephone()) != null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号已存在,请更换"); + } + + // 登录账户 + SecUser secUser = new SecUser(); + secUser.setUserName(chainBrand.getName()); + secUser.setLoginName(chainBrand.getContactsTelephone()); + secUser.setPassword(MD5Util.encode("123654".getBytes())); + secUser.setObjectType(SecUserObjectTypeEnum.type6.getCode()); + secUser.setObjectId(chainBrand.getId()); + secUser.setRoleId(7L); + secUser.setStatus(1); + secUser.setCreateTime(new Date()); + secUser.setUpdateTime(new Date()); + secUserService.editUser(secUser); + } + + @Override + public void update(BsMerchantChainBrand chainBrand) { + editData(chainBrand); + } + + @Override + public BsMerchantChainBrand getDetail(Long id) { + return merchantChainBrandMapper.selectByPrimaryKey(id); + } + + @Override + public List> getList(Map param) { + return merchantChainBrandMapper.selectChainBrand(param); + } +} diff --git a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantQrCodeServiceImpl.java b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantQrCodeServiceImpl.java index 921b192..69f4f37 100644 --- a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantQrCodeServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantQrCodeServiceImpl.java @@ -11,8 +11,8 @@ import com.hfkj.entity.BsMerchant; import com.hfkj.entity.BsMerchantQrCode; import com.hfkj.entity.BsMerchantQrCodeExample; import com.hfkj.service.merchant.BsMerchantQrCodeService; -import com.hfkj.sysenum.MerchantQrCodeStatusEnum; -import com.hfkj.sysenum.MerchantQrCodeTypeEnum; +import com.hfkj.sysenum.merchant.MerchantQrCodeStatusEnum; +import com.hfkj.sysenum.merchant.MerchantQrCodeTypeEnum; import org.springframework.stereotype.Service; import javax.annotation.Resource; diff --git a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantServiceImpl.java b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantServiceImpl.java index 090ee0d..55bc3ef 100644 --- a/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/merchant/impl/BsMerchantServiceImpl.java @@ -10,21 +10,19 @@ import com.hfkj.entity.BsMerchant; import com.hfkj.entity.BsMerchantAccount; import com.hfkj.entity.BsMerchantExample; import com.hfkj.entity.SecUser; -import com.hfkj.service.merchant.BsMerchantAccountRecordService; import com.hfkj.service.merchant.BsMerchantAccountService; import com.hfkj.service.merchant.BsMerchantQrCodeService; import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.service.gas.BsGasService; import com.hfkj.service.sec.SecUserService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; -import com.hfkj.sysenum.MerchantStatusEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantStatusEnum; import com.hfkj.sysenum.SecUserObjectTypeEnum; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; -import org.springframework.web.bind.annotation.RequestParam; import javax.annotation.Resource; import java.math.BigDecimal; @@ -182,6 +180,10 @@ public class BsMerchantServiceImpl implements BsMerchantService { criteria.andCityCodeEqualTo(MapUtils.getLong(param, "cityCode")); } + if (MapUtils.getLong(param, "chainBrandId") != null) { + criteria.andChainBrandIdEqualTo(MapUtils.getLong(param, "chainBrandId")); + } + if (MapUtils.getLong(param, "areaCode") != null) { criteria.andAreaCodeEqualTo(MapUtils.getLong(param, "areaCode")); } diff --git a/service/src/main/java/com/hfkj/service/order/BsGasChannelConfigService.java b/service/src/main/java/com/hfkj/service/order/BsGasChannelConfigService.java index 370875d..3ae29b1 100644 --- a/service/src/main/java/com/hfkj/service/order/BsGasChannelConfigService.java +++ b/service/src/main/java/com/hfkj/service/order/BsGasChannelConfigService.java @@ -1,9 +1,7 @@ package com.hfkj.service.order; import com.hfkj.entity.BsGasChannelConfig; -import com.hfkj.sysenum.MerchantSourceTypeEnum; -import com.hfkj.sysenum.order.OrderPayChannelEnum; -import com.hfkj.sysenum.order.OrderPayTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; /** * @className: BsGasChannelConfigService 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 4455934..95ac4f5 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderCreateService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderCreateService.java @@ -15,8 +15,8 @@ import com.hfkj.service.gas.BsGasOrderService; import com.hfkj.service.gas.BsGasService; import com.hfkj.service.gas.BsGasStaffService; import com.hfkj.service.sec.SecDictionaryService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; -import com.hfkj.sysenum.MerchantStatusEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantStatusEnum; import com.hfkj.sysenum.gas.GasOrderReceiptStatusEnum; import com.hfkj.sysenum.gas.OrderOilStatus; import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum; @@ -94,6 +94,8 @@ public class OrderCreateService { gasOrder.setOrderChildNo(orderChild.getChildOrderNo()); gasOrder.setUserId(order.getUserId()); gasOrder.setUserPhone(order.getUserPhone()); + gasOrder.setMerChainBrandId(merchant.getChainBrandId()); + gasOrder.setMerChainBrandName(merchant.getChainBrandName()); gasOrder.setMerId(merchant.getId()); gasOrder.setMerName(merchant.getMerName()); gasOrder.setMerAddress(merchant.getAddress()); 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 a378d32..cb7698a 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java +++ b/service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java @@ -1,22 +1,20 @@ package com.hfkj.service.order; import com.alibaba.fastjson.JSONObject; -import com.hfkj.channel.gas.newlink.NewLinkGasService; import com.hfkj.channel.gas.newlink.NewLinkRequestService; import com.hfkj.channel.gas.shell.CqShellPetroleumRequestService; import com.hfkj.common.exception.BaseException; -import com.hfkj.entity.BsGasOrder; -import com.hfkj.entity.BsMerchantUser; -import com.hfkj.entity.BsOrderChild; -import com.hfkj.entity.SecDictionary; +import com.hfkj.entity.*; import com.hfkj.model.order.OrderModel; import com.hfkj.service.BsDeviceService; -import com.hfkj.service.CommonService; import com.hfkj.service.merchant.BsMerchantAccountService; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; +import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.service.merchant.BsMerchantUserService; import com.hfkj.service.gas.BsGasOrderService; import com.hfkj.service.sec.SecDictionaryService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantChainBrandSettleTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.gas.OrderOilStatus; import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum; import com.hfkj.sysenum.order.OrderChildProductTypeEnum; @@ -46,9 +44,13 @@ public class OrderPaySuccessService { @Resource private BsMerchantUserService merchantUserService; @Resource + private BsMerchantService merchantService; + @Resource private BsDeviceService deviceService; @Resource private BsMerchantAccountService merchantAccountService; + @Resource + private BsMerchantChainBrandAccountService merchantChainBrandAccountService; /** * 订单业务处理 @@ -86,11 +88,39 @@ public class OrderPaySuccessService { if (gasOrder.getChannelType().equals(MerchantSourceTypeEnum.type1.getNumber())) { // 自建站 - Map consumeMap = new HashMap<>(); - consumeMap.put("sourceType", MerchantAccountRecordSourceTypeEnum.type2.getType()); - consumeMap.put("sourceId", gasOrder.getId()); - consumeMap.put("sourceOrderNo", gasOrder.getOrderNo()); - merchantAccountService.consume(gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), consumeMap); + // 查询油站 + BsMerchant merchant = merchantService.getMerchant(gasOrder.getMerNo()); + if (merchant != null) { + // 连锁商户 + if (merchant.getChainBrandId() != null) { + if (merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type1.getNumber())) { + // 连锁额度 + Map consumeMap = new HashMap<>(); + consumeMap.put("sourceType", MerchantAccountRecordSourceTypeEnum.type2.getType()); + consumeMap.put("sourceId", gasOrder.getId()); + consumeMap.put("sourceOrderNo", gasOrder.getOrderNo()); + merchantChainBrandAccountService.consume(merchant.getChainBrandId(), gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), consumeMap); + + } else if (merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type2.getNumber())) { + // 商户额度 + Map consumeMap = new HashMap<>(); + consumeMap.put("sourceType", MerchantAccountRecordSourceTypeEnum.type2.getType()); + consumeMap.put("sourceId", gasOrder.getId()); + consumeMap.put("sourceOrderNo", gasOrder.getOrderNo()); + merchantAccountService.consume(gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), consumeMap); + } + } else { + // 商户额度 + if (merchant.getChainBrandSettleType().equals(MerchantChainBrandSettleTypeEnum.type2.getNumber())) { + // 商户额度 + Map consumeMap = new HashMap<>(); + consumeMap.put("sourceType", MerchantAccountRecordSourceTypeEnum.type2.getType()); + consumeMap.put("sourceId", gasOrder.getId()); + consumeMap.put("sourceOrderNo", gasOrder.getOrderNo()); + merchantAccountService.consume(gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), consumeMap); + } + } + } // 打印小票 if (gasOrder.getChannelType().equals(MerchantSourceTypeEnum.type1.getNumber())) { diff --git a/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java b/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java index 2157628..6459d6f 100644 --- a/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java +++ b/service/src/main/java/com/hfkj/service/order/OrderRefundBusiness.java @@ -8,23 +8,21 @@ import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; import com.hfkj.entity.BsGasOrder; -import com.hfkj.entity.BsMerchantAccount; -import com.hfkj.entity.BsOrderChild; +import com.hfkj.entity.BsMerchant; import com.hfkj.entity.BsOrderRefund; import com.hfkj.model.order.OrderChildModel; import com.hfkj.service.agent.BsAgentMerAccountService; import com.hfkj.service.gas.BsGasOrderService; import com.hfkj.service.merchant.BsMerchantAccountService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.service.merchant.BsMerchantChainBrandAccountService; +import com.hfkj.service.merchant.BsMerchantService; +import com.hfkj.sysenum.merchant.MerchantChainBrandSettleTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.gas.OrderOilStatus; -import com.hfkj.sysenum.merchant.MerchantAccountRecordSourceTypeEnum; import com.hfkj.sysenum.order.OrderChildProductTypeEnum; import org.springframework.stereotype.Component; -import org.springframework.stereotype.Service; import javax.annotation.Resource; -import java.util.HashMap; -import java.util.Map; /** * 退款业务 @@ -39,8 +37,12 @@ public class OrderRefundBusiness { @Resource private BsGasOrderService gasOrderService; @Resource + private BsMerchantService merchantService; + @Resource private BsMerchantAccountService merchantAccountService; @Resource + private BsMerchantChainBrandAccountService merchantChainBrandAccountService; + @Resource private BsAgentMerAccountService agentMerAccountService; /** @@ -105,9 +107,21 @@ public class OrderRefundBusiness { // 订单是否异常 false:无异常 true:有异常 if (gasOrder.getAbnormal().equals(false)) { if (gasOrder.getChannelType().equals(MerchantSourceTypeEnum.type1.getNumber())) { - // 退回商户额度 - merchantAccountService.refund(gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), refund); - + // 连锁品牌 + if (gasOrder.getMerChainBrandId() != null) { + // 查询商户 + BsMerchant merchant = merchantService.getMerchant(gasOrder.getMerNo()); + if (MerchantChainBrandSettleTypeEnum.type1.getNumber().equals(merchant.getChainBrandSettleType())) { + // 退回连锁额度 + merchantChainBrandAccountService.refund(gasOrder.getMerChainBrandId(), merchant.getMerNo(), gasOrder.getGasRefuelPrice(), refund); + } else { + // 退回商户额度 + merchantAccountService.refund(gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), refund); + } + } else { + // 退回商户额度 + merchantAccountService.refund(gasOrder.getMerNo(), gasOrder.getGasRefuelPrice(), refund); + } } else if (gasOrder.getChannelType().equals(MerchantSourceTypeEnum.type2.getNumber())) { // 请求团油渠道退款 JSONObject object = NewLinkRequestService.refuelingOrderRefund(gasOrder.getUserPhone(), gasOrder.getOrderNo(), refund.getRefundRemark()); diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java index 88cc29b..41e4664 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsGasChannelConfigServiceImpl.java @@ -5,7 +5,7 @@ import com.hfkj.dao.BsGasChannelConfigMapper; import com.hfkj.entity.BsGasChannelConfig; import com.hfkj.entity.BsGasChannelConfigExample; import com.hfkj.service.order.BsGasChannelConfigService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import org.springframework.stereotype.Service; import javax.annotation.Resource; diff --git a/service/src/main/java/com/hfkj/service/order/impl/BsOrderSettleServiceImpl.java b/service/src/main/java/com/hfkj/service/order/impl/BsOrderSettleServiceImpl.java index 6b8b44f..b691a42 100644 --- a/service/src/main/java/com/hfkj/service/order/impl/BsOrderSettleServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/order/impl/BsOrderSettleServiceImpl.java @@ -10,7 +10,7 @@ import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.service.order.BsGasChannelConfigService; import com.hfkj.service.order.BsOrderSettleLedgerService; import com.hfkj.service.order.BsOrderSettleService; -import com.hfkj.sysenum.MerchantSourceTypeEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import com.hfkj.sysenum.order.OrderSettleLedgerStatusEnum; import org.apache.commons.collections4.MapUtils; import org.apache.commons.lang3.StringUtils; diff --git a/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java index 1309b96..9089eb0 100644 --- a/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/SecUserObjectTypeEnum.java @@ -27,6 +27,10 @@ public enum SecUserObjectTypeEnum { * 业务员 */ type5(5, "业务员"), + /** + * 商户连锁 + */ + type6(6, "商户连锁"), ; private int code; diff --git a/service/src/main/java/com/hfkj/sysenum/merchant/MerchantChainBrandSettleTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantChainBrandSettleTypeEnum.java new file mode 100644 index 0000000..39f0924 --- /dev/null +++ b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantChainBrandSettleTypeEnum.java @@ -0,0 +1,51 @@ +package com.hfkj.sysenum.merchant; + +import lombok.Getter; + +import java.util.Objects; + +/** + * @className: MerchantChainBrandSettleTypeEnum + * @author: HuRui + * @date: 2024/8/14 + **/ +@Getter +public enum MerchantChainBrandSettleTypeEnum { + /** + * 连锁额度 + */ + type1(1, "连锁额度"), + /** + * 商户额度 + */ + type2(2, "商户额度"), + ; + + private Integer number; + + private String name; + + MerchantChainBrandSettleTypeEnum(int number, String name) { + this.number = number; + this.name = name; + } + + public static MerchantChainBrandSettleTypeEnum getDataByType(Integer type) { + for (MerchantChainBrandSettleTypeEnum ele : values()) { + if (Objects.equals(type,ele.getNumber())) { + return ele; + } + } + return null; + } + + public static String getNameByType(Integer type) { + for (MerchantChainBrandSettleTypeEnum ele : values()) { + if (Objects.equals(type,ele.getNumber())) { + return ele.getName(); + } + } + return null; + } + +} diff --git a/service/src/main/java/com/hfkj/sysenum/MerchantQrCodeStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantQrCodeStatusEnum.java similarity index 96% rename from service/src/main/java/com/hfkj/sysenum/MerchantQrCodeStatusEnum.java rename to service/src/main/java/com/hfkj/sysenum/merchant/MerchantQrCodeStatusEnum.java index 8955c0d..b8e803e 100644 --- a/service/src/main/java/com/hfkj/sysenum/MerchantQrCodeStatusEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantQrCodeStatusEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.merchant; import java.util.Objects; diff --git a/service/src/main/java/com/hfkj/sysenum/MerchantQrCodeTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantQrCodeTypeEnum.java similarity index 96% rename from service/src/main/java/com/hfkj/sysenum/MerchantQrCodeTypeEnum.java rename to service/src/main/java/com/hfkj/sysenum/merchant/MerchantQrCodeTypeEnum.java index 261cd54..af38137 100644 --- a/service/src/main/java/com/hfkj/sysenum/MerchantQrCodeTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantQrCodeTypeEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.merchant; import java.util.Objects; diff --git a/service/src/main/java/com/hfkj/sysenum/MerchantSourceTypeEnum.java b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantSourceTypeEnum.java similarity index 96% rename from service/src/main/java/com/hfkj/sysenum/MerchantSourceTypeEnum.java rename to service/src/main/java/com/hfkj/sysenum/merchant/MerchantSourceTypeEnum.java index 14964d0..927582e 100644 --- a/service/src/main/java/com/hfkj/sysenum/MerchantSourceTypeEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantSourceTypeEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.merchant; import lombok.Getter; diff --git a/service/src/main/java/com/hfkj/sysenum/MerchantStatusEnum.java b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantStatusEnum.java similarity index 96% rename from service/src/main/java/com/hfkj/sysenum/MerchantStatusEnum.java rename to service/src/main/java/com/hfkj/sysenum/merchant/MerchantStatusEnum.java index c31cb0a..66f8ca9 100644 --- a/service/src/main/java/com/hfkj/sysenum/MerchantStatusEnum.java +++ b/service/src/main/java/com/hfkj/sysenum/merchant/MerchantStatusEnum.java @@ -1,4 +1,4 @@ -package com.hfkj.sysenum; +package com.hfkj.sysenum.merchant; import java.util.Objects;