From ac7fb68e3b99d3ff0cf6879e93ac1d78d616aae5 Mon Sep 17 00:00:00 2001 From: hu177768073 <177768073@qq.com> Date: Thu, 13 Mar 2025 15:38:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BsGasChannelPriceWeekController.java | 80 ++ bweb/src/main/resources/hlt/application.yml | 105 ++ bweb/src/main/resources/hlt/config.properties | 1 + bweb/src/main/resources/hlt/logback.xml | 72 ++ .../com/cweb/controller/BsGasController.java | 15 +- cweb/src/main/resources/hlt/application.yml | 105 ++ cweb/src/main/resources/hlt/config.properties | 1 + cweb/src/main/resources/hlt/logback.xml | 72 ++ .../src/main/resources/hlt/application.yml | 105 ++ .../src/main/resources/hlt/config.properties | 1 + openapi/src/main/resources/hlt/logback.xml | 72 ++ .../src/main/resources/hlt/application.yml | 105 ++ .../src/main/resources/hlt/config.properties | 0 schedule/src/main/resources/hlt/logback.xml | 72 ++ .../hfkj/dao/BsGasChannelPriceWeekMapper.java | 133 ++ .../dao/BsGasChannelPriceWeekMapperExt.java | 7 + .../dao/BsGasChannelPriceWeekSqlProvider.java | 360 ++++++ .../com/hfkj/dao/BsGasOrderMapperExt.java | 3 +- .../hfkj/entity/BsGasChannelPriceWeek.java | 262 ++++ .../entity/BsGasChannelPriceWeekExample.java | 1114 +++++++++++++++++ .../gas/BsGasChannelPriceWeekService.java | 44 + .../BsGasChannelPriceWeekServiceImpl.java | 76 ++ .../gas/impl/BsGasOrderServiceImpl.java | 6 +- .../service/gas/impl/BsGasServiceImpl.java | 20 +- .../resources/hlt/commonConfig.properties | 19 + 25 files changed, 2837 insertions(+), 13 deletions(-) create mode 100644 bweb/src/main/java/com/bweb/controller/BsGasChannelPriceWeekController.java create mode 100644 bweb/src/main/resources/hlt/application.yml create mode 100644 bweb/src/main/resources/hlt/config.properties create mode 100644 bweb/src/main/resources/hlt/logback.xml create mode 100644 cweb/src/main/resources/hlt/application.yml create mode 100644 cweb/src/main/resources/hlt/config.properties create mode 100644 cweb/src/main/resources/hlt/logback.xml create mode 100644 openapi/src/main/resources/hlt/application.yml create mode 100644 openapi/src/main/resources/hlt/config.properties create mode 100644 openapi/src/main/resources/hlt/logback.xml create mode 100644 schedule/src/main/resources/hlt/application.yml create mode 100644 schedule/src/main/resources/hlt/config.properties create mode 100644 schedule/src/main/resources/hlt/logback.xml create mode 100644 service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeek.java create mode 100644 service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeekExample.java create mode 100644 service/src/main/java/com/hfkj/service/gas/BsGasChannelPriceWeekService.java create mode 100644 service/src/main/java/com/hfkj/service/gas/impl/BsGasChannelPriceWeekServiceImpl.java create mode 100644 service/src/main/resources/hlt/commonConfig.properties diff --git a/bweb/src/main/java/com/bweb/controller/BsGasChannelPriceWeekController.java b/bweb/src/main/java/com/bweb/controller/BsGasChannelPriceWeekController.java new file mode 100644 index 0000000..4684195 --- /dev/null +++ b/bweb/src/main/java/com/bweb/controller/BsGasChannelPriceWeekController.java @@ -0,0 +1,80 @@ +package com.bweb.controller; + +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.BsGasChannelPriceWeek; +import com.hfkj.entity.BsGasOilPriceWeek; +import com.hfkj.model.ResponseData; +import com.hfkj.service.gas.BsGasChannelPriceWeekService; +import com.hfkj.service.order.BsGasChannelConfigService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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: BsGasChannelPriceWeekController + * @author: HuRui + * @date: 2025/3/11 + **/ +@Controller +@RequestMapping(value = "/gasChannelPriceWeek") +@Api(value = "加油渠道配置") +public class BsGasChannelPriceWeekController { + + private static Logger log = LoggerFactory.getLogger(BsGasChannelConfigController.class); + @Resource + private BsGasChannelPriceWeekService gasChannelPriceWeekService; + + @RequestMapping(value = "/updatePrice", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "修改价格") + public ResponseData updatePrice(@RequestBody BsGasChannelPriceWeek body) { + try { + if (body.getId() == null + || body.getPriceRate() == null + || body.getServiceFeeRate() == null + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + // 查询价格 + BsGasChannelPriceWeek oilPrice = gasChannelPriceWeekService.getDetail(body.getId()); + if (oilPrice == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的数据"); + } + oilPrice.setPriceRate(body.getPriceRate()); + oilPrice.setServiceFeeRate(body.getServiceFeeRate()); + gasChannelPriceWeekService.editData(oilPrice); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getPriceList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询价格列表") + public ResponseData getPriceList(@RequestParam(name = "gasChannelType", required = true) Integer gasChannelType, + @RequestParam(name = "oilNo", required = true) String oilNo) { + try { + + Map param = new HashMap<>(); + param.put("gasChannelType", gasChannelType); + param.put("oilNo", oilNo); + return ResponseMsgUtil.success(gasChannelPriceWeekService.getList(param)); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } +} diff --git a/bweb/src/main/resources/hlt/application.yml b/bweb/src/main/resources/hlt/application.yml new file mode 100644 index 0000000..b6f75c2 --- /dev/null +++ b/bweb/src/main/resources/hlt/application.yml @@ -0,0 +1,105 @@ +server: + port: 9802 + servlet: + context-path: /brest + +#配置是否为debug模式,debug模式下,不开启权限校验 +debug: false + +#datasource数据源设置 +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/hai_oil?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: root + password: HUfukeji123456!@# + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 10 + initialSize: 5 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + redis: + database: 2 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://139.9.154.68:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: 123654 + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic + #配置日期返回至前台为时间戳 + jackson: + serialization: + write-dates-as-timestamps: true + +rocketmq: + name-server: 139.9.154.68:9876 + producer: + access-key: huifukeji + secret-key: HF123456. + #必须指定group + group: default-group + consumer: + access-key: huifukeji + secret-key: HF123456. + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + database: 2 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + +mybatis: + mapperLocations: + - classpath*:sqlmap*/*.xml + type-aliases-package: + org.springboot.sample.entity + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/bweb/src/main/resources/hlt/config.properties b/bweb/src/main/resources/hlt/config.properties new file mode 100644 index 0000000..9ee346e --- /dev/null +++ b/bweb/src/main/resources/hlt/config.properties @@ -0,0 +1 @@ +fileUrl=/home/project/oil/filesystem diff --git a/bweb/src/main/resources/hlt/logback.xml b/bweb/src/main/resources/hlt/logback.xml new file mode 100644 index 0000000..e509de0 --- /dev/null +++ b/bweb/src/main/resources/hlt/logback.xml @@ -0,0 +1,72 @@ + + + + + %d %p (%file:%line\)- %m%n + UTF-8 + + + + log/base.log + + log/base.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/dao.log + + log/dao.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/error.log + + log/error.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + + + + + + diff --git a/cweb/src/main/java/com/cweb/controller/BsGasController.java b/cweb/src/main/java/com/cweb/controller/BsGasController.java index a5487d1..d17f215 100644 --- a/cweb/src/main/java/com/cweb/controller/BsGasController.java +++ b/cweb/src/main/java/com/cweb/controller/BsGasController.java @@ -13,13 +13,11 @@ 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.BsAgentPrice; -import com.hfkj.entity.BsDiscount; -import com.hfkj.entity.BsDiscountUser; -import com.hfkj.entity.BsGasOilPrice; +import com.hfkj.entity.*; import com.hfkj.model.*; import com.hfkj.service.agent.BsAgentPriceService; import com.hfkj.service.discount.BsDiscountUserService; +import com.hfkj.service.gas.BsGasChannelPriceWeekService; import com.hfkj.service.gas.BsGasService; import com.hfkj.sysenum.discount.DiscountTypeEnum; import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; @@ -33,6 +31,7 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; import java.math.BigDecimal; +import java.time.LocalDate; import java.util.*; @Controller @@ -49,6 +48,8 @@ public class BsGasController { @Resource private CqShellPetroleumGasService cqShellPetroleumGasService; @Resource + private BsGasChannelPriceWeekService gasChannelPriceWeekService; + @Resource private BsDiscountUserService discountUserService; @Resource private UserCenter userCenter; @@ -161,10 +162,14 @@ public class BsGasController { discount = agentPrice.getPriceRate(); } } else { - // 查询平台价格 + /* // 查询平台价格 BsAgentPrice agentPrice = agentPriceService.getDetail(AgentPriceTypeEnum.type1, merNo, oilPrice.getOilNo()); if (agentPrice != null) { discount = agentPrice.getPriceRate(); + }*/ + BsGasChannelPriceWeek gasChannelPriceWeek = gasChannelPriceWeekService.getDetail(MerchantSourceTypeEnum.getDataByType(gasDetail.getSourceType()), LocalDate.now().getDayOfWeek().getValue(), oilPrice.getOilNo()); + if (gasChannelPriceWeek != null) { + discount = gasChannelPriceWeek.getPriceRate(); } } oilPrice.setPriceVip(oilPrice.getPriceVip().multiply(discount.divide(new BigDecimal("100"))).setScale(2, BigDecimal.ROUND_HALF_UP)); diff --git a/cweb/src/main/resources/hlt/application.yml b/cweb/src/main/resources/hlt/application.yml new file mode 100644 index 0000000..313e118 --- /dev/null +++ b/cweb/src/main/resources/hlt/application.yml @@ -0,0 +1,105 @@ +server: + port: 9801 + servlet: + context-path: /crest + +#配置是否为debug模式,debug模式下,不开启权限校验 +debug: false + +#datasource数据源设置 +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/hai_oil?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: root + password: HUfukeji123456!@# + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 10 + initialSize: 5 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + redis: + database: 2 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://139.9.154.68:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: 123654 + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic + #配置日期返回至前台为时间戳 + jackson: + serialization: + write-dates-as-timestamps: true + +rocketmq: + name-server: 139.9.154.68:9876 + producer: + access-key: huifukeji + secret-key: HF123456. + #必须指定group + group: default-group + consumer: + access-key: huifukeji + secret-key: HF123456. + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + database: 2 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + +mybatis: + mapperLocations: + - classpath*:sqlmap*/*.xml + type-aliases-package: + org.springboot.sample.entity + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/cweb/src/main/resources/hlt/config.properties b/cweb/src/main/resources/hlt/config.properties new file mode 100644 index 0000000..9ee346e --- /dev/null +++ b/cweb/src/main/resources/hlt/config.properties @@ -0,0 +1 @@ +fileUrl=/home/project/oil/filesystem diff --git a/cweb/src/main/resources/hlt/logback.xml b/cweb/src/main/resources/hlt/logback.xml new file mode 100644 index 0000000..e509de0 --- /dev/null +++ b/cweb/src/main/resources/hlt/logback.xml @@ -0,0 +1,72 @@ + + + + + %d %p (%file:%line\)- %m%n + UTF-8 + + + + log/base.log + + log/base.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/dao.log + + log/dao.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/error.log + + log/error.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + + + + + + diff --git a/openapi/src/main/resources/hlt/application.yml b/openapi/src/main/resources/hlt/application.yml new file mode 100644 index 0000000..89fd96f --- /dev/null +++ b/openapi/src/main/resources/hlt/application.yml @@ -0,0 +1,105 @@ +server: + port: 9805 + servlet: + context-path: /openapi + +#配置是否为debug模式,debug模式下,不开启权限校验 +debug: false + +#datasource数据源设置 +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/hai_oil?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: root + password: HUfukeji123456!@# + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 10 + initialSize: 5 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + redis: + database: 2 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://139.9.154.68:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: 123654 + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic + #配置日期返回至前台为时间戳 + jackson: + serialization: + write-dates-as-timestamps: true + +rocketmq: + name-server: 139.9.154.68:9876 + producer: + access-key: huifukeji + secret-key: HF123456. + #必须指定group + group: default-group + consumer: + access-key: huifukeji + secret-key: HF123456. + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + database: 2 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + +mybatis: + mapperLocations: + - classpath*:sqlmap*/*.xml + type-aliases-package: + org.springboot.sample.entity + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/openapi/src/main/resources/hlt/config.properties b/openapi/src/main/resources/hlt/config.properties new file mode 100644 index 0000000..9ee346e --- /dev/null +++ b/openapi/src/main/resources/hlt/config.properties @@ -0,0 +1 @@ +fileUrl=/home/project/oil/filesystem diff --git a/openapi/src/main/resources/hlt/logback.xml b/openapi/src/main/resources/hlt/logback.xml new file mode 100644 index 0000000..e509de0 --- /dev/null +++ b/openapi/src/main/resources/hlt/logback.xml @@ -0,0 +1,72 @@ + + + + + %d %p (%file:%line\)- %m%n + UTF-8 + + + + log/base.log + + log/base.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/dao.log + + log/dao.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/error.log + + log/error.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + + + + + + diff --git a/schedule/src/main/resources/hlt/application.yml b/schedule/src/main/resources/hlt/application.yml new file mode 100644 index 0000000..0c6d089 --- /dev/null +++ b/schedule/src/main/resources/hlt/application.yml @@ -0,0 +1,105 @@ +server: + port: 9803 + servlet: + context-path: /schedule + +#配置是否为debug模式,debug模式下,不开启权限校验 +debug: false + +#datasource数据源设置 +spring: + datasource: + url: jdbc:mysql://127.0.0.1:3306/hai_oil?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false + username: root + password: HUfukeji123456!@# + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.jdbc.Driver + filters: stat + maxActive: 10 + initialSize: 5 + maxWait: 60000 + minIdle: 5 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + redis: + database: 2 + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + timeout: 1000 + jedis: + pool: + max-active: 20 + max-wait: -1 + max-idle: 10 + min-idle: 0 + #MQTT配置信息 + mqtt: + #MQTT服务地址 + url: ws://139.9.154.68:8083/mqtt + #用户名 + username: printer_provider + #密码 + password: 123654 + #客户端id(不能重复) + # client: + # id: provider-id + #MQTT默认的消息推送主题,实际可在调用接口是指定 + # default: + # topic: topic + #配置日期返回至前台为时间戳 + jackson: + serialization: + write-dates-as-timestamps: true + +rocketmq: + name-server: 139.9.154.68:9876 + producer: + access-key: huifukeji + secret-key: HF123456. + #必须指定group + group: default-group + consumer: + access-key: huifukeji + secret-key: HF123456. + +jetcache: + statIntervalMinutes: 15 + areaInCacheName: false + local: + default: + type: linkedhashmap + keyConvertor: fastjson + remote: + default: + type: redis + host: 127.0.0.1 + port: 36379 + password: HF123456.Redis + database: 2 + keyConvertor: fastjson + broadcastChannel: projectA + valueEncoder: java + valueDecoder: java + poolConfig: + minIdle: 5 + maxIdle: 20 + maxTotal: 50 + +mybatis: + mapperLocations: + - classpath*:sqlmap*/*.xml + type-aliases-package: + org.springboot.sample.entity + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql diff --git a/schedule/src/main/resources/hlt/config.properties b/schedule/src/main/resources/hlt/config.properties new file mode 100644 index 0000000..e69de29 diff --git a/schedule/src/main/resources/hlt/logback.xml b/schedule/src/main/resources/hlt/logback.xml new file mode 100644 index 0000000..e509de0 --- /dev/null +++ b/schedule/src/main/resources/hlt/logback.xml @@ -0,0 +1,72 @@ + + + + + %d %p (%file:%line\)- %m%n + UTF-8 + + + + log/base.log + + log/base.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/dao.log + + log/dao.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + log/error.log + + log/error.log.%d.%i + + + 64 MB + + + + + %d %p (%file:%line\)- %m%n + + UTF-8 + + + + + + + + + + + + + + + diff --git a/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapper.java b/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapper.java new file mode 100644 index 0000000..72e2680 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapper.java @@ -0,0 +1,133 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasChannelPriceWeek; +import com.hfkj.entity.BsGasChannelPriceWeekExample; +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 BsGasChannelPriceWeekMapper extends BsGasChannelPriceWeekMapperExt { + @SelectProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="countByExample") + long countByExample(BsGasChannelPriceWeekExample example); + + @DeleteProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="deleteByExample") + int deleteByExample(BsGasChannelPriceWeekExample example); + + @Delete({ + "delete from bs_gas_channel_price_week", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_gas_channel_price_week (gas_channel_type, weeks, ", + "oil_type, oil_type_name, ", + "oil_no, price_rate, ", + "service_fee_rate, `status`, ", + "create_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{gasChannelType,jdbcType=INTEGER}, #{weeks,jdbcType=INTEGER}, ", + "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{priceRate,jdbcType=DECIMAL}, ", + "#{serviceFeeRate,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(BsGasChannelPriceWeek record); + + @InsertProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsGasChannelPriceWeek record); + + @SelectProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="gas_channel_type", property="gasChannelType", jdbcType=JdbcType.INTEGER), + @Result(column="weeks", property="weeks", jdbcType=JdbcType.INTEGER), + @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), + @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), + @Result(column="price_rate", property="priceRate", jdbcType=JdbcType.DECIMAL), + @Result(column="service_fee_rate", property="serviceFeeRate", 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(BsGasChannelPriceWeekExample example); + + @Select({ + "select", + "id, gas_channel_type, weeks, oil_type, oil_type_name, oil_no, price_rate, service_fee_rate, ", + "`status`, create_time, update_time, ext_1, ext_2, ext_3", + "from bs_gas_channel_price_week", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="gas_channel_type", property="gasChannelType", jdbcType=JdbcType.INTEGER), + @Result(column="weeks", property="weeks", jdbcType=JdbcType.INTEGER), + @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), + @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), + @Result(column="price_rate", property="priceRate", jdbcType=JdbcType.DECIMAL), + @Result(column="service_fee_rate", property="serviceFeeRate", 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) + }) + BsGasChannelPriceWeek selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsGasChannelPriceWeek record, @Param("example") BsGasChannelPriceWeekExample example); + + @UpdateProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsGasChannelPriceWeek record, @Param("example") BsGasChannelPriceWeekExample example); + + @UpdateProvider(type=BsGasChannelPriceWeekSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsGasChannelPriceWeek record); + + @Update({ + "update bs_gas_channel_price_week", + "set gas_channel_type = #{gasChannelType,jdbcType=INTEGER},", + "weeks = #{weeks,jdbcType=INTEGER},", + "oil_type = #{oilType,jdbcType=INTEGER},", + "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", + "price_rate = #{priceRate,jdbcType=DECIMAL},", + "service_fee_rate = #{serviceFeeRate,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(BsGasChannelPriceWeek record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapperExt.java new file mode 100644 index 0000000..0ce5c76 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsGasChannelPriceWeekMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekSqlProvider.java b/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekSqlProvider.java new file mode 100644 index 0000000..257a275 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsGasChannelPriceWeekSqlProvider.java @@ -0,0 +1,360 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsGasChannelPriceWeek; +import com.hfkj.entity.BsGasChannelPriceWeekExample.Criteria; +import com.hfkj.entity.BsGasChannelPriceWeekExample.Criterion; +import com.hfkj.entity.BsGasChannelPriceWeekExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsGasChannelPriceWeekSqlProvider { + + public String countByExample(BsGasChannelPriceWeekExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_gas_channel_price_week"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsGasChannelPriceWeekExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_gas_channel_price_week"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsGasChannelPriceWeek record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_gas_channel_price_week"); + + if (record.getGasChannelType() != null) { + sql.VALUES("gas_channel_type", "#{gasChannelType,jdbcType=INTEGER}"); + } + + if (record.getWeeks() != null) { + sql.VALUES("weeks", "#{weeks,jdbcType=INTEGER}"); + } + + if (record.getOilType() != null) { + sql.VALUES("oil_type", "#{oilType,jdbcType=INTEGER}"); + } + + if (record.getOilTypeName() != null) { + sql.VALUES("oil_type_name", "#{oilTypeName,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); + } + + if (record.getPriceRate() != null) { + sql.VALUES("price_rate", "#{priceRate,jdbcType=DECIMAL}"); + } + + if (record.getServiceFeeRate() != null) { + sql.VALUES("service_fee_rate", "#{serviceFeeRate,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(BsGasChannelPriceWeekExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("gas_channel_type"); + sql.SELECT("weeks"); + sql.SELECT("oil_type"); + sql.SELECT("oil_type_name"); + sql.SELECT("oil_no"); + sql.SELECT("price_rate"); + sql.SELECT("service_fee_rate"); + 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_gas_channel_price_week"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsGasChannelPriceWeek record = (BsGasChannelPriceWeek) parameter.get("record"); + BsGasChannelPriceWeekExample example = (BsGasChannelPriceWeekExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_gas_channel_price_week"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getGasChannelType() != null) { + sql.SET("gas_channel_type = #{record.gasChannelType,jdbcType=INTEGER}"); + } + + if (record.getWeeks() != null) { + sql.SET("weeks = #{record.weeks,jdbcType=INTEGER}"); + } + + if (record.getOilType() != null) { + sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); + } + + if (record.getOilTypeName() != null) { + sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); + } + + if (record.getPriceRate() != null) { + sql.SET("price_rate = #{record.priceRate,jdbcType=DECIMAL}"); + } + + if (record.getServiceFeeRate() != null) { + sql.SET("service_fee_rate = #{record.serviceFeeRate,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_gas_channel_price_week"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("gas_channel_type = #{record.gasChannelType,jdbcType=INTEGER}"); + sql.SET("weeks = #{record.weeks,jdbcType=INTEGER}"); + sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); + sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); + sql.SET("price_rate = #{record.priceRate,jdbcType=DECIMAL}"); + sql.SET("service_fee_rate = #{record.serviceFeeRate,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}"); + + BsGasChannelPriceWeekExample example = (BsGasChannelPriceWeekExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsGasChannelPriceWeek record) { + SQL sql = new SQL(); + sql.UPDATE("bs_gas_channel_price_week"); + + if (record.getGasChannelType() != null) { + sql.SET("gas_channel_type = #{gasChannelType,jdbcType=INTEGER}"); + } + + if (record.getWeeks() != null) { + sql.SET("weeks = #{weeks,jdbcType=INTEGER}"); + } + + if (record.getOilType() != null) { + sql.SET("oil_type = #{oilType,jdbcType=INTEGER}"); + } + + if (record.getOilTypeName() != null) { + sql.SET("oil_type_name = #{oilTypeName,jdbcType=VARCHAR}"); + } + + if (record.getOilNo() != null) { + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); + } + + if (record.getPriceRate() != null) { + sql.SET("price_rate = #{priceRate,jdbcType=DECIMAL}"); + } + + if (record.getServiceFeeRate() != null) { + sql.SET("service_fee_rate = #{serviceFeeRate,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, BsGasChannelPriceWeekExample 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/BsGasOrderMapperExt.java b/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java index 609f4f0..136b515 100644 --- a/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java +++ b/service/src/main/java/com/hfkj/dao/BsGasOrderMapperExt.java @@ -33,7 +33,8 @@ public interface BsGasOrderMapperExt { " and gas_oil_type = #{param.gasOilType} " + " and gas_staff_id = #{param.gasStaffId} " + " and gas_staff_name like concat('%',#{param.gasStaffName},'%') " + - " and agent_id = #{param.agentId} " + + " and agent_id is null " + + " and agent_id = #{param.agentId} " + " and agent_staff_id = #{param.agentStaffId} " + " and status = #{param.status} " + " and abnormal = #{param.abnormal} " + diff --git a/service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeek.java b/service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeek.java new file mode 100644 index 0000000..834f1af --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeek.java @@ -0,0 +1,262 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_gas_channel_price_week + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsGasChannelPriceWeek implements Serializable { + private Long id; + + /** + * 油站渠道 + */ + private Integer gasChannelType; + + /** + * 星期周期 1:星期一 2:星期二 3:星期三 4:星期四 5:星期五 6:星期六 7:星期天 + */ + private Integer weeks; + + /** + * 油品类型 1:汽油:2:柴油;3:天然气 + */ + private Integer oilType; + + /** + * 燃油类型名 1:汽油:2:柴油;3:天然气 + */ + private String oilTypeName; + + /** + * 油号 + */ + private String oilNo; + + /** + * 优惠比例(%) + */ + private BigDecimal priceRate; + + /** + * 服务费(%) + */ + private BigDecimal serviceFeeRate; + + /** + * 状态 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 Integer getGasChannelType() { + return gasChannelType; + } + + public void setGasChannelType(Integer gasChannelType) { + this.gasChannelType = gasChannelType; + } + + public Integer getWeeks() { + return weeks; + } + + public void setWeeks(Integer weeks) { + this.weeks = weeks; + } + + public Integer getOilType() { + return oilType; + } + + public void setOilType(Integer oilType) { + this.oilType = oilType; + } + + public String getOilTypeName() { + return oilTypeName; + } + + public void setOilTypeName(String oilTypeName) { + this.oilTypeName = oilTypeName; + } + + public String getOilNo() { + return oilNo; + } + + public void setOilNo(String oilNo) { + this.oilNo = oilNo; + } + + public BigDecimal getPriceRate() { + return priceRate; + } + + public void setPriceRate(BigDecimal priceRate) { + this.priceRate = priceRate; + } + + public BigDecimal getServiceFeeRate() { + return serviceFeeRate; + } + + public void setServiceFeeRate(BigDecimal serviceFeeRate) { + this.serviceFeeRate = serviceFeeRate; + } + + 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; + } + BsGasChannelPriceWeek other = (BsGasChannelPriceWeek) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getGasChannelType() == null ? other.getGasChannelType() == null : this.getGasChannelType().equals(other.getGasChannelType())) + && (this.getWeeks() == null ? other.getWeeks() == null : this.getWeeks().equals(other.getWeeks())) + && (this.getOilType() == null ? other.getOilType() == null : this.getOilType().equals(other.getOilType())) + && (this.getOilTypeName() == null ? other.getOilTypeName() == null : this.getOilTypeName().equals(other.getOilTypeName())) + && (this.getOilNo() == null ? other.getOilNo() == null : this.getOilNo().equals(other.getOilNo())) + && (this.getPriceRate() == null ? other.getPriceRate() == null : this.getPriceRate().equals(other.getPriceRate())) + && (this.getServiceFeeRate() == null ? other.getServiceFeeRate() == null : this.getServiceFeeRate().equals(other.getServiceFeeRate())) + && (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 + ((getGasChannelType() == null) ? 0 : getGasChannelType().hashCode()); + result = prime * result + ((getWeeks() == null) ? 0 : getWeeks().hashCode()); + result = prime * result + ((getOilType() == null) ? 0 : getOilType().hashCode()); + result = prime * result + ((getOilTypeName() == null) ? 0 : getOilTypeName().hashCode()); + result = prime * result + ((getOilNo() == null) ? 0 : getOilNo().hashCode()); + result = prime * result + ((getPriceRate() == null) ? 0 : getPriceRate().hashCode()); + result = prime * result + ((getServiceFeeRate() == null) ? 0 : getServiceFeeRate().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(", gasChannelType=").append(gasChannelType); + sb.append(", weeks=").append(weeks); + sb.append(", oilType=").append(oilType); + sb.append(", oilTypeName=").append(oilTypeName); + sb.append(", oilNo=").append(oilNo); + sb.append(", priceRate=").append(priceRate); + sb.append(", serviceFeeRate=").append(serviceFeeRate); + 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/BsGasChannelPriceWeekExample.java b/service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeekExample.java new file mode 100644 index 0000000..1ab532b --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsGasChannelPriceWeekExample.java @@ -0,0 +1,1114 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsGasChannelPriceWeekExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsGasChannelPriceWeekExample() { + 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 andGasChannelTypeIsNull() { + addCriterion("gas_channel_type is null"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeIsNotNull() { + addCriterion("gas_channel_type is not null"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeEqualTo(Integer value) { + addCriterion("gas_channel_type =", value, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeNotEqualTo(Integer value) { + addCriterion("gas_channel_type <>", value, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeGreaterThan(Integer value) { + addCriterion("gas_channel_type >", value, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("gas_channel_type >=", value, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeLessThan(Integer value) { + addCriterion("gas_channel_type <", value, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeLessThanOrEqualTo(Integer value) { + addCriterion("gas_channel_type <=", value, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeIn(List values) { + addCriterion("gas_channel_type in", values, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeNotIn(List values) { + addCriterion("gas_channel_type not in", values, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeBetween(Integer value1, Integer value2) { + addCriterion("gas_channel_type between", value1, value2, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andGasChannelTypeNotBetween(Integer value1, Integer value2) { + addCriterion("gas_channel_type not between", value1, value2, "gasChannelType"); + return (Criteria) this; + } + + public Criteria andWeeksIsNull() { + addCriterion("weeks is null"); + return (Criteria) this; + } + + public Criteria andWeeksIsNotNull() { + addCriterion("weeks is not null"); + return (Criteria) this; + } + + public Criteria andWeeksEqualTo(Integer value) { + addCriterion("weeks =", value, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksNotEqualTo(Integer value) { + addCriterion("weeks <>", value, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksGreaterThan(Integer value) { + addCriterion("weeks >", value, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksGreaterThanOrEqualTo(Integer value) { + addCriterion("weeks >=", value, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksLessThan(Integer value) { + addCriterion("weeks <", value, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksLessThanOrEqualTo(Integer value) { + addCriterion("weeks <=", value, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksIn(List values) { + addCriterion("weeks in", values, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksNotIn(List values) { + addCriterion("weeks not in", values, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksBetween(Integer value1, Integer value2) { + addCriterion("weeks between", value1, value2, "weeks"); + return (Criteria) this; + } + + public Criteria andWeeksNotBetween(Integer value1, Integer value2) { + addCriterion("weeks not between", value1, value2, "weeks"); + return (Criteria) this; + } + + public Criteria andOilTypeIsNull() { + addCriterion("oil_type is null"); + return (Criteria) this; + } + + public Criteria andOilTypeIsNotNull() { + addCriterion("oil_type is not null"); + return (Criteria) this; + } + + public Criteria andOilTypeEqualTo(Integer value) { + addCriterion("oil_type =", value, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeNotEqualTo(Integer value) { + addCriterion("oil_type <>", value, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeGreaterThan(Integer value) { + addCriterion("oil_type >", value, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("oil_type >=", value, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeLessThan(Integer value) { + addCriterion("oil_type <", value, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeLessThanOrEqualTo(Integer value) { + addCriterion("oil_type <=", value, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeIn(List values) { + addCriterion("oil_type in", values, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeNotIn(List values) { + addCriterion("oil_type not in", values, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeBetween(Integer value1, Integer value2) { + addCriterion("oil_type between", value1, value2, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeNotBetween(Integer value1, Integer value2) { + addCriterion("oil_type not between", value1, value2, "oilType"); + return (Criteria) this; + } + + public Criteria andOilTypeNameIsNull() { + addCriterion("oil_type_name is null"); + return (Criteria) this; + } + + public Criteria andOilTypeNameIsNotNull() { + addCriterion("oil_type_name is not null"); + return (Criteria) this; + } + + public Criteria andOilTypeNameEqualTo(String value) { + addCriterion("oil_type_name =", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameNotEqualTo(String value) { + addCriterion("oil_type_name <>", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameGreaterThan(String value) { + addCriterion("oil_type_name >", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameGreaterThanOrEqualTo(String value) { + addCriterion("oil_type_name >=", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameLessThan(String value) { + addCriterion("oil_type_name <", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameLessThanOrEqualTo(String value) { + addCriterion("oil_type_name <=", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameLike(String value) { + addCriterion("oil_type_name like", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameNotLike(String value) { + addCriterion("oil_type_name not like", value, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameIn(List values) { + addCriterion("oil_type_name in", values, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameNotIn(List values) { + addCriterion("oil_type_name not in", values, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameBetween(String value1, String value2) { + addCriterion("oil_type_name between", value1, value2, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilTypeNameNotBetween(String value1, String value2) { + addCriterion("oil_type_name not between", value1, value2, "oilTypeName"); + return (Criteria) this; + } + + public Criteria andOilNoIsNull() { + addCriterion("oil_no is null"); + return (Criteria) this; + } + + public Criteria andOilNoIsNotNull() { + addCriterion("oil_no is not null"); + return (Criteria) this; + } + + public Criteria andOilNoEqualTo(String value) { + addCriterion("oil_no =", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotEqualTo(String value) { + addCriterion("oil_no <>", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoGreaterThan(String value) { + addCriterion("oil_no >", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoGreaterThanOrEqualTo(String value) { + addCriterion("oil_no >=", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLessThan(String value) { + addCriterion("oil_no <", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLessThanOrEqualTo(String value) { + addCriterion("oil_no <=", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoLike(String value) { + addCriterion("oil_no like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotLike(String value) { + addCriterion("oil_no not like", value, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoIn(List values) { + addCriterion("oil_no in", values, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotIn(List values) { + addCriterion("oil_no not in", values, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoBetween(String value1, String value2) { + addCriterion("oil_no between", value1, value2, "oilNo"); + return (Criteria) this; + } + + public Criteria andOilNoNotBetween(String value1, String value2) { + addCriterion("oil_no not between", value1, value2, "oilNo"); + return (Criteria) this; + } + + public Criteria andPriceRateIsNull() { + addCriterion("price_rate is null"); + return (Criteria) this; + } + + public Criteria andPriceRateIsNotNull() { + addCriterion("price_rate is not null"); + return (Criteria) this; + } + + public Criteria andPriceRateEqualTo(BigDecimal value) { + addCriterion("price_rate =", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateNotEqualTo(BigDecimal value) { + addCriterion("price_rate <>", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateGreaterThan(BigDecimal value) { + addCriterion("price_rate >", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price_rate >=", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateLessThan(BigDecimal value) { + addCriterion("price_rate <", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateLessThanOrEqualTo(BigDecimal value) { + addCriterion("price_rate <=", value, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateIn(List values) { + addCriterion("price_rate in", values, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateNotIn(List values) { + addCriterion("price_rate not in", values, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_rate between", value1, value2, "priceRate"); + return (Criteria) this; + } + + public Criteria andPriceRateNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_rate not between", value1, value2, "priceRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateIsNull() { + addCriterion("service_fee_rate is null"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateIsNotNull() { + addCriterion("service_fee_rate is not null"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateEqualTo(BigDecimal value) { + addCriterion("service_fee_rate =", value, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateNotEqualTo(BigDecimal value) { + addCriterion("service_fee_rate <>", value, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateGreaterThan(BigDecimal value) { + addCriterion("service_fee_rate >", value, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("service_fee_rate >=", value, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateLessThan(BigDecimal value) { + addCriterion("service_fee_rate <", value, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateLessThanOrEqualTo(BigDecimal value) { + addCriterion("service_fee_rate <=", value, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateIn(List values) { + addCriterion("service_fee_rate in", values, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateNotIn(List values) { + addCriterion("service_fee_rate not in", values, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("service_fee_rate between", value1, value2, "serviceFeeRate"); + return (Criteria) this; + } + + public Criteria andServiceFeeRateNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("service_fee_rate not between", value1, value2, "serviceFeeRate"); + 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/service/gas/BsGasChannelPriceWeekService.java b/service/src/main/java/com/hfkj/service/gas/BsGasChannelPriceWeekService.java new file mode 100644 index 0000000..0e437b3 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/BsGasChannelPriceWeekService.java @@ -0,0 +1,44 @@ +package com.hfkj.service.gas; + +import com.hfkj.entity.BsGasChannelPriceWeek; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; + +import java.util.List; +import java.util.Map; + +/** + * @className: BsGasChannelPriceWeekService + * @author: HuRui + * @date: 2025/3/11 + **/ +public interface BsGasChannelPriceWeekService { + + /** + * 编辑数据 + * @param data + */ + void editData(BsGasChannelPriceWeek data); + + /** + * 查询详情 + * @param sourceType + * @param oilNo + * @return + */ + BsGasChannelPriceWeek getDetail(MerchantSourceTypeEnum sourceType,Integer weeks,String oilNo); + + /** + * 查询详情 + * @param id + * @return + */ + BsGasChannelPriceWeek getDetail(Long id); + + /** + * 查询列表 + * @param param + * @return + */ + List getList(Map param); + +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasChannelPriceWeekServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasChannelPriceWeekServiceImpl.java new file mode 100644 index 0000000..d566b05 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasChannelPriceWeekServiceImpl.java @@ -0,0 +1,76 @@ +package com.hfkj.service.gas.impl; + +import com.hfkj.dao.BsGasChannelPriceWeekMapper; +import com.hfkj.entity.BsGasChannelPriceWeek; +import com.hfkj.entity.BsGasChannelPriceWeekExample; +import com.hfkj.service.gas.BsGasChannelPriceWeekService; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; +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: BsGasChannelPriceWeekServiceImpl + * @author: HuRui + * @date: 2025/3/11 + **/ +@Service("gasChannelPriceWeekService") +public class BsGasChannelPriceWeekServiceImpl implements BsGasChannelPriceWeekService { + @Resource + private BsGasChannelPriceWeekMapper gasChannelPriceWeekMapper; + + @Override + public void editData(BsGasChannelPriceWeek data) { + data.setUpdateTime(new Date()); + if (data.getId() == null) { + data.setCreateTime(new Date()); + gasChannelPriceWeekMapper.insert(data); + } else { + gasChannelPriceWeekMapper.updateByPrimaryKey(data); + } + } + + @Override + public BsGasChannelPriceWeek getDetail(MerchantSourceTypeEnum sourceType,Integer weeks, String oilNo) { + BsGasChannelPriceWeekExample example = new BsGasChannelPriceWeekExample(); + example.createCriteria() + .andGasChannelTypeEqualTo(sourceType.getNumber()) + .andWeeksEqualTo(weeks) + .andOilNoEqualTo(oilNo) + .andStatusNotEqualTo(0); + example.setOrderByClause("update_time desc"); + List list = gasChannelPriceWeekMapper.selectByExample(example); + if (!list.isEmpty()) { + return list.get(0); + } + return null; + } + + @Override + public BsGasChannelPriceWeek getDetail(Long id) { + return gasChannelPriceWeekMapper.selectByPrimaryKey(id); + } + + @Override + public List getList(Map param) { + BsGasChannelPriceWeekExample example = new BsGasChannelPriceWeekExample(); + BsGasChannelPriceWeekExample.Criteria criteria = example.createCriteria() + .andStatusNotEqualTo(0); + + if (MapUtils.getInteger(param, "gasChannelType") != null) { + criteria.andGasChannelTypeEqualTo(MapUtils.getInteger(param, "gasChannelType")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "oilNo"))) { + criteria.andOilNoEqualTo(MapUtils.getString(param, "oilNo")); + } + + example.setOrderByClause("weeks"); + return gasChannelPriceWeekMapper.selectByExample(example); + } +} diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java index d3977b1..f7507d2 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasOrderServiceImpl.java @@ -211,7 +211,11 @@ public class BsGasOrderServiceImpl implements BsGasOrderService { criteria.andGasClassGroupTaskIdEqualTo(MapUtils.getLong(param, "gasClassGroupTaskId")); } - if (MapUtils.getLong(param, "agentId") != null) { + if (MapUtils.getLong(param, "agentId") != null && MapUtils.getLong(param, "agentId") == 0L) { + criteria.andAgentIdIsNull(); + } + + if (MapUtils.getLong(param, "agentId") != null && MapUtils.getLong(param, "agentId") != 0L) { criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId")); } diff --git a/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java b/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java index d369541..d8d3e1a 100644 --- a/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/gas/impl/BsGasServiceImpl.java @@ -5,16 +5,14 @@ import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; import com.hfkj.common.utils.RedisUtil; import com.hfkj.dao.BsMerchantMapper; -import com.hfkj.entity.BsAgentPrice; -import com.hfkj.entity.BsDiscountUser; -import com.hfkj.entity.BsGasOilPrice; -import com.hfkj.entity.BsMerchant; +import com.hfkj.entity.*; import com.hfkj.model.GasListModel; import com.hfkj.model.GasModel; import com.hfkj.model.GasOilPriceModel; import com.hfkj.model.GasPayPriceModel; import com.hfkj.service.agent.BsAgentPriceService; import com.hfkj.service.discount.BsDiscountUserService; +import com.hfkj.service.gas.BsGasChannelPriceWeekService; import com.hfkj.service.gas.BsGasOilGunNoService; import com.hfkj.service.gas.BsGasOilPriceService; import com.hfkj.service.gas.BsGasService; @@ -22,11 +20,13 @@ import com.hfkj.service.merchant.BsMerchantService; import com.hfkj.sysenum.agent.AgentPriceTypeEnum; import com.hfkj.sysenum.discount.DiscountTypeEnum; import com.hfkj.sysenum.gas.GasOilPriceStatusEnum; +import com.hfkj.sysenum.merchant.MerchantSourceTypeEnum; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; import java.math.BigDecimal; +import java.time.LocalDate; import java.util.ArrayList; import java.util.List; @@ -50,6 +50,8 @@ public class BsGasServiceImpl implements BsGasService { @Resource private BsDiscountUserService discountUserService; @Resource + private BsGasChannelPriceWeekService gasChannelPriceWeekService; + @Resource private RedisUtil redisUtil; private final static String CACHE_GAS_KEY = "GAS:"; @@ -86,12 +88,18 @@ public class BsGasServiceImpl implements BsGasService { serviceFeeRate = agentPrice.getServiceFeeRate(); } } else { - // 查询平台价格 + // 查询渠道优惠 + BsGasChannelPriceWeek gasChannelPriceWeek = gasChannelPriceWeekService.getDetail(MerchantSourceTypeEnum.getDataByType(merchant.getSourceType()), LocalDate.now().getDayOfWeek().getValue(), oilNo); + if (gasChannelPriceWeek != null) { + discount = gasChannelPriceWeek.getPriceRate(); + serviceFeeRate = gasChannelPriceWeek.getServiceFeeRate(); + } + /* // 查询平台价格 BsAgentPrice agentPrice = agentPriceService.getDetail(AgentPriceTypeEnum.type1, merNo, oilNo); if (agentPrice != null) { discount = agentPrice.getPriceRate(); serviceFeeRate = agentPrice.getServiceFeeRate(); - } + }*/ } if (userDiscountId != null) { diff --git a/service/src/main/resources/hlt/commonConfig.properties b/service/src/main/resources/hlt/commonConfig.properties new file mode 100644 index 0000000..b51ae7a --- /dev/null +++ b/service/src/main/resources/hlt/commonConfig.properties @@ -0,0 +1,19 @@ +filesystem=/home/project/oil/filesystem +huiPayPreorderNotifyUrl=https://oil.dctpay.com/crest/notify/huipay +domainName=https://oil.dctpay.com + +wxMaAppId=wx8d49e2f83025229d +wxMaAppSecret=d8d6dcaef77d3b659258a01b5ddba5df + +newLinkReqUrl=https://hcs.czb365.com +newLinkAppKey= +newLinkAppSecret= + +cqShellReqUrl=http://api.shenmapay.com/gateway.html +cqShellPartnerId= +cqShellPlatMerchantId= +cqShellPlatMerchantKey= + +phgReqUrl=https://phg.dctpay.com +phgAppid=20241266600 +phgAppSecret=BCB83776BDA7F609FBE99BBB8AC33840