From 7ae7d81e3c6f395bb4aa0621c1947bad23484cec Mon Sep 17 00:00:00 2001 From: 199901012 Date: Thu, 11 Mar 2021 23:29:29 +0800 Subject: [PATCH] =?UTF-8?q?'=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bweb/controller/HighCouponController.java | 111 ++ .../controller/HighMerchantController.java | 3 +- .../HighMerchantStoreController.java | 3 +- .../com/hai/common/exception/ErrorCode.java | 1 + .../com/hai/dao/HighCouponCodeMapper.java | 81 + .../com/hai/dao/HighCouponCodeMapperExt.java | 7 + .../hai/dao/HighCouponCodeSqlProvider.java | 319 ++++ .../com/hai/dao/HighCouponHandselMapper.java | 117 ++ .../hai/dao/HighCouponHandselMapperExt.java | 7 + .../hai/dao/HighCouponHandselSqlProvider.java | 304 ++++ .../java/com/hai/dao/HighCouponMapper.java | 147 ++ .../java/com/hai/dao/HighCouponMapperExt.java | 7 + .../com/hai/dao/HighCouponSqlProvider.java | 402 +++++ .../hai/dao/HighGoodsPriceReferMapper.java | 130 ++ .../hai/dao/HighGoodsPriceReferMapperExt.java | 7 + .../dao/HighGoodsPriceReferSqlProvider.java | 346 +++++ .../main/java/com/hai/entity/HighCoupon.java | 314 ++++ .../java/com/hai/entity/HighCouponCode.java | 296 ++++ .../com/hai/entity/HighCouponCodeExample.java | 1233 +++++++++++++++ .../com/hai/entity/HighCouponExample.java | 1323 +++++++++++++++++ .../com/hai/entity/HighCouponHandsel.java | 200 +++ .../hai/entity/HighCouponHandselExample.java | 863 +++++++++++ .../com/hai/entity/HighGoodsPriceRefer.java | 248 +++ .../entity/HighGoodsPriceReferExample.java | 1043 +++++++++++++ .../java/com/hai/entity/HighMerchant.java | 2 +- .../com/hai/entity/HighMerchantStore.java | 2 +- .../com/hai/model/HighCouponHandselModel.java | 22 + .../java/com/hai/model/HighCouponModel.java | 24 + .../java/com/hai/model/HighMerchantModel.java | 3 +- .../com/hai/model/HighMerchantStoreModel.java | 3 +- .../com/hai/service/HighCouponService.java | 20 + .../service/impl/HighCouponServiceImpl.java | 44 + 32 files changed, 7626 insertions(+), 6 deletions(-) create mode 100644 hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponCodeMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponCodeSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponHandselMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponHandselMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponHandselSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapper.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapperExt.java create mode 100644 hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferSqlProvider.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighCoupon.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighCouponCode.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighCouponCodeExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighCouponExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighCouponHandsel.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighCouponHandselExample.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighGoodsPriceRefer.java create mode 100644 hai-service/src/main/java/com/hai/entity/HighGoodsPriceReferExample.java create mode 100644 hai-service/src/main/java/com/hai/model/HighCouponHandselModel.java create mode 100644 hai-service/src/main/java/com/hai/model/HighCouponModel.java create mode 100644 hai-service/src/main/java/com/hai/service/HighCouponService.java create mode 100644 hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java b/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java new file mode 100644 index 00000000..0c6902e1 --- /dev/null +++ b/hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java @@ -0,0 +1,111 @@ +package com.bweb.controller; + +import com.hai.common.exception.ErrorCode; +import com.hai.common.exception.ErrorHelp; +import com.hai.common.exception.SysCode; +import com.hai.common.security.SessionObject; +import com.hai.common.security.UserCenter; +import com.hai.common.utils.MemberValidateUtil; +import com.hai.common.utils.ResponseMsgUtil; +import com.hai.entity.HighCoupon; +import com.hai.entity.HighCouponHandsel; +import com.hai.entity.HighMerchant; +import com.hai.entity.HighMerchantStore; +import com.hai.model.HighCouponModel; +import com.hai.model.ResponseData; +import com.hai.model.UserInfoModel; +import com.hai.service.HighCouponService; +import com.hai.service.HighMerchantService; +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.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.annotation.Resource; +import javax.servlet.http.HttpServletRequest; +import java.time.Year; +import java.util.Date; + +/** + * @Auther: 胡锐 + * @Description: + * @Date: 2021/3/11 22:16 + */ +@Controller +@RequestMapping(value = "/coupon") +@Api(value = "卡卷接口") +public class HighCouponController { + + private static Logger log = LoggerFactory.getLogger(HighCouponController.class); + + @Autowired + private UserCenter userCenter; + + @Resource + private HighMerchantService highMerchantService; + + @Resource + private HighCouponService highCouponService; + + @RequestMapping(value="/insertCoupon",method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "增加卡卷") + public ResponseData insertCoupon(@RequestBody HighCouponModel highCoupon, HttpServletRequest request) { + try { + SessionObject sessionObject = userCenter.getSessionObject(request); + UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); + if (highCoupon.getMerchantId() == null + || StringUtils.isNotBlank(highCoupon.getCouponKey()) + || StringUtils.isNotBlank(highCoupon.getCouponName()) + || StringUtils.isNotBlank(highCoupon.getCouponValue()) + || StringUtils.isNotBlank(highCoupon.getCouponImg()) + || highCoupon.getIsPresent() == null + || highCoupon.getCouponPrice() == null) { + log.error("HighCouponController -> insertCoupon() error!","参数错误"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + // 是否赠送卡卷 + if (highCoupon.getIsPresent() == true) { + if (highCoupon.getHandselCouponList() == null || highCoupon.getHandselCouponList().size() == 0) { + log.error("HighCouponController -> insertCoupon() error!","请选择赠送卡卷名单"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.SELECT_HANDSEL_COUPON_ERROR, ""); + } + for (HighCouponHandsel handsel : highCoupon.getHandselCouponList()) { + handsel.setCreateTime(new Date()); + handsel.setStatus(1); // 状态 0:删除 1:正常 + handsel.setOperatorId(userInfoModel.getSecUser().getId()); + handsel.setOperatorName(userInfoModel.getSecUser().getUserName()); + } + } + + // 查询商户 + HighMerchant merchant = highMerchantService.getMerchantById(highCoupon.getCompanyId()); + if (merchant == null) { + log.error("HighCouponController -> insertCoupon() error!","未找到商户"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOF_FOUND, ""); + } + + highCoupon.setCompanyId(merchant.getCompanyId()); + highCoupon.setOperatorId(userInfoModel.getSecUser().getId()); + highCoupon.setOperatorName(userInfoModel.getSecUser().getUserName()); + highCoupon.setCreateTime(new Date()); + highCoupon.setUpdateTime(new Date()); + highCoupon.setStatus(1); // 状态:0.删除 1.编辑中 2.已上架 3.已下架 101.上架审批中 + highCouponService.insertCoupon(highCoupon); + + return ResponseMsgUtil.success(highCoupon); + } catch (Exception e) { + log.error("HighCouponController -> insertCoupon() error!",e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantController.java index 7f0fb370..5b056ab2 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantController.java @@ -13,6 +13,7 @@ import com.hai.common.utils.MD5Util; import com.hai.common.utils.MemberValidateUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.*; +import com.hai.model.HighMerchantModel; import com.hai.model.MenuTreeModel; import com.hai.model.ResponseData; import com.hai.model.UserInfoModel; @@ -59,7 +60,7 @@ public class HighMerchantController { @RequestMapping(value="/editMerchant",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "编辑商户") - public ResponseData editMerchant(@RequestBody HighMerchant highMerchant, HttpServletRequest request) { + public ResponseData editMerchant(@RequestBody HighMerchantModel highMerchant, HttpServletRequest request) { try { SessionObject sessionObject = userCenter.getSessionObject(request); UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject(); diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java index ae48589f..cea3e54b 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantStoreController.java @@ -11,6 +11,7 @@ import com.hai.common.utils.MemberValidateUtil; import com.hai.common.utils.ResponseMsgUtil; import com.hai.entity.HighMerchant; import com.hai.entity.HighMerchantStore; +import com.hai.model.HighMerchantStoreModel; import com.hai.model.ResponseData; import com.hai.model.UserInfoModel; import com.hai.service.HighMerchantService; @@ -58,7 +59,7 @@ public class HighMerchantStoreController { @RequestMapping(value="/editHighMerchantStore",method = RequestMethod.POST) @ResponseBody @ApiOperation(value = "编辑商户门店") - public ResponseData editMerchantStore(@RequestBody HighMerchantStore highMerchantStore, HttpServletRequest request) { + public ResponseData editMerchantStore(@RequestBody HighMerchantStoreModel highMerchantStore, HttpServletRequest request) { try { //发布人员 SessionObject sessionObject = userCenter.getSessionObject(request); diff --git a/hai-service/src/main/java/com/hai/common/exception/ErrorCode.java b/hai-service/src/main/java/com/hai/common/exception/ErrorCode.java index 063bbdb1..1b053448 100644 --- a/hai-service/src/main/java/com/hai/common/exception/ErrorCode.java +++ b/hai-service/src/main/java/com/hai/common/exception/ErrorCode.java @@ -79,6 +79,7 @@ public enum ErrorCode { PHONE_NUM_IS_ERROR("2107","请输入正确的电话号码"), PHONE_NUM_EXISTED("2108","电话号码已被使用"), MERCHANT_STATUS_ERROR("2109","商户状态不正常,请联系管理员"), + SELECT_HANDSEL_COUPON_ERROR("2110","请选择赠送卡卷名单"), STATUS_ERROR("3000","状态错误"), diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapper.java b/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapper.java new file mode 100644 index 00000000..e48742d5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapper.java @@ -0,0 +1,81 @@ +package com.hai.dao; + +import com.hai.entity.HighCouponCode; +import com.hai.entity.HighCouponCodeExample; +import java.util.List; +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.SelectProvider; +import org.apache.ibatis.annotations.UpdateProvider; +import org.apache.ibatis.type.JdbcType; +import org.springframework.stereotype.Repository; + +/** + * + * 代码由工具生成,请勿修改!!! + * 如果需要扩展请在其父类进行扩展 + * + **/ +@Repository +public interface HighCouponCodeMapper extends HighCouponCodeMapperExt { + @SelectProvider(type=HighCouponCodeSqlProvider.class, method="countByExample") + long countByExample(HighCouponCodeExample example); + + @DeleteProvider(type=HighCouponCodeSqlProvider.class, method="deleteByExample") + int deleteByExample(HighCouponCodeExample example); + + @Insert({ + "insert into high_coupon_code (coupon_id, merchant_id, ", + "order_id, sales_code, ", + "sales_end_time, use_end_time, ", + "create_time, receive_time, ", + "consume_time, `status`, ", + "operator_id, operator_name, ", + "ext_1, ext_2, ext_3)", + "values (#{couponId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ", + "#{orderId,jdbcType=BIGINT}, #{salesCode,jdbcType=VARCHAR}, ", + "#{salesEndTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{receiveTime,jdbcType=TIMESTAMP}, ", + "#{consumeTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", + "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighCouponCode record); + + @InsertProvider(type=HighCouponCodeSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighCouponCode record); + + @SelectProvider(type=HighCouponCodeSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT), + @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), + @Result(column="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="sales_code", property="salesCode", jdbcType=JdbcType.VARCHAR), + @Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="use_end_time", property="useEndTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="receive_time", property="receiveTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="consume_time", property="consumeTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", 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(HighCouponCodeExample example); + + @UpdateProvider(type=HighCouponCodeSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighCouponCode record, @Param("example") HighCouponCodeExample example); + + @UpdateProvider(type=HighCouponCodeSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighCouponCode record, @Param("example") HighCouponCodeExample example); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java new file mode 100644 index 00000000..18052a3e --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponCodeMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighCouponCodeMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponCodeSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighCouponCodeSqlProvider.java new file mode 100644 index 00000000..5f59da47 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponCodeSqlProvider.java @@ -0,0 +1,319 @@ +package com.hai.dao; + +import com.hai.entity.HighCouponCode; +import com.hai.entity.HighCouponCodeExample.Criteria; +import com.hai.entity.HighCouponCodeExample.Criterion; +import com.hai.entity.HighCouponCodeExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighCouponCodeSqlProvider { + + public String countByExample(HighCouponCodeExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_coupon_code"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighCouponCodeExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_coupon_code"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighCouponCode record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_coupon_code"); + + if (record.getCouponId() != null) { + sql.VALUES("coupon_id", "#{couponId,jdbcType=BIGINT}"); + } + + if (record.getMerchantId() != null) { + sql.VALUES("merchant_id", "#{merchantId,jdbcType=BIGINT}"); + } + + if (record.getOrderId() != null) { + sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); + } + + if (record.getSalesCode() != null) { + sql.VALUES("sales_code", "#{salesCode,jdbcType=VARCHAR}"); + } + + if (record.getSalesEndTime() != null) { + sql.VALUES("sales_end_time", "#{salesEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUseEndTime() != null) { + sql.VALUES("use_end_time", "#{useEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getReceiveTime() != null) { + sql.VALUES("receive_time", "#{receiveTime,jdbcType=TIMESTAMP}"); + } + + if (record.getConsumeTime() != null) { + sql.VALUES("consume_time", "#{consumeTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getOperatorId() != null) { + sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.VALUES("operator_name", "#{operatorName,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(HighCouponCodeExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("coupon_id"); + sql.SELECT("merchant_id"); + sql.SELECT("order_id"); + sql.SELECT("sales_code"); + sql.SELECT("sales_end_time"); + sql.SELECT("use_end_time"); + sql.SELECT("create_time"); + sql.SELECT("receive_time"); + sql.SELECT("consume_time"); + sql.SELECT("`status`"); + sql.SELECT("operator_id"); + sql.SELECT("operator_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_coupon_code"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighCouponCode record = (HighCouponCode) parameter.get("record"); + HighCouponCodeExample example = (HighCouponCodeExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_coupon_code"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getCouponId() != null) { + sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}"); + } + + if (record.getMerchantId() != null) { + sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + } + + if (record.getSalesCode() != null) { + sql.SET("sales_code = #{record.salesCode,jdbcType=VARCHAR}"); + } + + if (record.getSalesEndTime() != null) { + sql.SET("sales_end_time = #{record.salesEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUseEndTime() != null) { + sql.SET("use_end_time = #{record.useEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getReceiveTime() != null) { + sql.SET("receive_time = #{record.receiveTime,jdbcType=TIMESTAMP}"); + } + + if (record.getConsumeTime() != null) { + sql.SET("consume_time = #{record.consumeTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getOperatorId() != null) { + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{record.operatorName,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_coupon_code"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}"); + sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}"); + sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + sql.SET("sales_code = #{record.salesCode,jdbcType=VARCHAR}"); + sql.SET("sales_end_time = #{record.salesEndTime,jdbcType=TIMESTAMP}"); + sql.SET("use_end_time = #{record.useEndTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("receive_time = #{record.receiveTime,jdbcType=TIMESTAMP}"); + sql.SET("consume_time = #{record.consumeTime,jdbcType=TIMESTAMP}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + sql.SET("operator_name = #{record.operatorName,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}"); + + HighCouponCodeExample example = (HighCouponCodeExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + protected void applyWhere(SQL sql, HighCouponCodeExample 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/HighCouponHandselMapper.java b/hai-service/src/main/java/com/hai/dao/HighCouponHandselMapper.java new file mode 100644 index 00000000..ba93b73e --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponHandselMapper.java @@ -0,0 +1,117 @@ +package com.hai.dao; + +import com.hai.entity.HighCouponHandsel; +import com.hai.entity.HighCouponHandselExample; +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 HighCouponHandselMapper extends HighCouponHandselMapperExt { + @SelectProvider(type=HighCouponHandselSqlProvider.class, method="countByExample") + long countByExample(HighCouponHandselExample example); + + @DeleteProvider(type=HighCouponHandselSqlProvider.class, method="deleteByExample") + int deleteByExample(HighCouponHandselExample example); + + @Delete({ + "delete from high_coupon_handsel", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_coupon_handsel (coupon_id, handsel_coupon_id, ", + "create_time, `status`, ", + "operator_id, operator_name, ", + "ext_1, ext_2, ext_3)", + "values (#{couponId,jdbcType=BIGINT}, #{handselCouponId,jdbcType=BIGINT}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", + "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighCouponHandsel record); + + @InsertProvider(type=HighCouponHandselSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighCouponHandsel record); + + @SelectProvider(type=HighCouponHandselSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), + @Result(column="handsel_coupon_id", property="handselCouponId", jdbcType=JdbcType.BIGINT), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", 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(HighCouponHandselExample example); + + @Select({ + "select", + "id, coupon_id, handsel_coupon_id, create_time, `status`, operator_id, operator_name, ", + "ext_1, ext_2, ext_3", + "from high_coupon_handsel", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT), + @Result(column="handsel_coupon_id", property="handselCouponId", jdbcType=JdbcType.BIGINT), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", 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) + }) + HighCouponHandsel selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighCouponHandselSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighCouponHandsel record, @Param("example") HighCouponHandselExample example); + + @UpdateProvider(type=HighCouponHandselSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighCouponHandsel record, @Param("example") HighCouponHandselExample example); + + @UpdateProvider(type=HighCouponHandselSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighCouponHandsel record); + + @Update({ + "update high_coupon_handsel", + "set coupon_id = #{couponId,jdbcType=BIGINT},", + "handsel_coupon_id = #{handselCouponId,jdbcType=BIGINT},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "`status` = #{status,jdbcType=INTEGER},", + "operator_id = #{operatorId,jdbcType=BIGINT},", + "operator_name = #{operatorName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighCouponHandsel record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponHandselMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighCouponHandselMapperExt.java new file mode 100644 index 00000000..88a219f5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponHandselMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighCouponHandselMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponHandselSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighCouponHandselSqlProvider.java new file mode 100644 index 00000000..714b2fac --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponHandselSqlProvider.java @@ -0,0 +1,304 @@ +package com.hai.dao; + +import com.hai.entity.HighCouponHandsel; +import com.hai.entity.HighCouponHandselExample.Criteria; +import com.hai.entity.HighCouponHandselExample.Criterion; +import com.hai.entity.HighCouponHandselExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighCouponHandselSqlProvider { + + public String countByExample(HighCouponHandselExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_coupon_handsel"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighCouponHandselExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_coupon_handsel"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighCouponHandsel record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_coupon_handsel"); + + if (record.getCouponId() != null) { + sql.VALUES("coupon_id", "#{couponId,jdbcType=BIGINT}"); + } + + if (record.getHandselCouponId() != null) { + sql.VALUES("handsel_coupon_id", "#{handselCouponId,jdbcType=BIGINT}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getOperatorId() != null) { + sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.VALUES("operator_name", "#{operatorName,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(HighCouponHandselExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("coupon_id"); + sql.SELECT("handsel_coupon_id"); + sql.SELECT("create_time"); + sql.SELECT("`status`"); + sql.SELECT("operator_id"); + sql.SELECT("operator_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_coupon_handsel"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighCouponHandsel record = (HighCouponHandsel) parameter.get("record"); + HighCouponHandselExample example = (HighCouponHandselExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_coupon_handsel"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getCouponId() != null) { + sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}"); + } + + if (record.getHandselCouponId() != null) { + sql.SET("handsel_coupon_id = #{record.handselCouponId,jdbcType=BIGINT}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getOperatorId() != null) { + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{record.operatorName,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_coupon_handsel"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}"); + sql.SET("handsel_coupon_id = #{record.handselCouponId,jdbcType=BIGINT}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + sql.SET("operator_name = #{record.operatorName,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}"); + + HighCouponHandselExample example = (HighCouponHandselExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighCouponHandsel record) { + SQL sql = new SQL(); + sql.UPDATE("high_coupon_handsel"); + + if (record.getCouponId() != null) { + sql.SET("coupon_id = #{couponId,jdbcType=BIGINT}"); + } + + if (record.getHandselCouponId() != null) { + sql.SET("handsel_coupon_id = #{handselCouponId,jdbcType=BIGINT}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getOperatorId() != null) { + sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{operatorName,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, HighCouponHandselExample 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/HighCouponMapper.java b/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java new file mode 100644 index 00000000..6a553864 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponMapper.java @@ -0,0 +1,147 @@ +package com.hai.dao; + +import com.hai.entity.HighCoupon; +import com.hai.entity.HighCouponExample; +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 HighCouponMapper extends HighCouponMapperExt { + @SelectProvider(type=HighCouponSqlProvider.class, method="countByExample") + long countByExample(HighCouponExample example); + + @DeleteProvider(type=HighCouponSqlProvider.class, method="deleteByExample") + int deleteByExample(HighCouponExample example); + + @Delete({ + "delete from high_coupon", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_coupon (company_id, merchant_id, ", + "coupon_key, coupon_name, ", + "coupon_value, coupon_img, ", + "coupon_price, is_present, ", + "create_time, update_time, ", + "operator_id, operator_name, ", + "`status`, ext_1, ext_2, ", + "ext_3)", + "values (#{companyId,jdbcType=BIGINT}, #{merchantId,jdbcType=BIGINT}, ", + "#{couponKey,jdbcType=VARCHAR}, #{couponName,jdbcType=VARCHAR}, ", + "#{couponValue,jdbcType=VARCHAR}, #{couponImg,jdbcType=VARCHAR}, ", + "#{couponPrice,jdbcType=DECIMAL}, #{isPresent,jdbcType=BIT}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighCoupon record); + + @InsertProvider(type=HighCouponSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighCoupon record); + + @SelectProvider(type=HighCouponSqlProvider.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="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), + @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_value", property="couponValue", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_img", property="couponImg", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="is_present", property="isPresent", jdbcType=JdbcType.BIT), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @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(HighCouponExample example); + + @Select({ + "select", + "id, company_id, merchant_id, coupon_key, coupon_name, coupon_value, coupon_img, ", + "coupon_price, is_present, create_time, update_time, operator_id, operator_name, ", + "`status`, ext_1, ext_2, ext_3", + "from high_coupon", + "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="merchant_id", property="merchantId", jdbcType=JdbcType.BIGINT), + @Result(column="coupon_key", property="couponKey", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_value", property="couponValue", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_img", property="couponImg", jdbcType=JdbcType.VARCHAR), + @Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="is_present", property="isPresent", jdbcType=JdbcType.BIT), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @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) + }) + HighCoupon selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighCouponSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighCoupon record, @Param("example") HighCouponExample example); + + @UpdateProvider(type=HighCouponSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighCoupon record, @Param("example") HighCouponExample example); + + @UpdateProvider(type=HighCouponSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighCoupon record); + + @Update({ + "update high_coupon", + "set company_id = #{companyId,jdbcType=BIGINT},", + "merchant_id = #{merchantId,jdbcType=BIGINT},", + "coupon_key = #{couponKey,jdbcType=VARCHAR},", + "coupon_name = #{couponName,jdbcType=VARCHAR},", + "coupon_value = #{couponValue,jdbcType=VARCHAR},", + "coupon_img = #{couponImg,jdbcType=VARCHAR},", + "coupon_price = #{couponPrice,jdbcType=DECIMAL},", + "is_present = #{isPresent,jdbcType=BIT},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "operator_id = #{operatorId,jdbcType=BIGINT},", + "operator_name = #{operatorName,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighCoupon record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighCouponMapperExt.java new file mode 100644 index 00000000..24d13ebc --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighCouponMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java new file mode 100644 index 00000000..9cd2de91 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighCouponSqlProvider.java @@ -0,0 +1,402 @@ +package com.hai.dao; + +import com.hai.entity.HighCoupon; +import com.hai.entity.HighCouponExample.Criteria; +import com.hai.entity.HighCouponExample.Criterion; +import com.hai.entity.HighCouponExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighCouponSqlProvider { + + public String countByExample(HighCouponExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_coupon"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighCouponExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_coupon"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighCoupon record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_coupon"); + + if (record.getCompanyId() != null) { + sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}"); + } + + if (record.getMerchantId() != null) { + sql.VALUES("merchant_id", "#{merchantId,jdbcType=BIGINT}"); + } + + if (record.getCouponKey() != null) { + sql.VALUES("coupon_key", "#{couponKey,jdbcType=VARCHAR}"); + } + + if (record.getCouponName() != null) { + sql.VALUES("coupon_name", "#{couponName,jdbcType=VARCHAR}"); + } + + if (record.getCouponValue() != null) { + sql.VALUES("coupon_value", "#{couponValue,jdbcType=VARCHAR}"); + } + + if (record.getCouponImg() != null) { + sql.VALUES("coupon_img", "#{couponImg,jdbcType=VARCHAR}"); + } + + if (record.getCouponPrice() != null) { + sql.VALUES("coupon_price", "#{couponPrice,jdbcType=DECIMAL}"); + } + + if (record.getIsPresent() != null) { + sql.VALUES("is_present", "#{isPresent,jdbcType=BIT}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOperatorId() != null) { + sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.VALUES("operator_name", "#{operatorName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + 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(HighCouponExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("company_id"); + sql.SELECT("merchant_id"); + sql.SELECT("coupon_key"); + sql.SELECT("coupon_name"); + sql.SELECT("coupon_value"); + sql.SELECT("coupon_img"); + sql.SELECT("coupon_price"); + sql.SELECT("is_present"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("operator_id"); + sql.SELECT("operator_name"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_coupon"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighCoupon record = (HighCoupon) parameter.get("record"); + HighCouponExample example = (HighCouponExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_coupon"); + + 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.getMerchantId() != null) { + sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}"); + } + + if (record.getCouponKey() != null) { + sql.SET("coupon_key = #{record.couponKey,jdbcType=VARCHAR}"); + } + + if (record.getCouponName() != null) { + sql.SET("coupon_name = #{record.couponName,jdbcType=VARCHAR}"); + } + + if (record.getCouponValue() != null) { + sql.SET("coupon_value = #{record.couponValue,jdbcType=VARCHAR}"); + } + + if (record.getCouponImg() != null) { + sql.SET("coupon_img = #{record.couponImg,jdbcType=VARCHAR}"); + } + + if (record.getCouponPrice() != null) { + sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}"); + } + + if (record.getIsPresent() != null) { + sql.SET("is_present = #{record.isPresent,jdbcType=BIT}"); + } + + 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.getOperatorId() != null) { + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + 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_coupon"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}"); + sql.SET("merchant_id = #{record.merchantId,jdbcType=BIGINT}"); + sql.SET("coupon_key = #{record.couponKey,jdbcType=VARCHAR}"); + sql.SET("coupon_name = #{record.couponName,jdbcType=VARCHAR}"); + sql.SET("coupon_value = #{record.couponValue,jdbcType=VARCHAR}"); + sql.SET("coupon_img = #{record.couponImg,jdbcType=VARCHAR}"); + sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}"); + sql.SET("is_present = #{record.isPresent,jdbcType=BIT}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + HighCouponExample example = (HighCouponExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighCoupon record) { + SQL sql = new SQL(); + sql.UPDATE("high_coupon"); + + if (record.getCompanyId() != null) { + sql.SET("company_id = #{companyId,jdbcType=BIGINT}"); + } + + if (record.getMerchantId() != null) { + sql.SET("merchant_id = #{merchantId,jdbcType=BIGINT}"); + } + + if (record.getCouponKey() != null) { + sql.SET("coupon_key = #{couponKey,jdbcType=VARCHAR}"); + } + + if (record.getCouponName() != null) { + sql.SET("coupon_name = #{couponName,jdbcType=VARCHAR}"); + } + + if (record.getCouponValue() != null) { + sql.SET("coupon_value = #{couponValue,jdbcType=VARCHAR}"); + } + + if (record.getCouponImg() != null) { + sql.SET("coupon_img = #{couponImg,jdbcType=VARCHAR}"); + } + + if (record.getCouponPrice() != null) { + sql.SET("coupon_price = #{couponPrice,jdbcType=DECIMAL}"); + } + + if (record.getIsPresent() != null) { + sql.SET("is_present = #{isPresent,jdbcType=BIT}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOperatorId() != null) { + sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{operatorName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + 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, HighCouponExample 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/HighGoodsPriceReferMapper.java b/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapper.java new file mode 100644 index 00000000..7ed90f91 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapper.java @@ -0,0 +1,130 @@ +package com.hai.dao; + +import com.hai.entity.HighGoodsPriceRefer; +import com.hai.entity.HighGoodsPriceReferExample; +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 HighGoodsPriceReferMapper extends HighGoodsPriceReferMapperExt { + @SelectProvider(type=HighGoodsPriceReferSqlProvider.class, method="countByExample") + long countByExample(HighGoodsPriceReferExample example); + + @DeleteProvider(type=HighGoodsPriceReferSqlProvider.class, method="deleteByExample") + int deleteByExample(HighGoodsPriceReferExample example); + + @Delete({ + "delete from high_goods_price_refer", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into high_goods_price_refer (goods_type, goods_id, ", + "new_sale_price, effective_time, ", + "create_time, update_time, ", + "operator_id, operator_name, ", + "`status`, ext_1, ext_2, ", + "ext_3)", + "values (#{goodsType,jdbcType=INTEGER}, #{goodsId,jdbcType=BIGINT}, ", + "#{newSalePrice,jdbcType=REAL}, #{effectiveTime,jdbcType=TIMESTAMP}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(HighGoodsPriceRefer record); + + @InsertProvider(type=HighGoodsPriceReferSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(HighGoodsPriceRefer record); + + @SelectProvider(type=HighGoodsPriceReferSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), + @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="new_sale_price", property="newSalePrice", jdbcType=JdbcType.REAL), + @Result(column="effective_time", property="effectiveTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @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(HighGoodsPriceReferExample example); + + @Select({ + "select", + "id, goods_type, goods_id, new_sale_price, effective_time, create_time, update_time, ", + "operator_id, operator_name, `status`, ext_1, ext_2, ext_3", + "from high_goods_price_refer", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), + @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="new_sale_price", property="newSalePrice", jdbcType=JdbcType.REAL), + @Result(column="effective_time", property="effectiveTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="operator_id", property="operatorId", jdbcType=JdbcType.BIGINT), + @Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @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) + }) + HighGoodsPriceRefer selectByPrimaryKey(Long id); + + @UpdateProvider(type=HighGoodsPriceReferSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") HighGoodsPriceRefer record, @Param("example") HighGoodsPriceReferExample example); + + @UpdateProvider(type=HighGoodsPriceReferSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") HighGoodsPriceRefer record, @Param("example") HighGoodsPriceReferExample example); + + @UpdateProvider(type=HighGoodsPriceReferSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(HighGoodsPriceRefer record); + + @Update({ + "update high_goods_price_refer", + "set goods_type = #{goodsType,jdbcType=INTEGER},", + "goods_id = #{goodsId,jdbcType=BIGINT},", + "new_sale_price = #{newSalePrice,jdbcType=REAL},", + "effective_time = #{effectiveTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "operator_id = #{operatorId,jdbcType=BIGINT},", + "operator_name = #{operatorName,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(HighGoodsPriceRefer record); +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapperExt.java b/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapperExt.java new file mode 100644 index 00000000..e1354cb1 --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferMapperExt.java @@ -0,0 +1,7 @@ +package com.hai.dao; + +/** + * mapper扩展类 + */ +public interface HighGoodsPriceReferMapperExt { +} \ No newline at end of file diff --git a/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferSqlProvider.java b/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferSqlProvider.java new file mode 100644 index 00000000..a00c804c --- /dev/null +++ b/hai-service/src/main/java/com/hai/dao/HighGoodsPriceReferSqlProvider.java @@ -0,0 +1,346 @@ +package com.hai.dao; + +import com.hai.entity.HighGoodsPriceRefer; +import com.hai.entity.HighGoodsPriceReferExample.Criteria; +import com.hai.entity.HighGoodsPriceReferExample.Criterion; +import com.hai.entity.HighGoodsPriceReferExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class HighGoodsPriceReferSqlProvider { + + public String countByExample(HighGoodsPriceReferExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("high_goods_price_refer"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(HighGoodsPriceReferExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("high_goods_price_refer"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(HighGoodsPriceRefer record) { + SQL sql = new SQL(); + sql.INSERT_INTO("high_goods_price_refer"); + + if (record.getGoodsType() != null) { + sql.VALUES("goods_type", "#{goodsType,jdbcType=INTEGER}"); + } + + if (record.getGoodsId() != null) { + sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); + } + + if (record.getNewSalePrice() != null) { + sql.VALUES("new_sale_price", "#{newSalePrice,jdbcType=REAL}"); + } + + if (record.getEffectiveTime() != null) { + sql.VALUES("effective_time", "#{effectiveTime,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.getOperatorId() != null) { + sql.VALUES("operator_id", "#{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.VALUES("operator_name", "#{operatorName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + 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(HighGoodsPriceReferExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("goods_type"); + sql.SELECT("goods_id"); + sql.SELECT("new_sale_price"); + sql.SELECT("effective_time"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("operator_id"); + sql.SELECT("operator_name"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("high_goods_price_refer"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + HighGoodsPriceRefer record = (HighGoodsPriceRefer) parameter.get("record"); + HighGoodsPriceReferExample example = (HighGoodsPriceReferExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("high_goods_price_refer"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getGoodsType() != null) { + sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}"); + } + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + } + + if (record.getNewSalePrice() != null) { + sql.SET("new_sale_price = #{record.newSalePrice,jdbcType=REAL}"); + } + + if (record.getEffectiveTime() != null) { + sql.SET("effective_time = #{record.effectiveTime,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.getOperatorId() != null) { + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + 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_goods_price_refer"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}"); + sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + sql.SET("new_sale_price = #{record.newSalePrice,jdbcType=REAL}"); + sql.SET("effective_time = #{record.effectiveTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("operator_id = #{record.operatorId,jdbcType=BIGINT}"); + sql.SET("operator_name = #{record.operatorName,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + HighGoodsPriceReferExample example = (HighGoodsPriceReferExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(HighGoodsPriceRefer record) { + SQL sql = new SQL(); + sql.UPDATE("high_goods_price_refer"); + + if (record.getGoodsType() != null) { + sql.SET("goods_type = #{goodsType,jdbcType=INTEGER}"); + } + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); + } + + if (record.getNewSalePrice() != null) { + sql.SET("new_sale_price = #{newSalePrice,jdbcType=REAL}"); + } + + if (record.getEffectiveTime() != null) { + sql.SET("effective_time = #{effectiveTime,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.getOperatorId() != null) { + sql.SET("operator_id = #{operatorId,jdbcType=BIGINT}"); + } + + if (record.getOperatorName() != null) { + sql.SET("operator_name = #{operatorName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + 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, HighGoodsPriceReferExample 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/entity/HighCoupon.java b/hai-service/src/main/java/com/hai/entity/HighCoupon.java new file mode 100644 index 00000000..4b6cc9ec --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighCoupon.java @@ -0,0 +1,314 @@ +package com.hai.entity; + +import com.hai.model.HighCouponModel; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_coupon + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighCoupon implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 单位id + */ + private Long companyId; + + /** + * 商户id + */ + private Long merchantId; + + /** + * 卡券编号 + */ + private String couponKey; + + /** + * 卡券名称 + */ + private String couponName; + + /** + * 卡券面值 + */ + private String couponValue; + + /** + * 卡券图片 + */ + private String couponImg; + + /** + * 销售价格 + */ + private Long couponPrice; + + /** + * 是否可赠送卡券 + */ + private Boolean isPresent; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 操作人id + */ + private Long operatorId; + + /** + * 操作人名称 + */ + private String operatorName; + + /** + * 状态:0.删除 1.编辑中 2.已上架 3.已下架 101.上架审批中 102.上架审批驳回 + */ + private Integer status; + + 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 getMerchantId() { + return merchantId; + } + + public void setMerchantId(Long merchantId) { + this.merchantId = merchantId; + } + + public String getCouponKey() { + return couponKey; + } + + public void setCouponKey(String couponKey) { + this.couponKey = couponKey; + } + + public String getCouponName() { + return couponName; + } + + public void setCouponName(String couponName) { + this.couponName = couponName; + } + + public String getCouponValue() { + return couponValue; + } + + public void setCouponValue(String couponValue) { + this.couponValue = couponValue; + } + + public String getCouponImg() { + return couponImg; + } + + public void setCouponImg(String couponImg) { + this.couponImg = couponImg; + } + + public Long getCouponPrice() { + return couponPrice; + } + + public void setCouponPrice(Long couponPrice) { + this.couponPrice = couponPrice; + } + + public Boolean getIsPresent() { + return isPresent; + } + + public void setIsPresent(Boolean isPresent) { + this.isPresent = isPresent; + } + + 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 getOperatorId() { + return operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + 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; + } + HighCoupon other = (HighCoupon) 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.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId())) + && (this.getCouponKey() == null ? other.getCouponKey() == null : this.getCouponKey().equals(other.getCouponKey())) + && (this.getCouponName() == null ? other.getCouponName() == null : this.getCouponName().equals(other.getCouponName())) + && (this.getCouponValue() == null ? other.getCouponValue() == null : this.getCouponValue().equals(other.getCouponValue())) + && (this.getCouponImg() == null ? other.getCouponImg() == null : this.getCouponImg().equals(other.getCouponImg())) + && (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice())) + && (this.getIsPresent() == null ? other.getIsPresent() == null : this.getIsPresent().equals(other.getIsPresent())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) + && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (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 + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode()); + result = prime * result + ((getCouponKey() == null) ? 0 : getCouponKey().hashCode()); + result = prime * result + ((getCouponName() == null) ? 0 : getCouponName().hashCode()); + result = prime * result + ((getCouponValue() == null) ? 0 : getCouponValue().hashCode()); + result = prime * result + ((getCouponImg() == null) ? 0 : getCouponImg().hashCode()); + result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode()); + result = prime * result + ((getIsPresent() == null) ? 0 : getIsPresent().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); + result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", merchantId=").append(merchantId); + sb.append(", couponKey=").append(couponKey); + sb.append(", couponName=").append(couponName); + sb.append(", couponValue=").append(couponValue); + sb.append(", couponImg=").append(couponImg); + sb.append(", couponPrice=").append(couponPrice); + sb.append(", isPresent=").append(isPresent); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", operatorId=").append(operatorId); + sb.append(", operatorName=").append(operatorName); + sb.append(", status=").append(status); + 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(); + } +} diff --git a/hai-service/src/main/java/com/hai/entity/HighCouponCode.java b/hai-service/src/main/java/com/hai/entity/HighCouponCode.java new file mode 100644 index 00000000..878fc54f --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighCouponCode.java @@ -0,0 +1,296 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_coupon_code + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighCouponCode implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 卡卷 + */ + private Long couponId; + + /** + * 商户 + */ + private Long merchantId; + + /** + * 订单id + */ + private Long orderId; + + /** + * 销售码 + */ + private String salesCode; + + /** + * 销售有效期 + */ + private Date salesEndTime; + + /** + * 使用有效期 + */ + private Date useEndTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 领取时间 + */ + private Date receiveTime; + + /** + * 消费时间 + */ + private Date consumeTime; + + /** + * 状态:1.待销售 2.未使用 3.已使用 4.已过期 + */ + private Integer status; + + /** + * 操作人 + */ + private Long operatorId; + + /** + * 操作人名称 + */ + private String operatorName; + + 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 getCouponId() { + return couponId; + } + + public void setCouponId(Long couponId) { + this.couponId = couponId; + } + + public Long getMerchantId() { + return merchantId; + } + + public void setMerchantId(Long merchantId) { + this.merchantId = merchantId; + } + + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + public String getSalesCode() { + return salesCode; + } + + public void setSalesCode(String salesCode) { + this.salesCode = salesCode; + } + + public Date getSalesEndTime() { + return salesEndTime; + } + + public void setSalesEndTime(Date salesEndTime) { + this.salesEndTime = salesEndTime; + } + + public Date getUseEndTime() { + return useEndTime; + } + + public void setUseEndTime(Date useEndTime) { + this.useEndTime = useEndTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getReceiveTime() { + return receiveTime; + } + + public void setReceiveTime(Date receiveTime) { + this.receiveTime = receiveTime; + } + + public Date getConsumeTime() { + return consumeTime; + } + + public void setConsumeTime(Date consumeTime) { + this.consumeTime = consumeTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getOperatorId() { + return operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + + 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; + } + HighCouponCode other = (HighCouponCode) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId())) + && (this.getMerchantId() == null ? other.getMerchantId() == null : this.getMerchantId().equals(other.getMerchantId())) + && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) + && (this.getSalesCode() == null ? other.getSalesCode() == null : this.getSalesCode().equals(other.getSalesCode())) + && (this.getSalesEndTime() == null ? other.getSalesEndTime() == null : this.getSalesEndTime().equals(other.getSalesEndTime())) + && (this.getUseEndTime() == null ? other.getUseEndTime() == null : this.getUseEndTime().equals(other.getUseEndTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getReceiveTime() == null ? other.getReceiveTime() == null : this.getReceiveTime().equals(other.getReceiveTime())) + && (this.getConsumeTime() == null ? other.getConsumeTime() == null : this.getConsumeTime().equals(other.getConsumeTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) + && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) + && (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 + ((getCouponId() == null) ? 0 : getCouponId().hashCode()); + result = prime * result + ((getMerchantId() == null) ? 0 : getMerchantId().hashCode()); + result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); + result = prime * result + ((getSalesCode() == null) ? 0 : getSalesCode().hashCode()); + result = prime * result + ((getSalesEndTime() == null) ? 0 : getSalesEndTime().hashCode()); + result = prime * result + ((getUseEndTime() == null) ? 0 : getUseEndTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getReceiveTime() == null) ? 0 : getReceiveTime().hashCode()); + result = prime * result + ((getConsumeTime() == null) ? 0 : getConsumeTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); + result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().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(", couponId=").append(couponId); + sb.append(", merchantId=").append(merchantId); + sb.append(", orderId=").append(orderId); + sb.append(", salesCode=").append(salesCode); + sb.append(", salesEndTime=").append(salesEndTime); + sb.append(", useEndTime=").append(useEndTime); + sb.append(", createTime=").append(createTime); + sb.append(", receiveTime=").append(receiveTime); + sb.append(", consumeTime=").append(consumeTime); + sb.append(", status=").append(status); + sb.append(", operatorId=").append(operatorId); + sb.append(", operatorName=").append(operatorName); + 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/HighCouponCodeExample.java b/hai-service/src/main/java/com/hai/entity/HighCouponCodeExample.java new file mode 100644 index 00000000..5bee0942 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighCouponCodeExample.java @@ -0,0 +1,1233 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighCouponCodeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighCouponCodeExample() { + 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 andCouponIdIsNull() { + addCriterion("coupon_id is null"); + return (Criteria) this; + } + + public Criteria andCouponIdIsNotNull() { + addCriterion("coupon_id is not null"); + return (Criteria) this; + } + + public Criteria andCouponIdEqualTo(Long value) { + addCriterion("coupon_id =", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdNotEqualTo(Long value) { + addCriterion("coupon_id <>", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdGreaterThan(Long value) { + addCriterion("coupon_id >", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdGreaterThanOrEqualTo(Long value) { + addCriterion("coupon_id >=", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdLessThan(Long value) { + addCriterion("coupon_id <", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdLessThanOrEqualTo(Long value) { + addCriterion("coupon_id <=", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdIn(List values) { + addCriterion("coupon_id in", values, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdNotIn(List values) { + addCriterion("coupon_id not in", values, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdBetween(Long value1, Long value2) { + addCriterion("coupon_id between", value1, value2, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdNotBetween(Long value1, Long value2) { + addCriterion("coupon_id not between", value1, value2, "couponId"); + return (Criteria) this; + } + + public Criteria andMerchantIdIsNull() { + addCriterion("merchant_id is null"); + return (Criteria) this; + } + + public Criteria andMerchantIdIsNotNull() { + addCriterion("merchant_id is not null"); + return (Criteria) this; + } + + public Criteria andMerchantIdEqualTo(Long value) { + addCriterion("merchant_id =", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdNotEqualTo(Long value) { + addCriterion("merchant_id <>", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdGreaterThan(Long value) { + addCriterion("merchant_id >", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdGreaterThanOrEqualTo(Long value) { + addCriterion("merchant_id >=", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdLessThan(Long value) { + addCriterion("merchant_id <", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdLessThanOrEqualTo(Long value) { + addCriterion("merchant_id <=", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdIn(List values) { + addCriterion("merchant_id in", values, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdNotIn(List values) { + addCriterion("merchant_id not in", values, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdBetween(Long value1, Long value2) { + addCriterion("merchant_id between", value1, value2, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdNotBetween(Long value1, Long value2) { + addCriterion("merchant_id not between", value1, value2, "merchantId"); + return (Criteria) this; + } + + public Criteria andOrderIdIsNull() { + addCriterion("order_id is null"); + return (Criteria) this; + } + + public Criteria andOrderIdIsNotNull() { + addCriterion("order_id is not null"); + return (Criteria) this; + } + + public Criteria andOrderIdEqualTo(Long value) { + addCriterion("order_id =", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotEqualTo(Long value) { + addCriterion("order_id <>", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThan(Long value) { + addCriterion("order_id >", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThanOrEqualTo(Long value) { + addCriterion("order_id >=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThan(Long value) { + addCriterion("order_id <", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThanOrEqualTo(Long value) { + addCriterion("order_id <=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdIn(List values) { + addCriterion("order_id in", values, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotIn(List values) { + addCriterion("order_id not in", values, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdBetween(Long value1, Long value2) { + addCriterion("order_id between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotBetween(Long value1, Long value2) { + addCriterion("order_id not between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andSalesCodeIsNull() { + addCriterion("sales_code is null"); + return (Criteria) this; + } + + public Criteria andSalesCodeIsNotNull() { + addCriterion("sales_code is not null"); + return (Criteria) this; + } + + public Criteria andSalesCodeEqualTo(String value) { + addCriterion("sales_code =", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeNotEqualTo(String value) { + addCriterion("sales_code <>", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeGreaterThan(String value) { + addCriterion("sales_code >", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeGreaterThanOrEqualTo(String value) { + addCriterion("sales_code >=", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeLessThan(String value) { + addCriterion("sales_code <", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeLessThanOrEqualTo(String value) { + addCriterion("sales_code <=", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeLike(String value) { + addCriterion("sales_code like", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeNotLike(String value) { + addCriterion("sales_code not like", value, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeIn(List values) { + addCriterion("sales_code in", values, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeNotIn(List values) { + addCriterion("sales_code not in", values, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeBetween(String value1, String value2) { + addCriterion("sales_code between", value1, value2, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesCodeNotBetween(String value1, String value2) { + addCriterion("sales_code not between", value1, value2, "salesCode"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeIsNull() { + addCriterion("sales_end_time is null"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeIsNotNull() { + addCriterion("sales_end_time is not null"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeEqualTo(Date value) { + addCriterion("sales_end_time =", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeNotEqualTo(Date value) { + addCriterion("sales_end_time <>", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeGreaterThan(Date value) { + addCriterion("sales_end_time >", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeGreaterThanOrEqualTo(Date value) { + addCriterion("sales_end_time >=", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeLessThan(Date value) { + addCriterion("sales_end_time <", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeLessThanOrEqualTo(Date value) { + addCriterion("sales_end_time <=", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeIn(List values) { + addCriterion("sales_end_time in", values, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeNotIn(List values) { + addCriterion("sales_end_time not in", values, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeBetween(Date value1, Date value2) { + addCriterion("sales_end_time between", value1, value2, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeNotBetween(Date value1, Date value2) { + addCriterion("sales_end_time not between", value1, value2, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeIsNull() { + addCriterion("use_end_time is null"); + return (Criteria) this; + } + + public Criteria andUseEndTimeIsNotNull() { + addCriterion("use_end_time is not null"); + return (Criteria) this; + } + + public Criteria andUseEndTimeEqualTo(Date value) { + addCriterion("use_end_time =", value, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeNotEqualTo(Date value) { + addCriterion("use_end_time <>", value, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeGreaterThan(Date value) { + addCriterion("use_end_time >", value, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeGreaterThanOrEqualTo(Date value) { + addCriterion("use_end_time >=", value, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeLessThan(Date value) { + addCriterion("use_end_time <", value, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeLessThanOrEqualTo(Date value) { + addCriterion("use_end_time <=", value, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeIn(List values) { + addCriterion("use_end_time in", values, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeNotIn(List values) { + addCriterion("use_end_time not in", values, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeBetween(Date value1, Date value2) { + addCriterion("use_end_time between", value1, value2, "useEndTime"); + return (Criteria) this; + } + + public Criteria andUseEndTimeNotBetween(Date value1, Date value2) { + addCriterion("use_end_time not between", value1, value2, "useEndTime"); + 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 andReceiveTimeIsNull() { + addCriterion("receive_time is null"); + return (Criteria) this; + } + + public Criteria andReceiveTimeIsNotNull() { + addCriterion("receive_time is not null"); + return (Criteria) this; + } + + public Criteria andReceiveTimeEqualTo(Date value) { + addCriterion("receive_time =", value, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeNotEqualTo(Date value) { + addCriterion("receive_time <>", value, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeGreaterThan(Date value) { + addCriterion("receive_time >", value, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeGreaterThanOrEqualTo(Date value) { + addCriterion("receive_time >=", value, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeLessThan(Date value) { + addCriterion("receive_time <", value, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeLessThanOrEqualTo(Date value) { + addCriterion("receive_time <=", value, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeIn(List values) { + addCriterion("receive_time in", values, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeNotIn(List values) { + addCriterion("receive_time not in", values, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeBetween(Date value1, Date value2) { + addCriterion("receive_time between", value1, value2, "receiveTime"); + return (Criteria) this; + } + + public Criteria andReceiveTimeNotBetween(Date value1, Date value2) { + addCriterion("receive_time not between", value1, value2, "receiveTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeIsNull() { + addCriterion("consume_time is null"); + return (Criteria) this; + } + + public Criteria andConsumeTimeIsNotNull() { + addCriterion("consume_time is not null"); + return (Criteria) this; + } + + public Criteria andConsumeTimeEqualTo(Date value) { + addCriterion("consume_time =", value, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeNotEqualTo(Date value) { + addCriterion("consume_time <>", value, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeGreaterThan(Date value) { + addCriterion("consume_time >", value, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeGreaterThanOrEqualTo(Date value) { + addCriterion("consume_time >=", value, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeLessThan(Date value) { + addCriterion("consume_time <", value, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeLessThanOrEqualTo(Date value) { + addCriterion("consume_time <=", value, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeIn(List values) { + addCriterion("consume_time in", values, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeNotIn(List values) { + addCriterion("consume_time not in", values, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeBetween(Date value1, Date value2) { + addCriterion("consume_time between", value1, value2, "consumeTime"); + return (Criteria) this; + } + + public Criteria andConsumeTimeNotBetween(Date value1, Date value2) { + addCriterion("consume_time not between", value1, value2, "consumeTime"); + 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 andOperatorIdIsNull() { + addCriterion("operator_id is null"); + return (Criteria) this; + } + + public Criteria andOperatorIdIsNotNull() { + addCriterion("operator_id is not null"); + return (Criteria) this; + } + + public Criteria andOperatorIdEqualTo(Long value) { + addCriterion("operator_id =", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotEqualTo(Long value) { + addCriterion("operator_id <>", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThan(Long value) { + addCriterion("operator_id >", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("operator_id >=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThan(Long value) { + addCriterion("operator_id <", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThanOrEqualTo(Long value) { + addCriterion("operator_id <=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdIn(List values) { + addCriterion("operator_id in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotIn(List values) { + addCriterion("operator_id not in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdBetween(Long value1, Long value2) { + addCriterion("operator_id between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotBetween(Long value1, Long value2) { + addCriterion("operator_id not between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNull() { + addCriterion("operator_name is null"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNotNull() { + addCriterion("operator_name is not null"); + return (Criteria) this; + } + + public Criteria andOperatorNameEqualTo(String value) { + addCriterion("operator_name =", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotEqualTo(String value) { + addCriterion("operator_name <>", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThan(String value) { + addCriterion("operator_name >", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThanOrEqualTo(String value) { + addCriterion("operator_name >=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThan(String value) { + addCriterion("operator_name <", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThanOrEqualTo(String value) { + addCriterion("operator_name <=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLike(String value) { + addCriterion("operator_name like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotLike(String value) { + addCriterion("operator_name not like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameIn(List values) { + addCriterion("operator_name in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotIn(List values) { + addCriterion("operator_name not in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameBetween(String value1, String value2) { + addCriterion("operator_name between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotBetween(String value1, String value2) { + addCriterion("operator_name not between", value1, value2, "operatorName"); + 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/HighCouponExample.java b/hai-service/src/main/java/com/hai/entity/HighCouponExample.java new file mode 100644 index 00000000..d34e993b --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighCouponExample.java @@ -0,0 +1,1323 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighCouponExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighCouponExample() { + 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 andMerchantIdIsNull() { + addCriterion("merchant_id is null"); + return (Criteria) this; + } + + public Criteria andMerchantIdIsNotNull() { + addCriterion("merchant_id is not null"); + return (Criteria) this; + } + + public Criteria andMerchantIdEqualTo(Long value) { + addCriterion("merchant_id =", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdNotEqualTo(Long value) { + addCriterion("merchant_id <>", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdGreaterThan(Long value) { + addCriterion("merchant_id >", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdGreaterThanOrEqualTo(Long value) { + addCriterion("merchant_id >=", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdLessThan(Long value) { + addCriterion("merchant_id <", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdLessThanOrEqualTo(Long value) { + addCriterion("merchant_id <=", value, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdIn(List values) { + addCriterion("merchant_id in", values, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdNotIn(List values) { + addCriterion("merchant_id not in", values, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdBetween(Long value1, Long value2) { + addCriterion("merchant_id between", value1, value2, "merchantId"); + return (Criteria) this; + } + + public Criteria andMerchantIdNotBetween(Long value1, Long value2) { + addCriterion("merchant_id not between", value1, value2, "merchantId"); + return (Criteria) this; + } + + public Criteria andCouponKeyIsNull() { + addCriterion("coupon_key is null"); + return (Criteria) this; + } + + public Criteria andCouponKeyIsNotNull() { + addCriterion("coupon_key is not null"); + return (Criteria) this; + } + + public Criteria andCouponKeyEqualTo(String value) { + addCriterion("coupon_key =", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyNotEqualTo(String value) { + addCriterion("coupon_key <>", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyGreaterThan(String value) { + addCriterion("coupon_key >", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyGreaterThanOrEqualTo(String value) { + addCriterion("coupon_key >=", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyLessThan(String value) { + addCriterion("coupon_key <", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyLessThanOrEqualTo(String value) { + addCriterion("coupon_key <=", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyLike(String value) { + addCriterion("coupon_key like", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyNotLike(String value) { + addCriterion("coupon_key not like", value, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyIn(List values) { + addCriterion("coupon_key in", values, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyNotIn(List values) { + addCriterion("coupon_key not in", values, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyBetween(String value1, String value2) { + addCriterion("coupon_key between", value1, value2, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponKeyNotBetween(String value1, String value2) { + addCriterion("coupon_key not between", value1, value2, "couponKey"); + return (Criteria) this; + } + + public Criteria andCouponNameIsNull() { + addCriterion("coupon_name is null"); + return (Criteria) this; + } + + public Criteria andCouponNameIsNotNull() { + addCriterion("coupon_name is not null"); + return (Criteria) this; + } + + public Criteria andCouponNameEqualTo(String value) { + addCriterion("coupon_name =", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotEqualTo(String value) { + addCriterion("coupon_name <>", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameGreaterThan(String value) { + addCriterion("coupon_name >", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameGreaterThanOrEqualTo(String value) { + addCriterion("coupon_name >=", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameLessThan(String value) { + addCriterion("coupon_name <", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameLessThanOrEqualTo(String value) { + addCriterion("coupon_name <=", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameLike(String value) { + addCriterion("coupon_name like", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotLike(String value) { + addCriterion("coupon_name not like", value, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameIn(List values) { + addCriterion("coupon_name in", values, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotIn(List values) { + addCriterion("coupon_name not in", values, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameBetween(String value1, String value2) { + addCriterion("coupon_name between", value1, value2, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponNameNotBetween(String value1, String value2) { + addCriterion("coupon_name not between", value1, value2, "couponName"); + return (Criteria) this; + } + + public Criteria andCouponValueIsNull() { + addCriterion("coupon_value is null"); + return (Criteria) this; + } + + public Criteria andCouponValueIsNotNull() { + addCriterion("coupon_value is not null"); + return (Criteria) this; + } + + public Criteria andCouponValueEqualTo(String value) { + addCriterion("coupon_value =", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueNotEqualTo(String value) { + addCriterion("coupon_value <>", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueGreaterThan(String value) { + addCriterion("coupon_value >", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueGreaterThanOrEqualTo(String value) { + addCriterion("coupon_value >=", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueLessThan(String value) { + addCriterion("coupon_value <", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueLessThanOrEqualTo(String value) { + addCriterion("coupon_value <=", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueLike(String value) { + addCriterion("coupon_value like", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueNotLike(String value) { + addCriterion("coupon_value not like", value, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueIn(List values) { + addCriterion("coupon_value in", values, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueNotIn(List values) { + addCriterion("coupon_value not in", values, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueBetween(String value1, String value2) { + addCriterion("coupon_value between", value1, value2, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponValueNotBetween(String value1, String value2) { + addCriterion("coupon_value not between", value1, value2, "couponValue"); + return (Criteria) this; + } + + public Criteria andCouponImgIsNull() { + addCriterion("coupon_img is null"); + return (Criteria) this; + } + + public Criteria andCouponImgIsNotNull() { + addCriterion("coupon_img is not null"); + return (Criteria) this; + } + + public Criteria andCouponImgEqualTo(String value) { + addCriterion("coupon_img =", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgNotEqualTo(String value) { + addCriterion("coupon_img <>", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgGreaterThan(String value) { + addCriterion("coupon_img >", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgGreaterThanOrEqualTo(String value) { + addCriterion("coupon_img >=", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgLessThan(String value) { + addCriterion("coupon_img <", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgLessThanOrEqualTo(String value) { + addCriterion("coupon_img <=", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgLike(String value) { + addCriterion("coupon_img like", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgNotLike(String value) { + addCriterion("coupon_img not like", value, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgIn(List values) { + addCriterion("coupon_img in", values, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgNotIn(List values) { + addCriterion("coupon_img not in", values, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgBetween(String value1, String value2) { + addCriterion("coupon_img between", value1, value2, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponImgNotBetween(String value1, String value2) { + addCriterion("coupon_img not between", value1, value2, "couponImg"); + return (Criteria) this; + } + + public Criteria andCouponPriceIsNull() { + addCriterion("coupon_price is null"); + return (Criteria) this; + } + + public Criteria andCouponPriceIsNotNull() { + addCriterion("coupon_price is not null"); + return (Criteria) this; + } + + public Criteria andCouponPriceEqualTo(Long value) { + addCriterion("coupon_price =", value, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceNotEqualTo(Long value) { + addCriterion("coupon_price <>", value, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceGreaterThan(Long value) { + addCriterion("coupon_price >", value, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceGreaterThanOrEqualTo(Long value) { + addCriterion("coupon_price >=", value, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceLessThan(Long value) { + addCriterion("coupon_price <", value, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceLessThanOrEqualTo(Long value) { + addCriterion("coupon_price <=", value, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceIn(List values) { + addCriterion("coupon_price in", values, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceNotIn(List values) { + addCriterion("coupon_price not in", values, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceBetween(Long value1, Long value2) { + addCriterion("coupon_price between", value1, value2, "couponPrice"); + return (Criteria) this; + } + + public Criteria andCouponPriceNotBetween(Long value1, Long value2) { + addCriterion("coupon_price not between", value1, value2, "couponPrice"); + return (Criteria) this; + } + + public Criteria andIsPresentIsNull() { + addCriterion("is_present is null"); + return (Criteria) this; + } + + public Criteria andIsPresentIsNotNull() { + addCriterion("is_present is not null"); + return (Criteria) this; + } + + public Criteria andIsPresentEqualTo(Boolean value) { + addCriterion("is_present =", value, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentNotEqualTo(Boolean value) { + addCriterion("is_present <>", value, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentGreaterThan(Boolean value) { + addCriterion("is_present >", value, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_present >=", value, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentLessThan(Boolean value) { + addCriterion("is_present <", value, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentLessThanOrEqualTo(Boolean value) { + addCriterion("is_present <=", value, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentIn(List values) { + addCriterion("is_present in", values, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentNotIn(List values) { + addCriterion("is_present not in", values, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentBetween(Boolean value1, Boolean value2) { + addCriterion("is_present between", value1, value2, "isPresent"); + return (Criteria) this; + } + + public Criteria andIsPresentNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_present not between", value1, value2, "isPresent"); + 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 andOperatorIdIsNull() { + addCriterion("operator_id is null"); + return (Criteria) this; + } + + public Criteria andOperatorIdIsNotNull() { + addCriterion("operator_id is not null"); + return (Criteria) this; + } + + public Criteria andOperatorIdEqualTo(Long value) { + addCriterion("operator_id =", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotEqualTo(Long value) { + addCriterion("operator_id <>", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThan(Long value) { + addCriterion("operator_id >", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("operator_id >=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThan(Long value) { + addCriterion("operator_id <", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThanOrEqualTo(Long value) { + addCriterion("operator_id <=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdIn(List values) { + addCriterion("operator_id in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotIn(List values) { + addCriterion("operator_id not in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdBetween(Long value1, Long value2) { + addCriterion("operator_id between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotBetween(Long value1, Long value2) { + addCriterion("operator_id not between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNull() { + addCriterion("operator_name is null"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNotNull() { + addCriterion("operator_name is not null"); + return (Criteria) this; + } + + public Criteria andOperatorNameEqualTo(String value) { + addCriterion("operator_name =", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotEqualTo(String value) { + addCriterion("operator_name <>", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThan(String value) { + addCriterion("operator_name >", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThanOrEqualTo(String value) { + addCriterion("operator_name >=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThan(String value) { + addCriterion("operator_name <", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThanOrEqualTo(String value) { + addCriterion("operator_name <=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLike(String value) { + addCriterion("operator_name like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotLike(String value) { + addCriterion("operator_name not like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameIn(List values) { + addCriterion("operator_name in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotIn(List values) { + addCriterion("operator_name not in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameBetween(String value1, String value2) { + addCriterion("operator_name between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotBetween(String value1, String value2) { + addCriterion("operator_name not between", value1, value2, "operatorName"); + 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 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/HighCouponHandsel.java b/hai-service/src/main/java/com/hai/entity/HighCouponHandsel.java new file mode 100644 index 00000000..c4c4558e --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighCouponHandsel.java @@ -0,0 +1,200 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_coupon_handsel + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighCouponHandsel implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 卡卷id + */ + private Long couponId; + + /** + * 赠送卡卷id + */ + private Long handselCouponId; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 状态 0:删除 1:正常 + */ + private Integer status; + + /** + * 操作人id + */ + private Long operatorId; + + /** + * 操作人名称 + */ + private String operatorName; + + 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 getCouponId() { + return couponId; + } + + public void setCouponId(Long couponId) { + this.couponId = couponId; + } + + public Long getHandselCouponId() { + return handselCouponId; + } + + public void setHandselCouponId(Long handselCouponId) { + this.handselCouponId = handselCouponId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Long getOperatorId() { + return operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + + 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; + } + HighCouponHandsel other = (HighCouponHandsel) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId())) + && (this.getHandselCouponId() == null ? other.getHandselCouponId() == null : this.getHandselCouponId().equals(other.getHandselCouponId())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) + && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) + && (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 + ((getCouponId() == null) ? 0 : getCouponId().hashCode()); + result = prime * result + ((getHandselCouponId() == null) ? 0 : getHandselCouponId().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); + result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().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(", couponId=").append(couponId); + sb.append(", handselCouponId=").append(handselCouponId); + sb.append(", createTime=").append(createTime); + sb.append(", status=").append(status); + sb.append(", operatorId=").append(operatorId); + sb.append(", operatorName=").append(operatorName); + 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/HighCouponHandselExample.java b/hai-service/src/main/java/com/hai/entity/HighCouponHandselExample.java new file mode 100644 index 00000000..97604b98 --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighCouponHandselExample.java @@ -0,0 +1,863 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighCouponHandselExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighCouponHandselExample() { + 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 andCouponIdIsNull() { + addCriterion("coupon_id is null"); + return (Criteria) this; + } + + public Criteria andCouponIdIsNotNull() { + addCriterion("coupon_id is not null"); + return (Criteria) this; + } + + public Criteria andCouponIdEqualTo(Long value) { + addCriterion("coupon_id =", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdNotEqualTo(Long value) { + addCriterion("coupon_id <>", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdGreaterThan(Long value) { + addCriterion("coupon_id >", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdGreaterThanOrEqualTo(Long value) { + addCriterion("coupon_id >=", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdLessThan(Long value) { + addCriterion("coupon_id <", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdLessThanOrEqualTo(Long value) { + addCriterion("coupon_id <=", value, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdIn(List values) { + addCriterion("coupon_id in", values, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdNotIn(List values) { + addCriterion("coupon_id not in", values, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdBetween(Long value1, Long value2) { + addCriterion("coupon_id between", value1, value2, "couponId"); + return (Criteria) this; + } + + public Criteria andCouponIdNotBetween(Long value1, Long value2) { + addCriterion("coupon_id not between", value1, value2, "couponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdIsNull() { + addCriterion("handsel_coupon_id is null"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdIsNotNull() { + addCriterion("handsel_coupon_id is not null"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdEqualTo(Long value) { + addCriterion("handsel_coupon_id =", value, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdNotEqualTo(Long value) { + addCriterion("handsel_coupon_id <>", value, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdGreaterThan(Long value) { + addCriterion("handsel_coupon_id >", value, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdGreaterThanOrEqualTo(Long value) { + addCriterion("handsel_coupon_id >=", value, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdLessThan(Long value) { + addCriterion("handsel_coupon_id <", value, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdLessThanOrEqualTo(Long value) { + addCriterion("handsel_coupon_id <=", value, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdIn(List values) { + addCriterion("handsel_coupon_id in", values, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdNotIn(List values) { + addCriterion("handsel_coupon_id not in", values, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdBetween(Long value1, Long value2) { + addCriterion("handsel_coupon_id between", value1, value2, "handselCouponId"); + return (Criteria) this; + } + + public Criteria andHandselCouponIdNotBetween(Long value1, Long value2) { + addCriterion("handsel_coupon_id not between", value1, value2, "handselCouponId"); + 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 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 andOperatorIdIsNull() { + addCriterion("operator_id is null"); + return (Criteria) this; + } + + public Criteria andOperatorIdIsNotNull() { + addCriterion("operator_id is not null"); + return (Criteria) this; + } + + public Criteria andOperatorIdEqualTo(Long value) { + addCriterion("operator_id =", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotEqualTo(Long value) { + addCriterion("operator_id <>", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThan(Long value) { + addCriterion("operator_id >", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("operator_id >=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThan(Long value) { + addCriterion("operator_id <", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThanOrEqualTo(Long value) { + addCriterion("operator_id <=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdIn(List values) { + addCriterion("operator_id in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotIn(List values) { + addCriterion("operator_id not in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdBetween(Long value1, Long value2) { + addCriterion("operator_id between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotBetween(Long value1, Long value2) { + addCriterion("operator_id not between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNull() { + addCriterion("operator_name is null"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNotNull() { + addCriterion("operator_name is not null"); + return (Criteria) this; + } + + public Criteria andOperatorNameEqualTo(String value) { + addCriterion("operator_name =", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotEqualTo(String value) { + addCriterion("operator_name <>", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThan(String value) { + addCriterion("operator_name >", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThanOrEqualTo(String value) { + addCriterion("operator_name >=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThan(String value) { + addCriterion("operator_name <", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThanOrEqualTo(String value) { + addCriterion("operator_name <=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLike(String value) { + addCriterion("operator_name like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotLike(String value) { + addCriterion("operator_name not like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameIn(List values) { + addCriterion("operator_name in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotIn(List values) { + addCriterion("operator_name not in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameBetween(String value1, String value2) { + addCriterion("operator_name between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotBetween(String value1, String value2) { + addCriterion("operator_name not between", value1, value2, "operatorName"); + 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/HighGoodsPriceRefer.java b/hai-service/src/main/java/com/hai/entity/HighGoodsPriceRefer.java new file mode 100644 index 00000000..fb294dbf --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighGoodsPriceRefer.java @@ -0,0 +1,248 @@ +package com.hai.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * high_goods_price_refer + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class HighGoodsPriceRefer implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 类型 1.卡卷 + */ + private Integer goodsType; + + /** + * 商品id + */ + private Long goodsId; + + /** + * 新销售价格 + */ + private Float newSalePrice; + + /** + * 新销售价格 生效时间 + */ + private Date effectiveTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 操作人id + */ + private Long operatorId; + + /** + * 操作人名称 + */ + private String operatorName; + + /** + * 状态: 0 不可用 1 可用 + */ + private Integer status; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Integer getGoodsType() { + return goodsType; + } + + public void setGoodsType(Integer goodsType) { + this.goodsType = goodsType; + } + + public Long getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public Float getNewSalePrice() { + return newSalePrice; + } + + public void setNewSalePrice(Float newSalePrice) { + this.newSalePrice = newSalePrice; + } + + public Date getEffectiveTime() { + return effectiveTime; + } + + public void setEffectiveTime(Date effectiveTime) { + this.effectiveTime = effectiveTime; + } + + 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 getOperatorId() { + return operatorId; + } + + public void setOperatorId(Long operatorId) { + this.operatorId = operatorId; + } + + public String getOperatorName() { + return operatorName; + } + + public void setOperatorName(String operatorName) { + this.operatorName = operatorName; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + 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; + } + HighGoodsPriceRefer other = (HighGoodsPriceRefer) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) + && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) + && (this.getNewSalePrice() == null ? other.getNewSalePrice() == null : this.getNewSalePrice().equals(other.getNewSalePrice())) + && (this.getEffectiveTime() == null ? other.getEffectiveTime() == null : this.getEffectiveTime().equals(other.getEffectiveTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getOperatorId() == null ? other.getOperatorId() == null : this.getOperatorId().equals(other.getOperatorId())) + && (this.getOperatorName() == null ? other.getOperatorName() == null : this.getOperatorName().equals(other.getOperatorName())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (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 + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); + result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getNewSalePrice() == null) ? 0 : getNewSalePrice().hashCode()); + result = prime * result + ((getEffectiveTime() == null) ? 0 : getEffectiveTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getOperatorId() == null) ? 0 : getOperatorId().hashCode()); + result = prime * result + ((getOperatorName() == null) ? 0 : getOperatorName().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().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(", goodsType=").append(goodsType); + sb.append(", goodsId=").append(goodsId); + sb.append(", newSalePrice=").append(newSalePrice); + sb.append(", effectiveTime=").append(effectiveTime); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", operatorId=").append(operatorId); + sb.append(", operatorName=").append(operatorName); + sb.append(", status=").append(status); + 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/HighGoodsPriceReferExample.java b/hai-service/src/main/java/com/hai/entity/HighGoodsPriceReferExample.java new file mode 100644 index 00000000..aac9779e --- /dev/null +++ b/hai-service/src/main/java/com/hai/entity/HighGoodsPriceReferExample.java @@ -0,0 +1,1043 @@ +package com.hai.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class HighGoodsPriceReferExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public HighGoodsPriceReferExample() { + 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 andGoodsTypeIsNull() { + addCriterion("goods_type is null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeIsNotNull() { + addCriterion("goods_type is not null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeEqualTo(Integer value) { + addCriterion("goods_type =", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotEqualTo(Integer value) { + addCriterion("goods_type <>", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeGreaterThan(Integer value) { + addCriterion("goods_type >", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("goods_type >=", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLessThan(Integer value) { + addCriterion("goods_type <", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLessThanOrEqualTo(Integer value) { + addCriterion("goods_type <=", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeIn(List values) { + addCriterion("goods_type in", values, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotIn(List values) { + addCriterion("goods_type not in", values, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeBetween(Integer value1, Integer value2) { + addCriterion("goods_type between", value1, value2, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotBetween(Integer value1, Integer value2) { + addCriterion("goods_type not between", value1, value2, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNull() { + addCriterion("goods_id is null"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNotNull() { + addCriterion("goods_id is not null"); + return (Criteria) this; + } + + public Criteria andGoodsIdEqualTo(Long value) { + addCriterion("goods_id =", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotEqualTo(Long value) { + addCriterion("goods_id <>", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThan(Long value) { + addCriterion("goods_id >", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) { + addCriterion("goods_id >=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThan(Long value) { + addCriterion("goods_id <", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThanOrEqualTo(Long value) { + addCriterion("goods_id <=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIn(List values) { + addCriterion("goods_id in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotIn(List values) { + addCriterion("goods_id not in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdBetween(Long value1, Long value2) { + addCriterion("goods_id between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotBetween(Long value1, Long value2) { + addCriterion("goods_id not between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andNewSalePriceIsNull() { + addCriterion("new_sale_price is null"); + return (Criteria) this; + } + + public Criteria andNewSalePriceIsNotNull() { + addCriterion("new_sale_price is not null"); + return (Criteria) this; + } + + public Criteria andNewSalePriceEqualTo(Float value) { + addCriterion("new_sale_price =", value, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceNotEqualTo(Float value) { + addCriterion("new_sale_price <>", value, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceGreaterThan(Float value) { + addCriterion("new_sale_price >", value, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceGreaterThanOrEqualTo(Float value) { + addCriterion("new_sale_price >=", value, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceLessThan(Float value) { + addCriterion("new_sale_price <", value, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceLessThanOrEqualTo(Float value) { + addCriterion("new_sale_price <=", value, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceIn(List values) { + addCriterion("new_sale_price in", values, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceNotIn(List values) { + addCriterion("new_sale_price not in", values, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceBetween(Float value1, Float value2) { + addCriterion("new_sale_price between", value1, value2, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andNewSalePriceNotBetween(Float value1, Float value2) { + addCriterion("new_sale_price not between", value1, value2, "newSalePrice"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeIsNull() { + addCriterion("effective_time is null"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeIsNotNull() { + addCriterion("effective_time is not null"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeEqualTo(Date value) { + addCriterion("effective_time =", value, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeNotEqualTo(Date value) { + addCriterion("effective_time <>", value, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeGreaterThan(Date value) { + addCriterion("effective_time >", value, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeGreaterThanOrEqualTo(Date value) { + addCriterion("effective_time >=", value, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeLessThan(Date value) { + addCriterion("effective_time <", value, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeLessThanOrEqualTo(Date value) { + addCriterion("effective_time <=", value, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeIn(List values) { + addCriterion("effective_time in", values, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeNotIn(List values) { + addCriterion("effective_time not in", values, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeBetween(Date value1, Date value2) { + addCriterion("effective_time between", value1, value2, "effectiveTime"); + return (Criteria) this; + } + + public Criteria andEffectiveTimeNotBetween(Date value1, Date value2) { + addCriterion("effective_time not between", value1, value2, "effectiveTime"); + 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 andOperatorIdIsNull() { + addCriterion("operator_id is null"); + return (Criteria) this; + } + + public Criteria andOperatorIdIsNotNull() { + addCriterion("operator_id is not null"); + return (Criteria) this; + } + + public Criteria andOperatorIdEqualTo(Long value) { + addCriterion("operator_id =", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotEqualTo(Long value) { + addCriterion("operator_id <>", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThan(Long value) { + addCriterion("operator_id >", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) { + addCriterion("operator_id >=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThan(Long value) { + addCriterion("operator_id <", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdLessThanOrEqualTo(Long value) { + addCriterion("operator_id <=", value, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdIn(List values) { + addCriterion("operator_id in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotIn(List values) { + addCriterion("operator_id not in", values, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdBetween(Long value1, Long value2) { + addCriterion("operator_id between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorIdNotBetween(Long value1, Long value2) { + addCriterion("operator_id not between", value1, value2, "operatorId"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNull() { + addCriterion("operator_name is null"); + return (Criteria) this; + } + + public Criteria andOperatorNameIsNotNull() { + addCriterion("operator_name is not null"); + return (Criteria) this; + } + + public Criteria andOperatorNameEqualTo(String value) { + addCriterion("operator_name =", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotEqualTo(String value) { + addCriterion("operator_name <>", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThan(String value) { + addCriterion("operator_name >", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameGreaterThanOrEqualTo(String value) { + addCriterion("operator_name >=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThan(String value) { + addCriterion("operator_name <", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLessThanOrEqualTo(String value) { + addCriterion("operator_name <=", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameLike(String value) { + addCriterion("operator_name like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotLike(String value) { + addCriterion("operator_name not like", value, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameIn(List values) { + addCriterion("operator_name in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotIn(List values) { + addCriterion("operator_name not in", values, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameBetween(String value1, String value2) { + addCriterion("operator_name between", value1, value2, "operatorName"); + return (Criteria) this; + } + + public Criteria andOperatorNameNotBetween(String value1, String value2) { + addCriterion("operator_name not between", value1, value2, "operatorName"); + 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 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/HighMerchant.java b/hai-service/src/main/java/com/hai/entity/HighMerchant.java index 1582b4c3..68e6c329 100644 --- a/hai-service/src/main/java/com/hai/entity/HighMerchant.java +++ b/hai-service/src/main/java/com/hai/entity/HighMerchant.java @@ -14,7 +14,7 @@ import java.util.Date; * 代码由工具生成 * **/ -public class HighMerchant extends HighMerchantModel implements Serializable { +public class HighMerchant implements Serializable { /** * 主键 */ diff --git a/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java b/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java index 798b182b..3ec3b717 100644 --- a/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java +++ b/hai-service/src/main/java/com/hai/entity/HighMerchantStore.java @@ -14,7 +14,7 @@ import java.util.Date; * 代码由工具生成 * **/ -public class HighMerchantStore extends HighMerchantStoreModel implements Serializable { +public class HighMerchantStore implements Serializable { /** * 主键 */ diff --git a/hai-service/src/main/java/com/hai/model/HighCouponHandselModel.java b/hai-service/src/main/java/com/hai/model/HighCouponHandselModel.java new file mode 100644 index 00000000..b315363e --- /dev/null +++ b/hai-service/src/main/java/com/hai/model/HighCouponHandselModel.java @@ -0,0 +1,22 @@ +package com.hai.model; + +import com.hai.entity.HighCoupon; +import com.hai.entity.HighCouponHandsel; + +/** + * @Auther: 胡锐 + * @Description: 赠送卡券模型 + * @Date: 2021/3/11 23:12 + */ +public class HighCouponHandselModel extends HighCouponHandsel { + + HighCoupon highCoupon; + + public HighCoupon getHighCoupon() { + return highCoupon; + } + + public void setHighCoupon(HighCoupon highCoupon) { + this.highCoupon = highCoupon; + } +} diff --git a/hai-service/src/main/java/com/hai/model/HighCouponModel.java b/hai-service/src/main/java/com/hai/model/HighCouponModel.java new file mode 100644 index 00000000..61b83ff5 --- /dev/null +++ b/hai-service/src/main/java/com/hai/model/HighCouponModel.java @@ -0,0 +1,24 @@ +package com.hai.model; + +import com.hai.entity.HighCoupon; +import com.hai.entity.HighCouponHandsel; + +import java.util.List; + +/** + * @Auther: 胡锐 + * @Description: 卡卷模型 + * @Date: 2021/3/11 22:27 + */ +public class HighCouponModel extends HighCoupon { + + List handselCouponList; + + public List getHandselCouponList() { + return handselCouponList; + } + + public void setHandselCouponList(List handselCouponList) { + this.handselCouponList = handselCouponList; + } +} diff --git a/hai-service/src/main/java/com/hai/model/HighMerchantModel.java b/hai-service/src/main/java/com/hai/model/HighMerchantModel.java index 17de7df4..99c08ef5 100644 --- a/hai-service/src/main/java/com/hai/model/HighMerchantModel.java +++ b/hai-service/src/main/java/com/hai/model/HighMerchantModel.java @@ -1,5 +1,6 @@ package com.hai.model; +import com.hai.entity.HighMerchant; import com.hai.entity.SecUser; /** @@ -7,7 +8,7 @@ import com.hai.entity.SecUser; * @Description: * @Date: 2021/3/10 20:22 */ -public class HighMerchantModel { +public class HighMerchantModel extends HighMerchant { private SecUser secUser; diff --git a/hai-service/src/main/java/com/hai/model/HighMerchantStoreModel.java b/hai-service/src/main/java/com/hai/model/HighMerchantStoreModel.java index efd93dc2..c71e0ece 100644 --- a/hai-service/src/main/java/com/hai/model/HighMerchantStoreModel.java +++ b/hai-service/src/main/java/com/hai/model/HighMerchantStoreModel.java @@ -1,5 +1,6 @@ package com.hai.model; +import com.hai.entity.HighMerchantStore; import com.hai.entity.SecUser; /** @@ -7,7 +8,7 @@ import com.hai.entity.SecUser; * @Description: * @Date: 2021/3/10 22:11 */ -public class HighMerchantStoreModel { +public class HighMerchantStoreModel extends HighMerchantStore { // 账号 private SecUser secUser; diff --git a/hai-service/src/main/java/com/hai/service/HighCouponService.java b/hai-service/src/main/java/com/hai/service/HighCouponService.java new file mode 100644 index 00000000..651b5d14 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/HighCouponService.java @@ -0,0 +1,20 @@ +package com.hai.service; + +import com.hai.entity.HighCoupon; +import com.hai.model.HighCouponModel; + +/** + * @Auther: 胡锐 + * @Description: + * @Date: 2021/3/11 22:04 + */ +public interface HighCouponService { + + /** + * @Author 胡锐 + * @Description 增加 + * @Date 2021/3/11 22:05 + **/ + void insertCoupon(HighCouponModel highCouponModel); + +} diff --git a/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java new file mode 100644 index 00000000..558b5775 --- /dev/null +++ b/hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java @@ -0,0 +1,44 @@ +package com.hai.service.impl; + +import com.hai.dao.HighCouponHandselMapper; +import com.hai.dao.HighCouponMapper; +import com.hai.entity.HighCoupon; +import com.hai.entity.HighCouponHandsel; +import com.hai.model.HighCouponHandselModel; +import com.hai.model.HighCouponModel; +import com.hai.service.HighCouponService; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.Date; +import java.util.List; + +/** + * @Auther: 胡锐 + * @Description: + * @Date: 2021/3/11 22:07 + */ +@Service("highCouponService") +public class HighCouponServiceImpl implements HighCouponService { + + @Resource + private HighCouponMapper highCouponMapper; + + @Resource + private HighCouponHandselMapper highCouponHandselMapper; + + @Override + @Transactional + public void insertCoupon(HighCouponModel highCouponModel) { + highCouponMapper.insert(highCouponModel); + + // 增加赠送卡卷 + if (highCouponModel.getHandselCouponList() != null && highCouponModel.getHandselCouponList().size() > 0) { + for (HighCouponHandselModel handsel : highCouponModel.getHandselCouponList()) { + handsel.setCouponId(highCouponModel.getId()); + } + } + + } +}