From 3c5b3f545ffa6c5eeedb230499c7aa68797f992a Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 4 Nov 2022 10:15:00 +0800 Subject: [PATCH 1/7] =?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 --- .../controller/business/OrderIntegralRechargeController.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java b/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java index e3cfaa01..4a95adf5 100644 --- a/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java +++ b/hai-order/src/main/java/com/web/controller/business/OrderIntegralRechargeController.java @@ -58,6 +58,7 @@ public class OrderIntegralRechargeController { public ResponseData getOrderList(@RequestParam(name = "memPhone", required = false) String memPhone, @RequestParam(name = "orderNo", required = false) String orderNo, @RequestParam(name = "status", required = false) Long status, + @RequestParam(name = "payType", required = false) Long payType, @RequestParam(name = "createTimeS", required = false) Long createTimeS, @RequestParam(name = "createTimeE", required = false) Long createTimeE, @RequestParam(name = "payTimeS", required = false) Long payTimeS, @@ -69,7 +70,8 @@ public class OrderIntegralRechargeController { Map param = new HashMap<>(); param.put("orderNo", orderNo); param.put("memPhone", memPhone); - param.put("status", status); + param.put("orderStatus", status); + param.put("payType", payType); param.put("createTimeS", createTimeS); param.put("createTimeE", createTimeE); param.put("payTimeS", payTimeS); From 91d3f254aad1c3e4ae208036008dfbcb991e1b52 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Fri, 4 Nov 2022 17:49:41 +0800 Subject: [PATCH 2/7] =?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 --- .../cweb/controller/HighUserDiscountController.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java index 64faa497..a226f837 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighUserDiscountController.java @@ -305,20 +305,19 @@ public class HighUserDiscountController { if (goodsType.getType().equals(OrderChildGoodsTypeEnum.type3.getType())) { // 过滤出加油服务的加油券 - List collect = userDiscountList.stream().filter(o -> o.getHighDiscount().getUseScope().equals(DiscountUseScope.type7.getType())).collect(Collectors.toList()); + List collect = userDiscountList.stream() + .filter(o -> o.getDiscountUseScope().equals(DiscountUseScope.type7.getType()) || o.getDiscountUseScope().equals(DiscountUseScope.type1.getType())) + .collect(Collectors.toList()); for (HighDiscountUserRel userDiscount : collect) { // 满减 - if (userDiscount.getHighDiscount().getDiscountType().equals(1)) { - if (body.getBigDecimal("goodsPrice").compareTo(userDiscount.getHighDiscount().getDiscountCondition()) >= 0) { + if (userDiscount.getDiscountType().equals(1)) { + if (body.getBigDecimal("goodsPrice").compareTo(userDiscount.getDiscountCondition()) >= 0) { list.add(userDiscount); } } - - if (userDiscount.getHighDiscount().getDiscountType().equals(2) - || userDiscount.getHighDiscount().getDiscountType().equals(3)) { + if (userDiscount.getDiscountType().equals(2) || userDiscount.getDiscountType().equals(3)) { list.add(userDiscount); } - } } list.sort(Comparator.comparing(o -> o.getUseEndTime())); From 940ac2fa6c7f7c90cd67a3fcee4cb5a4385c1bc1 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Thu, 1 Dec 2022 14:34:39 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E6=8F=90=E4=BA=A4diam?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../config/HuiLianTongUnionCardConfig.java | 4 +- .../java/com/hai/dao/BsTradeOrderMapper.java | 279 ++ .../com/hai/dao/BsTradeOrderMapperExt.java | 7 + .../com/hai/dao/BsTradeOrderSqlProvider.java | 850 +++++ .../java/com/hai/dao/HighDiscountMapper.java | 32 +- .../com/hai/dao/HighDiscountSqlProvider.java | 70 + .../java/com/hai/entity/BsTradeOrder.java | 829 ++++ .../com/hai/entity/BsTradeOrderExample.java | 3374 +++++++++++++++++ .../java/com/hai/entity/HighDiscount.java | 80 + .../com/hai/entity/HighDiscountExample.java | 330 ++ .../main/java/com/web/config/AuthConfig.java | 1 + .../web/controller/DiscountController.java | 121 + .../com/web/controller/WechatController.java | 38 + 13 files changed, 6007 insertions(+), 8 deletions(-) create mode 100644 hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/BsTradeOrder.java create mode 100644 hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java create mode 100644 hai-user/src/main/java/com/web/controller/WechatController.java diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java index bd2c6f1b..1fc6f523 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java @@ -306,8 +306,8 @@ public class HuiLianTongUnionCardConfig { } public static void main(String[] args) { - - String data = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDwYfnUdBVz6Kj4HS2oCA1TTiqJkCUIYa4G\\nnKXcKOzlf7gwVpP6h5gK1tT3xUQd1iW9VOjF0iOn9bVuWzUqlPb+6YhgCjwVIWvutzGr07fQX1jV\\n4jlRdiZVaq3frwd8SuG5KRlWTHXXTnshDIoO4DyR5P7HfF3W3m4=".replace("\\n", ""); + // {"respMessage":"ok","data":"Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu","sign":"47186141FD8B3FB6CCB590F58321D9C6","respCode":"0000","responseId":"1669202185936"} + String data = "Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu".replace("\\n", ""); String decodeData = DesUtil.decode("F8E91A3C", data, Charset.forName("UTF-8")); System.out.println(JSONObject.parseObject(decodeData)); diff --git a/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java new file mode 100644 index 00000000..204832c8 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapper.java @@ -0,0 +1,279 @@ +package com.hai.dao; + +import com.hai.entity.BsTradeOrder; +import com.hai.entity.BsTradeOrderExample; +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 BsTradeOrderMapper extends BsTradeOrderMapperExt { + @SelectProvider(type=BsTradeOrderSqlProvider.class, method="countByExample") + long countByExample(BsTradeOrderExample example); + + @DeleteProvider(type=BsTradeOrderSqlProvider.class, method="deleteByExample") + int deleteByExample(BsTradeOrderExample example); + + @Delete({ + "delete from bs_trade_order", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into bs_trade_order (company_id, agent_id, ", + "salesman_id, salesman_name, ", + "mer_id, mer_name, mer_no, ", + "store_id, store_name, ", + "device_id, device_sn, ", + "qr_code_id, qr_code_sn, ", + "platform_type, platform_mer_no, ", + "platform_trade_no, platform_log_no, ", + "pay_user_id, pay_mode, ", + "out_trade_no, trade_amount, ", + "store_discount_satisfy, store_discount_id, ", + "store_discount_name, store_discount_type, ", + "store_discount_price, store_discount_actual_price, ", + "user_id, user_phone, ", + "user_discount_id, user_discount_name, ", + "user_discount_type, user_discount_price, ", + "user_discount_actual_price, trade_actual_amount, ", + "acc_trade_no, acc_mdiscount_amount, ", + "acc_discount_amount, acc_payment_code, ", + "card_type, `status`, ", + "pay_time, create_time, ", + "cancel_time, update_time, ", + "ext_1, ext_2, ext_3)", + "values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ", + "#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merNo,jdbcType=VARCHAR}, ", + "#{storeId,jdbcType=BIGINT}, #{storeName,jdbcType=VARCHAR}, ", + "#{deviceId,jdbcType=BIGINT}, #{deviceSn,jdbcType=VARCHAR}, ", + "#{qrCodeId,jdbcType=BIGINT}, #{qrCodeSn,jdbcType=VARCHAR}, ", + "#{platformType,jdbcType=INTEGER}, #{platformMerNo,jdbcType=VARCHAR}, ", + "#{platformTradeNo,jdbcType=VARCHAR}, #{platformLogNo,jdbcType=VARCHAR}, ", + "#{payUserId,jdbcType=VARCHAR}, #{payMode,jdbcType=VARCHAR}, ", + "#{outTradeNo,jdbcType=VARCHAR}, #{tradeAmount,jdbcType=DECIMAL}, ", + "#{storeDiscountSatisfy,jdbcType=INTEGER}, #{storeDiscountId,jdbcType=BIGINT}, ", + "#{storeDiscountName,jdbcType=VARCHAR}, #{storeDiscountType,jdbcType=INTEGER}, ", + "#{storeDiscountPrice,jdbcType=DECIMAL}, #{storeDiscountActualPrice,jdbcType=DECIMAL}, ", + "#{userId,jdbcType=INTEGER}, #{userPhone,jdbcType=VARCHAR}, ", + "#{userDiscountId,jdbcType=BIGINT}, #{userDiscountName,jdbcType=VARCHAR}, ", + "#{userDiscountType,jdbcType=INTEGER}, #{userDiscountPrice,jdbcType=DECIMAL}, ", + "#{userDiscountActualPrice,jdbcType=DECIMAL}, #{tradeActualAmount,jdbcType=DECIMAL}, ", + "#{accTradeNo,jdbcType=VARCHAR}, #{accMdiscountAmount,jdbcType=DECIMAL}, ", + "#{accDiscountAmount,jdbcType=DECIMAL}, #{accPaymentCode,jdbcType=VARCHAR}, ", + "#{cardType,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{payTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{cancelTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(BsTradeOrder record); + + @InsertProvider(type=BsTradeOrderSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(BsTradeOrder record); + + @SelectProvider(type=BsTradeOrderSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), + @Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), + @Result(column="qr_code_id", property="qrCodeId", jdbcType=JdbcType.BIGINT), + @Result(column="qr_code_sn", property="qrCodeSn", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), + @Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR), + @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_satisfy", property="storeDiscountSatisfy", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_id", property="storeDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="store_discount_name", property="storeDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_discount_type", property="storeDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="user_discount_name", property="userDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_type", property="userDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR), + @Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), + @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(BsTradeOrderExample example); + + @Select({ + "select", + "id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_no, ", + "store_id, store_name, device_id, device_sn, qr_code_id, qr_code_sn, platform_type, ", + "platform_mer_no, platform_trade_no, platform_log_no, pay_user_id, pay_mode, ", + "out_trade_no, trade_amount, store_discount_satisfy, store_discount_id, store_discount_name, ", + "store_discount_type, store_discount_price, store_discount_actual_price, user_id, ", + "user_phone, user_discount_id, user_discount_name, user_discount_type, user_discount_price, ", + "user_discount_actual_price, trade_actual_amount, acc_trade_no, acc_mdiscount_amount, ", + "acc_discount_amount, acc_payment_code, card_type, `status`, pay_time, create_time, ", + "cancel_time, update_time, ext_1, ext_2, ext_3", + "from bs_trade_order", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_id", property="salesmanId", jdbcType=JdbcType.BIGINT), + @Result(column="salesman_name", property="salesmanName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_no", property="merNo", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), + @Result(column="device_id", property="deviceId", jdbcType=JdbcType.BIGINT), + @Result(column="device_sn", property="deviceSn", jdbcType=JdbcType.VARCHAR), + @Result(column="qr_code_id", property="qrCodeId", jdbcType=JdbcType.BIGINT), + @Result(column="qr_code_sn", property="qrCodeSn", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_type", property="platformType", jdbcType=JdbcType.INTEGER), + @Result(column="platform_mer_no", property="platformMerNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_trade_no", property="platformTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="platform_log_no", property="platformLogNo", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_user_id", property="payUserId", jdbcType=JdbcType.VARCHAR), + @Result(column="pay_mode", property="payMode", jdbcType=JdbcType.VARCHAR), + @Result(column="out_trade_no", property="outTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="trade_amount", property="tradeAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_satisfy", property="storeDiscountSatisfy", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_id", property="storeDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="store_discount_name", property="storeDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_discount_type", property="storeDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="store_discount_price", property="storeDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="store_discount_actual_price", property="storeDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_id", property="userDiscountId", jdbcType=JdbcType.BIGINT), + @Result(column="user_discount_name", property="userDiscountName", jdbcType=JdbcType.VARCHAR), + @Result(column="user_discount_type", property="userDiscountType", jdbcType=JdbcType.INTEGER), + @Result(column="user_discount_price", property="userDiscountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="user_discount_actual_price", property="userDiscountActualPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="trade_actual_amount", property="tradeActualAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_trade_no", property="accTradeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="acc_mdiscount_amount", property="accMdiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_discount_amount", property="accDiscountAmount", jdbcType=JdbcType.DECIMAL), + @Result(column="acc_payment_code", property="accPaymentCode", jdbcType=JdbcType.VARCHAR), + @Result(column="card_type", property="cardType", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP), + @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) + }) + BsTradeOrder selectByPrimaryKey(Long id); + + @UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsTradeOrder record, @Param("example") BsTradeOrderExample example); + + @UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsTradeOrder record, @Param("example") BsTradeOrderExample example); + + @UpdateProvider(type=BsTradeOrderSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsTradeOrder record); + + @Update({ + "update bs_trade_order", + "set company_id = #{companyId,jdbcType=BIGINT},", + "agent_id = #{agentId,jdbcType=BIGINT},", + "salesman_id = #{salesmanId,jdbcType=BIGINT},", + "salesman_name = #{salesmanName,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "mer_no = #{merNo,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", + "device_id = #{deviceId,jdbcType=BIGINT},", + "device_sn = #{deviceSn,jdbcType=VARCHAR},", + "qr_code_id = #{qrCodeId,jdbcType=BIGINT},", + "qr_code_sn = #{qrCodeSn,jdbcType=VARCHAR},", + "platform_type = #{platformType,jdbcType=INTEGER},", + "platform_mer_no = #{platformMerNo,jdbcType=VARCHAR},", + "platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR},", + "platform_log_no = #{platformLogNo,jdbcType=VARCHAR},", + "pay_user_id = #{payUserId,jdbcType=VARCHAR},", + "pay_mode = #{payMode,jdbcType=VARCHAR},", + "out_trade_no = #{outTradeNo,jdbcType=VARCHAR},", + "trade_amount = #{tradeAmount,jdbcType=DECIMAL},", + "store_discount_satisfy = #{storeDiscountSatisfy,jdbcType=INTEGER},", + "store_discount_id = #{storeDiscountId,jdbcType=BIGINT},", + "store_discount_name = #{storeDiscountName,jdbcType=VARCHAR},", + "store_discount_type = #{storeDiscountType,jdbcType=INTEGER},", + "store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL},", + "store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL},", + "user_id = #{userId,jdbcType=INTEGER},", + "user_phone = #{userPhone,jdbcType=VARCHAR},", + "user_discount_id = #{userDiscountId,jdbcType=BIGINT},", + "user_discount_name = #{userDiscountName,jdbcType=VARCHAR},", + "user_discount_type = #{userDiscountType,jdbcType=INTEGER},", + "user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL},", + "user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL},", + "trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL},", + "acc_trade_no = #{accTradeNo,jdbcType=VARCHAR},", + "acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL},", + "acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL},", + "acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR},", + "card_type = #{cardType,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "pay_time = #{payTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "cancel_time = #{cancelTime,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(BsTradeOrder record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java new file mode 100644 index 00000000..cc0d457d --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsTradeOrderMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface BsTradeOrderMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java b/hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java new file mode 100644 index 00000000..6dad1100 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/BsTradeOrderSqlProvider.java @@ -0,0 +1,850 @@ +package com.hai.dao; + +import com.hai.entity.BsTradeOrder; +import com.hai.entity.BsTradeOrderExample.Criteria; +import com.hai.entity.BsTradeOrderExample.Criterion; +import com.hai.entity.BsTradeOrderExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsTradeOrderSqlProvider { + + public String countByExample(BsTradeOrderExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_trade_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsTradeOrderExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_trade_order"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsTradeOrder record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_trade_order"); + + if (record.getCompanyId() != null) { + sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanId() != null) { + sql.VALUES("salesman_id", "#{salesmanId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanName() != null) { + sql.VALUES("salesman_name", "#{salesmanName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.VALUES("mer_no", "#{merNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + + if (record.getDeviceId() != null) { + sql.VALUES("device_id", "#{deviceId,jdbcType=BIGINT}"); + } + + if (record.getDeviceSn() != null) { + sql.VALUES("device_sn", "#{deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeId() != null) { + sql.VALUES("qr_code_id", "#{qrCodeId,jdbcType=BIGINT}"); + } + + if (record.getQrCodeSn() != null) { + sql.VALUES("qr_code_sn", "#{qrCodeSn,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.VALUES("platform_type", "#{platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformMerNo() != null) { + sql.VALUES("platform_mer_no", "#{platformMerNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformTradeNo() != null) { + sql.VALUES("platform_trade_no", "#{platformTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformLogNo() != null) { + sql.VALUES("platform_log_no", "#{platformLogNo,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.VALUES("pay_user_id", "#{payUserId,jdbcType=VARCHAR}"); + } + + if (record.getPayMode() != null) { + sql.VALUES("pay_mode", "#{payMode,jdbcType=VARCHAR}"); + } + + if (record.getOutTradeNo() != null) { + sql.VALUES("out_trade_no", "#{outTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getTradeAmount() != null) { + sql.VALUES("trade_amount", "#{tradeAmount,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountSatisfy() != null) { + sql.VALUES("store_discount_satisfy", "#{storeDiscountSatisfy,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountId() != null) { + sql.VALUES("store_discount_id", "#{storeDiscountId,jdbcType=BIGINT}"); + } + + if (record.getStoreDiscountName() != null) { + sql.VALUES("store_discount_name", "#{storeDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getStoreDiscountType() != null) { + sql.VALUES("store_discount_type", "#{storeDiscountType,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountPrice() != null) { + sql.VALUES("store_discount_price", "#{storeDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountActualPrice() != null) { + sql.VALUES("store_discount_actual_price", "#{storeDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountId() != null) { + sql.VALUES("user_discount_id", "#{userDiscountId,jdbcType=BIGINT}"); + } + + if (record.getUserDiscountName() != null) { + sql.VALUES("user_discount_name", "#{userDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountType() != null) { + sql.VALUES("user_discount_type", "#{userDiscountType,jdbcType=INTEGER}"); + } + + if (record.getUserDiscountPrice() != null) { + sql.VALUES("user_discount_price", "#{userDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserDiscountActualPrice() != null) { + sql.VALUES("user_discount_actual_price", "#{userDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getTradeActualAmount() != null) { + sql.VALUES("trade_actual_amount", "#{tradeActualAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccTradeNo() != null) { + sql.VALUES("acc_trade_no", "#{accTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getAccMdiscountAmount() != null) { + sql.VALUES("acc_mdiscount_amount", "#{accMdiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccDiscountAmount() != null) { + sql.VALUES("acc_discount_amount", "#{accDiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccPaymentCode() != null) { + sql.VALUES("acc_payment_code", "#{accPaymentCode,jdbcType=VARCHAR}"); + } + + if (record.getCardType() != null) { + sql.VALUES("card_type", "#{cardType,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.VALUES("pay_time", "#{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.VALUES("cancel_time", "#{cancelTime,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(BsTradeOrderExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("company_id"); + sql.SELECT("agent_id"); + sql.SELECT("salesman_id"); + sql.SELECT("salesman_name"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("mer_no"); + sql.SELECT("store_id"); + sql.SELECT("store_name"); + sql.SELECT("device_id"); + sql.SELECT("device_sn"); + sql.SELECT("qr_code_id"); + sql.SELECT("qr_code_sn"); + sql.SELECT("platform_type"); + sql.SELECT("platform_mer_no"); + sql.SELECT("platform_trade_no"); + sql.SELECT("platform_log_no"); + sql.SELECT("pay_user_id"); + sql.SELECT("pay_mode"); + sql.SELECT("out_trade_no"); + sql.SELECT("trade_amount"); + sql.SELECT("store_discount_satisfy"); + sql.SELECT("store_discount_id"); + sql.SELECT("store_discount_name"); + sql.SELECT("store_discount_type"); + sql.SELECT("store_discount_price"); + sql.SELECT("store_discount_actual_price"); + sql.SELECT("user_id"); + sql.SELECT("user_phone"); + sql.SELECT("user_discount_id"); + sql.SELECT("user_discount_name"); + sql.SELECT("user_discount_type"); + sql.SELECT("user_discount_price"); + sql.SELECT("user_discount_actual_price"); + sql.SELECT("trade_actual_amount"); + sql.SELECT("acc_trade_no"); + sql.SELECT("acc_mdiscount_amount"); + sql.SELECT("acc_discount_amount"); + sql.SELECT("acc_payment_code"); + sql.SELECT("card_type"); + sql.SELECT("`status`"); + sql.SELECT("pay_time"); + sql.SELECT("create_time"); + sql.SELECT("cancel_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("bs_trade_order"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsTradeOrder record = (BsTradeOrder) parameter.get("record"); + BsTradeOrderExample example = (BsTradeOrderExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_trade_order"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanId() != null) { + sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanName() != null) { + sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + + if (record.getDeviceId() != null) { + sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); + } + + if (record.getDeviceSn() != null) { + sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeId() != null) { + sql.SET("qr_code_id = #{record.qrCodeId,jdbcType=BIGINT}"); + } + + if (record.getQrCodeSn() != null) { + sql.SET("qr_code_sn = #{record.qrCodeSn,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformMerNo() != null) { + sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformTradeNo() != null) { + sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformLogNo() != null) { + sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}"); + } + + if (record.getPayMode() != null) { + sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}"); + } + + if (record.getOutTradeNo() != null) { + sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getTradeAmount() != null) { + sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountSatisfy() != null) { + sql.SET("store_discount_satisfy = #{record.storeDiscountSatisfy,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountId() != null) { + sql.SET("store_discount_id = #{record.storeDiscountId,jdbcType=BIGINT}"); + } + + if (record.getStoreDiscountName() != null) { + sql.SET("store_discount_name = #{record.storeDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getStoreDiscountType() != null) { + sql.SET("store_discount_type = #{record.storeDiscountType,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountPrice() != null) { + sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountActualPrice() != null) { + sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountId() != null) { + sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}"); + } + + if (record.getUserDiscountName() != null) { + sql.SET("user_discount_name = #{record.userDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountType() != null) { + sql.SET("user_discount_type = #{record.userDiscountType,jdbcType=INTEGER}"); + } + + if (record.getUserDiscountPrice() != null) { + sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserDiscountActualPrice() != null) { + sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getTradeActualAmount() != null) { + sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccTradeNo() != null) { + sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getAccMdiscountAmount() != null) { + sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccDiscountAmount() != null) { + sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccPaymentCode() != null) { + sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}"); + } + + if (record.getCardType() != null) { + sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.SET("cancel_time = #{record.cancelTime,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_trade_order"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}"); + sql.SET("salesman_id = #{record.salesmanId,jdbcType=BIGINT}"); + sql.SET("salesman_name = #{record.salesmanName,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("mer_no = #{record.merNo,jdbcType=VARCHAR}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + sql.SET("device_id = #{record.deviceId,jdbcType=BIGINT}"); + sql.SET("device_sn = #{record.deviceSn,jdbcType=VARCHAR}"); + sql.SET("qr_code_id = #{record.qrCodeId,jdbcType=BIGINT}"); + sql.SET("qr_code_sn = #{record.qrCodeSn,jdbcType=VARCHAR}"); + sql.SET("platform_type = #{record.platformType,jdbcType=INTEGER}"); + sql.SET("platform_mer_no = #{record.platformMerNo,jdbcType=VARCHAR}"); + sql.SET("platform_trade_no = #{record.platformTradeNo,jdbcType=VARCHAR}"); + sql.SET("platform_log_no = #{record.platformLogNo,jdbcType=VARCHAR}"); + sql.SET("pay_user_id = #{record.payUserId,jdbcType=VARCHAR}"); + sql.SET("pay_mode = #{record.payMode,jdbcType=VARCHAR}"); + sql.SET("out_trade_no = #{record.outTradeNo,jdbcType=VARCHAR}"); + sql.SET("trade_amount = #{record.tradeAmount,jdbcType=DECIMAL}"); + sql.SET("store_discount_satisfy = #{record.storeDiscountSatisfy,jdbcType=INTEGER}"); + sql.SET("store_discount_id = #{record.storeDiscountId,jdbcType=BIGINT}"); + sql.SET("store_discount_name = #{record.storeDiscountName,jdbcType=VARCHAR}"); + sql.SET("store_discount_type = #{record.storeDiscountType,jdbcType=INTEGER}"); + sql.SET("store_discount_price = #{record.storeDiscountPrice,jdbcType=DECIMAL}"); + sql.SET("store_discount_actual_price = #{record.storeDiscountActualPrice,jdbcType=DECIMAL}"); + sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + sql.SET("user_discount_id = #{record.userDiscountId,jdbcType=BIGINT}"); + sql.SET("user_discount_name = #{record.userDiscountName,jdbcType=VARCHAR}"); + sql.SET("user_discount_type = #{record.userDiscountType,jdbcType=INTEGER}"); + sql.SET("user_discount_price = #{record.userDiscountPrice,jdbcType=DECIMAL}"); + sql.SET("user_discount_actual_price = #{record.userDiscountActualPrice,jdbcType=DECIMAL}"); + sql.SET("trade_actual_amount = #{record.tradeActualAmount,jdbcType=DECIMAL}"); + sql.SET("acc_trade_no = #{record.accTradeNo,jdbcType=VARCHAR}"); + sql.SET("acc_mdiscount_amount = #{record.accMdiscountAmount,jdbcType=DECIMAL}"); + sql.SET("acc_discount_amount = #{record.accDiscountAmount,jdbcType=DECIMAL}"); + sql.SET("acc_payment_code = #{record.accPaymentCode,jdbcType=VARCHAR}"); + sql.SET("card_type = #{record.cardType,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("cancel_time = #{record.cancelTime,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}"); + + BsTradeOrderExample example = (BsTradeOrderExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsTradeOrder record) { + SQL sql = new SQL(); + sql.UPDATE("bs_trade_order"); + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); + } + + if (record.getAgentId() != null) { + sql.SET("agent_id = #{agentId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanId() != null) { + sql.SET("salesman_id = #{salesmanId,jdbcType=BIGINT}"); + } + + if (record.getSalesmanName() != null) { + sql.SET("salesman_name = #{salesmanName,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getMerNo() != null) { + sql.SET("mer_no = #{merNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + + if (record.getDeviceId() != null) { + sql.SET("device_id = #{deviceId,jdbcType=BIGINT}"); + } + + if (record.getDeviceSn() != null) { + sql.SET("device_sn = #{deviceSn,jdbcType=VARCHAR}"); + } + + if (record.getQrCodeId() != null) { + sql.SET("qr_code_id = #{qrCodeId,jdbcType=BIGINT}"); + } + + if (record.getQrCodeSn() != null) { + sql.SET("qr_code_sn = #{qrCodeSn,jdbcType=VARCHAR}"); + } + + if (record.getPlatformType() != null) { + sql.SET("platform_type = #{platformType,jdbcType=INTEGER}"); + } + + if (record.getPlatformMerNo() != null) { + sql.SET("platform_mer_no = #{platformMerNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformTradeNo() != null) { + sql.SET("platform_trade_no = #{platformTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getPlatformLogNo() != null) { + sql.SET("platform_log_no = #{platformLogNo,jdbcType=VARCHAR}"); + } + + if (record.getPayUserId() != null) { + sql.SET("pay_user_id = #{payUserId,jdbcType=VARCHAR}"); + } + + if (record.getPayMode() != null) { + sql.SET("pay_mode = #{payMode,jdbcType=VARCHAR}"); + } + + if (record.getOutTradeNo() != null) { + sql.SET("out_trade_no = #{outTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getTradeAmount() != null) { + sql.SET("trade_amount = #{tradeAmount,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountSatisfy() != null) { + sql.SET("store_discount_satisfy = #{storeDiscountSatisfy,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountId() != null) { + sql.SET("store_discount_id = #{storeDiscountId,jdbcType=BIGINT}"); + } + + if (record.getStoreDiscountName() != null) { + sql.SET("store_discount_name = #{storeDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getStoreDiscountType() != null) { + sql.SET("store_discount_type = #{storeDiscountType,jdbcType=INTEGER}"); + } + + if (record.getStoreDiscountPrice() != null) { + sql.SET("store_discount_price = #{storeDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getStoreDiscountActualPrice() != null) { + sql.SET("store_discount_actual_price = #{storeDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountId() != null) { + sql.SET("user_discount_id = #{userDiscountId,jdbcType=BIGINT}"); + } + + if (record.getUserDiscountName() != null) { + sql.SET("user_discount_name = #{userDiscountName,jdbcType=VARCHAR}"); + } + + if (record.getUserDiscountType() != null) { + sql.SET("user_discount_type = #{userDiscountType,jdbcType=INTEGER}"); + } + + if (record.getUserDiscountPrice() != null) { + sql.SET("user_discount_price = #{userDiscountPrice,jdbcType=DECIMAL}"); + } + + if (record.getUserDiscountActualPrice() != null) { + sql.SET("user_discount_actual_price = #{userDiscountActualPrice,jdbcType=DECIMAL}"); + } + + if (record.getTradeActualAmount() != null) { + sql.SET("trade_actual_amount = #{tradeActualAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccTradeNo() != null) { + sql.SET("acc_trade_no = #{accTradeNo,jdbcType=VARCHAR}"); + } + + if (record.getAccMdiscountAmount() != null) { + sql.SET("acc_mdiscount_amount = #{accMdiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccDiscountAmount() != null) { + sql.SET("acc_discount_amount = #{accDiscountAmount,jdbcType=DECIMAL}"); + } + + if (record.getAccPaymentCode() != null) { + sql.SET("acc_payment_code = #{accPaymentCode,jdbcType=VARCHAR}"); + } + + if (record.getCardType() != null) { + sql.SET("card_type = #{cardType,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getPayTime() != null) { + sql.SET("pay_time = #{payTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCancelTime() != null) { + sql.SET("cancel_time = #{cancelTime,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, BsTradeOrderExample 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/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java index 065d24f5..af7a56eb 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountMapper.java @@ -39,7 +39,9 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_discount (company_id, discount_key, ", + "insert into high_discount (company_id, platform, ", + "mer_id, mer_name, store_id, ", + "store_name, discount_key, ", "using_range, use_scope, ", "discount_name, discount_img, ", "discount_carousel_img, discount_type, ", @@ -49,7 +51,9 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { "update_time, operator_id, ", "operator_name, `status`, ", "ext_1, ext_2, ext_3)", - "values (#{companyId,jdbcType=BIGINT}, #{discountKey,jdbcType=VARCHAR}, ", + "values (#{companyId,jdbcType=BIGINT}, #{platform,jdbcType=VARCHAR}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{storeId,jdbcType=BIGINT}, ", + "#{storeName,jdbcType=VARCHAR}, #{discountKey,jdbcType=VARCHAR}, ", "#{usingRange,jdbcType=INTEGER}, #{useScope,jdbcType=INTEGER}, ", "#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ", "#{discountCarouselImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ", @@ -71,6 +75,11 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="platform", property="platform", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_key", property="discountKey", jdbcType=JdbcType.VARCHAR), @Result(column="using_range", property="usingRange", jdbcType=JdbcType.INTEGER), @Result(column="use_scope", property="useScope", jdbcType=JdbcType.INTEGER), @@ -96,16 +105,22 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { @Select({ "select", - "id, company_id, discount_key, using_range, use_scope, discount_name, discount_img, ", - "discount_carousel_img, discount_type, discount_condition, discount_price, receive_number, ", - "effective_day, sales_end_time, create_time, update_time, operator_id, operator_name, ", - "`status`, ext_1, ext_2, ext_3", + "id, company_id, platform, mer_id, mer_name, store_id, store_name, discount_key, ", + "using_range, use_scope, discount_name, discount_img, discount_carousel_img, ", + "discount_type, discount_condition, discount_price, receive_number, effective_day, ", + "sales_end_time, create_time, update_time, operator_id, operator_name, `status`, ", + "ext_1, ext_2, ext_3", "from high_discount", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="platform", property="platform", jdbcType=JdbcType.VARCHAR), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", jdbcType=JdbcType.VARCHAR), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_name", property="storeName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_key", property="discountKey", jdbcType=JdbcType.VARCHAR), @Result(column="using_range", property="usingRange", jdbcType=JdbcType.INTEGER), @Result(column="use_scope", property="useScope", jdbcType=JdbcType.INTEGER), @@ -141,6 +156,11 @@ public interface HighDiscountMapper extends HighDiscountMapperExt { @Update({ "update high_discount", "set company_id = #{companyId,jdbcType=BIGINT},", + "platform = #{platform,jdbcType=VARCHAR},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_name = #{storeName,jdbcType=VARCHAR},", "discount_key = #{discountKey,jdbcType=VARCHAR},", "using_range = #{usingRange,jdbcType=INTEGER},", "use_scope = #{useScope,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java index 523d6f76..5d8a5121 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountSqlProvider.java @@ -32,6 +32,26 @@ public class HighDiscountSqlProvider { sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.VALUES("platform", "#{platform,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,jdbcType=VARCHAR}"); + } + if (record.getDiscountKey() != null) { sql.VALUES("discount_key", "#{discountKey,jdbcType=VARCHAR}"); } @@ -123,6 +143,11 @@ public class HighDiscountSqlProvider { sql.SELECT("id"); } sql.SELECT("company_id"); + sql.SELECT("platform"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("store_id"); + sql.SELECT("store_name"); sql.SELECT("discount_key"); sql.SELECT("using_range"); sql.SELECT("use_scope"); @@ -168,6 +193,26 @@ public class HighDiscountSqlProvider { sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{record.platform,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); + } + if (record.getDiscountKey() != null) { sql.SET("discount_key = #{record.discountKey,jdbcType=VARCHAR}"); } @@ -258,6 +303,11 @@ public class HighDiscountSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("platform = #{record.platform,jdbcType=VARCHAR}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,jdbcType=VARCHAR}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_name = #{record.storeName,jdbcType=VARCHAR}"); sql.SET("discount_key = #{record.discountKey,jdbcType=VARCHAR}"); sql.SET("using_range = #{record.usingRange,jdbcType=INTEGER}"); sql.SET("use_scope = #{record.useScope,jdbcType=INTEGER}"); @@ -292,6 +342,26 @@ public class HighDiscountSqlProvider { sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); } + if (record.getPlatform() != null) { + sql.SET("platform = #{platform,jdbcType=VARCHAR}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,jdbcType=VARCHAR}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,jdbcType=VARCHAR}"); + } + if (record.getDiscountKey() != null) { sql.SET("discount_key = #{discountKey,jdbcType=VARCHAR}"); } diff --git a/hai-service/src/main/java/com/hai/entity/BsTradeOrder.java b/hai-service/src/main/java/com/hai/entity/BsTradeOrder.java new file mode 100644 index 00000000..5b93712b --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsTradeOrder.java @@ -0,0 +1,829 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * bs_trade_order + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsTradeOrder implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 代理商id + */ + private Long agentId; + + /** + * 业务员id + */ + private Long salesmanId; + + /** + * 业务员名称 + */ + private String salesmanName; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 商户号 + */ + private String merNo; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + + /** + * 设备id + */ + private Long deviceId; + + /** + * 设备编号SN + */ + private String deviceSn; + + /** + * 二维码id + */ + private Long qrCodeId; + + /** + * 二维序列号 + */ + private String qrCodeSn; + + /** + * 平台类型 1:拉卡拉 + */ + private Integer platformType; + + /** + * 平台商户号 + */ + private String platformMerNo; + + /** + * 平台流水号 + */ + private String platformTradeNo; + + /** + * 平台对账单流水号 + */ + private String platformLogNo; + + /** + * 支付用户id + */ + private String payUserId; + + /** + * 支付模式: +微信:WECHAT +支付宝:ALIPAY +银联:UQRCODEPAY +【建行】龙支付:DRAGON + */ + private String payMode; + + /** + * 商户交易流水 + */ + private String outTradeNo; + + /** + * 交易金额 + */ + private BigDecimal tradeAmount; + + /** + * 是否满足门店优惠条件 + */ + private Integer storeDiscountSatisfy; + + /** + * 门店优惠id + */ + private Long storeDiscountId; + + /** + * 门店优惠名称 + */ + private String storeDiscountName; + + /** + * 门店优惠类型 + */ + private Integer storeDiscountType; + + /** + * 门店优惠金额 + */ + private BigDecimal storeDiscountPrice; + + /** + * 门店实际优惠金额 + */ + private BigDecimal storeDiscountActualPrice; + + /** + * 客户id + */ + private Integer userId; + + /** + * 客户手机号 + */ + private String userPhone; + + /** + * 客户优惠券id + */ + private Long userDiscountId; + + /** + * 客户优惠券名称 + */ + private String userDiscountName; + + /** + * 客户优惠券类型 + */ + private Integer userDiscountType; + + /** + * 客户优惠券金额 + */ + private BigDecimal userDiscountPrice; + + /** + * 客户优惠券实际优惠金额 + */ + private BigDecimal userDiscountActualPrice; + + /** + * 交易实际金额 + */ + private BigDecimal tradeActualAmount; + + /** + * 账户端交易流水号 + */ + private String accTradeNo; + + /** + * 账户端商户优惠金额,单位分 + */ + private BigDecimal accMdiscountAmount; + + /** + * 账户端账户端优惠金额,单位分 + */ + private BigDecimal accDiscountAmount; + + /** + * 账户端付款码 + */ + private String accPaymentCode; + + /** + * 银行卡 00:借记 01:贷记 02:微信零钱 03:支付宝花呗 04:支付宝其他 05:数字货币 06:拉卡拉支付账户 99:未知 + */ + private String cardType; + + /** + * 状态 1:待支付 2:支付中 3:支付成功 4 :支付失败 5:已取消 6:已退款 + */ + private Integer status; + + /** + * 支付时间 + */ + private Date payTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 取消时间 + */ + private Date cancelTime; + + /** + * 更新时间 + */ + 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 getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public Long getAgentId() { + return agentId; + } + + public void setAgentId(Long agentId) { + this.agentId = agentId; + } + + public Long getSalesmanId() { + return salesmanId; + } + + public void setSalesmanId(Long salesmanId) { + this.salesmanId = salesmanId; + } + + public String getSalesmanName() { + return salesmanName; + } + + public void setSalesmanName(String salesmanName) { + this.salesmanName = salesmanName; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String getMerNo() { + return merNo; + } + + public void setMerNo(String merNo) { + this.merNo = merNo; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + public Long getDeviceId() { + return deviceId; + } + + public void setDeviceId(Long deviceId) { + this.deviceId = deviceId; + } + + public String getDeviceSn() { + return deviceSn; + } + + public void setDeviceSn(String deviceSn) { + this.deviceSn = deviceSn; + } + + public Long getQrCodeId() { + return qrCodeId; + } + + public void setQrCodeId(Long qrCodeId) { + this.qrCodeId = qrCodeId; + } + + public String getQrCodeSn() { + return qrCodeSn; + } + + public void setQrCodeSn(String qrCodeSn) { + this.qrCodeSn = qrCodeSn; + } + + public Integer getPlatformType() { + return platformType; + } + + public void setPlatformType(Integer platformType) { + this.platformType = platformType; + } + + public String getPlatformMerNo() { + return platformMerNo; + } + + public void setPlatformMerNo(String platformMerNo) { + this.platformMerNo = platformMerNo; + } + + public String getPlatformTradeNo() { + return platformTradeNo; + } + + public void setPlatformTradeNo(String platformTradeNo) { + this.platformTradeNo = platformTradeNo; + } + + public String getPlatformLogNo() { + return platformLogNo; + } + + public void setPlatformLogNo(String platformLogNo) { + this.platformLogNo = platformLogNo; + } + + public String getPayUserId() { + return payUserId; + } + + public void setPayUserId(String payUserId) { + this.payUserId = payUserId; + } + + public String getPayMode() { + return payMode; + } + + public void setPayMode(String payMode) { + this.payMode = payMode; + } + + public String getOutTradeNo() { + return outTradeNo; + } + + public void setOutTradeNo(String outTradeNo) { + this.outTradeNo = outTradeNo; + } + + public BigDecimal getTradeAmount() { + return tradeAmount; + } + + public void setTradeAmount(BigDecimal tradeAmount) { + this.tradeAmount = tradeAmount; + } + + public Integer getStoreDiscountSatisfy() { + return storeDiscountSatisfy; + } + + public void setStoreDiscountSatisfy(Integer storeDiscountSatisfy) { + this.storeDiscountSatisfy = storeDiscountSatisfy; + } + + public Long getStoreDiscountId() { + return storeDiscountId; + } + + public void setStoreDiscountId(Long storeDiscountId) { + this.storeDiscountId = storeDiscountId; + } + + public String getStoreDiscountName() { + return storeDiscountName; + } + + public void setStoreDiscountName(String storeDiscountName) { + this.storeDiscountName = storeDiscountName; + } + + public Integer getStoreDiscountType() { + return storeDiscountType; + } + + public void setStoreDiscountType(Integer storeDiscountType) { + this.storeDiscountType = storeDiscountType; + } + + public BigDecimal getStoreDiscountPrice() { + return storeDiscountPrice; + } + + public void setStoreDiscountPrice(BigDecimal storeDiscountPrice) { + this.storeDiscountPrice = storeDiscountPrice; + } + + public BigDecimal getStoreDiscountActualPrice() { + return storeDiscountActualPrice; + } + + public void setStoreDiscountActualPrice(BigDecimal storeDiscountActualPrice) { + this.storeDiscountActualPrice = storeDiscountActualPrice; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public Long getUserDiscountId() { + return userDiscountId; + } + + public void setUserDiscountId(Long userDiscountId) { + this.userDiscountId = userDiscountId; + } + + public String getUserDiscountName() { + return userDiscountName; + } + + public void setUserDiscountName(String userDiscountName) { + this.userDiscountName = userDiscountName; + } + + public Integer getUserDiscountType() { + return userDiscountType; + } + + public void setUserDiscountType(Integer userDiscountType) { + this.userDiscountType = userDiscountType; + } + + public BigDecimal getUserDiscountPrice() { + return userDiscountPrice; + } + + public void setUserDiscountPrice(BigDecimal userDiscountPrice) { + this.userDiscountPrice = userDiscountPrice; + } + + public BigDecimal getUserDiscountActualPrice() { + return userDiscountActualPrice; + } + + public void setUserDiscountActualPrice(BigDecimal userDiscountActualPrice) { + this.userDiscountActualPrice = userDiscountActualPrice; + } + + public BigDecimal getTradeActualAmount() { + return tradeActualAmount; + } + + public void setTradeActualAmount(BigDecimal tradeActualAmount) { + this.tradeActualAmount = tradeActualAmount; + } + + public String getAccTradeNo() { + return accTradeNo; + } + + public void setAccTradeNo(String accTradeNo) { + this.accTradeNo = accTradeNo; + } + + public BigDecimal getAccMdiscountAmount() { + return accMdiscountAmount; + } + + public void setAccMdiscountAmount(BigDecimal accMdiscountAmount) { + this.accMdiscountAmount = accMdiscountAmount; + } + + public BigDecimal getAccDiscountAmount() { + return accDiscountAmount; + } + + public void setAccDiscountAmount(BigDecimal accDiscountAmount) { + this.accDiscountAmount = accDiscountAmount; + } + + public String getAccPaymentCode() { + return accPaymentCode; + } + + public void setAccPaymentCode(String accPaymentCode) { + this.accPaymentCode = accPaymentCode; + } + + public String getCardType() { + return cardType; + } + + public void setCardType(String cardType) { + this.cardType = cardType; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getPayTime() { + return payTime; + } + + public void setPayTime(Date payTime) { + this.payTime = payTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getCancelTime() { + return cancelTime; + } + + public void setCancelTime(Date cancelTime) { + this.cancelTime = cancelTime; + } + + 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; + } + BsTradeOrder other = (BsTradeOrder) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId())) + && (this.getSalesmanId() == null ? other.getSalesmanId() == null : this.getSalesmanId().equals(other.getSalesmanId())) + && (this.getSalesmanName() == null ? other.getSalesmanName() == null : this.getSalesmanName().equals(other.getSalesmanName())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getMerNo() == null ? other.getMerNo() == null : this.getMerNo().equals(other.getMerNo())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) + && (this.getDeviceId() == null ? other.getDeviceId() == null : this.getDeviceId().equals(other.getDeviceId())) + && (this.getDeviceSn() == null ? other.getDeviceSn() == null : this.getDeviceSn().equals(other.getDeviceSn())) + && (this.getQrCodeId() == null ? other.getQrCodeId() == null : this.getQrCodeId().equals(other.getQrCodeId())) + && (this.getQrCodeSn() == null ? other.getQrCodeSn() == null : this.getQrCodeSn().equals(other.getQrCodeSn())) + && (this.getPlatformType() == null ? other.getPlatformType() == null : this.getPlatformType().equals(other.getPlatformType())) + && (this.getPlatformMerNo() == null ? other.getPlatformMerNo() == null : this.getPlatformMerNo().equals(other.getPlatformMerNo())) + && (this.getPlatformTradeNo() == null ? other.getPlatformTradeNo() == null : this.getPlatformTradeNo().equals(other.getPlatformTradeNo())) + && (this.getPlatformLogNo() == null ? other.getPlatformLogNo() == null : this.getPlatformLogNo().equals(other.getPlatformLogNo())) + && (this.getPayUserId() == null ? other.getPayUserId() == null : this.getPayUserId().equals(other.getPayUserId())) + && (this.getPayMode() == null ? other.getPayMode() == null : this.getPayMode().equals(other.getPayMode())) + && (this.getOutTradeNo() == null ? other.getOutTradeNo() == null : this.getOutTradeNo().equals(other.getOutTradeNo())) + && (this.getTradeAmount() == null ? other.getTradeAmount() == null : this.getTradeAmount().equals(other.getTradeAmount())) + && (this.getStoreDiscountSatisfy() == null ? other.getStoreDiscountSatisfy() == null : this.getStoreDiscountSatisfy().equals(other.getStoreDiscountSatisfy())) + && (this.getStoreDiscountId() == null ? other.getStoreDiscountId() == null : this.getStoreDiscountId().equals(other.getStoreDiscountId())) + && (this.getStoreDiscountName() == null ? other.getStoreDiscountName() == null : this.getStoreDiscountName().equals(other.getStoreDiscountName())) + && (this.getStoreDiscountType() == null ? other.getStoreDiscountType() == null : this.getStoreDiscountType().equals(other.getStoreDiscountType())) + && (this.getStoreDiscountPrice() == null ? other.getStoreDiscountPrice() == null : this.getStoreDiscountPrice().equals(other.getStoreDiscountPrice())) + && (this.getStoreDiscountActualPrice() == null ? other.getStoreDiscountActualPrice() == null : this.getStoreDiscountActualPrice().equals(other.getStoreDiscountActualPrice())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) + && (this.getUserDiscountId() == null ? other.getUserDiscountId() == null : this.getUserDiscountId().equals(other.getUserDiscountId())) + && (this.getUserDiscountName() == null ? other.getUserDiscountName() == null : this.getUserDiscountName().equals(other.getUserDiscountName())) + && (this.getUserDiscountType() == null ? other.getUserDiscountType() == null : this.getUserDiscountType().equals(other.getUserDiscountType())) + && (this.getUserDiscountPrice() == null ? other.getUserDiscountPrice() == null : this.getUserDiscountPrice().equals(other.getUserDiscountPrice())) + && (this.getUserDiscountActualPrice() == null ? other.getUserDiscountActualPrice() == null : this.getUserDiscountActualPrice().equals(other.getUserDiscountActualPrice())) + && (this.getTradeActualAmount() == null ? other.getTradeActualAmount() == null : this.getTradeActualAmount().equals(other.getTradeActualAmount())) + && (this.getAccTradeNo() == null ? other.getAccTradeNo() == null : this.getAccTradeNo().equals(other.getAccTradeNo())) + && (this.getAccMdiscountAmount() == null ? other.getAccMdiscountAmount() == null : this.getAccMdiscountAmount().equals(other.getAccMdiscountAmount())) + && (this.getAccDiscountAmount() == null ? other.getAccDiscountAmount() == null : this.getAccDiscountAmount().equals(other.getAccDiscountAmount())) + && (this.getAccPaymentCode() == null ? other.getAccPaymentCode() == null : this.getAccPaymentCode().equals(other.getAccPaymentCode())) + && (this.getCardType() == null ? other.getCardType() == null : this.getCardType().equals(other.getCardType())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime())) + && (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 + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); + result = prime * result + ((getSalesmanId() == null) ? 0 : getSalesmanId().hashCode()); + result = prime * result + ((getSalesmanName() == null) ? 0 : getSalesmanName().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getMerNo() == null) ? 0 : getMerNo().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); + result = prime * result + ((getDeviceId() == null) ? 0 : getDeviceId().hashCode()); + result = prime * result + ((getDeviceSn() == null) ? 0 : getDeviceSn().hashCode()); + result = prime * result + ((getQrCodeId() == null) ? 0 : getQrCodeId().hashCode()); + result = prime * result + ((getQrCodeSn() == null) ? 0 : getQrCodeSn().hashCode()); + result = prime * result + ((getPlatformType() == null) ? 0 : getPlatformType().hashCode()); + result = prime * result + ((getPlatformMerNo() == null) ? 0 : getPlatformMerNo().hashCode()); + result = prime * result + ((getPlatformTradeNo() == null) ? 0 : getPlatformTradeNo().hashCode()); + result = prime * result + ((getPlatformLogNo() == null) ? 0 : getPlatformLogNo().hashCode()); + result = prime * result + ((getPayUserId() == null) ? 0 : getPayUserId().hashCode()); + result = prime * result + ((getPayMode() == null) ? 0 : getPayMode().hashCode()); + result = prime * result + ((getOutTradeNo() == null) ? 0 : getOutTradeNo().hashCode()); + result = prime * result + ((getTradeAmount() == null) ? 0 : getTradeAmount().hashCode()); + result = prime * result + ((getStoreDiscountSatisfy() == null) ? 0 : getStoreDiscountSatisfy().hashCode()); + result = prime * result + ((getStoreDiscountId() == null) ? 0 : getStoreDiscountId().hashCode()); + result = prime * result + ((getStoreDiscountName() == null) ? 0 : getStoreDiscountName().hashCode()); + result = prime * result + ((getStoreDiscountType() == null) ? 0 : getStoreDiscountType().hashCode()); + result = prime * result + ((getStoreDiscountPrice() == null) ? 0 : getStoreDiscountPrice().hashCode()); + result = prime * result + ((getStoreDiscountActualPrice() == null) ? 0 : getStoreDiscountActualPrice().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); + result = prime * result + ((getUserDiscountId() == null) ? 0 : getUserDiscountId().hashCode()); + result = prime * result + ((getUserDiscountName() == null) ? 0 : getUserDiscountName().hashCode()); + result = prime * result + ((getUserDiscountType() == null) ? 0 : getUserDiscountType().hashCode()); + result = prime * result + ((getUserDiscountPrice() == null) ? 0 : getUserDiscountPrice().hashCode()); + result = prime * result + ((getUserDiscountActualPrice() == null) ? 0 : getUserDiscountActualPrice().hashCode()); + result = prime * result + ((getTradeActualAmount() == null) ? 0 : getTradeActualAmount().hashCode()); + result = prime * result + ((getAccTradeNo() == null) ? 0 : getAccTradeNo().hashCode()); + result = prime * result + ((getAccMdiscountAmount() == null) ? 0 : getAccMdiscountAmount().hashCode()); + result = prime * result + ((getAccDiscountAmount() == null) ? 0 : getAccDiscountAmount().hashCode()); + result = prime * result + ((getAccPaymentCode() == null) ? 0 : getAccPaymentCode().hashCode()); + result = prime * result + ((getCardType() == null) ? 0 : getCardType().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().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(", companyId=").append(companyId); + sb.append(", agentId=").append(agentId); + sb.append(", salesmanId=").append(salesmanId); + sb.append(", salesmanName=").append(salesmanName); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", merNo=").append(merNo); + sb.append(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); + sb.append(", deviceId=").append(deviceId); + sb.append(", deviceSn=").append(deviceSn); + sb.append(", qrCodeId=").append(qrCodeId); + sb.append(", qrCodeSn=").append(qrCodeSn); + sb.append(", platformType=").append(platformType); + sb.append(", platformMerNo=").append(platformMerNo); + sb.append(", platformTradeNo=").append(platformTradeNo); + sb.append(", platformLogNo=").append(platformLogNo); + sb.append(", payUserId=").append(payUserId); + sb.append(", payMode=").append(payMode); + sb.append(", outTradeNo=").append(outTradeNo); + sb.append(", tradeAmount=").append(tradeAmount); + sb.append(", storeDiscountSatisfy=").append(storeDiscountSatisfy); + sb.append(", storeDiscountId=").append(storeDiscountId); + sb.append(", storeDiscountName=").append(storeDiscountName); + sb.append(", storeDiscountType=").append(storeDiscountType); + sb.append(", storeDiscountPrice=").append(storeDiscountPrice); + sb.append(", storeDiscountActualPrice=").append(storeDiscountActualPrice); + sb.append(", userId=").append(userId); + sb.append(", userPhone=").append(userPhone); + sb.append(", userDiscountId=").append(userDiscountId); + sb.append(", userDiscountName=").append(userDiscountName); + sb.append(", userDiscountType=").append(userDiscountType); + sb.append(", userDiscountPrice=").append(userDiscountPrice); + sb.append(", userDiscountActualPrice=").append(userDiscountActualPrice); + sb.append(", tradeActualAmount=").append(tradeActualAmount); + sb.append(", accTradeNo=").append(accTradeNo); + sb.append(", accMdiscountAmount=").append(accMdiscountAmount); + sb.append(", accDiscountAmount=").append(accDiscountAmount); + sb.append(", accPaymentCode=").append(accPaymentCode); + sb.append(", cardType=").append(cardType); + sb.append(", status=").append(status); + sb.append(", payTime=").append(payTime); + sb.append(", createTime=").append(createTime); + sb.append(", cancelTime=").append(cancelTime); + 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/hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java b/hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java new file mode 100644 index 00000000..1beccf04 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/BsTradeOrderExample.java @@ -0,0 +1,3374 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class BsTradeOrderExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsTradeOrderExample() { + 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 andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNull() { + addCriterion("agent_id is null"); + return (Criteria) this; + } + + public Criteria andAgentIdIsNotNull() { + addCriterion("agent_id is not null"); + return (Criteria) this; + } + + public Criteria andAgentIdEqualTo(Long value) { + addCriterion("agent_id =", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotEqualTo(Long value) { + addCriterion("agent_id <>", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThan(Long value) { + addCriterion("agent_id >", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdGreaterThanOrEqualTo(Long value) { + addCriterion("agent_id >=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThan(Long value) { + addCriterion("agent_id <", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdLessThanOrEqualTo(Long value) { + addCriterion("agent_id <=", value, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdIn(List values) { + addCriterion("agent_id in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotIn(List values) { + addCriterion("agent_id not in", values, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdBetween(Long value1, Long value2) { + addCriterion("agent_id between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andAgentIdNotBetween(Long value1, Long value2) { + addCriterion("agent_id not between", value1, value2, "agentId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdIsNull() { + addCriterion("salesman_id is null"); + return (Criteria) this; + } + + public Criteria andSalesmanIdIsNotNull() { + addCriterion("salesman_id is not null"); + return (Criteria) this; + } + + public Criteria andSalesmanIdEqualTo(Long value) { + addCriterion("salesman_id =", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdNotEqualTo(Long value) { + addCriterion("salesman_id <>", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdGreaterThan(Long value) { + addCriterion("salesman_id >", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdGreaterThanOrEqualTo(Long value) { + addCriterion("salesman_id >=", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdLessThan(Long value) { + addCriterion("salesman_id <", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdLessThanOrEqualTo(Long value) { + addCriterion("salesman_id <=", value, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdIn(List values) { + addCriterion("salesman_id in", values, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdNotIn(List values) { + addCriterion("salesman_id not in", values, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdBetween(Long value1, Long value2) { + addCriterion("salesman_id between", value1, value2, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanIdNotBetween(Long value1, Long value2) { + addCriterion("salesman_id not between", value1, value2, "salesmanId"); + return (Criteria) this; + } + + public Criteria andSalesmanNameIsNull() { + addCriterion("salesman_name is null"); + return (Criteria) this; + } + + public Criteria andSalesmanNameIsNotNull() { + addCriterion("salesman_name is not null"); + return (Criteria) this; + } + + public Criteria andSalesmanNameEqualTo(String value) { + addCriterion("salesman_name =", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotEqualTo(String value) { + addCriterion("salesman_name <>", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameGreaterThan(String value) { + addCriterion("salesman_name >", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameGreaterThanOrEqualTo(String value) { + addCriterion("salesman_name >=", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameLessThan(String value) { + addCriterion("salesman_name <", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameLessThanOrEqualTo(String value) { + addCriterion("salesman_name <=", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameLike(String value) { + addCriterion("salesman_name like", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotLike(String value) { + addCriterion("salesman_name not like", value, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameIn(List values) { + addCriterion("salesman_name in", values, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotIn(List values) { + addCriterion("salesman_name not in", values, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameBetween(String value1, String value2) { + addCriterion("salesman_name between", value1, value2, "salesmanName"); + return (Criteria) this; + } + + public Criteria andSalesmanNameNotBetween(String value1, String value2) { + addCriterion("salesman_name not between", value1, value2, "salesmanName"); + 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 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 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 andStoreIdIsNull() { + addCriterion("store_id is null"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNotNull() { + addCriterion("store_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreIdEqualTo(Long value) { + addCriterion("store_id =", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotEqualTo(Long value) { + addCriterion("store_id <>", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThan(Long value) { + addCriterion("store_id >", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_id >=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThan(Long value) { + addCriterion("store_id <", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThanOrEqualTo(Long value) { + addCriterion("store_id <=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdIn(List values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List values) { + addCriterion("store_id not in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdBetween(Long value1, Long value2) { + addCriterion("store_id between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotBetween(Long value1, Long value2) { + addCriterion("store_id not between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNull() { + addCriterion("device_id is null"); + return (Criteria) this; + } + + public Criteria andDeviceIdIsNotNull() { + addCriterion("device_id is not null"); + return (Criteria) this; + } + + public Criteria andDeviceIdEqualTo(Long value) { + addCriterion("device_id =", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotEqualTo(Long value) { + addCriterion("device_id <>", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThan(Long value) { + addCriterion("device_id >", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdGreaterThanOrEqualTo(Long value) { + addCriterion("device_id >=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThan(Long value) { + addCriterion("device_id <", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdLessThanOrEqualTo(Long value) { + addCriterion("device_id <=", value, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdIn(List values) { + addCriterion("device_id in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotIn(List values) { + addCriterion("device_id not in", values, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdBetween(Long value1, Long value2) { + addCriterion("device_id between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceIdNotBetween(Long value1, Long value2) { + addCriterion("device_id not between", value1, value2, "deviceId"); + return (Criteria) this; + } + + public Criteria andDeviceSnIsNull() { + addCriterion("device_sn is null"); + return (Criteria) this; + } + + public Criteria andDeviceSnIsNotNull() { + addCriterion("device_sn is not null"); + return (Criteria) this; + } + + public Criteria andDeviceSnEqualTo(String value) { + addCriterion("device_sn =", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotEqualTo(String value) { + addCriterion("device_sn <>", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnGreaterThan(String value) { + addCriterion("device_sn >", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnGreaterThanOrEqualTo(String value) { + addCriterion("device_sn >=", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLessThan(String value) { + addCriterion("device_sn <", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLessThanOrEqualTo(String value) { + addCriterion("device_sn <=", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnLike(String value) { + addCriterion("device_sn like", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotLike(String value) { + addCriterion("device_sn not like", value, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnIn(List values) { + addCriterion("device_sn in", values, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotIn(List values) { + addCriterion("device_sn not in", values, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnBetween(String value1, String value2) { + addCriterion("device_sn between", value1, value2, "deviceSn"); + return (Criteria) this; + } + + public Criteria andDeviceSnNotBetween(String value1, String value2) { + addCriterion("device_sn not between", value1, value2, "deviceSn"); + return (Criteria) this; + } + + public Criteria andQrCodeIdIsNull() { + addCriterion("qr_code_id is null"); + return (Criteria) this; + } + + public Criteria andQrCodeIdIsNotNull() { + addCriterion("qr_code_id is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeIdEqualTo(Long value) { + addCriterion("qr_code_id =", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdNotEqualTo(Long value) { + addCriterion("qr_code_id <>", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdGreaterThan(Long value) { + addCriterion("qr_code_id >", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdGreaterThanOrEqualTo(Long value) { + addCriterion("qr_code_id >=", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdLessThan(Long value) { + addCriterion("qr_code_id <", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdLessThanOrEqualTo(Long value) { + addCriterion("qr_code_id <=", value, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdIn(List values) { + addCriterion("qr_code_id in", values, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdNotIn(List values) { + addCriterion("qr_code_id not in", values, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdBetween(Long value1, Long value2) { + addCriterion("qr_code_id between", value1, value2, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeIdNotBetween(Long value1, Long value2) { + addCriterion("qr_code_id not between", value1, value2, "qrCodeId"); + return (Criteria) this; + } + + public Criteria andQrCodeSnIsNull() { + addCriterion("qr_code_sn is null"); + return (Criteria) this; + } + + public Criteria andQrCodeSnIsNotNull() { + addCriterion("qr_code_sn is not null"); + return (Criteria) this; + } + + public Criteria andQrCodeSnEqualTo(String value) { + addCriterion("qr_code_sn =", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotEqualTo(String value) { + addCriterion("qr_code_sn <>", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnGreaterThan(String value) { + addCriterion("qr_code_sn >", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnGreaterThanOrEqualTo(String value) { + addCriterion("qr_code_sn >=", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnLessThan(String value) { + addCriterion("qr_code_sn <", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnLessThanOrEqualTo(String value) { + addCriterion("qr_code_sn <=", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnLike(String value) { + addCriterion("qr_code_sn like", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotLike(String value) { + addCriterion("qr_code_sn not like", value, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnIn(List values) { + addCriterion("qr_code_sn in", values, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotIn(List values) { + addCriterion("qr_code_sn not in", values, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnBetween(String value1, String value2) { + addCriterion("qr_code_sn between", value1, value2, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andQrCodeSnNotBetween(String value1, String value2) { + addCriterion("qr_code_sn not between", value1, value2, "qrCodeSn"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNull() { + addCriterion("platform_type is null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIsNotNull() { + addCriterion("platform_type is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTypeEqualTo(Integer value) { + addCriterion("platform_type =", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotEqualTo(Integer value) { + addCriterion("platform_type <>", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThan(Integer value) { + addCriterion("platform_type >", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("platform_type >=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThan(Integer value) { + addCriterion("platform_type <", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeLessThanOrEqualTo(Integer value) { + addCriterion("platform_type <=", value, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeIn(List values) { + addCriterion("platform_type in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotIn(List values) { + addCriterion("platform_type not in", values, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeBetween(Integer value1, Integer value2) { + addCriterion("platform_type between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformTypeNotBetween(Integer value1, Integer value2) { + addCriterion("platform_type not between", value1, value2, "platformType"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIsNull() { + addCriterion("platform_mer_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIsNotNull() { + addCriterion("platform_mer_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoEqualTo(String value) { + addCriterion("platform_mer_no =", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotEqualTo(String value) { + addCriterion("platform_mer_no <>", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoGreaterThan(String value) { + addCriterion("platform_mer_no >", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_mer_no >=", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLessThan(String value) { + addCriterion("platform_mer_no <", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLessThanOrEqualTo(String value) { + addCriterion("platform_mer_no <=", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoLike(String value) { + addCriterion("platform_mer_no like", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotLike(String value) { + addCriterion("platform_mer_no not like", value, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoIn(List values) { + addCriterion("platform_mer_no in", values, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotIn(List values) { + addCriterion("platform_mer_no not in", values, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoBetween(String value1, String value2) { + addCriterion("platform_mer_no between", value1, value2, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformMerNoNotBetween(String value1, String value2) { + addCriterion("platform_mer_no not between", value1, value2, "platformMerNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIsNull() { + addCriterion("platform_trade_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIsNotNull() { + addCriterion("platform_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoEqualTo(String value) { + addCriterion("platform_trade_no =", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotEqualTo(String value) { + addCriterion("platform_trade_no <>", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoGreaterThan(String value) { + addCriterion("platform_trade_no >", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_trade_no >=", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLessThan(String value) { + addCriterion("platform_trade_no <", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLessThanOrEqualTo(String value) { + addCriterion("platform_trade_no <=", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoLike(String value) { + addCriterion("platform_trade_no like", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotLike(String value) { + addCriterion("platform_trade_no not like", value, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoIn(List values) { + addCriterion("platform_trade_no in", values, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotIn(List values) { + addCriterion("platform_trade_no not in", values, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoBetween(String value1, String value2) { + addCriterion("platform_trade_no between", value1, value2, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformTradeNoNotBetween(String value1, String value2) { + addCriterion("platform_trade_no not between", value1, value2, "platformTradeNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoIsNull() { + addCriterion("platform_log_no is null"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoIsNotNull() { + addCriterion("platform_log_no is not null"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoEqualTo(String value) { + addCriterion("platform_log_no =", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotEqualTo(String value) { + addCriterion("platform_log_no <>", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoGreaterThan(String value) { + addCriterion("platform_log_no >", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoGreaterThanOrEqualTo(String value) { + addCriterion("platform_log_no >=", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoLessThan(String value) { + addCriterion("platform_log_no <", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoLessThanOrEqualTo(String value) { + addCriterion("platform_log_no <=", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoLike(String value) { + addCriterion("platform_log_no like", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotLike(String value) { + addCriterion("platform_log_no not like", value, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoIn(List values) { + addCriterion("platform_log_no in", values, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotIn(List values) { + addCriterion("platform_log_no not in", values, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoBetween(String value1, String value2) { + addCriterion("platform_log_no between", value1, value2, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPlatformLogNoNotBetween(String value1, String value2) { + addCriterion("platform_log_no not between", value1, value2, "platformLogNo"); + return (Criteria) this; + } + + public Criteria andPayUserIdIsNull() { + addCriterion("pay_user_id is null"); + return (Criteria) this; + } + + public Criteria andPayUserIdIsNotNull() { + addCriterion("pay_user_id is not null"); + return (Criteria) this; + } + + public Criteria andPayUserIdEqualTo(String value) { + addCriterion("pay_user_id =", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotEqualTo(String value) { + addCriterion("pay_user_id <>", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdGreaterThan(String value) { + addCriterion("pay_user_id >", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdGreaterThanOrEqualTo(String value) { + addCriterion("pay_user_id >=", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdLessThan(String value) { + addCriterion("pay_user_id <", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdLessThanOrEqualTo(String value) { + addCriterion("pay_user_id <=", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdLike(String value) { + addCriterion("pay_user_id like", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotLike(String value) { + addCriterion("pay_user_id not like", value, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdIn(List values) { + addCriterion("pay_user_id in", values, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotIn(List values) { + addCriterion("pay_user_id not in", values, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdBetween(String value1, String value2) { + addCriterion("pay_user_id between", value1, value2, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayUserIdNotBetween(String value1, String value2) { + addCriterion("pay_user_id not between", value1, value2, "payUserId"); + return (Criteria) this; + } + + public Criteria andPayModeIsNull() { + addCriterion("pay_mode is null"); + return (Criteria) this; + } + + public Criteria andPayModeIsNotNull() { + addCriterion("pay_mode is not null"); + return (Criteria) this; + } + + public Criteria andPayModeEqualTo(String value) { + addCriterion("pay_mode =", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotEqualTo(String value) { + addCriterion("pay_mode <>", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeGreaterThan(String value) { + addCriterion("pay_mode >", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeGreaterThanOrEqualTo(String value) { + addCriterion("pay_mode >=", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeLessThan(String value) { + addCriterion("pay_mode <", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeLessThanOrEqualTo(String value) { + addCriterion("pay_mode <=", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeLike(String value) { + addCriterion("pay_mode like", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotLike(String value) { + addCriterion("pay_mode not like", value, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeIn(List values) { + addCriterion("pay_mode in", values, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotIn(List values) { + addCriterion("pay_mode not in", values, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeBetween(String value1, String value2) { + addCriterion("pay_mode between", value1, value2, "payMode"); + return (Criteria) this; + } + + public Criteria andPayModeNotBetween(String value1, String value2) { + addCriterion("pay_mode not between", value1, value2, "payMode"); + return (Criteria) this; + } + + public Criteria andOutTradeNoIsNull() { + addCriterion("out_trade_no is null"); + return (Criteria) this; + } + + public Criteria andOutTradeNoIsNotNull() { + addCriterion("out_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andOutTradeNoEqualTo(String value) { + addCriterion("out_trade_no =", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotEqualTo(String value) { + addCriterion("out_trade_no <>", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoGreaterThan(String value) { + addCriterion("out_trade_no >", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("out_trade_no >=", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoLessThan(String value) { + addCriterion("out_trade_no <", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoLessThanOrEqualTo(String value) { + addCriterion("out_trade_no <=", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoLike(String value) { + addCriterion("out_trade_no like", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotLike(String value) { + addCriterion("out_trade_no not like", value, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoIn(List values) { + addCriterion("out_trade_no in", values, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotIn(List values) { + addCriterion("out_trade_no not in", values, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoBetween(String value1, String value2) { + addCriterion("out_trade_no between", value1, value2, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andOutTradeNoNotBetween(String value1, String value2) { + addCriterion("out_trade_no not between", value1, value2, "outTradeNo"); + return (Criteria) this; + } + + public Criteria andTradeAmountIsNull() { + addCriterion("trade_amount is null"); + return (Criteria) this; + } + + public Criteria andTradeAmountIsNotNull() { + addCriterion("trade_amount is not null"); + return (Criteria) this; + } + + public Criteria andTradeAmountEqualTo(BigDecimal value) { + addCriterion("trade_amount =", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountNotEqualTo(BigDecimal value) { + addCriterion("trade_amount <>", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountGreaterThan(BigDecimal value) { + addCriterion("trade_amount >", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("trade_amount >=", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountLessThan(BigDecimal value) { + addCriterion("trade_amount <", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("trade_amount <=", value, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountIn(List values) { + addCriterion("trade_amount in", values, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountNotIn(List values) { + addCriterion("trade_amount not in", values, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_amount between", value1, value2, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andTradeAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_amount not between", value1, value2, "tradeAmount"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyIsNull() { + addCriterion("store_discount_satisfy is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyIsNotNull() { + addCriterion("store_discount_satisfy is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyEqualTo(Integer value) { + addCriterion("store_discount_satisfy =", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyNotEqualTo(Integer value) { + addCriterion("store_discount_satisfy <>", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyGreaterThan(Integer value) { + addCriterion("store_discount_satisfy >", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyGreaterThanOrEqualTo(Integer value) { + addCriterion("store_discount_satisfy >=", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyLessThan(Integer value) { + addCriterion("store_discount_satisfy <", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyLessThanOrEqualTo(Integer value) { + addCriterion("store_discount_satisfy <=", value, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyIn(List values) { + addCriterion("store_discount_satisfy in", values, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyNotIn(List values) { + addCriterion("store_discount_satisfy not in", values, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyBetween(Integer value1, Integer value2) { + addCriterion("store_discount_satisfy between", value1, value2, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountSatisfyNotBetween(Integer value1, Integer value2) { + addCriterion("store_discount_satisfy not between", value1, value2, "storeDiscountSatisfy"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdIsNull() { + addCriterion("store_discount_id is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdIsNotNull() { + addCriterion("store_discount_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdEqualTo(Long value) { + addCriterion("store_discount_id =", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdNotEqualTo(Long value) { + addCriterion("store_discount_id <>", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdGreaterThan(Long value) { + addCriterion("store_discount_id >", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_discount_id >=", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdLessThan(Long value) { + addCriterion("store_discount_id <", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdLessThanOrEqualTo(Long value) { + addCriterion("store_discount_id <=", value, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdIn(List values) { + addCriterion("store_discount_id in", values, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdNotIn(List values) { + addCriterion("store_discount_id not in", values, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdBetween(Long value1, Long value2) { + addCriterion("store_discount_id between", value1, value2, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountIdNotBetween(Long value1, Long value2) { + addCriterion("store_discount_id not between", value1, value2, "storeDiscountId"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameIsNull() { + addCriterion("store_discount_name is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameIsNotNull() { + addCriterion("store_discount_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameEqualTo(String value) { + addCriterion("store_discount_name =", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotEqualTo(String value) { + addCriterion("store_discount_name <>", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameGreaterThan(String value) { + addCriterion("store_discount_name >", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("store_discount_name >=", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameLessThan(String value) { + addCriterion("store_discount_name <", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameLessThanOrEqualTo(String value) { + addCriterion("store_discount_name <=", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameLike(String value) { + addCriterion("store_discount_name like", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotLike(String value) { + addCriterion("store_discount_name not like", value, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameIn(List values) { + addCriterion("store_discount_name in", values, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotIn(List values) { + addCriterion("store_discount_name not in", values, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameBetween(String value1, String value2) { + addCriterion("store_discount_name between", value1, value2, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountNameNotBetween(String value1, String value2) { + addCriterion("store_discount_name not between", value1, value2, "storeDiscountName"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeIsNull() { + addCriterion("store_discount_type is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeIsNotNull() { + addCriterion("store_discount_type is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeEqualTo(Integer value) { + addCriterion("store_discount_type =", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeNotEqualTo(Integer value) { + addCriterion("store_discount_type <>", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeGreaterThan(Integer value) { + addCriterion("store_discount_type >", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("store_discount_type >=", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeLessThan(Integer value) { + addCriterion("store_discount_type <", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeLessThanOrEqualTo(Integer value) { + addCriterion("store_discount_type <=", value, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeIn(List values) { + addCriterion("store_discount_type in", values, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeNotIn(List values) { + addCriterion("store_discount_type not in", values, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeBetween(Integer value1, Integer value2) { + addCriterion("store_discount_type between", value1, value2, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountTypeNotBetween(Integer value1, Integer value2) { + addCriterion("store_discount_type not between", value1, value2, "storeDiscountType"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceIsNull() { + addCriterion("store_discount_price is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceIsNotNull() { + addCriterion("store_discount_price is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceEqualTo(BigDecimal value) { + addCriterion("store_discount_price =", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceNotEqualTo(BigDecimal value) { + addCriterion("store_discount_price <>", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceGreaterThan(BigDecimal value) { + addCriterion("store_discount_price >", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_price >=", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceLessThan(BigDecimal value) { + addCriterion("store_discount_price <", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_price <=", value, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceIn(List values) { + addCriterion("store_discount_price in", values, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceNotIn(List values) { + addCriterion("store_discount_price not in", values, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_price between", value1, value2, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_price not between", value1, value2, "storeDiscountPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceIsNull() { + addCriterion("store_discount_actual_price is null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceIsNotNull() { + addCriterion("store_discount_actual_price is not null"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price =", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceNotEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price <>", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceGreaterThan(BigDecimal value) { + addCriterion("store_discount_actual_price >", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price >=", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceLessThan(BigDecimal value) { + addCriterion("store_discount_actual_price <", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("store_discount_actual_price <=", value, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceIn(List values) { + addCriterion("store_discount_actual_price in", values, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceNotIn(List values) { + addCriterion("store_discount_actual_price not in", values, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_actual_price between", value1, value2, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andStoreDiscountActualPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("store_discount_actual_price not between", value1, value2, "storeDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Integer value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Integer value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Integer value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Integer value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Integer value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Integer value1, Integer value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNull() { + addCriterion("user_phone is null"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNotNull() { + addCriterion("user_phone is not null"); + return (Criteria) this; + } + + public Criteria andUserPhoneEqualTo(String value) { + addCriterion("user_phone =", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotEqualTo(String value) { + addCriterion("user_phone <>", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThan(String value) { + addCriterion("user_phone >", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThanOrEqualTo(String value) { + addCriterion("user_phone >=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThan(String value) { + addCriterion("user_phone <", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThanOrEqualTo(String value) { + addCriterion("user_phone <=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLike(String value) { + addCriterion("user_phone like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotLike(String value) { + addCriterion("user_phone not like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneIn(List values) { + addCriterion("user_phone in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotIn(List values) { + addCriterion("user_phone not in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneBetween(String value1, String value2) { + addCriterion("user_phone between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotBetween(String value1, String value2) { + addCriterion("user_phone not between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdIsNull() { + addCriterion("user_discount_id is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdIsNotNull() { + addCriterion("user_discount_id is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdEqualTo(Long value) { + addCriterion("user_discount_id =", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdNotEqualTo(Long value) { + addCriterion("user_discount_id <>", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdGreaterThan(Long value) { + addCriterion("user_discount_id >", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_discount_id >=", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdLessThan(Long value) { + addCriterion("user_discount_id <", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdLessThanOrEqualTo(Long value) { + addCriterion("user_discount_id <=", value, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdIn(List values) { + addCriterion("user_discount_id in", values, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdNotIn(List values) { + addCriterion("user_discount_id not in", values, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdBetween(Long value1, Long value2) { + addCriterion("user_discount_id between", value1, value2, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountIdNotBetween(Long value1, Long value2) { + addCriterion("user_discount_id not between", value1, value2, "userDiscountId"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameIsNull() { + addCriterion("user_discount_name is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameIsNotNull() { + addCriterion("user_discount_name is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameEqualTo(String value) { + addCriterion("user_discount_name =", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotEqualTo(String value) { + addCriterion("user_discount_name <>", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameGreaterThan(String value) { + addCriterion("user_discount_name >", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("user_discount_name >=", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameLessThan(String value) { + addCriterion("user_discount_name <", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameLessThanOrEqualTo(String value) { + addCriterion("user_discount_name <=", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameLike(String value) { + addCriterion("user_discount_name like", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotLike(String value) { + addCriterion("user_discount_name not like", value, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameIn(List values) { + addCriterion("user_discount_name in", values, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotIn(List values) { + addCriterion("user_discount_name not in", values, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameBetween(String value1, String value2) { + addCriterion("user_discount_name between", value1, value2, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountNameNotBetween(String value1, String value2) { + addCriterion("user_discount_name not between", value1, value2, "userDiscountName"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeIsNull() { + addCriterion("user_discount_type is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeIsNotNull() { + addCriterion("user_discount_type is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeEqualTo(Integer value) { + addCriterion("user_discount_type =", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeNotEqualTo(Integer value) { + addCriterion("user_discount_type <>", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeGreaterThan(Integer value) { + addCriterion("user_discount_type >", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("user_discount_type >=", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeLessThan(Integer value) { + addCriterion("user_discount_type <", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeLessThanOrEqualTo(Integer value) { + addCriterion("user_discount_type <=", value, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeIn(List values) { + addCriterion("user_discount_type in", values, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeNotIn(List values) { + addCriterion("user_discount_type not in", values, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeBetween(Integer value1, Integer value2) { + addCriterion("user_discount_type between", value1, value2, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountTypeNotBetween(Integer value1, Integer value2) { + addCriterion("user_discount_type not between", value1, value2, "userDiscountType"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceIsNull() { + addCriterion("user_discount_price is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceIsNotNull() { + addCriterion("user_discount_price is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceEqualTo(BigDecimal value) { + addCriterion("user_discount_price =", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceNotEqualTo(BigDecimal value) { + addCriterion("user_discount_price <>", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceGreaterThan(BigDecimal value) { + addCriterion("user_discount_price >", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_price >=", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceLessThan(BigDecimal value) { + addCriterion("user_discount_price <", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_price <=", value, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceIn(List values) { + addCriterion("user_discount_price in", values, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceNotIn(List values) { + addCriterion("user_discount_price not in", values, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_price between", value1, value2, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_price not between", value1, value2, "userDiscountPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceIsNull() { + addCriterion("user_discount_actual_price is null"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceIsNotNull() { + addCriterion("user_discount_actual_price is not null"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price =", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceNotEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price <>", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceGreaterThan(BigDecimal value) { + addCriterion("user_discount_actual_price >", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price >=", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceLessThan(BigDecimal value) { + addCriterion("user_discount_actual_price <", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("user_discount_actual_price <=", value, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceIn(List values) { + addCriterion("user_discount_actual_price in", values, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceNotIn(List values) { + addCriterion("user_discount_actual_price not in", values, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_actual_price between", value1, value2, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andUserDiscountActualPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("user_discount_actual_price not between", value1, value2, "userDiscountActualPrice"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountIsNull() { + addCriterion("trade_actual_amount is null"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountIsNotNull() { + addCriterion("trade_actual_amount is not null"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount =", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountNotEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount <>", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountGreaterThan(BigDecimal value) { + addCriterion("trade_actual_amount >", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount >=", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountLessThan(BigDecimal value) { + addCriterion("trade_actual_amount <", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("trade_actual_amount <=", value, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountIn(List values) { + addCriterion("trade_actual_amount in", values, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountNotIn(List values) { + addCriterion("trade_actual_amount not in", values, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_actual_amount between", value1, value2, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andTradeActualAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("trade_actual_amount not between", value1, value2, "tradeActualAmount"); + return (Criteria) this; + } + + public Criteria andAccTradeNoIsNull() { + addCriterion("acc_trade_no is null"); + return (Criteria) this; + } + + public Criteria andAccTradeNoIsNotNull() { + addCriterion("acc_trade_no is not null"); + return (Criteria) this; + } + + public Criteria andAccTradeNoEqualTo(String value) { + addCriterion("acc_trade_no =", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotEqualTo(String value) { + addCriterion("acc_trade_no <>", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoGreaterThan(String value) { + addCriterion("acc_trade_no >", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoGreaterThanOrEqualTo(String value) { + addCriterion("acc_trade_no >=", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoLessThan(String value) { + addCriterion("acc_trade_no <", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoLessThanOrEqualTo(String value) { + addCriterion("acc_trade_no <=", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoLike(String value) { + addCriterion("acc_trade_no like", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotLike(String value) { + addCriterion("acc_trade_no not like", value, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoIn(List values) { + addCriterion("acc_trade_no in", values, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotIn(List values) { + addCriterion("acc_trade_no not in", values, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoBetween(String value1, String value2) { + addCriterion("acc_trade_no between", value1, value2, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccTradeNoNotBetween(String value1, String value2) { + addCriterion("acc_trade_no not between", value1, value2, "accTradeNo"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountIsNull() { + addCriterion("acc_mdiscount_amount is null"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountIsNotNull() { + addCriterion("acc_mdiscount_amount is not null"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount =", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountNotEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount <>", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountGreaterThan(BigDecimal value) { + addCriterion("acc_mdiscount_amount >", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount >=", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountLessThan(BigDecimal value) { + addCriterion("acc_mdiscount_amount <", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("acc_mdiscount_amount <=", value, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountIn(List values) { + addCriterion("acc_mdiscount_amount in", values, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountNotIn(List values) { + addCriterion("acc_mdiscount_amount not in", values, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_mdiscount_amount between", value1, value2, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccMdiscountAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_mdiscount_amount not between", value1, value2, "accMdiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountIsNull() { + addCriterion("acc_discount_amount is null"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountIsNotNull() { + addCriterion("acc_discount_amount is not null"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount =", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountNotEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount <>", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountGreaterThan(BigDecimal value) { + addCriterion("acc_discount_amount >", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount >=", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountLessThan(BigDecimal value) { + addCriterion("acc_discount_amount <", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("acc_discount_amount <=", value, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountIn(List values) { + addCriterion("acc_discount_amount in", values, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountNotIn(List values) { + addCriterion("acc_discount_amount not in", values, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_discount_amount between", value1, value2, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccDiscountAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("acc_discount_amount not between", value1, value2, "accDiscountAmount"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeIsNull() { + addCriterion("acc_payment_code is null"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeIsNotNull() { + addCriterion("acc_payment_code is not null"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeEqualTo(String value) { + addCriterion("acc_payment_code =", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotEqualTo(String value) { + addCriterion("acc_payment_code <>", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeGreaterThan(String value) { + addCriterion("acc_payment_code >", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeGreaterThanOrEqualTo(String value) { + addCriterion("acc_payment_code >=", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeLessThan(String value) { + addCriterion("acc_payment_code <", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeLessThanOrEqualTo(String value) { + addCriterion("acc_payment_code <=", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeLike(String value) { + addCriterion("acc_payment_code like", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotLike(String value) { + addCriterion("acc_payment_code not like", value, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeIn(List values) { + addCriterion("acc_payment_code in", values, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotIn(List values) { + addCriterion("acc_payment_code not in", values, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeBetween(String value1, String value2) { + addCriterion("acc_payment_code between", value1, value2, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andAccPaymentCodeNotBetween(String value1, String value2) { + addCriterion("acc_payment_code not between", value1, value2, "accPaymentCode"); + return (Criteria) this; + } + + public Criteria andCardTypeIsNull() { + addCriterion("card_type is null"); + return (Criteria) this; + } + + public Criteria andCardTypeIsNotNull() { + addCriterion("card_type is not null"); + return (Criteria) this; + } + + public Criteria andCardTypeEqualTo(String value) { + addCriterion("card_type =", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotEqualTo(String value) { + addCriterion("card_type <>", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeGreaterThan(String value) { + addCriterion("card_type >", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeGreaterThanOrEqualTo(String value) { + addCriterion("card_type >=", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeLessThan(String value) { + addCriterion("card_type <", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeLessThanOrEqualTo(String value) { + addCriterion("card_type <=", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeLike(String value) { + addCriterion("card_type like", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotLike(String value) { + addCriterion("card_type not like", value, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeIn(List values) { + addCriterion("card_type in", values, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotIn(List values) { + addCriterion("card_type not in", values, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeBetween(String value1, String value2) { + addCriterion("card_type between", value1, value2, "cardType"); + return (Criteria) this; + } + + public Criteria andCardTypeNotBetween(String value1, String value2) { + addCriterion("card_type not between", value1, value2, "cardType"); + 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 andPayTimeIsNull() { + addCriterion("pay_time is null"); + return (Criteria) this; + } + + public Criteria andPayTimeIsNotNull() { + addCriterion("pay_time is not null"); + return (Criteria) this; + } + + public Criteria andPayTimeEqualTo(Date value) { + addCriterion("pay_time =", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotEqualTo(Date value) { + addCriterion("pay_time <>", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThan(Date value) { + addCriterion("pay_time >", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeGreaterThanOrEqualTo(Date value) { + addCriterion("pay_time >=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThan(Date value) { + addCriterion("pay_time <", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeLessThanOrEqualTo(Date value) { + addCriterion("pay_time <=", value, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeIn(List values) { + addCriterion("pay_time in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotIn(List values) { + addCriterion("pay_time not in", values, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeBetween(Date value1, Date value2) { + addCriterion("pay_time between", value1, value2, "payTime"); + return (Criteria) this; + } + + public Criteria andPayTimeNotBetween(Date value1, Date value2) { + addCriterion("pay_time not between", value1, value2, "payTime"); + 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 andCancelTimeIsNull() { + addCriterion("cancel_time is null"); + return (Criteria) this; + } + + public Criteria andCancelTimeIsNotNull() { + addCriterion("cancel_time is not null"); + return (Criteria) this; + } + + public Criteria andCancelTimeEqualTo(Date value) { + addCriterion("cancel_time =", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotEqualTo(Date value) { + addCriterion("cancel_time <>", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeGreaterThan(Date value) { + addCriterion("cancel_time >", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeGreaterThanOrEqualTo(Date value) { + addCriterion("cancel_time >=", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeLessThan(Date value) { + addCriterion("cancel_time <", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeLessThanOrEqualTo(Date value) { + addCriterion("cancel_time <=", value, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeIn(List values) { + addCriterion("cancel_time in", values, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotIn(List values) { + addCriterion("cancel_time not in", values, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeBetween(Date value1, Date value2) { + addCriterion("cancel_time between", value1, value2, "cancelTime"); + return (Criteria) this; + } + + public Criteria andCancelTimeNotBetween(Date value1, Date value2) { + addCriterion("cancel_time not between", value1, value2, "cancelTime"); + 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/hai-service/src/main/java/com/hai/entity/HighDiscount.java b/hai-service/src/main/java/com/hai/entity/HighDiscount.java index b577a2e5..f5f40a63 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscount.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscount.java @@ -24,6 +24,31 @@ public class HighDiscount implements Serializable { */ private Long companyId; + /** + * 平台类型 HSG: 嗨森逛 GRATIA-PAY:惠支付 + */ + private String platform; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 门店id + */ + private Long storeId; + + /** + * 门店名称 + */ + private String storeName; + /** * 卡券编号 */ @@ -133,6 +158,46 @@ public class HighDiscount implements Serializable { this.companyId = companyId; } + public String getPlatform() { + return platform; + } + + public void setPlatform(String platform) { + this.platform = platform; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + public String getDiscountKey() { return discountKey; } @@ -307,6 +372,11 @@ public class HighDiscount implements Serializable { HighDiscount other = (HighDiscount) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getPlatform() == null ? other.getPlatform() == null : this.getPlatform().equals(other.getPlatform())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) && (this.getDiscountKey() == null ? other.getDiscountKey() == null : this.getDiscountKey().equals(other.getDiscountKey())) && (this.getUsingRange() == null ? other.getUsingRange() == null : this.getUsingRange().equals(other.getUsingRange())) && (this.getUseScope() == null ? other.getUseScope() == null : this.getUseScope().equals(other.getUseScope())) @@ -335,6 +405,11 @@ public class HighDiscount implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getPlatform() == null) ? 0 : getPlatform().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().hashCode()); result = prime * result + ((getDiscountKey() == null) ? 0 : getDiscountKey().hashCode()); result = prime * result + ((getUsingRange() == null) ? 0 : getUsingRange().hashCode()); result = prime * result + ((getUseScope() == null) ? 0 : getUseScope().hashCode()); @@ -366,6 +441,11 @@ public class HighDiscount implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", companyId=").append(companyId); + sb.append(", platform=").append(platform); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + sb.append(", storeId=").append(storeId); + sb.append(", storeName=").append(storeName); sb.append(", discountKey=").append(discountKey); sb.append(", usingRange=").append(usingRange); sb.append(", useScope=").append(useScope); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java index f5708b9d..10717983 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountExample.java @@ -246,6 +246,336 @@ public class HighDiscountExample { return (Criteria) this; } + public Criteria andPlatformIsNull() { + addCriterion("platform is null"); + return (Criteria) this; + } + + public Criteria andPlatformIsNotNull() { + addCriterion("platform is not null"); + return (Criteria) this; + } + + public Criteria andPlatformEqualTo(String value) { + addCriterion("platform =", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotEqualTo(String value) { + addCriterion("platform <>", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThan(String value) { + addCriterion("platform >", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformGreaterThanOrEqualTo(String value) { + addCriterion("platform >=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThan(String value) { + addCriterion("platform <", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLessThanOrEqualTo(String value) { + addCriterion("platform <=", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformLike(String value) { + addCriterion("platform like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotLike(String value) { + addCriterion("platform not like", value, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformIn(List values) { + addCriterion("platform in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotIn(List values) { + addCriterion("platform not in", values, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformBetween(String value1, String value2) { + addCriterion("platform between", value1, value2, "platform"); + return (Criteria) this; + } + + public Criteria andPlatformNotBetween(String value1, String value2) { + addCriterion("platform not between", value1, value2, "platform"); + 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 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 andStoreIdIsNull() { + addCriterion("store_id is null"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNotNull() { + addCriterion("store_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreIdEqualTo(Long value) { + addCriterion("store_id =", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotEqualTo(Long value) { + addCriterion("store_id <>", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThan(Long value) { + addCriterion("store_id >", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_id >=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThan(Long value) { + addCriterion("store_id <", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThanOrEqualTo(Long value) { + addCriterion("store_id <=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdIn(List values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List values) { + addCriterion("store_id not in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdBetween(Long value1, Long value2) { + addCriterion("store_id between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotBetween(Long value1, Long value2) { + addCriterion("store_id not between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + return (Criteria) this; + } + public Criteria andDiscountKeyIsNull() { addCriterion("discount_key is null"); return (Criteria) this; diff --git a/hai-user/src/main/java/com/web/config/AuthConfig.java b/hai-user/src/main/java/com/web/config/AuthConfig.java index ff6367b1..8b35c5c7 100644 --- a/hai-user/src/main/java/com/web/config/AuthConfig.java +++ b/hai-user/src/main/java/com/web/config/AuthConfig.java @@ -90,6 +90,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/**/springfox-swagger-ui/**") .excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/login/*") + .excludePathPatterns("/wechat/*") .excludePathPatterns("/sms/*") ; } diff --git a/hai-user/src/main/java/com/web/controller/DiscountController.java b/hai-user/src/main/java/com/web/controller/DiscountController.java index ed3f754a..3e1d13a3 100644 --- a/hai-user/src/main/java/com/web/controller/DiscountController.java +++ b/hai-user/src/main/java/com/web/controller/DiscountController.java @@ -1,5 +1,6 @@ package com.web.controller; +import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.hai.common.exception.ErrorCode; @@ -7,6 +8,7 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.security.UserCenter; import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighDiscountUserRel; import com.hai.model.HighUserModel; import com.hai.model.ResponseData; import com.hai.service.*; @@ -65,4 +67,123 @@ public class DiscountController { } } + @RequestMapping(value="/getUserDiscountDetail",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户优惠券详情") + public ResponseData getUserDiscountDetail(@RequestParam(name = "userDiscountId", required = true) Long userDiscountId) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + HighDiscountUserRel rel = discountUserRelService.getRelById(userDiscountId); + if (rel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠券"); + } + JSONObject param = new JSONObject(); + param.put("id", rel.getId()); + param.put("userId", rel.getUserId()); + param.put("discountPlatform", rel.getHighDiscount().getPlatform()); + param.put("discountId", rel.getDiscountId()); + param.put("discountName", rel.getDiscountName()); + param.put("discountType", rel.getDiscountType()); + param.put("discountCondition", rel.getDiscountCondition()); + param.put("discountPrice", rel.getDiscountPrice()); + param.put("receiveTime", rel.getCreateTime()); + param.put("status", rel.getStatus()); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/useUserDiscount",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "使用优惠券") + public ResponseData useUserDiscount(@RequestParam(name = "userDiscountId", required = true) Long userDiscountId) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + HighDiscountUserRel rel = discountUserRelService.getRelById(userDiscountId); + if (rel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠券"); + } + return ResponseMsgUtil.success(rel); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/cancelUserDiscount",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "取消使用优惠券") + public ResponseData cancelUserDiscount(@RequestParam(name = "userDiscountId", required = true) Long userDiscountId) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + HighDiscountUserRel rel = discountUserRelService.getRelById(userDiscountId); + if (rel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的优惠券"); + } + JSONObject param = new JSONObject(); + param.put("id", rel.getId()); + param.put("userId", rel.getUserId()); + param.put("discountId", rel.getDiscountId()); + param.put("discountName", rel.getDiscountName()); + param.put("discountType", rel.getDiscountType()); + param.put("discountCondition", rel.getDiscountCondition()); + param.put("discountPrice", rel.getDiscountPrice()); + param.put("receiveTime", rel.getCreateTime()); + param.put("status", rel.getStatus()); + return ResponseMsgUtil.success(param); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountDetail() error!",e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value="/queryUserDiscountList",method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户优惠券列表") + public ResponseData queryUserDiscountList(@RequestParam(name = "platform", required = false) Integer platform, + @RequestParam(name = "storeNo", required = false) String storeNo, + @RequestParam(name = "useScope", required = false) Integer useScope, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); + if (userInfoModel == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); + } + + Map param = new HashMap<>(); + param.put("userId", userInfoModel.getHighUser().getId()); + param.put("platform", platform); + param.put("storeNo", storeNo); + param.put("useScope", useScope); + param.put("status", status); + + PageHelper.startPage(pageNum,pageSize); + return ResponseMsgUtil.success(new PageInfo<>(discountUserRelService.getDiscountList(param))); + + } catch (Exception e) { + log.error("HighDiscountController -> getUserDiscountList() error!",e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/hai-user/src/main/java/com/web/controller/WechatController.java b/hai-user/src/main/java/com/web/controller/WechatController.java new file mode 100644 index 00000000..e8c52527 --- /dev/null +++ b/hai-user/src/main/java/com/web/controller/WechatController.java @@ -0,0 +1,38 @@ +package com.web.controller; + +import com.hai.common.utils.*; +import com.hai.model.ResponseData; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/wechat") +@Api(value = "微信授权") +public class WechatController { + + @RequestMapping(value = "/getH5AccessToken", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "【H5】获取AccessToken") + public ResponseData getH5AccessToken(@RequestParam(value = "code", required = true) String code) { + try { + Map params = new HashMap<>(); + params.put("appid", "wxa075e8509802f826"); + params.put("secret", "0e606fc1378d35e359fcf3f15570b2c5"); + params.put("code", code); + params.put("grant_type", "authorization_code"); + return ResponseMsgUtil.success(HttpsUtils.doGet("https://api.weixin.qq.com/sns/oauth2/access_token", params)); + + } catch (Exception e) { + return ResponseMsgUtil.exception(e); + } + } + +} From 389d7f4140b77dcc9251e7b0e6eb8210c49d40b2 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 7 Dec 2022 09:27:53 +0800 Subject: [PATCH 4/7] =?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 --- .../controller/HighDiscountController.java | 1 + .../hai/dao/HighDiscountUserRelMapper.java | 39 ++++++------ .../dao/HighDiscountUserRelSqlProvider.java | 14 +++++ .../com/hai/entity/HighDiscountUserRel.java | 16 +++++ .../entity/HighDiscountUserRelExample.java | 60 +++++++++++++++++++ .../com/hai/enum_type/DiscountPlatform.java | 55 +++++++++++++++++ .../impl/HighDiscountUserRelServiceImpl.java | 8 +++ .../web/controller/DiscountController.java | 8 ++- 8 files changed, 180 insertions(+), 21 deletions(-) create mode 100644 hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java index c7efd61b..888d5206 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java @@ -60,6 +60,7 @@ public class HighDiscountController { } if (StringUtils.isBlank(highDiscount.getDiscountName()) || StringUtils.isBlank(highDiscount.getDiscountImg()) + || highDiscount.getPlatform() == null || highDiscount.getDiscountType() == null || highDiscount.getDiscountPrice() == null || highDiscount.getEffectiveDay() == null diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java index b030bbbd..9ce4277b 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapper.java @@ -39,22 +39,22 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt int deleteByPrimaryKey(Long id); @Insert({ - "insert into high_discount_user_rel (discount_company_id, discount_id, ", - "discount_name, discount_img, ", - "discount_using_range, discount_use_scope, ", - "discount_type, discount_condition, ", - "discount_price, agent_id, ", - "discount_agent_code_id, user_id, ", - "`status`, use_time, ", + "insert into high_discount_user_rel (discount_company_id, discount_platform, ", + "discount_id, discount_name, ", + "discount_img, discount_using_range, ", + "discount_use_scope, discount_type, ", + "discount_condition, discount_price, ", + "agent_id, discount_agent_code_id, ", + "user_id, `status`, use_time, ", "create_time, use_end_time, ", "ext_1, ext_2, ext_3)", - "values (#{discountCompanyId,jdbcType=BIGINT}, #{discountId,jdbcType=BIGINT}, ", - "#{discountName,jdbcType=VARCHAR}, #{discountImg,jdbcType=VARCHAR}, ", - "#{discountUsingRange,jdbcType=INTEGER}, #{discountUseScope,jdbcType=INTEGER}, ", - "#{discountType,jdbcType=INTEGER}, #{discountCondition,jdbcType=DECIMAL}, ", - "#{discountPrice,jdbcType=DECIMAL}, #{agentId,jdbcType=BIGINT}, ", - "#{discountAgentCodeId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", - "#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", + "values (#{discountCompanyId,jdbcType=BIGINT}, #{discountPlatform,jdbcType=INTEGER}, ", + "#{discountId,jdbcType=BIGINT}, #{discountName,jdbcType=VARCHAR}, ", + "#{discountImg,jdbcType=VARCHAR}, #{discountUsingRange,jdbcType=INTEGER}, ", + "#{discountUseScope,jdbcType=INTEGER}, #{discountType,jdbcType=INTEGER}, ", + "#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ", + "#{agentId,jdbcType=BIGINT}, #{discountAgentCodeId,jdbcType=BIGINT}, ", + "#{userId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", "#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -69,6 +69,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="discount_company_id", property="discountCompanyId", jdbcType=JdbcType.BIGINT), + @Result(column="discount_platform", property="discountPlatform", jdbcType=JdbcType.INTEGER), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @@ -92,16 +93,17 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Select({ "select", - "id, discount_company_id, discount_id, discount_name, discount_img, discount_using_range, ", - "discount_use_scope, discount_type, discount_condition, discount_price, agent_id, ", - "discount_agent_code_id, user_id, `status`, use_time, create_time, use_end_time, ", - "ext_1, ext_2, ext_3", + "id, discount_company_id, discount_platform, discount_id, discount_name, discount_img, ", + "discount_using_range, discount_use_scope, discount_type, discount_condition, ", + "discount_price, agent_id, discount_agent_code_id, user_id, `status`, use_time, ", + "create_time, use_end_time, ext_1, ext_2, ext_3", "from high_discount_user_rel", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="discount_company_id", property="discountCompanyId", jdbcType=JdbcType.BIGINT), + @Result(column="discount_platform", property="discountPlatform", jdbcType=JdbcType.INTEGER), @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), @@ -135,6 +137,7 @@ public interface HighDiscountUserRelMapper extends HighDiscountUserRelMapperExt @Update({ "update high_discount_user_rel", "set discount_company_id = #{discountCompanyId,jdbcType=BIGINT},", + "discount_platform = #{discountPlatform,jdbcType=INTEGER},", "discount_id = #{discountId,jdbcType=BIGINT},", "discount_name = #{discountName,jdbcType=VARCHAR},", "discount_img = #{discountImg,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java index 6219ee6b..0c5f94cf 100644 --- a/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighDiscountUserRelSqlProvider.java @@ -32,6 +32,10 @@ public class HighDiscountUserRelSqlProvider { sql.VALUES("discount_company_id", "#{discountCompanyId,jdbcType=BIGINT}"); } + if (record.getDiscountPlatform() != null) { + sql.VALUES("discount_platform", "#{discountPlatform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); } @@ -115,6 +119,7 @@ public class HighDiscountUserRelSqlProvider { sql.SELECT("id"); } sql.SELECT("discount_company_id"); + sql.SELECT("discount_platform"); sql.SELECT("discount_id"); sql.SELECT("discount_name"); sql.SELECT("discount_img"); @@ -158,6 +163,10 @@ public class HighDiscountUserRelSqlProvider { sql.SET("discount_company_id = #{record.discountCompanyId,jdbcType=BIGINT}"); } + if (record.getDiscountPlatform() != null) { + sql.SET("discount_platform = #{record.discountPlatform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); } @@ -240,6 +249,7 @@ public class HighDiscountUserRelSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("discount_company_id = #{record.discountCompanyId,jdbcType=BIGINT}"); + sql.SET("discount_platform = #{record.discountPlatform,jdbcType=INTEGER}"); sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); @@ -272,6 +282,10 @@ public class HighDiscountUserRelSqlProvider { sql.SET("discount_company_id = #{discountCompanyId,jdbcType=BIGINT}"); } + if (record.getDiscountPlatform() != null) { + sql.SET("discount_platform = #{discountPlatform,jdbcType=INTEGER}"); + } + if (record.getDiscountId() != null) { sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); } diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java index 36c07a4a..5d2b0a27 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRel.java @@ -26,6 +26,11 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser */ private Long discountCompanyId; + /** + * 优惠券平台 平台类型 1: 嗨森逛 2:惠支付 + */ + private Integer discountPlatform; + /** * 优惠券id */ @@ -125,6 +130,14 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser this.discountCompanyId = discountCompanyId; } + public Integer getDiscountPlatform() { + return discountPlatform; + } + + public void setDiscountPlatform(Integer discountPlatform) { + this.discountPlatform = discountPlatform; + } + public Long getDiscountId() { return discountId; } @@ -283,6 +296,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser HighDiscountUserRel other = (HighDiscountUserRel) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getDiscountCompanyId() == null ? other.getDiscountCompanyId() == null : this.getDiscountCompanyId().equals(other.getDiscountCompanyId())) + && (this.getDiscountPlatform() == null ? other.getDiscountPlatform() == null : this.getDiscountPlatform().equals(other.getDiscountPlatform())) && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) && (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) && (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg())) @@ -309,6 +323,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getDiscountCompanyId() == null) ? 0 : getDiscountCompanyId().hashCode()); + result = prime * result + ((getDiscountPlatform() == null) ? 0 : getDiscountPlatform().hashCode()); result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode()); @@ -338,6 +353,7 @@ public class HighDiscountUserRel extends HighDiscountUserRelModel implements Ser sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", discountCompanyId=").append(discountCompanyId); + sb.append(", discountPlatform=").append(discountPlatform); sb.append(", discountId=").append(discountId); sb.append(", discountName=").append(discountName); sb.append(", discountImg=").append(discountImg); diff --git a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java index 5aa9dfa3..91688078 100644 --- a/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighDiscountUserRelExample.java @@ -246,6 +246,66 @@ public class HighDiscountUserRelExample { return (Criteria) this; } + public Criteria andDiscountPlatformIsNull() { + addCriterion("discount_platform is null"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformIsNotNull() { + addCriterion("discount_platform is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformEqualTo(Integer value) { + addCriterion("discount_platform =", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformNotEqualTo(Integer value) { + addCriterion("discount_platform <>", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformGreaterThan(Integer value) { + addCriterion("discount_platform >", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformGreaterThanOrEqualTo(Integer value) { + addCriterion("discount_platform >=", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformLessThan(Integer value) { + addCriterion("discount_platform <", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformLessThanOrEqualTo(Integer value) { + addCriterion("discount_platform <=", value, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformIn(List values) { + addCriterion("discount_platform in", values, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformNotIn(List values) { + addCriterion("discount_platform not in", values, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformBetween(Integer value1, Integer value2) { + addCriterion("discount_platform between", value1, value2, "discountPlatform"); + return (Criteria) this; + } + + public Criteria andDiscountPlatformNotBetween(Integer value1, Integer value2) { + addCriterion("discount_platform not between", value1, value2, "discountPlatform"); + return (Criteria) this; + } + public Criteria andDiscountIdIsNull() { addCriterion("discount_id is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java b/hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java new file mode 100644 index 00000000..0ec768e4 --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/DiscountPlatform.java @@ -0,0 +1,55 @@ +package com.hai.enum_type; + +import java.util.Objects; + +/** + * 优惠券平台类型 + */ +public enum DiscountPlatform { + HSG(1, "HSG", "嗨森逛"), + GRATIA_PAY(2, "GRATIA_PAY","惠支付"), + ; + + private Integer number; + + private String code; + + private String name; + + DiscountPlatform(int number, String code,String name) { + this.number = number; + this.code = code; + this.name = name; + } + + public static DiscountPlatform getPlatformByCode(String code) { + for (DiscountPlatform ele : values()) { + if(Objects.equals(code,ele.getCode())) return ele; + } + return null; + } + + public Integer getNumber() { + return number; + } + + public void setNumber(Integer number) { + this.number = number; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java index f3cd8466..d997906a 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountUserRelServiceImpl.java @@ -5,8 +5,10 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.dao.HighDiscountUserRelMapper; import com.hai.entity.*; +import com.hai.enum_type.DiscountPlatform; import com.hai.service.*; import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; import org.springframework.transaction.TransactionDefinition; import org.springframework.transaction.annotation.Isolation; @@ -94,6 +96,7 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic }*/ HighDiscountUserRel userRel = new HighDiscountUserRel(); + userRel.setDiscountPlatform(DiscountPlatform.getPlatformByCode(discount.getPlatform()).getNumber()); userRel.setDiscountCompanyId(discount.getCompanyId()); userRel.setDiscountId(rel.getDiscountId()); userRel.setDiscountName(discount.getDiscountName()); @@ -158,6 +161,7 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic highDiscountAgentRelService.updateDiscountAgentRel(discountAgentRel); HighDiscountUserRel userRel = new HighDiscountUserRel(); + userRel.setDiscountPlatform(DiscountPlatform.getPlatformByCode(discount.getPlatform()).getNumber()); userRel.setDiscountId(discountAgentRel.getDiscountId()); userRel.setAgentId(discountAgentRel.getAgentId()); userRel.setUserId(userId); @@ -237,6 +241,10 @@ public class HighDiscountUserRelServiceImpl implements HighDiscountUserRelServic criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId")); } + if (MapUtils.getInteger(map, "discountPlatform") != null) { + criteria.andDiscountPlatformEqualTo(MapUtils.getInteger(map, "discountPlatform")); + } + if (MapUtils.getInteger(map, "status") != null) { criteria.andStatusEqualTo(MapUtils.getInteger(map, "status")); } diff --git a/hai-user/src/main/java/com/web/controller/DiscountController.java b/hai-user/src/main/java/com/web/controller/DiscountController.java index 3e1d13a3..e59476a3 100644 --- a/hai-user/src/main/java/com/web/controller/DiscountController.java +++ b/hai-user/src/main/java/com/web/controller/DiscountController.java @@ -164,12 +164,10 @@ public class DiscountController { @RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageSize", required = true) Integer pageSize) { try { - HighUserModel userInfoModel = userCenter.getSessionModel(HighUserModel.class); if (userInfoModel == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, ""); } - Map param = new HashMap<>(); param.put("userId", userInfoModel.getHighUser().getId()); param.put("platform", platform); @@ -178,7 +176,11 @@ public class DiscountController { param.put("status", status); PageHelper.startPage(pageNum,pageSize); - return ResponseMsgUtil.success(new PageInfo<>(discountUserRelService.getDiscountList(param))); + PageInfo pageInfo = new PageInfo<>(discountUserRelService.getDiscountList(param)); + + + + return ResponseMsgUtil.success(pageInfo); } catch (Exception e) { log.error("HighDiscountController -> getUserDiscountList() error!",e); From 3ddcaff3ca7cfe45b8cae73922cc382da237be3b Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 10 Jan 2023 09:45:51 +0800 Subject: [PATCH 5/7] =?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 --- .../HighFleetOilCardCarController.java | 142 ++ .../HighFleetOilCardController.java | 453 +++++ .../HighFleetOilCardUserController.java | 177 ++ .../bweb/controller/HighGasController.java | 4 +- .../controller/HighGasOilPriceController.java | 10 +- .../HighGasOilPriceOfficialController.java | 8 +- .../HighTyAgentPriceController.java | 2 +- .../ImportFleetOilCardCarListener.java | 79 + .../ImportFleetOilCardUserListener.java | 108 ++ .../model/ImportFleetOilCardCarModel.java | 26 + .../model/ImportFleetOilCardUserModel.java | 23 + .../HighFleetOilCardController.java | 50 + .../cweb/controller/HighGasController.java | 14 +- .../cweb/controller/HighTestController.java | 2 +- .../com/web/controller/OrderController.java | 2 +- .../web/controller/OrderPayController.java | 3 + .../com/hai/schedule/HighGasSchedule.java | 7 +- .../config/HuiLianTongUnionCardConfig.java | 2 +- .../java/com/hai/config/PayloService.java | 201 +++ .../hai/dao/HighFleetOilCardCarMapper.java | 134 ++ .../hai/dao/HighFleetOilCardCarMapperExt.java | 7 + .../dao/HighFleetOilCardCarSqlProvider.java | 360 ++++ .../HighFleetOilCardContactRecordMapper.java | 122 ++ ...ighFleetOilCardContactRecordMapperExt.java | 7 + ...hFleetOilCardContactRecordSqlProvider.java | 318 ++++ .../dao/HighFleetOilCardGasStationMapper.java | 133 ++ .../HighFleetOilCardGasStationMapperExt.java | 7 + ...HighFleetOilCardGasStationSqlProvider.java | 360 ++++ .../com/hai/dao/HighFleetOilCardMapper.java | 150 ++ .../hai/dao/HighFleetOilCardMapperExt.java | 79 + .../hai/dao/HighFleetOilCardRecordMapper.java | 159 ++ .../dao/HighFleetOilCardRecordMapperExt.java | 7 + .../HighFleetOilCardRecordSqlProvider.java | 444 +++++ .../hai/dao/HighFleetOilCardSqlProvider.java | 416 +++++ .../hai/dao/HighFleetOilCardUserMapper.java | 139 ++ .../dao/HighFleetOilCardUserMapperExt.java | 7 + .../dao/HighFleetOilCardUserSqlProvider.java | 374 ++++ .../com/hai/dao/HighGasOilGunNoMapper.java | 8 +- .../hai/dao/HighGasOilGunNoSqlProvider.java | 8 +- .../com/hai/dao/HighGasOilPriceMapper.java | 28 +- .../com/hai/dao/HighGasOilPriceMapperExt.java | 2 +- .../dao/HighGasOilPriceOfficialMapper.java | 8 +- .../HighGasOilPriceOfficialSqlProvider.java | 8 +- .../hai/dao/HighGasOilPriceSqlProvider.java | 36 +- .../hai/dao/HighGasOilPriceTaskMapper.java | 8 +- .../dao/HighGasOilPriceTaskSqlProvider.java | 8 +- .../java/com/hai/entity/HighFleetOilCard.java | 326 ++++ .../com/hai/entity/HighFleetOilCardCar.java | 261 +++ .../entity/HighFleetOilCardCarExample.java | 1143 +++++++++++++ .../entity/HighFleetOilCardContactRecord.java | 213 +++ .../HighFleetOilCardContactRecordExample.java | 943 +++++++++++ .../hai/entity/HighFleetOilCardExample.java | 1394 +++++++++++++++ .../entity/HighFleetOilCardGasStation.java | 261 +++ .../HighFleetOilCardGasStationExample.java | 1123 ++++++++++++ .../hai/entity/HighFleetOilCardRecord.java | 358 ++++ .../entity/HighFleetOilCardRecordExample.java | 1504 +++++++++++++++++ .../com/hai/entity/HighFleetOilCardUser.java | 278 +++ .../entity/HighFleetOilCardUserExample.java | 1194 +++++++++++++ .../java/com/hai/entity/HighGasOilGunNo.java | 8 +- .../hai/entity/HighGasOilGunNoExample.java | 30 +- .../java/com/hai/entity/HighGasOilPrice.java | 38 +- .../hai/entity/HighGasOilPriceExample.java | 150 +- .../hai/entity/HighGasOilPriceOfficial.java | 6 +- .../HighGasOilPriceOfficialExample.java | 30 +- .../com/hai/entity/HighGasOilPriceTask.java | 6 +- .../entity/HighGasOilPriceTaskExample.java | 30 +- .../CompanyAmountSourceTypeEnum.java | 3 +- .../hai/enum_type/FleetOilCardStatusEnum.java | 36 + .../com/hai/enum_type/JinZhuJiaYouOilNo.java | 16 +- .../enum_type/MerchantStoreSourceType.java | 1 + .../java/com/hai/enum_type/UserCardType.java | 3 +- .../hai/order/service/OrderRefundService.java | 1 - .../order/service/impl/OrderPayService.java | 10 +- .../service/impl/OrderPayServiceImpl.java | 24 + .../impl/OrderPaySuccessServiceImpl.java | 14 + .../service/impl/OrderRefundServiceImpl.java | 12 +- .../java/com/hai/order/type/OrderPayType.java | 3 +- .../service/HighFleetOilCardCarService.java | 41 + .../HighFleetOilCardRecordService.java | 27 + .../hai/service/HighFleetOilCardService.java | 101 ++ .../service/HighFleetOilCardUserService.java | 62 + .../HighGasOilPriceOfficialService.java | 6 +- .../hai/service/HighGasOilPriceService.java | 4 +- .../java/com/hai/service/HighGasService.java | 6 + .../impl/HighFleetOilCardCarServiceImpl.java | 84 + .../HighFleetOilCardRecordServiceImpl.java | 91 + .../impl/HighFleetOilCardServiceImpl.java | 463 +++++ .../impl/HighFleetOilCardUserServiceImpl.java | 162 ++ .../HighGasDiscountOilPriceServiceImpl.java | 2 +- .../HighGasOilPriceOfficialServiceImpl.java | 20 +- .../impl/HighGasOilPriceServiceImpl.java | 4 +- .../impl/HighGasOilPriceTaskServiceImpl.java | 4 +- .../hai/service/impl/HighGasServiceImpl.java | 211 ++- 93 files changed, 15112 insertions(+), 245 deletions(-) create mode 100644 hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardCarController.java create mode 100644 hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardController.java create mode 100644 hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardUserController.java create mode 100644 hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardCarListener.java create mode 100644 hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardUserListener.java create mode 100644 hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardCarModel.java create mode 100644 hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardUserModel.java create mode 100644 hai-cweb/src/main/java/com/cweb/controller/HighFleetOilCardController.java create mode 100644 hai-service/src/main/java/com/hai/config/PayloService.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCard.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardCar.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardCarExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecord.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecordExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStation.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStationExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecord.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecordExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardUser.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighFleetOilCardUserExample.java create mode 100644 hai-service/src/main/java/com/hai/enum_type/FleetOilCardStatusEnum.java create mode 100644 hai-service/src/main/java/com/hai/service/HighFleetOilCardCarService.java create mode 100644 hai-service/src/main/java/com/hai/service/HighFleetOilCardRecordService.java create mode 100644 hai-service/src/main/java/com/hai/service/HighFleetOilCardService.java create mode 100644 hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardCarServiceImpl.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardRecordServiceImpl.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardCarController.java b/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardCarController.java new file mode 100644 index 00000000..7e2f1aff --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardCarController.java @@ -0,0 +1,142 @@ +package com.bweb.controller; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.fastjson.JSONObject; +import com.bweb.excelListener.ImportFleetOilCardCarListener; +import com.bweb.excelListener.ImportFleetOilCardUserListener; +import com.bweb.model.ImportFleetOilCardCarModel; +import com.bweb.model.ImportFleetOilCardUserModel; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardCar; +import com.hai.enum_type.FleetOilCardStatusEnum; +import com.hai.model.ResponseData; +import com.hai.model.UserInfoModel; +import com.hai.service.HighFleetOilCardCarService; +import com.hai.service.HighFleetOilCardService; +import com.hai.service.HighFleetOilCardUserService; +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 org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/fleetOilCardCar") +@Api(value = "车队油卡用户") +public class HighFleetOilCardCarController { + + private static Logger log = LoggerFactory.getLogger(HighFleetOilCardCarController.class); + + @Resource + private UserCenter userCenter; + + @Resource + private HighFleetOilCardCarService fleetOilCardCarService; + + @Resource + private HighFleetOilCardService fleetOilCardService; + + @RequestMapping(value = "/importData", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "导入数据") + public ResponseData importData(@RequestParam(name = "cardNo", required = true) String cardNo, + @RequestParam(value = "file" , required = false) MultipartFile files) { + try { + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + if (userModel.getBsOrganization() == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); + } + // 查询油卡 + HighFleetOilCard fleetOilCard = fleetOilCardService.getFleetOilCardByCardNo(cardNo); + if (fleetOilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到车队油卡信息"); + } + if (!fleetOilCard.getStatus().equals(FleetOilCardStatusEnum.status1.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态异常"); + } + ImportFleetOilCardCarListener fleetOilCardCarListener = new ImportFleetOilCardCarListener(); + fleetOilCardCarListener.initData(userModel, fleetOilCardCarService, fleetOilCard); + EasyExcel.read(files.getInputStream(), ImportFleetOilCardCarModel.class, fleetOilCardCarListener).sheet().doRead(); + + Map map = new HashMap<>(); + map.put("errorData", fleetOilCardCarListener.getErrorData()); + map.put("errorTotal", fleetOilCardCarListener.getErrorData().size()); + return ResponseMsgUtil.success(map); + + } catch (Exception e) { + log.error("HighFleetOilCardUserController --> importData() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/delete", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "删除") + public ResponseData delete(@RequestBody JSONObject body) { + try { + if (body.getLong("id") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + HighFleetOilCardCar cardCar = fleetOilCardCarService.getDetailById(body.getLong("id")); + if (cardCar == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + cardCar.setStatus(0); + fleetOilCardCarService.editData(cardCar); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> delete() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getCarList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询车列表") + public ResponseData getCarList(@RequestParam(name = "fleetOilCardNo", required = false) String fleetOilCardNo, + @RequestParam(name = "carLicensePlate", required = false) String carLicensePlate, + @RequestParam(name = "contactName", required = false) String contactName, + @RequestParam(name = "contactPhone", required = false) String contactPhone, + @RequestParam(name = "createTimeS", required = false) Long createTimeS, + @RequestParam(name = "createTimeE", required = false) Long createTimeE, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + Map param = new HashMap<>(); + param.put("fleetOilCardNo", fleetOilCardNo); + param.put("carLicensePlate", carLicensePlate); + param.put("contactName", contactName); + param.put("contactPhone", contactPhone); + param.put("createTimeS", createTimeS); + param.put("createTimeE", createTimeE); + param.put("status", status); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(fleetOilCardCarService.getCarList(param))); + + } catch (Exception e) { + log.error("HighOilCardController --> getCardList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardController.java b/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardController.java new file mode 100644 index 00000000..db1be7db --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardController.java @@ -0,0 +1,453 @@ +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.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.AESEncodeUtil; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.DateUtil; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighCompanyTwoPwd; +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighOilCard; +import com.hai.enum_type.OilCardStatusEnum; +import com.hai.model.OilCardOrderModel; +import com.hai.model.ResponseData; +import com.hai.model.UserInfoModel; +import com.hai.service.HighCompanyTwoPwdService; +import com.hai.service.HighFleetOilCardRecordService; +import com.hai.service.HighFleetOilCardService; +import com.hai.service.HighOilCardService; +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.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Controller +@RequestMapping(value = "/fleetOilCard") +@Api(value = "车队油卡") +public class HighFleetOilCardController { + + private static Logger log = LoggerFactory.getLogger(HighFleetOilCardController.class); + + @Resource + private UserCenter userCenter; + + @Resource + private HighFleetOilCardService fleetOilCardService; + + @Resource + private HighFleetOilCardRecordService fleetOilCardRecordService; + + @Resource + private HighCompanyTwoPwdService companyTwoPwdService; + + @RequestMapping(value = "/recharge", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "油卡充值") + public ResponseData recharge(@RequestBody JSONObject body) { + try { + if (StringUtils.isBlank(body.getString("cardNo")) || + body.getBigDecimal("price") == null || + StringUtils.isBlank(body.getString("twoPwd"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + if (userModel.getBsOrganization() == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); + } + + // 查询二级密码 + HighCompanyTwoPwd pwdByOrg = companyTwoPwdService.getTwoPwdByOrg(userModel.getBsOrganization().getId()); + if (pwdByOrg == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_TOW_PWD, ""); + } + if (!AESEncodeUtil.aesEncrypt(body.getString("twoPwd")).equals(pwdByOrg.getPassword())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付密码错误"); + } + // 充值 + fleetOilCardService.recharge(body.getString("cardNo"), body.getBigDecimal("price"), userModel.getBsOrganization().getId()); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> recharge() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/recycleAmount", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "回收余额") + public ResponseData recycleAmount(@RequestBody JSONObject body) { + try { + if (StringUtils.isBlank(body.getString("cardNo")) || + StringUtils.isBlank(body.getString("twoPwd"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + if (userModel.getBsOrganization() == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); + } + + // 查询二级密码 + HighCompanyTwoPwd pwdByOrg = companyTwoPwdService.getTwoPwdByOrg(userModel.getBsOrganization().getId()); + if (pwdByOrg == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_TOW_PWD, ""); + } + if (!AESEncodeUtil.aesEncrypt(body.getString("twoPwd")).equals(pwdByOrg.getPassword())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付密码错误"); + } + // 充值 + fleetOilCardService.recycleAmount(body.getString("cardNo")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> recharge() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/generateCard", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "生成油卡") + public ResponseData generateCard(@RequestBody JSONObject body) { + try { + if (body.getInteger("generateNum") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + if (userModel.getBsOrganization() == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); + } + + fleetOilCardService.generateCard(userModel.getBsOrganization().getId(), body.getInteger("generateNum")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> generateCard() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/disabled", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "禁用") + public ResponseData disabled(@RequestBody JSONObject body) { + try { + if (StringUtils.isBlank(body.getString("cardNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + fleetOilCardService.disabled(body.getString("cardNo")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> disabled() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/setContact", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "设置联系人") + public ResponseData setContact(@RequestBody JSONObject body) { + try { + if (StringUtils.isBlank(body.getString("cardNo")) + || StringUtils.isBlank(body.getString("contactName")) + || StringUtils.isBlank(body.getString("contactPhone"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + if (userModel.getBsOrganization() == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); + } + fleetOilCardService.setContact(body.getString("cardNo"),body.getString("contactName"),body.getString("contactPhone")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> setContact() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/enable", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "启用") + public ResponseData enable(@RequestBody JSONObject body) { + try { + if (StringUtils.isBlank(body.getString("cardNo"))) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + fleetOilCardService.enable(body.getString("cardNo")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> enable() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getCardList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询油卡列表") + public ResponseData getCardList(@RequestParam(name = "orgId", required = false) Long orgId, + @RequestParam(name = "cardNo", required = false) String cardNo, + @RequestParam(name = "contactName", required = false) String contactName, + @RequestParam(name = "contactPhone", required = false) String contactPhone, + @RequestParam(name = "createTimeS", required = false) Long createTimeS, + @RequestParam(name = "createTimeE", required = false) Long createTimeE, + @RequestParam(name = "bindTimeS", required = false) Long bindTimeS, + @RequestParam(name = "bindTimeE", required = false) Long bindTimeE, + @RequestParam(name = "isConfigContact", required = false) Boolean isConfigContact, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "bindStatus", required = false) Integer bindStatus, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + + Map param = new HashMap<>(); + param.put("companyId", userModel.getBsCompany().getId()); + + if (userModel.getSecUser().getAdminFlag() != 1) { + param.put("orgId", userModel.getBsOrganization().getId()); + } else { + param.put("orgId", orgId); + } + param.put("cardNo", cardNo); + param.put("contactName", contactName); + param.put("contactPhone", contactPhone); + param.put("createTimeS", createTimeS); + param.put("createTimeE", createTimeE); + param.put("bindTimeS", bindTimeS); + param.put("bindTimeE", bindTimeE); + param.put("isConfigContact", isConfigContact); + param.put("status", status); + param.put("bindStatus", bindStatus); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(fleetOilCardService.getFleetOilCardList(param))); + + } catch (Exception e) { + log.error("HighOilCardController --> getCardList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getRecordList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询油卡记录列表") + public ResponseData getRecordList(@RequestParam(name = "fleetOilCardNo", required = false) String fleetOilCardNo, + @RequestParam(name = "type", required = false) Integer type, + @RequestParam(name = "sourceType", required = false) Integer sourceType, + @RequestParam(name = "sourceOrderNo", required = false) String sourceOrderNo, + @RequestParam(name = "opUserType", required = false) Integer opUserType, + @RequestParam(name = "opUserPhone", required = false) String opUserPhone, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + Map param = new HashMap<>(); + param.put("fleetOilCardNo", fleetOilCardNo); + param.put("type", type); + param.put("sourceType", sourceType); + param.put("sourceOrderNo", sourceOrderNo); + param.put("opUserType", opUserType); + param.put("opUserPhone", opUserPhone); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(fleetOilCardRecordService.getRecordList(param))); + + } catch (Exception e) { + log.error("HighOilCardController --> getRecordList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getCardOrderList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询油卡订单列表") + public ResponseData getCardOrderList(@RequestParam(name = "orgId", required = false) Long orgId, + @RequestParam(name = "cardNo", required = false) String cardNo, + @RequestParam(name = "goodsName", required = false) String goodsName, + @RequestParam(name = "memPhone", required = false) String memPhone, + @RequestParam(name = "carLicensePlate", required = false) String carLicensePlate, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "payTimeS", required = false) String payTimeS, + @RequestParam(name = "payTimeE", required = false) String payTimeE, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + + Map param = new HashMap<>(); + param.put("companyId", userModel.getBsCompany().getId()); + + if (userModel.getSecUser().getAdminFlag() != 1) { + param.put("orgId", userModel.getBsOrganization().getId()); + } else { + param.put("orgId", orgId); + } + param.put("status", status); + param.put("cardNo", cardNo); + param.put("goodsName", goodsName); + param.put("memPhone", memPhone); + param.put("carLicensePlate", carLicensePlate); + param.put("payTimeS", payTimeS); + param.put("payTimeE", payTimeE); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(fleetOilCardService.getFleetOilCardOrderList(param))); + + } catch (Exception e) { + log.error("HighOilCardController --> getCardOrderList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/exportCardOrder", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "导出油卡订单") + public ResponseData exportCardOrder(@RequestParam(name = "orgId", required = false) Long orgId, + @RequestParam(name = "cardNo", required = false) String cardNo, + @RequestParam(name = "goodsName", required = false) String goodsName, + @RequestParam(name = "memPhone", required = false) String memPhone, + @RequestParam(name = "carLicensePlate", required = false) String carLicensePlate, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "payTimeS", required = false) String payTimeS, + @RequestParam(name = "payTimeE", required = false) String payTimeE, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + + Map param = new HashMap<>(); + param.put("companyId", userModel.getBsCompany().getId()); + + if (userModel.getSecUser().getAdminFlag() != 1) { + param.put("orgId", userModel.getBsOrganization().getId()); + } else { + param.put("orgId", orgId); + } + param.put("status", status); + param.put("cardNo", cardNo); + param.put("goodsName", goodsName); + param.put("carLicensePlate", carLicensePlate); + param.put("memPhone", memPhone); + param.put("payTimeS", payTimeS); + param.put("payTimeE", payTimeE); + + List cardOrderList = fleetOilCardService.getFleetOilCardOrderList(param); + List headList = new ArrayList<>(); + + if (userModel.getSecUser().getAdminFlag() == 1) { + headList.add("所属部门"); + } + headList.add("客户电话"); + headList.add("油卡卡号"); + headList.add("交易单号"); + // headList.add("团油订单号"); + headList.add("加油金额"); + headList.add("优惠金额"); + headList.add("实付金额"); + headList.add("加油站"); + headList.add("油号"); + headList.add("油枪号"); + headList.add("油站枪价"); + headList.add("平台枪价"); + headList.add("交易状态"); + headList.add("创建时间"); + headList.add("支付时间"); + headList.add("退款时间"); + + List> dataList = new ArrayList<>(); + List data; + + for (OilCardOrderModel cardOrder: cardOrderList) { + data = new ArrayList<>(); + if (userModel.getSecUser().getAdminFlag() == 1) { + data.add(cardOrder.getOrgName()); + } + data.add(cardOrder.getMerPhone()); + data.add(cardOrder.getMemCardNo()); + data.add(cardOrder.getOrderNo()); + // data.add(cardOrder.getGasOrderNo()); + data.add(cardOrder.getTotalPrice()); + data.add(cardOrder.getDeductionPrice()); + data.add(cardOrder.getPayRealPrice()); + data.add(cardOrder.getGoodsName()); + data.add(cardOrder.getGasOilNo()); + data.add(cardOrder.getGasGunNo()); + data.add(cardOrder.getGasPriceGun()); + data.add(cardOrder.getPlatformPriceGun()); + data.add(cardOrder.getStatusName()); + data.add(DateUtil.format(cardOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); + data.add(DateUtil.format(cardOrder.getPayTime(), "yyyy-MM-dd HH:mm:ss")); + if (cardOrder.getRefundTime() != null) { + data.add(DateUtil.format(cardOrder.getRefundTime(), "yyyy-MM-dd HH:mm:ss")); + } else { + data.add(""); + } + dataList.add(data); + } + + String fileUrl = SysConst.getSysConfig().getFileUrl() + "/temporary/"; + String pathName = System.currentTimeMillis()+".xlsx"; + File file = new File(fileUrl); + if (!file.exists()) { + file.mkdirs(); + } + EasyExcel.write(fileUrl+pathName).head(generationHead(headList)).sheet("油卡订单").doWrite(dataList); + + return ResponseMsgUtil.success(pathName); + + } catch (Exception e) { + log.error("HighOilCardController --> getCardOrderList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + + + /** + * 生成头部 + * @param headList + * @return + */ + private static List> generationHead(List headList) { + List> list = new ArrayList<>(); + List head; + for (String headStr : headList) { + head = new ArrayList<>(); + head.add(headStr); + list.add(head); + } + return list; + } +} diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardUserController.java b/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardUserController.java new file mode 100644 index 00000000..f18cec07 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighFleetOilCardUserController.java @@ -0,0 +1,177 @@ +package com.bweb.controller; + +import com.alibaba.excel.EasyExcel; +import com.alibaba.fastjson.JSONObject; +import com.bweb.excelListener.ImportCouponListener; +import com.bweb.excelListener.ImportFleetOilCardUserListener; +import com.bweb.model.ImportCouponModel; +import com.bweb.model.ImportFleetOilCardUserModel; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.AESEncodeUtil; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighCompanyTwoPwd; +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardUser; +import com.hai.enum_type.FleetOilCardStatusEnum; +import com.hai.enum_type.OilCardStatusEnum; +import com.hai.model.ResponseData; +import com.hai.model.UserInfoModel; +import com.hai.service.HighCompanyTwoPwdService; +import com.hai.service.HighFleetOilCardService; +import com.hai.service.HighFleetOilCardUserService; +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 org.springframework.web.multipart.MultipartFile; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/fleetOilCardUser") +@Api(value = "车队油卡用户") +public class HighFleetOilCardUserController { + + private static Logger log = LoggerFactory.getLogger(HighFleetOilCardUserController.class); + + @Resource + private UserCenter userCenter; + + @Resource + private HighFleetOilCardUserService fleetOilCardUserService; + + @Resource + private HighFleetOilCardService fleetOilCardService; + + @RequestMapping(value = "/importData", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "导入数据") + public ResponseData importData(@RequestParam(name = "cardNo", required = true) String cardNo, + @RequestParam(value = "file" , required = false) MultipartFile files) { + try { + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + if (userModel.getBsOrganization() == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "权限不足"); + } + // 查询油卡 + HighFleetOilCard fleetOilCard = fleetOilCardService.getFleetOilCardByCardNo(cardNo); + if (fleetOilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到车队油卡信息"); + } + if (!fleetOilCard.getStatus().equals(FleetOilCardStatusEnum.status1.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态异常"); + } + ImportFleetOilCardUserListener fleetOilCardUserListener = new ImportFleetOilCardUserListener(); + fleetOilCardUserListener.initData(userModel, fleetOilCard, fleetOilCardUserService); + EasyExcel.read(files.getInputStream(), ImportFleetOilCardUserModel.class, fleetOilCardUserListener).sheet().doRead(); + + Map map = new HashMap<>(); + map.put("errorData", fleetOilCardUserListener.getErrorData()); + map.put("errorTotal", fleetOilCardUserListener.getErrorData().size()); + return ResponseMsgUtil.success(map); + + } catch (Exception e) { + log.error("HighFleetOilCardUserController --> importData() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/delete", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "删除") + public ResponseData delete(@RequestBody JSONObject body) { + try { + if (body.getLong("id") == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + fleetOilCardUserService.delete(body.getLong("id")); + + return ResponseMsgUtil.success("操作成功"); + + } catch (Exception e) { + log.error("HighOilCardController --> delete() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getUserList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户列表") + public ResponseData getUserList(@RequestParam(name = "fleetOilCardNo", required = false) String fleetOilCardNo, + @RequestParam(name = "contactName", required = false) String contactName, + @RequestParam(name = "contactPhone", required = false) String contactPhone, + @RequestParam(name = "createTimeS", required = false) Long createTimeS, + @RequestParam(name = "createTimeE", required = false) Long createTimeE, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + Map param = new HashMap<>(); + param.put("fleetOilCardNo", fleetOilCardNo); + param.put("contactName", contactName); + param.put("contactPhone", contactPhone); + param.put("createTimeS", createTimeS); + param.put("createTimeE", createTimeE); + param.put("status", status); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(fleetOilCardUserService.getUserList(param))); + + } catch (Exception e) { + log.error("HighOilCardController --> getCardList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/getUserOrderList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询用户订单列表") + public ResponseData getUserOrderList(@RequestParam(name = "orgId", required = false) Long orgId, + @RequestParam(name = "cardNo", required = false) String cardNo, + @RequestParam(name = "goodsName", required = false) String goodsName, + @RequestParam(name = "status", required = false) Integer status, + @RequestParam(name = "payTimeS", required = false) String payTimeS, + @RequestParam(name = "payTimeE", required = false) String payTimeE, + @RequestParam(name = "pageNum", required = true) Integer pageNum, + @RequestParam(name = "pageSize", required = true) Integer pageSize) { + try { + + UserInfoModel userModel = userCenter.getSessionModel(UserInfoModel.class); + + Map param = new HashMap<>(); + param.put("companyId", userModel.getBsCompany().getId()); + + if (userModel.getSecUser().getAdminFlag() != 1) { + param.put("orgId", userModel.getBsOrganization().getId()); + } else { + param.put("orgId", orgId); + } + param.put("status", status); + param.put("cardNo", cardNo); + param.put("goodsName", goodsName); + param.put("payTimeS", payTimeS); + param.put("payTimeE", payTimeE); + + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>()); + + } catch (Exception e) { + log.error("HighOilCardController --> getUserOrderList() error!", e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java index 2a0b9a63..1596f0ce 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasController.java @@ -605,7 +605,7 @@ public class HighGasController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } // 查询油品价格 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (oilNo == null) { log.error("HighGasController -> disabledOil() error!",""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); @@ -631,7 +631,7 @@ public class HighGasController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } // 查询油品价格 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (oilNo == null) { log.error("HighGasController -> enableOil() error!",""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java index 984d86fe..ccc98adf 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceController.java @@ -81,18 +81,18 @@ public class HighGasOilPriceController { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油品"); } // 查询价格 - HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), Integer.valueOf(body.getString("oilNo"))); + HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (price == null) { price = new HighGasOilPrice(); // 查询国标价格 - HighGasOilPriceOfficial priceOfficial = gasOilPriceOfficialService.getPrice(store.getRegionId(), body.getInteger("oilNo")); + HighGasOilPriceOfficial priceOfficial = gasOilPriceOfficialService.getPrice(store.getRegionId(), body.getString("oilNo")); if (priceOfficial == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法添加,系统未配置"+body.getInteger("oilNo")+"油号的国标价"); } price.setMerchantStoreId(body.getLong("storeId")); price.setOilType(Integer.parseInt(oilNo.getExt1())); price.setOilTypeName(oilNo.getExt2()); - price.setOilNo(Integer.parseInt(oilNo.getCodeValue())); + price.setOilNo(oilNo.getCodeValue()); price.setOilNoName(oilNo.getCodeName()); price.setPriceOfficial(priceOfficial.getPriceOfficial()); @@ -124,7 +124,7 @@ public class HighGasOilPriceController { } // 查询价格 - HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), Integer.valueOf(body.getString("oilNo"))); + HighGasOilPrice price = gasOilPriceService.getGasOilPriceByStoreAndOilNo(body.getLong("storeId"), body.getString("oilNo")); if (price == null) { log.error("HighGasDiscountOilPriceController -> editGasOilPrice() error!","未找到油品价格"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油品价格"); @@ -149,7 +149,7 @@ public class HighGasOilPriceController { @ResponseBody @ApiOperation(value = "查询油品价格详情") public ResponseData getOilPriceDetail(@RequestParam(name = "storeId", required = true) Long storeId, - @RequestParam(name = "oilNo", required = true) Integer oilNo) { + @RequestParam(name = "oilNo", required = true) String oilNo) { try { // 查询门店详情 HighMerchantStoreModel store = merchantStoreService.getMerchantStoreById(storeId); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java index 351e4aaa..7cd57fe0 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighGasOilPriceOfficialController.java @@ -49,16 +49,16 @@ public class HighGasOilPriceOfficialController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } - HighGasOilPriceOfficial price = gasOilPriceOfficialService.getPrice(body.getLong("regionId"), body.getInteger("oilNo")); + HighGasOilPriceOfficial price = gasOilPriceOfficialService.getPrice(body.getLong("regionId"), body.getString("oilNo")); if (price == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到价格"); } price.setPriceOfficial(body.getBigDecimal("price")); - gasOilPriceOfficialService.editPrice(body.getLong("regionId"), body.getInteger("oilNo"), body.getBigDecimal("price")); + gasOilPriceOfficialService.editPrice(body.getLong("regionId"), body.getString("oilNo"), body.getBigDecimal("price")); new Thread(() -> { // 查询区域下的油品 - List list = highGasOilPriceService.getPriceListByRegionAndOilNo(body.getLong("regionId"), body.getInteger("oilNo")); + List list = highGasOilPriceService.getPriceListByRegionAndOilNo(body.getLong("regionId"), body.getString("oilNo")); for (HighGasOilPrice gasOilPrice : list) { gasOilPrice.setPriceOfficial(body.getBigDecimal("price")); highGasOilPriceService.editGasOilPrice(gasOilPrice); @@ -76,7 +76,7 @@ public class HighGasOilPriceOfficialController { @ResponseBody @ApiOperation(value = "查询油品国标价详情") public ResponseData getOilPriceOfficialDetail(@RequestParam(name = "regionId", required = true) Long regionId, - @RequestParam(name = "oilNo", required = true) Integer oilNo) { + @RequestParam(name = "oilNo", required = true) String oilNo) { try { return ResponseMsgUtil.success(gasOilPriceOfficialService.getPrice(regionId,oilNo)); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java index 4bc05ef4..993bf8db 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighTyAgentPriceController.java @@ -170,7 +170,7 @@ public class HighTyAgentPriceController { if (oilStation.getLong("oilStationId") == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, ""); } - HighGasOilPrice oilNo = gasOilPriceService.getGasOilPriceByStoreAndOilNo(oilStation.getLong("oilStationId"), body.getInteger("oilNo")); + HighGasOilPrice oilNo = gasOilPriceService.getGasOilPriceByStoreAndOilNo(oilStation.getLong("oilStationId"), body.getString("oilNo")); if (oilNo != null) { oilNo.setStatus(body.getInteger("status")); gasOilPriceService.editGasOilPrice(oilNo); diff --git a/hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardCarListener.java b/hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardCarListener.java new file mode 100644 index 00000000..b49ce0a1 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardCarListener.java @@ -0,0 +1,79 @@ +package com.bweb.excelListener; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.bweb.model.ImportFleetOilCardCarModel; +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardCar; +import com.hai.model.UserInfoModel; +import com.hai.service.HighFleetOilCardCarService; +import org.apache.commons.lang3.StringUtils; + +import java.util.*; + +public class ImportFleetOilCardCarListener extends AnalysisEventListener { + + List errorData = new ArrayList<>(); + List successData = new ArrayList<>(); + + UserInfoModel userInfoModel; + HighFleetOilCard fleetOilCard; + HighFleetOilCardCar fleetOilCardCar; + + private HighFleetOilCardCarService fleetOilCardCarService; + + /** + * @Author 胡锐 + * @Description 解析到的每一条数据都会调用此方法 + * @Date 2021/3/20 21:08 + **/ + @Override + public void invoke(ImportFleetOilCardCarModel fleetOilCardCarModel, AnalysisContext analysisContext) { + if (StringUtils.isBlank(fleetOilCardCarModel.getContactName()) + || StringUtils.isBlank(fleetOilCardCarModel.getContactPhone()) + || StringUtils.isBlank(fleetOilCardCarModel.getCarLicensePlate())) { + fleetOilCardCarModel.setErrMsg("有必填项未填写"); + errorData.add(fleetOilCardCarModel); + return; + } + + fleetOilCardCar = new HighFleetOilCardCar(); + fleetOilCardCar.setFleetOilCardId(fleetOilCard.getId()); + fleetOilCardCar.setFleetOilCardNo(fleetOilCard.getCardNo()); + fleetOilCardCar.setContactName(fleetOilCardCarModel.getContactName()); + fleetOilCardCar.setContactPhone(fleetOilCardCarModel.getContactPhone()); + fleetOilCardCar.setCarLicensePlate(fleetOilCardCarModel.getCarLicensePlate()); + fleetOilCardCar.setOpUserId(userInfoModel.getSecUser().getId()); + fleetOilCardCar.setOpUserName(userInfoModel.getSecUser().getUserName()); + fleetOilCardCar.setStatus(1); + successData.add(fleetOilCardCar); + } + + /** + * @Author 胡锐 + * @Description 所有数据解析完成了 都会来调用此方法 + * @Date 2021/3/20 21:08 + **/ + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + if (successData.size() > 0) { + try { + fleetOilCardCarService.batchInsert(successData); + } catch (Exception e) { + e.printStackTrace(); + } + } + this.successData.clear(); + } + + public List getErrorData() { + return errorData; + } + + public void initData(UserInfoModel userInfoModel, HighFleetOilCardCarService fleetOilCardCarService, HighFleetOilCard fleetOilCard){ + this.userInfoModel = userInfoModel; + this.fleetOilCardCarService = fleetOilCardCarService; + this.fleetOilCard = fleetOilCard; + } + +} diff --git a/hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardUserListener.java b/hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardUserListener.java new file mode 100644 index 00000000..207fe1dc --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/excelListener/ImportFleetOilCardUserListener.java @@ -0,0 +1,108 @@ +package com.bweb.excelListener; + +import com.alibaba.excel.context.AnalysisContext; +import com.alibaba.excel.event.AnalysisEventListener; +import com.bweb.model.ImportCouponModel; +import com.bweb.model.ImportFleetOilCardUserModel; +import com.hai.common.utils.DateUtil; +import com.hai.common.utils.MemberValidateUtil; +import com.hai.entity.HighCoupon; +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardUser; +import com.hai.model.UserInfoModel; +import com.hai.service.HighCouponCodeService; +import com.hai.service.HighFleetOilCardService; +import com.hai.service.HighFleetOilCardUserService; +import org.apache.commons.lang3.StringUtils; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + +/** + * 导入车队油卡客户 + * @className: ImportFleetOilCardUserListener + * @author: HuRui + * @date: 2022/12/19 + **/ +public class ImportFleetOilCardUserListener extends AnalysisEventListener { + + List errorData = new ArrayList<>(); + List successData = new ArrayList<>(); + List allData = new ArrayList<>(); + + UserInfoModel userInfoModel; + HighFleetOilCard fleetOilCard; + HighFleetOilCardUser fleetOilCardUser; + + private HighFleetOilCardUserService fleetOilCardUserService; + + /** + * @Author 胡锐 + * @Description 解析到的每一条数据都会调用此方法 + * @Date 2021/3/20 21:08 + **/ + @Override + public void invoke(ImportFleetOilCardUserModel fleetOilCardUserModel, AnalysisContext analysisContext) { + + if (StringUtils.isBlank(fleetOilCardUserModel.getContactName()) + || StringUtils.isBlank(fleetOilCardUserModel.getContactPhone())) { + fleetOilCardUserModel.setErrMsg("有必填项未填写"); + errorData.add(fleetOilCardUserModel); + return; + } + + if (MemberValidateUtil.validatePhone(fleetOilCardUserModel.getContactPhone()) == false) { + fleetOilCardUserModel.setErrMsg("客户电话格式校验未通过"); + errorData.add(fleetOilCardUserModel); + return; + } + + List userList = allData.stream() + .filter(o -> o.getContactPhone().equals(fleetOilCardUserModel.getContactPhone())) + .collect(Collectors.toList()); + if (userList.size() > 0) { + fleetOilCardUserModel.setErrMsg("客户电话:" + fleetOilCardUserModel.getContactPhone() + " 已存在,请勿重复录入"); + errorData.add(fleetOilCardUserModel); + return; + } + + fleetOilCardUser = new HighFleetOilCardUser(); + fleetOilCardUser.setContactName(fleetOilCardUserModel.getContactName()); + fleetOilCardUser.setContactPhone(fleetOilCardUserModel.getContactPhone()); + fleetOilCardUser.setOpUserId(userInfoModel.getSecUser().getId()); + fleetOilCardUser.setOpUserName(userInfoModel.getSecUser().getUserName()); + successData.add(fleetOilCardUser); + allData.add(fleetOilCardUser); + } + + /** + * @Author 胡锐 + * @Description 所有数据解析完成了 都会来调用此方法 + * @Date 2021/3/20 21:08 + **/ + @Override + public void doAfterAllAnalysed(AnalysisContext analysisContext) { + if (successData.size() > 0) { + try { + fleetOilCardUserService.importData(fleetOilCard, successData); + } catch (Exception e) { + e.printStackTrace(); + } + } + this.successData.clear(); + this.allData.clear(); + } + + public List getErrorData() { + return errorData; + } + + public void initData(UserInfoModel userInfoModel,HighFleetOilCard fleetOilCard, HighFleetOilCardUserService fleetOilCardUserService){ + this.userInfoModel = userInfoModel; + this.fleetOilCard = fleetOilCard; + this.fleetOilCardUserService = fleetOilCardUserService; + this.allData = this.fleetOilCardUserService.getUserListByCard(fleetOilCard.getId()); + } + +} diff --git a/hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardCarModel.java b/hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardCarModel.java new file mode 100644 index 00000000..1a2bfe92 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardCarModel.java @@ -0,0 +1,26 @@ +package com.bweb.model; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.alibaba.excel.annotation.format.DateTimeFormat; +import lombok.Data; + +/** + * @className: ImportFleetOilCardUserModel + * @author: HuRui + * @date: 2022/12/19 + **/ +@Data +public class ImportFleetOilCardCarModel { + + @ExcelProperty("车主姓名") + private String contactName; + + @ExcelProperty("车主电话") + private String contactPhone; + + @ExcelProperty("车牌号") + private String carLicensePlate; + + // 错误消息 + private String errMsg; +} diff --git a/hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardUserModel.java b/hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardUserModel.java new file mode 100644 index 00000000..e8dc8f86 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/model/ImportFleetOilCardUserModel.java @@ -0,0 +1,23 @@ +package com.bweb.model; + +import com.alibaba.excel.annotation.ExcelProperty; +import lombok.Data; + +/** + * 导入车队油卡客户 + * @className: ImportFleetOilCardUserModel + * @author: HuRui + * @date: 2022/12/19 + **/ +@Data +public class ImportFleetOilCardUserModel { + + @ExcelProperty("客户姓名") + private String contactName; + + @ExcelProperty("客户电话") + private String contactPhone; + + // 错误消息 + private String errMsg; +} diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighFleetOilCardController.java b/hai-cweb/src/main/java/com/cweb/controller/HighFleetOilCardController.java new file mode 100644 index 00000000..fdc64cc8 --- /dev/null +++ b/hai-cweb/src/main/java/com/cweb/controller/HighFleetOilCardController.java @@ -0,0 +1,50 @@ +package com.cweb.controller; + +import com.hai.common.security.UserCenter; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.model.ResponseData; +import com.hai.service.HighFleetOilCardCarService; +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.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; +import java.util.HashMap; +import java.util.Map; + +@Controller +@RequestMapping(value = "/fleetOilCard") +@Api(value = "车队油卡") +public class HighFleetOilCardController { + + private static Logger log = LoggerFactory.getLogger(HighFleetOilCardController.class); + + @Resource + private UserCenter userCenter; + + @Resource + private HighFleetOilCardCarService fleetOilCardCarService; + + @RequestMapping(value = "/getCardListByCardNo", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询车辆列表") + public ResponseData getCardListByCardNo(@RequestParam(name = "cardNo", required = true) String cardNo) { + try { + + Map param = new HashMap<>(); + param.put("fleetOilCardNo", cardNo); + + return ResponseMsgUtil.success(fleetOilCardCarService.getCarList(param)); + + } catch (Exception e) { + log.error("HighFleetOilCardController --> getCardListByCardNo() error!", e); + return ResponseMsgUtil.exception(e); + } + } +} diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java index 3aa4155b..19339b15 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighGasController.java @@ -128,7 +128,9 @@ public class HighGasController { if (StringUtils.isNotBlank(MapUtils.getString(map, "oil_no"))) { if (MapUtils.getInteger(map, "source_type").equals(1) || MapUtils.getInteger(map, "source_type").equals(3) - || MapUtils.getInteger(map, "source_type").equals(4)) { + || MapUtils.getInteger(map, "source_type").equals(4) + || MapUtils.getInteger(map, "source_type").equals(5) + ) { // 查询是否配置了【油站的】优惠比例 HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, MapUtils.getLong(map, "id"), MapUtils.getString(map, "oil_no")); if (tyAgentPrice != null) { @@ -281,7 +283,8 @@ public class HighGasController { // 来源类型 1:平台自建 2:团油 if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber()) || store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber()) - || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber())) { + || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber()) + || store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) { Map param = new HashMap<>(); param.put("provinceName", null); param.put("provinceCode", null); @@ -399,7 +402,7 @@ public class HighGasController { JSONObject price = JSON.parseObject(JSONObject.toJSONString(oilPriceObject), JSONObject.class); // 查询油站油品状态 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getString("oilNo")); if (oilNo != null && !oilNo.getStatus().equals(GasOilPriceStatusEnum.status1.getStatus())) { continue; } @@ -483,7 +486,8 @@ public class HighGasController { // 来源类型 1:平台自建 2:团油 if (store.getSourceType().equals(MerchantStoreSourceType.type1.getNumber()) || store.getSourceType().equals(MerchantStoreSourceType.type3.getNumber()) - || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber()) ) { + || store.getSourceType().equals(MerchantStoreSourceType.type4.getNumber()) + || store.getSourceType().equals(MerchantStoreSourceType.type5.getNumber())) { Map param = new HashMap<>(); param.put("provinceName", null); param.put("provinceCode", null); @@ -595,7 +599,7 @@ public class HighGasController { JSONObject price = JSON.parseObject(JSONObject.toJSONString(oilPriceObject), JSONObject.class); // 查询油站油品状态 - HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getInteger("oilNo")); + HighGasOilPrice oilNo = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), price.getString("oilNo")); if (oilNo != null && !oilNo.getStatus().equals(GasOilPriceStatusEnum.status1.getStatus())) { continue; } diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index 057fd7f5..f110b90a 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -1 +1 @@ -package com.cweb.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.bouncycastle.util.encoders.UrlBase64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.IdGenerator; import org.springframework.web.bind.annotation.*; import sun.nio.cs.StreamEncoder; import javax.annotation.Resource; import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Autowired private UserCenter userCenter; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private BaiduVoiceService baiduVoiceService; @Resource private ShellGroupService shellGroupService; @Resource private HighGasService gasService; @Resource private BsMsgService bsMsgService; @RequestMapping(value = "/queryGasInfoByGasId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据油站 id 拉取最新的油站数据") public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId, HttpServletRequest request) { try { return ResponseMsgUtil.success(TuanYouConfig.queryGasInfoByGasId(gasId)); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardInfo() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/initTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "初始化加油站") public ResponseData initTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } JSONObject jsonObjectP = TuanYouConfig.queryGasInfoListByPage(1, 1000); JSONObject resultObjectP = jsonObjectP.getObject("result", JSONObject.class); for (int i = 1; i <= resultObjectP.getInteger("totalPageNum").intValue(); i++) { JSONObject jsonObject = TuanYouConfig.queryGasInfoListByPage(i, 1000); JSONObject resultObject = jsonObject.getObject("result", JSONObject.class); JSONArray jsonArray = resultObject.getJSONArray("gasInfoList"); HighMerchantStore highMerchantStore; HighGasOilPrice highGasOilPrice; for (Object gasObject : jsonArray) { JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(gasObject)); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("gasId")); if (store != null) { store.setType(1); store.setMerchantId(merchant.getId()); store.setCompanyId(merchant.getCompanyId()); store.setStoreKey(object.getString("gasId")); store.setStoreName(object.getString("gasName")); store.setStoreLogo(object.getString("gasLogoSmall")); store.setRegionId(object.getLong("provinceCode")); store.setRegionName(object.getString("provinceName")); store.setAddress(object.getString("gasAddress")); store.setLongitude(object.getString("gasAddressLongitude")); store.setLatitude(object.getString("gasAddressLatitude")); store.setStatus(object.getInteger("gasStatus")); store.setOperatorId(0L); store.setOperatorName("系统创建"); store.setUpdateTime(new Date()); store.setExt1(object.getString("gasSourceId")); highMerchantStoreService.updateMerchantStoreDetail(store); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } else { highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } else { highMerchantStore = new HighMerchantStore(); highMerchantStore.setType(1); highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setCompanyId(merchant.getCompanyId()); highMerchantStore.setStoreKey(object.getString("gasId")); highMerchantStore.setStoreName(object.getString("gasName")); highMerchantStore.setStoreLogo(object.getString("gasLogoSmall")); highMerchantStore.setRegionId(object.getLong("provinceCode")); highMerchantStore.setRegionName(object.getString("provinceName")); highMerchantStore.setAddress(object.getString("gasAddress")); highMerchantStore.setLongitude(object.getString("gasAddressLongitude")); highMerchantStore.setLatitude(object.getString("gasAddressLatitude")); highMerchantStore.setStatus(1); highMerchantStore.setOperatorId(0L); highMerchantStore.setOperatorName("系统创建"); highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setExt1(object.getString("gasSourceId")); HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); BeanUtils.copyProperties(highMerchantStore, merchantStoreModel); highMerchantStoreService.insertMerchantStore(merchantStoreModel); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } } } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/detectTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "检测加油站") public ResponseData detectTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } Map param = new HashMap<>(); param.put("merchantId", merchant.getId()); List stores = highMerchantStoreService.getMerchantStoreList(param); for (HighMerchantStore store : stores) { JSONObject jsonObject = TuanYouConfig.queryGasInfoByGasId(store.getStoreKey()); if (jsonObject != null && jsonObject.getString("code").equals("200")) { JSONObject result = jsonObject.getJSONObject("result"); store.setStatus(result.getInteger("gasStatus")); } else { store.setStatus(0); } highMerchantStoreService.updateMerchantStoreDetail(store); } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/queryCompanyAccountInfo2JD", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyAccountInfo2JD() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyAccountInfo2JD()); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCompanyPriceDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyPriceDetail() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyPriceDetail("LW000115995", "92")); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrdersPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "星巴克支付") public ResponseData starbucksOrdersPay(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrdersPay(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payKfcOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "肯德基支付") public ResponseData payKfcOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/wxSplitAccount", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "微信分账") public ResponseData wxSplitAccount() { try { HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); wxProfitsharing(orderNo.getOrderNo(), orderNo.getPaySerialNo(), orderNo.getPayRealPrice()); return ResponseMsgUtil.success("分账成功"); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryStaging", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "分期查询") public ResponseData queryStaging(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.queryStaging(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/orderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "退款") public ResponseData orderToRefund(HttpServletRequest request) { try { OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund("4200001301202202035413938093", new BigDecimal("30.80"), new BigDecimal("16.90")); return ResponseMsgUtil.success(orderRefundModel); } catch (Exception e) { log.error("HighOrderController --> orderToRefund() error!", e); return ResponseMsgUtil.exception(e); } }*/ @RequestMapping(value = "/query", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData query(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.query(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } public void wxProfitsharing(String transaction_id, String out_order_no, BigDecimal amount) { try { Map param = new LinkedHashMap<>(); param.put("appid", "wx637bd6f7314daa46"); param.put("mch_id", "1289663601"); param.put("sub_mch_id", "1609882817"); // 个体户黎杨珍 param.put("transaction_id", transaction_id); param.put("out_order_no", out_order_no); param.put("nonce_str", WxUtils.makeNonStr()); // 分账金额 BigDecimal porofitSharingAmount = amount; List> receiversList = new ArrayList<>(); Map receiversMap = new LinkedHashMap<>(); receiversMap.put("type", "MERCHANT_ID"); receiversMap.put("account", "1603942866"); receiversMap.put("amount", porofitSharingAmount.multiply(new BigDecimal("100")).intValue()); receiversMap.put("description", "分给商户【惠昕石化】"); receiversList.add(receiversMap); param.put("receivers", JSONObject.toJSONString(receiversList)); String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); param.put("sign", signStr); String resultXmL = this.doRefundRequest(param.get("mch_id"), null, WxUtils.mapToXml(param)); // 请求分账返回的结果 ResultProfitSharing resultProfitSharing = XmlUtil.getObjectFromXML(resultXmL, ResultProfitSharing.class); if (!resultProfitSharing.getResult_code().equals("FAIL")) { HighProfitSharingRecord sharingRecord = new HighProfitSharingRecord(); sharingRecord.setOutOrderNo(resultProfitSharing.getOut_order_no()); sharingRecord.setTransactionId(resultProfitSharing.getTransaction_id()); sharingRecord.setOrderId(resultProfitSharing.getOrder_id()); sharingRecord.setStatus(resultProfitSharing.getResult_code()); sharingRecord.setPrice(amount); sharingRecord.setCreateTime(new Date()); sharingRecord.setContent(resultXmL); highProfitSharingRecordService.insert(sharingRecord); } } catch (Exception e) { log.error("CmsContentController --> getCorporateAdvertising() error!", e); } } public CloseableHttpClient readCertificate(String mchId) throws Exception { /** * 注意PKCS12证书 是从微信商户平台-》账户设置-》 API安全 中下载的 */ KeyStore keyStore = KeyStore.getInstance("PKCS12"); //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12"); // FileInputStream instream = new FileInputStream("G:\\hurui-project/hai-parent/hai-service/src/main/java/privatekey/1289663601_apiclient_cert.p12"); try { keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID } finally { instream.close(); } SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier()); // Allow TLSv1 protocol only return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } public String doRefundRequest(String mchId, String url, String data) throws Exception { //小程序退款需要调用双向证书的认证 CloseableHttpClient httpClient = readCertificate(mchId); try { HttpPost httpost = new HttpPost("https://api.mch.weixin.qq.com/secapi/pay/profitsharing"); // 设置响应头信息 httpost.addHeader("Connection", "keep-alive"); httpost.addHeader("Accept", "*/*"); httpost.addHeader("Content-Type", "text/xml"); httpost.addHeader("Host", "api.mch.weixin.qq.com"); httpost.addHeader("X-Requested-With", "XMLHttpRequest"); httpost.addHeader("Cache-Control", "max-age=0"); httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); httpost.setEntity(new StringEntity(data, "UTF-8")); CloseableHttpResponse response = httpClient.execute(httpost); try { HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8"); EntityUtils.consume(entity); return jsonStr; } finally { response.close(); } } catch (Exception e) { throw new RuntimeException(e); } finally { httpClient.close(); } } @RequestMapping(value = "/websocket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "websocket") public ResponseData websocket(@RequestParam(name = "orderNo", required = true) String orderNo ) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { Map pushMsg = new HashMap<>(); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); Map msgContent = new HashMap<>(); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + order.getTotalPrice())); pushMsg.put("message", JSONObject.toJSONString(msgContent)); HttpsUtils.doPost("http://127.0.0.1:9901/msg/test/websocket", pushMsg, new HashMap<>()); } return ResponseMsgUtil.success("null"); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasStationQueryDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasStationQueryDetail") public ResponseData gasStationQueryDetail() { try { return ResponseMsgUtil.success(shellGroupService.gasStationQueryDetail("0001")); } catch (Exception e) { log.error("HighOrderController --> gasStationQueryDetail() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasPageQueryAllStation", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasPageQueryAllStation") public ResponseData gasPageQueryAllStation() { try { gasService.getJiaHaoYouAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasPageQueryAllStation() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasSyncRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasSyncRefund") public ResponseData gasSyncRefund() { try { shellGroupService.gasSyncRefund(new Date(1659511289000L), "1659511289357"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getJzStationListPage", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "getJzStationListPage") public ResponseData getJzStationListPage() { try { gasService.getJinZhuAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/insertV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData insertV2() { try { String orderNo = "HF2022080818504922206"; JSONObject object = QianZhuConfig.insertV2("PLM100024", orderNo, "15585850137"); object.put("orderNo", orderNo); return ResponseMsgUtil.success(object); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/QueryV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单号") public ResponseData QueryV2(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject orderObject = QianZhuConfig.QueryV2(orderNo); if (orderObject != null && orderObject.getLong("Code") == 999) { // 订单失败 // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 3) { // 订单失败 if (order.getOrderStatus() == 2) { highOrderService.thirdOrderToRefund(order.getId()); } else { highOrderService.thirdCancelOrder(order.getId()); } } // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 2) { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrdeStatus(3); } order.setOrderStatus(3); order.setFinishTime(new Date()); highOrderService.updateOrder(order); } } return ResponseMsgUtil.success(QianZhuConfig.QueryV2(orderNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } */ @RequestMapping(value = "/getKfcOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基订单") public ResponseData getKfcOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.getKfcOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克订单") public ResponseData starbucksOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/thirdOrderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "第三方退款") public ResponseData thirdOrderToRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); highOrderService.thirdOrderToRefund(order.getId()); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rechargeOrderByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇话费充值 ") public ResponseData rechargeOrderByCy() { try { JSONObject object = new JSONObject(); object.put("mobile" , "18090580471"); object.put("productId" , 172); object.put("agentOrderId" , "RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); return ResponseMsgUtil.success(RechargeConfig.rechargeOrderByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryRechargeByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇查询订单") public ResponseData queryRechargeByCy(@RequestParam(name = "orderNo", required = true) String orderNo) { try { JSONObject object = new JSONObject(); object.put("orderNo" , orderNo); return ResponseMsgUtil.success(RechargeConfig.queryRechargeByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postIp", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "请求ip地址") public ResponseData postIp(HttpServletRequest request) { try { request.getHeader("regionId"); if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { System.out.println("111"); } return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/brest/openApi/test")); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/testMsg", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试站内信") public ResponseData testMsg(HttpServletRequest request) { try { bsMsgService.pushUserMsg(71465L , "支付成功"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file +package com.cweb.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.bouncycastle.util.encoders.UrlBase64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.IdGenerator; import org.springframework.web.bind.annotation.*; import sun.nio.cs.StreamEncoder; import javax.annotation.Resource; import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Autowired private UserCenter userCenter; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private BaiduVoiceService baiduVoiceService; @Resource private ShellGroupService shellGroupService; @Resource private HighGasService gasService; @Resource private BsMsgService bsMsgService; @RequestMapping(value = "/queryGasInfoByGasId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据油站 id 拉取最新的油站数据") public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId, HttpServletRequest request) { try { return ResponseMsgUtil.success(TuanYouConfig.queryGasInfoByGasId(gasId)); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardInfo() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/initTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "初始化加油站") public ResponseData initTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } JSONObject jsonObjectP = TuanYouConfig.queryGasInfoListByPage(1, 1000); JSONObject resultObjectP = jsonObjectP.getObject("result", JSONObject.class); for (int i = 1; i <= resultObjectP.getInteger("totalPageNum").intValue(); i++) { JSONObject jsonObject = TuanYouConfig.queryGasInfoListByPage(i, 1000); JSONObject resultObject = jsonObject.getObject("result", JSONObject.class); JSONArray jsonArray = resultObject.getJSONArray("gasInfoList"); HighMerchantStore highMerchantStore; HighGasOilPrice highGasOilPrice; for (Object gasObject : jsonArray) { JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(gasObject)); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("gasId")); if (store != null) { store.setType(1); store.setMerchantId(merchant.getId()); store.setCompanyId(merchant.getCompanyId()); store.setStoreKey(object.getString("gasId")); store.setStoreName(object.getString("gasName")); store.setStoreLogo(object.getString("gasLogoSmall")); store.setRegionId(object.getLong("provinceCode")); store.setRegionName(object.getString("provinceName")); store.setAddress(object.getString("gasAddress")); store.setLongitude(object.getString("gasAddressLongitude")); store.setLatitude(object.getString("gasAddressLatitude")); store.setStatus(object.getInteger("gasStatus")); store.setOperatorId(0L); store.setOperatorName("系统创建"); store.setUpdateTime(new Date()); store.setExt1(object.getString("gasSourceId")); highMerchantStoreService.updateMerchantStoreDetail(store); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } else { highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } else { highMerchantStore = new HighMerchantStore(); highMerchantStore.setType(1); highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setCompanyId(merchant.getCompanyId()); highMerchantStore.setStoreKey(object.getString("gasId")); highMerchantStore.setStoreName(object.getString("gasName")); highMerchantStore.setStoreLogo(object.getString("gasLogoSmall")); highMerchantStore.setRegionId(object.getLong("provinceCode")); highMerchantStore.setRegionName(object.getString("provinceName")); highMerchantStore.setAddress(object.getString("gasAddress")); highMerchantStore.setLongitude(object.getString("gasAddressLongitude")); highMerchantStore.setLatitude(object.getString("gasAddressLatitude")); highMerchantStore.setStatus(1); highMerchantStore.setOperatorId(0L); highMerchantStore.setOperatorName("系统创建"); highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setExt1(object.getString("gasSourceId")); HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); BeanUtils.copyProperties(highMerchantStore, merchantStoreModel); highMerchantStoreService.insertMerchantStore(merchantStoreModel); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } } } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/detectTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "检测加油站") public ResponseData detectTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } Map param = new HashMap<>(); param.put("merchantId", merchant.getId()); List stores = highMerchantStoreService.getMerchantStoreList(param); for (HighMerchantStore store : stores) { JSONObject jsonObject = TuanYouConfig.queryGasInfoByGasId(store.getStoreKey()); if (jsonObject != null && jsonObject.getString("code").equals("200")) { JSONObject result = jsonObject.getJSONObject("result"); store.setStatus(result.getInteger("gasStatus")); } else { store.setStatus(0); } highMerchantStoreService.updateMerchantStoreDetail(store); } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/queryCompanyAccountInfo2JD", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyAccountInfo2JD() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyAccountInfo2JD()); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCompanyPriceDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyPriceDetail() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyPriceDetail("LW000115995", "92")); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrdersPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "星巴克支付") public ResponseData starbucksOrdersPay(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrdersPay(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payKfcOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "肯德基支付") public ResponseData payKfcOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/wxSplitAccount", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "微信分账") public ResponseData wxSplitAccount() { try { HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); wxProfitsharing(orderNo.getOrderNo(), orderNo.getPaySerialNo(), orderNo.getPayRealPrice()); return ResponseMsgUtil.success("分账成功"); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryStaging", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "分期查询") public ResponseData queryStaging(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.queryStaging(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/orderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "退款") public ResponseData orderToRefund(HttpServletRequest request) { try { OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund("4200001301202202035413938093", new BigDecimal("30.80"), new BigDecimal("16.90")); return ResponseMsgUtil.success(orderRefundModel); } catch (Exception e) { log.error("HighOrderController --> orderToRefund() error!", e); return ResponseMsgUtil.exception(e); } }*/ @RequestMapping(value = "/query", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData query(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.query(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } public void wxProfitsharing(String transaction_id, String out_order_no, BigDecimal amount) { try { Map param = new LinkedHashMap<>(); param.put("appid", "wx637bd6f7314daa46"); param.put("mch_id", "1289663601"); param.put("sub_mch_id", "1609882817"); // 个体户黎杨珍 param.put("transaction_id", transaction_id); param.put("out_order_no", out_order_no); param.put("nonce_str", WxUtils.makeNonStr()); // 分账金额 BigDecimal porofitSharingAmount = amount; List> receiversList = new ArrayList<>(); Map receiversMap = new LinkedHashMap<>(); receiversMap.put("type", "MERCHANT_ID"); receiversMap.put("account", "1603942866"); receiversMap.put("amount", porofitSharingAmount.multiply(new BigDecimal("100")).intValue()); receiversMap.put("description", "分给商户【惠昕石化】"); receiversList.add(receiversMap); param.put("receivers", JSONObject.toJSONString(receiversList)); String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); param.put("sign", signStr); String resultXmL = this.doRefundRequest(param.get("mch_id"), null, WxUtils.mapToXml(param)); // 请求分账返回的结果 ResultProfitSharing resultProfitSharing = XmlUtil.getObjectFromXML(resultXmL, ResultProfitSharing.class); if (!resultProfitSharing.getResult_code().equals("FAIL")) { HighProfitSharingRecord sharingRecord = new HighProfitSharingRecord(); sharingRecord.setOutOrderNo(resultProfitSharing.getOut_order_no()); sharingRecord.setTransactionId(resultProfitSharing.getTransaction_id()); sharingRecord.setOrderId(resultProfitSharing.getOrder_id()); sharingRecord.setStatus(resultProfitSharing.getResult_code()); sharingRecord.setPrice(amount); sharingRecord.setCreateTime(new Date()); sharingRecord.setContent(resultXmL); highProfitSharingRecordService.insert(sharingRecord); } } catch (Exception e) { log.error("CmsContentController --> getCorporateAdvertising() error!", e); } } public CloseableHttpClient readCertificate(String mchId) throws Exception { /** * 注意PKCS12证书 是从微信商户平台-》账户设置-》 API安全 中下载的 */ KeyStore keyStore = KeyStore.getInstance("PKCS12"); //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12"); // FileInputStream instream = new FileInputStream("G:\\hurui-project/hai-parent/hai-service/src/main/java/privatekey/1289663601_apiclient_cert.p12"); try { keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID } finally { instream.close(); } SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier()); // Allow TLSv1 protocol only return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } public String doRefundRequest(String mchId, String url, String data) throws Exception { //小程序退款需要调用双向证书的认证 CloseableHttpClient httpClient = readCertificate(mchId); try { HttpPost httpost = new HttpPost("https://api.mch.weixin.qq.com/secapi/pay/profitsharing"); // 设置响应头信息 httpost.addHeader("Connection", "keep-alive"); httpost.addHeader("Accept", "*/*"); httpost.addHeader("Content-Type", "text/xml"); httpost.addHeader("Host", "api.mch.weixin.qq.com"); httpost.addHeader("X-Requested-With", "XMLHttpRequest"); httpost.addHeader("Cache-Control", "max-age=0"); httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); httpost.setEntity(new StringEntity(data, "UTF-8")); CloseableHttpResponse response = httpClient.execute(httpost); try { HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8"); EntityUtils.consume(entity); return jsonStr; } finally { response.close(); } } catch (Exception e) { throw new RuntimeException(e); } finally { httpClient.close(); } } @RequestMapping(value = "/websocket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "websocket") public ResponseData websocket(@RequestParam(name = "orderNo", required = true) String orderNo ) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { Map pushMsg = new HashMap<>(); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); Map msgContent = new HashMap<>(); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + order.getTotalPrice())); pushMsg.put("message", JSONObject.toJSONString(msgContent)); HttpsUtils.doPost("http://127.0.0.1:9901/msg/test/websocket", pushMsg, new HashMap<>()); } return ResponseMsgUtil.success("null"); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasStationQueryDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasStationQueryDetail") public ResponseData gasStationQueryDetail() { try { return ResponseMsgUtil.success(shellGroupService.gasStationQueryDetail("0001")); } catch (Exception e) { log.error("HighOrderController --> gasStationQueryDetail() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasPageQueryAllStation", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasPageQueryAllStation") public ResponseData gasPageQueryAllStation() { try { gasService.getJiaHaoYouAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasPageQueryAllStation() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasSyncRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasSyncRefund") public ResponseData gasSyncRefund() { try { shellGroupService.gasSyncRefund(new Date(1659511289000L), "1659511289357"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getJzStationListPage", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "getJzStationListPage") public ResponseData getJzStationListPage() { try { gasService.getJinZhuAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/insertV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData insertV2() { try { String orderNo = "HF2022080818504922206"; JSONObject object = QianZhuConfig.insertV2("PLM100024", orderNo, "15585850137"); object.put("orderNo", orderNo); return ResponseMsgUtil.success(object); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/QueryV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单号") public ResponseData QueryV2(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject orderObject = QianZhuConfig.QueryV2(orderNo); if (orderObject != null && orderObject.getLong("Code") == 999) { // 订单失败 // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 3) { // 订单失败 if (order.getOrderStatus() == 2) { highOrderService.thirdOrderToRefund(order.getId()); } else { highOrderService.thirdCancelOrder(order.getId()); } } // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 2) { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrdeStatus(3); } order.setOrderStatus(3); order.setFinishTime(new Date()); highOrderService.updateOrder(order); } } return ResponseMsgUtil.success(QianZhuConfig.QueryV2(orderNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } */ @RequestMapping(value = "/getKfcOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基订单") public ResponseData getKfcOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.getKfcOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克订单") public ResponseData starbucksOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/thirdOrderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "第三方退款") public ResponseData thirdOrderToRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); highOrderService.thirdOrderToRefund(order.getId()); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rechargeOrderByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇话费充值 ") public ResponseData rechargeOrderByCy() { try { JSONObject object = new JSONObject(); object.put("mobile" , "18090580471"); object.put("productId" , 172); object.put("agentOrderId" , "RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); return ResponseMsgUtil.success(RechargeConfig.rechargeOrderByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryRechargeByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇查询订单") public ResponseData queryRechargeByCy(@RequestParam(name = "orderNo", required = true) String orderNo) { try { JSONObject object = new JSONObject(); object.put("orderNo" , orderNo); return ResponseMsgUtil.success(RechargeConfig.queryRechargeByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postIp", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "请求ip地址") public ResponseData postIp(HttpServletRequest request) { try { request.getHeader("regionId"); if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { System.out.println("111"); } return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/brest/openApi/test")); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/testMsg", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试站内信") public ResponseData testMsg(HttpServletRequest request) { try { bsMsgService.pushUserMsg(71465L , "支付成功"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file diff --git a/hai-order/src/main/java/com/web/controller/OrderController.java b/hai-order/src/main/java/com/web/controller/OrderController.java index f6e70131..f31f7d09 100644 --- a/hai-order/src/main/java/com/web/controller/OrderController.java +++ b/hai-order/src/main/java/com/web/controller/OrderController.java @@ -42,7 +42,7 @@ import java.util.Map; @Api(value = "订单业务") public class OrderController { - private static Logger log = LoggerFactory.getLogger(OrderController.class); + private static final Logger log = LoggerFactory.getLogger(OrderController.class); @Resource private OrderService orderService; diff --git a/hai-order/src/main/java/com/web/controller/OrderPayController.java b/hai-order/src/main/java/com/web/controller/OrderPayController.java index 1828ad0d..82cad564 100644 --- a/hai-order/src/main/java/com/web/controller/OrderPayController.java +++ b/hai-order/src/main/java/com/web/controller/OrderPayController.java @@ -294,6 +294,9 @@ public class OrderPayController { } else if (userCard.getType().equals(UserCardType.type2.getType())) { return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard)); + } else if (userCard.getType().equals(UserCardType.type3.getType())) { + return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard)); + } else { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的卡号类型"); } diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java index cab823fc..8a1b5343 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; +import com.hai.config.PayloService; import com.hai.config.TuanYouConfig; import com.hai.entity.HighGasOilPrice; import com.hai.entity.HighGasOilPriceOfficial; @@ -41,7 +42,6 @@ public class HighGasSchedule { @Resource private HighGasService gasService; - @Scheduled(cron = "0 0 1 * * ?") //每日凌晨1点执行一次 public void certification() throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(39L); @@ -156,6 +156,11 @@ public class HighGasSchedule { gasService.getJiaHaoYouAllStation(); } + @Scheduled(cron = "10 0 0 * * ?") // 每日凌晨00:00:10执行一次 + public void getPayloAllStation() throws Exception { + gasService.getPayloAllStation(); + } + /* @Scheduled(cron = "0 1 0 * * ?") //每日凌晨12点01分执行一次 public void getJinZhuAllStation() throws Exception { gasService.getJinZhuAllStation(); diff --git a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java index 1fc6f523..bed6c3c0 100644 --- a/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java +++ b/hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java @@ -307,7 +307,7 @@ public class HuiLianTongUnionCardConfig { public static void main(String[] args) { // {"respMessage":"ok","data":"Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu","sign":"47186141FD8B3FB6CCB590F58321D9C6","respCode":"0000","responseId":"1669202185936"} - String data = "Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\nyj/wi/UNr8TDne094+yu".replace("\\n", ""); + String data = "Gbkl57c3fEBg+E3HfPuQ580JLkHaQPyf1P7My1oYOyJSIG4i8jYxovGVk4V8Rk58mjDswB8Vpy4E\\nyj/wi/UNr8TDne094+yu".replace("\\n", ""); String decodeData = DesUtil.decode("F8E91A3C", data, Charset.forName("UTF-8")); System.out.println(JSONObject.parseObject(decodeData)); diff --git a/hai-service/src/main/java/com/hai/config/PayloService.java b/hai-service/src/main/java/com/hai/config/PayloService.java new file mode 100644 index 00000000..c67c1207 --- /dev/null +++ b/hai-service/src/main/java/com/hai/config/PayloService.java @@ -0,0 +1,201 @@ +package com.hai.config; + +import com.alibaba.fastjson.JSONObject; +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.utils.DateUtil; +import com.hai.common.utils.HttpsUtils; +import com.hai.common.utils.MD5Util; +import com.hai.enum_type.TripartiteReqLogReqType; +import com.hai.enum_type.TripartiteReqLogType; +import com.hai.service.BsTripartiteReqLogService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Component; + +import javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.*; + +/** + * 延长壳牌(四川)石油公司 paylo系统 + * @className: PayloService + * @author: HuRui + * @date: 2022/12/7 + **/ +@Component +public class PayloService { + + private static final String partnerId = "S0302207281600105753"; + private static final String ShellPlatMerchantKey = "wqisfmkzea6mwd7ogbyh3488jv0hqhdj"; + + @Resource + private BsTripartiteReqLogService reqLogService; + + /** + * 查询全量加油站 + * @param pageNum 当前页码 + * @param pageSize 每页数据量。最大值50 + * @return + */ + public JSONObject ycShellPageQueryAllStation(Integer pageNum, Integer pageSize) throws Exception { + Map param = new HashMap<>(); + param.put("pageNo", pageNum); + param.put("pageSize", pageSize); + return request(System.currentTimeMillis()+"","ycShellPageQueryAllStation", param); + } + + /** + * 查询单个油站全量信息 + * @param stationCode 油站编码 + * @return + */ + public JSONObject ycShellStationQueryDetail(String stationCode) { + try { + Map param = new HashMap<>(); + param.put("stationCode", stationCode); + return request(System.currentTimeMillis()+"","ycShellStationQueryDetail", param); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + + /** + * 【同步】油站付款 + * @param orderNo 订单号 + * @param stationCode 油站编码 + * @param finishTime 完成时间 + * @param oilPrice 加油金额 + * @param oilCode 油品编码 + * @param oilGun 油枪 + * @param settlementAmount 支付金额 + * @param channelFavourAmount 优惠金额 + * @return + */ + public JSONObject syncYcShellPaymentNotify(String orderNo, + String stationCode, + Date finishTime, + BigDecimal oilPrice, + String oilCode, + String oilGun, + BigDecimal settlementAmount, + BigDecimal channelFavourAmount) { + try { + Map param = new HashMap<>(); + param.put("stationCode", stationCode); + param.put("orderType", "OIL"); + param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss")); + param.put("channelFavourAmount", channelFavourAmount); + + Map tradeOilOrder = new HashMap<>(); + tradeOilOrder.put("amount", oilPrice); + tradeOilOrder.put("code", oilCode); + tradeOilOrder.put("oilGun", oilGun); + tradeOilOrder.put("channelSettlementAmount", settlementAmount); + param.put("tradeOilOrder", JSONObject.toJSONString(tradeOilOrder)); + return request(orderNo, "syncYcShellPaymentNotify", param); + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } + + /** + * 【同步】油站退款 + * @param finishTime 业务完成时间 + * @param tradeNo 交易流水号 + * @return + */ + public JSONObject syncYcShellRefundNotify(Date finishTime,String tradeNo) throws Exception { + Map param = new HashMap<>(); + param.put("finishTime", DateUtil.date2String(finishTime, "yyyy-MM-dd HH:mm:ss")); + param.put("tradeNo", tradeNo); + // 请求接口 + return request(System.currentTimeMillis()+"" ,"syncYcShellRefundNotify", param); + } + + /** + * 接口请求 + * @param map + * @return + * @throws Exception + */ + private JSONObject request(String logSerialNo, String service, Map map) throws Exception { + Map param = new HashMap<>(); + param.put("merchantOrderNo", logSerialNo); + param.put("partnerId", partnerId); + param.put("service", service); + param.put("version", "1.0.0"); + param.put("signType", "MD5"); + + for (Map.Entry entry : map.entrySet()) { + param.put(entry.getKey(), entry.getValue()); + } + param.put("sign", MD5Util.encode(generateSignature(param, ShellPlatMerchantKey).getBytes()).toLowerCase()); + + // 请求接口 + JSONObject object = HttpsUtils.doPost(CommonSysConst.getSysConfig().getShellGroupUrl(), param); + reqLogService.insert( + TripartiteReqLogType.type2, + logSerialNo, + TripartiteReqLogReqType.type1, + CommonSysConst.getSysConfig().getShellGroupUrl(), + this.generateParam(param), + object.toString() + ); + + if (object == null || !object.getString("status").equals("SUCCESS")) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, object == null?"请求失败":object.getString("message")); + } + return object; + } + + /** + * 生成签名 + * @param data 数据 + * @param key 秘钥app_secret + * @return 加密结果 + */ + public static String generateSignature(final Map data, String key) { + Set keySet = data.keySet(); + String[] keyArray = keySet.toArray(new String[keySet.size()]); + Arrays.sort(keyArray); + StringBuilder sb = new StringBuilder(); + for (String k : keyArray) { + if (data.get(k) != null) { + if (StringUtils.isBlank(sb.toString())) { + sb.append(k).append("=").append(data.get(k)); + } else { + sb.append("&").append(k).append("=").append(data.get(k)); + } + } + } + sb.append(key); + return sb.toString(); + } + + /** + * 生成参数 + * @param data 数据 + * @return 加密结果 + */ + public static String generateParam(final Map data) { + Set keySet = data.keySet(); + String[] keyArray = keySet.toArray(new String[keySet.size()]); + StringBuilder sb = new StringBuilder(); + for (String k : keyArray) { + if (data.get(k) != null) { + if (StringUtils.isBlank(sb.toString())) { + sb.append(k).append("=").append(data.get(k)); + } else { + sb.append("&").append(k).append("=").append(data.get(k)); + } + } + } + return sb.toString(); + } + + +} diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapper.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapper.java new file mode 100644 index 00000000..c2d2427b --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapper.java @@ -0,0 +1,134 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardCar; +import com.hai.entity.HighFleetOilCardCarExample; +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 HighFleetOilCardCarMapper extends HighFleetOilCardCarMapperExt { + @SelectProvider(type=HighFleetOilCardCarSqlProvider.class, method="countByExample") + long countByExample(HighFleetOilCardCarExample example); + + @DeleteProvider(type=HighFleetOilCardCarSqlProvider.class, method="deleteByExample") + int deleteByExample(HighFleetOilCardCarExample example); + + @Delete({ + "delete from high_fleet_oil_card_car", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_fleet_oil_card_car (fleet_oil_card_id, fleet_oil_card_no, ", + "car_license_plate, contact_name, ", + "contact_phone, `status`, ", + "create_time, update_time, ", + "op_user_id, op_user_name, ", + "ext_1, ext_2, ext_3)", + "values (#{fleetOilCardId,jdbcType=BIGINT}, #{fleetOilCardNo,jdbcType=VARCHAR}, ", + "#{carLicensePlate,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, ", + "#{contactPhone,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighFleetOilCardCar record); + + @InsertProvider(type=HighFleetOilCardCarSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighFleetOilCardCar record); + + @SelectProvider(type=HighFleetOilCardCarSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="car_license_plate", property="carLicensePlate", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_phone", property="contactPhone", 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="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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(HighFleetOilCardCarExample example); + + @Select({ + "select", + "id, fleet_oil_card_id, fleet_oil_card_no, car_license_plate, contact_name, contact_phone, ", + "`status`, create_time, update_time, op_user_id, op_user_name, ext_1, ext_2, ", + "ext_3", + "from high_fleet_oil_card_car", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="car_license_plate", property="carLicensePlate", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_phone", property="contactPhone", 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="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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) + }) + HighFleetOilCardCar selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighFleetOilCardCarSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighFleetOilCardCar record, @Param("example") HighFleetOilCardCarExample example); + + @UpdateProvider(type=HighFleetOilCardCarSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighFleetOilCardCar record, @Param("example") HighFleetOilCardCarExample example); + + @UpdateProvider(type=HighFleetOilCardCarSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighFleetOilCardCar record); + + @Update({ + "update high_fleet_oil_card_car", + "set fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT},", + "fleet_oil_card_no = #{fleetOilCardNo,jdbcType=VARCHAR},", + "car_license_plate = #{carLicensePlate,jdbcType=VARCHAR},", + "contact_name = #{contactName,jdbcType=VARCHAR},", + "contact_phone = #{contactPhone,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighFleetOilCardCar record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapperExt.java new file mode 100644 index 00000000..bcbfefde --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighFleetOilCardCarMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarSqlProvider.java new file mode 100644 index 00000000..0dfffe8b --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardCarSqlProvider.java @@ -0,0 +1,360 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardCar; +import com.hai.entity.HighFleetOilCardCarExample.Criteria; +import com.hai.entity.HighFleetOilCardCarExample.Criterion; +import com.hai.entity.HighFleetOilCardCarExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighFleetOilCardCarSqlProvider { + + public String countByExample(HighFleetOilCardCarExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_fleet_oil_card_car"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighFleetOilCardCarExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_fleet_oil_card_car"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighFleetOilCardCar record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_fleet_oil_card_car"); + + if (record.getFleetOilCardId() != null) { + sql.VALUES("fleet_oil_card_id", "#{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.VALUES("fleet_oil_card_no", "#{fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getCarLicensePlate() != null) { + sql.VALUES("car_license_plate", "#{carLicensePlate,jdbcType=VARCHAR}"); + } + + if (record.getContactName() != null) { + sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.VALUES("contact_phone", "#{contactPhone,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.getOpUserId() != null) { + sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.VALUES("op_user_name", "#{opUserName,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(HighFleetOilCardCarExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("fleet_oil_card_id"); + sql.SELECT("fleet_oil_card_no"); + sql.SELECT("car_license_plate"); + sql.SELECT("contact_name"); + sql.SELECT("contact_phone"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_fleet_oil_card_car"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighFleetOilCardCar record = (HighFleetOilCardCar) parameter.get("record"); + HighFleetOilCardCarExample example = (HighFleetOilCardCarExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_car"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getCarLicensePlate() != null) { + sql.SET("car_license_plate = #{record.carLicensePlate,jdbcType=VARCHAR}"); + } + + if (record.getContactName() != null) { + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.SET("contact_phone = #{record.contactPhone,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.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.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("high_fleet_oil_card_car"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=VARCHAR}"); + sql.SET("car_license_plate = #{record.carLicensePlate,jdbcType=VARCHAR}"); + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + sql.SET("contact_phone = #{record.contactPhone,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("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,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}"); + + HighFleetOilCardCarExample example = (HighFleetOilCardCarExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighFleetOilCardCar record) { + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_car"); + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getCarLicensePlate() != null) { + sql.SET("car_license_plate = #{carLicensePlate,jdbcType=VARCHAR}"); + } + + if (record.getContactName() != null) { + sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.SET("contact_phone = #{contactPhone,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.getOpUserId() != null) { + sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{opUserName,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, HighFleetOilCardCarExample 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/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapper.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapper.java new file mode 100644 index 00000000..1051831d --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapper.java @@ -0,0 +1,122 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardContactRecord; +import com.hai.entity.HighFleetOilCardContactRecordExample; +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 HighFleetOilCardContactRecordMapper extends HighFleetOilCardContactRecordMapperExt { + @SelectProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="countByExample") + long countByExample(HighFleetOilCardContactRecordExample example); + + @DeleteProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="deleteByExample") + int deleteByExample(HighFleetOilCardContactRecordExample example); + + @Delete({ + "delete from high_fleet_oil_card_contact_record", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_fleet_oil_card_contact_record (fleet_oil_card_id, fleet_oil_card_no, ", + "content, `status`, ", + "create_time, op_user_id, ", + "op_user_name, ext_1, ", + "ext_2, ext_3)", + "values (#{fleetOilCardId,jdbcType=BIGINT}, #{fleetOilCardNo,jdbcType=VARCHAR}, ", + "#{content,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ", + "#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighFleetOilCardContactRecord record); + + @InsertProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighFleetOilCardContactRecord record); + + @SelectProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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(HighFleetOilCardContactRecordExample example); + + @Select({ + "select", + "id, fleet_oil_card_id, fleet_oil_card_no, content, `status`, create_time, op_user_id, ", + "op_user_name, ext_1, ext_2, ext_3", + "from high_fleet_oil_card_contact_record", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="content", property="content", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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) + }) + HighFleetOilCardContactRecord selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighFleetOilCardContactRecord record, @Param("example") HighFleetOilCardContactRecordExample example); + + @UpdateProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighFleetOilCardContactRecord record, @Param("example") HighFleetOilCardContactRecordExample example); + + @UpdateProvider(type=HighFleetOilCardContactRecordSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighFleetOilCardContactRecord record); + + @Update({ + "update high_fleet_oil_card_contact_record", + "set fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT},", + "fleet_oil_card_no = #{fleetOilCardNo,jdbcType=VARCHAR},", + "content = #{content,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighFleetOilCardContactRecord record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapperExt.java new file mode 100644 index 00000000..241ffe24 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighFleetOilCardContactRecordMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordSqlProvider.java new file mode 100644 index 00000000..e4101f1b --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardContactRecordSqlProvider.java @@ -0,0 +1,318 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardContactRecord; +import com.hai.entity.HighFleetOilCardContactRecordExample.Criteria; +import com.hai.entity.HighFleetOilCardContactRecordExample.Criterion; +import com.hai.entity.HighFleetOilCardContactRecordExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighFleetOilCardContactRecordSqlProvider { + + public String countByExample(HighFleetOilCardContactRecordExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_fleet_oil_card_contact_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighFleetOilCardContactRecordExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_fleet_oil_card_contact_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighFleetOilCardContactRecord record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_fleet_oil_card_contact_record"); + + if (record.getFleetOilCardId() != null) { + sql.VALUES("fleet_oil_card_id", "#{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.VALUES("fleet_oil_card_no", "#{fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getContent() != null) { + sql.VALUES("content", "#{content,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.getOpUserId() != null) { + sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.VALUES("op_user_name", "#{opUserName,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(HighFleetOilCardContactRecordExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("fleet_oil_card_id"); + sql.SELECT("fleet_oil_card_no"); + sql.SELECT("content"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_fleet_oil_card_contact_record"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighFleetOilCardContactRecord record = (HighFleetOilCardContactRecord) parameter.get("record"); + HighFleetOilCardContactRecordExample example = (HighFleetOilCardContactRecordExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_contact_record"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getContent() != null) { + sql.SET("content = #{record.content,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.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.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("high_fleet_oil_card_contact_record"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=VARCHAR}"); + sql.SET("content = #{record.content,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,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}"); + + HighFleetOilCardContactRecordExample example = (HighFleetOilCardContactRecordExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighFleetOilCardContactRecord record) { + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_contact_record"); + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getContent() != null) { + sql.SET("content = #{content,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.getOpUserId() != null) { + sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{opUserName,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, HighFleetOilCardContactRecordExample 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/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapper.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapper.java new file mode 100644 index 00000000..f9e1a6a5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapper.java @@ -0,0 +1,133 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardGasStation; +import com.hai.entity.HighFleetOilCardGasStationExample; +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 HighFleetOilCardGasStationMapper extends HighFleetOilCardGasStationMapperExt { + @SelectProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="countByExample") + long countByExample(HighFleetOilCardGasStationExample example); + + @DeleteProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="deleteByExample") + int deleteByExample(HighFleetOilCardGasStationExample example); + + @Delete({ + "delete from high_fleet_oil_card_gas_station", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_fleet_oil_card_gas_station (fleet_oil_card_id, fleet_oil_card_no, ", + "store_id, store_no, ", + "store_name, `status`, ", + "create_time, update_time, ", + "op_user_id, op_user_name, ", + "ext_1, ext_2, ext_3)", + "values (#{fleetOilCardId,jdbcType=BIGINT}, #{fleetOilCardNo,jdbcType=INTEGER}, ", + "#{storeId,jdbcType=BIGINT}, #{storeNo,jdbcType=VARCHAR}, ", + "#{storeName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{opUserId,jdbcType=BIGINT}, #{opUserName,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighFleetOilCardGasStation record); + + @InsertProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighFleetOilCardGasStation record); + + @SelectProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.INTEGER), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_no", property="storeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="store_name", property="storeName", 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="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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(HighFleetOilCardGasStationExample example); + + @Select({ + "select", + "id, fleet_oil_card_id, fleet_oil_card_no, store_id, store_no, store_name, `status`, ", + "create_time, update_time, op_user_id, op_user_name, ext_1, ext_2, ext_3", + "from high_fleet_oil_card_gas_station", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.INTEGER), + @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), + @Result(column="store_no", property="storeNo", jdbcType=JdbcType.VARCHAR), + @Result(column="store_name", property="storeName", 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="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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) + }) + HighFleetOilCardGasStation selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighFleetOilCardGasStation record, @Param("example") HighFleetOilCardGasStationExample example); + + @UpdateProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighFleetOilCardGasStation record, @Param("example") HighFleetOilCardGasStationExample example); + + @UpdateProvider(type=HighFleetOilCardGasStationSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighFleetOilCardGasStation record); + + @Update({ + "update high_fleet_oil_card_gas_station", + "set fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT},", + "fleet_oil_card_no = #{fleetOilCardNo,jdbcType=INTEGER},", + "store_id = #{storeId,jdbcType=BIGINT},", + "store_no = #{storeNo,jdbcType=VARCHAR},", + "store_name = #{storeName,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighFleetOilCardGasStation record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapperExt.java new file mode 100644 index 00000000..5b022dfb --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighFleetOilCardGasStationMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationSqlProvider.java new file mode 100644 index 00000000..bece1de9 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardGasStationSqlProvider.java @@ -0,0 +1,360 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardGasStation; +import com.hai.entity.HighFleetOilCardGasStationExample.Criteria; +import com.hai.entity.HighFleetOilCardGasStationExample.Criterion; +import com.hai.entity.HighFleetOilCardGasStationExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighFleetOilCardGasStationSqlProvider { + + public String countByExample(HighFleetOilCardGasStationExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_fleet_oil_card_gas_station"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighFleetOilCardGasStationExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_fleet_oil_card_gas_station"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighFleetOilCardGasStation record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_fleet_oil_card_gas_station"); + + if (record.getFleetOilCardId() != null) { + sql.VALUES("fleet_oil_card_id", "#{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.VALUES("fleet_oil_card_no", "#{fleetOilCardNo,jdbcType=INTEGER}"); + } + + if (record.getStoreId() != null) { + sql.VALUES("store_id", "#{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreNo() != null) { + sql.VALUES("store_no", "#{storeNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreName() != null) { + sql.VALUES("store_name", "#{storeName,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.getOpUserId() != null) { + sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.VALUES("op_user_name", "#{opUserName,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(HighFleetOilCardGasStationExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("fleet_oil_card_id"); + sql.SELECT("fleet_oil_card_no"); + sql.SELECT("store_id"); + sql.SELECT("store_no"); + sql.SELECT("store_name"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_fleet_oil_card_gas_station"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighFleetOilCardGasStation record = (HighFleetOilCardGasStation) parameter.get("record"); + HighFleetOilCardGasStationExample example = (HighFleetOilCardGasStationExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_gas_station"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=INTEGER}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreNo() != null) { + sql.SET("store_no = #{record.storeNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{record.storeName,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.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.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("high_fleet_oil_card_gas_station"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=INTEGER}"); + sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); + sql.SET("store_no = #{record.storeNo,jdbcType=VARCHAR}"); + sql.SET("store_name = #{record.storeName,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("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,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}"); + + HighFleetOilCardGasStationExample example = (HighFleetOilCardGasStationExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighFleetOilCardGasStation record) { + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_gas_station"); + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{fleetOilCardNo,jdbcType=INTEGER}"); + } + + if (record.getStoreId() != null) { + sql.SET("store_id = #{storeId,jdbcType=BIGINT}"); + } + + if (record.getStoreNo() != null) { + sql.SET("store_no = #{storeNo,jdbcType=VARCHAR}"); + } + + if (record.getStoreName() != null) { + sql.SET("store_name = #{storeName,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.getOpUserId() != null) { + sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{opUserName,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, HighFleetOilCardGasStationExample 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/hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapper.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapper.java new file mode 100644 index 00000000..9bfafcdd --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapper.java @@ -0,0 +1,150 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardExample; +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 HighFleetOilCardMapper extends HighFleetOilCardMapperExt { + @SelectProvider(type=HighFleetOilCardSqlProvider.class, method="countByExample") + long countByExample(HighFleetOilCardExample example); + + @DeleteProvider(type=HighFleetOilCardSqlProvider.class, method="deleteByExample") + int deleteByExample(HighFleetOilCardExample example); + + @Delete({ + "delete from high_fleet_oil_card", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_fleet_oil_card (company_id, company_name, ", + "org_id, org_name, card_no, ", + "amount, amount_consume, ", + "contact_name, contact_phone, ", + "`status`, create_time, ", + "update_time, op_user_id, ", + "op_user_name, ext_1, ", + "ext_2, ext_3)", + "values (#{companyId,jdbcType=BIGINT}, #{companyName,jdbcType=VARCHAR}, ", + "#{orgId,jdbcType=BIGINT}, #{orgName,jdbcType=VARCHAR}, #{cardNo,jdbcType=VARCHAR}, ", + "#{amount,jdbcType=DECIMAL}, #{amountConsume,jdbcType=DECIMAL}, ", + "#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ", + "#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighFleetOilCard record); + + @InsertProvider(type=HighFleetOilCardSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighFleetOilCard record); + + @SelectProvider(type=HighFleetOilCardSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), + @Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR), + @Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="amount_consume", property="amountConsume", jdbcType=JdbcType.DECIMAL), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_phone", property="contactPhone", 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="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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(HighFleetOilCardExample example); + + @Select({ + "select", + "id, company_id, company_name, org_id, org_name, card_no, amount, amount_consume, ", + "contact_name, contact_phone, `status`, create_time, update_time, op_user_id, ", + "op_user_name, ext_1, ext_2, ext_3", + "from high_fleet_oil_card", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT), + @Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR), + @Result(column="org_id", property="orgId", jdbcType=JdbcType.BIGINT), + @Result(column="org_name", property="orgName", jdbcType=JdbcType.VARCHAR), + @Result(column="card_no", property="cardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="amount", property="amount", jdbcType=JdbcType.DECIMAL), + @Result(column="amount_consume", property="amountConsume", jdbcType=JdbcType.DECIMAL), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_phone", property="contactPhone", 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="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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) + }) + HighFleetOilCard selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighFleetOilCardSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighFleetOilCard record, @Param("example") HighFleetOilCardExample example); + + @UpdateProvider(type=HighFleetOilCardSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighFleetOilCard record, @Param("example") HighFleetOilCardExample example); + + @UpdateProvider(type=HighFleetOilCardSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighFleetOilCard record); + + @Update({ + "update high_fleet_oil_card", + "set company_id = #{companyId,jdbcType=BIGINT},", + "company_name = #{companyName,jdbcType=VARCHAR},", + "org_id = #{orgId,jdbcType=BIGINT},", + "org_name = #{orgName,jdbcType=VARCHAR},", + "card_no = #{cardNo,jdbcType=VARCHAR},", + "amount = #{amount,jdbcType=DECIMAL},", + "amount_consume = #{amountConsume,jdbcType=DECIMAL},", + "contact_name = #{contactName,jdbcType=VARCHAR},", + "contact_phone = #{contactPhone,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighFleetOilCard record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapperExt.java new file mode 100644 index 00000000..48163a0d --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardMapperExt.java @@ -0,0 +1,79 @@ +package com.hai.dao; + +import com.hai.model.OilCardOrderModel; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; +import java.util.Map; + +/** + * mapper扩展类 + */ +public interface HighFleetOilCardMapperExt { + + @Select("") + List selectOilCardOrderList(@Param(value = "param") Map param); +} diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapper.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapper.java new file mode 100644 index 00000000..244b6516 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapper.java @@ -0,0 +1,159 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardRecord; +import com.hai.entity.HighFleetOilCardRecordExample; +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 HighFleetOilCardRecordMapper extends HighFleetOilCardRecordMapperExt { + @SelectProvider(type=HighFleetOilCardRecordSqlProvider.class, method="countByExample") + long countByExample(HighFleetOilCardRecordExample example); + + @DeleteProvider(type=HighFleetOilCardRecordSqlProvider.class, method="deleteByExample") + int deleteByExample(HighFleetOilCardRecordExample example); + + @Delete({ + "delete from high_fleet_oil_card_record", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_fleet_oil_card_record (fleet_oil_card_id, fleet_oil_card_no, ", + "`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 (#{fleetOilCardId,jdbcType=BIGINT}, #{fleetOilCardNo,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(HighFleetOilCardRecord record); + + @InsertProvider(type=HighFleetOilCardRecordSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighFleetOilCardRecord record); + + @SelectProvider(type=HighFleetOilCardRecordSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", 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(HighFleetOilCardRecordExample example); + + @Select({ + "select", + "id, fleet_oil_card_id, fleet_oil_card_no, `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 high_fleet_oil_card_record", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", 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) + }) + HighFleetOilCardRecord selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighFleetOilCardRecordSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighFleetOilCardRecord record, @Param("example") HighFleetOilCardRecordExample example); + + @UpdateProvider(type=HighFleetOilCardRecordSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighFleetOilCardRecord record, @Param("example") HighFleetOilCardRecordExample example); + + @UpdateProvider(type=HighFleetOilCardRecordSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighFleetOilCardRecord record); + + @Update({ + "update high_fleet_oil_card_record", + "set fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT},", + "fleet_oil_card_no = #{fleetOilCardNo,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(HighFleetOilCardRecord record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapperExt.java new file mode 100644 index 00000000..e8f89f40 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighFleetOilCardRecordMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordSqlProvider.java new file mode 100644 index 00000000..59d0830c --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardRecordSqlProvider.java @@ -0,0 +1,444 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardRecord; +import com.hai.entity.HighFleetOilCardRecordExample.Criteria; +import com.hai.entity.HighFleetOilCardRecordExample.Criterion; +import com.hai.entity.HighFleetOilCardRecordExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighFleetOilCardRecordSqlProvider { + + public String countByExample(HighFleetOilCardRecordExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_fleet_oil_card_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighFleetOilCardRecordExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_fleet_oil_card_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighFleetOilCardRecord record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_fleet_oil_card_record"); + + if (record.getFleetOilCardId() != null) { + sql.VALUES("fleet_oil_card_id", "#{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.VALUES("fleet_oil_card_no", "#{fleetOilCardNo,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(HighFleetOilCardRecordExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("fleet_oil_card_id"); + sql.SELECT("fleet_oil_card_no"); + 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("high_fleet_oil_card_record"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighFleetOilCardRecord record = (HighFleetOilCardRecord) parameter.get("record"); + HighFleetOilCardRecordExample example = (HighFleetOilCardRecordExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_record"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,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("high_fleet_oil_card_record"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,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}"); + + HighFleetOilCardRecordExample example = (HighFleetOilCardRecordExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighFleetOilCardRecord record) { + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_record"); + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{fleetOilCardNo,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, HighFleetOilCardRecordExample 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/hai-service/src/main/java/com/hai/dao/HighFleetOilCardSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardSqlProvider.java new file mode 100644 index 00000000..4b3992b9 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardSqlProvider.java @@ -0,0 +1,416 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardExample.Criteria; +import com.hai.entity.HighFleetOilCardExample.Criterion; +import com.hai.entity.HighFleetOilCardExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighFleetOilCardSqlProvider { + + public String countByExample(HighFleetOilCardExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_fleet_oil_card"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighFleetOilCardExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_fleet_oil_card"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighFleetOilCard record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_fleet_oil_card"); + + if (record.getCompanyId() != null) { + sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); + } + + if (record.getCompanyName() != null) { + sql.VALUES("company_name", "#{companyName,jdbcType=VARCHAR}"); + } + + if (record.getOrgId() != null) { + sql.VALUES("org_id", "#{orgId,jdbcType=BIGINT}"); + } + + if (record.getOrgName() != null) { + sql.VALUES("org_name", "#{orgName,jdbcType=VARCHAR}"); + } + + if (record.getCardNo() != null) { + sql.VALUES("card_no", "#{cardNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.VALUES("amount", "#{amount,jdbcType=DECIMAL}"); + } + + if (record.getAmountConsume() != null) { + sql.VALUES("amount_consume", "#{amountConsume,jdbcType=DECIMAL}"); + } + + if (record.getContactName() != null) { + sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.VALUES("contact_phone", "#{contactPhone,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.getOpUserId() != null) { + sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.VALUES("op_user_name", "#{opUserName,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(HighFleetOilCardExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("company_id"); + sql.SELECT("company_name"); + sql.SELECT("org_id"); + sql.SELECT("org_name"); + sql.SELECT("card_no"); + sql.SELECT("amount"); + sql.SELECT("amount_consume"); + sql.SELECT("contact_name"); + sql.SELECT("contact_phone"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_fleet_oil_card"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighFleetOilCard record = (HighFleetOilCard) parameter.get("record"); + HighFleetOilCardExample example = (HighFleetOilCardExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + } + + if (record.getCompanyName() != null) { + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + } + + if (record.getOrgId() != null) { + sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); + } + + if (record.getOrgName() != null) { + sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}"); + } + + if (record.getCardNo() != null) { + sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}"); + } + + 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.getContactName() != null) { + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.SET("contact_phone = #{record.contactPhone,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.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.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("high_fleet_oil_card"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("company_name = #{record.companyName,jdbcType=VARCHAR}"); + sql.SET("org_id = #{record.orgId,jdbcType=BIGINT}"); + sql.SET("org_name = #{record.orgName,jdbcType=VARCHAR}"); + sql.SET("card_no = #{record.cardNo,jdbcType=VARCHAR}"); + sql.SET("amount = #{record.amount,jdbcType=DECIMAL}"); + sql.SET("amount_consume = #{record.amountConsume,jdbcType=DECIMAL}"); + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + sql.SET("contact_phone = #{record.contactPhone,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("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,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}"); + + HighFleetOilCardExample example = (HighFleetOilCardExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighFleetOilCard record) { + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card"); + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); + } + + if (record.getCompanyName() != null) { + sql.SET("company_name = #{companyName,jdbcType=VARCHAR}"); + } + + if (record.getOrgId() != null) { + sql.SET("org_id = #{orgId,jdbcType=BIGINT}"); + } + + if (record.getOrgName() != null) { + sql.SET("org_name = #{orgName,jdbcType=VARCHAR}"); + } + + if (record.getCardNo() != null) { + sql.SET("card_no = #{cardNo,jdbcType=VARCHAR}"); + } + + if (record.getAmount() != null) { + sql.SET("amount = #{amount,jdbcType=DECIMAL}"); + } + + if (record.getAmountConsume() != null) { + sql.SET("amount_consume = #{amountConsume,jdbcType=DECIMAL}"); + } + + if (record.getContactName() != null) { + sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.SET("contact_phone = #{contactPhone,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.getOpUserId() != null) { + sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}"); + } + + if (record.getOpUserName() != null) { + sql.SET("op_user_name = #{opUserName,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, HighFleetOilCardExample 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/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapper.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapper.java new file mode 100644 index 00000000..1ec43156 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapper.java @@ -0,0 +1,139 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardUser; +import com.hai.entity.HighFleetOilCardUserExample; +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 HighFleetOilCardUserMapper extends HighFleetOilCardUserMapperExt { + @SelectProvider(type=HighFleetOilCardUserSqlProvider.class, method="countByExample") + long countByExample(HighFleetOilCardUserExample example); + + @DeleteProvider(type=HighFleetOilCardUserSqlProvider.class, method="deleteByExample") + int deleteByExample(HighFleetOilCardUserExample example); + + @Delete({ + "delete from high_fleet_oil_card_user", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_fleet_oil_card_user (fleet_oil_card_id, fleet_oil_card_no, ", + "contact_name, contact_phone, ", + "`status`, amount_consume, ", + "lately_consume_time, create_time, ", + "update_time, op_user_id, ", + "op_user_name, ext_1, ", + "ext_2, ext_3)", + "values (#{fleetOilCardId,jdbcType=BIGINT}, #{fleetOilCardNo,jdbcType=VARCHAR}, ", + "#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{amountConsume,jdbcType=DECIMAL}, ", + "#{latelyConsumeTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{opUserId,jdbcType=BIGINT}, ", + "#{opUserName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighFleetOilCardUser record); + + @InsertProvider(type=HighFleetOilCardUserSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighFleetOilCardUser record); + + @SelectProvider(type=HighFleetOilCardUserSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="amount_consume", property="amountConsume", jdbcType=JdbcType.DECIMAL), + @Result(column="lately_consume_time", property="latelyConsumeTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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(HighFleetOilCardUserExample example); + + @Select({ + "select", + "id, fleet_oil_card_id, fleet_oil_card_no, contact_name, contact_phone, `status`, ", + "amount_consume, lately_consume_time, create_time, update_time, op_user_id, op_user_name, ", + "ext_1, ext_2, ext_3", + "from high_fleet_oil_card_user", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="fleet_oil_card_id", property="fleetOilCardId", jdbcType=JdbcType.BIGINT), + @Result(column="fleet_oil_card_no", property="fleetOilCardNo", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_name", property="contactName", jdbcType=JdbcType.VARCHAR), + @Result(column="contact_phone", property="contactPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="amount_consume", property="amountConsume", jdbcType=JdbcType.DECIMAL), + @Result(column="lately_consume_time", property="latelyConsumeTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT), + @Result(column="op_user_name", property="opUserName", 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) + }) + HighFleetOilCardUser selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighFleetOilCardUserSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighFleetOilCardUser record, @Param("example") HighFleetOilCardUserExample example); + + @UpdateProvider(type=HighFleetOilCardUserSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighFleetOilCardUser record, @Param("example") HighFleetOilCardUserExample example); + + @UpdateProvider(type=HighFleetOilCardUserSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighFleetOilCardUser record); + + @Update({ + "update high_fleet_oil_card_user", + "set fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT},", + "fleet_oil_card_no = #{fleetOilCardNo,jdbcType=VARCHAR},", + "contact_name = #{contactName,jdbcType=VARCHAR},", + "contact_phone = #{contactPhone,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "amount_consume = #{amountConsume,jdbcType=DECIMAL},", + "lately_consume_time = #{latelyConsumeTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "op_user_id = #{opUserId,jdbcType=BIGINT},", + "op_user_name = #{opUserName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighFleetOilCardUser record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapperExt.java new file mode 100644 index 00000000..e065eaaa --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighFleetOilCardUserMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserSqlProvider.java new file mode 100644 index 00000000..b550765f --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighFleetOilCardUserSqlProvider.java @@ -0,0 +1,374 @@ +package com.hai.dao; + +import com.hai.entity.HighFleetOilCardUser; +import com.hai.entity.HighFleetOilCardUserExample.Criteria; +import com.hai.entity.HighFleetOilCardUserExample.Criterion; +import com.hai.entity.HighFleetOilCardUserExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighFleetOilCardUserSqlProvider { + + public String countByExample(HighFleetOilCardUserExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_fleet_oil_card_user"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighFleetOilCardUserExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_fleet_oil_card_user"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighFleetOilCardUser record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_fleet_oil_card_user"); + + if (record.getFleetOilCardId() != null) { + sql.VALUES("fleet_oil_card_id", "#{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.VALUES("fleet_oil_card_no", "#{fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getContactName() != null) { + sql.VALUES("contact_name", "#{contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.VALUES("contact_phone", "#{contactPhone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getAmountConsume() != null) { + sql.VALUES("amount_consume", "#{amountConsume,jdbcType=DECIMAL}"); + } + + if (record.getLatelyConsumeTime() != null) { + sql.VALUES("lately_consume_time", "#{latelyConsumeTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + 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.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(HighFleetOilCardUserExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("fleet_oil_card_id"); + sql.SELECT("fleet_oil_card_no"); + sql.SELECT("contact_name"); + sql.SELECT("contact_phone"); + sql.SELECT("`status`"); + sql.SELECT("amount_consume"); + sql.SELECT("lately_consume_time"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("op_user_id"); + sql.SELECT("op_user_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_fleet_oil_card_user"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighFleetOilCardUser record = (HighFleetOilCardUser) parameter.get("record"); + HighFleetOilCardUserExample example = (HighFleetOilCardUserExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_user"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getContactName() != null) { + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.SET("contact_phone = #{record.contactPhone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getAmountConsume() != null) { + sql.SET("amount_consume = #{record.amountConsume,jdbcType=DECIMAL}"); + } + + if (record.getLatelyConsumeTime() != null) { + sql.SET("lately_consume_time = #{record.latelyConsumeTime,jdbcType=TIMESTAMP}"); + } + + 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.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.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("high_fleet_oil_card_user"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_id = #{record.fleetOilCardId,jdbcType=BIGINT}"); + sql.SET("fleet_oil_card_no = #{record.fleetOilCardNo,jdbcType=VARCHAR}"); + sql.SET("contact_name = #{record.contactName,jdbcType=VARCHAR}"); + sql.SET("contact_phone = #{record.contactPhone,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("amount_consume = #{record.amountConsume,jdbcType=DECIMAL}"); + sql.SET("lately_consume_time = #{record.latelyConsumeTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}"); + sql.SET("op_user_name = #{record.opUserName,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}"); + + HighFleetOilCardUserExample example = (HighFleetOilCardUserExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighFleetOilCardUser record) { + SQL sql = new SQL(); + sql.UPDATE("high_fleet_oil_card_user"); + + if (record.getFleetOilCardId() != null) { + sql.SET("fleet_oil_card_id = #{fleetOilCardId,jdbcType=BIGINT}"); + } + + if (record.getFleetOilCardNo() != null) { + sql.SET("fleet_oil_card_no = #{fleetOilCardNo,jdbcType=VARCHAR}"); + } + + if (record.getContactName() != null) { + sql.SET("contact_name = #{contactName,jdbcType=VARCHAR}"); + } + + if (record.getContactPhone() != null) { + sql.SET("contact_phone = #{contactPhone,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getAmountConsume() != null) { + sql.SET("amount_consume = #{amountConsume,jdbcType=DECIMAL}"); + } + + if (record.getLatelyConsumeTime() != null) { + sql.SET("lately_consume_time = #{latelyConsumeTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + 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.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, HighFleetOilCardUserExample 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/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java index 644be208..6a726e4a 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoMapper.java @@ -45,7 +45,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { "gun_no, `status`, create_time, ", "ext_1, ext_2, ext_3)", "values (#{gasOilPriceId,jdbcType=BIGINT}, #{storeId,jdbcType=BIGINT}, ", - "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{oilNoName,jdbcType=VARCHAR}, ", "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", "#{gunNo,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" @@ -62,7 +62,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="gas_oil_price_id", property="gasOilPriceId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @@ -86,7 +86,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="gas_oil_price_id", property="gasOilPriceId", jdbcType=JdbcType.BIGINT), @Result(column="store_id", property="storeId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @@ -112,7 +112,7 @@ public interface HighGasOilGunNoMapper extends HighGasOilGunNoMapperExt { "update high_gas_oil_gun_no", "set gas_oil_price_id = #{gasOilPriceId,jdbcType=BIGINT},", "store_id = #{storeId,jdbcType=BIGINT},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "oil_type = #{oilType,jdbcType=INTEGER},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java index 58b2d6ef..b87029a3 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilGunNoSqlProvider.java @@ -37,7 +37,7 @@ public class HighGasOilGunNoSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -128,7 +128,7 @@ public class HighGasOilGunNoSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -178,7 +178,7 @@ public class HighGasOilGunNoSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("gas_oil_price_id = #{record.gasOilPriceId,jdbcType=BIGINT}"); sql.SET("store_id = #{record.storeId,jdbcType=BIGINT}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); @@ -207,7 +207,7 @@ public class HighGasOilGunNoSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java index a3bd8ee3..f40b2c20 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapper.java @@ -41,16 +41,16 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Insert({ "insert into high_gas_oil_price (merchant_store_id, oil_no, ", "oil_no_name, preferential_margin, ", - "gas_station_drop, price_vip, ", - "price_gun, price_official, ", - "price_cost, oil_type, ", + "gas_station_drop, price_cost, ", + "price_vip, price_gun, ", + "price_official, oil_type, ", "oil_type_name, `status`, ", "ext_1, ext_2, ext_3)", - "values (#{merchantStoreId,jdbcType=BIGINT}, #{oilNo,jdbcType=INTEGER}, ", + "values (#{merchantStoreId,jdbcType=BIGINT}, #{oilNo,jdbcType=VARCHAR}, ", "#{oilNoName,jdbcType=VARCHAR}, #{preferentialMargin,jdbcType=DECIMAL}, ", - "#{gasStationDrop,jdbcType=DECIMAL}, #{priceVip,jdbcType=DECIMAL}, ", - "#{priceGun,jdbcType=DECIMAL}, #{priceOfficial,jdbcType=DECIMAL}, ", - "#{priceCost,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ", + "#{gasStationDrop,jdbcType=DECIMAL}, #{priceCost,jdbcType=DECIMAL}, ", + "#{priceVip,jdbcType=DECIMAL}, #{priceGun,jdbcType=DECIMAL}, ", + "#{priceOfficial,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ", "#{oilTypeName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @@ -65,14 +65,14 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="preferential_margin", property="preferentialMargin", jdbcType=JdbcType.DECIMAL), @Result(column="gas_station_drop", property="gasStationDrop", jdbcType=JdbcType.DECIMAL), + @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL), @Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), - @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -85,7 +85,7 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Select({ "select", "id, merchant_store_id, oil_no, oil_no_name, preferential_margin, gas_station_drop, ", - "price_vip, price_gun, price_official, price_cost, oil_type, oil_type_name, `status`, ", + "price_cost, price_vip, price_gun, price_official, oil_type, oil_type_name, `status`, ", "ext_1, ext_2, ext_3", "from high_gas_oil_price", "where id = #{id,jdbcType=BIGINT}" @@ -93,14 +93,14 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="merchant_store_id", property="merchantStoreId", jdbcType=JdbcType.BIGINT), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="preferential_margin", property="preferentialMargin", jdbcType=JdbcType.DECIMAL), @Result(column="gas_station_drop", property="gasStationDrop", jdbcType=JdbcType.DECIMAL), + @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="price_vip", property="priceVip", jdbcType=JdbcType.DECIMAL), @Result(column="price_gun", property="priceGun", jdbcType=JdbcType.DECIMAL), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), - @Result(column="price_cost", property="priceCost", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @Result(column="oil_type_name", property="oilTypeName", jdbcType=JdbcType.VARCHAR), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @@ -122,14 +122,14 @@ public interface HighGasOilPriceMapper extends HighGasOilPriceMapperExt { @Update({ "update high_gas_oil_price", "set merchant_store_id = #{merchantStoreId,jdbcType=BIGINT},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "preferential_margin = #{preferentialMargin,jdbcType=DECIMAL},", "gas_station_drop = #{gasStationDrop,jdbcType=DECIMAL},", + "price_cost = #{priceCost,jdbcType=DECIMAL},", "price_vip = #{priceVip,jdbcType=DECIMAL},", "price_gun = #{priceGun,jdbcType=DECIMAL},", "price_official = #{priceOfficial,jdbcType=DECIMAL},", - "price_cost = #{priceCost,jdbcType=DECIMAL},", "oil_type = #{oilType,jdbcType=INTEGER},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", "`status` = #{status,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java index 5a2a8059..27715135 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceMapperExt.java @@ -68,5 +68,5 @@ public interface HighGasOilPriceMapperExt { @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) }) - List selectPriceListByRegionAndOilNo(@Param("regionId") Long regionId, @Param("oilNo") Integer oilNo); + List selectPriceListByRegionAndOilNo(@Param("regionId") Long regionId, @Param("oilNo") String oilNo); } diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java index 1b20316f..e05193ff 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialMapper.java @@ -45,7 +45,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa "oil_type_name, `status`, ", "ext_1, ext_2, ext_3)", "values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", - "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{oilNoName,jdbcType=VARCHAR}, ", "#{priceOfficial,jdbcType=DECIMAL}, #{oilType,jdbcType=INTEGER}, ", "#{oilTypeName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" @@ -62,7 +62,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @@ -85,7 +85,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT), @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), - @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_official", property="priceOfficial", jdbcType=JdbcType.DECIMAL), @Result(column="oil_type", property="oilType", jdbcType=JdbcType.INTEGER), @@ -110,7 +110,7 @@ public interface HighGasOilPriceOfficialMapper extends HighGasOilPriceOfficialMa "update high_gas_oil_price_official", "set region_id = #{regionId,jdbcType=BIGINT},", "region_name = #{regionName,jdbcType=VARCHAR},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "price_official = #{priceOfficial,jdbcType=DECIMAL},", "oil_type = #{oilType,jdbcType=INTEGER},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java index 540fa423..4a02c884 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceOfficialSqlProvider.java @@ -37,7 +37,7 @@ public class HighGasOilPriceOfficialSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -123,7 +123,7 @@ public class HighGasOilPriceOfficialSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -169,7 +169,7 @@ public class HighGasOilPriceOfficialSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); @@ -197,7 +197,7 @@ public class HighGasOilPriceOfficialSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java index d2186faf..0fc52ec6 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceSqlProvider.java @@ -33,7 +33,7 @@ public class HighGasOilPriceSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -48,6 +48,10 @@ public class HighGasOilPriceSqlProvider { sql.VALUES("gas_station_drop", "#{gasStationDrop,jdbcType=DECIMAL}"); } + if (record.getPriceCost() != null) { + sql.VALUES("price_cost", "#{priceCost,jdbcType=DECIMAL}"); + } + if (record.getPriceVip() != null) { sql.VALUES("price_vip", "#{priceVip,jdbcType=DECIMAL}"); } @@ -60,10 +64,6 @@ public class HighGasOilPriceSqlProvider { sql.VALUES("price_official", "#{priceOfficial,jdbcType=DECIMAL}"); } - if (record.getPriceCost() != null) { - sql.VALUES("price_cost", "#{priceCost,jdbcType=DECIMAL}"); - } - if (record.getOilType() != null) { sql.VALUES("oil_type", "#{oilType,jdbcType=INTEGER}"); } @@ -103,10 +103,10 @@ public class HighGasOilPriceSqlProvider { sql.SELECT("oil_no_name"); sql.SELECT("preferential_margin"); sql.SELECT("gas_station_drop"); + sql.SELECT("price_cost"); sql.SELECT("price_vip"); sql.SELECT("price_gun"); sql.SELECT("price_official"); - sql.SELECT("price_cost"); sql.SELECT("oil_type"); sql.SELECT("oil_type_name"); sql.SELECT("`status`"); @@ -139,7 +139,7 @@ public class HighGasOilPriceSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -154,6 +154,10 @@ public class HighGasOilPriceSqlProvider { sql.SET("gas_station_drop = #{record.gasStationDrop,jdbcType=DECIMAL}"); } + if (record.getPriceCost() != null) { + sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); + } + if (record.getPriceVip() != null) { sql.SET("price_vip = #{record.priceVip,jdbcType=DECIMAL}"); } @@ -166,10 +170,6 @@ public class HighGasOilPriceSqlProvider { sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); } - if (record.getPriceCost() != null) { - sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); - } - if (record.getOilType() != null) { sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); } @@ -204,14 +204,14 @@ public class HighGasOilPriceSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("merchant_store_id = #{record.merchantStoreId,jdbcType=BIGINT}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("preferential_margin = #{record.preferentialMargin,jdbcType=DECIMAL}"); sql.SET("gas_station_drop = #{record.gasStationDrop,jdbcType=DECIMAL}"); + sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); sql.SET("price_vip = #{record.priceVip,jdbcType=DECIMAL}"); sql.SET("price_gun = #{record.priceGun,jdbcType=DECIMAL}"); sql.SET("price_official = #{record.priceOfficial,jdbcType=DECIMAL}"); - sql.SET("price_cost = #{record.priceCost,jdbcType=DECIMAL}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); @@ -233,7 +233,7 @@ public class HighGasOilPriceSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -248,6 +248,10 @@ public class HighGasOilPriceSqlProvider { sql.SET("gas_station_drop = #{gasStationDrop,jdbcType=DECIMAL}"); } + if (record.getPriceCost() != null) { + sql.SET("price_cost = #{priceCost,jdbcType=DECIMAL}"); + } + if (record.getPriceVip() != null) { sql.SET("price_vip = #{priceVip,jdbcType=DECIMAL}"); } @@ -260,10 +264,6 @@ public class HighGasOilPriceSqlProvider { sql.SET("price_official = #{priceOfficial,jdbcType=DECIMAL}"); } - if (record.getPriceCost() != null) { - sql.SET("price_cost = #{priceCost,jdbcType=DECIMAL}"); - } - if (record.getOilType() != null) { sql.SET("oil_type = #{oilType,jdbcType=INTEGER}"); } diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java index d10678e9..39dbba7a 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskMapper.java @@ -54,7 +54,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt "#{merStoreKey,jdbcType=VARCHAR}, #{merStoreId,jdbcType=BIGINT}, ", "#{merStoreName,jdbcType=VARCHAR}, #{merStoreAddress,jdbcType=VARCHAR}, ", "#{oilType,jdbcType=INTEGER}, #{oilTypeName,jdbcType=VARCHAR}, ", - "#{oilNo,jdbcType=INTEGER}, #{oilNoName,jdbcType=VARCHAR}, ", + "#{oilNo,jdbcType=VARCHAR}, #{oilNoName,jdbcType=VARCHAR}, ", "#{priceType,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ", "#{executionType,jdbcType=INTEGER}, #{startTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", @@ -80,7 +80,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @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.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_type", property="priceType", jdbcType=JdbcType.INTEGER), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -116,7 +116,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt @Result(column="mer_store_address", property="merStoreAddress", jdbcType=JdbcType.VARCHAR), @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.INTEGER), + @Result(column="oil_no", property="oilNo", jdbcType=JdbcType.VARCHAR), @Result(column="oil_no_name", property="oilNoName", jdbcType=JdbcType.VARCHAR), @Result(column="price_type", property="priceType", jdbcType=JdbcType.INTEGER), @Result(column="price", property="price", jdbcType=JdbcType.DECIMAL), @@ -152,7 +152,7 @@ public interface HighGasOilPriceTaskMapper extends HighGasOilPriceTaskMapperExt "mer_store_address = #{merStoreAddress,jdbcType=VARCHAR},", "oil_type = #{oilType,jdbcType=INTEGER},", "oil_type_name = #{oilTypeName,jdbcType=VARCHAR},", - "oil_no = #{oilNo,jdbcType=INTEGER},", + "oil_no = #{oilNo,jdbcType=VARCHAR},", "oil_no_name = #{oilNoName,jdbcType=VARCHAR},", "price_type = #{priceType,jdbcType=INTEGER},", "price = #{price,jdbcType=DECIMAL},", diff --git a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java index 81386790..ca37e173 100644 --- a/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java +++ b/hai-service/src/main/java/com/hai/dao/HighGasOilPriceTaskSqlProvider.java @@ -61,7 +61,7 @@ public class HighGasOilPriceTaskSqlProvider { } if (record.getOilNo() != null) { - sql.VALUES("oil_no", "#{oilNo,jdbcType=INTEGER}"); + sql.VALUES("oil_no", "#{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -202,7 +202,7 @@ public class HighGasOilPriceTaskSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { @@ -274,7 +274,7 @@ public class HighGasOilPriceTaskSqlProvider { sql.SET("mer_store_address = #{record.merStoreAddress,jdbcType=VARCHAR}"); sql.SET("oil_type = #{record.oilType,jdbcType=INTEGER}"); sql.SET("oil_type_name = #{record.oilTypeName,jdbcType=VARCHAR}"); - sql.SET("oil_no = #{record.oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{record.oilNo,jdbcType=VARCHAR}"); sql.SET("oil_no_name = #{record.oilNoName,jdbcType=VARCHAR}"); sql.SET("price_type = #{record.priceType,jdbcType=INTEGER}"); sql.SET("price = #{record.price,jdbcType=DECIMAL}"); @@ -331,7 +331,7 @@ public class HighGasOilPriceTaskSqlProvider { } if (record.getOilNo() != null) { - sql.SET("oil_no = #{oilNo,jdbcType=INTEGER}"); + sql.SET("oil_no = #{oilNo,jdbcType=VARCHAR}"); } if (record.getOilNoName() != null) { diff --git a/hai-service/src/main/java/com/hai/entity/HighFleetOilCard.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCard.java new file mode 100644 index 00000000..043eb267 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCard.java @@ -0,0 +1,326 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * high_fleet_oil_card + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighFleetOilCard implements Serializable { + private Long id; + + /** + * 公司id + */ + private Long companyId; + + /** + * 公司名称 + */ + private String companyName; + + /** + * 单位id + */ + private Long orgId; + + /** + * 单位名称 + */ + private String orgName; + + /** + * 卡号 + */ + private String cardNo; + + /** + * 余额 + */ + private BigDecimal amount; + + /** + * 消费金额 + */ + private BigDecimal amountConsume; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人手机号 + */ + private String contactPhone; + + /** + * 油卡状态 0:删除 1:正常 2:禁用 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + 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 getCompanyId() { + return companyId; + } + + public void setCompanyId(Long companyId) { + this.companyId = companyId; + } + + public String getCompanyName() { + return companyName; + } + + public void setCompanyName(String companyName) { + this.companyName = companyName; + } + + public Long getOrgId() { + return orgId; + } + + public void setOrgId(Long orgId) { + this.orgId = orgId; + } + + public String getOrgName() { + return orgName; + } + + public void setOrgName(String orgName) { + this.orgName = orgName; + } + + public String getCardNo() { + return cardNo; + } + + public void setCardNo(String cardNo) { + this.cardNo = cardNo; + } + + 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 String getContactName() { + return contactName; + } + + public void setContactName(String contactName) { + this.contactName = contactName; + } + + public String getContactPhone() { + return contactPhone; + } + + public void setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + } + + 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 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 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; + } + HighFleetOilCard other = (HighFleetOilCard) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId())) + && (this.getCompanyName() == null ? other.getCompanyName() == null : this.getCompanyName().equals(other.getCompanyName())) + && (this.getOrgId() == null ? other.getOrgId() == null : this.getOrgId().equals(other.getOrgId())) + && (this.getOrgName() == null ? other.getOrgName() == null : this.getOrgName().equals(other.getOrgName())) + && (this.getCardNo() == null ? other.getCardNo() == null : this.getCardNo().equals(other.getCardNo())) + && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount())) + && (this.getAmountConsume() == null ? other.getAmountConsume() == null : this.getAmountConsume().equals(other.getAmountConsume())) + && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName())) + && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone())) + && (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.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (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 + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode()); + result = prime * result + ((getCompanyName() == null) ? 0 : getCompanyName().hashCode()); + result = prime * result + ((getOrgId() == null) ? 0 : getOrgId().hashCode()); + result = prime * result + ((getOrgName() == null) ? 0 : getOrgName().hashCode()); + result = prime * result + ((getCardNo() == null) ? 0 : getCardNo().hashCode()); + result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode()); + result = prime * result + ((getAmountConsume() == null) ? 0 : getAmountConsume().hashCode()); + result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode()); + result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().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 + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", companyId=").append(companyId); + sb.append(", companyName=").append(companyName); + sb.append(", orgId=").append(orgId); + sb.append(", orgName=").append(orgName); + sb.append(", cardNo=").append(cardNo); + sb.append(", amount=").append(amount); + sb.append(", amountConsume=").append(amountConsume); + sb.append(", contactName=").append(contactName); + sb.append(", contactPhone=").append(contactPhone); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardCar.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardCar.java new file mode 100644 index 00000000..61e62b3f --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardCar.java @@ -0,0 +1,261 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_fleet_oil_card_car + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighFleetOilCardCar implements Serializable { + private Long id; + + /** + * 车队油卡id + */ + private Long fleetOilCardId; + + /** + * 车队油卡卡号 + */ + private String fleetOilCardNo; + + /** + * 车牌 + */ + private String carLicensePlate; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人手机号 + */ + private String contactPhone; + + /** + * 油卡状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + 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 getFleetOilCardId() { + return fleetOilCardId; + } + + public void setFleetOilCardId(Long fleetOilCardId) { + this.fleetOilCardId = fleetOilCardId; + } + + public String getFleetOilCardNo() { + return fleetOilCardNo; + } + + public void setFleetOilCardNo(String fleetOilCardNo) { + this.fleetOilCardNo = fleetOilCardNo; + } + + public String getCarLicensePlate() { + return carLicensePlate; + } + + public void setCarLicensePlate(String carLicensePlate) { + this.carLicensePlate = carLicensePlate; + } + + public String getContactName() { + return contactName; + } + + public void setContactName(String contactName) { + this.contactName = contactName; + } + + public String getContactPhone() { + return contactPhone; + } + + public void setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + } + + 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 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 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; + } + HighFleetOilCardCar other = (HighFleetOilCardCar) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getFleetOilCardId() == null ? other.getFleetOilCardId() == null : this.getFleetOilCardId().equals(other.getFleetOilCardId())) + && (this.getFleetOilCardNo() == null ? other.getFleetOilCardNo() == null : this.getFleetOilCardNo().equals(other.getFleetOilCardNo())) + && (this.getCarLicensePlate() == null ? other.getCarLicensePlate() == null : this.getCarLicensePlate().equals(other.getCarLicensePlate())) + && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName())) + && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone())) + && (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.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (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 + ((getFleetOilCardId() == null) ? 0 : getFleetOilCardId().hashCode()); + result = prime * result + ((getFleetOilCardNo() == null) ? 0 : getFleetOilCardNo().hashCode()); + result = prime * result + ((getCarLicensePlate() == null) ? 0 : getCarLicensePlate().hashCode()); + result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode()); + result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().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 + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", fleetOilCardId=").append(fleetOilCardId); + sb.append(", fleetOilCardNo=").append(fleetOilCardNo); + sb.append(", carLicensePlate=").append(carLicensePlate); + sb.append(", contactName=").append(contactName); + sb.append(", contactPhone=").append(contactPhone); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardCarExample.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardCarExample.java new file mode 100644 index 00000000..8af4401d --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardCarExample.java @@ -0,0 +1,1143 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighFleetOilCardCarExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighFleetOilCardCarExample() { + 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 andFleetOilCardIdIsNull() { + addCriterion("fleet_oil_card_id is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIsNotNull() { + addCriterion("fleet_oil_card_id is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdEqualTo(Long value) { + addCriterion("fleet_oil_card_id =", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotEqualTo(Long value) { + addCriterion("fleet_oil_card_id <>", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThan(Long value) { + addCriterion("fleet_oil_card_id >", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id >=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThan(Long value) { + addCriterion("fleet_oil_card_id <", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id <=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIn(List values) { + addCriterion("fleet_oil_card_id in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotIn(List values) { + addCriterion("fleet_oil_card_id not in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id not between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNull() { + addCriterion("fleet_oil_card_no is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNotNull() { + addCriterion("fleet_oil_card_no is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoEqualTo(String value) { + addCriterion("fleet_oil_card_no =", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotEqualTo(String value) { + addCriterion("fleet_oil_card_no <>", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThan(String value) { + addCriterion("fleet_oil_card_no >", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no >=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThan(String value) { + addCriterion("fleet_oil_card_no <", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no <=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLike(String value) { + addCriterion("fleet_oil_card_no like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotLike(String value) { + addCriterion("fleet_oil_card_no not like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIn(List values) { + addCriterion("fleet_oil_card_no in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotIn(List values) { + addCriterion("fleet_oil_card_no not in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no not between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateIsNull() { + addCriterion("car_license_plate is null"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateIsNotNull() { + addCriterion("car_license_plate is not null"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateEqualTo(String value) { + addCriterion("car_license_plate =", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateNotEqualTo(String value) { + addCriterion("car_license_plate <>", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateGreaterThan(String value) { + addCriterion("car_license_plate >", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateGreaterThanOrEqualTo(String value) { + addCriterion("car_license_plate >=", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateLessThan(String value) { + addCriterion("car_license_plate <", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateLessThanOrEqualTo(String value) { + addCriterion("car_license_plate <=", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateLike(String value) { + addCriterion("car_license_plate like", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateNotLike(String value) { + addCriterion("car_license_plate not like", value, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateIn(List values) { + addCriterion("car_license_plate in", values, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateNotIn(List values) { + addCriterion("car_license_plate not in", values, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateBetween(String value1, String value2) { + addCriterion("car_license_plate between", value1, value2, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andCarLicensePlateNotBetween(String value1, String value2) { + addCriterion("car_license_plate not between", value1, value2, "carLicensePlate"); + return (Criteria) this; + } + + public Criteria andContactNameIsNull() { + addCriterion("contact_name is null"); + return (Criteria) this; + } + + public Criteria andContactNameIsNotNull() { + addCriterion("contact_name is not null"); + return (Criteria) this; + } + + public Criteria andContactNameEqualTo(String value) { + addCriterion("contact_name =", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotEqualTo(String value) { + addCriterion("contact_name <>", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThan(String value) { + addCriterion("contact_name >", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThanOrEqualTo(String value) { + addCriterion("contact_name >=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThan(String value) { + addCriterion("contact_name <", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThanOrEqualTo(String value) { + addCriterion("contact_name <=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLike(String value) { + addCriterion("contact_name like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotLike(String value) { + addCriterion("contact_name not like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameIn(List values) { + addCriterion("contact_name in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotIn(List values) { + addCriterion("contact_name not in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameBetween(String value1, String value2) { + addCriterion("contact_name between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotBetween(String value1, String value2) { + addCriterion("contact_name not between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactPhoneIsNull() { + addCriterion("contact_phone is null"); + return (Criteria) this; + } + + public Criteria andContactPhoneIsNotNull() { + addCriterion("contact_phone is not null"); + return (Criteria) this; + } + + public Criteria andContactPhoneEqualTo(String value) { + addCriterion("contact_phone =", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotEqualTo(String value) { + addCriterion("contact_phone <>", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneGreaterThan(String value) { + addCriterion("contact_phone >", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneGreaterThanOrEqualTo(String value) { + addCriterion("contact_phone >=", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLessThan(String value) { + addCriterion("contact_phone <", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLessThanOrEqualTo(String value) { + addCriterion("contact_phone <=", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLike(String value) { + addCriterion("contact_phone like", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotLike(String value) { + addCriterion("contact_phone not like", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneIn(List values) { + addCriterion("contact_phone in", values, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotIn(List values) { + addCriterion("contact_phone not in", values, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneBetween(String value1, String value2) { + addCriterion("contact_phone between", value1, value2, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotBetween(String value1, String value2) { + addCriterion("contact_phone not between", value1, value2, "contactPhone"); + 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 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 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecord.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecord.java new file mode 100644 index 00000000..5c2b4c7e --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecord.java @@ -0,0 +1,213 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_fleet_oil_card_contact_record + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighFleetOilCardContactRecord implements Serializable { + private Long id; + + /** + * 车队油卡id + */ + private Long fleetOilCardId; + + /** + * 车队油卡卡号 + */ + private String fleetOilCardNo; + + /** + * 内容 + */ + private String content; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + 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 getFleetOilCardId() { + return fleetOilCardId; + } + + public void setFleetOilCardId(Long fleetOilCardId) { + this.fleetOilCardId = fleetOilCardId; + } + + public String getFleetOilCardNo() { + return fleetOilCardNo; + } + + public void setFleetOilCardNo(String fleetOilCardNo) { + this.fleetOilCardNo = fleetOilCardNo; + } + + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + 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 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 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; + } + HighFleetOilCardContactRecord other = (HighFleetOilCardContactRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getFleetOilCardId() == null ? other.getFleetOilCardId() == null : this.getFleetOilCardId().equals(other.getFleetOilCardId())) + && (this.getFleetOilCardNo() == null ? other.getFleetOilCardNo() == null : this.getFleetOilCardNo().equals(other.getFleetOilCardNo())) + && (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (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 + ((getFleetOilCardId() == null) ? 0 : getFleetOilCardId().hashCode()); + result = prime * result + ((getFleetOilCardNo() == null) ? 0 : getFleetOilCardNo().hashCode()); + result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", fleetOilCardId=").append(fleetOilCardId); + sb.append(", fleetOilCardNo=").append(fleetOilCardNo); + sb.append(", content=").append(content); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecordExample.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecordExample.java new file mode 100644 index 00000000..c3f70b78 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardContactRecordExample.java @@ -0,0 +1,943 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighFleetOilCardContactRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighFleetOilCardContactRecordExample() { + 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 andFleetOilCardIdIsNull() { + addCriterion("fleet_oil_card_id is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIsNotNull() { + addCriterion("fleet_oil_card_id is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdEqualTo(Long value) { + addCriterion("fleet_oil_card_id =", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotEqualTo(Long value) { + addCriterion("fleet_oil_card_id <>", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThan(Long value) { + addCriterion("fleet_oil_card_id >", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id >=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThan(Long value) { + addCriterion("fleet_oil_card_id <", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id <=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIn(List values) { + addCriterion("fleet_oil_card_id in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotIn(List values) { + addCriterion("fleet_oil_card_id not in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id not between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNull() { + addCriterion("fleet_oil_card_no is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNotNull() { + addCriterion("fleet_oil_card_no is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoEqualTo(String value) { + addCriterion("fleet_oil_card_no =", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotEqualTo(String value) { + addCriterion("fleet_oil_card_no <>", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThan(String value) { + addCriterion("fleet_oil_card_no >", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no >=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThan(String value) { + addCriterion("fleet_oil_card_no <", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no <=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLike(String value) { + addCriterion("fleet_oil_card_no like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotLike(String value) { + addCriterion("fleet_oil_card_no not like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIn(List values) { + addCriterion("fleet_oil_card_no in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotIn(List values) { + addCriterion("fleet_oil_card_no not in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no not between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andContentIsNull() { + addCriterion("content is null"); + return (Criteria) this; + } + + public Criteria andContentIsNotNull() { + addCriterion("content is not null"); + return (Criteria) this; + } + + public Criteria andContentEqualTo(String value) { + addCriterion("content =", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotEqualTo(String value) { + addCriterion("content <>", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThan(String value) { + addCriterion("content >", value, "content"); + return (Criteria) this; + } + + public Criteria andContentGreaterThanOrEqualTo(String value) { + addCriterion("content >=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThan(String value) { + addCriterion("content <", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLessThanOrEqualTo(String value) { + addCriterion("content <=", value, "content"); + return (Criteria) this; + } + + public Criteria andContentLike(String value) { + addCriterion("content like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentNotLike(String value) { + addCriterion("content not like", value, "content"); + return (Criteria) this; + } + + public Criteria andContentIn(List values) { + addCriterion("content in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentNotIn(List values) { + addCriterion("content not in", values, "content"); + return (Criteria) this; + } + + public Criteria andContentBetween(String value1, String value2) { + addCriterion("content between", value1, value2, "content"); + return (Criteria) this; + } + + public Criteria andContentNotBetween(String value1, String value2) { + addCriterion("content not between", value1, value2, "content"); + 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 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 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardExample.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardExample.java new file mode 100644 index 00000000..97700155 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardExample.java @@ -0,0 +1,1394 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighFleetOilCardExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighFleetOilCardExample() { + 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 andCompanyIdIsNull() { + addCriterion("company_id is null"); + return (Criteria) this; + } + + public Criteria andCompanyIdIsNotNull() { + addCriterion("company_id is not null"); + return (Criteria) this; + } + + public Criteria andCompanyIdEqualTo(Long value) { + addCriterion("company_id =", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotEqualTo(Long value) { + addCriterion("company_id <>", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThan(Long value) { + addCriterion("company_id >", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { + addCriterion("company_id >=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThan(Long value) { + addCriterion("company_id <", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdLessThanOrEqualTo(Long value) { + addCriterion("company_id <=", value, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdIn(List values) { + addCriterion("company_id in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotIn(List values) { + addCriterion("company_id not in", values, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdBetween(Long value1, Long value2) { + addCriterion("company_id between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyIdNotBetween(Long value1, Long value2) { + addCriterion("company_id not between", value1, value2, "companyId"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNull() { + addCriterion("company_name is null"); + return (Criteria) this; + } + + public Criteria andCompanyNameIsNotNull() { + addCriterion("company_name is not null"); + return (Criteria) this; + } + + public Criteria andCompanyNameEqualTo(String value) { + addCriterion("company_name =", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotEqualTo(String value) { + addCriterion("company_name <>", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThan(String value) { + addCriterion("company_name >", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameGreaterThanOrEqualTo(String value) { + addCriterion("company_name >=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThan(String value) { + addCriterion("company_name <", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLessThanOrEqualTo(String value) { + addCriterion("company_name <=", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameLike(String value) { + addCriterion("company_name like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotLike(String value) { + addCriterion("company_name not like", value, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameIn(List values) { + addCriterion("company_name in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotIn(List values) { + addCriterion("company_name not in", values, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameBetween(String value1, String value2) { + addCriterion("company_name between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andCompanyNameNotBetween(String value1, String value2) { + addCriterion("company_name not between", value1, value2, "companyName"); + return (Criteria) this; + } + + public Criteria andOrgIdIsNull() { + addCriterion("org_id is null"); + return (Criteria) this; + } + + public Criteria andOrgIdIsNotNull() { + addCriterion("org_id is not null"); + return (Criteria) this; + } + + public Criteria andOrgIdEqualTo(Long value) { + addCriterion("org_id =", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotEqualTo(Long value) { + addCriterion("org_id <>", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdGreaterThan(Long value) { + addCriterion("org_id >", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdGreaterThanOrEqualTo(Long value) { + addCriterion("org_id >=", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLessThan(Long value) { + addCriterion("org_id <", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdLessThanOrEqualTo(Long value) { + addCriterion("org_id <=", value, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdIn(List values) { + addCriterion("org_id in", values, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotIn(List values) { + addCriterion("org_id not in", values, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdBetween(Long value1, Long value2) { + addCriterion("org_id between", value1, value2, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgIdNotBetween(Long value1, Long value2) { + addCriterion("org_id not between", value1, value2, "orgId"); + return (Criteria) this; + } + + public Criteria andOrgNameIsNull() { + addCriterion("org_name is null"); + return (Criteria) this; + } + + public Criteria andOrgNameIsNotNull() { + addCriterion("org_name is not null"); + return (Criteria) this; + } + + public Criteria andOrgNameEqualTo(String value) { + addCriterion("org_name =", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameNotEqualTo(String value) { + addCriterion("org_name <>", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameGreaterThan(String value) { + addCriterion("org_name >", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameGreaterThanOrEqualTo(String value) { + addCriterion("org_name >=", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameLessThan(String value) { + addCriterion("org_name <", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameLessThanOrEqualTo(String value) { + addCriterion("org_name <=", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameLike(String value) { + addCriterion("org_name like", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameNotLike(String value) { + addCriterion("org_name not like", value, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameIn(List values) { + addCriterion("org_name in", values, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameNotIn(List values) { + addCriterion("org_name not in", values, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameBetween(String value1, String value2) { + addCriterion("org_name between", value1, value2, "orgName"); + return (Criteria) this; + } + + public Criteria andOrgNameNotBetween(String value1, String value2) { + addCriterion("org_name not between", value1, value2, "orgName"); + return (Criteria) this; + } + + public Criteria andCardNoIsNull() { + addCriterion("card_no is null"); + return (Criteria) this; + } + + public Criteria andCardNoIsNotNull() { + addCriterion("card_no is not null"); + return (Criteria) this; + } + + public Criteria andCardNoEqualTo(String value) { + addCriterion("card_no =", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoNotEqualTo(String value) { + addCriterion("card_no <>", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoGreaterThan(String value) { + addCriterion("card_no >", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoGreaterThanOrEqualTo(String value) { + addCriterion("card_no >=", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoLessThan(String value) { + addCriterion("card_no <", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoLessThanOrEqualTo(String value) { + addCriterion("card_no <=", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoLike(String value) { + addCriterion("card_no like", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoNotLike(String value) { + addCriterion("card_no not like", value, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoIn(List values) { + addCriterion("card_no in", values, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoNotIn(List values) { + addCriterion("card_no not in", values, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoBetween(String value1, String value2) { + addCriterion("card_no between", value1, value2, "cardNo"); + return (Criteria) this; + } + + public Criteria andCardNoNotBetween(String value1, String value2) { + addCriterion("card_no not between", value1, value2, "cardNo"); + 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 andContactNameIsNull() { + addCriterion("contact_name is null"); + return (Criteria) this; + } + + public Criteria andContactNameIsNotNull() { + addCriterion("contact_name is not null"); + return (Criteria) this; + } + + public Criteria andContactNameEqualTo(String value) { + addCriterion("contact_name =", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotEqualTo(String value) { + addCriterion("contact_name <>", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThan(String value) { + addCriterion("contact_name >", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThanOrEqualTo(String value) { + addCriterion("contact_name >=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThan(String value) { + addCriterion("contact_name <", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThanOrEqualTo(String value) { + addCriterion("contact_name <=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLike(String value) { + addCriterion("contact_name like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotLike(String value) { + addCriterion("contact_name not like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameIn(List values) { + addCriterion("contact_name in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotIn(List values) { + addCriterion("contact_name not in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameBetween(String value1, String value2) { + addCriterion("contact_name between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotBetween(String value1, String value2) { + addCriterion("contact_name not between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactPhoneIsNull() { + addCriterion("contact_phone is null"); + return (Criteria) this; + } + + public Criteria andContactPhoneIsNotNull() { + addCriterion("contact_phone is not null"); + return (Criteria) this; + } + + public Criteria andContactPhoneEqualTo(String value) { + addCriterion("contact_phone =", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotEqualTo(String value) { + addCriterion("contact_phone <>", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneGreaterThan(String value) { + addCriterion("contact_phone >", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneGreaterThanOrEqualTo(String value) { + addCriterion("contact_phone >=", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLessThan(String value) { + addCriterion("contact_phone <", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLessThanOrEqualTo(String value) { + addCriterion("contact_phone <=", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLike(String value) { + addCriterion("contact_phone like", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotLike(String value) { + addCriterion("contact_phone not like", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneIn(List values) { + addCriterion("contact_phone in", values, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotIn(List values) { + addCriterion("contact_phone not in", values, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneBetween(String value1, String value2) { + addCriterion("contact_phone between", value1, value2, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotBetween(String value1, String value2) { + addCriterion("contact_phone not between", value1, value2, "contactPhone"); + 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 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 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStation.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStation.java new file mode 100644 index 00000000..40d3f728 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStation.java @@ -0,0 +1,261 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_fleet_oil_card_gas_station + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighFleetOilCardGasStation implements Serializable { + private Long id; + + /** + * 车队油卡id + */ + private Long fleetOilCardId; + + /** + * 车队油卡卡号 + */ + private Integer fleetOilCardNo; + + /** + * 油站id + */ + private Long storeId; + + /** + * 油站编号 + */ + private String storeNo; + + /** + * 油站名称 + */ + private String storeName; + + /** + * 油卡状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + 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 getFleetOilCardId() { + return fleetOilCardId; + } + + public void setFleetOilCardId(Long fleetOilCardId) { + this.fleetOilCardId = fleetOilCardId; + } + + public Integer getFleetOilCardNo() { + return fleetOilCardNo; + } + + public void setFleetOilCardNo(Integer fleetOilCardNo) { + this.fleetOilCardNo = fleetOilCardNo; + } + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreNo() { + return storeNo; + } + + public void setStoreNo(String storeNo) { + this.storeNo = storeNo; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } + + 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 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 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; + } + HighFleetOilCardGasStation other = (HighFleetOilCardGasStation) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getFleetOilCardId() == null ? other.getFleetOilCardId() == null : this.getFleetOilCardId().equals(other.getFleetOilCardId())) + && (this.getFleetOilCardNo() == null ? other.getFleetOilCardNo() == null : this.getFleetOilCardNo().equals(other.getFleetOilCardNo())) + && (this.getStoreId() == null ? other.getStoreId() == null : this.getStoreId().equals(other.getStoreId())) + && (this.getStoreNo() == null ? other.getStoreNo() == null : this.getStoreNo().equals(other.getStoreNo())) + && (this.getStoreName() == null ? other.getStoreName() == null : this.getStoreName().equals(other.getStoreName())) + && (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.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (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 + ((getFleetOilCardId() == null) ? 0 : getFleetOilCardId().hashCode()); + result = prime * result + ((getFleetOilCardNo() == null) ? 0 : getFleetOilCardNo().hashCode()); + result = prime * result + ((getStoreId() == null) ? 0 : getStoreId().hashCode()); + result = prime * result + ((getStoreNo() == null) ? 0 : getStoreNo().hashCode()); + result = prime * result + ((getStoreName() == null) ? 0 : getStoreName().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 + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", fleetOilCardId=").append(fleetOilCardId); + sb.append(", fleetOilCardNo=").append(fleetOilCardNo); + sb.append(", storeId=").append(storeId); + sb.append(", storeNo=").append(storeNo); + sb.append(", storeName=").append(storeName); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStationExample.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStationExample.java new file mode 100644 index 00000000..a31ce0dc --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardGasStationExample.java @@ -0,0 +1,1123 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighFleetOilCardGasStationExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighFleetOilCardGasStationExample() { + 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 andFleetOilCardIdIsNull() { + addCriterion("fleet_oil_card_id is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIsNotNull() { + addCriterion("fleet_oil_card_id is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdEqualTo(Long value) { + addCriterion("fleet_oil_card_id =", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotEqualTo(Long value) { + addCriterion("fleet_oil_card_id <>", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThan(Long value) { + addCriterion("fleet_oil_card_id >", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id >=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThan(Long value) { + addCriterion("fleet_oil_card_id <", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id <=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIn(List values) { + addCriterion("fleet_oil_card_id in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotIn(List values) { + addCriterion("fleet_oil_card_id not in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id not between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNull() { + addCriterion("fleet_oil_card_no is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNotNull() { + addCriterion("fleet_oil_card_no is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoEqualTo(Integer value) { + addCriterion("fleet_oil_card_no =", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotEqualTo(Integer value) { + addCriterion("fleet_oil_card_no <>", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThan(Integer value) { + addCriterion("fleet_oil_card_no >", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThanOrEqualTo(Integer value) { + addCriterion("fleet_oil_card_no >=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThan(Integer value) { + addCriterion("fleet_oil_card_no <", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThanOrEqualTo(Integer value) { + addCriterion("fleet_oil_card_no <=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIn(List values) { + addCriterion("fleet_oil_card_no in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotIn(List values) { + addCriterion("fleet_oil_card_no not in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoBetween(Integer value1, Integer value2) { + addCriterion("fleet_oil_card_no between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotBetween(Integer value1, Integer value2) { + addCriterion("fleet_oil_card_no not between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNull() { + addCriterion("store_id is null"); + return (Criteria) this; + } + + public Criteria andStoreIdIsNotNull() { + addCriterion("store_id is not null"); + return (Criteria) this; + } + + public Criteria andStoreIdEqualTo(Long value) { + addCriterion("store_id =", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotEqualTo(Long value) { + addCriterion("store_id <>", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThan(Long value) { + addCriterion("store_id >", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdGreaterThanOrEqualTo(Long value) { + addCriterion("store_id >=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThan(Long value) { + addCriterion("store_id <", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdLessThanOrEqualTo(Long value) { + addCriterion("store_id <=", value, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdIn(List values) { + addCriterion("store_id in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotIn(List values) { + addCriterion("store_id not in", values, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdBetween(Long value1, Long value2) { + addCriterion("store_id between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreIdNotBetween(Long value1, Long value2) { + addCriterion("store_id not between", value1, value2, "storeId"); + return (Criteria) this; + } + + public Criteria andStoreNoIsNull() { + addCriterion("store_no is null"); + return (Criteria) this; + } + + public Criteria andStoreNoIsNotNull() { + addCriterion("store_no is not null"); + return (Criteria) this; + } + + public Criteria andStoreNoEqualTo(String value) { + addCriterion("store_no =", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoNotEqualTo(String value) { + addCriterion("store_no <>", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoGreaterThan(String value) { + addCriterion("store_no >", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoGreaterThanOrEqualTo(String value) { + addCriterion("store_no >=", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoLessThan(String value) { + addCriterion("store_no <", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoLessThanOrEqualTo(String value) { + addCriterion("store_no <=", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoLike(String value) { + addCriterion("store_no like", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoNotLike(String value) { + addCriterion("store_no not like", value, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoIn(List values) { + addCriterion("store_no in", values, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoNotIn(List values) { + addCriterion("store_no not in", values, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoBetween(String value1, String value2) { + addCriterion("store_no between", value1, value2, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNoNotBetween(String value1, String value2) { + addCriterion("store_no not between", value1, value2, "storeNo"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNull() { + addCriterion("store_name is null"); + return (Criteria) this; + } + + public Criteria andStoreNameIsNotNull() { + addCriterion("store_name is not null"); + return (Criteria) this; + } + + public Criteria andStoreNameEqualTo(String value) { + addCriterion("store_name =", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotEqualTo(String value) { + addCriterion("store_name <>", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThan(String value) { + addCriterion("store_name >", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameGreaterThanOrEqualTo(String value) { + addCriterion("store_name >=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThan(String value) { + addCriterion("store_name <", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLessThanOrEqualTo(String value) { + addCriterion("store_name <=", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameLike(String value) { + addCriterion("store_name like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotLike(String value) { + addCriterion("store_name not like", value, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameIn(List values) { + addCriterion("store_name in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotIn(List values) { + addCriterion("store_name not in", values, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameBetween(String value1, String value2) { + addCriterion("store_name between", value1, value2, "storeName"); + return (Criteria) this; + } + + public Criteria andStoreNameNotBetween(String value1, String value2) { + addCriterion("store_name not between", value1, value2, "storeName"); + 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 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 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecord.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecord.java new file mode 100644 index 00000000..fa75419b --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecord.java @@ -0,0 +1,358 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * high_fleet_oil_card_record + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighFleetOilCardRecord implements Serializable { + private Long id; + + /** + * 车队油卡id + */ + private Long fleetOilCardId; + + /** + * 车队油卡卡号 + */ + private String fleetOilCardNo; + + /** + * 类型 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 getFleetOilCardId() { + return fleetOilCardId; + } + + public void setFleetOilCardId(Long fleetOilCardId) { + this.fleetOilCardId = fleetOilCardId; + } + + public String getFleetOilCardNo() { + return fleetOilCardNo; + } + + public void setFleetOilCardNo(String fleetOilCardNo) { + this.fleetOilCardNo = fleetOilCardNo; + } + + 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; + } + HighFleetOilCardRecord other = (HighFleetOilCardRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getFleetOilCardId() == null ? other.getFleetOilCardId() == null : this.getFleetOilCardId().equals(other.getFleetOilCardId())) + && (this.getFleetOilCardNo() == null ? other.getFleetOilCardNo() == null : this.getFleetOilCardNo().equals(other.getFleetOilCardNo())) + && (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 + ((getFleetOilCardId() == null) ? 0 : getFleetOilCardId().hashCode()); + result = prime * result + ((getFleetOilCardNo() == null) ? 0 : getFleetOilCardNo().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(", fleetOilCardId=").append(fleetOilCardId); + sb.append(", fleetOilCardNo=").append(fleetOilCardNo); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecordExample.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecordExample.java new file mode 100644 index 00000000..2eb0fa04 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardRecordExample.java @@ -0,0 +1,1504 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighFleetOilCardRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighFleetOilCardRecordExample() { + 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 andFleetOilCardIdIsNull() { + addCriterion("fleet_oil_card_id is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIsNotNull() { + addCriterion("fleet_oil_card_id is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdEqualTo(Long value) { + addCriterion("fleet_oil_card_id =", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotEqualTo(Long value) { + addCriterion("fleet_oil_card_id <>", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThan(Long value) { + addCriterion("fleet_oil_card_id >", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id >=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThan(Long value) { + addCriterion("fleet_oil_card_id <", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id <=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIn(List values) { + addCriterion("fleet_oil_card_id in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotIn(List values) { + addCriterion("fleet_oil_card_id not in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id not between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNull() { + addCriterion("fleet_oil_card_no is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNotNull() { + addCriterion("fleet_oil_card_no is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoEqualTo(String value) { + addCriterion("fleet_oil_card_no =", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotEqualTo(String value) { + addCriterion("fleet_oil_card_no <>", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThan(String value) { + addCriterion("fleet_oil_card_no >", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no >=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThan(String value) { + addCriterion("fleet_oil_card_no <", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no <=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLike(String value) { + addCriterion("fleet_oil_card_no like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotLike(String value) { + addCriterion("fleet_oil_card_no not like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIn(List values) { + addCriterion("fleet_oil_card_no in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotIn(List values) { + addCriterion("fleet_oil_card_no not in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no not between", value1, value2, "fleetOilCardNo"); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardUser.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardUser.java new file mode 100644 index 00000000..a2f33e8b --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardUser.java @@ -0,0 +1,278 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * high_fleet_oil_card_user + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighFleetOilCardUser implements Serializable { + private Long id; + + /** + * 车队油卡id + */ + private Long fleetOilCardId; + + /** + * 车队油卡卡号 + */ + private String fleetOilCardNo; + + /** + * 联系人姓名 + */ + private String contactName; + + /** + * 联系人手机号 + */ + private String contactPhone; + + /** + * 状态 0:删除 1:正常 2:禁用 + */ + private Integer status; + + /** + * 消费金额 + */ + private BigDecimal amountConsume; + + /** + * 最近消费时间 + */ + private Date latelyConsumeTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 修改时间 + */ + private Date updateTime; + + /** + * 操作人id + */ + private Long opUserId; + + /** + * 操作人名称 + */ + private String opUserName; + + 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 getFleetOilCardId() { + return fleetOilCardId; + } + + public void setFleetOilCardId(Long fleetOilCardId) { + this.fleetOilCardId = fleetOilCardId; + } + + public String getFleetOilCardNo() { + return fleetOilCardNo; + } + + public void setFleetOilCardNo(String fleetOilCardNo) { + this.fleetOilCardNo = fleetOilCardNo; + } + + public String getContactName() { + return contactName; + } + + public void setContactName(String contactName) { + this.contactName = contactName; + } + + public String getContactPhone() { + return contactPhone; + } + + public void setContactPhone(String contactPhone) { + this.contactPhone = contactPhone; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public BigDecimal getAmountConsume() { + return amountConsume; + } + + public void setAmountConsume(BigDecimal amountConsume) { + this.amountConsume = amountConsume; + } + + public Date getLatelyConsumeTime() { + return latelyConsumeTime; + } + + public void setLatelyConsumeTime(Date latelyConsumeTime) { + this.latelyConsumeTime = latelyConsumeTime; + } + + 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 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 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; + } + HighFleetOilCardUser other = (HighFleetOilCardUser) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getFleetOilCardId() == null ? other.getFleetOilCardId() == null : this.getFleetOilCardId().equals(other.getFleetOilCardId())) + && (this.getFleetOilCardNo() == null ? other.getFleetOilCardNo() == null : this.getFleetOilCardNo().equals(other.getFleetOilCardNo())) + && (this.getContactName() == null ? other.getContactName() == null : this.getContactName().equals(other.getContactName())) + && (this.getContactPhone() == null ? other.getContactPhone() == null : this.getContactPhone().equals(other.getContactPhone())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getAmountConsume() == null ? other.getAmountConsume() == null : this.getAmountConsume().equals(other.getAmountConsume())) + && (this.getLatelyConsumeTime() == null ? other.getLatelyConsumeTime() == null : this.getLatelyConsumeTime().equals(other.getLatelyConsumeTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId())) + && (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName())) + && (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 + ((getFleetOilCardId() == null) ? 0 : getFleetOilCardId().hashCode()); + result = prime * result + ((getFleetOilCardNo() == null) ? 0 : getFleetOilCardNo().hashCode()); + result = prime * result + ((getContactName() == null) ? 0 : getContactName().hashCode()); + result = prime * result + ((getContactPhone() == null) ? 0 : getContactPhone().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getAmountConsume() == null) ? 0 : getAmountConsume().hashCode()); + result = prime * result + ((getLatelyConsumeTime() == null) ? 0 : getLatelyConsumeTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode()); + result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().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(", fleetOilCardId=").append(fleetOilCardId); + sb.append(", fleetOilCardNo=").append(fleetOilCardNo); + sb.append(", contactName=").append(contactName); + sb.append(", contactPhone=").append(contactPhone); + sb.append(", status=").append(status); + sb.append(", amountConsume=").append(amountConsume); + sb.append(", latelyConsumeTime=").append(latelyConsumeTime); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", opUserId=").append(opUserId); + sb.append(", opUserName=").append(opUserName); + 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/hai-service/src/main/java/com/hai/entity/HighFleetOilCardUserExample.java b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardUserExample.java new file mode 100644 index 00000000..a1ecb85d --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighFleetOilCardUserExample.java @@ -0,0 +1,1194 @@ +package com.hai.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighFleetOilCardUserExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighFleetOilCardUserExample() { + 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 andFleetOilCardIdIsNull() { + addCriterion("fleet_oil_card_id is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIsNotNull() { + addCriterion("fleet_oil_card_id is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdEqualTo(Long value) { + addCriterion("fleet_oil_card_id =", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotEqualTo(Long value) { + addCriterion("fleet_oil_card_id <>", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThan(Long value) { + addCriterion("fleet_oil_card_id >", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdGreaterThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id >=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThan(Long value) { + addCriterion("fleet_oil_card_id <", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdLessThanOrEqualTo(Long value) { + addCriterion("fleet_oil_card_id <=", value, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdIn(List values) { + addCriterion("fleet_oil_card_id in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotIn(List values) { + addCriterion("fleet_oil_card_id not in", values, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardIdNotBetween(Long value1, Long value2) { + addCriterion("fleet_oil_card_id not between", value1, value2, "fleetOilCardId"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNull() { + addCriterion("fleet_oil_card_no is null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIsNotNull() { + addCriterion("fleet_oil_card_no is not null"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoEqualTo(String value) { + addCriterion("fleet_oil_card_no =", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotEqualTo(String value) { + addCriterion("fleet_oil_card_no <>", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThan(String value) { + addCriterion("fleet_oil_card_no >", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoGreaterThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no >=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThan(String value) { + addCriterion("fleet_oil_card_no <", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLessThanOrEqualTo(String value) { + addCriterion("fleet_oil_card_no <=", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoLike(String value) { + addCriterion("fleet_oil_card_no like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotLike(String value) { + addCriterion("fleet_oil_card_no not like", value, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoIn(List values) { + addCriterion("fleet_oil_card_no in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotIn(List values) { + addCriterion("fleet_oil_card_no not in", values, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andFleetOilCardNoNotBetween(String value1, String value2) { + addCriterion("fleet_oil_card_no not between", value1, value2, "fleetOilCardNo"); + return (Criteria) this; + } + + public Criteria andContactNameIsNull() { + addCriterion("contact_name is null"); + return (Criteria) this; + } + + public Criteria andContactNameIsNotNull() { + addCriterion("contact_name is not null"); + return (Criteria) this; + } + + public Criteria andContactNameEqualTo(String value) { + addCriterion("contact_name =", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotEqualTo(String value) { + addCriterion("contact_name <>", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThan(String value) { + addCriterion("contact_name >", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameGreaterThanOrEqualTo(String value) { + addCriterion("contact_name >=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThan(String value) { + addCriterion("contact_name <", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLessThanOrEqualTo(String value) { + addCriterion("contact_name <=", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameLike(String value) { + addCriterion("contact_name like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotLike(String value) { + addCriterion("contact_name not like", value, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameIn(List values) { + addCriterion("contact_name in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotIn(List values) { + addCriterion("contact_name not in", values, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameBetween(String value1, String value2) { + addCriterion("contact_name between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactNameNotBetween(String value1, String value2) { + addCriterion("contact_name not between", value1, value2, "contactName"); + return (Criteria) this; + } + + public Criteria andContactPhoneIsNull() { + addCriterion("contact_phone is null"); + return (Criteria) this; + } + + public Criteria andContactPhoneIsNotNull() { + addCriterion("contact_phone is not null"); + return (Criteria) this; + } + + public Criteria andContactPhoneEqualTo(String value) { + addCriterion("contact_phone =", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotEqualTo(String value) { + addCriterion("contact_phone <>", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneGreaterThan(String value) { + addCriterion("contact_phone >", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneGreaterThanOrEqualTo(String value) { + addCriterion("contact_phone >=", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLessThan(String value) { + addCriterion("contact_phone <", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLessThanOrEqualTo(String value) { + addCriterion("contact_phone <=", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneLike(String value) { + addCriterion("contact_phone like", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotLike(String value) { + addCriterion("contact_phone not like", value, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneIn(List values) { + addCriterion("contact_phone in", values, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotIn(List values) { + addCriterion("contact_phone not in", values, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneBetween(String value1, String value2) { + addCriterion("contact_phone between", value1, value2, "contactPhone"); + return (Criteria) this; + } + + public Criteria andContactPhoneNotBetween(String value1, String value2) { + addCriterion("contact_phone not between", value1, value2, "contactPhone"); + 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 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 andLatelyConsumeTimeIsNull() { + addCriterion("lately_consume_time is null"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeIsNotNull() { + addCriterion("lately_consume_time is not null"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeEqualTo(Date value) { + addCriterion("lately_consume_time =", value, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeNotEqualTo(Date value) { + addCriterion("lately_consume_time <>", value, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeGreaterThan(Date value) { + addCriterion("lately_consume_time >", value, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeGreaterThanOrEqualTo(Date value) { + addCriterion("lately_consume_time >=", value, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeLessThan(Date value) { + addCriterion("lately_consume_time <", value, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeLessThanOrEqualTo(Date value) { + addCriterion("lately_consume_time <=", value, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeIn(List values) { + addCriterion("lately_consume_time in", values, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeNotIn(List values) { + addCriterion("lately_consume_time not in", values, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeBetween(Date value1, Date value2) { + addCriterion("lately_consume_time between", value1, value2, "latelyConsumeTime"); + return (Criteria) this; + } + + public Criteria andLatelyConsumeTimeNotBetween(Date value1, Date value2) { + addCriterion("lately_consume_time not between", value1, value2, "latelyConsumeTime"); + 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 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 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/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java index f4619c2f..5bdb6d65 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNo.java @@ -14,7 +14,7 @@ import java.util.Date; **/ public class HighGasOilGunNo implements Serializable { /** - * 主键 + * 主键r */ private Long id; @@ -31,7 +31,7 @@ public class HighGasOilGunNo implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -95,11 +95,11 @@ public class HighGasOilGunNo implements Serializable { this.storeId = storeId; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java index 3727950e..e0765e89 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilGunNoExample.java @@ -315,52 +315,62 @@ public class HighGasOilGunNoExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + 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) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java index 5e2eb4a5..a2c6fa57 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPrice.java @@ -26,7 +26,7 @@ public class HighGasOilPrice implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -43,6 +43,11 @@ public class HighGasOilPrice implements Serializable { */ private BigDecimal gasStationDrop; + /** + * 成本价 + */ + private BigDecimal priceCost; + /** * 优惠价 */ @@ -58,11 +63,6 @@ public class HighGasOilPrice implements Serializable { */ private BigDecimal priceOfficial; - /** - * 成本价 - */ - private BigDecimal priceCost; - /** * 油品类型 1:汽油:2:柴油;3:天然气 */ @@ -102,11 +102,11 @@ public class HighGasOilPrice implements Serializable { this.merchantStoreId = merchantStoreId; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } @@ -134,6 +134,14 @@ public class HighGasOilPrice implements Serializable { this.gasStationDrop = gasStationDrop; } + public BigDecimal getPriceCost() { + return priceCost; + } + + public void setPriceCost(BigDecimal priceCost) { + this.priceCost = priceCost; + } + public BigDecimal getPriceVip() { return priceVip; } @@ -158,14 +166,6 @@ public class HighGasOilPrice implements Serializable { this.priceOfficial = priceOfficial; } - public BigDecimal getPriceCost() { - return priceCost; - } - - public void setPriceCost(BigDecimal priceCost) { - this.priceCost = priceCost; - } - public Integer getOilType() { return oilType; } @@ -232,10 +232,10 @@ public class HighGasOilPrice implements Serializable { && (this.getOilNoName() == null ? other.getOilNoName() == null : this.getOilNoName().equals(other.getOilNoName())) && (this.getPreferentialMargin() == null ? other.getPreferentialMargin() == null : this.getPreferentialMargin().equals(other.getPreferentialMargin())) && (this.getGasStationDrop() == null ? other.getGasStationDrop() == null : this.getGasStationDrop().equals(other.getGasStationDrop())) + && (this.getPriceCost() == null ? other.getPriceCost() == null : this.getPriceCost().equals(other.getPriceCost())) && (this.getPriceVip() == null ? other.getPriceVip() == null : this.getPriceVip().equals(other.getPriceVip())) && (this.getPriceGun() == null ? other.getPriceGun() == null : this.getPriceGun().equals(other.getPriceGun())) && (this.getPriceOfficial() == null ? other.getPriceOfficial() == null : this.getPriceOfficial().equals(other.getPriceOfficial())) - && (this.getPriceCost() == null ? other.getPriceCost() == null : this.getPriceCost().equals(other.getPriceCost())) && (this.getOilType() == null ? other.getOilType() == null : this.getOilType().equals(other.getOilType())) && (this.getOilTypeName() == null ? other.getOilTypeName() == null : this.getOilTypeName().equals(other.getOilTypeName())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) @@ -254,10 +254,10 @@ public class HighGasOilPrice implements Serializable { result = prime * result + ((getOilNoName() == null) ? 0 : getOilNoName().hashCode()); result = prime * result + ((getPreferentialMargin() == null) ? 0 : getPreferentialMargin().hashCode()); result = prime * result + ((getGasStationDrop() == null) ? 0 : getGasStationDrop().hashCode()); + result = prime * result + ((getPriceCost() == null) ? 0 : getPriceCost().hashCode()); result = prime * result + ((getPriceVip() == null) ? 0 : getPriceVip().hashCode()); result = prime * result + ((getPriceGun() == null) ? 0 : getPriceGun().hashCode()); result = prime * result + ((getPriceOfficial() == null) ? 0 : getPriceOfficial().hashCode()); - result = prime * result + ((getPriceCost() == null) ? 0 : getPriceCost().hashCode()); result = prime * result + ((getOilType() == null) ? 0 : getOilType().hashCode()); result = prime * result + ((getOilTypeName() == null) ? 0 : getOilTypeName().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); @@ -279,10 +279,10 @@ public class HighGasOilPrice implements Serializable { sb.append(", oilNoName=").append(oilNoName); sb.append(", preferentialMargin=").append(preferentialMargin); sb.append(", gasStationDrop=").append(gasStationDrop); + sb.append(", priceCost=").append(priceCost); sb.append(", priceVip=").append(priceVip); sb.append(", priceGun=").append(priceGun); sb.append(", priceOfficial=").append(priceOfficial); - sb.append(", priceCost=").append(priceCost); sb.append(", oilType=").append(oilType); sb.append(", oilTypeName=").append(oilTypeName); sb.append(", status=").append(status); diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java index 59f713d7..1b816d10 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceExample.java @@ -255,52 +255,62 @@ public class HighGasOilPriceExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + 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) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } @@ -495,6 +505,66 @@ public class HighGasOilPriceExample { return (Criteria) this; } + public Criteria andPriceCostIsNull() { + addCriterion("price_cost is null"); + return (Criteria) this; + } + + public Criteria andPriceCostIsNotNull() { + addCriterion("price_cost is not null"); + return (Criteria) this; + } + + public Criteria andPriceCostEqualTo(BigDecimal value) { + addCriterion("price_cost =", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostNotEqualTo(BigDecimal value) { + addCriterion("price_cost <>", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostGreaterThan(BigDecimal value) { + addCriterion("price_cost >", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price_cost >=", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostLessThan(BigDecimal value) { + addCriterion("price_cost <", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostLessThanOrEqualTo(BigDecimal value) { + addCriterion("price_cost <=", value, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostIn(List values) { + addCriterion("price_cost in", values, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostNotIn(List values) { + addCriterion("price_cost not in", values, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_cost between", value1, value2, "priceCost"); + return (Criteria) this; + } + + public Criteria andPriceCostNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price_cost not between", value1, value2, "priceCost"); + return (Criteria) this; + } + public Criteria andPriceVipIsNull() { addCriterion("price_vip is null"); return (Criteria) this; @@ -675,66 +745,6 @@ public class HighGasOilPriceExample { return (Criteria) this; } - public Criteria andPriceCostIsNull() { - addCriterion("price_cost is null"); - return (Criteria) this; - } - - public Criteria andPriceCostIsNotNull() { - addCriterion("price_cost is not null"); - return (Criteria) this; - } - - public Criteria andPriceCostEqualTo(BigDecimal value) { - addCriterion("price_cost =", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostNotEqualTo(BigDecimal value) { - addCriterion("price_cost <>", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostGreaterThan(BigDecimal value) { - addCriterion("price_cost >", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("price_cost >=", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostLessThan(BigDecimal value) { - addCriterion("price_cost <", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostLessThanOrEqualTo(BigDecimal value) { - addCriterion("price_cost <=", value, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostIn(List values) { - addCriterion("price_cost in", values, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostNotIn(List values) { - addCriterion("price_cost not in", values, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("price_cost between", value1, value2, "priceCost"); - return (Criteria) this; - } - - public Criteria andPriceCostNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("price_cost not between", value1, value2, "priceCost"); - return (Criteria) this; - } - public Criteria andOilTypeIsNull() { addCriterion("oil_type is null"); return (Criteria) this; diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java index 9354ddac..372cf6f8 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficial.java @@ -31,7 +31,7 @@ public class HighGasOilPriceOfficial implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -90,11 +90,11 @@ public class HighGasOilPriceOfficial implements Serializable { this.regionName = regionName; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java index 1f03fb63..ec0a3379 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceOfficialExample.java @@ -325,52 +325,62 @@ public class HighGasOilPriceOfficialExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + 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) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java index d1f65131..3e9ed372 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTask.java @@ -62,7 +62,7 @@ public class HighGasOilPriceTask implements Serializable { /** * 油号 */ - private Integer oilNo; + private String oilNo; /** * 油品名称 @@ -194,11 +194,11 @@ public class HighGasOilPriceTask implements Serializable { this.oilTypeName = oilTypeName; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java index 4527ab1a..969417b2 100644 --- a/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java +++ b/hai-service/src/main/java/com/hai/entity/HighGasOilPriceTaskExample.java @@ -726,52 +726,62 @@ public class HighGasOilPriceTaskExample { return (Criteria) this; } - public Criteria andOilNoEqualTo(Integer value) { + public Criteria andOilNoEqualTo(String value) { addCriterion("oil_no =", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotEqualTo(Integer value) { + public Criteria andOilNoNotEqualTo(String value) { addCriterion("oil_no <>", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThan(Integer value) { + public Criteria andOilNoGreaterThan(String value) { addCriterion("oil_no >", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoGreaterThanOrEqualTo(Integer value) { + public Criteria andOilNoGreaterThanOrEqualTo(String value) { addCriterion("oil_no >=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThan(Integer value) { + public Criteria andOilNoLessThan(String value) { addCriterion("oil_no <", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoLessThanOrEqualTo(Integer value) { + public Criteria andOilNoLessThanOrEqualTo(String value) { addCriterion("oil_no <=", value, "oilNo"); return (Criteria) this; } - public Criteria andOilNoIn(List values) { + 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) { + public Criteria andOilNoNotIn(List values) { addCriterion("oil_no not in", values, "oilNo"); return (Criteria) this; } - public Criteria andOilNoBetween(Integer value1, Integer value2) { + public Criteria andOilNoBetween(String value1, String value2) { addCriterion("oil_no between", value1, value2, "oilNo"); return (Criteria) this; } - public Criteria andOilNoNotBetween(Integer value1, Integer value2) { + public Criteria andOilNoNotBetween(String value1, String value2) { addCriterion("oil_no not between", value1, value2, "oilNo"); return (Criteria) this; } diff --git a/hai-service/src/main/java/com/hai/enum_type/CompanyAmountSourceTypeEnum.java b/hai-service/src/main/java/com/hai/enum_type/CompanyAmountSourceTypeEnum.java index d194752e..271d7c7d 100644 --- a/hai-service/src/main/java/com/hai/enum_type/CompanyAmountSourceTypeEnum.java +++ b/hai-service/src/main/java/com/hai/enum_type/CompanyAmountSourceTypeEnum.java @@ -7,7 +7,8 @@ package com.hai.enum_type; public enum CompanyAmountSourceTypeEnum { type1(1, "金额充值"), type2(2, "油卡充值"), - type3(3, "回收余额") + type3(3, "回收余额"), + type4(4, "车队油卡充值") ; private Integer type; diff --git a/hai-service/src/main/java/com/hai/enum_type/FleetOilCardStatusEnum.java b/hai-service/src/main/java/com/hai/enum_type/FleetOilCardStatusEnum.java new file mode 100644 index 00000000..2947bbc9 --- /dev/null +++ b/hai-service/src/main/java/com/hai/enum_type/FleetOilCardStatusEnum.java @@ -0,0 +1,36 @@ +package com.hai.enum_type; + +/** + * 油卡状态 + * @author hurui + */ +public enum FleetOilCardStatusEnum { + status0(0 , "删除"), + status1(1 , "正常"), + status2(2 , "禁用"), + ; + + private Integer status; + private String name; + + FleetOilCardStatusEnum(int status , String name) { + this.status = status; + this.name = name; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java b/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java index bf095719..cd8d5bc5 100644 --- a/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java +++ b/hai-service/src/main/java/com/hai/enum_type/JinZhuJiaYouOilNo.java @@ -7,19 +7,19 @@ import java.util.Objects; */ public enum JinZhuJiaYouOilNo { - NO_0("NO_0",0, "0#",1, "柴油"), - NO_92("NO_92",92, "92#",2, "汽油"), - NO_95("NO_95",95, "95#",2, "汽油"), - NO_98("NO_98",98, "98#",2, "汽油"), + NO_0("NO_0","0", "0#",1, "柴油"), + NO_92("NO_92","92", "92#",2, "汽油"), + NO_95("NO_95","95", "95#",2, "汽油"), + NO_98("NO_98","98", "98#",2, "汽油"), ; private String oilNoCode; - private Integer oilNo; + private String oilNo; private String oilNoName; private Integer oilType; private String oilTypeName; - JinZhuJiaYouOilNo(String oilNoCode,Integer oilNo,String oilNoName,Integer oilType,String oilTypeName) { + JinZhuJiaYouOilNo(String oilNoCode,String oilNo,String oilNoName,Integer oilType,String oilTypeName) { this.oilNoCode = oilNoCode; this.oilNo = oilNo; this.oilNoName = oilNoName; @@ -49,11 +49,11 @@ public enum JinZhuJiaYouOilNo { this.oilNoCode = oilNoCode; } - public Integer getOilNo() { + public String getOilNo() { return oilNo; } - public void setOilNo(Integer oilNo) { + public void setOilNo(String oilNo) { this.oilNo = oilNo; } diff --git a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java index a4aa0f53..dc7b8bfa 100644 --- a/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java +++ b/hai-service/src/main/java/com/hai/enum_type/MerchantStoreSourceType.java @@ -9,6 +9,7 @@ public enum MerchantStoreSourceType { type2(2, "团油门店"), type3(3, "加好油"), type4(4, "金猪加油"), + type5(5, "paylo"), ; private Integer number; diff --git a/hai-service/src/main/java/com/hai/enum_type/UserCardType.java b/hai-service/src/main/java/com/hai/enum_type/UserCardType.java index 4b669342..af4218ce 100644 --- a/hai-service/src/main/java/com/hai/enum_type/UserCardType.java +++ b/hai-service/src/main/java/com/hai/enum_type/UserCardType.java @@ -8,7 +8,8 @@ import java.util.Objects; public enum UserCardType { type1(1, "汇联通工会卡"), - type2(2, "嗨森逛油卡"), + type2(2, "嗨森逛个人油卡"), + type3(3, "嗨森逛车队油卡"), ; private Integer type; diff --git a/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java b/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java index 0fd7fd86..f92c389e 100644 --- a/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java +++ b/hai-service/src/main/java/com/hai/order/service/OrderRefundService.java @@ -65,5 +65,4 @@ public interface OrderRefundService { */ List getRefundByRefundNo(String refundOrderNo); - } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java index 168d767f..e67e3635 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayService.java @@ -20,11 +20,19 @@ public interface OrderPayService { HighOrder hltCardPay(HighOrder order, HighUserCard userCard) throws Exception; /** - * 嗨森逛油卡支付 + * 嗨森逛个人油卡支付 * @param order 订单数据 * @param userCard 用户卡号 * @return */ HighOrder oilCardPay(HighOrder order, HighUserCard userCard); + /** + * 嗨森逛车队油卡支付 + * @param order 订单数据 + * @param userCard 用户卡号 + * @return + */ + HighOrder oilCardFleetPay(HighOrder order, HighUserCard userCard); + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java index 414a959e..ba59b694 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPayServiceImpl.java @@ -18,6 +18,7 @@ import com.hai.order.type.OrderChildStatus; import com.hai.order.type.OrderPayType; import com.hai.order.type.OrderProductType; import com.hai.order.type.OrderStatus; +import com.hai.service.HighFleetOilCardService; import com.hai.service.HighOilCardService; import com.hai.service.HighUserCardService; import org.springframework.stereotype.Service; @@ -44,6 +45,9 @@ public class OrderPayServiceImpl implements OrderPayService { @Resource private HighOilCardService oilCardService; + @Resource + private HighFleetOilCardService fleetOilCardService; + @Resource private OrderService orderService; @@ -115,4 +119,24 @@ public class OrderPayServiceImpl implements OrderPayService { order.getPayPrice(), userCard); } + + @Override + public HighOrder oilCardFleetPay(HighOrder order, HighUserCard userCard) { + // 油卡扣款 + Map consumeMap = new HashMap<>(); + consumeMap.put("sourceType", OilCardRecordSourceTypeEnum.type2.getType()); + consumeMap.put("sourceId", order.getId()); + consumeMap.put("sourceOrderNo", order.getOrderNo()); + consumeMap.put("sourceContent", "订单号:" + order.getOrderNo() + ",消费:¥" + order.getPayPrice()); + fleetOilCardService.consume(userCard.getCardNo(), order.getMemPhone(), order.getPayPrice(), consumeMap); + + // 处理订单业务 + return orderPaySuccessService.orderPaySuccessHandle( + order.getOrderNo(), + OrderPayType.PAY_TYPE8, + null, + order.getPayPrice(), + userCard); + } + } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java index 7bef96e0..b2bbd856 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java @@ -71,6 +71,9 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { @Resource private JinZhuJiaYouService jinZhuJiaYouService; + @Resource + private PayloService payloService; + @Resource private HighGasOrderPushMapper highGasOrderPushMapper; @@ -315,6 +318,17 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService { // 推送金猪加油 jinZhuJiaYouService.payOrder(order.getOrderNo(), gasOrder.getGasPriceChannelPay()); + } else if (gasOrder.getChannelType().equals(MerchantStoreSourceType.type5.getNumber())) { + // 推送paylo四川壳牌 + payloService.syncYcShellPaymentNotify(order.getOrderNo(), + store.getStoreKey(), + gasOrder.getPayTime(), + order.getTotalPrice(), + gasOrder.getGasOilNo(), + gasOrder.getGasGunNo(), + order.getPayablePrice(), + order.getTotalDeductionPrice() + ); } } } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java index 6c93b19e..d5a06170 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java @@ -19,6 +19,7 @@ import com.hai.order.service.OrderRefundService; import com.hai.order.service.OrderService; import com.hai.order.type.*; import com.hai.order.utils.OrderUtil; +import com.hai.service.HighFleetOilCardService; import com.hai.service.HighOilCardService; import com.hai.service.HighUserService; import org.apache.commons.collections4.MapUtils; @@ -55,6 +56,9 @@ public class OrderRefundServiceImpl implements OrderRefundService { @Resource private HighOilCardService oilCardService; + @Resource + private HighFleetOilCardService fleetOilCardService; + @Override public void update(HighOrderRefund orderRefund) { orderRefundMapper.updateByPrimaryKey(orderRefund); @@ -204,6 +208,11 @@ public class OrderRefundServiceImpl implements OrderRefundService { // 油卡退款 oilCardService.refund(order.getOrderNo()); refundPriceModel.setRefundSuccess(true); + + } else if (orderPayType.getNumber().equals(OrderPayType.PAY_TYPE8.getNumber())) { + // 油卡退款 + fleetOilCardService.refund(order.getOrderNo()); + refundPriceModel.setRefundSuccess(true); } } catch (Exception e) { @@ -269,9 +278,10 @@ public class OrderRefundServiceImpl implements OrderRefundService { } @Override - public List getRefundByRefundNo(String refundOrderNo) { + public List getRefundByRefundNo(String refundOrderNo) { HighOrderRefundExample example = new HighOrderRefundExample(); example.createCriteria().andRefundOrderNoEqualTo(refundOrderNo); + example.setOrderByClause("create_time desc"); return orderRefundMapper.selectByExample(example); } diff --git a/hai-service/src/main/java/com/hai/order/type/OrderPayType.java b/hai-service/src/main/java/com/hai/order/type/OrderPayType.java index 95a25155..830a7607 100644 --- a/hai-service/src/main/java/com/hai/order/type/OrderPayType.java +++ b/hai-service/src/main/java/com/hai/order/type/OrderPayType.java @@ -15,7 +15,8 @@ public enum OrderPayType { PAY_TYPE4(4, "贵州汇联通工会卡"), PAY_TYPE5(5, "银联"), PAY_TYPE6(6, "银联分期"), - PAY_TYPE7(7, "嗨森逛油卡"), + PAY_TYPE7(7, "嗨森逛个人油卡"), + PAY_TYPE8(8, "嗨森逛车队油卡"), ; private Integer number; diff --git a/hai-service/src/main/java/com/hai/service/HighFleetOilCardCarService.java b/hai-service/src/main/java/com/hai/service/HighFleetOilCardCarService.java new file mode 100644 index 00000000..defc2e40 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighFleetOilCardCarService.java @@ -0,0 +1,41 @@ +package com.hai.service; + +import com.hai.entity.HighFleetOilCardCar; + +import java.util.List; +import java.util.Map; + +/** + * @className: HighFleetOilCardCarService + * @author: HuRui + * @date: 2022/12/19 + **/ +public interface HighFleetOilCardCarService { + + /** + * 编辑数据 + * @param fleetOilCardCar + */ + void editData(HighFleetOilCardCar fleetOilCardCar); + + /** + * 批量增加 + * @param fleetOilCardCarList + */ + void batchInsert(List fleetOilCardCarList); + + /** + * 根据id查询详情 + * @param id + * @return + */ + HighFleetOilCardCar getDetailById(Long id); + + /** + * 查询车辆列表 + * @param param + * @return + */ + List getCarList(Map param); + +} diff --git a/hai-service/src/main/java/com/hai/service/HighFleetOilCardRecordService.java b/hai-service/src/main/java/com/hai/service/HighFleetOilCardRecordService.java new file mode 100644 index 00000000..3220d585 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighFleetOilCardRecordService.java @@ -0,0 +1,27 @@ +package com.hai.service; + +import com.hai.entity.HighFleetOilCardRecord; + +import java.util.List; +import java.util.Map; + +/** + * @className: HighFleetOilCardRecordService + * @author: HuRui + * @date: 2022/12/12 + **/ +public interface HighFleetOilCardRecordService { + + /** + * 增加记录 + * @param fleetOilCardRecord + */ + void insertRecord(HighFleetOilCardRecord fleetOilCardRecord); + + /** + * 查询记录列表 + * @param param + * @return + */ + List getRecordList(Map param); +} diff --git a/hai-service/src/main/java/com/hai/service/HighFleetOilCardService.java b/hai-service/src/main/java/com/hai/service/HighFleetOilCardService.java new file mode 100644 index 00000000..dbdfff05 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighFleetOilCardService.java @@ -0,0 +1,101 @@ +package com.hai.service; + +import com.hai.entity.HighFleetOilCard; +import com.hai.model.OilCardOrderModel; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** + * 车队油卡服务 + * @className: HighFleetOilCardService + * @author: HuRui + * @date: 2022/12/12 + **/ +public interface HighFleetOilCardService { + + /** + * 编辑数据 + * @param fleetOilCard + */ + void editData(HighFleetOilCard fleetOilCard); + + /** + * 油卡充值 + * @param fleetCardNo 车队油卡卡号 + * @param price 充值金额 + * @param orgId 部门id + */ + void recharge(String fleetCardNo, BigDecimal price, Long orgId); + + /** + * 回收余额 + * @param fleetCardNo 车队油卡卡号 + */ + void recycleAmount(String fleetCardNo); + + /** + * 查询车队油卡详情 + * @param fleetCardNo 卡号 + * @return + */ + HighFleetOilCard getFleetOilCardByCardNo(String fleetCardNo); + + /** + * 油卡消费 + * @param fleetCardNo 车队油卡卡号 + * @param contactPhone 使用人电话 + * @param amount 充值金额 + * @param otherParam 其他参数 + */ + void consume(String fleetCardNo, String contactPhone,BigDecimal amount, Map otherParam); + + /** + * 订单退款 + * @param orderNo 订单号 + */ + void refund(String orderNo); + + /** + * 生成油卡 + * @param orgId 部门id + * @param generateNum 生成数量 + */ + void generateCard(Long orgId, Integer generateNum); + + /** + * 绑定联系人 + * @param cardNo 卡号 + * @param contactName 联系人名称 + * @param contactPhone 联系人手机号 + */ + void setContact(String cardNo,String contactName, String contactPhone); + + /** + * 禁用 + * @param fleetCardNo 车队油卡卡号 + */ + void disabled(String fleetCardNo); + + /** + * 启用 + * @param fleetCardNo 车队油卡卡号 + */ + void enable(String fleetCardNo); + + /** + * 查询油卡列表 + * @param param 参数 + * @return + */ + List getFleetOilCardList(Map param); + + /** + * 查询油卡订单列表 + * @param param + * @return + */ + List getFleetOilCardOrderList(Map param) throws Exception; + +} diff --git a/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java b/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java new file mode 100644 index 00000000..8aef95c9 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighFleetOilCardUserService.java @@ -0,0 +1,62 @@ +package com.hai.service; + +import com.hai.entity.HighFleetOilCard; +import com.hai.entity.HighFleetOilCardUser; + +import java.util.List; +import java.util.Map; + +/** + * @className: HighFleetOilCardUserService + * @author: HuRui + * @date: 2022/12/12 + **/ +public interface HighFleetOilCardUserService { + + /** + * 编辑用户 + * @param fleetOilCardUser + */ + void editUser(HighFleetOilCardUser fleetOilCardUser); + + /** + * + * @param fleetOilCardUserList + */ + void importData(HighFleetOilCard fleetOilCard, List fleetOilCardUserList) throws Exception; + + /** + * 根据iD查询详情 + * @param id + * @return + */ + HighFleetOilCardUser getDetailById(Long id); + + /** + * 删除 + * @param id + */ + void delete(Long id); + + /** + * 查询用户列表 + * @param param + * @return + */ + List getUserList(Map param); + + /** + * 根据油卡查询用户列表 + * @param cardId + * @return + */ + List getUserListByCard(Long cardId); + + /** + * 获取油卡用户 + * @param fleetCardNo + * @param contactPhone + * @return + */ + HighFleetOilCardUser getCardUser(String fleetCardNo, String contactPhone); +} diff --git a/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java b/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java index 48821757..b9ce9dec 100644 --- a/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java +++ b/hai-service/src/main/java/com/hai/service/HighGasOilPriceOfficialService.java @@ -17,7 +17,7 @@ public interface HighGasOilPriceOfficialService { * @param regionId * @param oilNo */ - void editPrice(Long regionId, Integer oilNo, BigDecimal price); + void editPrice(Long regionId, String oilNo, BigDecimal price); /** * 查询价格 @@ -25,7 +25,7 @@ public interface HighGasOilPriceOfficialService { * @param oilNo * @return */ - HighGasOilPriceOfficial getPrice(Long regionId, Integer oilNo); + HighGasOilPriceOfficial getPrice(Long regionId, String oilNo); /** * 查询价格列表 @@ -44,5 +44,5 @@ public interface HighGasOilPriceOfficialService { * @param regionId 区域 * @param oilNo 油品 */ - void refreshGasPriceOfficial(Long regionId, Integer oilNo); + void refreshGasPriceOfficial(Long regionId, String oilNo); } diff --git a/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java b/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java index 62af2ade..11c0df1a 100644 --- a/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java +++ b/hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java @@ -26,7 +26,7 @@ public interface HighGasOilPriceService { * @param oilNo * @return */ - HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId,Integer oilNo); + HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId,String oilNo); /** * 根据门店id 查询 @@ -41,7 +41,7 @@ public interface HighGasOilPriceService { * @param oilNo * @return */ - List getPriceListByRegionAndOilNo(Long regionId, Integer oilNo); + List getPriceListByRegionAndOilNo(Long regionId, String oilNo); /** * 根据区域和油号查询门店 diff --git a/hai-service/src/main/java/com/hai/service/HighGasService.java b/hai-service/src/main/java/com/hai/service/HighGasService.java index 51c360e7..5cc098f6 100644 --- a/hai-service/src/main/java/com/hai/service/HighGasService.java +++ b/hai-service/src/main/java/com/hai/service/HighGasService.java @@ -14,6 +14,12 @@ public interface HighGasService { */ void getJiaHaoYouAllStation() throws Exception; + /** + * 四川壳牌 + * 获取渠道商【Paylo】全量加油站 + */ + void getPayloAllStation() throws Exception; + /** * 获取渠道商【金猪加油】全量加油站 */ diff --git a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardCarServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardCarServiceImpl.java new file mode 100644 index 00000000..b8efa806 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardCarServiceImpl.java @@ -0,0 +1,84 @@ +package com.hai.service.impl; + +import com.hai.dao.HighFleetOilCardCarMapper; +import com.hai.entity.HighFleetOilCardCar; +import com.hai.entity.HighFleetOilCardCarExample; +import com.hai.service.HighFleetOilCardCarService; +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 javax.annotation.Resource; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @className: HighFleetOilCardCarServiceImpl + * @author: HuRui + * @date: 2022/12/19 + **/ +@Service("fleetOilCardCarService") +public class HighFleetOilCardCarServiceImpl implements HighFleetOilCardCarService { + + @Resource + private HighFleetOilCardCarMapper fleetOilCardCarMapper; + + @Override + public void editData(HighFleetOilCardCar fleetOilCardCar) { + if (fleetOilCardCar.getId() == null) { + fleetOilCardCar.setCreateTime(new Date()); + fleetOilCardCar.setUpdateTime(new Date()); + fleetOilCardCarMapper.insert(fleetOilCardCar); + } else { + fleetOilCardCar.setUpdateTime(new Date()); + fleetOilCardCarMapper.updateByPrimaryKey(fleetOilCardCar); + } + } + + @Override + @Transactional(propagation = Propagation.REQUIRES_NEW) + public void batchInsert(List fleetOilCardCarList) { + for (HighFleetOilCardCar fleetOilCardCar : fleetOilCardCarList){ + editData(fleetOilCardCar); + } + } + + @Override + public HighFleetOilCardCar getDetailById(Long id) { + return fleetOilCardCarMapper.selectByPrimaryKey(id); + } + + @Override + public List getCarList(Map param) { + HighFleetOilCardCarExample example = new HighFleetOilCardCarExample(); + HighFleetOilCardCarExample.Criteria criteria = example.createCriteria() + .andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "fleetOilCardId") != null) { + criteria.andFleetOilCardIdEqualTo(MapUtils.getLong(param, "fleetOilCardId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "fleetOilCardNo"))) { + criteria.andFleetOilCardNoLike("%"+MapUtils.getString(param, "fleetOilCardNo")+"%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "carLicensePlate"))) { + criteria.andCarLicensePlateLike("%"+MapUtils.getString(param, "carLicensePlate")+"%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactName"))) { + criteria.andContactNameLike("%"+MapUtils.getString(param, "contactName")+"%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactPhone"))) { + criteria.andContactPhoneLike("%"+MapUtils.getString(param, "contactPhone")+"%"); + } + + example.setOrderByClause("create_time desc"); + return fleetOilCardCarMapper.selectByExample(example); + } + +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardRecordServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardRecordServiceImpl.java new file mode 100644 index 00000000..ca44fd21 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardRecordServiceImpl.java @@ -0,0 +1,91 @@ +package com.hai.service.impl; + +import com.hai.common.security.UserCenter; +import com.hai.dao.HighFleetOilCardRecordMapper; +import com.hai.entity.HighFleetOilCardRecord; +import com.hai.entity.HighFleetOilCardRecordExample; +import com.hai.model.HighUserModel; +import com.hai.model.UserInfoModel; +import com.hai.service.HighFleetOilCardRecordService; +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: HighFleetOilCardRecordServiceImpl + * @author: HuRui + * @date: 2022/12/12 + **/ +@Service("fleetOilCardRecordService") +public class HighFleetOilCardRecordServiceImpl implements HighFleetOilCardRecordService { + + @Resource + private HighFleetOilCardRecordMapper fleetOilCardRecordMapper; + + @Resource + private UserCenter userCenter; + + @Override + public void insertRecord(HighFleetOilCardRecord fleetOilCardRecord) { + fleetOilCardRecord.setOpUserType(0); + fleetOilCardRecord.setOpUserId(0L); + fleetOilCardRecord.setOpUserName("未知"); + fleetOilCardRecord.setOpUserPhone("未知"); + + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + if (userInfoModel != null) { + fleetOilCardRecord.setOpUserType(1); + fleetOilCardRecord.setOpUserId(userInfoModel.getSecUser().getId()); + fleetOilCardRecord.setOpUserName(userInfoModel.getSecUser().getUserName()); + fleetOilCardRecord.setOpUserPhone(userInfoModel.getSecUser().getTelephone()); + } + HighUserModel userModel = userCenter.getSessionModel(HighUserModel.class); + if (userModel != null) { + fleetOilCardRecord.setOpUserType(2); + fleetOilCardRecord.setOpUserId(userModel.getHighUser().getId()); + fleetOilCardRecord.setOpUserName(userModel.getHighUser().getName()); + fleetOilCardRecord.setOpUserPhone(userModel.getHighUser().getPhone()); + } + fleetOilCardRecord.setCreateTime(new Date()); + fleetOilCardRecord.setStatus(1); + fleetOilCardRecordMapper.insert(fleetOilCardRecord); + } + + @Override + public List getRecordList(Map param) { + HighFleetOilCardRecordExample example = new HighFleetOilCardRecordExample(); + HighFleetOilCardRecordExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (StringUtils.isNotBlank(MapUtils.getString(param, "fleetOilCardNo"))) { + criteria.andFleetOilCardNoLike("%"+MapUtils.getString(param, "fleetOilCardNo")+"%"); + } + + if (MapUtils.getInteger(param, "type") != null) { + criteria.andTypeEqualTo(MapUtils.getInteger(param, "type")); + } + + if (MapUtils.getInteger(param, "sourceType") != null) { + criteria.andSourceTypeEqualTo(MapUtils.getInteger(param, "sourceType")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "sourceOrderNo"))) { + criteria.andSourceOrderNoEqualTo("%"+MapUtils.getString(param, "sourceOrderNo")+"%"); + } + + if (MapUtils.getInteger(param, "opUserType") != null) { + criteria.andOpUserTypeEqualTo(MapUtils.getInteger(param, "opUserType")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "opUserPhone"))) { + criteria.andOpUserPhoneLike("%"+MapUtils.getString(param, "opUserPhone")+"%"); + } + + example.setOrderByClause("create_time desc"); + return fleetOilCardRecordMapper.selectByExample(example); + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java new file mode 100644 index 00000000..e7417097 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardServiceImpl.java @@ -0,0 +1,463 @@ +package com.hai.service.impl; + +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.BankNumberUtil; +import com.hai.common.utils.DateUtil; +import com.hai.dao.HighFleetOilCardMapper; +import com.hai.entity.*; +import com.hai.enum_type.*; +import com.hai.model.OilCardOrderModel; +import com.hai.model.UserInfoModel; +import com.hai.order.service.OrderService; +import com.hai.service.*; +import org.apache.commons.collections4.MapUtils; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +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.time.Duration; +import java.util.*; + +/** + * @className: HighFleetOilCardServiceImpl + * @author: HuRui + * @date: 2022/12/12 + **/ +@Service("fleetOilCardService") +public class HighFleetOilCardServiceImpl implements HighFleetOilCardService { + + @Resource + private HighFleetOilCardMapper fleetOilCardMapper; + + @Resource + private HighFleetOilCardRecordService fleetOilCardRecordService; + + @Resource + private HighFleetOilCardUserService fleetOilCardUserService; + + @Resource + private HighCompanyAccountService companyAccountService; + + @Resource + private BsCompanyService companyService; + + @Resource + private BsOrganizationService organizationService; + +/* @Resource + private HighOrderService orderService;*/ + + @Resource + private OrderService orderService; + @Autowired + private RedisTemplate redisTemplate; + + @Resource + private UserCenter userCenter; + + private final String LOCK_KEY = "lock_"; + + @Override + public void editData(HighFleetOilCard fleetOilCard) { + if (fleetOilCard.getId() == null) { + fleetOilCard.setCreateTime(new Date()); + fleetOilCard.setUpdateTime(new Date()); + fleetOilCardMapper.insert(fleetOilCard); + } else { + fleetOilCard.setUpdateTime(new Date()); + fleetOilCardMapper.updateByPrimaryKey(fleetOilCard); + } + } + + @Override + @Transactional(propagation = Propagation.REQUIRES_NEW) + public void recharge(String fleetCardNo, BigDecimal price, Long orgId) { + // 查询车队油卡 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(fleetCardNo); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡卡号错误"); + } + if (!oilCard.getStatus().equals(OilCardStatusEnum.status1.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡不处于正常状态"); + } + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(LOCK_KEY+fleetCardNo, ""); + if (!lock) { + try { + Thread.sleep(100); + } catch (Exception e) { + e.printStackTrace(); + } + recharge(fleetCardNo, price, orgId); + } + try { + // 获取锁成功 + // 账户扣款 + Map consumeType = new HashMap<>(); + consumeType.put("sourceType", CompanyAmountSourceTypeEnum.type4.getType()); + consumeType.put("sourceId", oilCard.getId()); + consumeType.put("sourceContent", "车队油卡:"+oilCard.getCardNo()+",充值:¥"+price.toString()); + companyAccountService.consume(orgId, price, consumeType); + + // 变更前金额 + BigDecimal beforeAmount = oilCard.getAmount(); + // 计算金额 + oilCard.setAmount(oilCard.getAmount().add(price)); + editData(oilCard); + // 变更后金额 + BigDecimal afterAmount = oilCard.getAmount(); + + HighFleetOilCardRecord record = new HighFleetOilCardRecord(); + record.setFleetOilCardId(oilCard.getId()); + record.setFleetOilCardNo(oilCard.getCardNo()); + record.setType(OilCardRecordTypeEnum.type1.getType()); + record.setTransactionAmount(price); + record.setBeforeAmount(beforeAmount); + record.setAfterAmount(afterAmount); + record.setSourceType(OilCardRecordSourceTypeEnum.type1.getType()); + try { + record.setSourceOrderNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); + } catch (Exception e) { + e.printStackTrace(); + } + record.setSourceContent("充值油卡金额:" + record.getTransactionAmount()); + fleetOilCardRecordService.insertRecord(record); + + } finally { + redisTemplate.delete(LOCK_KEY+fleetCardNo); + } + } + + @Override + @Transactional(propagation = Propagation.REQUIRES_NEW) + public void recycleAmount(String fleetCardNo) { + // 查询车队油卡 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(fleetCardNo); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡卡号错误"); + } + if (!oilCard.getStatus().equals(OilCardStatusEnum.status1.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡不处于正常状态"); + } + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(LOCK_KEY+fleetCardNo, ""); + if (!lock) { + try { + Thread.sleep(100); + } catch (Exception e) { + e.printStackTrace(); + } + recycleAmount(fleetCardNo); + } + try { + // 账户进账 + Map rechargeType = new HashMap<>(); + rechargeType.put("sourceType", CompanyAmountSourceTypeEnum.type3.getType()); + rechargeType.put("sourceId", oilCard.getId()); + rechargeType.put("sourceContent", "油卡:" + oilCard.getCardNo() + ",回收余额:¥" + oilCard.getAmount()); + companyAccountService.recharge(oilCard.getOrgId(), oilCard.getAmount(), rechargeType); + + // 变更前金额 + BigDecimal beforeAmount = oilCard.getAmount(); + BigDecimal price = oilCard.getAmount(); + // 计算金额 + oilCard.setAmount(new BigDecimal("0")); + editData(oilCard); + // 变更后金额 + BigDecimal afterAmount = oilCard.getAmount(); + + HighFleetOilCardRecord record = new HighFleetOilCardRecord(); + record.setFleetOilCardId(oilCard.getId()); + record.setFleetOilCardNo(oilCard.getCardNo()); + record.setType(OilCardRecordTypeEnum.type2.getType()); + record.setTransactionAmount(price); + record.setBeforeAmount(beforeAmount); + record.setAfterAmount(afterAmount); + record.setSourceType(OilCardRecordSourceTypeEnum.type4.getType()); + try { + record.setSourceOrderNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss")); + } catch (Exception e) { + e.printStackTrace(); + } + record.setSourceContent("回收油卡余额:" + price); + fleetOilCardRecordService.insertRecord(record); + } finally { + redisTemplate.delete(LOCK_KEY+fleetCardNo); + } + } + + @Override + public HighFleetOilCard getFleetOilCardByCardNo(String fleetCardNo) { + HighFleetOilCardExample example = new HighFleetOilCardExample(); + example.createCriteria().andCardNoEqualTo(fleetCardNo).andStatusNotEqualTo(0); + List list = fleetOilCardMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } + + @Override + @Transactional(propagation = Propagation.REQUIRES_NEW) + public void consume(String fleetCardNo,String contactPhone, BigDecimal amount, Map otherParam) { + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(LOCK_KEY+fleetCardNo, ""); + if (!lock) { + try { + Thread.sleep(100); + } catch (Exception e) { + e.printStackTrace(); + } + consume(fleetCardNo, contactPhone, amount, otherParam); + } + try { + // 查询车队油卡 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(fleetCardNo); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡卡号错误"); + } + if (!oilCard.getStatus().equals(OilCardStatusEnum.status1.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态异常,暂无法消费"); + } + // 油卡余额 是否小于 消费余额 + if (oilCard.getAmount().compareTo(amount) == -1) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡余额不足"); + } + // 油卡用户 + HighFleetOilCardUser cardUser = fleetOilCardUserService.getCardUser(oilCard.getCardNo(), contactPhone); + if (cardUser == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡未绑定" + contactPhone+"手机号"); + } + cardUser.setAmountConsume(cardUser.getAmountConsume().add(amount)); + cardUser.setLatelyConsumeTime(new Date()); + fleetOilCardUserService.editUser(cardUser); + + // 变更前金额 + BigDecimal beforeAmount = oilCard.getAmount(); + // 计算消费后金额 + oilCard.setAmount(oilCard.getAmount().subtract(amount)); + // 累积消费金额 + oilCard.setAmountConsume(oilCard.getAmountConsume().add(amount)); + editData(oilCard); + // 变更后金额 + BigDecimal afterAmount = oilCard.getAmount(); + + HighFleetOilCardRecord record = new HighFleetOilCardRecord(); + record.setFleetOilCardId(oilCard.getId()); + record.setFleetOilCardNo(oilCard.getCardNo()); + record.setType(OilCardRecordTypeEnum.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")); + fleetOilCardRecordService.insertRecord(record); + + } finally { + redisTemplate.delete(LOCK_KEY+fleetCardNo); + } + } + + @Override + @Transactional(propagation = Propagation.REQUIRES_NEW) + public void refund(String orderNo) { + HighOrder order = orderService.getOrderDetailByNo(orderNo); + if (order == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的的订单"); + } + if (!order.getOrderStatus().equals(OrderStatusEnum.type2.getType()) + || !order.getOrderStatus().equals(OrderStatusEnum.type3.getType()) + || !order.getOrderStatus().equals(OrderStatusEnum.type7.getType()) + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单当前状态无法退款"); + } + if (!order.getPayType().equals(OrderPayTypeEnum.type7.getType())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "支付方式,不是油卡"); + } + if (StringUtils.isBlank(order.getMemCardNo())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油卡卡号"); + } + // 获取锁 + Boolean lock = redisTemplate.opsForValue().setIfAbsent(LOCK_KEY+order.getMemCardNo(), ""); + if (!lock) { + try { + Thread.sleep(100); + } catch (Exception e) { + e.printStackTrace(); + } + refund(orderNo); + } + + // 查询油卡卡号 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(order.getMemCardNo()); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的油卡卡号"); + } + try { + order.setOrderStatus(4); + order.setRefundTime(new Date()); + orderService.updateOrderData(order); + + // 变更前金额 + BigDecimal beforeAmount = oilCard.getAmount(); + // 计算金额 + oilCard.setAmount(oilCard.getAmount().add(order.getPayRealPrice())); + oilCard.setAmountConsume(oilCard.getAmountConsume().subtract(order.getPayRealPrice())); + editData(oilCard); + // 变更后金额 + BigDecimal afterAmount = oilCard.getAmount(); + + HighFleetOilCardRecord record = new HighFleetOilCardRecord(); + record.setFleetOilCardId(oilCard.getId()); + record.setFleetOilCardNo(oilCard.getCardNo()); + record.setType(OilCardRecordTypeEnum.type1.getType()); + record.setTransactionAmount(order.getPayRealPrice()); + record.setBeforeAmount(beforeAmount); + record.setAfterAmount(afterAmount); + record.setSourceType(OilCardRecordSourceTypeEnum.type3.getType()); + record.setSourceId(order.getId()); + try { + record.setSourceOrderNo(orderNo); + } catch (Exception e) { + e.printStackTrace(); + } + record.setSourceContent("订单号:" + orderNo + ",退款金额:" + order.getPayRealPrice()); + fleetOilCardRecordService.insertRecord(record); + + } finally { + redisTemplate.delete(LOCK_KEY+ oilCard.getCardNo()); + } + } + + @Override + public void generateCard(Long orgId, Integer generateNum) { + UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); + // 查询部门信息 + BsOrganization organization = organizationService.findById(orgId); + if (organization == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到部门"); + } + BsCompany company = companyService.getCompanyById(organization.getCompanyId()); + + HighFleetOilCard oilCard; + for (int i = 0; i < generateNum; i++) { + oilCard = new HighFleetOilCard(); + oilCard.setCompanyId(organization.getCompanyId()); + oilCard.setCompanyName(company.getName()); + oilCard.setOrgId(organization.getId()); + oilCard.setOrgName(organization.getName()); + oilCard.setAmount(new BigDecimal("0")); + oilCard.setAmountConsume(new BigDecimal("0")); + oilCard.setCardNo(BankNumberUtil.getBrankNumber("8")); + oilCard.setOpUserId(userInfoModel.getSecUser().getId()); + oilCard.setOpUserName(userInfoModel.getSecUser().getUserName()); + oilCard.setCreateTime(new Date()); + oilCard.setUpdateTime(new Date()); + oilCard.setStatus(FleetOilCardStatusEnum.status1.getStatus()); + editData(oilCard); + } + } + + @Override + public void setContact(String cardNo, String contactName, String contactPhone) { + // 查询油卡 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(cardNo); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油卡"); + } + oilCard.setContactName(contactName); + oilCard.setContactPhone(contactPhone); + editData(oilCard); + } + + @Override + public void disabled(String fleetCardNo) { + // 查询油卡 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(fleetCardNo); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油卡"); + } + if (!oilCard.getStatus().equals(FleetOilCardStatusEnum.status1.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态错误"); + } + oilCard.setStatus(FleetOilCardStatusEnum.status2.getStatus()); + editData(oilCard); + } + + @Override + public void enable(String fleetCardNo) { + // 查询油卡 + HighFleetOilCard oilCard = getFleetOilCardByCardNo(fleetCardNo); + if (oilCard == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油卡"); + } + if (!oilCard.getStatus().equals(FleetOilCardStatusEnum.status2.getStatus())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "油卡状态错误"); + } + oilCard.setStatus(FleetOilCardStatusEnum.status1.getStatus()); + editData(oilCard); + } + + @Override + public List getFleetOilCardList(Map param) { + HighFleetOilCardExample example = new HighFleetOilCardExample(); + HighFleetOilCardExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (MapUtils.getLong(param, "companyId") != null) { + criteria.andCompanyIdEqualTo(MapUtils.getLong(param, "companyId")); + } + + if (MapUtils.getLong(param, "orgId") != null) { + criteria.andOrgIdEqualTo(MapUtils.getLong(param, "orgId")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "cardNo"))) { + criteria.andCardNoLike("%" + MapUtils.getString(param, "cardNo") + "%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactName"))) { + criteria.andContactNameLike("%" + MapUtils.getString(param, "contactName") + "%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactPhone"))) { + criteria.andContactPhoneLike("%" + MapUtils.getString(param, "contactPhone") + "%"); + } + + if (MapUtils.getLong(param, "createTimeS") != null) { + criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS"))); + } + + if (MapUtils.getLong(param, "createTimeE") != null) { + criteria.andCreateTimeLessThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeE"))); + } + + if (MapUtils.getInteger(param, "status") != null) { + criteria.andStatusEqualTo(MapUtils.getInteger(param, "status")); + } + + example.setOrderByClause("create_time desc"); + return fleetOilCardMapper.selectByExample(example); + } + + @Override + public List getFleetOilCardOrderList(Map param) throws Exception { + if (MapUtils.getLong(param, "payTimeS") != null) { + param.put("payTimeS", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeS")), "yyyy-MM-dd HH:mm:ss")); + } + + if (MapUtils.getLong(param, "payTimeE") != null) { + param.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(param, "payTimeE")), "yyyy-MM-dd HH:mm:ss")); + } + return fleetOilCardMapper.selectOilCardOrderList(param); + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java new file mode 100644 index 00000000..a2944595 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighFleetOilCardUserServiceImpl.java @@ -0,0 +1,162 @@ +package com.hai.service.impl; + +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.dao.HighFleetOilCardUserMapper; +import com.hai.entity.*; +import com.hai.enum_type.UserCardType; +import com.hai.service.HighFleetOilCardUserService; +import com.hai.service.HighUserCardService; +import com.hai.service.HighUserService; +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 javax.annotation.Resource; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * @className: HighFleetOilCardUserServiceImpl + * @author: HuRui + * @date: 2022/12/12 + **/ +@Service("fleetOilCardUserService") +public class HighFleetOilCardUserServiceImpl implements HighFleetOilCardUserService { + + @Resource + private HighFleetOilCardUserMapper fleetOilCardUserMapper; + + @Resource + private HighUserService userService; + + @Resource + private HighUserCardService userCardService; + + @Override + public void editUser(HighFleetOilCardUser fleetOilCardUser) { + if (fleetOilCardUser.getId() == null) { + fleetOilCardUser.setCreateTime(new Date()); + fleetOilCardUser.setUpdateTime(new Date()); + fleetOilCardUserMapper.insert(fleetOilCardUser); + } else { + fleetOilCardUser.setUpdateTime(new Date()); + fleetOilCardUserMapper.updateByPrimaryKey(fleetOilCardUser); + } + } + + @Override + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) + public void importData(HighFleetOilCard fleetOilCard, List fleetOilCardUserList) throws Exception { + for (HighFleetOilCardUser fleetOilCardUser : fleetOilCardUserList) { + if (StringUtils.isBlank(fleetOilCardUser.getContactName()) + || StringUtils.isBlank(fleetOilCardUser.getContactPhone())) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + fleetOilCardUser.setFleetOilCardId(fleetOilCard.getId()); + fleetOilCardUser.setFleetOilCardNo(fleetOilCard.getCardNo()); + fleetOilCardUser.setAmountConsume(new BigDecimal("0")); + fleetOilCardUser.setStatus(1); + editUser(fleetOilCardUser); + + // 查询用户信息 + HighUser user = userService.findByPhone(fleetOilCardUser.getContactPhone()); + if (user == null) { + user = new HighUser(); + user.setName(fleetOilCardUser.getContactName()); + user.setPhone(fleetOilCardUser.getContactPhone()); + user.setRegTime(new Date()); + user.setGold(0); + user.setStatus(1); + // 用户信息完整状态 + // 0:完整 + // 1:需要填写用户信息 + // 2:需要填写手机号 + user.setInfoCompleteStatus(1); + // TODO 需要修改 + userService.insertUser(user , null, null); + } + + // 是否绑定油卡 + HighUserCard userCard = userCardService.getDetailByUserCardNo(user.getId(), fleetOilCard.getCardNo()); + if (userCard == null) { + userCardService.bindCard(UserCardType.type3.getType(), fleetOilCard.getCardNo(), user.getId()); + } + + } + } + + @Override + public HighFleetOilCardUser getDetailById(Long id) { + return fleetOilCardUserMapper.selectByPrimaryKey(id); + } + + @Override + @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) + public void delete(Long id) { + HighFleetOilCardUser detail = getDetailById(id); + if (detail == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到数据"); + } + detail.setStatus(0); + editUser(detail); + + // 查询用户信息 + HighUser user = userService.findByPhone(detail.getContactPhone()); + if (user != null) { + HighUserCard userCard = userCardService.getDetailByUserCardNo(user.getId(), detail.getFleetOilCardNo()); + if (userCard != null) { + userCard.setStatus(0); + userCardService.editCard(userCard); + } + } + } + + @Override + public List getUserList(Map param) { + HighFleetOilCardUserExample example = new HighFleetOilCardUserExample(); + HighFleetOilCardUserExample.Criteria criteria = example.createCriteria().andStatusNotEqualTo(0); + + if (StringUtils.isNotBlank(MapUtils.getString(param, "fleetOilCardNo"))) { + criteria.andFleetOilCardNoEqualTo(MapUtils.getString(param, "fleetOilCardNo")); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactName"))) { + criteria.andContactNameLike("%"+MapUtils.getString(param, "contactName")+"%"); + } + + if (StringUtils.isNotBlank(MapUtils.getString(param, "contactPhone"))) { + criteria.andContactPhoneLike("%"+MapUtils.getString(param, "contactPhone")+"%"); + } + + example.setOrderByClause("create_time desc"); + return fleetOilCardUserMapper.selectByExample(example); + } + + @Override + public List getUserListByCard(Long cardId) { + HighFleetOilCardUserExample example = new HighFleetOilCardUserExample(); + example.createCriteria().andStatusNotEqualTo(0).andFleetOilCardIdEqualTo(cardId); + example.setOrderByClause("create_time desc"); + return fleetOilCardUserMapper.selectByExample(example); + } + + @Override + public HighFleetOilCardUser getCardUser(String fleetCardNo, String contactPhone) { + HighFleetOilCardUserExample example = new HighFleetOilCardUserExample(); + example.createCriteria() + .andFleetOilCardNoEqualTo(fleetCardNo) + .andContactPhoneEqualTo(contactPhone) + .andStatusNotEqualTo(0); + List list = fleetOilCardUserMapper.selectByExample(example); + if (list.size() > 0) { + return list.get(0); + } + return null; + } +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java index f11608de..7d71b985 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasDiscountOilPriceServiceImpl.java @@ -135,7 +135,7 @@ public class HighGasDiscountOilPriceServiceImpl implements HighGasDiscountOilPri discount = discount.divide(new BigDecimal("100")); // 查询油站价格 - HighGasOilPrice gasOilPrice = gasOilPriceService.getGasOilPriceByStoreAndOilNo(goodsId, Integer.parseInt(oilNo)); + HighGasOilPrice gasOilPrice = gasOilPriceService.getGasOilPriceByStoreAndOilNo(goodsId, oilNo); if (gasOilPrice == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到油站价格"); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java index d53fcbfd..b8454f7d 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceOfficialServiceImpl.java @@ -32,7 +32,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici private CommonService commonService; @Override - public void editPrice(Long regionId, Integer oilNo, BigDecimal price) { + public void editPrice(Long regionId, String oilNo, BigDecimal price) { HighGasOilPriceOfficial priceOfficial = getPrice(regionId, oilNo); if (priceOfficial != null) { priceOfficial.setPriceOfficial(price); @@ -44,7 +44,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici priceOfficial = new HighGasOilPriceOfficial(); priceOfficial.setRegionId(region.getRegionId()); priceOfficial.setRegionName(region.getRegionName()); - priceOfficial.setOilNo(Integer.valueOf(oil.getCodeValue())); + priceOfficial.setOilNo(oil.getCodeValue()); priceOfficial.setOilNoName(oil.getCodeName()); priceOfficial.setPriceOfficial(price); priceOfficial.setOilType(Integer.valueOf(oil.getExt1())); @@ -55,7 +55,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici } @Override - public HighGasOilPriceOfficial getPrice(Long regionId, Integer oilNo) { + public HighGasOilPriceOfficial getPrice(Long regionId, String oilNo) { HighGasOilPriceOfficialExample example = new HighGasOilPriceOfficialExample(); example.createCriteria().andRegionIdEqualTo(regionId).andOilNoEqualTo(oilNo); List list = gasOilPriceOfficialMapper.selectByExample(example); @@ -78,8 +78,8 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici criteria.andRegionIdEqualTo(MapUtils.getLong(param, "regionId")); } - if (MapUtils.getInteger(param, "oilNo") != null) { - criteria.andOilNoEqualTo(MapUtils.getInteger(param, "oilNo")); + if (StringUtils.isNotBlank(MapUtils.getString(param, "oilNo"))) { + criteria.andOilNoEqualTo(MapUtils.getString(param, "oilNo")); } if (MapUtils.getInteger(param, "oilType") != null) { @@ -107,22 +107,22 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici if (region != null) { BigDecimal oilNo92 = oilObject.getBigDecimal("p92"); if (oilNo92 != null) { - editPrice(region.getRegionId(), 92, oilNo92); + editPrice(region.getRegionId(), "92", oilNo92); } BigDecimal oilNo95 = oilObject.getBigDecimal("p95"); if (oilNo95 != null) { - editPrice(region.getRegionId(), 95, oilNo95); + editPrice(region.getRegionId(), "95", oilNo95); } BigDecimal oilNo98 = oilObject.getBigDecimal("p98"); if (oilNo98 != null) { - editPrice(region.getRegionId(), 98, oilNo98); + editPrice(region.getRegionId(), "98", oilNo98); } BigDecimal oilNo0 = oilObject.getBigDecimal("p0"); if (oilNo0 != null) { - editPrice(region.getRegionId(), 0, oilNo0); + editPrice(region.getRegionId(), "0", oilNo0); } } @@ -131,7 +131,7 @@ public class HighGasOilPriceOfficialServiceImpl implements HighGasOilPriceOffici } @Override - public void refreshGasPriceOfficial(Long regionId, Integer oilNo) { + public void refreshGasPriceOfficial(Long regionId, String oilNo) { Map param = new HashMap<>(); param.put("regionId", regionId); param.put("oilNo", oilNo); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java index cc68ce89..6c977417 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java @@ -33,7 +33,7 @@ public class HighGasOilPriceServiceImpl implements HighGasOilPriceService { } @Override - public HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId, Integer oilNo) { + public HighGasOilPrice getGasOilPriceByStoreAndOilNo(Long storeId, String oilNo) { HighGasOilPriceExample example = new HighGasOilPriceExample(); example.createCriteria().andMerchantStoreIdEqualTo(storeId).andOilNoEqualTo(oilNo).andStatusNotEqualTo(0); List list = highGasOilPriceMapper.selectByExample(example); @@ -51,7 +51,7 @@ public class HighGasOilPriceServiceImpl implements HighGasOilPriceService { } @Override - public List getPriceListByRegionAndOilNo(Long regionId, Integer oilNo) { + public List getPriceListByRegionAndOilNo(Long regionId, String oilNo) { return highGasOilPriceMapper.selectPriceListByRegionAndOilNo(regionId,oilNo); } diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java index 83be2968..1e4da558 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceTaskServiceImpl.java @@ -190,8 +190,8 @@ public class HighGasOilPriceTaskServiceImpl implements HighGasOilPriceTaskServic criteria.andOilTypeEqualTo(MapUtils.getInteger(param, "oilType")); } - if (MapUtils.getInteger(param, "oilNo") != null) { - criteria.andOilNoEqualTo(MapUtils.getInteger(param, "oilNo")); + if (StringUtils.isNotBlank(MapUtils.getString(param, "oilNo"))) { + criteria.andOilNoEqualTo(MapUtils.getString(param, "oilNo")); } if (MapUtils.getInteger(param, "priceType") != null) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java index 991d6c5b..19ef21c7 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java @@ -8,6 +8,7 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.config.CommonSysConst; import com.hai.config.JinZhuJiaYouService; +import com.hai.config.PayloService; import com.hai.config.ShellGroupService; import com.hai.entity.*; import com.hai.enum_type.JinZhuJiaYouOilNo; @@ -15,6 +16,7 @@ import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; import com.hai.service.*; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; @@ -46,6 +48,9 @@ public class HighGasServiceImpl implements HighGasService { @Resource private HighGasOilGunNoService gasOilGunNoService; + @Resource + private PayloService payloService; + @Resource private CommonService commonService; @@ -91,11 +96,11 @@ public class HighGasServiceImpl implements HighGasService { for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 - HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("goodsCode")); + HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("goodsCode")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); @@ -134,7 +139,7 @@ public class HighGasServiceImpl implements HighGasService { } else { highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); @@ -202,7 +207,7 @@ public class HighGasServiceImpl implements HighGasService { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); HighGasOilPrice highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("goodsCode")); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("listedPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); @@ -242,6 +247,204 @@ public class HighGasServiceImpl implements HighGasService { } } + @Override + public void getPayloAllStation() throws Exception { + HighMerchantModel merchant = highMerchantService.getDetailByKey("HF0801103822"); + + JSONObject pObject = payloService.ycShellPageQueryAllStation(1, 50); + JSONObject pageInfo = JSON.parseObject(pObject.getString("pageInfo"), JSONObject.class); + + // 总页数 + Integer totalPageNo = pageInfo.getBigDecimal("totalCount").divide(pageInfo.getBigDecimal("pageSize"),0, BigDecimal.ROUND_CEILING).intValue(); + for (int pageNum = 1; pageNum <= totalPageNo; pageNum++) { + // 查询加油站列表 + JSONObject respObject = payloService.ycShellPageQueryAllStation(pageNum, 50); + JSONArray stationArray = JSONObject.parseObject(respObject.getString("infoList"), JSONArray.class); + for (Object stationObject : stationArray) { + JSONObject station = (JSONObject) stationObject; + + // 查询油站 + HighMerchantStore store = highMerchantStoreService.getMerStoreDetailByKey(station.getString("stationCode")); + + if (store != null) { + store.setPrestoreType(0); + store.setMerchantId(merchant.getId()); + store.setCompanyId(merchant.getCompanyId()); + store.setStoreKey(station.getString("stationCode")); + store.setStoreName(station.getString("stationName")); + store.setStoreLogo(CommonSysConst.getSysConfig().getGasDefaultOilStationImg()); + store.setRegionId(station.getLong("provinceId")); + store.setRegionName(station.getString("provinceName")); + store.setAddress(station.getString("stationAddress")); + store.setLongitude(station.getString("longitude")); + store.setLatitude(station.getString("latitude")); + store.setStatus(station.getString("status").equals("ABLE")?1:2); + store.setOperatorId(0L); + store.setOperatorName("系统创建"); + store.setUpdateTime(new Date()); + highMerchantStoreService.updateMerchantStoreDetail(store); + + JSONArray oilPriceList = station.getJSONArray("oilPriceList"); + for (Object oilPrice : oilPriceList) { + JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); + // 查询门店油号 + HighGasOilPrice highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("goodsCode")); + if (highGasOilPrice == null) { + highGasOilPrice = new HighGasOilPrice(); + highGasOilPrice.setMerchantStoreId(store.getId()); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); + highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); + highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + + // 油品类型 1:汽油:2:柴油;3:天然气 + if (StringUtils.isNotBlank(oilPriceObject.getString("goodsGroupType"))) { + if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { + highGasOilPrice.setOilType(1); + highGasOilPrice.setOilTypeName("汽油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { + highGasOilPrice.setOilType(2); + highGasOilPrice.setOilTypeName("柴油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { + highGasOilPrice.setOilType(3); + highGasOilPrice.setOilTypeName("天然气"); + } + highGasOilPriceService.editGasOilPrice(highGasOilPrice); + } + + JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); + for (Object o : oilGunNoList) { + HighGasOilGunNo gasOilGunNo = gasOilGunNoService.getDetailByStoreAndGunNo(highGasOilPrice.getMerchantStoreId(), Integer.parseInt(o.toString())); + if (gasOilGunNo == null) { + gasOilGunNo = new HighGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); + gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); + gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(highGasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); + gasOilGunNo.setStatus(1); + gasOilGunNoService.editGunNo(gasOilGunNo); + } + } + + } else { + highGasOilPrice.setMerchantStoreId(store.getId()); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); + highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); + highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + + // 油品类型 1:汽油:2:柴油;3:天然气 + if (StringUtils.isNotBlank(oilPriceObject.getString("goodsGroupType"))) { + if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { + highGasOilPrice.setOilType(1); + highGasOilPrice.setOilTypeName("汽油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { + highGasOilPrice.setOilType(2); + highGasOilPrice.setOilTypeName("柴油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { + highGasOilPrice.setOilType(3); + highGasOilPrice.setOilTypeName("天然气"); + } + highGasOilPriceService.editGasOilPrice(highGasOilPrice); + } + + JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); + for (Object o : oilGunNoList) { + HighGasOilGunNo gasOilGunNo = gasOilGunNoService.getDetailByStoreAndGunNo(highGasOilPrice.getMerchantStoreId(), Integer.parseInt(o.toString())); + if (gasOilGunNo == null) { + gasOilGunNo = new HighGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); + gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); + gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(highGasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); + gasOilGunNo.setStatus(1); + gasOilGunNoService.editGunNo(gasOilGunNo); + } + } + } + } + } else { + store = new HighMerchantStore(); + store.setPrestoreType(0); + store.setType(1); + store.setSourceType(MerchantStoreSourceType.type5.getNumber()); + store.setMerchantId(merchant.getId()); + store.setCompanyId(merchant.getCompanyId()); + store.setStoreKey(station.getString("stationCode")); + store.setStoreName(station.getString("stationName")); + store.setStoreLogo(CommonSysConst.getSysConfig().getGasDefaultOilStationImg()); + store.setRegionId(station.getLong("provinceId")); + store.setRegionName(station.getString("provinceName")); + store.setAddress(station.getString("stationAddress")); + store.setLongitude(station.getString("longitude")); + store.setLatitude(station.getString("latitude")); + store.setStatus(station.getString("status").equals("ABLE")?1:2); + store.setOperatorId(0L); + store.setOperatorName("系统创建"); + store.setCreateTime(new Date()); + store.setUpdateTime(new Date()); + + HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); + BeanUtils.copyProperties(store, merchantStoreModel); + highMerchantStoreService.insertMerchantStore(merchantStoreModel); + + JSONArray oilPriceList = station.getJSONArray("oilPriceList"); + for (Object oilPrice : oilPriceList) { + JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); + HighGasOilPrice highGasOilPrice = new HighGasOilPrice(); + highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); + highGasOilPrice.setOilNo(oilPriceObject.getString("goodsCode")); + highGasOilPrice.setOilNoName(oilPriceObject.getString("goodsCode") + "#"); + highGasOilPrice.setPreferentialMargin(new BigDecimal("0")); + highGasOilPrice.setGasStationDrop(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount").subtract(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount"))); + highGasOilPrice.setPriceVip(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceGun(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + highGasOilPrice.setPriceOfficial(oilPriceObject.getJSONObject("goodsPrice").getBigDecimal("amount")); + + // 油品类型 1:汽油:2:柴油;3:天然气 + if (StringUtils.isNotBlank(oilPriceObject.getString("goodsGroupType"))) { + if (oilPriceObject.getString("goodsGroupType").equals("GASOLINE")) { + highGasOilPrice.setOilType(1); + highGasOilPrice.setOilTypeName("汽油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("DIESEL_OIL")) { + highGasOilPrice.setOilType(2); + highGasOilPrice.setOilTypeName("柴油"); + } else if (oilPriceObject.getString("goodsGroupType").equals("NATURAL_GAS")) { + highGasOilPrice.setOilType(3); + highGasOilPrice.setOilTypeName("天然气"); + } + highGasOilPriceService.editGasOilPrice(highGasOilPrice); + } + + JSONArray oilGunNoList = oilPriceObject.getJSONArray("oilGunNoList"); + for (Object o : oilGunNoList) { + HighGasOilGunNo gasOilGunNo = new HighGasOilGunNo(); + gasOilGunNo.setGasOilPriceId(highGasOilPrice.getId()); + gasOilGunNo.setStoreId(highGasOilPrice.getMerchantStoreId()); + gasOilGunNo.setOilNo(highGasOilPrice.getOilNo()); + gasOilGunNo.setOilNoName(highGasOilPrice.getOilNoName()); + gasOilGunNo.setOilType(highGasOilPrice.getOilType()); + gasOilGunNo.setOilTypeName(highGasOilPrice.getOilTypeName()); + gasOilGunNo.setGunNo(Integer.parseInt(o.toString())); + gasOilGunNo.setStatus(1); + gasOilGunNoService.editGunNo(gasOilGunNo); + } + } + } + } + } + } + @Override public void getJinZhuAllStation() throws Exception { HighMerchantModel merchant = highMerchantService.getDetailByKey("HF0802153624"); From a0d2ad940d825a5de56ecf1ee29cad8043797663 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 10 Jan 2023 11:07:40 +0800 Subject: [PATCH 6/7] =?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 --- .../cweb/controller/HighTestController.java | 2 +- .../com/cweb/controller/NotifyController.java | 7 ++-- .../com/hai/schedule/HighGasSchedule.java | 8 ++-- .../com/hai/config/ChongQingCNPCService.java | 16 ++++++++ .../impl/OrderCreateHandleServiceImpl.java | 2 +- .../order/service/impl/OrderServiceImpl.java | 2 +- .../impl/HighCouponAgentServiceImpl.java | 6 +++ .../impl/HighCouponCodeServiceImpl.java | 38 +++++++++++++++++++ .../HighDiscountAgentCodeServiceImpl.java | 5 +++ 9 files changed, 76 insertions(+), 10 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java index f110b90a..24011691 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/HighTestController.java @@ -1 +1 @@ -package com.cweb.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.bouncycastle.util.encoders.UrlBase64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.IdGenerator; import org.springframework.web.bind.annotation.*; import sun.nio.cs.StreamEncoder; import javax.annotation.Resource; import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Autowired private UserCenter userCenter; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private BaiduVoiceService baiduVoiceService; @Resource private ShellGroupService shellGroupService; @Resource private HighGasService gasService; @Resource private BsMsgService bsMsgService; @RequestMapping(value = "/queryGasInfoByGasId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据油站 id 拉取最新的油站数据") public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId, HttpServletRequest request) { try { return ResponseMsgUtil.success(TuanYouConfig.queryGasInfoByGasId(gasId)); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardInfo() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/initTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "初始化加油站") public ResponseData initTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } JSONObject jsonObjectP = TuanYouConfig.queryGasInfoListByPage(1, 1000); JSONObject resultObjectP = jsonObjectP.getObject("result", JSONObject.class); for (int i = 1; i <= resultObjectP.getInteger("totalPageNum").intValue(); i++) { JSONObject jsonObject = TuanYouConfig.queryGasInfoListByPage(i, 1000); JSONObject resultObject = jsonObject.getObject("result", JSONObject.class); JSONArray jsonArray = resultObject.getJSONArray("gasInfoList"); HighMerchantStore highMerchantStore; HighGasOilPrice highGasOilPrice; for (Object gasObject : jsonArray) { JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(gasObject)); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("gasId")); if (store != null) { store.setType(1); store.setMerchantId(merchant.getId()); store.setCompanyId(merchant.getCompanyId()); store.setStoreKey(object.getString("gasId")); store.setStoreName(object.getString("gasName")); store.setStoreLogo(object.getString("gasLogoSmall")); store.setRegionId(object.getLong("provinceCode")); store.setRegionName(object.getString("provinceName")); store.setAddress(object.getString("gasAddress")); store.setLongitude(object.getString("gasAddressLongitude")); store.setLatitude(object.getString("gasAddressLatitude")); store.setStatus(object.getInteger("gasStatus")); store.setOperatorId(0L); store.setOperatorName("系统创建"); store.setUpdateTime(new Date()); store.setExt1(object.getString("gasSourceId")); highMerchantStoreService.updateMerchantStoreDetail(store); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } else { highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } else { highMerchantStore = new HighMerchantStore(); highMerchantStore.setType(1); highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setCompanyId(merchant.getCompanyId()); highMerchantStore.setStoreKey(object.getString("gasId")); highMerchantStore.setStoreName(object.getString("gasName")); highMerchantStore.setStoreLogo(object.getString("gasLogoSmall")); highMerchantStore.setRegionId(object.getLong("provinceCode")); highMerchantStore.setRegionName(object.getString("provinceName")); highMerchantStore.setAddress(object.getString("gasAddress")); highMerchantStore.setLongitude(object.getString("gasAddressLongitude")); highMerchantStore.setLatitude(object.getString("gasAddressLatitude")); highMerchantStore.setStatus(1); highMerchantStore.setOperatorId(0L); highMerchantStore.setOperatorName("系统创建"); highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setExt1(object.getString("gasSourceId")); HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); BeanUtils.copyProperties(highMerchantStore, merchantStoreModel); highMerchantStoreService.insertMerchantStore(merchantStoreModel); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } } } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/detectTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "检测加油站") public ResponseData detectTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } Map param = new HashMap<>(); param.put("merchantId", merchant.getId()); List stores = highMerchantStoreService.getMerchantStoreList(param); for (HighMerchantStore store : stores) { JSONObject jsonObject = TuanYouConfig.queryGasInfoByGasId(store.getStoreKey()); if (jsonObject != null && jsonObject.getString("code").equals("200")) { JSONObject result = jsonObject.getJSONObject("result"); store.setStatus(result.getInteger("gasStatus")); } else { store.setStatus(0); } highMerchantStoreService.updateMerchantStoreDetail(store); } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/queryCompanyAccountInfo2JD", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyAccountInfo2JD() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyAccountInfo2JD()); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCompanyPriceDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyPriceDetail() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyPriceDetail("LW000115995", "92")); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrdersPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "星巴克支付") public ResponseData starbucksOrdersPay(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrdersPay(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payKfcOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "肯德基支付") public ResponseData payKfcOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/wxSplitAccount", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "微信分账") public ResponseData wxSplitAccount() { try { HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); wxProfitsharing(orderNo.getOrderNo(), orderNo.getPaySerialNo(), orderNo.getPayRealPrice()); return ResponseMsgUtil.success("分账成功"); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryStaging", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "分期查询") public ResponseData queryStaging(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.queryStaging(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/orderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "退款") public ResponseData orderToRefund(HttpServletRequest request) { try { OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund("4200001301202202035413938093", new BigDecimal("30.80"), new BigDecimal("16.90")); return ResponseMsgUtil.success(orderRefundModel); } catch (Exception e) { log.error("HighOrderController --> orderToRefund() error!", e); return ResponseMsgUtil.exception(e); } }*/ @RequestMapping(value = "/query", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData query(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.query(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } public void wxProfitsharing(String transaction_id, String out_order_no, BigDecimal amount) { try { Map param = new LinkedHashMap<>(); param.put("appid", "wx637bd6f7314daa46"); param.put("mch_id", "1289663601"); param.put("sub_mch_id", "1609882817"); // 个体户黎杨珍 param.put("transaction_id", transaction_id); param.put("out_order_no", out_order_no); param.put("nonce_str", WxUtils.makeNonStr()); // 分账金额 BigDecimal porofitSharingAmount = amount; List> receiversList = new ArrayList<>(); Map receiversMap = new LinkedHashMap<>(); receiversMap.put("type", "MERCHANT_ID"); receiversMap.put("account", "1603942866"); receiversMap.put("amount", porofitSharingAmount.multiply(new BigDecimal("100")).intValue()); receiversMap.put("description", "分给商户【惠昕石化】"); receiversList.add(receiversMap); param.put("receivers", JSONObject.toJSONString(receiversList)); String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); param.put("sign", signStr); String resultXmL = this.doRefundRequest(param.get("mch_id"), null, WxUtils.mapToXml(param)); // 请求分账返回的结果 ResultProfitSharing resultProfitSharing = XmlUtil.getObjectFromXML(resultXmL, ResultProfitSharing.class); if (!resultProfitSharing.getResult_code().equals("FAIL")) { HighProfitSharingRecord sharingRecord = new HighProfitSharingRecord(); sharingRecord.setOutOrderNo(resultProfitSharing.getOut_order_no()); sharingRecord.setTransactionId(resultProfitSharing.getTransaction_id()); sharingRecord.setOrderId(resultProfitSharing.getOrder_id()); sharingRecord.setStatus(resultProfitSharing.getResult_code()); sharingRecord.setPrice(amount); sharingRecord.setCreateTime(new Date()); sharingRecord.setContent(resultXmL); highProfitSharingRecordService.insert(sharingRecord); } } catch (Exception e) { log.error("CmsContentController --> getCorporateAdvertising() error!", e); } } public CloseableHttpClient readCertificate(String mchId) throws Exception { /** * 注意PKCS12证书 是从微信商户平台-》账户设置-》 API安全 中下载的 */ KeyStore keyStore = KeyStore.getInstance("PKCS12"); //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12"); // FileInputStream instream = new FileInputStream("G:\\hurui-project/hai-parent/hai-service/src/main/java/privatekey/1289663601_apiclient_cert.p12"); try { keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID } finally { instream.close(); } SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier()); // Allow TLSv1 protocol only return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } public String doRefundRequest(String mchId, String url, String data) throws Exception { //小程序退款需要调用双向证书的认证 CloseableHttpClient httpClient = readCertificate(mchId); try { HttpPost httpost = new HttpPost("https://api.mch.weixin.qq.com/secapi/pay/profitsharing"); // 设置响应头信息 httpost.addHeader("Connection", "keep-alive"); httpost.addHeader("Accept", "*/*"); httpost.addHeader("Content-Type", "text/xml"); httpost.addHeader("Host", "api.mch.weixin.qq.com"); httpost.addHeader("X-Requested-With", "XMLHttpRequest"); httpost.addHeader("Cache-Control", "max-age=0"); httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); httpost.setEntity(new StringEntity(data, "UTF-8")); CloseableHttpResponse response = httpClient.execute(httpost); try { HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8"); EntityUtils.consume(entity); return jsonStr; } finally { response.close(); } } catch (Exception e) { throw new RuntimeException(e); } finally { httpClient.close(); } } @RequestMapping(value = "/websocket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "websocket") public ResponseData websocket(@RequestParam(name = "orderNo", required = true) String orderNo ) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { Map pushMsg = new HashMap<>(); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); Map msgContent = new HashMap<>(); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + order.getTotalPrice())); pushMsg.put("message", JSONObject.toJSONString(msgContent)); HttpsUtils.doPost("http://127.0.0.1:9901/msg/test/websocket", pushMsg, new HashMap<>()); } return ResponseMsgUtil.success("null"); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasStationQueryDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasStationQueryDetail") public ResponseData gasStationQueryDetail() { try { return ResponseMsgUtil.success(shellGroupService.gasStationQueryDetail("0001")); } catch (Exception e) { log.error("HighOrderController --> gasStationQueryDetail() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasPageQueryAllStation", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasPageQueryAllStation") public ResponseData gasPageQueryAllStation() { try { gasService.getJiaHaoYouAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasPageQueryAllStation() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasSyncRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasSyncRefund") public ResponseData gasSyncRefund() { try { shellGroupService.gasSyncRefund(new Date(1659511289000L), "1659511289357"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getJzStationListPage", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "getJzStationListPage") public ResponseData getJzStationListPage() { try { gasService.getJinZhuAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/insertV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData insertV2() { try { String orderNo = "HF2022080818504922206"; JSONObject object = QianZhuConfig.insertV2("PLM100024", orderNo, "15585850137"); object.put("orderNo", orderNo); return ResponseMsgUtil.success(object); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/QueryV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单号") public ResponseData QueryV2(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject orderObject = QianZhuConfig.QueryV2(orderNo); if (orderObject != null && orderObject.getLong("Code") == 999) { // 订单失败 // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 3) { // 订单失败 if (order.getOrderStatus() == 2) { highOrderService.thirdOrderToRefund(order.getId()); } else { highOrderService.thirdCancelOrder(order.getId()); } } // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 2) { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrdeStatus(3); } order.setOrderStatus(3); order.setFinishTime(new Date()); highOrderService.updateOrder(order); } } return ResponseMsgUtil.success(QianZhuConfig.QueryV2(orderNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } */ @RequestMapping(value = "/getKfcOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基订单") public ResponseData getKfcOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.getKfcOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克订单") public ResponseData starbucksOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/thirdOrderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "第三方退款") public ResponseData thirdOrderToRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); highOrderService.thirdOrderToRefund(order.getId()); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rechargeOrderByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇话费充值 ") public ResponseData rechargeOrderByCy() { try { JSONObject object = new JSONObject(); object.put("mobile" , "18090580471"); object.put("productId" , 172); object.put("agentOrderId" , "RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); return ResponseMsgUtil.success(RechargeConfig.rechargeOrderByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryRechargeByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇查询订单") public ResponseData queryRechargeByCy(@RequestParam(name = "orderNo", required = true) String orderNo) { try { JSONObject object = new JSONObject(); object.put("orderNo" , orderNo); return ResponseMsgUtil.success(RechargeConfig.queryRechargeByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postIp", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "请求ip地址") public ResponseData postIp(HttpServletRequest request) { try { request.getHeader("regionId"); if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { System.out.println("111"); } return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/brest/openApi/test")); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/testMsg", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试站内信") public ResponseData testMsg(HttpServletRequest request) { try { bsMsgService.pushUserMsg(71465L , "支付成功"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file +package com.cweb.controller; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.cweb.config.SysConst; import com.hai.common.Base64Util; import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.pay.util.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.security.SessionObject; import com.hai.common.security.UserCenter; import com.hai.common.utils.*; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.enum_type.MerchantStoreSourceType; import com.hai.model.*; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.bouncycastle.util.encoders.UrlBase64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.util.IdGenerator; import org.springframework.web.bind.annotation.*; import sun.nio.cs.StreamEncoder; import javax.annotation.Resource; import javax.net.ssl.SSLContext; import javax.servlet.http.HttpServletRequest; import java.io.*; import java.math.BigDecimal; import java.nio.charset.StandardCharsets; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Autowired private UserCenter userCenter; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private BaiduVoiceService baiduVoiceService; @Resource private ShellGroupService shellGroupService; @Resource private HighGasService gasService; @Resource private BsMsgService bsMsgService; @RequestMapping(value = "/queryGasInfoByGasId", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "根据油站 id 拉取最新的油站数据") public ResponseData queryGasInfoByGasId(@RequestParam(name = "gasId", required = true) String gasId, HttpServletRequest request) { try { return ResponseMsgUtil.success(TuanYouConfig.queryGasInfoByGasId(gasId)); } catch (Exception e) { log.error("HighUserCardController --> getHuiLianTongCardInfo() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/initTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "初始化加油站") public ResponseData initTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } JSONObject jsonObjectP = TuanYouConfig.queryGasInfoListByPage(1, 1000); JSONObject resultObjectP = jsonObjectP.getObject("result", JSONObject.class); for (int i = 1; i <= resultObjectP.getInteger("totalPageNum").intValue(); i++) { JSONObject jsonObject = TuanYouConfig.queryGasInfoListByPage(i, 1000); JSONObject resultObject = jsonObject.getObject("result", JSONObject.class); JSONArray jsonArray = resultObject.getJSONArray("gasInfoList"); HighMerchantStore highMerchantStore; HighGasOilPrice highGasOilPrice; for (Object gasObject : jsonArray) { JSONObject object = JSONObject.parseObject(JSONObject.toJSONString(gasObject)); HighMerchantStoreModel store = highMerchantStoreService.getMerchantStoreByKey(object.getString("gasId")); if (store != null) { store.setType(1); store.setMerchantId(merchant.getId()); store.setCompanyId(merchant.getCompanyId()); store.setStoreKey(object.getString("gasId")); store.setStoreName(object.getString("gasName")); store.setStoreLogo(object.getString("gasLogoSmall")); store.setRegionId(object.getLong("provinceCode")); store.setRegionName(object.getString("provinceName")); store.setAddress(object.getString("gasAddress")); store.setLongitude(object.getString("gasAddressLongitude")); store.setLatitude(object.getString("gasAddressLatitude")); store.setStatus(object.getInteger("gasStatus")); store.setOperatorId(0L); store.setOperatorName("系统创建"); store.setUpdateTime(new Date()); store.setExt1(object.getString("gasSourceId")); highMerchantStoreService.updateMerchantStoreDetail(store); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } else { highGasOilPrice.setMerchantStoreId(store.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); } highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } else { highMerchantStore = new HighMerchantStore(); highMerchantStore.setType(1); highMerchantStore.setMerchantId(merchant.getId()); highMerchantStore.setCompanyId(merchant.getCompanyId()); highMerchantStore.setStoreKey(object.getString("gasId")); highMerchantStore.setStoreName(object.getString("gasName")); highMerchantStore.setStoreLogo(object.getString("gasLogoSmall")); highMerchantStore.setRegionId(object.getLong("provinceCode")); highMerchantStore.setRegionName(object.getString("provinceName")); highMerchantStore.setAddress(object.getString("gasAddress")); highMerchantStore.setLongitude(object.getString("gasAddressLongitude")); highMerchantStore.setLatitude(object.getString("gasAddressLatitude")); highMerchantStore.setStatus(1); highMerchantStore.setOperatorId(0L); highMerchantStore.setOperatorName("系统创建"); highMerchantStore.setCreateTime(new Date()); highMerchantStore.setUpdateTime(new Date()); highMerchantStore.setExt1(object.getString("gasSourceId")); HighMerchantStoreModel merchantStoreModel = new HighMerchantStoreModel(); BeanUtils.copyProperties(highMerchantStore, merchantStoreModel); highMerchantStoreService.insertMerchantStore(merchantStoreModel); JSONArray oilPriceList = object.getJSONArray("oilPriceList"); for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); highGasOilPrice.setPriceOfficial(oilPriceObject.getBigDecimal("priceOfficial")); highGasOilPrice.setOilType(oilPriceObject.getInteger("oilType")); highGasOilPrice.setOilTypeName(oilPriceObject.getString("oilTypeName")); highGasOilPriceService.editGasOilPrice(highGasOilPrice); } } } } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/detectTYMerchantStore", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "检测加油站") public ResponseData detectTYMerchantStore(@RequestParam(name = "merchantId", required = true) Long merchantId) throws Exception { HighMerchantModel merchant = highMerchantService.getMerchantById(merchantId); if (merchant == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到商户"); } Map param = new HashMap<>(); param.put("merchantId", merchant.getId()); List stores = highMerchantStoreService.getMerchantStoreList(param); for (HighMerchantStore store : stores) { JSONObject jsonObject = TuanYouConfig.queryGasInfoByGasId(store.getStoreKey()); if (jsonObject != null && jsonObject.getString("code").equals("200")) { JSONObject result = jsonObject.getJSONObject("result"); store.setStatus(result.getInteger("gasStatus")); } else { store.setStatus(0); } highMerchantStoreService.updateMerchantStoreDetail(store); } return ResponseMsgUtil.success("初始化完成"); } @RequestMapping(value = "/queryCompanyAccountInfo2JD", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyAccountInfo2JD() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyAccountInfo2JD()); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCompanyPriceDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询团油余额") public ResponseData queryCompanyPriceDetail() { try { return ResponseMsgUtil.success(TuanYouConfig.queryCompanyPriceDetail("LW000115995", "92")); } catch (Exception e) { log.error("HighOrderController --> queryCompanyAccountInfo2JD() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrdersPay", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "星巴克支付") public ResponseData starbucksOrdersPay(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrdersPay(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/payKfcOrder", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "肯德基支付") public ResponseData payKfcOrder(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.payKfcOrder(orderNo)); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/wxSplitAccount", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "微信分账") public ResponseData wxSplitAccount() { try { HighOrder orderNo = highOrderService.getOrderByOrderNo("HF2021101812025050304"); wxProfitsharing(orderNo.getOrderNo(), orderNo.getPaySerialNo(), orderNo.getPayRealPrice()); return ResponseMsgUtil.success("分账成功"); } catch (Exception e) { log.error("HighOrderController --> getOrderById() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryStaging", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "分期查询") public ResponseData queryStaging(@RequestParam(name = "oriOrgTrace", required = true) String oriOrgTrace, HttpServletRequest request) { try { String orgTrace = CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(0, 4) + CommonSysConst.getSysConfig().getUnionStagingPayOrgId().substring(CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length() - 4, CommonSysConst.getSysConfig().getUnionStagingPayOrgId().length()) + DateUtil.format(new Date(), DateUtil.YMDHMS) + IDGenerator.nextId(6); return ResponseMsgUtil.success(UnionStagingPayConfig.queryStaging(orgTrace, oriOrgTrace, "", new Date(), request)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/orderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "退款") public ResponseData orderToRefund(HttpServletRequest request) { try { OrderRefundModel orderRefundModel = WxOrderConfig.orderToRefund("4200001301202202035413938093", new BigDecimal("30.80"), new BigDecimal("16.90")); return ResponseMsgUtil.success(orderRefundModel); } catch (Exception e) { log.error("HighOrderController --> orderToRefund() error!", e); return ResponseMsgUtil.exception(e); } }*/ @RequestMapping(value = "/sendCNPCTicket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData sendCNPCTicket(@RequestParam(name = "couponKey", required = true) String couponKey, HttpServletRequest request) { try { String orderNo = System.currentTimeMillis()+""; // 预发码 JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponKey, orderNo, 1, "17726395120"); if (preSendCoupon.getInteger("status").equals(1)) { // 给用户发码 JSONObject response = ChongQingCNPCService.sendCNPCTicket(couponKey, orderNo, 1, "17726395120"); return ResponseMsgUtil.success(response); } return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryCoupon", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "订单查询") public ResponseData queryCoupon(@RequestParam(name = "couponNo", required = true) String couponNo, HttpServletRequest request) { try { return ResponseMsgUtil.success(ChongQingCNPCService.queryCoupon(couponNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } public void wxProfitsharing(String transaction_id, String out_order_no, BigDecimal amount) { try { Map param = new LinkedHashMap<>(); param.put("appid", "wx637bd6f7314daa46"); param.put("mch_id", "1289663601"); param.put("sub_mch_id", "1609882817"); // 个体户黎杨珍 param.put("transaction_id", transaction_id); param.put("out_order_no", out_order_no); param.put("nonce_str", WxUtils.makeNonStr()); // 分账金额 BigDecimal porofitSharingAmount = amount; List> receiversList = new ArrayList<>(); Map receiversMap = new LinkedHashMap<>(); receiversMap.put("type", "MERCHANT_ID"); receiversMap.put("account", "1603942866"); receiversMap.put("amount", porofitSharingAmount.multiply(new BigDecimal("100")).intValue()); receiversMap.put("description", "分给商户【惠昕石化】"); receiversList.add(receiversMap); param.put("receivers", JSONObject.toJSONString(receiversList)); String signStr = WxUtils.generateSignature(param, "Skufk5oi85wDFGl888i6wsRSTkdd5df5", WXPayConstants.SignType.HMACSHA256); param.put("sign", signStr); String resultXmL = this.doRefundRequest(param.get("mch_id"), null, WxUtils.mapToXml(param)); // 请求分账返回的结果 ResultProfitSharing resultProfitSharing = XmlUtil.getObjectFromXML(resultXmL, ResultProfitSharing.class); if (!resultProfitSharing.getResult_code().equals("FAIL")) { HighProfitSharingRecord sharingRecord = new HighProfitSharingRecord(); sharingRecord.setOutOrderNo(resultProfitSharing.getOut_order_no()); sharingRecord.setTransactionId(resultProfitSharing.getTransaction_id()); sharingRecord.setOrderId(resultProfitSharing.getOrder_id()); sharingRecord.setStatus(resultProfitSharing.getResult_code()); sharingRecord.setPrice(amount); sharingRecord.setCreateTime(new Date()); sharingRecord.setContent(resultXmL); highProfitSharingRecordService.insert(sharingRecord); } } catch (Exception e) { log.error("CmsContentController --> getCorporateAdvertising() error!", e); } } public CloseableHttpClient readCertificate(String mchId) throws Exception { /** * 注意PKCS12证书 是从微信商户平台-》账户设置-》 API安全 中下载的 */ KeyStore keyStore = KeyStore.getInstance("PKCS12"); //P12文件目录 证书路径,这里需要你自己修改,linux下还是windows下的根路径 FileInputStream instream = new FileInputStream("/home/project/wx_cert/1289663601_apiclient_cert.p12"); // FileInputStream instream = new FileInputStream("G:\\hurui-project/hai-parent/hai-service/src/main/java/privatekey/1289663601_apiclient_cert.p12"); try { keyStore.load(instream, "1289663601".toCharArray());//这里写密码..默认是你的MCHID } finally { instream.close(); } SSLContext sslcontext = SSLContexts.custom().loadKeyMaterial(keyStore, "1289663601".toCharArray()).build();//这里也是写密码的 SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext, SSLConnectionSocketFactory.getDefaultHostnameVerifier()); // Allow TLSv1 protocol only return HttpClients.custom().setSSLSocketFactory(sslsf).build(); } public String doRefundRequest(String mchId, String url, String data) throws Exception { //小程序退款需要调用双向证书的认证 CloseableHttpClient httpClient = readCertificate(mchId); try { HttpPost httpost = new HttpPost("https://api.mch.weixin.qq.com/secapi/pay/profitsharing"); // 设置响应头信息 httpost.addHeader("Connection", "keep-alive"); httpost.addHeader("Accept", "*/*"); httpost.addHeader("Content-Type", "text/xml"); httpost.addHeader("Host", "api.mch.weixin.qq.com"); httpost.addHeader("X-Requested-With", "XMLHttpRequest"); httpost.addHeader("Cache-Control", "max-age=0"); httpost.addHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) "); httpost.setEntity(new StringEntity(data, "UTF-8")); CloseableHttpResponse response = httpClient.execute(httpost); try { HttpEntity entity = response.getEntity(); String jsonStr = EntityUtils.toString(response.getEntity(), "UTF-8"); EntityUtils.consume(entity); return jsonStr; } finally { response.close(); } } catch (Exception e) { throw new RuntimeException(e); } finally { httpClient.close(); } } @RequestMapping(value = "/websocket", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "websocket") public ResponseData websocket(@RequestParam(name = "orderNo", required = true) String orderNo ) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); if (order.getHighChildOrderList().get(0).getGoodsType().equals(3)) { Map pushMsg = new HashMap<>(); pushMsg.put("userId", order.getHighChildOrderList().get(0).getGoodsId()); Map msgContent = new HashMap<>(); msgContent.put("order", highOrderService.getGasOrderDetail(order.getOrderNo())); msgContent.put("voice", baiduVoiceService.text2audio(order.getHighChildOrderList().get(0).getGoodsName() + "加油站,收款:" + order.getTotalPrice())); pushMsg.put("message", JSONObject.toJSONString(msgContent)); HttpsUtils.doPost("http://127.0.0.1:9901/msg/test/websocket", pushMsg, new HashMap<>()); } return ResponseMsgUtil.success("null"); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasStationQueryDetail", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasStationQueryDetail") public ResponseData gasStationQueryDetail() { try { return ResponseMsgUtil.success(shellGroupService.gasStationQueryDetail("0001")); } catch (Exception e) { log.error("HighOrderController --> gasStationQueryDetail() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasPageQueryAllStation", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasPageQueryAllStation") public ResponseData gasPageQueryAllStation() { try { gasService.getJiaHaoYouAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasPageQueryAllStation() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/gasSyncRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "gasSyncRefund") public ResponseData gasSyncRefund() { try { shellGroupService.gasSyncRefund(new Date(1659511289000L), "1659511289357"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/getJzStationListPage", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "getJzStationListPage") public ResponseData getJzStationListPage() { try { gasService.getJinZhuAllStation(); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController --> gasSyncRefund() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/insertV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "支付") public ResponseData insertV2() { try { String orderNo = "HF2022080818504922206"; JSONObject object = QianZhuConfig.insertV2("PLM100024", orderNo, "15585850137"); object.put("orderNo", orderNo); return ResponseMsgUtil.success(object); } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); return ResponseMsgUtil.exception(e); } } /* @RequestMapping(value = "/QueryV2", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询订单号") public ResponseData QueryV2(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); JSONObject orderObject = QianZhuConfig.QueryV2(orderNo); if (orderObject != null && orderObject.getLong("Code") == 999) { // 订单失败 // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 3) { // 订单失败 if (order.getOrderStatus() == 2) { highOrderService.thirdOrderToRefund(order.getId()); } else { highOrderService.thirdCancelOrder(order.getId()); } } // 订单状态 1:订单正在处理中 2;订单成功: 3 订单失败 if (orderObject.getJSONObject("Data").getInteger("OrderState") == 2) { for (HighChildOrder childOrder : order.getHighChildOrderList()) { childOrder.setChildOrdeStatus(3); } order.setOrderStatus(3); order.setFinishTime(new Date()); highOrderService.updateOrder(order); } } return ResponseMsgUtil.success(QianZhuConfig.QueryV2(orderNo)); } catch (Exception e) { log.error("HighOrderController --> unionStagingPay() error!", e); return ResponseMsgUtil.exception(e); } } */ @RequestMapping(value = "/getKfcOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询肯德基订单") public ResponseData getKfcOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.getKfcOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/starbucksOrderByOrderNo", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询星巴克订单") public ResponseData starbucksOrderByOrderNo(@RequestParam(name = "orderNo", required = true) String orderNo) { try { return ResponseMsgUtil.success(QianZhuConfig.starbucksOrderByOrderNo(orderNo)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/thirdOrderToRefund", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "第三方退款") public ResponseData thirdOrderToRefund(@RequestParam(name = "orderNo", required = true) String orderNo) { try { HighOrder order = highOrderService.getOrderByOrderNo(orderNo); highOrderService.thirdOrderToRefund(order.getId()); return ResponseMsgUtil.success(""); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/rechargeOrderByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇话费充值 ") public ResponseData rechargeOrderByCy() { try { JSONObject object = new JSONObject(); object.put("mobile" , "18090580471"); object.put("productId" , 172); object.put("agentOrderId" , "RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5)); return ResponseMsgUtil.success(RechargeConfig.rechargeOrderByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/queryRechargeByCy", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "城宇查询订单") public ResponseData queryRechargeByCy(@RequestParam(name = "orderNo", required = true) String orderNo) { try { JSONObject object = new JSONObject(); object.put("orderNo" , orderNo); return ResponseMsgUtil.success(RechargeConfig.queryRechargeByCy(object)); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/postIp", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "请求ip地址") public ResponseData postIp(HttpServletRequest request) { try { request.getHeader("regionId"); if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) { System.out.println("111"); } return ResponseMsgUtil.success(HttpsUtils.doPost("https://hsgcs.dctpay.com/brest/openApi/test")); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } @RequestMapping(value = "/testMsg", method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "测试站内信") public ResponseData testMsg(HttpServletRequest request) { try { bsMsgService.pushUserMsg(71465L , "支付成功"); return ResponseMsgUtil.success(null); } catch (Exception e) { log.error("HighOrderController -> addOrder() error!", e); return ResponseMsgUtil.exception(e); } } } \ No newline at end of file diff --git a/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java b/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java index ae356fb4..a4d03e50 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java @@ -54,7 +54,8 @@ public class NotifyController { @ApiOperation(value = "重庆中石油通知") public Object cqCnpcNotify(@RequestBody String paramsStr) { System.out.println(paramsStr); - log.info(paramsStr); + log.info("重庆中石油核销通知"); + log.info("通知参数:" + paramsStr); try { if (StringUtils.isNotBlank(paramsStr)) { @@ -64,7 +65,7 @@ public class NotifyController { HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); highGasOrderPush.setType(OrderPushType.type10.getType()); - highGasOrderPush.setOrderNo(body.getString("tradeId")); + highGasOrderPush.setOrderNo(body.getString("tradeIsendMessage = {JSONObject@14276} size = 2d")); highGasOrderPush.setCreateTime(new Date()); highGasOrderPush.setRequestContent("核销回调"); highGasOrderPush.setReturnContent(paramsStr); @@ -104,8 +105,8 @@ public class NotifyController { returnContent.put("postMessage", returnPostMessage); return returnContent; } - } catch (Exception e) { + log.info("重庆中石油核销通知业务出现异常", e); return null; // return ResponseMsgUtil.exception(e); } diff --git a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java index 8a1b5343..3ca8b7d7 100644 --- a/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java +++ b/hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java @@ -84,11 +84,11 @@ public class HighGasSchedule { for (Object oilPrice : oilPriceList) { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); // 查询门店油号 - highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getInteger("oilNo")); + highGasOilPrice = highGasOilPriceService.getGasOilPriceByStoreAndOilNo(store.getId(), oilPriceObject.getString("oilNo")); if (highGasOilPrice == null) { highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); + highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); @@ -98,7 +98,7 @@ public class HighGasSchedule { highGasOilPrice.setStatus(GasOilPriceStatusEnum.status1.getStatus()); } else { highGasOilPrice.setMerchantStoreId(store.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); + highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); @@ -137,7 +137,7 @@ public class HighGasSchedule { JSONObject oilPriceObject = JSONObject.parseObject(JSONObject.toJSONString(oilPrice)); highGasOilPrice = new HighGasOilPrice(); highGasOilPrice.setMerchantStoreId(merchantStoreModel.getId()); - highGasOilPrice.setOilNo(oilPriceObject.getInteger("oilNo")); + highGasOilPrice.setOilNo(oilPriceObject.getString("oilNo")); highGasOilPrice.setOilNoName(oilPriceObject.getString("oilNoName")); highGasOilPrice.setPriceVip(oilPriceObject.getBigDecimal("priceVip")); highGasOilPrice.setPriceGun(oilPriceObject.getBigDecimal("priceGun")); diff --git a/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java b/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java index 38dd8f38..0b258e85 100644 --- a/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java +++ b/hai-service/src/main/java/com/hai/config/ChongQingCNPCService.java @@ -22,6 +22,22 @@ public class ChongQingCNPCService { private static Logger log = LoggerFactory.getLogger(ChongQingCNPCService.class); + /** + * 电子券预发放接口 + * @param requestCode + * @param tradeId + * @param ticketSum + * @param phone + */ + public static JSONObject preSendCoupon(String requestCode, String tradeId, Integer ticketSum, String phone) throws Exception { + Map map = new HashMap<>(); + map.put("requestCode", requestCode); + map.put("tradeId", tradeId); + map.put("ticketSum", ticketSum); + map.put("phone", phone); + return request("preSendCoupon", map); + } + /** * 发放电子券 * @param requestCode diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java index e0a894c3..cf57dc34 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java @@ -163,7 +163,7 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService { String childOrderNo = OrderUtil.generateChildOrderNo(); // 如果不是来源不是贵州中石化,需要校验库存 - if (!coupon.getCouponSource().equals(4)) { + if (!coupon.getCouponSource().equals(4) || !coupon.getCouponSource().equals(5)) { if (couponService.assignOrderStock(coupon.getId(), childOrderNo) == null) { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存不足"); } diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java index af83de26..b5a8b376 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java @@ -172,7 +172,7 @@ public class OrderServiceImpl implements OrderService { // 购买卡券 if (child.getGoodsType().equals(OrderChildGoodsType.TYPE1.getNumber())) { order.setProductType(OrderProductType.PRODUCT_TYPE5.getNumber()); - // 创建积分充值订单业务 + // 创建购买卡券业务 List couponOrderList = orderCreateHandleService.couponHandle(discountUserRel, child); childOrderList = couponOrderList; for (HighChildOrder childOrder : couponOrderList) { diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java index 3c7d2d18..f1edf1bd 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java @@ -337,6 +337,12 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService { throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "手机号格式错误"); } + // 预发码 + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(coupon.getCouponKey(), couponAgentCode.getConvertCode(), 1, phone); + if (!preSendCoupon.getInteger("status").equals(1)) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "发码失败,请稍后重试!"); + } + // 给用户发码 JSONObject response = ChongQingCNPCService.sendCNPCTicket(coupon.getCouponKey(), couponAgentCode.getConvertCode(), 1, phone); JSONObject couponDetail = response.getJSONObject("ticketDetail"); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java index bbec1ecf..5d56d5c2 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponCodeServiceImpl.java @@ -8,12 +8,14 @@ import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.SysCode; import com.hai.common.utils.DateUtil; import com.hai.common.utils.IDGenerator; +import com.hai.config.ChongQingCNPCService; import com.hai.config.HuiLianTongConfig; import com.hai.config.HuiLianTongUnionCardConfig; import com.hai.dao.HighChildOrderMapper; import com.hai.dao.HighCouponCodeMapper; import com.hai.dao.HighCouponCodeMapperExt; import com.hai.entity.*; +import com.hai.enum_type.OrderPushType; import com.hai.model.GzSinopecModel; import com.hai.model.UserInfoModel; import com.hai.service.*; @@ -358,6 +360,42 @@ public class HighCouponCodeServiceImpl implements HighCouponCodeService { highUserCouponService.insertUserCoupon(highUserCoupon); } } + } else if (coupon.getCouponSource().equals(5)) { + // 预发码 + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(coupon.getCouponKey(), order.getOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); + if (preSendCoupon.getInteger("status").equals(1)) { + // 给用户发码 + JSONObject response = ChongQingCNPCService.sendCNPCTicket(coupon.getCouponKey(), order.getOrderNo(), childOrder.getSaleCount(), order.getMemPhone()); + JSONObject couponDetail = response.getJSONObject("ticketDetail"); + JSONArray codeList = response.getJSONArray("codeList"); + for (Object data : codeList) { + HighCouponCodeOther couponCodeOther = new HighCouponCodeOther(); + couponCodeOther.setType(2); + couponCodeOther.setOrderId(order.getId()); + couponCodeOther.setChildOrderId(childOrder.getId()); + couponCodeOther.setCouTypeCode(couponDetail.getString("requestCode")); + couponCodeOther.setCouNo(ChongQingCNPCService.decryptCouponCode(String.valueOf(data))); + couponCodeOther.setActiveTime(DateUtil.format(couponDetail.getString("effectiveTime"), "yyyy-MM-dd")); + couponCodeOther.setValidStartDate(DateUtil.format(couponDetail.getString("effectiveTime"), "yyyy-MM-dd")); + couponCodeOther.setValidEndDate(DateUtil.format(couponDetail.getString("expiredDate"), "yyyy-MM-dd")); + couponCodeOther.setStatus(20); + couponCodeOther.setCreateTime(new Date()); + couponCodeOtherService.insertCouponCodeOther(couponCodeOther); + + // 卡卷关联用户 + HighUserCoupon highUserCoupon = new HighUserCoupon(); + highUserCoupon.setMerchantId(coupon.getMerchantId()); + highUserCoupon.setCouponId(coupon.getId()); + highUserCoupon.setOrderId(order.getId()); + highUserCoupon.setChildOrderId(childOrder.getId()); + highUserCoupon.setUserId(order.getMemId()); + highUserCoupon.setCreateTime(new Date()); + highUserCoupon.setQrCodeImg(couponCodeOther.getCouNo()); + highUserCoupon.setUseEndTime(couponCodeOther.getValidEndDate()); + highUserCoupon.setStatus(1); // 状态 0:已过期 1:未使用 2:已使用 + highUserCouponService.insertUserCoupon(highUserCoupon); + } + } } else { // 查询子订单的兑换码 HighCouponCode code = getCodeByChildOrderNo(childOrder.getChildOrderNo()); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java index 86dc8316..69c01860 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighDiscountAgentCodeServiceImpl.java @@ -231,6 +231,11 @@ public class HighDiscountAgentCodeServiceImpl implements HighDiscountAgentCodeSe throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券未配置重庆中石油卡券"); } String tradeId = discountAgentCode.getId()+""+System.currentTimeMillis()+""; + // 预发码 + JSONObject preSendCoupon = ChongQingCNPCService.preSendCoupon(couponList.get(0).getHighCoupon().getCouponKey(), tradeId, 1, userModel.getHighUser().getPhone()); + if (!preSendCoupon.getInteger("status").equals(1)) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "领取优惠券失败,请稍后重试"); + } // 给用户发码 JSONObject response = ChongQingCNPCService.sendCNPCTicket( couponList.get(0).getHighCoupon().getCouponKey(), From 01cde70b77d106b89f32e4bc18bec8dafd644fd5 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 10 Jan 2023 11:35:09 +0800 Subject: [PATCH 7/7] =?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 --- .../src/main/java/com/cweb/controller/NotifyController.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java b/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java index a4d03e50..25f10dec 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/NotifyController.java @@ -61,16 +61,15 @@ public class NotifyController { JSONObject sendMessage = JSONObject.parseObject(paramsStr).getJSONObject("sendMessage"); JSONObject body = ChongQingCNPCService.decryptBody(sendMessage.getString("body")); - couponCodeOtherService.cqCnpcUseNotify(body); - HighGasOrderPush highGasOrderPush = new HighGasOrderPush(); highGasOrderPush.setType(OrderPushType.type10.getType()); - highGasOrderPush.setOrderNo(body.getString("tradeIsendMessage = {JSONObject@14276} size = 2d")); + highGasOrderPush.setOrderNo(body.getString("tradeId")); highGasOrderPush.setCreateTime(new Date()); highGasOrderPush.setRequestContent("核销回调"); highGasOrderPush.setReturnContent(paramsStr); highGasOrderPushMapper.insert(highGasOrderPush); + couponCodeOtherService.cqCnpcUseNotify(body); Map param = new HashMap<>(); param.put("status", 1); param.put("msg", "成功");