diff --git a/cweb/src/main/java/com/cweb/config/AuthConfig.java b/cweb/src/main/java/com/cweb/config/AuthConfig.java index 475f2c8..017649c 100644 --- a/cweb/src/main/java/com/cweb/config/AuthConfig.java +++ b/cweb/src/main/java/com/cweb/config/AuthConfig.java @@ -88,6 +88,7 @@ public class AuthConfig implements WebMvcConfigurer { .excludePathPatterns("/**/swagger-ui.html") .excludePathPatterns("/goods/*") .excludePathPatterns("/cms/*") + .excludePathPatterns("/common/*") ; } diff --git a/cweb/src/main/java/com/cweb/controller/CommonController.java b/cweb/src/main/java/com/cweb/controller/CommonController.java index ecbfa8b..8775a3b 100644 --- a/cweb/src/main/java/com/cweb/controller/CommonController.java +++ b/cweb/src/main/java/com/cweb/controller/CommonController.java @@ -1,10 +1,19 @@ package com.cweb.controller; +import com.alibaba.fastjson.JSONObject; +import com.hfkj.common.utils.RedisUtil; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.model.ResponseData; +import com.hfkj.service.CommonService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import javax.annotation.Resource; +import java.util.List; @RestController @RequestMapping(value="/common") @@ -13,4 +22,35 @@ public class CommonController { Logger log = LoggerFactory.getLogger(CommonController.class); + @Resource + private CommonService commonService; + + @Autowired + private RedisUtil redisUtil; + + @RequestMapping(value = "/getAllCity", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询所有城市") + public ResponseData getAllCity() { + try { + + Object data = redisUtil.get("regional"); + + if (data == null) { + + List jsonObjects = commonService.getCity("key" , "title" , "children"); + redisUtil.set("regional", jsonObjects); + + return ResponseMsgUtil.success(jsonObjects); + + } else { + return ResponseMsgUtil.success(data); + } + + } catch (Exception e) { + log.error("HighUserCardController --> oilCardRefund() error!", e); + return ResponseMsgUtil.exception(e); + } + } + } diff --git a/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java b/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java new file mode 100644 index 0000000..e44cc61 --- /dev/null +++ b/cweb/src/main/java/com/cweb/controller/goods/DeliveryAddressController.java @@ -0,0 +1,200 @@ +package com.cweb.controller.goods; + +import com.hfkj.common.exception.ErrorCode; +import com.hfkj.common.exception.ErrorHelp; +import com.hfkj.common.exception.SysCode; +import com.hfkj.common.security.UserCenter; +import com.hfkj.common.utils.ResponseMsgUtil; +import com.hfkj.entity.GoodsUserAddress; +import com.hfkj.model.ResponseData; +import com.hfkj.model.UserSessionObject; +import com.hfkj.service.goods.GoodsUserAddressService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.util.*; + +@Controller +@RequestMapping(value = "/deliveryAddress") +@Api(value = "收货地址") +public class DeliveryAddressController { + Logger log = LoggerFactory.getLogger(DeliveryAddressController.class); + @Resource + private GoodsUserAddressService deliveryAddressService; + + @Resource + private UserCenter userCenter; + + + @RequestMapping(value = "/getDeliveryAddressList", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询收货地址列表") + public ResponseData getDeliveryAddressList() { + try { + + // 用户session + UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); + + Map map = new HashMap<>(); + + map.put("userId", userSession.getUser().getId()); + + return ResponseMsgUtil.success(deliveryAddressService.getList(map)); + + } catch (Exception e) { + log.error("GoodsDetailController --> getListUser() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + + @RequestMapping(value = "/insertDeliveryAddress", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "新增收货地址") + public ResponseData insertDeliveryAddress(@RequestBody GoodsUserAddress deliveryAddress) { + try { + + // 用户session + UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); + + Map map = new HashMap<>(); + + map.put("userId", userSession.getUser().getId()); + List list = deliveryAddressService.getList(map); + + if (list.size() == 0) { + deliveryAddress.setWhetherDefault(true); + } + + if (deliveryAddress == null || + deliveryAddress.getAddress() == null || + deliveryAddress.getWhetherDefault() == null || + deliveryAddress.getConsignee() == null || + deliveryAddress.getPhone() == null || + deliveryAddress.getRegionName() == null || + deliveryAddress.getRegionId() == null + ) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + deliveryAddress.setUserId(userSession.getUser().getId()); + deliveryAddress.setCreateTime(new Date()); + deliveryAddress.setUpdateTime(new Date()); + deliveryAddressService.create(deliveryAddress); + + + + return ResponseMsgUtil.success("新增成功"); + + } catch (Exception e) { + log.error("GoodsDetailController --> insertPrice() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/updateDeliveryAddress", method = RequestMethod.POST) + @ResponseBody + @ApiOperation(value = "修改收货地址") + public ResponseData updateDeliveryAddress(@RequestBody GoodsUserAddress deliveryAddress) { + try { + + // 用户session + UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); + + if (deliveryAddress == null || + deliveryAddress.getId() == null || + deliveryAddress.getAddress() == null || + deliveryAddress.getWhetherDefault() == null || + deliveryAddress.getConsignee() == null || + deliveryAddress.getPhone() == null || + deliveryAddress.getRegionName() == null || + deliveryAddress.getRegionId() == null + ) { + log.error("GoodsDetailController -> insertProduct() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + } + + if (deliveryAddress.getWhetherDefault()) { + deliveryAddressService.cleanDeliveryAddressDefault(userSession.getUser().getId()); + } + + GoodsUserAddress goodsDeliveryAddress = deliveryAddressService.queryDetail(deliveryAddress.getId()); + + if (goodsDeliveryAddress == null) { + log.error("GoodsDetailController -> insertProduct() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前收货地址异常!"); + } + + deliveryAddress.setUserId(userSession.getUser().getId()); + deliveryAddress.setCreateTime(goodsDeliveryAddress.getCreateTime()); + deliveryAddress.setUpdateTime(new Date()); + deliveryAddressService.update(deliveryAddress); + + return ResponseMsgUtil.success("修改成功"); + + } catch (Exception e) { + log.error("GoodsDetailController --> insertPrice() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/findDeliveryAddressById", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "查询收货地址详情") + public ResponseData findDeliveryAddressById( + @RequestParam(value = "id", required = true) Long id + ) { + try { + + GoodsUserAddress deliveryAddress = deliveryAddressService.queryDetail(id); + + if (deliveryAddress == null) { + log.error("GoodsDetailController -> findGoodsDetailById() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相信息"); + } + + return ResponseMsgUtil.success(deliveryAddress); + + } catch (Exception e) { + log.error("GoodsDetailController --> findGoodsDetailById() error!", e); + return ResponseMsgUtil.exception(e); + } + } + + @RequestMapping(value = "/deleteDeliveryAddress", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "删除删除收货地址") + public ResponseData deleteDeliveryAddress( + @RequestParam(value = "id", required = true) Long id) { + try { + // 用户session + UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class); + + GoodsUserAddress deliveryAddress = deliveryAddressService.queryDetail(id); + + if (deliveryAddress == null) { + log.error("GoodsDetailController -> findGoodsDetailById() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相关信息"); + } + + if (!Objects.equals(userSession.getUser().getId(), deliveryAddress.getUserId())) { + log.error("GoodsDetailController -> findGoodsDetailById() error!"); + throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "用户信息错误"); + } + + deliveryAddressService.delete(id); + + return ResponseMsgUtil.success("删除成功"); + + } catch (Exception e) { + log.error("GoodsDetailController --> findGoodsDetailById() error!", e); + return ResponseMsgUtil.exception(e); + } + } + +} diff --git a/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java b/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java index 147f4a3..5baf924 100644 --- a/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java +++ b/cweb/src/main/java/com/cweb/controller/goods/ShoppingCartController.java @@ -119,6 +119,7 @@ public class ShoppingCartController { shoppingCart.setUserId(userSession.getUser().getId()); shoppingCart.setTitle(goodsMsg.getTitle()); + shoppingCart.setGoodsType(goodsMsg.getType()); shoppingCart.setImg(specs.getShowImg()); shoppingCart.setSpecsId(specs.getId()); shoppingCart.setSpecsName(specs.getName()); @@ -126,6 +127,7 @@ public class ShoppingCartController { shoppingCart.setMerId(goodsMsg.getMerId()); shoppingCart.setMerName(goodsMsg.getMerName()); shoppingCart.setWhetherCheck(true); + shoppingCart.setStatus(1); shoppingCart.setPrice(specs.getSalePrice()); shoppingCart.setCreateTime(new Date()); shoppingCart.setUpdateTime(new Date()); @@ -171,7 +173,7 @@ public class ShoppingCartController { } - shoppingCartService.delete(Long.valueOf(id), false); + shoppingCartService.delete(Long.valueOf(id)); } return ResponseMsgUtil.success("删除成功"); diff --git a/service/src/main/java/com/hfkj/dao/BsCityMapper.java b/service/src/main/java/com/hfkj/dao/BsCityMapper.java new file mode 100644 index 0000000..c97d045 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsCityMapper.java @@ -0,0 +1,91 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsCity; +import com.hfkj.entity.BsCityExample; +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.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 BsCityMapper extends BsCityMapperExt { + @SelectProvider(type=BsCitySqlProvider.class, method="countByExample") + long countByExample(BsCityExample example); + + @DeleteProvider(type=BsCitySqlProvider.class, method="deleteByExample") + int deleteByExample(BsCityExample example); + + @Delete({ + "delete from bs_city", + "where region_id = #{regionId,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long regionId); + + @Insert({ + "insert into bs_city (region_id, region_name, ", + "parent_id, `status`)", + "values (#{regionId,jdbcType=BIGINT}, #{regionName,jdbcType=VARCHAR}, ", + "#{parentId,jdbcType=BIGINT}, #{status,jdbcType=INTEGER})" + }) + int insert(BsCity record); + + @InsertProvider(type=BsCitySqlProvider.class, method="insertSelective") + int insertSelective(BsCity record); + + @SelectProvider(type=BsCitySqlProvider.class, method="selectByExample") + @Results({ + @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), + @Result(column="parent_id", property="parentId", jdbcType=JdbcType.BIGINT), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER) + }) + List selectByExample(BsCityExample example); + + @Select({ + "select", + "region_id, region_name, parent_id, `status`", + "from bs_city", + "where region_id = #{regionId,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="region_id", property="regionId", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), + @Result(column="parent_id", property="parentId", jdbcType=JdbcType.BIGINT), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER) + }) + BsCity selectByPrimaryKey(Long regionId); + + @UpdateProvider(type=BsCitySqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") BsCity record, @Param("example") BsCityExample example); + + @UpdateProvider(type=BsCitySqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") BsCity record, @Param("example") BsCityExample example); + + @UpdateProvider(type=BsCitySqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(BsCity record); + + @Update({ + "update bs_city", + "set region_name = #{regionName,jdbcType=VARCHAR},", + "parent_id = #{parentId,jdbcType=BIGINT},", + "`status` = #{status,jdbcType=INTEGER}", + "where region_id = #{regionId,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(BsCity record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsCityMapperExt.java b/service/src/main/java/com/hfkj/dao/BsCityMapperExt.java new file mode 100644 index 0000000..ada9470 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsCityMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface BsCityMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/BsCitySqlProvider.java b/service/src/main/java/com/hfkj/dao/BsCitySqlProvider.java new file mode 100644 index 0000000..97588bb --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/BsCitySqlProvider.java @@ -0,0 +1,224 @@ +package com.hfkj.dao; + +import com.hfkj.entity.BsCity; +import com.hfkj.entity.BsCityExample.Criteria; +import com.hfkj.entity.BsCityExample.Criterion; +import com.hfkj.entity.BsCityExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class BsCitySqlProvider { + + public String countByExample(BsCityExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("bs_city"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(BsCityExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("bs_city"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(BsCity record) { + SQL sql = new SQL(); + sql.INSERT_INTO("bs_city"); + + if (record.getRegionId() != null) { + sql.VALUES("region_id", "#{regionId,jdbcType=BIGINT}"); + } + + if (record.getRegionName() != null) { + sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}"); + } + + if (record.getParentId() != null) { + sql.VALUES("parent_id", "#{parentId,jdbcType=BIGINT}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + return sql.toString(); + } + + public String selectByExample(BsCityExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("region_id"); + } else { + sql.SELECT("region_id"); + } + sql.SELECT("region_name"); + sql.SELECT("parent_id"); + sql.SELECT("`status`"); + sql.FROM("bs_city"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + BsCity record = (BsCity) parameter.get("record"); + BsCityExample example = (BsCityExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("bs_city"); + + if (record.getRegionId() != null) { + sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); + } + + if (record.getRegionName() != null) { + sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); + } + + if (record.getParentId() != null) { + sql.SET("parent_id = #{record.parentId,jdbcType=BIGINT}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("bs_city"); + + sql.SET("region_id = #{record.regionId,jdbcType=BIGINT}"); + sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); + sql.SET("parent_id = #{record.parentId,jdbcType=BIGINT}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + + BsCityExample example = (BsCityExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(BsCity record) { + SQL sql = new SQL(); + sql.UPDATE("bs_city"); + + if (record.getRegionName() != null) { + sql.SET("region_name = #{regionName,jdbcType=VARCHAR}"); + } + + if (record.getParentId() != null) { + sql.SET("parent_id = #{parentId,jdbcType=BIGINT}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + sql.WHERE("region_id = #{regionId,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, BsCityExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsMapper.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsMapper.java new file mode 100644 index 0000000..aa5715c --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsMapper.java @@ -0,0 +1,122 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountPackageDetails; +import com.hfkj.entity.CouponDiscountPackageDetailsExample; +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 CouponDiscountPackageDetailsMapper extends CouponDiscountPackageDetailsMapperExt { + @SelectProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="countByExample") + long countByExample(CouponDiscountPackageDetailsExample example); + + @DeleteProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="deleteByExample") + int deleteByExample(CouponDiscountPackageDetailsExample example); + + @Delete({ + "delete from coupon_discount_package_details", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + + @Insert({ + "insert into coupon_discount_package_details (discount_package_id, discount_id, ", + "discount_name, num, ", + "created_time, updated_time, ", + "`status`, ext_1, ext_2, ", + "ext_3)", + "values (#{discountPackageId,jdbcType=INTEGER}, #{discountId,jdbcType=INTEGER}, ", + "#{discountName,jdbcType=VARCHAR}, #{num,jdbcType=INTEGER}, ", + "#{createdTime,jdbcType=TIMESTAMP}, #{updatedTime,jdbcType=TIMESTAMP}, ", + "#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(CouponDiscountPackageDetails record); + + @InsertProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(CouponDiscountPackageDetails record); + + @SelectProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), + @Result(column="discount_id", property="discountId", jdbcType=JdbcType.INTEGER), + @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), + @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), + @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), + @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(CouponDiscountPackageDetailsExample example); + + @Select({ + "select", + "id, discount_package_id, discount_id, discount_name, num, created_time, updated_time, ", + "`status`, ext_1, ext_2, ext_3", + "from coupon_discount_package_details", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), + @Result(column="discount_id", property="discountId", jdbcType=JdbcType.INTEGER), + @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), + @Result(column="num", property="num", jdbcType=JdbcType.INTEGER), + @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), + @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) + }) + CouponDiscountPackageDetails selectByPrimaryKey(Integer id); + + @UpdateProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") CouponDiscountPackageDetails record, @Param("example") CouponDiscountPackageDetailsExample example); + + @UpdateProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") CouponDiscountPackageDetails record, @Param("example") CouponDiscountPackageDetailsExample example); + + @UpdateProvider(type=CouponDiscountPackageDetailsSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CouponDiscountPackageDetails record); + + @Update({ + "update coupon_discount_package_details", + "set discount_package_id = #{discountPackageId,jdbcType=INTEGER},", + "discount_id = #{discountId,jdbcType=INTEGER},", + "discount_name = #{discountName,jdbcType=VARCHAR},", + "num = #{num,jdbcType=INTEGER},", + "created_time = #{createdTime,jdbcType=TIMESTAMP},", + "updated_time = #{updatedTime,jdbcType=TIMESTAMP},", + "`status` = #{status,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CouponDiscountPackageDetails record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsMapperExt.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsMapperExt.java new file mode 100644 index 0000000..0a5d7f8 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface CouponDiscountPackageDetailsMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsSqlProvider.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsSqlProvider.java new file mode 100644 index 0000000..581db3a --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageDetailsSqlProvider.java @@ -0,0 +1,318 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountPackageDetails; +import com.hfkj.entity.CouponDiscountPackageDetailsExample.Criteria; +import com.hfkj.entity.CouponDiscountPackageDetailsExample.Criterion; +import com.hfkj.entity.CouponDiscountPackageDetailsExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class CouponDiscountPackageDetailsSqlProvider { + + public String countByExample(CouponDiscountPackageDetailsExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("coupon_discount_package_details"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(CouponDiscountPackageDetailsExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("coupon_discount_package_details"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(CouponDiscountPackageDetails record) { + SQL sql = new SQL(); + sql.INSERT_INTO("coupon_discount_package_details"); + + if (record.getDiscountPackageId() != null) { + sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=INTEGER}"); + } + + if (record.getDiscountId() != null) { + sql.VALUES("discount_id", "#{discountId,jdbcType=INTEGER}"); + } + + if (record.getDiscountName() != null) { + sql.VALUES("discount_name", "#{discountName,jdbcType=VARCHAR}"); + } + + if (record.getNum() != null) { + sql.VALUES("num", "#{num,jdbcType=INTEGER}"); + } + + if (record.getCreatedTime() != null) { + sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdatedTime() != null) { + sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}"); + } + + 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(CouponDiscountPackageDetailsExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("discount_package_id"); + sql.SELECT("discount_id"); + sql.SELECT("discount_name"); + sql.SELECT("num"); + sql.SELECT("created_time"); + sql.SELECT("updated_time"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("coupon_discount_package_details"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + CouponDiscountPackageDetails record = (CouponDiscountPackageDetails) parameter.get("record"); + CouponDiscountPackageDetailsExample example = (CouponDiscountPackageDetailsExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_package_details"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + } + + if (record.getDiscountPackageId() != null) { + sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); + } + + if (record.getDiscountId() != null) { + sql.SET("discount_id = #{record.discountId,jdbcType=INTEGER}"); + } + + if (record.getDiscountName() != null) { + sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); + } + + if (record.getNum() != null) { + sql.SET("num = #{record.num,jdbcType=INTEGER}"); + } + + if (record.getCreatedTime() != null) { + sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdatedTime() != null) { + sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); + } + + 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("coupon_discount_package_details"); + + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); + sql.SET("discount_id = #{record.discountId,jdbcType=INTEGER}"); + sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); + sql.SET("num = #{record.num,jdbcType=INTEGER}"); + sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); + sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); + 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}"); + + CouponDiscountPackageDetailsExample example = (CouponDiscountPackageDetailsExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(CouponDiscountPackageDetails record) { + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_package_details"); + + if (record.getDiscountPackageId() != null) { + sql.SET("discount_package_id = #{discountPackageId,jdbcType=INTEGER}"); + } + + if (record.getDiscountId() != null) { + sql.SET("discount_id = #{discountId,jdbcType=INTEGER}"); + } + + if (record.getDiscountName() != null) { + sql.SET("discount_name = #{discountName,jdbcType=VARCHAR}"); + } + + if (record.getNum() != null) { + sql.SET("num = #{num,jdbcType=INTEGER}"); + } + + if (record.getCreatedTime() != null) { + sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdatedTime() != null) { + sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}"); + } + + 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=INTEGER}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, CouponDiscountPackageDetailsExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageMapper.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageMapper.java new file mode 100644 index 0000000..84c52a5 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageMapper.java @@ -0,0 +1,133 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountPackage; +import com.hfkj.entity.CouponDiscountPackageExample; +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 CouponDiscountPackageMapper extends CouponDiscountPackageMapperExt { + @SelectProvider(type=CouponDiscountPackageSqlProvider.class, method="countByExample") + long countByExample(CouponDiscountPackageExample example); + + @DeleteProvider(type=CouponDiscountPackageSqlProvider.class, method="deleteByExample") + int deleteByExample(CouponDiscountPackageExample example); + + @Delete({ + "delete from coupon_discount_package", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + + @Insert({ + "insert into coupon_discount_package (`key`, title, ", + "effective_tiem, created_user_id, ", + "created_time, updated_user_id, ", + "updated_time, `status`, ", + "total_stock, surplus_stock, ", + "ext_1, ext_2, ext_3)", + "values (#{key,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ", + "#{effectiveTiem,jdbcType=TIMESTAMP}, #{createdUserId,jdbcType=INTEGER}, ", + "#{createdTime,jdbcType=TIMESTAMP}, #{updatedUserId,jdbcType=INTEGER}, ", + "#{updatedTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", + "#{totalStock,jdbcType=INTEGER}, #{surplusStock,jdbcType=INTEGER}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(CouponDiscountPackage record); + + @InsertProvider(type=CouponDiscountPackageSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(CouponDiscountPackage record); + + @SelectProvider(type=CouponDiscountPackageSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="key", property="key", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="effective_tiem", property="effectiveTiem", jdbcType=JdbcType.TIMESTAMP), + @Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), + @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), + @Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="total_stock", property="totalStock", jdbcType=JdbcType.INTEGER), + @Result(column="surplus_stock", property="surplusStock", 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(CouponDiscountPackageExample example); + + @Select({ + "select", + "id, `key`, title, effective_tiem, created_user_id, created_time, updated_user_id, ", + "updated_time, `status`, total_stock, surplus_stock, ext_1, ext_2, ext_3", + "from coupon_discount_package", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="key", property="key", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="effective_tiem", property="effectiveTiem", jdbcType=JdbcType.TIMESTAMP), + @Result(column="created_user_id", property="createdUserId", jdbcType=JdbcType.INTEGER), + @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="updated_user_id", property="updatedUserId", jdbcType=JdbcType.INTEGER), + @Result(column="updated_time", property="updatedTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="total_stock", property="totalStock", jdbcType=JdbcType.INTEGER), + @Result(column="surplus_stock", property="surplusStock", 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) + }) + CouponDiscountPackage selectByPrimaryKey(Integer id); + + @UpdateProvider(type=CouponDiscountPackageSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") CouponDiscountPackage record, @Param("example") CouponDiscountPackageExample example); + + @UpdateProvider(type=CouponDiscountPackageSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") CouponDiscountPackage record, @Param("example") CouponDiscountPackageExample example); + + @UpdateProvider(type=CouponDiscountPackageSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CouponDiscountPackage record); + + @Update({ + "update coupon_discount_package", + "set `key` = #{key,jdbcType=VARCHAR},", + "title = #{title,jdbcType=VARCHAR},", + "effective_tiem = #{effectiveTiem,jdbcType=TIMESTAMP},", + "created_user_id = #{createdUserId,jdbcType=INTEGER},", + "created_time = #{createdTime,jdbcType=TIMESTAMP},", + "updated_user_id = #{updatedUserId,jdbcType=INTEGER},", + "updated_time = #{updatedTime,jdbcType=TIMESTAMP},", + "`status` = #{status,jdbcType=INTEGER},", + "total_stock = #{totalStock,jdbcType=INTEGER},", + "surplus_stock = #{surplusStock,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CouponDiscountPackage record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageMapperExt.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageMapperExt.java new file mode 100644 index 0000000..60f0125 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface CouponDiscountPackageMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordMapper.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordMapper.java new file mode 100644 index 0000000..87bf336 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordMapper.java @@ -0,0 +1,137 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountPackageRecord; +import com.hfkj.entity.CouponDiscountPackageRecordExample; +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 CouponDiscountPackageRecordMapper extends CouponDiscountPackageRecordMapperExt { + @SelectProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="countByExample") + long countByExample(CouponDiscountPackageRecordExample example); + + @DeleteProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="deleteByExample") + int deleteByExample(CouponDiscountPackageRecordExample example); + + @Delete({ + "delete from coupon_discount_package_record", + "where id = #{id,jdbcType=INTEGER}" + }) + int deleteByPrimaryKey(Integer id); + + @Insert({ + "insert into coupon_discount_package_record (discount_package_title, discount_package_id, ", + "order_id, child_order_id, ", + "record_no, serial_no, ", + "`type`, user_id, user_phone, ", + "created_time, `status`, ", + "ext_1, ext_2, ext_3)", + "values (#{discountPackageTitle,jdbcType=VARCHAR}, #{discountPackageId,jdbcType=INTEGER}, ", + "#{orderId,jdbcType=INTEGER}, #{childOrderId,jdbcType=INTEGER}, ", + "#{recordNo,jdbcType=VARCHAR}, #{serialNo,jdbcType=VARCHAR}, ", + "#{type,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER}, #{userPhone,jdbcType=VARCHAR}, ", + "#{createdTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(CouponDiscountPackageRecord record); + + @InsertProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(CouponDiscountPackageRecord record); + + @SelectProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR), + @Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), + @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.INTEGER), + @Result(column="record_no", property="recordNo", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_no", property="serialNo", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), + @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(CouponDiscountPackageRecordExample example); + + @Select({ + "select", + "id, discount_package_title, discount_package_id, order_id, child_order_id, record_no, ", + "serial_no, `type`, user_id, user_phone, created_time, `status`, ext_1, ext_2, ", + "ext_3", + "from coupon_discount_package_record", + "where id = #{id,jdbcType=INTEGER}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true), + @Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR), + @Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.INTEGER), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.INTEGER), + @Result(column="child_order_id", property="childOrderId", jdbcType=JdbcType.INTEGER), + @Result(column="record_no", property="recordNo", jdbcType=JdbcType.VARCHAR), + @Result(column="serial_no", property="serialNo", jdbcType=JdbcType.VARCHAR), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER), + @Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="created_time", property="createdTime", jdbcType=JdbcType.TIMESTAMP), + @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) + }) + CouponDiscountPackageRecord selectByPrimaryKey(Integer id); + + @UpdateProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") CouponDiscountPackageRecord record, @Param("example") CouponDiscountPackageRecordExample example); + + @UpdateProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") CouponDiscountPackageRecord record, @Param("example") CouponDiscountPackageRecordExample example); + + @UpdateProvider(type=CouponDiscountPackageRecordSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CouponDiscountPackageRecord record); + + @Update({ + "update coupon_discount_package_record", + "set discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR},", + "discount_package_id = #{discountPackageId,jdbcType=INTEGER},", + "order_id = #{orderId,jdbcType=INTEGER},", + "child_order_id = #{childOrderId,jdbcType=INTEGER},", + "record_no = #{recordNo,jdbcType=VARCHAR},", + "serial_no = #{serialNo,jdbcType=VARCHAR},", + "`type` = #{type,jdbcType=INTEGER},", + "user_id = #{userId,jdbcType=INTEGER},", + "user_phone = #{userPhone,jdbcType=VARCHAR},", + "created_time = #{createdTime,jdbcType=TIMESTAMP},", + "`status` = #{status,jdbcType=INTEGER},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=INTEGER}" + }) + int updateByPrimaryKey(CouponDiscountPackageRecord record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordMapperExt.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordMapperExt.java new file mode 100644 index 0000000..5f0e346 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface CouponDiscountPackageRecordMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordSqlProvider.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordSqlProvider.java new file mode 100644 index 0000000..6151856 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageRecordSqlProvider.java @@ -0,0 +1,374 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountPackageRecord; +import com.hfkj.entity.CouponDiscountPackageRecordExample.Criteria; +import com.hfkj.entity.CouponDiscountPackageRecordExample.Criterion; +import com.hfkj.entity.CouponDiscountPackageRecordExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class CouponDiscountPackageRecordSqlProvider { + + public String countByExample(CouponDiscountPackageRecordExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("coupon_discount_package_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(CouponDiscountPackageRecordExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("coupon_discount_package_record"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(CouponDiscountPackageRecord record) { + SQL sql = new SQL(); + sql.INSERT_INTO("coupon_discount_package_record"); + + if (record.getDiscountPackageTitle() != null) { + sql.VALUES("discount_package_title", "#{discountPackageTitle,jdbcType=VARCHAR}"); + } + + if (record.getDiscountPackageId() != null) { + sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=INTEGER}"); + } + + if (record.getOrderId() != null) { + sql.VALUES("order_id", "#{orderId,jdbcType=INTEGER}"); + } + + if (record.getChildOrderId() != null) { + sql.VALUES("child_order_id", "#{childOrderId,jdbcType=INTEGER}"); + } + + if (record.getRecordNo() != null) { + sql.VALUES("record_no", "#{recordNo,jdbcType=VARCHAR}"); + } + + if (record.getSerialNo() != null) { + sql.VALUES("serial_no", "#{serialNo,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getCreatedTime() != null) { + sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); + } + + 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(CouponDiscountPackageRecordExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("discount_package_title"); + sql.SELECT("discount_package_id"); + sql.SELECT("order_id"); + sql.SELECT("child_order_id"); + sql.SELECT("record_no"); + sql.SELECT("serial_no"); + sql.SELECT("`type`"); + sql.SELECT("user_id"); + sql.SELECT("user_phone"); + sql.SELECT("created_time"); + sql.SELECT("`status`"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("coupon_discount_package_record"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + CouponDiscountPackageRecord record = (CouponDiscountPackageRecord) parameter.get("record"); + CouponDiscountPackageRecordExample example = (CouponDiscountPackageRecordExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_package_record"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + } + + if (record.getDiscountPackageTitle() != null) { + sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}"); + } + + if (record.getDiscountPackageId() != null) { + sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{record.orderId,jdbcType=INTEGER}"); + } + + if (record.getChildOrderId() != null) { + sql.SET("child_order_id = #{record.childOrderId,jdbcType=INTEGER}"); + } + + if (record.getRecordNo() != null) { + sql.SET("record_no = #{record.recordNo,jdbcType=VARCHAR}"); + } + + if (record.getSerialNo() != null) { + sql.SET("serial_no = #{record.serialNo,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + } + + if (record.getCreatedTime() != null) { + sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); + } + + 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("coupon_discount_package_record"); + + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}"); + sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=INTEGER}"); + sql.SET("order_id = #{record.orderId,jdbcType=INTEGER}"); + sql.SET("child_order_id = #{record.childOrderId,jdbcType=INTEGER}"); + sql.SET("record_no = #{record.recordNo,jdbcType=VARCHAR}"); + sql.SET("serial_no = #{record.serialNo,jdbcType=VARCHAR}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("user_id = #{record.userId,jdbcType=INTEGER}"); + sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}"); + sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); + 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}"); + + CouponDiscountPackageRecordExample example = (CouponDiscountPackageRecordExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(CouponDiscountPackageRecord record) { + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_package_record"); + + if (record.getDiscountPackageTitle() != null) { + sql.SET("discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR}"); + } + + if (record.getDiscountPackageId() != null) { + sql.SET("discount_package_id = #{discountPackageId,jdbcType=INTEGER}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{orderId,jdbcType=INTEGER}"); + } + + if (record.getChildOrderId() != null) { + sql.SET("child_order_id = #{childOrderId,jdbcType=INTEGER}"); + } + + if (record.getRecordNo() != null) { + sql.SET("record_no = #{recordNo,jdbcType=VARCHAR}"); + } + + if (record.getSerialNo() != null) { + sql.SET("serial_no = #{serialNo,jdbcType=VARCHAR}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=INTEGER}"); + } + + if (record.getUserPhone() != null) { + sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}"); + } + + if (record.getCreatedTime() != null) { + sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); + } + + 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=INTEGER}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, CouponDiscountPackageRecordExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountPackageSqlProvider.java b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageSqlProvider.java new file mode 100644 index 0000000..c0c8d46 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountPackageSqlProvider.java @@ -0,0 +1,360 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountPackage; +import com.hfkj.entity.CouponDiscountPackageExample.Criteria; +import com.hfkj.entity.CouponDiscountPackageExample.Criterion; +import com.hfkj.entity.CouponDiscountPackageExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class CouponDiscountPackageSqlProvider { + + public String countByExample(CouponDiscountPackageExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("coupon_discount_package"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(CouponDiscountPackageExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("coupon_discount_package"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(CouponDiscountPackage record) { + SQL sql = new SQL(); + sql.INSERT_INTO("coupon_discount_package"); + + if (record.getKey() != null) { + sql.VALUES("`key`", "#{key,jdbcType=VARCHAR}"); + } + + if (record.getTitle() != null) { + sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); + } + + if (record.getEffectiveTiem() != null) { + sql.VALUES("effective_tiem", "#{effectiveTiem,jdbcType=TIMESTAMP}"); + } + + if (record.getCreatedUserId() != null) { + sql.VALUES("created_user_id", "#{createdUserId,jdbcType=INTEGER}"); + } + + if (record.getCreatedTime() != null) { + sql.VALUES("created_time", "#{createdTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdatedUserId() != null) { + sql.VALUES("updated_user_id", "#{updatedUserId,jdbcType=INTEGER}"); + } + + if (record.getUpdatedTime() != null) { + sql.VALUES("updated_time", "#{updatedTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getTotalStock() != null) { + sql.VALUES("total_stock", "#{totalStock,jdbcType=INTEGER}"); + } + + if (record.getSurplusStock() != null) { + sql.VALUES("surplus_stock", "#{surplusStock,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(CouponDiscountPackageExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("`key`"); + sql.SELECT("title"); + sql.SELECT("effective_tiem"); + sql.SELECT("created_user_id"); + sql.SELECT("created_time"); + sql.SELECT("updated_user_id"); + sql.SELECT("updated_time"); + sql.SELECT("`status`"); + sql.SELECT("total_stock"); + sql.SELECT("surplus_stock"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("coupon_discount_package"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + CouponDiscountPackage record = (CouponDiscountPackage) parameter.get("record"); + CouponDiscountPackageExample example = (CouponDiscountPackageExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_package"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + } + + if (record.getKey() != null) { + sql.SET("`key` = #{record.key,jdbcType=VARCHAR}"); + } + + if (record.getTitle() != null) { + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + } + + if (record.getEffectiveTiem() != null) { + sql.SET("effective_tiem = #{record.effectiveTiem,jdbcType=TIMESTAMP}"); + } + + if (record.getCreatedUserId() != null) { + sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); + } + + if (record.getCreatedTime() != null) { + sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdatedUserId() != null) { + sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); + } + + if (record.getUpdatedTime() != null) { + sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getTotalStock() != null) { + sql.SET("total_stock = #{record.totalStock,jdbcType=INTEGER}"); + } + + if (record.getSurplusStock() != null) { + sql.SET("surplus_stock = #{record.surplusStock,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("coupon_discount_package"); + + sql.SET("id = #{record.id,jdbcType=INTEGER}"); + sql.SET("`key` = #{record.key,jdbcType=VARCHAR}"); + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + sql.SET("effective_tiem = #{record.effectiveTiem,jdbcType=TIMESTAMP}"); + sql.SET("created_user_id = #{record.createdUserId,jdbcType=INTEGER}"); + sql.SET("created_time = #{record.createdTime,jdbcType=TIMESTAMP}"); + sql.SET("updated_user_id = #{record.updatedUserId,jdbcType=INTEGER}"); + sql.SET("updated_time = #{record.updatedTime,jdbcType=TIMESTAMP}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("total_stock = #{record.totalStock,jdbcType=INTEGER}"); + sql.SET("surplus_stock = #{record.surplusStock,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}"); + + CouponDiscountPackageExample example = (CouponDiscountPackageExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(CouponDiscountPackage record) { + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_package"); + + if (record.getKey() != null) { + sql.SET("`key` = #{key,jdbcType=VARCHAR}"); + } + + if (record.getTitle() != null) { + sql.SET("title = #{title,jdbcType=VARCHAR}"); + } + + if (record.getEffectiveTiem() != null) { + sql.SET("effective_tiem = #{effectiveTiem,jdbcType=TIMESTAMP}"); + } + + if (record.getCreatedUserId() != null) { + sql.SET("created_user_id = #{createdUserId,jdbcType=INTEGER}"); + } + + if (record.getCreatedTime() != null) { + sql.SET("created_time = #{createdTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdatedUserId() != null) { + sql.SET("updated_user_id = #{updatedUserId,jdbcType=INTEGER}"); + } + + if (record.getUpdatedTime() != null) { + sql.SET("updated_time = #{updatedTime,jdbcType=TIMESTAMP}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getTotalStock() != null) { + sql.SET("total_stock = #{totalStock,jdbcType=INTEGER}"); + } + + if (record.getSurplusStock() != null) { + sql.SET("surplus_stock = #{surplusStock,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=INTEGER}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, CouponDiscountPackageExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java new file mode 100644 index 0000000..1fde72f --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapper.java @@ -0,0 +1,142 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountUserRel; +import com.hfkj.entity.CouponDiscountUserRelExample; +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 CouponDiscountUserRelMapper extends CouponDiscountUserRelMapperExt { + @SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="countByExample") + long countByExample(CouponDiscountUserRelExample example); + + @DeleteProvider(type=CouponDiscountUserRelSqlProvider.class, method="deleteByExample") + int deleteByExample(CouponDiscountUserRelExample example); + + @Delete({ + "delete from coupon_discount_user_rel", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into coupon_discount_user_rel (discount_id, discount_name, ", + "discount_img, discount_type, ", + "discount_condition, discount_price, ", + "discount_percentage, user_id, ", + "`status`, use_time, ", + "create_time, use_end_time, ", + "ext_1, ext_2, ext_3)", + "values (#{discountId,jdbcType=BIGINT}, #{discountName,jdbcType=VARCHAR}, ", + "#{discountImg,jdbcType=VARCHAR}, #{discountType,jdbcType=INTEGER}, ", + "#{discountCondition,jdbcType=DECIMAL}, #{discountPrice,jdbcType=DECIMAL}, ", + "#{discountPercentage,jdbcType=DECIMAL}, #{userId,jdbcType=BIGINT}, ", + "#{status,jdbcType=INTEGER}, #{useTime,jdbcType=TIMESTAMP}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{useEndTime,jdbcType=TIMESTAMP}, ", + "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(CouponDiscountUserRel record); + + @InsertProvider(type=CouponDiscountUserRelSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(CouponDiscountUserRel record); + + @SelectProvider(type=CouponDiscountUserRelSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), + @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), + @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), + @Result(column="discount_type", property="discountType", jdbcType=JdbcType.INTEGER), + @Result(column="discount_condition", property="discountCondition", jdbcType=JdbcType.DECIMAL), + @Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="discount_percentage", property="discountPercentage", jdbcType=JdbcType.DECIMAL), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="use_time", property="useTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="use_end_time", property="useEndTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(CouponDiscountUserRelExample example); + + @Select({ + "select", + "id, discount_id, discount_name, discount_img, discount_type, discount_condition, ", + "discount_price, discount_percentage, user_id, `status`, use_time, create_time, ", + "use_end_time, ext_1, ext_2, ext_3", + "from coupon_discount_user_rel", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="discount_id", property="discountId", jdbcType=JdbcType.BIGINT), + @Result(column="discount_name", property="discountName", jdbcType=JdbcType.VARCHAR), + @Result(column="discount_img", property="discountImg", jdbcType=JdbcType.VARCHAR), + @Result(column="discount_type", property="discountType", jdbcType=JdbcType.INTEGER), + @Result(column="discount_condition", property="discountCondition", jdbcType=JdbcType.DECIMAL), + @Result(column="discount_price", property="discountPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="discount_percentage", property="discountPercentage", jdbcType=JdbcType.DECIMAL), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="use_time", property="useTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="use_end_time", property="useEndTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + CouponDiscountUserRel selectByPrimaryKey(Long id); + + @UpdateProvider(type=CouponDiscountUserRelSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") CouponDiscountUserRel record, @Param("example") CouponDiscountUserRelExample example); + + @UpdateProvider(type=CouponDiscountUserRelSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") CouponDiscountUserRel record, @Param("example") CouponDiscountUserRelExample example); + + @UpdateProvider(type=CouponDiscountUserRelSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(CouponDiscountUserRel record); + + @Update({ + "update coupon_discount_user_rel", + "set discount_id = #{discountId,jdbcType=BIGINT},", + "discount_name = #{discountName,jdbcType=VARCHAR},", + "discount_img = #{discountImg,jdbcType=VARCHAR},", + "discount_type = #{discountType,jdbcType=INTEGER},", + "discount_condition = #{discountCondition,jdbcType=DECIMAL},", + "discount_price = #{discountPrice,jdbcType=DECIMAL},", + "discount_percentage = #{discountPercentage,jdbcType=DECIMAL},", + "user_id = #{userId,jdbcType=BIGINT},", + "`status` = #{status,jdbcType=INTEGER},", + "use_time = #{useTime,jdbcType=TIMESTAMP},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "use_end_time = #{useEndTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(CouponDiscountUserRel record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapperExt.java b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapperExt.java new file mode 100644 index 0000000..479009c --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface CouponDiscountUserRelMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java new file mode 100644 index 0000000..ddb65f0 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/CouponDiscountUserRelSqlProvider.java @@ -0,0 +1,388 @@ +package com.hfkj.dao; + +import com.hfkj.entity.CouponDiscountUserRel; +import com.hfkj.entity.CouponDiscountUserRelExample.Criteria; +import com.hfkj.entity.CouponDiscountUserRelExample.Criterion; +import com.hfkj.entity.CouponDiscountUserRelExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class CouponDiscountUserRelSqlProvider { + + public String countByExample(CouponDiscountUserRelExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("coupon_discount_user_rel"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(CouponDiscountUserRelExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("coupon_discount_user_rel"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(CouponDiscountUserRel record) { + SQL sql = new SQL(); + sql.INSERT_INTO("coupon_discount_user_rel"); + + if (record.getDiscountId() != null) { + sql.VALUES("discount_id", "#{discountId,jdbcType=BIGINT}"); + } + + if (record.getDiscountName() != null) { + sql.VALUES("discount_name", "#{discountName,jdbcType=VARCHAR}"); + } + + if (record.getDiscountImg() != null) { + sql.VALUES("discount_img", "#{discountImg,jdbcType=VARCHAR}"); + } + + if (record.getDiscountType() != null) { + sql.VALUES("discount_type", "#{discountType,jdbcType=INTEGER}"); + } + + if (record.getDiscountCondition() != null) { + sql.VALUES("discount_condition", "#{discountCondition,jdbcType=DECIMAL}"); + } + + if (record.getDiscountPrice() != null) { + sql.VALUES("discount_price", "#{discountPrice,jdbcType=DECIMAL}"); + } + + if (record.getDiscountPercentage() != null) { + sql.VALUES("discount_percentage", "#{discountPercentage,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getUseTime() != null) { + sql.VALUES("use_time", "#{useTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUseEndTime() != null) { + sql.VALUES("use_end_time", "#{useEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(CouponDiscountUserRelExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("discount_id"); + sql.SELECT("discount_name"); + sql.SELECT("discount_img"); + sql.SELECT("discount_type"); + sql.SELECT("discount_condition"); + sql.SELECT("discount_price"); + sql.SELECT("discount_percentage"); + sql.SELECT("user_id"); + sql.SELECT("`status`"); + sql.SELECT("use_time"); + sql.SELECT("create_time"); + sql.SELECT("use_end_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("coupon_discount_user_rel"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + CouponDiscountUserRel record = (CouponDiscountUserRel) parameter.get("record"); + CouponDiscountUserRelExample example = (CouponDiscountUserRelExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_user_rel"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getDiscountId() != null) { + sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); + } + + if (record.getDiscountName() != null) { + sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); + } + + if (record.getDiscountImg() != null) { + sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); + } + + if (record.getDiscountType() != null) { + sql.SET("discount_type = #{record.discountType,jdbcType=INTEGER}"); + } + + if (record.getDiscountCondition() != null) { + sql.SET("discount_condition = #{record.discountCondition,jdbcType=DECIMAL}"); + } + + if (record.getDiscountPrice() != null) { + sql.SET("discount_price = #{record.discountPrice,jdbcType=DECIMAL}"); + } + + if (record.getDiscountPercentage() != null) { + sql.SET("discount_percentage = #{record.discountPercentage,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getUseTime() != null) { + sql.SET("use_time = #{record.useTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUseEndTime() != null) { + sql.SET("use_end_time = #{record.useEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_user_rel"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("discount_id = #{record.discountId,jdbcType=BIGINT}"); + sql.SET("discount_name = #{record.discountName,jdbcType=VARCHAR}"); + sql.SET("discount_img = #{record.discountImg,jdbcType=VARCHAR}"); + sql.SET("discount_type = #{record.discountType,jdbcType=INTEGER}"); + sql.SET("discount_condition = #{record.discountCondition,jdbcType=DECIMAL}"); + sql.SET("discount_price = #{record.discountPrice,jdbcType=DECIMAL}"); + sql.SET("discount_percentage = #{record.discountPercentage,jdbcType=DECIMAL}"); + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("use_time = #{record.useTime,jdbcType=TIMESTAMP}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("use_end_time = #{record.useEndTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + CouponDiscountUserRelExample example = (CouponDiscountUserRelExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(CouponDiscountUserRel record) { + SQL sql = new SQL(); + sql.UPDATE("coupon_discount_user_rel"); + + if (record.getDiscountId() != null) { + sql.SET("discount_id = #{discountId,jdbcType=BIGINT}"); + } + + if (record.getDiscountName() != null) { + sql.SET("discount_name = #{discountName,jdbcType=VARCHAR}"); + } + + if (record.getDiscountImg() != null) { + sql.SET("discount_img = #{discountImg,jdbcType=VARCHAR}"); + } + + if (record.getDiscountType() != null) { + sql.SET("discount_type = #{discountType,jdbcType=INTEGER}"); + } + + if (record.getDiscountCondition() != null) { + sql.SET("discount_condition = #{discountCondition,jdbcType=DECIMAL}"); + } + + if (record.getDiscountPrice() != null) { + sql.SET("discount_price = #{discountPrice,jdbcType=DECIMAL}"); + } + + if (record.getDiscountPercentage() != null) { + sql.SET("discount_percentage = #{discountPercentage,jdbcType=DECIMAL}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getUseTime() != null) { + sql.SET("use_time = #{useTime,jdbcType=TIMESTAMP}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUseEndTime() != null) { + sql.SET("use_end_time = #{useEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, CouponDiscountUserRelExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsLogisticsMapper.java b/service/src/main/java/com/hfkj/dao/GoodsLogisticsMapper.java new file mode 100644 index 0000000..e7da3c1 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsLogisticsMapper.java @@ -0,0 +1,163 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsLogistics; +import com.hfkj.entity.GoodsLogisticsExample; +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 GoodsLogisticsMapper extends GoodsLogisticsMapperExt { + @SelectProvider(type=GoodsLogisticsSqlProvider.class, method="countByExample") + long countByExample(GoodsLogisticsExample example); + + @DeleteProvider(type=GoodsLogisticsSqlProvider.class, method="deleteByExample") + int deleteByExample(GoodsLogisticsExample example); + + @Delete({ + "delete from goods_logistics", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into goods_logistics (user_id, order_id, ", + "task_no, `number`, ", + "logistics_status, logistics_status_desc, ", + "the_last_message, the_last_time, ", + "take_time, courier, ", + "courier_phone, logistics_trace_details, ", + "express_company_name, `status`, ", + "create_time, op_id, ", + "op_name, ext_1, ext_2, ", + "ext_3)", + "values (#{userId,jdbcType=BIGINT}, #{orderId,jdbcType=BIGINT}, ", + "#{taskNo,jdbcType=VARCHAR}, #{number,jdbcType=VARCHAR}, ", + "#{logisticsStatus,jdbcType=VARCHAR}, #{logisticsStatusDesc,jdbcType=VARCHAR}, ", + "#{theLastMessage,jdbcType=VARCHAR}, #{theLastTime,jdbcType=TIMESTAMP}, ", + "#{takeTime,jdbcType=VARCHAR}, #{courier,jdbcType=VARCHAR}, ", + "#{courierPhone,jdbcType=VARCHAR}, #{logisticsTraceDetails,jdbcType=VARCHAR}, ", + "#{expressCompanyName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", + "#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(GoodsLogistics record); + + @InsertProvider(type=GoodsLogisticsSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(GoodsLogistics record); + + @SelectProvider(type=GoodsLogisticsSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="task_no", property="taskNo", jdbcType=JdbcType.VARCHAR), + @Result(column="number", property="number", jdbcType=JdbcType.VARCHAR), + @Result(column="logistics_status", property="logisticsStatus", jdbcType=JdbcType.VARCHAR), + @Result(column="logistics_status_desc", property="logisticsStatusDesc", jdbcType=JdbcType.VARCHAR), + @Result(column="the_last_message", property="theLastMessage", jdbcType=JdbcType.VARCHAR), + @Result(column="the_last_time", property="theLastTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="take_time", property="takeTime", jdbcType=JdbcType.VARCHAR), + @Result(column="courier", property="courier", jdbcType=JdbcType.VARCHAR), + @Result(column="courier_phone", property="courierPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="logistics_trace_details", property="logisticsTraceDetails", jdbcType=JdbcType.VARCHAR), + @Result(column="express_company_name", property="expressCompanyName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="op_name", property="opName", 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(GoodsLogisticsExample example); + + @Select({ + "select", + "id, user_id, order_id, task_no, `number`, logistics_status, logistics_status_desc, ", + "the_last_message, the_last_time, take_time, courier, courier_phone, logistics_trace_details, ", + "express_company_name, `status`, create_time, op_id, op_name, ext_1, ext_2, ext_3", + "from goods_logistics", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT), + @Result(column="task_no", property="taskNo", jdbcType=JdbcType.VARCHAR), + @Result(column="number", property="number", jdbcType=JdbcType.VARCHAR), + @Result(column="logistics_status", property="logisticsStatus", jdbcType=JdbcType.VARCHAR), + @Result(column="logistics_status_desc", property="logisticsStatusDesc", jdbcType=JdbcType.VARCHAR), + @Result(column="the_last_message", property="theLastMessage", jdbcType=JdbcType.VARCHAR), + @Result(column="the_last_time", property="theLastTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="take_time", property="takeTime", jdbcType=JdbcType.VARCHAR), + @Result(column="courier", property="courier", jdbcType=JdbcType.VARCHAR), + @Result(column="courier_phone", property="courierPhone", jdbcType=JdbcType.VARCHAR), + @Result(column="logistics_trace_details", property="logisticsTraceDetails", jdbcType=JdbcType.VARCHAR), + @Result(column="express_company_name", property="expressCompanyName", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="op_name", property="opName", 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) + }) + GoodsLogistics selectByPrimaryKey(Long id); + + @UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") GoodsLogistics record, @Param("example") GoodsLogisticsExample example); + + @UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") GoodsLogistics record, @Param("example") GoodsLogisticsExample example); + + @UpdateProvider(type=GoodsLogisticsSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(GoodsLogistics record); + + @Update({ + "update goods_logistics", + "set user_id = #{userId,jdbcType=BIGINT},", + "order_id = #{orderId,jdbcType=BIGINT},", + "task_no = #{taskNo,jdbcType=VARCHAR},", + "`number` = #{number,jdbcType=VARCHAR},", + "logistics_status = #{logisticsStatus,jdbcType=VARCHAR},", + "logistics_status_desc = #{logisticsStatusDesc,jdbcType=VARCHAR},", + "the_last_message = #{theLastMessage,jdbcType=VARCHAR},", + "the_last_time = #{theLastTime,jdbcType=TIMESTAMP},", + "take_time = #{takeTime,jdbcType=VARCHAR},", + "courier = #{courier,jdbcType=VARCHAR},", + "courier_phone = #{courierPhone,jdbcType=VARCHAR},", + "logistics_trace_details = #{logisticsTraceDetails,jdbcType=VARCHAR},", + "express_company_name = #{expressCompanyName,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "op_id = #{opId,jdbcType=BIGINT},", + "op_name = #{opName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(GoodsLogistics record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsLogisticsMapperExt.java b/service/src/main/java/com/hfkj/dao/GoodsLogisticsMapperExt.java new file mode 100644 index 0000000..4890609 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsLogisticsMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface GoodsLogisticsMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsLogisticsSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsLogisticsSqlProvider.java new file mode 100644 index 0000000..ff0f276 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsLogisticsSqlProvider.java @@ -0,0 +1,458 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsLogistics; +import com.hfkj.entity.GoodsLogisticsExample.Criteria; +import com.hfkj.entity.GoodsLogisticsExample.Criterion; +import com.hfkj.entity.GoodsLogisticsExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class GoodsLogisticsSqlProvider { + + public String countByExample(GoodsLogisticsExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("goods_logistics"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(GoodsLogisticsExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("goods_logistics"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(GoodsLogistics record) { + SQL sql = new SQL(); + sql.INSERT_INTO("goods_logistics"); + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getOrderId() != null) { + sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}"); + } + + if (record.getTaskNo() != null) { + sql.VALUES("task_no", "#{taskNo,jdbcType=VARCHAR}"); + } + + if (record.getNumber() != null) { + sql.VALUES("`number`", "#{number,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsStatus() != null) { + sql.VALUES("logistics_status", "#{logisticsStatus,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsStatusDesc() != null) { + sql.VALUES("logistics_status_desc", "#{logisticsStatusDesc,jdbcType=VARCHAR}"); + } + + if (record.getTheLastMessage() != null) { + sql.VALUES("the_last_message", "#{theLastMessage,jdbcType=VARCHAR}"); + } + + if (record.getTheLastTime() != null) { + sql.VALUES("the_last_time", "#{theLastTime,jdbcType=TIMESTAMP}"); + } + + if (record.getTakeTime() != null) { + sql.VALUES("take_time", "#{takeTime,jdbcType=VARCHAR}"); + } + + if (record.getCourier() != null) { + sql.VALUES("courier", "#{courier,jdbcType=VARCHAR}"); + } + + if (record.getCourierPhone() != null) { + sql.VALUES("courier_phone", "#{courierPhone,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsTraceDetails() != null) { + sql.VALUES("logistics_trace_details", "#{logisticsTraceDetails,jdbcType=VARCHAR}"); + } + + if (record.getExpressCompanyName() != null) { + sql.VALUES("express_company_name", "#{expressCompanyName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpId() != null) { + sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.VALUES("op_name", "#{opName,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(GoodsLogisticsExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("user_id"); + sql.SELECT("order_id"); + sql.SELECT("task_no"); + sql.SELECT("`number`"); + sql.SELECT("logistics_status"); + sql.SELECT("logistics_status_desc"); + sql.SELECT("the_last_message"); + sql.SELECT("the_last_time"); + sql.SELECT("take_time"); + sql.SELECT("courier"); + sql.SELECT("courier_phone"); + sql.SELECT("logistics_trace_details"); + sql.SELECT("express_company_name"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("op_id"); + sql.SELECT("op_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("goods_logistics"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + GoodsLogistics record = (GoodsLogistics) parameter.get("record"); + GoodsLogisticsExample example = (GoodsLogisticsExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("goods_logistics"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + } + + if (record.getTaskNo() != null) { + sql.SET("task_no = #{record.taskNo,jdbcType=VARCHAR}"); + } + + if (record.getNumber() != null) { + sql.SET("`number` = #{record.number,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsStatus() != null) { + sql.SET("logistics_status = #{record.logisticsStatus,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsStatusDesc() != null) { + sql.SET("logistics_status_desc = #{record.logisticsStatusDesc,jdbcType=VARCHAR}"); + } + + if (record.getTheLastMessage() != null) { + sql.SET("the_last_message = #{record.theLastMessage,jdbcType=VARCHAR}"); + } + + if (record.getTheLastTime() != null) { + sql.SET("the_last_time = #{record.theLastTime,jdbcType=TIMESTAMP}"); + } + + if (record.getTakeTime() != null) { + sql.SET("take_time = #{record.takeTime,jdbcType=VARCHAR}"); + } + + if (record.getCourier() != null) { + sql.SET("courier = #{record.courier,jdbcType=VARCHAR}"); + } + + if (record.getCourierPhone() != null) { + sql.SET("courier_phone = #{record.courierPhone,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsTraceDetails() != null) { + sql.SET("logistics_trace_details = #{record.logisticsTraceDetails,jdbcType=VARCHAR}"); + } + + if (record.getExpressCompanyName() != null) { + sql.SET("express_company_name = #{record.expressCompanyName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpId() != null) { + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{record.opName,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("goods_logistics"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}"); + sql.SET("task_no = #{record.taskNo,jdbcType=VARCHAR}"); + sql.SET("`number` = #{record.number,jdbcType=VARCHAR}"); + sql.SET("logistics_status = #{record.logisticsStatus,jdbcType=VARCHAR}"); + sql.SET("logistics_status_desc = #{record.logisticsStatusDesc,jdbcType=VARCHAR}"); + sql.SET("the_last_message = #{record.theLastMessage,jdbcType=VARCHAR}"); + sql.SET("the_last_time = #{record.theLastTime,jdbcType=TIMESTAMP}"); + sql.SET("take_time = #{record.takeTime,jdbcType=VARCHAR}"); + sql.SET("courier = #{record.courier,jdbcType=VARCHAR}"); + sql.SET("courier_phone = #{record.courierPhone,jdbcType=VARCHAR}"); + sql.SET("logistics_trace_details = #{record.logisticsTraceDetails,jdbcType=VARCHAR}"); + sql.SET("express_company_name = #{record.expressCompanyName,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + sql.SET("op_name = #{record.opName,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}"); + + GoodsLogisticsExample example = (GoodsLogisticsExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(GoodsLogistics record) { + SQL sql = new SQL(); + sql.UPDATE("goods_logistics"); + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getOrderId() != null) { + sql.SET("order_id = #{orderId,jdbcType=BIGINT}"); + } + + if (record.getTaskNo() != null) { + sql.SET("task_no = #{taskNo,jdbcType=VARCHAR}"); + } + + if (record.getNumber() != null) { + sql.SET("`number` = #{number,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsStatus() != null) { + sql.SET("logistics_status = #{logisticsStatus,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsStatusDesc() != null) { + sql.SET("logistics_status_desc = #{logisticsStatusDesc,jdbcType=VARCHAR}"); + } + + if (record.getTheLastMessage() != null) { + sql.SET("the_last_message = #{theLastMessage,jdbcType=VARCHAR}"); + } + + if (record.getTheLastTime() != null) { + sql.SET("the_last_time = #{theLastTime,jdbcType=TIMESTAMP}"); + } + + if (record.getTakeTime() != null) { + sql.SET("take_time = #{takeTime,jdbcType=VARCHAR}"); + } + + if (record.getCourier() != null) { + sql.SET("courier = #{courier,jdbcType=VARCHAR}"); + } + + if (record.getCourierPhone() != null) { + sql.SET("courier_phone = #{courierPhone,jdbcType=VARCHAR}"); + } + + if (record.getLogisticsTraceDetails() != null) { + sql.SET("logistics_trace_details = #{logisticsTraceDetails,jdbcType=VARCHAR}"); + } + + if (record.getExpressCompanyName() != null) { + sql.SET("express_company_name = #{expressCompanyName,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getOpId() != null) { + sql.SET("op_id = #{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{opName,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, GoodsLogisticsExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapper.java b/service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapper.java index d4d4c70..041e679 100644 --- a/service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapper.java +++ b/service/src/main/java/com/hfkj/dao/GoodsShoppingCartMapper.java @@ -39,19 +39,21 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { int deleteByPrimaryKey(Long id); @Insert({ - "insert into goods_shopping_cart (goods_id, user_id, ", - "title, img, specs_name, ", - "specs_id, num, price, ", - "whether_check, lose_efficacy, ", - "create_time, update_time, ", - "mer_id, mer_name, `status`, ", + "insert into goods_shopping_cart (goods_id, goods_type, ", + "user_id, title, img, ", + "specs_name, specs_id, ", + "num, price, whether_check, ", + "lose_efficacy, create_time, ", + "update_time, mer_id, ", + "mer_name, `status`, ", "ext_1, ext_2, ext_3)", - "values (#{goodsId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, ", - "#{title,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, #{specsName,jdbcType=VARCHAR}, ", - "#{specsId,jdbcType=BIGINT}, #{num,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ", - "#{whetherCheck,jdbcType=BIT}, #{loseEfficacy,jdbcType=BIT}, ", - "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", - "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "values (#{goodsId,jdbcType=BIGINT}, #{goodsType,jdbcType=INTEGER}, ", + "#{userId,jdbcType=BIGINT}, #{title,jdbcType=VARCHAR}, #{img,jdbcType=VARCHAR}, ", + "#{specsName,jdbcType=VARCHAR}, #{specsId,jdbcType=BIGINT}, ", + "#{num,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, #{whetherCheck,jdbcType=BIT}, ", + "#{loseEfficacy,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{merId,jdbcType=BIGINT}, ", + "#{merName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" }) @Options(useGeneratedKeys=true,keyProperty="id") @@ -65,6 +67,7 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), @@ -87,15 +90,16 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Select({ "select", - "id, goods_id, user_id, title, img, specs_name, specs_id, num, price, whether_check, ", - "lose_efficacy, create_time, update_time, mer_id, mer_name, `status`, ext_1, ", - "ext_2, ext_3", + "id, goods_id, goods_type, user_id, title, img, specs_name, specs_id, num, price, ", + "whether_check, lose_efficacy, create_time, update_time, mer_id, mer_name, `status`, ", + "ext_1, ext_2, ext_3", "from goods_shopping_cart", "where id = #{id,jdbcType=BIGINT}" }) @Results({ @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.INTEGER), @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), @Result(column="img", property="img", jdbcType=JdbcType.VARCHAR), @@ -128,6 +132,7 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { @Update({ "update goods_shopping_cart", "set goods_id = #{goodsId,jdbcType=BIGINT},", + "goods_type = #{goodsType,jdbcType=INTEGER},", "user_id = #{userId,jdbcType=BIGINT},", "title = #{title,jdbcType=VARCHAR},", "img = #{img,jdbcType=VARCHAR},", @@ -148,4 +153,4 @@ public interface GoodsShoppingCartMapper extends GoodsShoppingCartMapperExt { "where id = #{id,jdbcType=BIGINT}" }) int updateByPrimaryKey(GoodsShoppingCart record); -} \ No newline at end of file +} diff --git a/service/src/main/java/com/hfkj/dao/GoodsShoppingCartSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsShoppingCartSqlProvider.java index 7a7c3c4..7176d41 100644 --- a/service/src/main/java/com/hfkj/dao/GoodsShoppingCartSqlProvider.java +++ b/service/src/main/java/com/hfkj/dao/GoodsShoppingCartSqlProvider.java @@ -32,6 +32,10 @@ public class GoodsShoppingCartSqlProvider { sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); } + if (record.getGoodsType() != null) { + sql.VALUES("goods_type", "#{goodsType,jdbcType=INTEGER}"); + } + if (record.getUserId() != null) { sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); } @@ -111,6 +115,7 @@ public class GoodsShoppingCartSqlProvider { sql.SELECT("id"); } sql.SELECT("goods_id"); + sql.SELECT("goods_type"); sql.SELECT("user_id"); sql.SELECT("title"); sql.SELECT("img"); @@ -153,6 +158,10 @@ public class GoodsShoppingCartSqlProvider { sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); } + if (record.getGoodsType() != null) { + sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); } @@ -231,6 +240,7 @@ public class GoodsShoppingCartSqlProvider { sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + sql.SET("goods_type = #{record.goodsType,jdbcType=INTEGER}"); sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); sql.SET("title = #{record.title,jdbcType=VARCHAR}"); sql.SET("img = #{record.img,jdbcType=VARCHAR}"); @@ -262,6 +272,10 @@ public class GoodsShoppingCartSqlProvider { sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); } + if (record.getGoodsType() != null) { + sql.SET("goods_type = #{goodsType,jdbcType=INTEGER}"); + } + if (record.getUserId() != null) { sql.SET("user_id = #{userId,jdbcType=BIGINT}"); } @@ -427,4 +441,4 @@ public class GoodsShoppingCartSqlProvider { sql.WHERE(sb.toString()); } } -} \ No newline at end of file +} diff --git a/service/src/main/java/com/hfkj/dao/GoodsUserAddressMapper.java b/service/src/main/java/com/hfkj/dao/GoodsUserAddressMapper.java new file mode 100644 index 0000000..4c6266f --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsUserAddressMapper.java @@ -0,0 +1,138 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsUserAddress; +import com.hfkj.entity.GoodsUserAddressExample; +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 GoodsUserAddressMapper extends GoodsUserAddressMapperExt { + @SelectProvider(type=GoodsUserAddressSqlProvider.class, method="countByExample") + long countByExample(GoodsUserAddressExample example); + + @DeleteProvider(type=GoodsUserAddressSqlProvider.class, method="deleteByExample") + int deleteByExample(GoodsUserAddressExample example); + + @Delete({ + "delete from goods_user_address", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into goods_user_address (user_id, consignee, ", + "phone, address, ", + "region_id, region_name, ", + "whether_default, create_time, ", + "update_time, op_id, ", + "op_name, ext_1, ext_2, ", + "ext_3)", + "values (#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ", + "#{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ", + "#{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, ", + "#{whetherDefault,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{opId,jdbcType=BIGINT}, ", + "#{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ", + "#{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(GoodsUserAddress record); + + @InsertProvider(type=GoodsUserAddressSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(GoodsUserAddress record); + + @SelectProvider(type=GoodsUserAddressSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR), + @Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR), + @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), + @Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR), + @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), + @Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="op_name", property="opName", 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(GoodsUserAddressExample example); + + @Select({ + "select", + "id, user_id, consignee, phone, address, region_id, region_name, whether_default, ", + "create_time, update_time, op_id, op_name, ext_1, ext_2, ext_3", + "from goods_user_address", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT), + @Result(column="consignee", property="consignee", jdbcType=JdbcType.VARCHAR), + @Result(column="phone", property="phone", jdbcType=JdbcType.VARCHAR), + @Result(column="address", property="address", jdbcType=JdbcType.VARCHAR), + @Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR), + @Result(column="region_name", property="regionName", jdbcType=JdbcType.VARCHAR), + @Result(column="whether_default", property="whetherDefault", jdbcType=JdbcType.BIT), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT), + @Result(column="op_name", property="opName", 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) + }) + GoodsUserAddress selectByPrimaryKey(Long id); + + @UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") GoodsUserAddress record, @Param("example") GoodsUserAddressExample example); + + @UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") GoodsUserAddress record, @Param("example") GoodsUserAddressExample example); + + @UpdateProvider(type=GoodsUserAddressSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(GoodsUserAddress record); + + @Update({ + "update goods_user_address", + "set user_id = #{userId,jdbcType=BIGINT},", + "consignee = #{consignee,jdbcType=VARCHAR},", + "phone = #{phone,jdbcType=VARCHAR},", + "address = #{address,jdbcType=VARCHAR},", + "region_id = #{regionId,jdbcType=VARCHAR},", + "region_name = #{regionName,jdbcType=VARCHAR},", + "whether_default = #{whetherDefault,jdbcType=BIT},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "op_id = #{opId,jdbcType=BIGINT},", + "op_name = #{opName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(GoodsUserAddress record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsUserAddressMapperExt.java b/service/src/main/java/com/hfkj/dao/GoodsUserAddressMapperExt.java new file mode 100644 index 0000000..be57214 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsUserAddressMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface GoodsUserAddressMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsUserAddressSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsUserAddressSqlProvider.java new file mode 100644 index 0000000..8123688 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsUserAddressSqlProvider.java @@ -0,0 +1,374 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsUserAddress; +import com.hfkj.entity.GoodsUserAddressExample.Criteria; +import com.hfkj.entity.GoodsUserAddressExample.Criterion; +import com.hfkj.entity.GoodsUserAddressExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class GoodsUserAddressSqlProvider { + + public String countByExample(GoodsUserAddressExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("goods_user_address"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(GoodsUserAddressExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("goods_user_address"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(GoodsUserAddress record) { + SQL sql = new SQL(); + sql.INSERT_INTO("goods_user_address"); + + if (record.getUserId() != null) { + sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}"); + } + + if (record.getConsignee() != null) { + sql.VALUES("consignee", "#{consignee,jdbcType=VARCHAR}"); + } + + if (record.getPhone() != null) { + sql.VALUES("phone", "#{phone,jdbcType=VARCHAR}"); + } + + if (record.getAddress() != null) { + sql.VALUES("address", "#{address,jdbcType=VARCHAR}"); + } + + if (record.getRegionId() != null) { + sql.VALUES("region_id", "#{regionId,jdbcType=VARCHAR}"); + } + + if (record.getRegionName() != null) { + sql.VALUES("region_name", "#{regionName,jdbcType=VARCHAR}"); + } + + if (record.getWhetherDefault() != null) { + sql.VALUES("whether_default", "#{whetherDefault,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.getOpId() != null) { + sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.VALUES("op_name", "#{opName,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(GoodsUserAddressExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("user_id"); + sql.SELECT("consignee"); + sql.SELECT("phone"); + sql.SELECT("address"); + sql.SELECT("region_id"); + sql.SELECT("region_name"); + sql.SELECT("whether_default"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("op_id"); + sql.SELECT("op_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("goods_user_address"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + GoodsUserAddress record = (GoodsUserAddress) parameter.get("record"); + GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("goods_user_address"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getUserId() != null) { + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + } + + if (record.getConsignee() != null) { + sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}"); + } + + if (record.getPhone() != null) { + sql.SET("phone = #{record.phone,jdbcType=VARCHAR}"); + } + + if (record.getAddress() != null) { + sql.SET("address = #{record.address,jdbcType=VARCHAR}"); + } + + if (record.getRegionId() != null) { + sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}"); + } + + if (record.getRegionName() != null) { + sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); + } + + if (record.getWhetherDefault() != null) { + sql.SET("whether_default = #{record.whetherDefault,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.getOpId() != null) { + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{record.opName,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("goods_user_address"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("user_id = #{record.userId,jdbcType=BIGINT}"); + sql.SET("consignee = #{record.consignee,jdbcType=VARCHAR}"); + sql.SET("phone = #{record.phone,jdbcType=VARCHAR}"); + sql.SET("address = #{record.address,jdbcType=VARCHAR}"); + sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}"); + sql.SET("region_name = #{record.regionName,jdbcType=VARCHAR}"); + sql.SET("whether_default = #{record.whetherDefault,jdbcType=BIT}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("op_id = #{record.opId,jdbcType=BIGINT}"); + sql.SET("op_name = #{record.opName,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}"); + + GoodsUserAddressExample example = (GoodsUserAddressExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(GoodsUserAddress record) { + SQL sql = new SQL(); + sql.UPDATE("goods_user_address"); + + if (record.getUserId() != null) { + sql.SET("user_id = #{userId,jdbcType=BIGINT}"); + } + + if (record.getConsignee() != null) { + sql.SET("consignee = #{consignee,jdbcType=VARCHAR}"); + } + + if (record.getPhone() != null) { + sql.SET("phone = #{phone,jdbcType=VARCHAR}"); + } + + if (record.getAddress() != null) { + sql.SET("address = #{address,jdbcType=VARCHAR}"); + } + + if (record.getRegionId() != null) { + sql.SET("region_id = #{regionId,jdbcType=VARCHAR}"); + } + + if (record.getRegionName() != null) { + sql.SET("region_name = #{regionName,jdbcType=VARCHAR}"); + } + + if (record.getWhetherDefault() != null) { + sql.SET("whether_default = #{whetherDefault,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.getOpId() != null) { + sql.SET("op_id = #{opId,jdbcType=BIGINT}"); + } + + if (record.getOpName() != null) { + sql.SET("op_name = #{opName,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, GoodsUserAddressExample example, boolean includeExamplePhrase) { + if (example == null) { + return; + } + + String parmPhrase1; + String parmPhrase1_th; + String parmPhrase2; + String parmPhrase2_th; + String parmPhrase3; + String parmPhrase3_th; + if (includeExamplePhrase) { + parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } else { + parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; + parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; + parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; + parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; + parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; + parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; + } + + StringBuilder sb = new StringBuilder(); + List oredCriteria = example.getOredCriteria(); + boolean firstCriteria = true; + for (int i = 0; i < oredCriteria.size(); i++) { + Criteria criteria = oredCriteria.get(i); + if (criteria.isValid()) { + if (firstCriteria) { + firstCriteria = false; + } else { + sb.append(" or "); + } + + sb.append('('); + List criterions = criteria.getAllCriteria(); + boolean firstCriterion = true; + for (int j = 0; j < criterions.size(); j++) { + Criterion criterion = criterions.get(j); + if (firstCriterion) { + firstCriterion = false; + } else { + sb.append(" and "); + } + + if (criterion.isNoValue()) { + sb.append(criterion.getCondition()); + } else if (criterion.isSingleValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); + } else { + sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); + } + } else if (criterion.isBetweenValue()) { + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); + } else { + sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); + } + } else if (criterion.isListValue()) { + sb.append(criterion.getCondition()); + sb.append(" ("); + List listItems = (List) criterion.getValue(); + boolean comma = false; + for (int k = 0; k < listItems.size(); k++) { + if (comma) { + sb.append(", "); + } else { + comma = true; + } + if (criterion.getTypeHandler() == null) { + sb.append(String.format(parmPhrase3, i, j, k)); + } else { + sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); + } + } + sb.append(')'); + } + } + sb.append(')'); + } + } + + if (sb.length() > 0) { + sql.WHERE(sb.toString()); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsCity.java b/service/src/main/java/com/hfkj/entity/BsCity.java new file mode 100644 index 0000000..ced4abf --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsCity.java @@ -0,0 +1,112 @@ +package com.hfkj.entity; + +import java.io.Serializable; + +/** + * bs_city + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class BsCity implements Serializable { + /** + * 主键 + */ + private Long regionId; + + /** + * 省市区 + */ + private String regionName; + + /** + * 父类id + */ + private Long parentId; + + /** + * 状态,是否可用 + */ + private Integer status; + + private static final long serialVersionUID = 1L; + + public Long getRegionId() { + return regionId; + } + + public void setRegionId(Long regionId) { + this.regionId = regionId; + } + + public String getRegionName() { + return regionName; + } + + public void setRegionName(String regionName) { + this.regionName = regionName; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + BsCity other = (BsCity) that; + return (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) + && (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName())) + && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode()); + result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode()); + result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", regionId=").append(regionId); + sb.append(", regionName=").append(regionName); + sb.append(", parentId=").append(parentId); + sb.append(", status=").append(status); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/BsCityExample.java b/service/src/main/java/com/hfkj/entity/BsCityExample.java new file mode 100644 index 0000000..ff81895 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/BsCityExample.java @@ -0,0 +1,472 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.List; + +public class BsCityExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public BsCityExample() { + 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 andRegionIdIsNull() { + addCriterion("region_id is null"); + return (Criteria) this; + } + + public Criteria andRegionIdIsNotNull() { + addCriterion("region_id is not null"); + return (Criteria) this; + } + + public Criteria andRegionIdEqualTo(Long value) { + addCriterion("region_id =", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotEqualTo(Long value) { + addCriterion("region_id <>", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdGreaterThan(Long value) { + addCriterion("region_id >", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdGreaterThanOrEqualTo(Long value) { + addCriterion("region_id >=", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdLessThan(Long value) { + addCriterion("region_id <", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdLessThanOrEqualTo(Long value) { + addCriterion("region_id <=", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdIn(List values) { + addCriterion("region_id in", values, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotIn(List values) { + addCriterion("region_id not in", values, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdBetween(Long value1, Long value2) { + addCriterion("region_id between", value1, value2, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotBetween(Long value1, Long value2) { + addCriterion("region_id not between", value1, value2, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionNameIsNull() { + addCriterion("region_name is null"); + return (Criteria) this; + } + + public Criteria andRegionNameIsNotNull() { + addCriterion("region_name is not null"); + return (Criteria) this; + } + + public Criteria andRegionNameEqualTo(String value) { + addCriterion("region_name =", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotEqualTo(String value) { + addCriterion("region_name <>", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameGreaterThan(String value) { + addCriterion("region_name >", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameGreaterThanOrEqualTo(String value) { + addCriterion("region_name >=", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameLessThan(String value) { + addCriterion("region_name <", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameLessThanOrEqualTo(String value) { + addCriterion("region_name <=", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameLike(String value) { + addCriterion("region_name like", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotLike(String value) { + addCriterion("region_name not like", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameIn(List values) { + addCriterion("region_name in", values, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotIn(List values) { + addCriterion("region_name not in", values, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameBetween(String value1, String value2) { + addCriterion("region_name between", value1, value2, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotBetween(String value1, String value2) { + addCriterion("region_name not between", value1, value2, "regionName"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + 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 static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/CouponDiscountPackage.java b/service/src/main/java/com/hfkj/entity/CouponDiscountPackage.java new file mode 100644 index 0000000..6b0abab --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountPackage.java @@ -0,0 +1,273 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * coupon_discount_package + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class CouponDiscountPackage implements Serializable { + /** + * 主键 + */ + private Integer id; + + /** + * 编码 + */ + private String key; + + /** + * 标题 + */ + private String title; + + /** + * 有效期 + */ + private Date effectiveTiem; + + /** + * 创建人 + */ + private Integer createdUserId; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新人 + */ + private Integer updatedUserId; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 状态 1: 上架 2: 编辑中 0:删除 + */ + private Integer status; + + /** + * 总库存 + */ + private Integer totalStock; + + /** + * 剩余库存 + */ + private Integer surplusStock; + + /** + * 扩展字段 + */ + private String ext1; + + /** + * 扩展字段 + */ + private String ext2; + + /** + * 扩展字段 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public Date getEffectiveTiem() { + return effectiveTiem; + } + + public void setEffectiveTiem(Date effectiveTiem) { + this.effectiveTiem = effectiveTiem; + } + + public Integer getCreatedUserId() { + return createdUserId; + } + + public void setCreatedUserId(Integer createdUserId) { + this.createdUserId = createdUserId; + } + + public Date getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Date createdTime) { + this.createdTime = createdTime; + } + + public Integer getUpdatedUserId() { + return updatedUserId; + } + + public void setUpdatedUserId(Integer updatedUserId) { + this.updatedUserId = updatedUserId; + } + + public Date getUpdatedTime() { + return updatedTime; + } + + public void setUpdatedTime(Date updatedTime) { + this.updatedTime = updatedTime; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Integer getTotalStock() { + return totalStock; + } + + public void setTotalStock(Integer totalStock) { + this.totalStock = totalStock; + } + + public Integer getSurplusStock() { + return surplusStock; + } + + public void setSurplusStock(Integer surplusStock) { + this.surplusStock = surplusStock; + } + + 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; + } + CouponDiscountPackage other = (CouponDiscountPackage) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey())) + && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (this.getEffectiveTiem() == null ? other.getEffectiveTiem() == null : this.getEffectiveTiem().equals(other.getEffectiveTiem())) + && (this.getCreatedUserId() == null ? other.getCreatedUserId() == null : this.getCreatedUserId().equals(other.getCreatedUserId())) + && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) + && (this.getUpdatedUserId() == null ? other.getUpdatedUserId() == null : this.getUpdatedUserId().equals(other.getUpdatedUserId())) + && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getTotalStock() == null ? other.getTotalStock() == null : this.getTotalStock().equals(other.getTotalStock())) + && (this.getSurplusStock() == null ? other.getSurplusStock() == null : this.getSurplusStock().equals(other.getSurplusStock())) + && (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 + ((getKey() == null) ? 0 : getKey().hashCode()); + result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); + result = prime * result + ((getEffectiveTiem() == null) ? 0 : getEffectiveTiem().hashCode()); + result = prime * result + ((getCreatedUserId() == null) ? 0 : getCreatedUserId().hashCode()); + result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); + result = prime * result + ((getUpdatedUserId() == null) ? 0 : getUpdatedUserId().hashCode()); + result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getTotalStock() == null) ? 0 : getTotalStock().hashCode()); + result = prime * result + ((getSurplusStock() == null) ? 0 : getSurplusStock().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(", key=").append(key); + sb.append(", title=").append(title); + sb.append(", effectiveTiem=").append(effectiveTiem); + sb.append(", createdUserId=").append(createdUserId); + sb.append(", createdTime=").append(createdTime); + sb.append(", updatedUserId=").append(updatedUserId); + sb.append(", updatedTime=").append(updatedTime); + sb.append(", status=").append(status); + sb.append(", totalStock=").append(totalStock); + sb.append(", surplusStock=").append(surplusStock); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/CouponDiscountPackageDetails.java b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageDetails.java new file mode 100644 index 0000000..5f19665 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageDetails.java @@ -0,0 +1,225 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * coupon_discount_package_details + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class CouponDiscountPackageDetails implements Serializable { + /** + * 主键 + */ + private Integer id; + + /** + * 优惠券包id + */ + private Integer discountPackageId; + + /** + * 优惠券id + */ + private Integer discountId; + + /** + * 优惠券名称 + */ + private String discountName; + + /** + * 数量 + */ + private Integer num; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 更新时间 + */ + private Date updatedTime; + + /** + * 状态 1: 正常 0: 删除 + */ + private Integer status; + + /** + * 扩展字段 + */ + private String ext1; + + /** + * 扩展字段 + */ + private String ext2; + + /** + * 扩展字段 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getDiscountPackageId() { + return discountPackageId; + } + + public void setDiscountPackageId(Integer discountPackageId) { + this.discountPackageId = discountPackageId; + } + + public Integer getDiscountId() { + return discountId; + } + + public void setDiscountId(Integer discountId) { + this.discountId = discountId; + } + + public String getDiscountName() { + return discountName; + } + + public void setDiscountName(String discountName) { + this.discountName = discountName; + } + + public Integer getNum() { + return num; + } + + public void setNum(Integer num) { + this.num = num; + } + + public Date getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Date createdTime) { + this.createdTime = createdTime; + } + + public Date getUpdatedTime() { + return updatedTime; + } + + public void setUpdatedTime(Date updatedTime) { + this.updatedTime = updatedTime; + } + + 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; + } + CouponDiscountPackageDetails other = (CouponDiscountPackageDetails) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId())) + && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) + && (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) + && (this.getNum() == null ? other.getNum() == null : this.getNum().equals(other.getNum())) + && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) + && (this.getUpdatedTime() == null ? other.getUpdatedTime() == null : this.getUpdatedTime().equals(other.getUpdatedTime())) + && (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 + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode()); + result = prime * result + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); + result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); + result = prime * result + ((getNum() == null) ? 0 : getNum().hashCode()); + result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); + result = prime * result + ((getUpdatedTime() == null) ? 0 : getUpdatedTime().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(", discountPackageId=").append(discountPackageId); + sb.append(", discountId=").append(discountId); + sb.append(", discountName=").append(discountName); + sb.append(", num=").append(num); + sb.append(", createdTime=").append(createdTime); + sb.append(", updatedTime=").append(updatedTime); + 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/service/src/main/java/com/hfkj/entity/CouponDiscountPackageDetailsExample.java b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageDetailsExample.java new file mode 100644 index 0000000..3192810 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageDetailsExample.java @@ -0,0 +1,923 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CouponDiscountPackageDetailsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CouponDiscountPackageDetailsExample() { + 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNull() { + addCriterion("discount_package_id is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNotNull() { + addCriterion("discount_package_id is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdEqualTo(Integer value) { + addCriterion("discount_package_id =", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotEqualTo(Integer value) { + addCriterion("discount_package_id <>", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThan(Integer value) { + addCriterion("discount_package_id >", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThanOrEqualTo(Integer value) { + addCriterion("discount_package_id >=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThan(Integer value) { + addCriterion("discount_package_id <", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThanOrEqualTo(Integer value) { + addCriterion("discount_package_id <=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIn(List values) { + addCriterion("discount_package_id in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotIn(List values) { + addCriterion("discount_package_id not in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdBetween(Integer value1, Integer value2) { + addCriterion("discount_package_id between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotBetween(Integer value1, Integer value2) { + addCriterion("discount_package_id not between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountIdIsNull() { + addCriterion("discount_id is null"); + return (Criteria) this; + } + + public Criteria andDiscountIdIsNotNull() { + addCriterion("discount_id is not null"); + return (Criteria) this; + } + + public Criteria andDiscountIdEqualTo(Integer value) { + addCriterion("discount_id =", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdNotEqualTo(Integer value) { + addCriterion("discount_id <>", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdGreaterThan(Integer value) { + addCriterion("discount_id >", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdGreaterThanOrEqualTo(Integer value) { + addCriterion("discount_id >=", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdLessThan(Integer value) { + addCriterion("discount_id <", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdLessThanOrEqualTo(Integer value) { + addCriterion("discount_id <=", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdIn(List values) { + addCriterion("discount_id in", values, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdNotIn(List values) { + addCriterion("discount_id not in", values, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdBetween(Integer value1, Integer value2) { + addCriterion("discount_id between", value1, value2, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdNotBetween(Integer value1, Integer value2) { + addCriterion("discount_id not between", value1, value2, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountNameIsNull() { + addCriterion("discount_name is null"); + return (Criteria) this; + } + + public Criteria andDiscountNameIsNotNull() { + addCriterion("discount_name is not null"); + return (Criteria) this; + } + + public Criteria andDiscountNameEqualTo(String value) { + addCriterion("discount_name =", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotEqualTo(String value) { + addCriterion("discount_name <>", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameGreaterThan(String value) { + addCriterion("discount_name >", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("discount_name >=", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameLessThan(String value) { + addCriterion("discount_name <", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameLessThanOrEqualTo(String value) { + addCriterion("discount_name <=", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameLike(String value) { + addCriterion("discount_name like", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotLike(String value) { + addCriterion("discount_name not like", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameIn(List values) { + addCriterion("discount_name in", values, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotIn(List values) { + addCriterion("discount_name not in", values, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameBetween(String value1, String value2) { + addCriterion("discount_name between", value1, value2, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotBetween(String value1, String value2) { + addCriterion("discount_name not between", value1, value2, "discountName"); + return (Criteria) this; + } + + public Criteria andNumIsNull() { + addCriterion("num is null"); + return (Criteria) this; + } + + public Criteria andNumIsNotNull() { + addCriterion("num is not null"); + return (Criteria) this; + } + + public Criteria andNumEqualTo(Integer value) { + addCriterion("num =", value, "num"); + return (Criteria) this; + } + + public Criteria andNumNotEqualTo(Integer value) { + addCriterion("num <>", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThan(Integer value) { + addCriterion("num >", value, "num"); + return (Criteria) this; + } + + public Criteria andNumGreaterThanOrEqualTo(Integer value) { + addCriterion("num >=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThan(Integer value) { + addCriterion("num <", value, "num"); + return (Criteria) this; + } + + public Criteria andNumLessThanOrEqualTo(Integer value) { + addCriterion("num <=", value, "num"); + return (Criteria) this; + } + + public Criteria andNumIn(List values) { + addCriterion("num in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumNotIn(List values) { + addCriterion("num not in", values, "num"); + return (Criteria) this; + } + + public Criteria andNumBetween(Integer value1, Integer value2) { + addCriterion("num between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andNumNotBetween(Integer value1, Integer value2) { + addCriterion("num not between", value1, value2, "num"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNull() { + addCriterion("created_time is null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNotNull() { + addCriterion("created_time is not null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeEqualTo(Date value) { + addCriterion("created_time =", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotEqualTo(Date value) { + addCriterion("created_time <>", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThan(Date value) { + addCriterion("created_time >", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThanOrEqualTo(Date value) { + addCriterion("created_time >=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThan(Date value) { + addCriterion("created_time <", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThanOrEqualTo(Date value) { + addCriterion("created_time <=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIn(List values) { + addCriterion("created_time in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotIn(List values) { + addCriterion("created_time not in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeBetween(Date value1, Date value2) { + addCriterion("created_time between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotBetween(Date value1, Date value2) { + addCriterion("created_time not between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeIsNull() { + addCriterion("updated_time is null"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeIsNotNull() { + addCriterion("updated_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeEqualTo(Date value) { + addCriterion("updated_time =", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeNotEqualTo(Date value) { + addCriterion("updated_time <>", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeGreaterThan(Date value) { + addCriterion("updated_time >", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeGreaterThanOrEqualTo(Date value) { + addCriterion("updated_time >=", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeLessThan(Date value) { + addCriterion("updated_time <", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeLessThanOrEqualTo(Date value) { + addCriterion("updated_time <=", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeIn(List values) { + addCriterion("updated_time in", values, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeNotIn(List values) { + addCriterion("updated_time not in", values, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeBetween(Date value1, Date value2) { + addCriterion("updated_time between", value1, value2, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeNotBetween(Date value1, Date value2) { + addCriterion("updated_time not between", value1, value2, "updatedTime"); + 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/service/src/main/java/com/hfkj/entity/CouponDiscountPackageExample.java b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageExample.java new file mode 100644 index 0000000..509629a --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageExample.java @@ -0,0 +1,1113 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CouponDiscountPackageExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CouponDiscountPackageExample() { + 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andKeyIsNull() { + addCriterion("`key` is null"); + return (Criteria) this; + } + + public Criteria andKeyIsNotNull() { + addCriterion("`key` is not null"); + return (Criteria) this; + } + + public Criteria andKeyEqualTo(String value) { + addCriterion("`key` =", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotEqualTo(String value) { + addCriterion("`key` <>", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyGreaterThan(String value) { + addCriterion("`key` >", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyGreaterThanOrEqualTo(String value) { + addCriterion("`key` >=", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLessThan(String value) { + addCriterion("`key` <", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLessThanOrEqualTo(String value) { + addCriterion("`key` <=", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyLike(String value) { + addCriterion("`key` like", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotLike(String value) { + addCriterion("`key` not like", value, "key"); + return (Criteria) this; + } + + public Criteria andKeyIn(List values) { + addCriterion("`key` in", values, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotIn(List values) { + addCriterion("`key` not in", values, "key"); + return (Criteria) this; + } + + public Criteria andKeyBetween(String value1, String value2) { + addCriterion("`key` between", value1, value2, "key"); + return (Criteria) this; + } + + public Criteria andKeyNotBetween(String value1, String value2) { + addCriterion("`key` not between", value1, value2, "key"); + return (Criteria) this; + } + + public Criteria andTitleIsNull() { + addCriterion("title is null"); + return (Criteria) this; + } + + public Criteria andTitleIsNotNull() { + addCriterion("title is not null"); + return (Criteria) this; + } + + public Criteria andTitleEqualTo(String value) { + addCriterion("title =", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotEqualTo(String value) { + addCriterion("title <>", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThan(String value) { + addCriterion("title >", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleGreaterThanOrEqualTo(String value) { + addCriterion("title >=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThan(String value) { + addCriterion("title <", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLessThanOrEqualTo(String value) { + addCriterion("title <=", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleLike(String value) { + addCriterion("title like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotLike(String value) { + addCriterion("title not like", value, "title"); + return (Criteria) this; + } + + public Criteria andTitleIn(List values) { + addCriterion("title in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotIn(List values) { + addCriterion("title not in", values, "title"); + return (Criteria) this; + } + + public Criteria andTitleBetween(String value1, String value2) { + addCriterion("title between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andTitleNotBetween(String value1, String value2) { + addCriterion("title not between", value1, value2, "title"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemIsNull() { + addCriterion("effective_tiem is null"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemIsNotNull() { + addCriterion("effective_tiem is not null"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemEqualTo(Date value) { + addCriterion("effective_tiem =", value, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemNotEqualTo(Date value) { + addCriterion("effective_tiem <>", value, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemGreaterThan(Date value) { + addCriterion("effective_tiem >", value, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemGreaterThanOrEqualTo(Date value) { + addCriterion("effective_tiem >=", value, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemLessThan(Date value) { + addCriterion("effective_tiem <", value, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemLessThanOrEqualTo(Date value) { + addCriterion("effective_tiem <=", value, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemIn(List values) { + addCriterion("effective_tiem in", values, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemNotIn(List values) { + addCriterion("effective_tiem not in", values, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemBetween(Date value1, Date value2) { + addCriterion("effective_tiem between", value1, value2, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andEffectiveTiemNotBetween(Date value1, Date value2) { + addCriterion("effective_tiem not between", value1, value2, "effectiveTiem"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdIsNull() { + addCriterion("created_user_id is null"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdIsNotNull() { + addCriterion("created_user_id is not null"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdEqualTo(Integer value) { + addCriterion("created_user_id =", value, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdNotEqualTo(Integer value) { + addCriterion("created_user_id <>", value, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdGreaterThan(Integer value) { + addCriterion("created_user_id >", value, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("created_user_id >=", value, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdLessThan(Integer value) { + addCriterion("created_user_id <", value, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdLessThanOrEqualTo(Integer value) { + addCriterion("created_user_id <=", value, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdIn(List values) { + addCriterion("created_user_id in", values, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdNotIn(List values) { + addCriterion("created_user_id not in", values, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdBetween(Integer value1, Integer value2) { + addCriterion("created_user_id between", value1, value2, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("created_user_id not between", value1, value2, "createdUserId"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNull() { + addCriterion("created_time is null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNotNull() { + addCriterion("created_time is not null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeEqualTo(Date value) { + addCriterion("created_time =", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotEqualTo(Date value) { + addCriterion("created_time <>", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThan(Date value) { + addCriterion("created_time >", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThanOrEqualTo(Date value) { + addCriterion("created_time >=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThan(Date value) { + addCriterion("created_time <", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThanOrEqualTo(Date value) { + addCriterion("created_time <=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIn(List values) { + addCriterion("created_time in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotIn(List values) { + addCriterion("created_time not in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeBetween(Date value1, Date value2) { + addCriterion("created_time between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotBetween(Date value1, Date value2) { + addCriterion("created_time not between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdIsNull() { + addCriterion("updated_user_id is null"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdIsNotNull() { + addCriterion("updated_user_id is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdEqualTo(Integer value) { + addCriterion("updated_user_id =", value, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdNotEqualTo(Integer value) { + addCriterion("updated_user_id <>", value, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdGreaterThan(Integer value) { + addCriterion("updated_user_id >", value, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("updated_user_id >=", value, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdLessThan(Integer value) { + addCriterion("updated_user_id <", value, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdLessThanOrEqualTo(Integer value) { + addCriterion("updated_user_id <=", value, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdIn(List values) { + addCriterion("updated_user_id in", values, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdNotIn(List values) { + addCriterion("updated_user_id not in", values, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdBetween(Integer value1, Integer value2) { + addCriterion("updated_user_id between", value1, value2, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("updated_user_id not between", value1, value2, "updatedUserId"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeIsNull() { + addCriterion("updated_time is null"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeIsNotNull() { + addCriterion("updated_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeEqualTo(Date value) { + addCriterion("updated_time =", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeNotEqualTo(Date value) { + addCriterion("updated_time <>", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeGreaterThan(Date value) { + addCriterion("updated_time >", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeGreaterThanOrEqualTo(Date value) { + addCriterion("updated_time >=", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeLessThan(Date value) { + addCriterion("updated_time <", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeLessThanOrEqualTo(Date value) { + addCriterion("updated_time <=", value, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeIn(List values) { + addCriterion("updated_time in", values, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeNotIn(List values) { + addCriterion("updated_time not in", values, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeBetween(Date value1, Date value2) { + addCriterion("updated_time between", value1, value2, "updatedTime"); + return (Criteria) this; + } + + public Criteria andUpdatedTimeNotBetween(Date value1, Date value2) { + addCriterion("updated_time not between", value1, value2, "updatedTime"); + 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 andTotalStockIsNull() { + addCriterion("total_stock is null"); + return (Criteria) this; + } + + public Criteria andTotalStockIsNotNull() { + addCriterion("total_stock is not null"); + return (Criteria) this; + } + + public Criteria andTotalStockEqualTo(Integer value) { + addCriterion("total_stock =", value, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockNotEqualTo(Integer value) { + addCriterion("total_stock <>", value, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockGreaterThan(Integer value) { + addCriterion("total_stock >", value, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockGreaterThanOrEqualTo(Integer value) { + addCriterion("total_stock >=", value, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockLessThan(Integer value) { + addCriterion("total_stock <", value, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockLessThanOrEqualTo(Integer value) { + addCriterion("total_stock <=", value, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockIn(List values) { + addCriterion("total_stock in", values, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockNotIn(List values) { + addCriterion("total_stock not in", values, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockBetween(Integer value1, Integer value2) { + addCriterion("total_stock between", value1, value2, "totalStock"); + return (Criteria) this; + } + + public Criteria andTotalStockNotBetween(Integer value1, Integer value2) { + addCriterion("total_stock not between", value1, value2, "totalStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockIsNull() { + addCriterion("surplus_stock is null"); + return (Criteria) this; + } + + public Criteria andSurplusStockIsNotNull() { + addCriterion("surplus_stock is not null"); + return (Criteria) this; + } + + public Criteria andSurplusStockEqualTo(Integer value) { + addCriterion("surplus_stock =", value, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockNotEqualTo(Integer value) { + addCriterion("surplus_stock <>", value, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockGreaterThan(Integer value) { + addCriterion("surplus_stock >", value, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockGreaterThanOrEqualTo(Integer value) { + addCriterion("surplus_stock >=", value, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockLessThan(Integer value) { + addCriterion("surplus_stock <", value, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockLessThanOrEqualTo(Integer value) { + addCriterion("surplus_stock <=", value, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockIn(List values) { + addCriterion("surplus_stock in", values, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockNotIn(List values) { + addCriterion("surplus_stock not in", values, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockBetween(Integer value1, Integer value2) { + addCriterion("surplus_stock between", value1, value2, "surplusStock"); + return (Criteria) this; + } + + public Criteria andSurplusStockNotBetween(Integer value1, Integer value2) { + addCriterion("surplus_stock not between", value1, value2, "surplusStock"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/CouponDiscountPackageRecord.java b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageRecord.java new file mode 100644 index 0000000..5f48183 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageRecord.java @@ -0,0 +1,289 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * coupon_discount_package_record + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class CouponDiscountPackageRecord implements Serializable { + /** + * 主键 + */ + private Integer id; + + /** + * 优惠券包名称 + */ + private String discountPackageTitle; + + /** + * 优惠券包id + */ + private Integer discountPackageId; + + /** + * 支付订单id + */ + private Integer orderId; + + /** + * 子订单id + */ + private Integer childOrderId; + + /** + * 记录订单 + */ + private String recordNo; + + /** + * 记录序号 + */ + private String serialNo; + + /** + * 销售类型 :1 售卖 2: 赠送 + */ + private Integer type; + + /** + * 用户id + */ + private Integer userId; + + /** + * 用户手机号 + */ + private String userPhone; + + /** + * 创建时间 + */ + private Date createdTime; + + /** + * 状态 1:正常 0 : 删除 + */ + private Integer status; + + /** + * 扩展字段 + */ + private String ext1; + + /** + * 扩展字段 + */ + private String ext2; + + /** + * 扩展字段 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getDiscountPackageTitle() { + return discountPackageTitle; + } + + public void setDiscountPackageTitle(String discountPackageTitle) { + this.discountPackageTitle = discountPackageTitle; + } + + public Integer getDiscountPackageId() { + return discountPackageId; + } + + public void setDiscountPackageId(Integer discountPackageId) { + this.discountPackageId = discountPackageId; + } + + public Integer getOrderId() { + return orderId; + } + + public void setOrderId(Integer orderId) { + this.orderId = orderId; + } + + public Integer getChildOrderId() { + return childOrderId; + } + + public void setChildOrderId(Integer childOrderId) { + this.childOrderId = childOrderId; + } + + public String getRecordNo() { + return recordNo; + } + + public void setRecordNo(String recordNo) { + this.recordNo = recordNo; + } + + public String getSerialNo() { + return serialNo; + } + + public void setSerialNo(String serialNo) { + this.serialNo = serialNo; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getUserId() { + return userId; + } + + public void setUserId(Integer userId) { + this.userId = userId; + } + + public String getUserPhone() { + return userPhone; + } + + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + + public Date getCreatedTime() { + return createdTime; + } + + public void setCreatedTime(Date createdTime) { + this.createdTime = createdTime; + } + + 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; + } + CouponDiscountPackageRecord other = (CouponDiscountPackageRecord) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDiscountPackageTitle() == null ? other.getDiscountPackageTitle() == null : this.getDiscountPackageTitle().equals(other.getDiscountPackageTitle())) + && (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId())) + && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) + && (this.getChildOrderId() == null ? other.getChildOrderId() == null : this.getChildOrderId().equals(other.getChildOrderId())) + && (this.getRecordNo() == null ? other.getRecordNo() == null : this.getRecordNo().equals(other.getRecordNo())) + && (this.getSerialNo() == null ? other.getSerialNo() == null : this.getSerialNo().equals(other.getSerialNo())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone())) + && (this.getCreatedTime() == null ? other.getCreatedTime() == null : this.getCreatedTime().equals(other.getCreatedTime())) + && (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 + ((getDiscountPackageTitle() == null) ? 0 : getDiscountPackageTitle().hashCode()); + result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode()); + result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); + result = prime * result + ((getChildOrderId() == null) ? 0 : getChildOrderId().hashCode()); + result = prime * result + ((getRecordNo() == null) ? 0 : getRecordNo().hashCode()); + result = prime * result + ((getSerialNo() == null) ? 0 : getSerialNo().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode()); + result = prime * result + ((getCreatedTime() == null) ? 0 : getCreatedTime().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(", discountPackageTitle=").append(discountPackageTitle); + sb.append(", discountPackageId=").append(discountPackageId); + sb.append(", orderId=").append(orderId); + sb.append(", childOrderId=").append(childOrderId); + sb.append(", recordNo=").append(recordNo); + sb.append(", serialNo=").append(serialNo); + sb.append(", type=").append(type); + sb.append(", userId=").append(userId); + sb.append(", userPhone=").append(userPhone); + sb.append(", createdTime=").append(createdTime); + 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/service/src/main/java/com/hfkj/entity/CouponDiscountPackageRecordExample.java b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageRecordExample.java new file mode 100644 index 0000000..3bc5d62 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountPackageRecordExample.java @@ -0,0 +1,1193 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CouponDiscountPackageRecordExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CouponDiscountPackageRecordExample() { + 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIsNull() { + addCriterion("discount_package_title is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIsNotNull() { + addCriterion("discount_package_title is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleEqualTo(String value) { + addCriterion("discount_package_title =", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotEqualTo(String value) { + addCriterion("discount_package_title <>", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleGreaterThan(String value) { + addCriterion("discount_package_title >", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleGreaterThanOrEqualTo(String value) { + addCriterion("discount_package_title >=", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLessThan(String value) { + addCriterion("discount_package_title <", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLessThanOrEqualTo(String value) { + addCriterion("discount_package_title <=", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleLike(String value) { + addCriterion("discount_package_title like", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotLike(String value) { + addCriterion("discount_package_title not like", value, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleIn(List values) { + addCriterion("discount_package_title in", values, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotIn(List values) { + addCriterion("discount_package_title not in", values, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleBetween(String value1, String value2) { + addCriterion("discount_package_title between", value1, value2, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageTitleNotBetween(String value1, String value2) { + addCriterion("discount_package_title not between", value1, value2, "discountPackageTitle"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNull() { + addCriterion("discount_package_id is null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIsNotNull() { + addCriterion("discount_package_id is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdEqualTo(Integer value) { + addCriterion("discount_package_id =", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotEqualTo(Integer value) { + addCriterion("discount_package_id <>", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThan(Integer value) { + addCriterion("discount_package_id >", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdGreaterThanOrEqualTo(Integer value) { + addCriterion("discount_package_id >=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThan(Integer value) { + addCriterion("discount_package_id <", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdLessThanOrEqualTo(Integer value) { + addCriterion("discount_package_id <=", value, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdIn(List values) { + addCriterion("discount_package_id in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotIn(List values) { + addCriterion("discount_package_id not in", values, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdBetween(Integer value1, Integer value2) { + addCriterion("discount_package_id between", value1, value2, "discountPackageId"); + return (Criteria) this; + } + + public Criteria andDiscountPackageIdNotBetween(Integer value1, Integer value2) { + addCriterion("discount_package_id not between", value1, value2, "discountPackageId"); + 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(Integer value) { + addCriterion("order_id =", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotEqualTo(Integer value) { + addCriterion("order_id <>", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThan(Integer value) { + addCriterion("order_id >", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdGreaterThanOrEqualTo(Integer value) { + addCriterion("order_id >=", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThan(Integer value) { + addCriterion("order_id <", value, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdLessThanOrEqualTo(Integer 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(Integer value1, Integer value2) { + addCriterion("order_id between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andOrderIdNotBetween(Integer value1, Integer value2) { + addCriterion("order_id not between", value1, value2, "orderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIsNull() { + addCriterion("child_order_id is null"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIsNotNull() { + addCriterion("child_order_id is not null"); + return (Criteria) this; + } + + public Criteria andChildOrderIdEqualTo(Integer value) { + addCriterion("child_order_id =", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotEqualTo(Integer value) { + addCriterion("child_order_id <>", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdGreaterThan(Integer value) { + addCriterion("child_order_id >", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdGreaterThanOrEqualTo(Integer value) { + addCriterion("child_order_id >=", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdLessThan(Integer value) { + addCriterion("child_order_id <", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdLessThanOrEqualTo(Integer value) { + addCriterion("child_order_id <=", value, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdIn(List values) { + addCriterion("child_order_id in", values, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotIn(List values) { + addCriterion("child_order_id not in", values, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdBetween(Integer value1, Integer value2) { + addCriterion("child_order_id between", value1, value2, "childOrderId"); + return (Criteria) this; + } + + public Criteria andChildOrderIdNotBetween(Integer value1, Integer value2) { + addCriterion("child_order_id not between", value1, value2, "childOrderId"); + return (Criteria) this; + } + + public Criteria andRecordNoIsNull() { + addCriterion("record_no is null"); + return (Criteria) this; + } + + public Criteria andRecordNoIsNotNull() { + addCriterion("record_no is not null"); + return (Criteria) this; + } + + public Criteria andRecordNoEqualTo(String value) { + addCriterion("record_no =", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoNotEqualTo(String value) { + addCriterion("record_no <>", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoGreaterThan(String value) { + addCriterion("record_no >", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoGreaterThanOrEqualTo(String value) { + addCriterion("record_no >=", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoLessThan(String value) { + addCriterion("record_no <", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoLessThanOrEqualTo(String value) { + addCriterion("record_no <=", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoLike(String value) { + addCriterion("record_no like", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoNotLike(String value) { + addCriterion("record_no not like", value, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoIn(List values) { + addCriterion("record_no in", values, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoNotIn(List values) { + addCriterion("record_no not in", values, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoBetween(String value1, String value2) { + addCriterion("record_no between", value1, value2, "recordNo"); + return (Criteria) this; + } + + public Criteria andRecordNoNotBetween(String value1, String value2) { + addCriterion("record_no not between", value1, value2, "recordNo"); + return (Criteria) this; + } + + public Criteria andSerialNoIsNull() { + addCriterion("serial_no is null"); + return (Criteria) this; + } + + public Criteria andSerialNoIsNotNull() { + addCriterion("serial_no is not null"); + return (Criteria) this; + } + + public Criteria andSerialNoEqualTo(String value) { + addCriterion("serial_no =", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoNotEqualTo(String value) { + addCriterion("serial_no <>", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoGreaterThan(String value) { + addCriterion("serial_no >", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoGreaterThanOrEqualTo(String value) { + addCriterion("serial_no >=", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoLessThan(String value) { + addCriterion("serial_no <", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoLessThanOrEqualTo(String value) { + addCriterion("serial_no <=", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoLike(String value) { + addCriterion("serial_no like", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoNotLike(String value) { + addCriterion("serial_no not like", value, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoIn(List values) { + addCriterion("serial_no in", values, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoNotIn(List values) { + addCriterion("serial_no not in", values, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoBetween(String value1, String value2) { + addCriterion("serial_no between", value1, value2, "serialNo"); + return (Criteria) this; + } + + public Criteria andSerialNoNotBetween(String value1, String value2) { + addCriterion("serial_no not between", value1, value2, "serialNo"); + return (Criteria) this; + } + + public Criteria andTypeIsNull() { + addCriterion("`type` is null"); + return (Criteria) this; + } + + public Criteria andTypeIsNotNull() { + addCriterion("`type` is not null"); + return (Criteria) this; + } + + public Criteria andTypeEqualTo(Integer value) { + addCriterion("`type` =", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotEqualTo(Integer value) { + addCriterion("`type` <>", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThan(Integer value) { + addCriterion("`type` >", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("`type` >=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThan(Integer value) { + addCriterion("`type` <", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeLessThanOrEqualTo(Integer value) { + addCriterion("`type` <=", value, "type"); + return (Criteria) this; + } + + public Criteria andTypeIn(List values) { + addCriterion("`type` in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotIn(List values) { + addCriterion("`type` not in", values, "type"); + return (Criteria) this; + } + + public Criteria andTypeBetween(Integer value1, Integer value2) { + addCriterion("`type` between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andTypeNotBetween(Integer value1, Integer value2) { + addCriterion("`type` not between", value1, value2, "type"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Integer value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Integer value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Integer value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Integer value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Integer value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Integer value1, Integer value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Integer value1, Integer value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNull() { + addCriterion("user_phone is null"); + return (Criteria) this; + } + + public Criteria andUserPhoneIsNotNull() { + addCriterion("user_phone is not null"); + return (Criteria) this; + } + + public Criteria andUserPhoneEqualTo(String value) { + addCriterion("user_phone =", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotEqualTo(String value) { + addCriterion("user_phone <>", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThan(String value) { + addCriterion("user_phone >", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneGreaterThanOrEqualTo(String value) { + addCriterion("user_phone >=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThan(String value) { + addCriterion("user_phone <", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLessThanOrEqualTo(String value) { + addCriterion("user_phone <=", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneLike(String value) { + addCriterion("user_phone like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotLike(String value) { + addCriterion("user_phone not like", value, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneIn(List values) { + addCriterion("user_phone in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotIn(List values) { + addCriterion("user_phone not in", values, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneBetween(String value1, String value2) { + addCriterion("user_phone between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andUserPhoneNotBetween(String value1, String value2) { + addCriterion("user_phone not between", value1, value2, "userPhone"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNull() { + addCriterion("created_time is null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIsNotNull() { + addCriterion("created_time is not null"); + return (Criteria) this; + } + + public Criteria andCreatedTimeEqualTo(Date value) { + addCriterion("created_time =", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotEqualTo(Date value) { + addCriterion("created_time <>", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThan(Date value) { + addCriterion("created_time >", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeGreaterThanOrEqualTo(Date value) { + addCriterion("created_time >=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThan(Date value) { + addCriterion("created_time <", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeLessThanOrEqualTo(Date value) { + addCriterion("created_time <=", value, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeIn(List values) { + addCriterion("created_time in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotIn(List values) { + addCriterion("created_time not in", values, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeBetween(Date value1, Date value2) { + addCriterion("created_time between", value1, value2, "createdTime"); + return (Criteria) this; + } + + public Criteria andCreatedTimeNotBetween(Date value1, Date value2) { + addCriterion("created_time not between", value1, value2, "createdTime"); + 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/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java new file mode 100644 index 0000000..a47f8a9 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRel.java @@ -0,0 +1,297 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * coupon_discount_user_rel + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class CouponDiscountUserRel implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 优惠券id + */ + private Long discountId; + + /** + * 优惠券名称 + */ + private String discountName; + + /** + * 优惠券图片 + */ + private String discountImg; + + /** + * 卡卷类型 1:满减 2:抵扣 3:折扣 + */ + private Integer discountType; + + /** + * 优惠券条件(满减价格) + */ + private BigDecimal discountCondition; + + /** + * 优惠券价格 + */ + private BigDecimal discountPrice; + + /** + * 折扣百分比(折扣使用) + */ + private BigDecimal discountPercentage; + + /** + * 用户id + */ + private Long userId; + + /** + * 状态 0:已过期 1:未使用 2:已使用 + */ + private Integer status; + + /** + * 使用时间 + */ + private Date useTime; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 使用截止时间 + */ + private Date useEndTime; + + 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 getDiscountId() { + return discountId; + } + + public void setDiscountId(Long discountId) { + this.discountId = discountId; + } + + public String getDiscountName() { + return discountName; + } + + public void setDiscountName(String discountName) { + this.discountName = discountName; + } + + public String getDiscountImg() { + return discountImg; + } + + public void setDiscountImg(String discountImg) { + this.discountImg = discountImg; + } + + public Integer getDiscountType() { + return discountType; + } + + public void setDiscountType(Integer discountType) { + this.discountType = discountType; + } + + public BigDecimal getDiscountCondition() { + return discountCondition; + } + + public void setDiscountCondition(BigDecimal discountCondition) { + this.discountCondition = discountCondition; + } + + public BigDecimal getDiscountPrice() { + return discountPrice; + } + + public void setDiscountPrice(BigDecimal discountPrice) { + this.discountPrice = discountPrice; + } + + public BigDecimal getDiscountPercentage() { + return discountPercentage; + } + + public void setDiscountPercentage(BigDecimal discountPercentage) { + this.discountPercentage = discountPercentage; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getUseTime() { + return useTime; + } + + public void setUseTime(Date useTime) { + this.useTime = useTime; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUseEndTime() { + return useEndTime; + } + + public void setUseEndTime(Date useEndTime) { + this.useEndTime = useEndTime; + } + + 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; + } + CouponDiscountUserRel other = (CouponDiscountUserRel) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getDiscountId() == null ? other.getDiscountId() == null : this.getDiscountId().equals(other.getDiscountId())) + && (this.getDiscountName() == null ? other.getDiscountName() == null : this.getDiscountName().equals(other.getDiscountName())) + && (this.getDiscountImg() == null ? other.getDiscountImg() == null : this.getDiscountImg().equals(other.getDiscountImg())) + && (this.getDiscountType() == null ? other.getDiscountType() == null : this.getDiscountType().equals(other.getDiscountType())) + && (this.getDiscountCondition() == null ? other.getDiscountCondition() == null : this.getDiscountCondition().equals(other.getDiscountCondition())) + && (this.getDiscountPrice() == null ? other.getDiscountPrice() == null : this.getDiscountPrice().equals(other.getDiscountPrice())) + && (this.getDiscountPercentage() == null ? other.getDiscountPercentage() == null : this.getDiscountPercentage().equals(other.getDiscountPercentage())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getUseTime() == null ? other.getUseTime() == null : this.getUseTime().equals(other.getUseTime())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUseEndTime() == null ? other.getUseEndTime() == null : this.getUseEndTime().equals(other.getUseEndTime())) + && (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 + ((getDiscountId() == null) ? 0 : getDiscountId().hashCode()); + result = prime * result + ((getDiscountName() == null) ? 0 : getDiscountName().hashCode()); + result = prime * result + ((getDiscountImg() == null) ? 0 : getDiscountImg().hashCode()); + result = prime * result + ((getDiscountType() == null) ? 0 : getDiscountType().hashCode()); + result = prime * result + ((getDiscountCondition() == null) ? 0 : getDiscountCondition().hashCode()); + result = prime * result + ((getDiscountPrice() == null) ? 0 : getDiscountPrice().hashCode()); + result = prime * result + ((getDiscountPercentage() == null) ? 0 : getDiscountPercentage().hashCode()); + result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getUseTime() == null) ? 0 : getUseTime().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUseEndTime() == null) ? 0 : getUseEndTime().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(", discountId=").append(discountId); + sb.append(", discountName=").append(discountName); + sb.append(", discountImg=").append(discountImg); + sb.append(", discountType=").append(discountType); + sb.append(", discountCondition=").append(discountCondition); + sb.append(", discountPrice=").append(discountPrice); + sb.append(", discountPercentage=").append(discountPercentage); + sb.append(", userId=").append(userId); + sb.append(", status=").append(status); + sb.append(", useTime=").append(useTime); + sb.append(", createTime=").append(createTime); + sb.append(", useEndTime=").append(useEndTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java new file mode 100644 index 0000000..ce91cd0 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/CouponDiscountUserRelExample.java @@ -0,0 +1,1234 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class CouponDiscountUserRelExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public CouponDiscountUserRelExample() { + 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 andDiscountIdIsNull() { + addCriterion("discount_id is null"); + return (Criteria) this; + } + + public Criteria andDiscountIdIsNotNull() { + addCriterion("discount_id is not null"); + return (Criteria) this; + } + + public Criteria andDiscountIdEqualTo(Long value) { + addCriterion("discount_id =", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdNotEqualTo(Long value) { + addCriterion("discount_id <>", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdGreaterThan(Long value) { + addCriterion("discount_id >", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdGreaterThanOrEqualTo(Long value) { + addCriterion("discount_id >=", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdLessThan(Long value) { + addCriterion("discount_id <", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdLessThanOrEqualTo(Long value) { + addCriterion("discount_id <=", value, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdIn(List values) { + addCriterion("discount_id in", values, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdNotIn(List values) { + addCriterion("discount_id not in", values, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdBetween(Long value1, Long value2) { + addCriterion("discount_id between", value1, value2, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountIdNotBetween(Long value1, Long value2) { + addCriterion("discount_id not between", value1, value2, "discountId"); + return (Criteria) this; + } + + public Criteria andDiscountNameIsNull() { + addCriterion("discount_name is null"); + return (Criteria) this; + } + + public Criteria andDiscountNameIsNotNull() { + addCriterion("discount_name is not null"); + return (Criteria) this; + } + + public Criteria andDiscountNameEqualTo(String value) { + addCriterion("discount_name =", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotEqualTo(String value) { + addCriterion("discount_name <>", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameGreaterThan(String value) { + addCriterion("discount_name >", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameGreaterThanOrEqualTo(String value) { + addCriterion("discount_name >=", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameLessThan(String value) { + addCriterion("discount_name <", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameLessThanOrEqualTo(String value) { + addCriterion("discount_name <=", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameLike(String value) { + addCriterion("discount_name like", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotLike(String value) { + addCriterion("discount_name not like", value, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameIn(List values) { + addCriterion("discount_name in", values, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotIn(List values) { + addCriterion("discount_name not in", values, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameBetween(String value1, String value2) { + addCriterion("discount_name between", value1, value2, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountNameNotBetween(String value1, String value2) { + addCriterion("discount_name not between", value1, value2, "discountName"); + return (Criteria) this; + } + + public Criteria andDiscountImgIsNull() { + addCriterion("discount_img is null"); + return (Criteria) this; + } + + public Criteria andDiscountImgIsNotNull() { + addCriterion("discount_img is not null"); + return (Criteria) this; + } + + public Criteria andDiscountImgEqualTo(String value) { + addCriterion("discount_img =", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgNotEqualTo(String value) { + addCriterion("discount_img <>", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgGreaterThan(String value) { + addCriterion("discount_img >", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgGreaterThanOrEqualTo(String value) { + addCriterion("discount_img >=", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgLessThan(String value) { + addCriterion("discount_img <", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgLessThanOrEqualTo(String value) { + addCriterion("discount_img <=", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgLike(String value) { + addCriterion("discount_img like", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgNotLike(String value) { + addCriterion("discount_img not like", value, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgIn(List values) { + addCriterion("discount_img in", values, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgNotIn(List values) { + addCriterion("discount_img not in", values, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgBetween(String value1, String value2) { + addCriterion("discount_img between", value1, value2, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountImgNotBetween(String value1, String value2) { + addCriterion("discount_img not between", value1, value2, "discountImg"); + return (Criteria) this; + } + + public Criteria andDiscountTypeIsNull() { + addCriterion("discount_type is null"); + return (Criteria) this; + } + + public Criteria andDiscountTypeIsNotNull() { + addCriterion("discount_type is not null"); + return (Criteria) this; + } + + public Criteria andDiscountTypeEqualTo(Integer value) { + addCriterion("discount_type =", value, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeNotEqualTo(Integer value) { + addCriterion("discount_type <>", value, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeGreaterThan(Integer value) { + addCriterion("discount_type >", value, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeGreaterThanOrEqualTo(Integer value) { + addCriterion("discount_type >=", value, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeLessThan(Integer value) { + addCriterion("discount_type <", value, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeLessThanOrEqualTo(Integer value) { + addCriterion("discount_type <=", value, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeIn(List values) { + addCriterion("discount_type in", values, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeNotIn(List values) { + addCriterion("discount_type not in", values, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeBetween(Integer value1, Integer value2) { + addCriterion("discount_type between", value1, value2, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountTypeNotBetween(Integer value1, Integer value2) { + addCriterion("discount_type not between", value1, value2, "discountType"); + return (Criteria) this; + } + + public Criteria andDiscountConditionIsNull() { + addCriterion("discount_condition is null"); + return (Criteria) this; + } + + public Criteria andDiscountConditionIsNotNull() { + addCriterion("discount_condition is not null"); + return (Criteria) this; + } + + public Criteria andDiscountConditionEqualTo(BigDecimal value) { + addCriterion("discount_condition =", value, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionNotEqualTo(BigDecimal value) { + addCriterion("discount_condition <>", value, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionGreaterThan(BigDecimal value) { + addCriterion("discount_condition >", value, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("discount_condition >=", value, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionLessThan(BigDecimal value) { + addCriterion("discount_condition <", value, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionLessThanOrEqualTo(BigDecimal value) { + addCriterion("discount_condition <=", value, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionIn(List values) { + addCriterion("discount_condition in", values, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionNotIn(List values) { + addCriterion("discount_condition not in", values, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("discount_condition between", value1, value2, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountConditionNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("discount_condition not between", value1, value2, "discountCondition"); + return (Criteria) this; + } + + public Criteria andDiscountPriceIsNull() { + addCriterion("discount_price is null"); + return (Criteria) this; + } + + public Criteria andDiscountPriceIsNotNull() { + addCriterion("discount_price is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPriceEqualTo(BigDecimal value) { + addCriterion("discount_price =", value, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceNotEqualTo(BigDecimal value) { + addCriterion("discount_price <>", value, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceGreaterThan(BigDecimal value) { + addCriterion("discount_price >", value, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("discount_price >=", value, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceLessThan(BigDecimal value) { + addCriterion("discount_price <", value, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("discount_price <=", value, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceIn(List values) { + addCriterion("discount_price in", values, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceNotIn(List values) { + addCriterion("discount_price not in", values, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("discount_price between", value1, value2, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("discount_price not between", value1, value2, "discountPrice"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageIsNull() { + addCriterion("discount_percentage is null"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageIsNotNull() { + addCriterion("discount_percentage is not null"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageEqualTo(BigDecimal value) { + addCriterion("discount_percentage =", value, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageNotEqualTo(BigDecimal value) { + addCriterion("discount_percentage <>", value, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageGreaterThan(BigDecimal value) { + addCriterion("discount_percentage >", value, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("discount_percentage >=", value, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageLessThan(BigDecimal value) { + addCriterion("discount_percentage <", value, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageLessThanOrEqualTo(BigDecimal value) { + addCriterion("discount_percentage <=", value, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageIn(List values) { + addCriterion("discount_percentage in", values, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageNotIn(List values) { + addCriterion("discount_percentage not in", values, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("discount_percentage between", value1, value2, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andDiscountPercentageNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("discount_percentage not between", value1, value2, "discountPercentage"); + return (Criteria) this; + } + + public Criteria andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + 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 andUseTimeIsNull() { + addCriterion("use_time is null"); + return (Criteria) this; + } + + public Criteria andUseTimeIsNotNull() { + addCriterion("use_time is not null"); + return (Criteria) this; + } + + public Criteria andUseTimeEqualTo(Date value) { + addCriterion("use_time =", value, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeNotEqualTo(Date value) { + addCriterion("use_time <>", value, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeGreaterThan(Date value) { + addCriterion("use_time >", value, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeGreaterThanOrEqualTo(Date value) { + addCriterion("use_time >=", value, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeLessThan(Date value) { + addCriterion("use_time <", value, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeLessThanOrEqualTo(Date value) { + addCriterion("use_time <=", value, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeIn(List values) { + addCriterion("use_time in", values, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeNotIn(List values) { + addCriterion("use_time not in", values, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeBetween(Date value1, Date value2) { + addCriterion("use_time between", value1, value2, "useTime"); + return (Criteria) this; + } + + public Criteria andUseTimeNotBetween(Date value1, Date value2) { + addCriterion("use_time not between", value1, value2, "useTime"); + 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 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 andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsLogistics.java b/service/src/main/java/com/hfkj/entity/GoodsLogistics.java new file mode 100644 index 0000000..7570f25 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsLogistics.java @@ -0,0 +1,385 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * goods_logistics + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class GoodsLogistics implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 用户id + */ + private Long userId; + + /** + * 订单ID + */ + private Long orderId; + + /** + * 唯一业务号 + */ + private String taskNo; + + /** + * 快递单号 + */ + private String number; + + /** + * 物流状态描述 + */ + private String logisticsStatus; + + /** + * 物流状态描述 + */ + private String logisticsStatusDesc; + + /** + * 运单号物流流转当前最新描述 + */ + private String theLastMessage; + + /** + * 运单号物流流转当前最新变更时间 + */ + private Date theLastTime; + + /** + * 从揽收到送达所耗时间 + */ + private String takeTime; + + /** + * 快递员 + */ + private String courier; + + /** + * 快递员联系方式 + */ + private String courierPhone; + + /** + * 物流明细 + */ + private String logisticsTraceDetails; + + /** + * 快递公司名称 + */ + private String expressCompanyName; + + /** + * 状态:0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 操作人员id + */ + private Long opId; + + /** + * 操作人员名称 + */ + private String opName; + + /** + * ext_1 + */ + private String ext1; + + /** + * ext_2 + */ + private String ext2; + + /** + * ext_3 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Long getOrderId() { + return orderId; + } + + public void setOrderId(Long orderId) { + this.orderId = orderId; + } + + public String getTaskNo() { + return taskNo; + } + + public void setTaskNo(String taskNo) { + this.taskNo = taskNo; + } + + public String getNumber() { + return number; + } + + public void setNumber(String number) { + this.number = number; + } + + public String getLogisticsStatus() { + return logisticsStatus; + } + + public void setLogisticsStatus(String logisticsStatus) { + this.logisticsStatus = logisticsStatus; + } + + public String getLogisticsStatusDesc() { + return logisticsStatusDesc; + } + + public void setLogisticsStatusDesc(String logisticsStatusDesc) { + this.logisticsStatusDesc = logisticsStatusDesc; + } + + public String getTheLastMessage() { + return theLastMessage; + } + + public void setTheLastMessage(String theLastMessage) { + this.theLastMessage = theLastMessage; + } + + public Date getTheLastTime() { + return theLastTime; + } + + public void setTheLastTime(Date theLastTime) { + this.theLastTime = theLastTime; + } + + public String getTakeTime() { + return takeTime; + } + + public void setTakeTime(String takeTime) { + this.takeTime = takeTime; + } + + public String getCourier() { + return courier; + } + + public void setCourier(String courier) { + this.courier = courier; + } + + public String getCourierPhone() { + return courierPhone; + } + + public void setCourierPhone(String courierPhone) { + this.courierPhone = courierPhone; + } + + public String getLogisticsTraceDetails() { + return logisticsTraceDetails; + } + + public void setLogisticsTraceDetails(String logisticsTraceDetails) { + this.logisticsTraceDetails = logisticsTraceDetails; + } + + public String getExpressCompanyName() { + return expressCompanyName; + } + + public void setExpressCompanyName(String expressCompanyName) { + this.expressCompanyName = expressCompanyName; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Long getOpId() { + return opId; + } + + public void setOpId(Long opId) { + this.opId = opId; + } + + public String getOpName() { + return opName; + } + + public void setOpName(String opName) { + this.opName = opName; + } + + 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; + } + GoodsLogistics other = (GoodsLogistics) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId())) + && (this.getTaskNo() == null ? other.getTaskNo() == null : this.getTaskNo().equals(other.getTaskNo())) + && (this.getNumber() == null ? other.getNumber() == null : this.getNumber().equals(other.getNumber())) + && (this.getLogisticsStatus() == null ? other.getLogisticsStatus() == null : this.getLogisticsStatus().equals(other.getLogisticsStatus())) + && (this.getLogisticsStatusDesc() == null ? other.getLogisticsStatusDesc() == null : this.getLogisticsStatusDesc().equals(other.getLogisticsStatusDesc())) + && (this.getTheLastMessage() == null ? other.getTheLastMessage() == null : this.getTheLastMessage().equals(other.getTheLastMessage())) + && (this.getTheLastTime() == null ? other.getTheLastTime() == null : this.getTheLastTime().equals(other.getTheLastTime())) + && (this.getTakeTime() == null ? other.getTakeTime() == null : this.getTakeTime().equals(other.getTakeTime())) + && (this.getCourier() == null ? other.getCourier() == null : this.getCourier().equals(other.getCourier())) + && (this.getCourierPhone() == null ? other.getCourierPhone() == null : this.getCourierPhone().equals(other.getCourierPhone())) + && (this.getLogisticsTraceDetails() == null ? other.getLogisticsTraceDetails() == null : this.getLogisticsTraceDetails().equals(other.getLogisticsTraceDetails())) + && (this.getExpressCompanyName() == null ? other.getExpressCompanyName() == null : this.getExpressCompanyName().equals(other.getExpressCompanyName())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) + && (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) + && (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode()); + result = prime * result + ((getTaskNo() == null) ? 0 : getTaskNo().hashCode()); + result = prime * result + ((getNumber() == null) ? 0 : getNumber().hashCode()); + result = prime * result + ((getLogisticsStatus() == null) ? 0 : getLogisticsStatus().hashCode()); + result = prime * result + ((getLogisticsStatusDesc() == null) ? 0 : getLogisticsStatusDesc().hashCode()); + result = prime * result + ((getTheLastMessage() == null) ? 0 : getTheLastMessage().hashCode()); + result = prime * result + ((getTheLastTime() == null) ? 0 : getTheLastTime().hashCode()); + result = prime * result + ((getTakeTime() == null) ? 0 : getTakeTime().hashCode()); + result = prime * result + ((getCourier() == null) ? 0 : getCourier().hashCode()); + result = prime * result + ((getCourierPhone() == null) ? 0 : getCourierPhone().hashCode()); + result = prime * result + ((getLogisticsTraceDetails() == null) ? 0 : getLogisticsTraceDetails().hashCode()); + result = prime * result + ((getExpressCompanyName() == null) ? 0 : getExpressCompanyName().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); + result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", userId=").append(userId); + sb.append(", orderId=").append(orderId); + sb.append(", taskNo=").append(taskNo); + sb.append(", number=").append(number); + sb.append(", logisticsStatus=").append(logisticsStatus); + sb.append(", logisticsStatusDesc=").append(logisticsStatusDesc); + sb.append(", theLastMessage=").append(theLastMessage); + sb.append(", theLastTime=").append(theLastTime); + sb.append(", takeTime=").append(takeTime); + sb.append(", courier=").append(courier); + sb.append(", courierPhone=").append(courierPhone); + sb.append(", logisticsTraceDetails=").append(logisticsTraceDetails); + sb.append(", expressCompanyName=").append(expressCompanyName); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", opId=").append(opId); + sb.append(", opName=").append(opName); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsLogisticsExample.java b/service/src/main/java/com/hfkj/entity/GoodsLogisticsExample.java new file mode 100644 index 0000000..ba2c9cc --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsLogisticsExample.java @@ -0,0 +1,1623 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GoodsLogisticsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public GoodsLogisticsExample() { + 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 andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + 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 andTaskNoIsNull() { + addCriterion("task_no is null"); + return (Criteria) this; + } + + public Criteria andTaskNoIsNotNull() { + addCriterion("task_no is not null"); + return (Criteria) this; + } + + public Criteria andTaskNoEqualTo(String value) { + addCriterion("task_no =", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoNotEqualTo(String value) { + addCriterion("task_no <>", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoGreaterThan(String value) { + addCriterion("task_no >", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoGreaterThanOrEqualTo(String value) { + addCriterion("task_no >=", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoLessThan(String value) { + addCriterion("task_no <", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoLessThanOrEqualTo(String value) { + addCriterion("task_no <=", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoLike(String value) { + addCriterion("task_no like", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoNotLike(String value) { + addCriterion("task_no not like", value, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoIn(List values) { + addCriterion("task_no in", values, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoNotIn(List values) { + addCriterion("task_no not in", values, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoBetween(String value1, String value2) { + addCriterion("task_no between", value1, value2, "taskNo"); + return (Criteria) this; + } + + public Criteria andTaskNoNotBetween(String value1, String value2) { + addCriterion("task_no not between", value1, value2, "taskNo"); + return (Criteria) this; + } + + public Criteria andNumberIsNull() { + addCriterion("`number` is null"); + return (Criteria) this; + } + + public Criteria andNumberIsNotNull() { + addCriterion("`number` is not null"); + return (Criteria) this; + } + + public Criteria andNumberEqualTo(String value) { + addCriterion("`number` =", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotEqualTo(String value) { + addCriterion("`number` <>", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberGreaterThan(String value) { + addCriterion("`number` >", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberGreaterThanOrEqualTo(String value) { + addCriterion("`number` >=", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLessThan(String value) { + addCriterion("`number` <", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLessThanOrEqualTo(String value) { + addCriterion("`number` <=", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberLike(String value) { + addCriterion("`number` like", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotLike(String value) { + addCriterion("`number` not like", value, "number"); + return (Criteria) this; + } + + public Criteria andNumberIn(List values) { + addCriterion("`number` in", values, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotIn(List values) { + addCriterion("`number` not in", values, "number"); + return (Criteria) this; + } + + public Criteria andNumberBetween(String value1, String value2) { + addCriterion("`number` between", value1, value2, "number"); + return (Criteria) this; + } + + public Criteria andNumberNotBetween(String value1, String value2) { + addCriterion("`number` not between", value1, value2, "number"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusIsNull() { + addCriterion("logistics_status is null"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusIsNotNull() { + addCriterion("logistics_status is not null"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusEqualTo(String value) { + addCriterion("logistics_status =", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusNotEqualTo(String value) { + addCriterion("logistics_status <>", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusGreaterThan(String value) { + addCriterion("logistics_status >", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusGreaterThanOrEqualTo(String value) { + addCriterion("logistics_status >=", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusLessThan(String value) { + addCriterion("logistics_status <", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusLessThanOrEqualTo(String value) { + addCriterion("logistics_status <=", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusLike(String value) { + addCriterion("logistics_status like", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusNotLike(String value) { + addCriterion("logistics_status not like", value, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusIn(List values) { + addCriterion("logistics_status in", values, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusNotIn(List values) { + addCriterion("logistics_status not in", values, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusBetween(String value1, String value2) { + addCriterion("logistics_status between", value1, value2, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusNotBetween(String value1, String value2) { + addCriterion("logistics_status not between", value1, value2, "logisticsStatus"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescIsNull() { + addCriterion("logistics_status_desc is null"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescIsNotNull() { + addCriterion("logistics_status_desc is not null"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescEqualTo(String value) { + addCriterion("logistics_status_desc =", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescNotEqualTo(String value) { + addCriterion("logistics_status_desc <>", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescGreaterThan(String value) { + addCriterion("logistics_status_desc >", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescGreaterThanOrEqualTo(String value) { + addCriterion("logistics_status_desc >=", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescLessThan(String value) { + addCriterion("logistics_status_desc <", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescLessThanOrEqualTo(String value) { + addCriterion("logistics_status_desc <=", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescLike(String value) { + addCriterion("logistics_status_desc like", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescNotLike(String value) { + addCriterion("logistics_status_desc not like", value, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescIn(List values) { + addCriterion("logistics_status_desc in", values, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescNotIn(List values) { + addCriterion("logistics_status_desc not in", values, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescBetween(String value1, String value2) { + addCriterion("logistics_status_desc between", value1, value2, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andLogisticsStatusDescNotBetween(String value1, String value2) { + addCriterion("logistics_status_desc not between", value1, value2, "logisticsStatusDesc"); + return (Criteria) this; + } + + public Criteria andTheLastMessageIsNull() { + addCriterion("the_last_message is null"); + return (Criteria) this; + } + + public Criteria andTheLastMessageIsNotNull() { + addCriterion("the_last_message is not null"); + return (Criteria) this; + } + + public Criteria andTheLastMessageEqualTo(String value) { + addCriterion("the_last_message =", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageNotEqualTo(String value) { + addCriterion("the_last_message <>", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageGreaterThan(String value) { + addCriterion("the_last_message >", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageGreaterThanOrEqualTo(String value) { + addCriterion("the_last_message >=", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageLessThan(String value) { + addCriterion("the_last_message <", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageLessThanOrEqualTo(String value) { + addCriterion("the_last_message <=", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageLike(String value) { + addCriterion("the_last_message like", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageNotLike(String value) { + addCriterion("the_last_message not like", value, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageIn(List values) { + addCriterion("the_last_message in", values, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageNotIn(List values) { + addCriterion("the_last_message not in", values, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageBetween(String value1, String value2) { + addCriterion("the_last_message between", value1, value2, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastMessageNotBetween(String value1, String value2) { + addCriterion("the_last_message not between", value1, value2, "theLastMessage"); + return (Criteria) this; + } + + public Criteria andTheLastTimeIsNull() { + addCriterion("the_last_time is null"); + return (Criteria) this; + } + + public Criteria andTheLastTimeIsNotNull() { + addCriterion("the_last_time is not null"); + return (Criteria) this; + } + + public Criteria andTheLastTimeEqualTo(Date value) { + addCriterion("the_last_time =", value, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeNotEqualTo(Date value) { + addCriterion("the_last_time <>", value, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeGreaterThan(Date value) { + addCriterion("the_last_time >", value, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeGreaterThanOrEqualTo(Date value) { + addCriterion("the_last_time >=", value, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeLessThan(Date value) { + addCriterion("the_last_time <", value, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeLessThanOrEqualTo(Date value) { + addCriterion("the_last_time <=", value, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeIn(List values) { + addCriterion("the_last_time in", values, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeNotIn(List values) { + addCriterion("the_last_time not in", values, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeBetween(Date value1, Date value2) { + addCriterion("the_last_time between", value1, value2, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTheLastTimeNotBetween(Date value1, Date value2) { + addCriterion("the_last_time not between", value1, value2, "theLastTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeIsNull() { + addCriterion("take_time is null"); + return (Criteria) this; + } + + public Criteria andTakeTimeIsNotNull() { + addCriterion("take_time is not null"); + return (Criteria) this; + } + + public Criteria andTakeTimeEqualTo(String value) { + addCriterion("take_time =", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeNotEqualTo(String value) { + addCriterion("take_time <>", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeGreaterThan(String value) { + addCriterion("take_time >", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeGreaterThanOrEqualTo(String value) { + addCriterion("take_time >=", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeLessThan(String value) { + addCriterion("take_time <", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeLessThanOrEqualTo(String value) { + addCriterion("take_time <=", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeLike(String value) { + addCriterion("take_time like", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeNotLike(String value) { + addCriterion("take_time not like", value, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeIn(List values) { + addCriterion("take_time in", values, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeNotIn(List values) { + addCriterion("take_time not in", values, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeBetween(String value1, String value2) { + addCriterion("take_time between", value1, value2, "takeTime"); + return (Criteria) this; + } + + public Criteria andTakeTimeNotBetween(String value1, String value2) { + addCriterion("take_time not between", value1, value2, "takeTime"); + return (Criteria) this; + } + + public Criteria andCourierIsNull() { + addCriterion("courier is null"); + return (Criteria) this; + } + + public Criteria andCourierIsNotNull() { + addCriterion("courier is not null"); + return (Criteria) this; + } + + public Criteria andCourierEqualTo(String value) { + addCriterion("courier =", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierNotEqualTo(String value) { + addCriterion("courier <>", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierGreaterThan(String value) { + addCriterion("courier >", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierGreaterThanOrEqualTo(String value) { + addCriterion("courier >=", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierLessThan(String value) { + addCriterion("courier <", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierLessThanOrEqualTo(String value) { + addCriterion("courier <=", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierLike(String value) { + addCriterion("courier like", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierNotLike(String value) { + addCriterion("courier not like", value, "courier"); + return (Criteria) this; + } + + public Criteria andCourierIn(List values) { + addCriterion("courier in", values, "courier"); + return (Criteria) this; + } + + public Criteria andCourierNotIn(List values) { + addCriterion("courier not in", values, "courier"); + return (Criteria) this; + } + + public Criteria andCourierBetween(String value1, String value2) { + addCriterion("courier between", value1, value2, "courier"); + return (Criteria) this; + } + + public Criteria andCourierNotBetween(String value1, String value2) { + addCriterion("courier not between", value1, value2, "courier"); + return (Criteria) this; + } + + public Criteria andCourierPhoneIsNull() { + addCriterion("courier_phone is null"); + return (Criteria) this; + } + + public Criteria andCourierPhoneIsNotNull() { + addCriterion("courier_phone is not null"); + return (Criteria) this; + } + + public Criteria andCourierPhoneEqualTo(String value) { + addCriterion("courier_phone =", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneNotEqualTo(String value) { + addCriterion("courier_phone <>", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneGreaterThan(String value) { + addCriterion("courier_phone >", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneGreaterThanOrEqualTo(String value) { + addCriterion("courier_phone >=", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneLessThan(String value) { + addCriterion("courier_phone <", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneLessThanOrEqualTo(String value) { + addCriterion("courier_phone <=", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneLike(String value) { + addCriterion("courier_phone like", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneNotLike(String value) { + addCriterion("courier_phone not like", value, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneIn(List values) { + addCriterion("courier_phone in", values, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneNotIn(List values) { + addCriterion("courier_phone not in", values, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneBetween(String value1, String value2) { + addCriterion("courier_phone between", value1, value2, "courierPhone"); + return (Criteria) this; + } + + public Criteria andCourierPhoneNotBetween(String value1, String value2) { + addCriterion("courier_phone not between", value1, value2, "courierPhone"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsIsNull() { + addCriterion("logistics_trace_details is null"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsIsNotNull() { + addCriterion("logistics_trace_details is not null"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsEqualTo(String value) { + addCriterion("logistics_trace_details =", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsNotEqualTo(String value) { + addCriterion("logistics_trace_details <>", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsGreaterThan(String value) { + addCriterion("logistics_trace_details >", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsGreaterThanOrEqualTo(String value) { + addCriterion("logistics_trace_details >=", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsLessThan(String value) { + addCriterion("logistics_trace_details <", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsLessThanOrEqualTo(String value) { + addCriterion("logistics_trace_details <=", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsLike(String value) { + addCriterion("logistics_trace_details like", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsNotLike(String value) { + addCriterion("logistics_trace_details not like", value, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsIn(List values) { + addCriterion("logistics_trace_details in", values, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsNotIn(List values) { + addCriterion("logistics_trace_details not in", values, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsBetween(String value1, String value2) { + addCriterion("logistics_trace_details between", value1, value2, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andLogisticsTraceDetailsNotBetween(String value1, String value2) { + addCriterion("logistics_trace_details not between", value1, value2, "logisticsTraceDetails"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameIsNull() { + addCriterion("express_company_name is null"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameIsNotNull() { + addCriterion("express_company_name is not null"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameEqualTo(String value) { + addCriterion("express_company_name =", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameNotEqualTo(String value) { + addCriterion("express_company_name <>", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameGreaterThan(String value) { + addCriterion("express_company_name >", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameGreaterThanOrEqualTo(String value) { + addCriterion("express_company_name >=", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameLessThan(String value) { + addCriterion("express_company_name <", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameLessThanOrEqualTo(String value) { + addCriterion("express_company_name <=", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameLike(String value) { + addCriterion("express_company_name like", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameNotLike(String value) { + addCriterion("express_company_name not like", value, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameIn(List values) { + addCriterion("express_company_name in", values, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameNotIn(List values) { + addCriterion("express_company_name not in", values, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameBetween(String value1, String value2) { + addCriterion("express_company_name between", value1, value2, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andExpressCompanyNameNotBetween(String value1, String value2) { + addCriterion("express_company_name not between", value1, value2, "expressCompanyName"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andOpIdIsNull() { + addCriterion("op_id is null"); + return (Criteria) this; + } + + public Criteria andOpIdIsNotNull() { + addCriterion("op_id is not null"); + return (Criteria) this; + } + + public Criteria andOpIdEqualTo(Long value) { + addCriterion("op_id =", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotEqualTo(Long value) { + addCriterion("op_id <>", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThan(Long value) { + addCriterion("op_id >", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_id >=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThan(Long value) { + addCriterion("op_id <", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThanOrEqualTo(Long value) { + addCriterion("op_id <=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdIn(List values) { + addCriterion("op_id in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotIn(List values) { + addCriterion("op_id not in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdBetween(Long value1, Long value2) { + addCriterion("op_id between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotBetween(Long value1, Long value2) { + addCriterion("op_id not between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpNameIsNull() { + addCriterion("op_name is null"); + return (Criteria) this; + } + + public Criteria andOpNameIsNotNull() { + addCriterion("op_name is not null"); + return (Criteria) this; + } + + public Criteria andOpNameEqualTo(String value) { + addCriterion("op_name =", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotEqualTo(String value) { + addCriterion("op_name <>", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThan(String value) { + addCriterion("op_name >", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThanOrEqualTo(String value) { + addCriterion("op_name >=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThan(String value) { + addCriterion("op_name <", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThanOrEqualTo(String value) { + addCriterion("op_name <=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLike(String value) { + addCriterion("op_name like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotLike(String value) { + addCriterion("op_name not like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameIn(List values) { + addCriterion("op_name in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotIn(List values) { + addCriterion("op_name not in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameBetween(String value1, String value2) { + addCriterion("op_name between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotBetween(String value1, String value2) { + addCriterion("op_name not between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsShoppingCart.java b/service/src/main/java/com/hfkj/entity/GoodsShoppingCart.java index 740cc0c..a6eb078 100644 --- a/service/src/main/java/com/hfkj/entity/GoodsShoppingCart.java +++ b/service/src/main/java/com/hfkj/entity/GoodsShoppingCart.java @@ -24,6 +24,11 @@ public class GoodsShoppingCart implements Serializable { */ private Long goodsId; + /** + * 类型:1.实物商品 2.虚拟商品 + */ + private Integer goodsType; + /** * 用户编号 */ @@ -127,6 +132,14 @@ public class GoodsShoppingCart implements Serializable { this.goodsId = goodsId; } + public Integer getGoodsType() { + return goodsType; + } + + public void setGoodsType(Integer goodsType) { + this.goodsType = goodsType; + } + public Long getUserId() { return userId; } @@ -277,6 +290,7 @@ public class GoodsShoppingCart implements Serializable { GoodsShoppingCart other = (GoodsShoppingCart) that; return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) && (this.getGoodsId() == null ? other.getGoodsId() == null : this.getGoodsId().equals(other.getGoodsId())) + && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) && (this.getImg() == null ? other.getImg() == null : this.getImg().equals(other.getImg())) @@ -302,6 +316,7 @@ public class GoodsShoppingCart implements Serializable { int result = 1; result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode()); result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); result = prime * result + ((getImg() == null) ? 0 : getImg().hashCode()); @@ -330,6 +345,7 @@ public class GoodsShoppingCart implements Serializable { sb.append("Hash = ").append(hashCode()); sb.append(", id=").append(id); sb.append(", goodsId=").append(goodsId); + sb.append(", goodsType=").append(goodsType); sb.append(", userId=").append(userId); sb.append(", title=").append(title); sb.append(", img=").append(img); @@ -351,4 +367,4 @@ public class GoodsShoppingCart implements Serializable { sb.append("]"); return sb.toString(); } -} \ No newline at end of file +} diff --git a/service/src/main/java/com/hfkj/entity/GoodsShoppingCartExample.java b/service/src/main/java/com/hfkj/entity/GoodsShoppingCartExample.java index ca73ada..0f9166b 100644 --- a/service/src/main/java/com/hfkj/entity/GoodsShoppingCartExample.java +++ b/service/src/main/java/com/hfkj/entity/GoodsShoppingCartExample.java @@ -246,6 +246,66 @@ public class GoodsShoppingCartExample { 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 andUserIdIsNull() { addCriterion("user_id is null"); return (Criteria) this; @@ -1431,4 +1491,4 @@ public class GoodsShoppingCartExample { this(condition, value, secondValue, null); } } -} \ No newline at end of file +} diff --git a/service/src/main/java/com/hfkj/entity/GoodsUserAddress.java b/service/src/main/java/com/hfkj/entity/GoodsUserAddress.java new file mode 100644 index 0000000..3958434 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsUserAddress.java @@ -0,0 +1,289 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * goods_user_address + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class GoodsUserAddress implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 用户编码 + */ + private Long userId; + + /** + * 收货人 + */ + private String consignee; + + /** + * 联系电话 + */ + private String phone; + + /** + * 详细地址 + */ + private String address; + + /** + * 区域编码 + */ + private String regionId; + + /** + * 区域名称 + */ + private String regionName; + + /** + * 是否默认地址 + */ + private Boolean whetherDefault; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 操作人员id + */ + private Long opId; + + /** + * 操作人员名称 + */ + private String opName; + + /** + * ext_1 + */ + private String ext1; + + /** + * ext_2 + */ + private String ext2; + + /** + * ext_3 + */ + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getConsignee() { + return consignee; + } + + public void setConsignee(String consignee) { + this.consignee = consignee; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getRegionId() { + return regionId; + } + + public void setRegionId(String regionId) { + this.regionId = regionId; + } + + public String getRegionName() { + return regionName; + } + + public void setRegionName(String regionName) { + this.regionName = regionName; + } + + public Boolean getWhetherDefault() { + return whetherDefault; + } + + public void setWhetherDefault(Boolean whetherDefault) { + this.whetherDefault = whetherDefault; + } + + 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 getOpId() { + return opId; + } + + public void setOpId(Long opId) { + this.opId = opId; + } + + public String getOpName() { + return opName; + } + + public void setOpName(String opName) { + this.opName = opName; + } + + 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; + } + GoodsUserAddress other = (GoodsUserAddress) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId())) + && (this.getConsignee() == null ? other.getConsignee() == null : this.getConsignee().equals(other.getConsignee())) + && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone())) + && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress())) + && (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId())) + && (this.getRegionName() == null ? other.getRegionName() == null : this.getRegionName().equals(other.getRegionName())) + && (this.getWhetherDefault() == null ? other.getWhetherDefault() == null : this.getWhetherDefault().equals(other.getWhetherDefault())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId())) + && (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName())) + && (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 + ((getUserId() == null) ? 0 : getUserId().hashCode()); + result = prime * result + ((getConsignee() == null) ? 0 : getConsignee().hashCode()); + result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode()); + result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode()); + result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode()); + result = prime * result + ((getRegionName() == null) ? 0 : getRegionName().hashCode()); + result = prime * result + ((getWhetherDefault() == null) ? 0 : getWhetherDefault().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode()); + result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", userId=").append(userId); + sb.append(", consignee=").append(consignee); + sb.append(", phone=").append(phone); + sb.append(", address=").append(address); + sb.append(", regionId=").append(regionId); + sb.append(", regionName=").append(regionName); + sb.append(", whetherDefault=").append(whetherDefault); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", opId=").append(opId); + sb.append(", opName=").append(opName); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsUserAddressExample.java b/service/src/main/java/com/hfkj/entity/GoodsUserAddressExample.java new file mode 100644 index 0000000..d83a7e6 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsUserAddressExample.java @@ -0,0 +1,1213 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GoodsUserAddressExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public GoodsUserAddressExample() { + 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 andUserIdIsNull() { + addCriterion("user_id is null"); + return (Criteria) this; + } + + public Criteria andUserIdIsNotNull() { + addCriterion("user_id is not null"); + return (Criteria) this; + } + + public Criteria andUserIdEqualTo(Long value) { + addCriterion("user_id =", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotEqualTo(Long value) { + addCriterion("user_id <>", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThan(Long value) { + addCriterion("user_id >", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdGreaterThanOrEqualTo(Long value) { + addCriterion("user_id >=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThan(Long value) { + addCriterion("user_id <", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdLessThanOrEqualTo(Long value) { + addCriterion("user_id <=", value, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdIn(List values) { + addCriterion("user_id in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotIn(List values) { + addCriterion("user_id not in", values, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdBetween(Long value1, Long value2) { + addCriterion("user_id between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andUserIdNotBetween(Long value1, Long value2) { + addCriterion("user_id not between", value1, value2, "userId"); + return (Criteria) this; + } + + public Criteria andConsigneeIsNull() { + addCriterion("consignee is null"); + return (Criteria) this; + } + + public Criteria andConsigneeIsNotNull() { + addCriterion("consignee is not null"); + return (Criteria) this; + } + + public Criteria andConsigneeEqualTo(String value) { + addCriterion("consignee =", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotEqualTo(String value) { + addCriterion("consignee <>", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeGreaterThan(String value) { + addCriterion("consignee >", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeGreaterThanOrEqualTo(String value) { + addCriterion("consignee >=", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeLessThan(String value) { + addCriterion("consignee <", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeLessThanOrEqualTo(String value) { + addCriterion("consignee <=", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeLike(String value) { + addCriterion("consignee like", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotLike(String value) { + addCriterion("consignee not like", value, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeIn(List values) { + addCriterion("consignee in", values, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotIn(List values) { + addCriterion("consignee not in", values, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeBetween(String value1, String value2) { + addCriterion("consignee between", value1, value2, "consignee"); + return (Criteria) this; + } + + public Criteria andConsigneeNotBetween(String value1, String value2) { + addCriterion("consignee not between", value1, value2, "consignee"); + return (Criteria) this; + } + + public Criteria andPhoneIsNull() { + addCriterion("phone is null"); + return (Criteria) this; + } + + public Criteria andPhoneIsNotNull() { + addCriterion("phone is not null"); + return (Criteria) this; + } + + public Criteria andPhoneEqualTo(String value) { + addCriterion("phone =", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotEqualTo(String value) { + addCriterion("phone <>", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThan(String value) { + addCriterion("phone >", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneGreaterThanOrEqualTo(String value) { + addCriterion("phone >=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThan(String value) { + addCriterion("phone <", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLessThanOrEqualTo(String value) { + addCriterion("phone <=", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneLike(String value) { + addCriterion("phone like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotLike(String value) { + addCriterion("phone not like", value, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneIn(List values) { + addCriterion("phone in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotIn(List values) { + addCriterion("phone not in", values, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneBetween(String value1, String value2) { + addCriterion("phone between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andPhoneNotBetween(String value1, String value2) { + addCriterion("phone not between", value1, value2, "phone"); + return (Criteria) this; + } + + public Criteria andAddressIsNull() { + addCriterion("address is null"); + return (Criteria) this; + } + + public Criteria andAddressIsNotNull() { + addCriterion("address is not null"); + return (Criteria) this; + } + + public Criteria andAddressEqualTo(String value) { + addCriterion("address =", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotEqualTo(String value) { + addCriterion("address <>", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThan(String value) { + addCriterion("address >", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressGreaterThanOrEqualTo(String value) { + addCriterion("address >=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThan(String value) { + addCriterion("address <", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLessThanOrEqualTo(String value) { + addCriterion("address <=", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressLike(String value) { + addCriterion("address like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotLike(String value) { + addCriterion("address not like", value, "address"); + return (Criteria) this; + } + + public Criteria andAddressIn(List values) { + addCriterion("address in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotIn(List values) { + addCriterion("address not in", values, "address"); + return (Criteria) this; + } + + public Criteria andAddressBetween(String value1, String value2) { + addCriterion("address between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andAddressNotBetween(String value1, String value2) { + addCriterion("address not between", value1, value2, "address"); + return (Criteria) this; + } + + public Criteria andRegionIdIsNull() { + addCriterion("region_id is null"); + return (Criteria) this; + } + + public Criteria andRegionIdIsNotNull() { + addCriterion("region_id is not null"); + return (Criteria) this; + } + + public Criteria andRegionIdEqualTo(String value) { + addCriterion("region_id =", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotEqualTo(String value) { + addCriterion("region_id <>", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdGreaterThan(String value) { + addCriterion("region_id >", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdGreaterThanOrEqualTo(String value) { + addCriterion("region_id >=", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdLessThan(String value) { + addCriterion("region_id <", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdLessThanOrEqualTo(String value) { + addCriterion("region_id <=", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdLike(String value) { + addCriterion("region_id like", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotLike(String value) { + addCriterion("region_id not like", value, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdIn(List values) { + addCriterion("region_id in", values, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotIn(List values) { + addCriterion("region_id not in", values, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdBetween(String value1, String value2) { + addCriterion("region_id between", value1, value2, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionIdNotBetween(String value1, String value2) { + addCriterion("region_id not between", value1, value2, "regionId"); + return (Criteria) this; + } + + public Criteria andRegionNameIsNull() { + addCriterion("region_name is null"); + return (Criteria) this; + } + + public Criteria andRegionNameIsNotNull() { + addCriterion("region_name is not null"); + return (Criteria) this; + } + + public Criteria andRegionNameEqualTo(String value) { + addCriterion("region_name =", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotEqualTo(String value) { + addCriterion("region_name <>", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameGreaterThan(String value) { + addCriterion("region_name >", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameGreaterThanOrEqualTo(String value) { + addCriterion("region_name >=", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameLessThan(String value) { + addCriterion("region_name <", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameLessThanOrEqualTo(String value) { + addCriterion("region_name <=", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameLike(String value) { + addCriterion("region_name like", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotLike(String value) { + addCriterion("region_name not like", value, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameIn(List values) { + addCriterion("region_name in", values, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotIn(List values) { + addCriterion("region_name not in", values, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameBetween(String value1, String value2) { + addCriterion("region_name between", value1, value2, "regionName"); + return (Criteria) this; + } + + public Criteria andRegionNameNotBetween(String value1, String value2) { + addCriterion("region_name not between", value1, value2, "regionName"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultIsNull() { + addCriterion("whether_default is null"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultIsNotNull() { + addCriterion("whether_default is not null"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultEqualTo(Boolean value) { + addCriterion("whether_default =", value, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultNotEqualTo(Boolean value) { + addCriterion("whether_default <>", value, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultGreaterThan(Boolean value) { + addCriterion("whether_default >", value, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultGreaterThanOrEqualTo(Boolean value) { + addCriterion("whether_default >=", value, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultLessThan(Boolean value) { + addCriterion("whether_default <", value, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultLessThanOrEqualTo(Boolean value) { + addCriterion("whether_default <=", value, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultIn(List values) { + addCriterion("whether_default in", values, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultNotIn(List values) { + addCriterion("whether_default not in", values, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultBetween(Boolean value1, Boolean value2) { + addCriterion("whether_default between", value1, value2, "whetherDefault"); + return (Criteria) this; + } + + public Criteria andWhetherDefaultNotBetween(Boolean value1, Boolean value2) { + addCriterion("whether_default not between", value1, value2, "whetherDefault"); + 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 andOpIdIsNull() { + addCriterion("op_id is null"); + return (Criteria) this; + } + + public Criteria andOpIdIsNotNull() { + addCriterion("op_id is not null"); + return (Criteria) this; + } + + public Criteria andOpIdEqualTo(Long value) { + addCriterion("op_id =", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotEqualTo(Long value) { + addCriterion("op_id <>", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThan(Long value) { + addCriterion("op_id >", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdGreaterThanOrEqualTo(Long value) { + addCriterion("op_id >=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThan(Long value) { + addCriterion("op_id <", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdLessThanOrEqualTo(Long value) { + addCriterion("op_id <=", value, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdIn(List values) { + addCriterion("op_id in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotIn(List values) { + addCriterion("op_id not in", values, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdBetween(Long value1, Long value2) { + addCriterion("op_id between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpIdNotBetween(Long value1, Long value2) { + addCriterion("op_id not between", value1, value2, "opId"); + return (Criteria) this; + } + + public Criteria andOpNameIsNull() { + addCriterion("op_name is null"); + return (Criteria) this; + } + + public Criteria andOpNameIsNotNull() { + addCriterion("op_name is not null"); + return (Criteria) this; + } + + public Criteria andOpNameEqualTo(String value) { + addCriterion("op_name =", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotEqualTo(String value) { + addCriterion("op_name <>", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThan(String value) { + addCriterion("op_name >", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameGreaterThanOrEqualTo(String value) { + addCriterion("op_name >=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThan(String value) { + addCriterion("op_name <", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLessThanOrEqualTo(String value) { + addCriterion("op_name <=", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameLike(String value) { + addCriterion("op_name like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotLike(String value) { + addCriterion("op_name not like", value, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameIn(List values) { + addCriterion("op_name in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotIn(List values) { + addCriterion("op_name not in", values, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameBetween(String value1, String value2) { + addCriterion("op_name between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andOpNameNotBetween(String value1, String value2) { + addCriterion("op_name not between", value1, value2, "opName"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/service/CommonService.java b/service/src/main/java/com/hfkj/service/CommonService.java new file mode 100644 index 0000000..32f1154 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/CommonService.java @@ -0,0 +1,32 @@ +package com.hfkj.service; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.entity.BsCity; + +import java.util.List; + +public interface CommonService { + + /** + * @Author Sum1Dream + * @name getCityList.java + * @Description // 查询所有城市 + * @Date 10:06 2022/7/4 + * @Param [cityName] + * @return + */ + List getCityList(Long parentId); + + + /** + * @Author Sum1Dream + * @Name getRegional + * @Description // 获取区域信息 + * @Date 16:56 2023/4/13 + * @Param [] + * @Return com.alibaba.fastjson.JSONObject + */ + List getCity(String code , String name , String child); + + +} diff --git a/service/src/main/java/com/hfkj/service/discount/CouponDiscountPackageService.java b/service/src/main/java/com/hfkj/service/discount/CouponDiscountPackageService.java new file mode 100644 index 0000000..c1055d1 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/discount/CouponDiscountPackageService.java @@ -0,0 +1,71 @@ +package com.hfkj.service.discount; + +import com.hfkj.entity.CouponDiscount; +import com.hfkj.entity.CouponDiscountPackage; + +import java.util.List; +import java.util.Map; + +public interface CouponDiscountPackageService { + + /** + * @Author Sum1Dream + * @Name create + * @Description // 创建 + * @Date 15:11 2024/4/19 + * @Param CouponDiscount + * @return void + */ + void create(CouponDiscountPackage discountPackage); + + /** + * @Author Sum1Dream + * @Name update + * @Description // 修改 + * @Date 15:12 2024/4/19 + * @Param CouponDiscount + * @return void + */ + void update(CouponDiscountPackage discountPackage); + + /** + * @Author Sum1Dream + * @Name delete + * @Description // 修改 + * @Date 15:12 2024/4/19 + * @Param id + * @return void + */ + void delete(Long id , Boolean fullDelete); + + /** + * @Author Sum1Dream + * @Name queryDetail + * @Description // 根据ID查询详情 + * @Date 15:12 2024/4/19 + * @Param id + * @return com.hfkj.entity.CouponDiscount + */ + CouponDiscountPackage queryDetail(Long id); + + /** + * @Author Sum1Dream + * @Name queryDetailByMap + * @Description // 根据多条件查询 + * @Date 15:12 2024/4/19 + * @Param map + * @return com.hfkj.entity.CouponDiscount + */ + CouponDiscountPackage queryDetailByMap(Map map); + + /** + * @Author Sum1Dream + * @Name getList + * @Description // 根据多条件查询列表 + * @Date 15:13 2024/4/19 + * @Param map + * @return java.util.List + */ + List getList(Map map); + +} diff --git a/service/src/main/java/com/hfkj/service/goods/GoodsShoppingCartService.java b/service/src/main/java/com/hfkj/service/goods/GoodsShoppingCartService.java index 267ca42..e24e2a5 100644 --- a/service/src/main/java/com/hfkj/service/goods/GoodsShoppingCartService.java +++ b/service/src/main/java/com/hfkj/service/goods/GoodsShoppingCartService.java @@ -35,7 +35,7 @@ public interface GoodsShoppingCartService { * @Param id * @return void */ - void delete(Long id , Boolean fullDelete); + void delete(Long id); /** * @Author Sum1Dream diff --git a/service/src/main/java/com/hfkj/service/goods/GoodsUserAddressService.java b/service/src/main/java/com/hfkj/service/goods/GoodsUserAddressService.java new file mode 100644 index 0000000..3ffa7f1 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/goods/GoodsUserAddressService.java @@ -0,0 +1,77 @@ +package com.hfkj.service.goods; +import com.hfkj.entity.GoodsUserAddress; +import java.util.List; +import java.util.Map; + +public interface GoodsUserAddressService { + + /** + * @Author Sum1Dream + * @Name create + * @Description // 创建 + * @Date 15:11 2024/4/19 + * @Param GoodsBrand + * @return void + */ + void create(GoodsUserAddress goodsUserAddress); + + /** + * @Author Sum1Dream + * @Name update + * @Description // 修改 + * @Date 15:12 2024/4/19 + * @Param GoodsBrand + * @return void + */ + void update(GoodsUserAddress goodsUserAddress); + + /** + * @Author Sum1Dream + * @Name delete + * @Description // 修改 + * @Date 15:12 2024/4/19 + * @Param id + * @return void + */ + void delete(Long id); + + /** + * @Author Sum1Dream + * @Name queryDetail + * @Description // 根据ID查询产品类型详情 + * @Date 15:12 2024/4/19 + * @Param id + * @return com.hfkj.entity.GoodsBrand + */ + GoodsUserAddress queryDetail(Long id); + + /** + * @Author Sum1Dream + * @Name queryDetailByMap + * @Description // 根据多条件查询产品类型 + * @Date 15:12 2024/4/19 + * @Param map + * @return com.hfkj.entity.GoodsBrand + */ + GoodsUserAddress queryDetailByMap(Map map); + + /** + * @Author Sum1Dream + * @Name getList + * @Description // 根据多条件查询列表 + * @Date 15:13 2024/4/19 + * @Param map + * @return java.util.List + */ + List getList(Map map); + + /** + * @Author Sum1Dream + * @Name cleanDeliveryAddressDefault + * @Description // 清空所有的默认收货地址 + * @Date 10:33 2023/4/17 + * @Param [userId] + * @Return void + */ + void cleanDeliveryAddressDefault(Long userId); +} diff --git a/service/src/main/java/com/hfkj/service/goods/impl/GoodsShoppingCartServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/GoodsShoppingCartServiceImpl.java index 7f1d9f0..553382e 100644 --- a/service/src/main/java/com/hfkj/service/goods/impl/GoodsShoppingCartServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/goods/impl/GoodsShoppingCartServiceImpl.java @@ -30,16 +30,8 @@ public class GoodsShoppingCartServiceImpl implements GoodsShoppingCartService { } @Override - public void delete(Long id, Boolean fullDelete) { - if (fullDelete) { - goodsShoppingCartMapper.deleteByPrimaryKey(id); - } else { - GoodsShoppingCart shoppingCart = queryDetail(id); - shoppingCart.setStatus(0); - shoppingCart.setUpdateTime(new Date()); - update(shoppingCart); - } - + public void delete(Long id) { + goodsShoppingCartMapper.deleteByPrimaryKey(id); } @Override diff --git a/service/src/main/java/com/hfkj/service/goods/impl/GoodsUserAddressServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/GoodsUserAddressServiceImpl.java new file mode 100644 index 0000000..048aedd --- /dev/null +++ b/service/src/main/java/com/hfkj/service/goods/impl/GoodsUserAddressServiceImpl.java @@ -0,0 +1,71 @@ +package com.hfkj.service.goods.impl; + +import com.hfkj.dao.GoodsUserAddressMapper; +import com.hfkj.entity.GoodsUserAddress; +import com.hfkj.entity.GoodsUserAddressExample; +import com.hfkj.service.goods.GoodsUserAddressService; +import org.apache.commons.collections4.MapUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +@Service("goodsUserAddressService") +public class GoodsUserAddressServiceImpl implements GoodsUserAddressService { + + @Resource + private GoodsUserAddressMapper goodsUserAddressMapper; + + @Override + public void create(GoodsUserAddress goodsUserAddress) { + goodsUserAddressMapper.insert(goodsUserAddress); + } + + @Override + public void update(GoodsUserAddress goodsUserAddress) { + goodsUserAddressMapper.updateByPrimaryKeySelective(goodsUserAddress); + } + + @Override + public void delete(Long id) { + goodsUserAddressMapper.deleteByPrimaryKey(id); + } + + @Override + public GoodsUserAddress queryDetail(Long id) { + return goodsUserAddressMapper.selectByPrimaryKey(id); + } + + @Override + public GoodsUserAddress queryDetailByMap(Map map) { + return null; + } + + @Override + public List getList(Map map) { + GoodsUserAddressExample example = new GoodsUserAddressExample(); + GoodsUserAddressExample.Criteria criteria = example.createCriteria(); + + if (MapUtils.getLong(map, "userId") != null) { + criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId")); + } + return goodsUserAddressMapper.selectByExample(example); + } + + @Override + public void cleanDeliveryAddressDefault(Long userId) { + Map map = new HashMap<>(); + map.put("userId" , userId); + List list = getList(map); + + if (list.size()>1) { + for (GoodsUserAddress deliveryAddress : list) { + deliveryAddress.setWhetherDefault(false); + update(deliveryAddress); + } + } + } +} diff --git a/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java b/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java new file mode 100644 index 0000000..80aadd3 --- /dev/null +++ b/service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java @@ -0,0 +1,83 @@ +package com.hfkj.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.hfkj.dao.BsCityMapper; +import com.hfkj.entity.BsCity; +import com.hfkj.entity.BsCityExample; +import com.hfkj.service.CommonService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; + +import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +@Service("commonService") +public class CommonServiceImpl implements CommonService { + + @Resource + private BsCityMapper bsCityMapper; + + @Override + public List getCityList(Long parentId) { + BsCityExample example = new BsCityExample(); + BsCityExample.Criteria criteria = example.createCriteria(); + + if (parentId != null) { + criteria.andParentIdEqualTo(parentId); + }else { + criteria.andParentIdIsNull(); + } + criteria.andStatusEqualTo(1); + + return bsCityMapper.selectByExample(example); + } + + @Override + public List getCity(String code, String name, String child) { + + // 获取父类 + List regionListParent = getCityList(null); + + List jsonProvince = new ArrayList<>(); + + for (BsCity bsCity : regionListParent) { + JSONObject provinceObject = new JSONObject(); + provinceObject.put(code , bsCity.getRegionId()); + provinceObject.put(name , bsCity.getRegionName()); + + List cityList = getCityList(bsCity.getRegionId()); + + if (cityList.size() > 0) { + List jsonCity = new ArrayList<>(); + for (BsCity city : cityList) { + JSONObject objectCity = new JSONObject(); + objectCity.put(code , city.getRegionId()); + objectCity.put(name , city.getRegionName()); + + List areaList = getCityList(city.getRegionId()); + + if (areaList.size() > 0 ) { + List jsonArea = new ArrayList<>(); + for (BsCity area : areaList) { + JSONObject objectArea = new JSONObject(); + objectArea.put(code , area.getRegionId()); + objectArea.put(name , area.getRegionName()); + objectArea.put("isLeaf" , true); + jsonArea.add(objectArea); + } + objectCity.put(child , jsonArea); + } + jsonCity.add(objectCity); + } + provinceObject.put(child , jsonCity); + + } + jsonProvince.add(provinceObject); + + } + + return jsonProvince; + } +}