From 64d8e6942fc37a64a6af0729d3f88f75ea72a9b2 Mon Sep 17 00:00:00 2001 From: yuanye <418471657@qq.com> Date: Wed, 8 May 2024 16:10:21 +0800 Subject: [PATCH] Changes --- .../goods/GoodsBrandController.java | 76 +- .../com/hfkj/common/exception/ErrorCode.java | 3 +- .../java/com/hfkj/dao/GoodsMsgMapper.java | 158 ++ .../java/com/hfkj/dao/GoodsMsgMapperExt.java | 7 + .../com/hfkj/dao/GoodsMsgSqlProvider.java | 444 +++++ .../java/com/hfkj/dao/GoodsSpecsMapper.java | 138 ++ .../com/hfkj/dao/GoodsSpecsMapperExt.java | 7 + .../com/hfkj/dao/GoodsSpecsSqlProvider.java | 374 ++++ .../java/com/hfkj/dao/GoodsVpdMapper.java | 125 ++ .../java/com/hfkj/dao/GoodsVpdMapperExt.java | 7 + .../com/hfkj/dao/GoodsVpdSqlProvider.java | 332 ++++ .../main/java/com/hfkj/entity/GoodsMsg.java | 369 ++++ .../java/com/hfkj/entity/GoodsMsgExample.java | 1543 +++++++++++++++++ .../main/java/com/hfkj/entity/GoodsSpecs.java | 290 ++++ .../com/hfkj/entity/GoodsSpecsExample.java | 1184 +++++++++++++ .../main/java/com/hfkj/entity/GoodsVpd.java | 232 +++ .../java/com/hfkj/entity/GoodsVpdExample.java | 983 +++++++++++ .../goods/impl/GoodsBrandServiceImpl.java | 13 +- 18 files changed, 6232 insertions(+), 53 deletions(-) create mode 100644 service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsMsgMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsSpecsMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsVpdMapper.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsVpdMapperExt.java create mode 100644 service/src/main/java/com/hfkj/dao/GoodsVpdSqlProvider.java create mode 100644 service/src/main/java/com/hfkj/entity/GoodsMsg.java create mode 100644 service/src/main/java/com/hfkj/entity/GoodsMsgExample.java create mode 100644 service/src/main/java/com/hfkj/entity/GoodsSpecs.java create mode 100644 service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java create mode 100644 service/src/main/java/com/hfkj/entity/GoodsVpd.java create mode 100644 service/src/main/java/com/hfkj/entity/GoodsVpdExample.java diff --git a/bweb/src/main/java/com/bweb/controller/goods/GoodsBrandController.java b/bweb/src/main/java/com/bweb/controller/goods/GoodsBrandController.java index e250a47..336bb9e 100644 --- a/bweb/src/main/java/com/bweb/controller/goods/GoodsBrandController.java +++ b/bweb/src/main/java/com/bweb/controller/goods/GoodsBrandController.java @@ -1,5 +1,7 @@ package com.bweb.controller.goods; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; import com.hfkj.common.exception.ErrorCode; import com.hfkj.common.exception.ErrorHelp; import com.hfkj.common.exception.SysCode; @@ -7,7 +9,6 @@ import com.hfkj.common.security.SessionObject; import com.hfkj.common.security.UserCenter; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.GoodsBrand; -import com.hfkj.model.GoodsBrandModel; import com.hfkj.model.ResponseData; import com.hfkj.model.SecUserSessionObject; import com.hfkj.service.goods.GoodsBrandService; @@ -40,7 +41,7 @@ public class GoodsBrandController { @RequestMapping(value="/editGoodsBrand",method = RequestMethod.POST) @ResponseBody - @ApiOperation(value = "编辑商品类型") + @ApiOperation(value = "编辑商品品牌") public ResponseData editGoodsBrand(@RequestBody GoodsBrand body, HttpServletRequest request) { SessionObject sessionObject = userCenter.getSessionObject(request); @@ -52,74 +53,48 @@ public class GoodsBrandController { throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } - GoodsBrand GoodsBrand; + GoodsBrand goodsBrand; if (body.getId() != null) { - // 查询商品类型 - GoodsBrand = goodsBrandService.queryDetail(body.getId()); - if (GoodsBrand == null) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); + // 查询品牌 + goodsBrand = goodsBrandService.queryDetail(body.getId()); + if (goodsBrand == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.CONTENT_NOT_FOUND, ""); } } else { - GoodsBrand = new GoodsBrand(); - GoodsBrand.setCreateTime(new Date()); + goodsBrand = new GoodsBrand(); + goodsBrand.setCreateTime(new Date()); } - GoodsBrand.setUpdateTime(new Date()); - GoodsBrand.setStatus(1); - GoodsBrand.setTitle(body.getTitle()); - GoodsBrand.setParentId(body.getParentId()); - GoodsBrand.setBusinessType(body.getBusinessType()); - GoodsBrand.setImgUrl(body.getImgUrl()); - GoodsBrand.setOpId(userModel.getAccount().getId()); - GoodsBrand.setOpName(userModel.getAccount().getUserName()); + goodsBrand.setUpdateTime(new Date()); + goodsBrand.setStatus(1); + goodsBrand.setTitle(body.getTitle()); + goodsBrand.setImgUrl(body.getImgUrl()); + goodsBrand.setOpId(userModel.getAccount().getId()); + goodsBrand.setOpName(userModel.getAccount().getUserName()); if (body.getId() != null) { - GoodsBrandService.update(GoodsBrand); + goodsBrandService.update(goodsBrand); } else { - GoodsBrandService.create(GoodsBrand); + goodsBrandService.create(goodsBrand); } return ResponseMsgUtil.success("操作成功"); } - @RequestMapping(value="/getList",method = RequestMethod.GET) + @RequestMapping(value="/getListBrand",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询列表") - public ResponseData getList() { - try { - - - List list = GoodsBrandService.getList(new HashMap<>()); - - List GoodsBrandModels = GoodsBrandService.getGoodsBrandModelList(list); - - - return ResponseMsgUtil.success(GoodsBrandModels); - - } catch (Exception e) { - log.error("error!",e); - return ResponseMsgUtil.exception(e); - } - } - - @RequestMapping(value="/delete",method = RequestMethod.GET) - @ResponseBody - @ApiOperation(value = "删除") - public ResponseData delete(@RequestParam(value = "id" , required = false) Long id) { + public ResponseData getListBrand(@RequestParam(value = "title" , required = false) String title, + @RequestParam(value = "pageNum" , required = true) Integer pageNum, + @RequestParam(value = "pageSize" , required = true) Integer pageSize) { try { Map map = new HashMap<>(); - map.put("parentId" , id); - List list = GoodsBrandService.getList(map); + map.put("title", title); - if (!list.isEmpty()) { - throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "存在下级分类,不可删除!"); - } - - GoodsBrandService.delete(id , false); - - return ResponseMsgUtil.success("删除成功"); + PageHelper.startPage(pageNum, pageSize); + return ResponseMsgUtil.success(new PageInfo<>(goodsBrandService.getList(map))); } catch (Exception e) { log.error("error!",e); @@ -127,4 +102,5 @@ public class GoodsBrandController { } } + } diff --git a/service/src/main/java/com/hfkj/common/exception/ErrorCode.java b/service/src/main/java/com/hfkj/common/exception/ErrorCode.java index 857c7aa..00b155f 100644 --- a/service/src/main/java/com/hfkj/common/exception/ErrorCode.java +++ b/service/src/main/java/com/hfkj/common/exception/ErrorCode.java @@ -24,10 +24,9 @@ public enum ErrorCode { //////////////////业务异常///////////// COMMON_ERROR("2000",""), REQ_PARAMS_ERROR("2001","请求参数校验失败"), - CONTENT_ERROR("2001","请求参数校验失败"), ACCOUNT_LOGIN_EXPIRE("2002","登录账户已过期"), ACCOUNT_LOGIN_NOT("2003","账户未登录"), - + CONTENT_NOT_FOUND("2004","未查询到相关内容"), UNKNOW_ERROR("999999","未知异常"), EXCEL_ERROR("80000","Excel处理异常"), diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java b/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java new file mode 100644 index 0000000..d5cc20f --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsMsgMapper.java @@ -0,0 +1,158 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsMsg; +import com.hfkj.entity.GoodsMsgExample; +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 GoodsMsgMapper extends GoodsMsgMapperExt { + @SelectProvider(type=GoodsMsgSqlProvider.class, method="countByExample") + long countByExample(GoodsMsgExample example); + + @DeleteProvider(type=GoodsMsgSqlProvider.class, method="deleteByExample") + int deleteByExample(GoodsMsgExample example); + + @Delete({ + "delete from goods_msg", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into goods_msg (goods_type_name, goods_type, ", + "`type`, goods_brand_name, ", + "goods_brand, goods_label, ", + "goods_explain, title, ", + "list_img, banner_img, ", + "detail_img, `status`, ", + "create_time, update_time, ", + "mer_id, mer_name, ext_1, ", + "ext_2, ext_3)", + "values (#{goodsTypeName,jdbcType=VARCHAR}, #{goodsType,jdbcType=BIGINT}, ", + "#{type,jdbcType=INTEGER}, #{goodsBrandName,jdbcType=VARCHAR}, ", + "#{goodsBrand,jdbcType=INTEGER}, #{goodsLabel,jdbcType=VARCHAR}, ", + "#{goodsExplain,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, ", + "#{listImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ", + "#{detailImg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", + "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", + "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(GoodsMsg record); + + @InsertProvider(type=GoodsMsgSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(GoodsMsg record); + + @SelectProvider(type=GoodsMsgSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_brand", property="goodsBrand", jdbcType=JdbcType.INTEGER), + @Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_explain", property="goodsExplain", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="list_img", property="listImg", jdbcType=JdbcType.VARCHAR), + @Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), + @Result(column="detail_img", property="detailImg", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", 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(GoodsMsgExample example); + + @Select({ + "select", + "id, goods_type_name, goods_type, `type`, goods_brand_name, goods_brand, goods_label, ", + "goods_explain, title, list_img, banner_img, detail_img, `status`, create_time, ", + "update_time, mer_id, mer_name, ext_1, ext_2, ext_3", + "from goods_msg", + "where id = #{id,jdbcType=BIGINT}" + }) + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="goods_type_name", property="goodsTypeName", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_type", property="goodsType", jdbcType=JdbcType.BIGINT), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="goods_brand_name", property="goodsBrandName", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_brand", property="goodsBrand", jdbcType=JdbcType.INTEGER), + @Result(column="goods_label", property="goodsLabel", jdbcType=JdbcType.VARCHAR), + @Result(column="goods_explain", property="goodsExplain", jdbcType=JdbcType.VARCHAR), + @Result(column="title", property="title", jdbcType=JdbcType.VARCHAR), + @Result(column="list_img", property="listImg", jdbcType=JdbcType.VARCHAR), + @Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), + @Result(column="detail_img", property="detailImg", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT), + @Result(column="mer_name", property="merName", 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) + }) + GoodsMsg selectByPrimaryKey(Long id); + + @UpdateProvider(type=GoodsMsgSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") GoodsMsg record, @Param("example") GoodsMsgExample example); + + @UpdateProvider(type=GoodsMsgSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") GoodsMsg record, @Param("example") GoodsMsgExample example); + + @UpdateProvider(type=GoodsMsgSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(GoodsMsg record); + + @Update({ + "update goods_msg", + "set goods_type_name = #{goodsTypeName,jdbcType=VARCHAR},", + "goods_type = #{goodsType,jdbcType=BIGINT},", + "`type` = #{type,jdbcType=INTEGER},", + "goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR},", + "goods_brand = #{goodsBrand,jdbcType=INTEGER},", + "goods_label = #{goodsLabel,jdbcType=VARCHAR},", + "goods_explain = #{goodsExplain,jdbcType=VARCHAR},", + "title = #{title,jdbcType=VARCHAR},", + "list_img = #{listImg,jdbcType=VARCHAR},", + "banner_img = #{bannerImg,jdbcType=VARCHAR},", + "detail_img = #{detailImg,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "mer_id = #{merId,jdbcType=BIGINT},", + "mer_name = #{merName,jdbcType=VARCHAR},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(GoodsMsg record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgMapperExt.java b/service/src/main/java/com/hfkj/dao/GoodsMsgMapperExt.java new file mode 100644 index 0000000..48b083f --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsMsgMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface GoodsMsgMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java new file mode 100644 index 0000000..49e5b31 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsMsgSqlProvider.java @@ -0,0 +1,444 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsMsg; +import com.hfkj.entity.GoodsMsgExample.Criteria; +import com.hfkj.entity.GoodsMsgExample.Criterion; +import com.hfkj.entity.GoodsMsgExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class GoodsMsgSqlProvider { + + public String countByExample(GoodsMsgExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("goods_msg"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(GoodsMsgExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("goods_msg"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(GoodsMsg record) { + SQL sql = new SQL(); + sql.INSERT_INTO("goods_msg"); + + if (record.getGoodsTypeName() != null) { + sql.VALUES("goods_type_name", "#{goodsTypeName,jdbcType=VARCHAR}"); + } + + if (record.getGoodsType() != null) { + sql.VALUES("goods_type", "#{goodsType,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getGoodsBrandName() != null) { + sql.VALUES("goods_brand_name", "#{goodsBrandName,jdbcType=VARCHAR}"); + } + + if (record.getGoodsBrand() != null) { + sql.VALUES("goods_brand", "#{goodsBrand,jdbcType=INTEGER}"); + } + + if (record.getGoodsLabel() != null) { + sql.VALUES("goods_label", "#{goodsLabel,jdbcType=VARCHAR}"); + } + + if (record.getGoodsExplain() != null) { + sql.VALUES("goods_explain", "#{goodsExplain,jdbcType=VARCHAR}"); + } + + if (record.getTitle() != null) { + sql.VALUES("title", "#{title,jdbcType=VARCHAR}"); + } + + if (record.getListImg() != null) { + sql.VALUES("list_img", "#{listImg,jdbcType=VARCHAR}"); + } + + if (record.getBannerImg() != null) { + sql.VALUES("banner_img", "#{bannerImg,jdbcType=VARCHAR}"); + } + + if (record.getDetailImg() != null) { + sql.VALUES("detail_img", "#{detailImg,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getMerId() != null) { + sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.VALUES("mer_name", "#{merName,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(GoodsMsgExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("goods_type_name"); + sql.SELECT("goods_type"); + sql.SELECT("`type`"); + sql.SELECT("goods_brand_name"); + sql.SELECT("goods_brand"); + sql.SELECT("goods_label"); + sql.SELECT("goods_explain"); + sql.SELECT("title"); + sql.SELECT("list_img"); + sql.SELECT("banner_img"); + sql.SELECT("detail_img"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("mer_id"); + sql.SELECT("mer_name"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("goods_msg"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + GoodsMsg record = (GoodsMsg) parameter.get("record"); + GoodsMsgExample example = (GoodsMsgExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("goods_msg"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getGoodsTypeName() != null) { + sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}"); + } + + if (record.getGoodsType() != null) { + sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getGoodsBrandName() != null) { + sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}"); + } + + if (record.getGoodsBrand() != null) { + sql.SET("goods_brand = #{record.goodsBrand,jdbcType=INTEGER}"); + } + + if (record.getGoodsLabel() != null) { + sql.SET("goods_label = #{record.goodsLabel,jdbcType=VARCHAR}"); + } + + if (record.getGoodsExplain() != null) { + sql.SET("goods_explain = #{record.goodsExplain,jdbcType=VARCHAR}"); + } + + if (record.getTitle() != null) { + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + } + + if (record.getListImg() != null) { + sql.SET("list_img = #{record.listImg,jdbcType=VARCHAR}"); + } + + if (record.getBannerImg() != null) { + sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); + } + + if (record.getDetailImg() != null) { + sql.SET("detail_img = #{record.detailImg,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{record.merName,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_msg"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("goods_type_name = #{record.goodsTypeName,jdbcType=VARCHAR}"); + sql.SET("goods_type = #{record.goodsType,jdbcType=BIGINT}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("goods_brand_name = #{record.goodsBrandName,jdbcType=VARCHAR}"); + sql.SET("goods_brand = #{record.goodsBrand,jdbcType=INTEGER}"); + sql.SET("goods_label = #{record.goodsLabel,jdbcType=VARCHAR}"); + sql.SET("goods_explain = #{record.goodsExplain,jdbcType=VARCHAR}"); + sql.SET("title = #{record.title,jdbcType=VARCHAR}"); + sql.SET("list_img = #{record.listImg,jdbcType=VARCHAR}"); + sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); + sql.SET("detail_img = #{record.detailImg,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}"); + sql.SET("mer_name = #{record.merName,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}"); + + GoodsMsgExample example = (GoodsMsgExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(GoodsMsg record) { + SQL sql = new SQL(); + sql.UPDATE("goods_msg"); + + if (record.getGoodsTypeName() != null) { + sql.SET("goods_type_name = #{goodsTypeName,jdbcType=VARCHAR}"); + } + + if (record.getGoodsType() != null) { + sql.SET("goods_type = #{goodsType,jdbcType=BIGINT}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getGoodsBrandName() != null) { + sql.SET("goods_brand_name = #{goodsBrandName,jdbcType=VARCHAR}"); + } + + if (record.getGoodsBrand() != null) { + sql.SET("goods_brand = #{goodsBrand,jdbcType=INTEGER}"); + } + + if (record.getGoodsLabel() != null) { + sql.SET("goods_label = #{goodsLabel,jdbcType=VARCHAR}"); + } + + if (record.getGoodsExplain() != null) { + sql.SET("goods_explain = #{goodsExplain,jdbcType=VARCHAR}"); + } + + if (record.getTitle() != null) { + sql.SET("title = #{title,jdbcType=VARCHAR}"); + } + + if (record.getListImg() != null) { + sql.SET("list_img = #{listImg,jdbcType=VARCHAR}"); + } + + if (record.getBannerImg() != null) { + sql.SET("banner_img = #{bannerImg,jdbcType=VARCHAR}"); + } + + if (record.getDetailImg() != null) { + sql.SET("detail_img = #{detailImg,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getMerId() != null) { + sql.SET("mer_id = #{merId,jdbcType=BIGINT}"); + } + + if (record.getMerName() != null) { + sql.SET("mer_name = #{merName,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, GoodsMsgExample 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/GoodsSpecsMapper.java b/service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java new file mode 100644 index 0000000..6dd0c65 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsSpecsMapper.java @@ -0,0 +1,138 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsSpecs; +import com.hfkj.entity.GoodsSpecsExample; +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 GoodsSpecsMapper extends GoodsSpecsMapperExt { + @SelectProvider(type=GoodsSpecsSqlProvider.class, method="countByExample") + long countByExample(GoodsSpecsExample example); + + @DeleteProvider(type=GoodsSpecsSqlProvider.class, method="deleteByExample") + int deleteByExample(GoodsSpecsExample example); + + @Delete({ + "delete from goods_specs", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into goods_specs (goods_id, `name`, ", + "pur_limit, sale_price, ", + "original_price, stock, ", + "show_img, banner_img, ", + "`status`, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{goodsId,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, ", + "#{purLimit,jdbcType=INTEGER}, #{salePrice,jdbcType=DECIMAL}, ", + "#{originalPrice,jdbcType=DECIMAL}, #{stock,jdbcType=INTEGER}, ", + "#{showImg,jdbcType=VARCHAR}, #{bannerImg,jdbcType=VARCHAR}, ", + "#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(GoodsSpecs record); + + @InsertProvider(type=GoodsSpecsSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(GoodsSpecs record); + + @SelectProvider(type=GoodsSpecsSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="pur_limit", property="purLimit", jdbcType=JdbcType.INTEGER), + @Result(column="sale_price", property="salePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="stock", property="stock", jdbcType=JdbcType.INTEGER), + @Result(column="show_img", property="showImg", jdbcType=JdbcType.VARCHAR), + @Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(GoodsSpecsExample example); + + @Select({ + "select", + "id, goods_id, `name`, pur_limit, sale_price, original_price, stock, show_img, ", + "banner_img, `status`, create_time, update_time, ext_1, ext_2, ext_3", + "from goods_specs", + "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="name", property="name", jdbcType=JdbcType.VARCHAR), + @Result(column="pur_limit", property="purLimit", jdbcType=JdbcType.INTEGER), + @Result(column="sale_price", property="salePrice", jdbcType=JdbcType.DECIMAL), + @Result(column="original_price", property="originalPrice", jdbcType=JdbcType.DECIMAL), + @Result(column="stock", property="stock", jdbcType=JdbcType.INTEGER), + @Result(column="show_img", property="showImg", jdbcType=JdbcType.VARCHAR), + @Result(column="banner_img", property="bannerImg", jdbcType=JdbcType.VARCHAR), + @Result(column="status", property="status", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + GoodsSpecs selectByPrimaryKey(Long id); + + @UpdateProvider(type=GoodsSpecsSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") GoodsSpecs record, @Param("example") GoodsSpecsExample example); + + @UpdateProvider(type=GoodsSpecsSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") GoodsSpecs record, @Param("example") GoodsSpecsExample example); + + @UpdateProvider(type=GoodsSpecsSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(GoodsSpecs record); + + @Update({ + "update goods_specs", + "set goods_id = #{goodsId,jdbcType=BIGINT},", + "`name` = #{name,jdbcType=VARCHAR},", + "pur_limit = #{purLimit,jdbcType=INTEGER},", + "sale_price = #{salePrice,jdbcType=DECIMAL},", + "original_price = #{originalPrice,jdbcType=DECIMAL},", + "stock = #{stock,jdbcType=INTEGER},", + "show_img = #{showImg,jdbcType=VARCHAR},", + "banner_img = #{bannerImg,jdbcType=VARCHAR},", + "`status` = #{status,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(GoodsSpecs record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsSpecsMapperExt.java b/service/src/main/java/com/hfkj/dao/GoodsSpecsMapperExt.java new file mode 100644 index 0000000..eb9e336 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsSpecsMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface GoodsSpecsMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java new file mode 100644 index 0000000..a2fe7dd --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsSpecsSqlProvider.java @@ -0,0 +1,374 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsSpecs; +import com.hfkj.entity.GoodsSpecsExample.Criteria; +import com.hfkj.entity.GoodsSpecsExample.Criterion; +import com.hfkj.entity.GoodsSpecsExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class GoodsSpecsSqlProvider { + + public String countByExample(GoodsSpecsExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("goods_specs"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(GoodsSpecsExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("goods_specs"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(GoodsSpecs record) { + SQL sql = new SQL(); + sql.INSERT_INTO("goods_specs"); + + if (record.getGoodsId() != null) { + sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); + } + + if (record.getName() != null) { + sql.VALUES("`name`", "#{name,jdbcType=VARCHAR}"); + } + + if (record.getPurLimit() != null) { + sql.VALUES("pur_limit", "#{purLimit,jdbcType=INTEGER}"); + } + + if (record.getSalePrice() != null) { + sql.VALUES("sale_price", "#{salePrice,jdbcType=DECIMAL}"); + } + + if (record.getOriginalPrice() != null) { + sql.VALUES("original_price", "#{originalPrice,jdbcType=DECIMAL}"); + } + + if (record.getStock() != null) { + sql.VALUES("stock", "#{stock,jdbcType=INTEGER}"); + } + + if (record.getShowImg() != null) { + sql.VALUES("show_img", "#{showImg,jdbcType=VARCHAR}"); + } + + if (record.getBannerImg() != null) { + sql.VALUES("banner_img", "#{bannerImg,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(GoodsSpecsExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("goods_id"); + sql.SELECT("`name`"); + sql.SELECT("pur_limit"); + sql.SELECT("sale_price"); + sql.SELECT("original_price"); + sql.SELECT("stock"); + sql.SELECT("show_img"); + sql.SELECT("banner_img"); + sql.SELECT("`status`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("goods_specs"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + GoodsSpecs record = (GoodsSpecs) parameter.get("record"); + GoodsSpecsExample example = (GoodsSpecsExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("goods_specs"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + } + + if (record.getPurLimit() != null) { + sql.SET("pur_limit = #{record.purLimit,jdbcType=INTEGER}"); + } + + if (record.getSalePrice() != null) { + sql.SET("sale_price = #{record.salePrice,jdbcType=DECIMAL}"); + } + + if (record.getOriginalPrice() != null) { + sql.SET("original_price = #{record.originalPrice,jdbcType=DECIMAL}"); + } + + if (record.getStock() != null) { + sql.SET("stock = #{record.stock,jdbcType=INTEGER}"); + } + + if (record.getShowImg() != null) { + sql.SET("show_img = #{record.showImg,jdbcType=VARCHAR}"); + } + + if (record.getBannerImg() != null) { + sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("goods_specs"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + sql.SET("`name` = #{record.name,jdbcType=VARCHAR}"); + sql.SET("pur_limit = #{record.purLimit,jdbcType=INTEGER}"); + sql.SET("sale_price = #{record.salePrice,jdbcType=DECIMAL}"); + sql.SET("original_price = #{record.originalPrice,jdbcType=DECIMAL}"); + sql.SET("stock = #{record.stock,jdbcType=INTEGER}"); + sql.SET("show_img = #{record.showImg,jdbcType=VARCHAR}"); + sql.SET("banner_img = #{record.bannerImg,jdbcType=VARCHAR}"); + sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + GoodsSpecsExample example = (GoodsSpecsExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(GoodsSpecs record) { + SQL sql = new SQL(); + sql.UPDATE("goods_specs"); + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); + } + + if (record.getName() != null) { + sql.SET("`name` = #{name,jdbcType=VARCHAR}"); + } + + if (record.getPurLimit() != null) { + sql.SET("pur_limit = #{purLimit,jdbcType=INTEGER}"); + } + + if (record.getSalePrice() != null) { + sql.SET("sale_price = #{salePrice,jdbcType=DECIMAL}"); + } + + if (record.getOriginalPrice() != null) { + sql.SET("original_price = #{originalPrice,jdbcType=DECIMAL}"); + } + + if (record.getStock() != null) { + sql.SET("stock = #{stock,jdbcType=INTEGER}"); + } + + if (record.getShowImg() != null) { + sql.SET("show_img = #{showImg,jdbcType=VARCHAR}"); + } + + if (record.getBannerImg() != null) { + sql.SET("banner_img = #{bannerImg,jdbcType=VARCHAR}"); + } + + if (record.getStatus() != null) { + sql.SET("`status` = #{status,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, GoodsSpecsExample 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/GoodsVpdMapper.java b/service/src/main/java/com/hfkj/dao/GoodsVpdMapper.java new file mode 100644 index 0000000..4ada124 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsVpdMapper.java @@ -0,0 +1,125 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsVpd; +import com.hfkj.entity.GoodsVpdExample; +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 GoodsVpdMapper extends GoodsVpdMapperExt { + @SelectProvider(type=GoodsVpdSqlProvider.class, method="countByExample") + long countByExample(GoodsVpdExample example); + + @DeleteProvider(type=GoodsVpdSqlProvider.class, method="deleteByExample") + int deleteByExample(GoodsVpdExample example); + + @Delete({ + "delete from goods_vpd", + "where id = #{id,jdbcType=BIGINT}" + }) + int deleteByPrimaryKey(Long id); + + @Insert({ + "insert into goods_vpd (goods_id, `key`, ", + "recycle_day, sales_end_time, ", + "`type`, `source`, create_time, ", + "update_time, ext_1, ", + "ext_2, ext_3)", + "values (#{goodsId,jdbcType=BIGINT}, #{key,jdbcType=VARCHAR}, ", + "#{recycleDay,jdbcType=INTEGER}, #{salesEndTime,jdbcType=TIMESTAMP}, ", + "#{type,jdbcType=INTEGER}, #{source,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", + "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ", + "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" + }) + @Options(useGeneratedKeys=true,keyProperty="id") + int insert(GoodsVpd record); + + @InsertProvider(type=GoodsVpdSqlProvider.class, method="insertSelective") + @Options(useGeneratedKeys=true,keyProperty="id") + int insertSelective(GoodsVpd record); + + @SelectProvider(type=GoodsVpdSqlProvider.class, method="selectByExample") + @Results({ + @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), + @Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT), + @Result(column="key", property="key", jdbcType=JdbcType.VARCHAR), + @Result(column="recycle_day", property="recycleDay", jdbcType=JdbcType.INTEGER), + @Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="source", property="source", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + List selectByExample(GoodsVpdExample example); + + @Select({ + "select", + "id, goods_id, `key`, recycle_day, sales_end_time, `type`, `source`, create_time, ", + "update_time, ext_1, ext_2, ext_3", + "from goods_vpd", + "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="key", property="key", jdbcType=JdbcType.VARCHAR), + @Result(column="recycle_day", property="recycleDay", jdbcType=JdbcType.INTEGER), + @Result(column="sales_end_time", property="salesEndTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="type", property="type", jdbcType=JdbcType.INTEGER), + @Result(column="source", property="source", jdbcType=JdbcType.INTEGER), + @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), + @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), + @Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) + }) + GoodsVpd selectByPrimaryKey(Long id); + + @UpdateProvider(type=GoodsVpdSqlProvider.class, method="updateByExampleSelective") + int updateByExampleSelective(@Param("record") GoodsVpd record, @Param("example") GoodsVpdExample example); + + @UpdateProvider(type=GoodsVpdSqlProvider.class, method="updateByExample") + int updateByExample(@Param("record") GoodsVpd record, @Param("example") GoodsVpdExample example); + + @UpdateProvider(type=GoodsVpdSqlProvider.class, method="updateByPrimaryKeySelective") + int updateByPrimaryKeySelective(GoodsVpd record); + + @Update({ + "update goods_vpd", + "set goods_id = #{goodsId,jdbcType=BIGINT},", + "`key` = #{key,jdbcType=VARCHAR},", + "recycle_day = #{recycleDay,jdbcType=INTEGER},", + "sales_end_time = #{salesEndTime,jdbcType=TIMESTAMP},", + "`type` = #{type,jdbcType=INTEGER},", + "`source` = #{source,jdbcType=INTEGER},", + "create_time = #{createTime,jdbcType=TIMESTAMP},", + "update_time = #{updateTime,jdbcType=TIMESTAMP},", + "ext_1 = #{ext1,jdbcType=VARCHAR},", + "ext_2 = #{ext2,jdbcType=VARCHAR},", + "ext_3 = #{ext3,jdbcType=VARCHAR}", + "where id = #{id,jdbcType=BIGINT}" + }) + int updateByPrimaryKey(GoodsVpd record); +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsVpdMapperExt.java b/service/src/main/java/com/hfkj/dao/GoodsVpdMapperExt.java new file mode 100644 index 0000000..aa8d405 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsVpdMapperExt.java @@ -0,0 +1,7 @@ +package com.hfkj.dao; + +/** + * mapper扩展类 + */ +public interface GoodsVpdMapperExt { +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/dao/GoodsVpdSqlProvider.java b/service/src/main/java/com/hfkj/dao/GoodsVpdSqlProvider.java new file mode 100644 index 0000000..0e4a955 --- /dev/null +++ b/service/src/main/java/com/hfkj/dao/GoodsVpdSqlProvider.java @@ -0,0 +1,332 @@ +package com.hfkj.dao; + +import com.hfkj.entity.GoodsVpd; +import com.hfkj.entity.GoodsVpdExample.Criteria; +import com.hfkj.entity.GoodsVpdExample.Criterion; +import com.hfkj.entity.GoodsVpdExample; +import java.util.List; +import java.util.Map; +import org.apache.ibatis.jdbc.SQL; + +public class GoodsVpdSqlProvider { + + public String countByExample(GoodsVpdExample example) { + SQL sql = new SQL(); + sql.SELECT("count(*)").FROM("goods_vpd"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String deleteByExample(GoodsVpdExample example) { + SQL sql = new SQL(); + sql.DELETE_FROM("goods_vpd"); + applyWhere(sql, example, false); + return sql.toString(); + } + + public String insertSelective(GoodsVpd record) { + SQL sql = new SQL(); + sql.INSERT_INTO("goods_vpd"); + + if (record.getGoodsId() != null) { + sql.VALUES("goods_id", "#{goodsId,jdbcType=BIGINT}"); + } + + if (record.getKey() != null) { + sql.VALUES("`key`", "#{key,jdbcType=VARCHAR}"); + } + + if (record.getRecycleDay() != null) { + sql.VALUES("recycle_day", "#{recycleDay,jdbcType=INTEGER}"); + } + + if (record.getSalesEndTime() != null) { + sql.VALUES("sales_end_time", "#{salesEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getType() != null) { + sql.VALUES("`type`", "#{type,jdbcType=INTEGER}"); + } + + if (record.getSource() != null) { + sql.VALUES("`source`", "#{source,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); + } + + return sql.toString(); + } + + public String selectByExample(GoodsVpdExample example) { + SQL sql = new SQL(); + if (example != null && example.isDistinct()) { + sql.SELECT_DISTINCT("id"); + } else { + sql.SELECT("id"); + } + sql.SELECT("goods_id"); + sql.SELECT("`key`"); + sql.SELECT("recycle_day"); + sql.SELECT("sales_end_time"); + sql.SELECT("`type`"); + sql.SELECT("`source`"); + sql.SELECT("create_time"); + sql.SELECT("update_time"); + sql.SELECT("ext_1"); + sql.SELECT("ext_2"); + sql.SELECT("ext_3"); + sql.FROM("goods_vpd"); + applyWhere(sql, example, false); + + if (example != null && example.getOrderByClause() != null) { + sql.ORDER_BY(example.getOrderByClause()); + } + + return sql.toString(); + } + + public String updateByExampleSelective(Map parameter) { + GoodsVpd record = (GoodsVpd) parameter.get("record"); + GoodsVpdExample example = (GoodsVpdExample) parameter.get("example"); + + SQL sql = new SQL(); + sql.UPDATE("goods_vpd"); + + if (record.getId() != null) { + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + } + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + } + + if (record.getKey() != null) { + sql.SET("`key` = #{record.key,jdbcType=VARCHAR}"); + } + + if (record.getRecycleDay() != null) { + sql.SET("recycle_day = #{record.recycleDay,jdbcType=INTEGER}"); + } + + if (record.getSalesEndTime() != null) { + sql.SET("sales_end_time = #{record.salesEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + } + + if (record.getSource() != null) { + sql.SET("`source` = #{record.source,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + } + + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByExample(Map parameter) { + SQL sql = new SQL(); + sql.UPDATE("goods_vpd"); + + sql.SET("id = #{record.id,jdbcType=BIGINT}"); + sql.SET("goods_id = #{record.goodsId,jdbcType=BIGINT}"); + sql.SET("`key` = #{record.key,jdbcType=VARCHAR}"); + sql.SET("recycle_day = #{record.recycleDay,jdbcType=INTEGER}"); + sql.SET("sales_end_time = #{record.salesEndTime,jdbcType=TIMESTAMP}"); + sql.SET("`type` = #{record.type,jdbcType=INTEGER}"); + sql.SET("`source` = #{record.source,jdbcType=INTEGER}"); + sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); + sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); + sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); + sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); + sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); + + GoodsVpdExample example = (GoodsVpdExample) parameter.get("example"); + applyWhere(sql, example, true); + return sql.toString(); + } + + public String updateByPrimaryKeySelective(GoodsVpd record) { + SQL sql = new SQL(); + sql.UPDATE("goods_vpd"); + + if (record.getGoodsId() != null) { + sql.SET("goods_id = #{goodsId,jdbcType=BIGINT}"); + } + + if (record.getKey() != null) { + sql.SET("`key` = #{key,jdbcType=VARCHAR}"); + } + + if (record.getRecycleDay() != null) { + sql.SET("recycle_day = #{recycleDay,jdbcType=INTEGER}"); + } + + if (record.getSalesEndTime() != null) { + sql.SET("sales_end_time = #{salesEndTime,jdbcType=TIMESTAMP}"); + } + + if (record.getType() != null) { + sql.SET("`type` = #{type,jdbcType=INTEGER}"); + } + + if (record.getSource() != null) { + sql.SET("`source` = #{source,jdbcType=INTEGER}"); + } + + if (record.getCreateTime() != null) { + sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); + } + + if (record.getUpdateTime() != null) { + sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); + } + + if (record.getExt1() != null) { + sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); + } + + if (record.getExt2() != null) { + sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); + } + + if (record.getExt3() != null) { + sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); + } + + sql.WHERE("id = #{id,jdbcType=BIGINT}"); + + return sql.toString(); + } + + protected void applyWhere(SQL sql, GoodsVpdExample 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/GoodsMsg.java b/service/src/main/java/com/hfkj/entity/GoodsMsg.java new file mode 100644 index 0000000..484d1ae --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsMsg.java @@ -0,0 +1,369 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * goods_msg + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class GoodsMsg implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 商品类型名称 + */ + private String goodsTypeName; + + /** + * 商品分类 + */ + private Long goodsType; + + /** + * 类型:1.实物商品 2.虚拟商品 + */ + private Integer type; + + /** + * 商品品牌名称 + */ + private String goodsBrandName; + + /** + * 商品品牌 + */ + private Integer goodsBrand; + + /** + * 商品标签 + */ + private String goodsLabel; + + /** + * 商品说明 + */ + private String goodsExplain; + + /** + * 商品名称 + */ + private String title; + + /** + * 列表图 + */ + private String listImg; + + /** + * 轮播图 + */ + private String bannerImg; + + /** + * 详情图 + */ + private String detailImg; + + /** + * 商品状态:0:删除 1:上线 2:编辑中 3.审核中 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 商户id + */ + private Long merId; + + /** + * 商户名称 + */ + private String merName; + + /** + * 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 String getGoodsTypeName() { + return goodsTypeName; + } + + public void setGoodsTypeName(String goodsTypeName) { + this.goodsTypeName = goodsTypeName; + } + + public Long getGoodsType() { + return goodsType; + } + + public void setGoodsType(Long goodsType) { + this.goodsType = goodsType; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public String getGoodsBrandName() { + return goodsBrandName; + } + + public void setGoodsBrandName(String goodsBrandName) { + this.goodsBrandName = goodsBrandName; + } + + public Integer getGoodsBrand() { + return goodsBrand; + } + + public void setGoodsBrand(Integer goodsBrand) { + this.goodsBrand = goodsBrand; + } + + public String getGoodsLabel() { + return goodsLabel; + } + + public void setGoodsLabel(String goodsLabel) { + this.goodsLabel = goodsLabel; + } + + public String getGoodsExplain() { + return goodsExplain; + } + + public void setGoodsExplain(String goodsExplain) { + this.goodsExplain = goodsExplain; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getListImg() { + return listImg; + } + + public void setListImg(String listImg) { + this.listImg = listImg; + } + + public String getBannerImg() { + return bannerImg; + } + + public void setBannerImg(String bannerImg) { + this.bannerImg = bannerImg; + } + + public String getDetailImg() { + return detailImg; + } + + public void setDetailImg(String detailImg) { + this.detailImg = detailImg; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getMerId() { + return merId; + } + + public void setMerId(Long merId) { + this.merId = merId; + } + + public String getMerName() { + return merName; + } + + public void setMerName(String merName) { + this.merName = merName; + } + + public String 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; + } + GoodsMsg other = (GoodsMsg) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getGoodsTypeName() == null ? other.getGoodsTypeName() == null : this.getGoodsTypeName().equals(other.getGoodsTypeName())) + && (this.getGoodsType() == null ? other.getGoodsType() == null : this.getGoodsType().equals(other.getGoodsType())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getGoodsBrandName() == null ? other.getGoodsBrandName() == null : this.getGoodsBrandName().equals(other.getGoodsBrandName())) + && (this.getGoodsBrand() == null ? other.getGoodsBrand() == null : this.getGoodsBrand().equals(other.getGoodsBrand())) + && (this.getGoodsLabel() == null ? other.getGoodsLabel() == null : this.getGoodsLabel().equals(other.getGoodsLabel())) + && (this.getGoodsExplain() == null ? other.getGoodsExplain() == null : this.getGoodsExplain().equals(other.getGoodsExplain())) + && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle())) + && (this.getListImg() == null ? other.getListImg() == null : this.getListImg().equals(other.getListImg())) + && (this.getBannerImg() == null ? other.getBannerImg() == null : this.getBannerImg().equals(other.getBannerImg())) + && (this.getDetailImg() == null ? other.getDetailImg() == null : this.getDetailImg().equals(other.getDetailImg())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) + && (this.getMerName() == null ? other.getMerName() == null : this.getMerName().equals(other.getMerName())) + && (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 + ((getGoodsTypeName() == null) ? 0 : getGoodsTypeName().hashCode()); + result = prime * result + ((getGoodsType() == null) ? 0 : getGoodsType().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getGoodsBrandName() == null) ? 0 : getGoodsBrandName().hashCode()); + result = prime * result + ((getGoodsBrand() == null) ? 0 : getGoodsBrand().hashCode()); + result = prime * result + ((getGoodsLabel() == null) ? 0 : getGoodsLabel().hashCode()); + result = prime * result + ((getGoodsExplain() == null) ? 0 : getGoodsExplain().hashCode()); + result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode()); + result = prime * result + ((getListImg() == null) ? 0 : getListImg().hashCode()); + result = prime * result + ((getBannerImg() == null) ? 0 : getBannerImg().hashCode()); + result = prime * result + ((getDetailImg() == null) ? 0 : getDetailImg().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); + result = prime * result + ((getMerName() == null) ? 0 : getMerName().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(", goodsTypeName=").append(goodsTypeName); + sb.append(", goodsType=").append(goodsType); + sb.append(", type=").append(type); + sb.append(", goodsBrandName=").append(goodsBrandName); + sb.append(", goodsBrand=").append(goodsBrand); + sb.append(", goodsLabel=").append(goodsLabel); + sb.append(", goodsExplain=").append(goodsExplain); + sb.append(", title=").append(title); + sb.append(", listImg=").append(listImg); + sb.append(", bannerImg=").append(bannerImg); + sb.append(", detailImg=").append(detailImg); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", merId=").append(merId); + sb.append(", merName=").append(merName); + 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/GoodsMsgExample.java b/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java new file mode 100644 index 0000000..3be7dce --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsMsgExample.java @@ -0,0 +1,1543 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GoodsMsgExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public GoodsMsgExample() { + 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 andGoodsTypeNameIsNull() { + addCriterion("goods_type_name is null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameIsNotNull() { + addCriterion("goods_type_name is not null"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameEqualTo(String value) { + addCriterion("goods_type_name =", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotEqualTo(String value) { + addCriterion("goods_type_name <>", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameGreaterThan(String value) { + addCriterion("goods_type_name >", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameGreaterThanOrEqualTo(String value) { + addCriterion("goods_type_name >=", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameLessThan(String value) { + addCriterion("goods_type_name <", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameLessThanOrEqualTo(String value) { + addCriterion("goods_type_name <=", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameLike(String value) { + addCriterion("goods_type_name like", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotLike(String value) { + addCriterion("goods_type_name not like", value, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameIn(List values) { + addCriterion("goods_type_name in", values, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotIn(List values) { + addCriterion("goods_type_name not in", values, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameBetween(String value1, String value2) { + addCriterion("goods_type_name between", value1, value2, "goodsTypeName"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNameNotBetween(String value1, String value2) { + addCriterion("goods_type_name not between", value1, value2, "goodsTypeName"); + 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(Long value) { + addCriterion("goods_type =", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotEqualTo(Long value) { + addCriterion("goods_type <>", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeGreaterThan(Long value) { + addCriterion("goods_type >", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeGreaterThanOrEqualTo(Long value) { + addCriterion("goods_type >=", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLessThan(Long value) { + addCriterion("goods_type <", value, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeLessThanOrEqualTo(Long 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(Long value1, Long value2) { + addCriterion("goods_type between", value1, value2, "goodsType"); + return (Criteria) this; + } + + public Criteria andGoodsTypeNotBetween(Long value1, Long value2) { + addCriterion("goods_type not between", value1, value2, "goodsType"); + 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 andGoodsBrandNameIsNull() { + addCriterion("goods_brand_name is null"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameIsNotNull() { + addCriterion("goods_brand_name is not null"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameEqualTo(String value) { + addCriterion("goods_brand_name =", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameNotEqualTo(String value) { + addCriterion("goods_brand_name <>", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameGreaterThan(String value) { + addCriterion("goods_brand_name >", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameGreaterThanOrEqualTo(String value) { + addCriterion("goods_brand_name >=", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameLessThan(String value) { + addCriterion("goods_brand_name <", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameLessThanOrEqualTo(String value) { + addCriterion("goods_brand_name <=", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameLike(String value) { + addCriterion("goods_brand_name like", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameNotLike(String value) { + addCriterion("goods_brand_name not like", value, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameIn(List values) { + addCriterion("goods_brand_name in", values, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameNotIn(List values) { + addCriterion("goods_brand_name not in", values, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameBetween(String value1, String value2) { + addCriterion("goods_brand_name between", value1, value2, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNameNotBetween(String value1, String value2) { + addCriterion("goods_brand_name not between", value1, value2, "goodsBrandName"); + return (Criteria) this; + } + + public Criteria andGoodsBrandIsNull() { + addCriterion("goods_brand is null"); + return (Criteria) this; + } + + public Criteria andGoodsBrandIsNotNull() { + addCriterion("goods_brand is not null"); + return (Criteria) this; + } + + public Criteria andGoodsBrandEqualTo(Integer value) { + addCriterion("goods_brand =", value, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNotEqualTo(Integer value) { + addCriterion("goods_brand <>", value, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandGreaterThan(Integer value) { + addCriterion("goods_brand >", value, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandGreaterThanOrEqualTo(Integer value) { + addCriterion("goods_brand >=", value, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandLessThan(Integer value) { + addCriterion("goods_brand <", value, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandLessThanOrEqualTo(Integer value) { + addCriterion("goods_brand <=", value, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandIn(List values) { + addCriterion("goods_brand in", values, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNotIn(List values) { + addCriterion("goods_brand not in", values, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandBetween(Integer value1, Integer value2) { + addCriterion("goods_brand between", value1, value2, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsBrandNotBetween(Integer value1, Integer value2) { + addCriterion("goods_brand not between", value1, value2, "goodsBrand"); + return (Criteria) this; + } + + public Criteria andGoodsLabelIsNull() { + addCriterion("goods_label is null"); + return (Criteria) this; + } + + public Criteria andGoodsLabelIsNotNull() { + addCriterion("goods_label is not null"); + return (Criteria) this; + } + + public Criteria andGoodsLabelEqualTo(String value) { + addCriterion("goods_label =", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotEqualTo(String value) { + addCriterion("goods_label <>", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelGreaterThan(String value) { + addCriterion("goods_label >", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelGreaterThanOrEqualTo(String value) { + addCriterion("goods_label >=", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelLessThan(String value) { + addCriterion("goods_label <", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelLessThanOrEqualTo(String value) { + addCriterion("goods_label <=", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelLike(String value) { + addCriterion("goods_label like", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotLike(String value) { + addCriterion("goods_label not like", value, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelIn(List values) { + addCriterion("goods_label in", values, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotIn(List values) { + addCriterion("goods_label not in", values, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelBetween(String value1, String value2) { + addCriterion("goods_label between", value1, value2, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsLabelNotBetween(String value1, String value2) { + addCriterion("goods_label not between", value1, value2, "goodsLabel"); + return (Criteria) this; + } + + public Criteria andGoodsExplainIsNull() { + addCriterion("goods_explain is null"); + return (Criteria) this; + } + + public Criteria andGoodsExplainIsNotNull() { + addCriterion("goods_explain is not null"); + return (Criteria) this; + } + + public Criteria andGoodsExplainEqualTo(String value) { + addCriterion("goods_explain =", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainNotEqualTo(String value) { + addCriterion("goods_explain <>", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainGreaterThan(String value) { + addCriterion("goods_explain >", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainGreaterThanOrEqualTo(String value) { + addCriterion("goods_explain >=", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainLessThan(String value) { + addCriterion("goods_explain <", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainLessThanOrEqualTo(String value) { + addCriterion("goods_explain <=", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainLike(String value) { + addCriterion("goods_explain like", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainNotLike(String value) { + addCriterion("goods_explain not like", value, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainIn(List values) { + addCriterion("goods_explain in", values, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainNotIn(List values) { + addCriterion("goods_explain not in", values, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainBetween(String value1, String value2) { + addCriterion("goods_explain between", value1, value2, "goodsExplain"); + return (Criteria) this; + } + + public Criteria andGoodsExplainNotBetween(String value1, String value2) { + addCriterion("goods_explain not between", value1, value2, "goodsExplain"); + 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 andListImgIsNull() { + addCriterion("list_img is null"); + return (Criteria) this; + } + + public Criteria andListImgIsNotNull() { + addCriterion("list_img is not null"); + return (Criteria) this; + } + + public Criteria andListImgEqualTo(String value) { + addCriterion("list_img =", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgNotEqualTo(String value) { + addCriterion("list_img <>", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgGreaterThan(String value) { + addCriterion("list_img >", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgGreaterThanOrEqualTo(String value) { + addCriterion("list_img >=", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgLessThan(String value) { + addCriterion("list_img <", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgLessThanOrEqualTo(String value) { + addCriterion("list_img <=", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgLike(String value) { + addCriterion("list_img like", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgNotLike(String value) { + addCriterion("list_img not like", value, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgIn(List values) { + addCriterion("list_img in", values, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgNotIn(List values) { + addCriterion("list_img not in", values, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgBetween(String value1, String value2) { + addCriterion("list_img between", value1, value2, "listImg"); + return (Criteria) this; + } + + public Criteria andListImgNotBetween(String value1, String value2) { + addCriterion("list_img not between", value1, value2, "listImg"); + return (Criteria) this; + } + + public Criteria andBannerImgIsNull() { + addCriterion("banner_img is null"); + return (Criteria) this; + } + + public Criteria andBannerImgIsNotNull() { + addCriterion("banner_img is not null"); + return (Criteria) this; + } + + public Criteria andBannerImgEqualTo(String value) { + addCriterion("banner_img =", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotEqualTo(String value) { + addCriterion("banner_img <>", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgGreaterThan(String value) { + addCriterion("banner_img >", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgGreaterThanOrEqualTo(String value) { + addCriterion("banner_img >=", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgLessThan(String value) { + addCriterion("banner_img <", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgLessThanOrEqualTo(String value) { + addCriterion("banner_img <=", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgLike(String value) { + addCriterion("banner_img like", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotLike(String value) { + addCriterion("banner_img not like", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgIn(List values) { + addCriterion("banner_img in", values, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotIn(List values) { + addCriterion("banner_img not in", values, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgBetween(String value1, String value2) { + addCriterion("banner_img between", value1, value2, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotBetween(String value1, String value2) { + addCriterion("banner_img not between", value1, value2, "bannerImg"); + return (Criteria) this; + } + + public Criteria andDetailImgIsNull() { + addCriterion("detail_img is null"); + return (Criteria) this; + } + + public Criteria andDetailImgIsNotNull() { + addCriterion("detail_img is not null"); + return (Criteria) this; + } + + public Criteria andDetailImgEqualTo(String value) { + addCriterion("detail_img =", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgNotEqualTo(String value) { + addCriterion("detail_img <>", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgGreaterThan(String value) { + addCriterion("detail_img >", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgGreaterThanOrEqualTo(String value) { + addCriterion("detail_img >=", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgLessThan(String value) { + addCriterion("detail_img <", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgLessThanOrEqualTo(String value) { + addCriterion("detail_img <=", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgLike(String value) { + addCriterion("detail_img like", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgNotLike(String value) { + addCriterion("detail_img not like", value, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgIn(List values) { + addCriterion("detail_img in", values, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgNotIn(List values) { + addCriterion("detail_img not in", values, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgBetween(String value1, String value2) { + addCriterion("detail_img between", value1, value2, "detailImg"); + return (Criteria) this; + } + + public Criteria andDetailImgNotBetween(String value1, String value2) { + addCriterion("detail_img not between", value1, value2, "detailImg"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andMerIdIsNull() { + addCriterion("mer_id is null"); + return (Criteria) this; + } + + public Criteria andMerIdIsNotNull() { + addCriterion("mer_id is not null"); + return (Criteria) this; + } + + public Criteria andMerIdEqualTo(Long value) { + addCriterion("mer_id =", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotEqualTo(Long value) { + addCriterion("mer_id <>", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThan(Long value) { + addCriterion("mer_id >", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdGreaterThanOrEqualTo(Long value) { + addCriterion("mer_id >=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThan(Long value) { + addCriterion("mer_id <", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdLessThanOrEqualTo(Long value) { + addCriterion("mer_id <=", value, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdIn(List values) { + addCriterion("mer_id in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotIn(List values) { + addCriterion("mer_id not in", values, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdBetween(Long value1, Long value2) { + addCriterion("mer_id between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerIdNotBetween(Long value1, Long value2) { + addCriterion("mer_id not between", value1, value2, "merId"); + return (Criteria) this; + } + + public Criteria andMerNameIsNull() { + addCriterion("mer_name is null"); + return (Criteria) this; + } + + public Criteria andMerNameIsNotNull() { + addCriterion("mer_name is not null"); + return (Criteria) this; + } + + public Criteria andMerNameEqualTo(String value) { + addCriterion("mer_name =", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotEqualTo(String value) { + addCriterion("mer_name <>", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThan(String value) { + addCriterion("mer_name >", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameGreaterThanOrEqualTo(String value) { + addCriterion("mer_name >=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThan(String value) { + addCriterion("mer_name <", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLessThanOrEqualTo(String value) { + addCriterion("mer_name <=", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameLike(String value) { + addCriterion("mer_name like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotLike(String value) { + addCriterion("mer_name not like", value, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameIn(List values) { + addCriterion("mer_name in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotIn(List values) { + addCriterion("mer_name not in", values, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameBetween(String value1, String value2) { + addCriterion("mer_name between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria andMerNameNotBetween(String value1, String value2) { + addCriterion("mer_name not between", value1, value2, "merName"); + return (Criteria) this; + } + + public Criteria 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/GoodsSpecs.java b/service/src/main/java/com/hfkj/entity/GoodsSpecs.java new file mode 100644 index 0000000..ebe10b1 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsSpecs.java @@ -0,0 +1,290 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * goods_specs + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class GoodsSpecs implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 商品ID + */ + private Long goodsId; + + /** + * sku名称 + */ + private String name; + + /** + * 限购数量 + */ + private Integer purLimit; + + /** + * 售价 + */ + private BigDecimal salePrice; + + /** + * 原价 + */ + private BigDecimal originalPrice; + + /** + * 库存 + */ + private Integer stock; + + /** + * 图片 + */ + private String showImg; + + /** + * 轮播图 + */ + private String bannerImg; + + /** + * 状态:0:删除 1:正常 + */ + private Integer status; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 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 getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Integer getPurLimit() { + return purLimit; + } + + public void setPurLimit(Integer purLimit) { + this.purLimit = purLimit; + } + + public BigDecimal getSalePrice() { + return salePrice; + } + + public void setSalePrice(BigDecimal salePrice) { + this.salePrice = salePrice; + } + + public BigDecimal getOriginalPrice() { + return originalPrice; + } + + public void setOriginalPrice(BigDecimal originalPrice) { + this.originalPrice = originalPrice; + } + + public Integer getStock() { + return stock; + } + + public void setStock(Integer stock) { + this.stock = stock; + } + + public String getShowImg() { + return showImg; + } + + public void setShowImg(String showImg) { + this.showImg = showImg; + } + + public String getBannerImg() { + return bannerImg; + } + + public void setBannerImg(String bannerImg) { + this.bannerImg = bannerImg; + } + + public Integer getStatus() { + return status; + } + + public void setStatus(Integer status) { + this.status = status; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + GoodsSpecs other = (GoodsSpecs) 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.getName() == null ? other.getName() == null : this.getName().equals(other.getName())) + && (this.getPurLimit() == null ? other.getPurLimit() == null : this.getPurLimit().equals(other.getPurLimit())) + && (this.getSalePrice() == null ? other.getSalePrice() == null : this.getSalePrice().equals(other.getSalePrice())) + && (this.getOriginalPrice() == null ? other.getOriginalPrice() == null : this.getOriginalPrice().equals(other.getOriginalPrice())) + && (this.getStock() == null ? other.getStock() == null : this.getStock().equals(other.getStock())) + && (this.getShowImg() == null ? other.getShowImg() == null : this.getShowImg().equals(other.getShowImg())) + && (this.getBannerImg() == null ? other.getBannerImg() == null : this.getBannerImg().equals(other.getBannerImg())) + && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getName() == null) ? 0 : getName().hashCode()); + result = prime * result + ((getPurLimit() == null) ? 0 : getPurLimit().hashCode()); + result = prime * result + ((getSalePrice() == null) ? 0 : getSalePrice().hashCode()); + result = prime * result + ((getOriginalPrice() == null) ? 0 : getOriginalPrice().hashCode()); + result = prime * result + ((getStock() == null) ? 0 : getStock().hashCode()); + result = prime * result + ((getShowImg() == null) ? 0 : getShowImg().hashCode()); + result = prime * result + ((getBannerImg() == null) ? 0 : getBannerImg().hashCode()); + result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", goodsId=").append(goodsId); + sb.append(", name=").append(name); + sb.append(", purLimit=").append(purLimit); + sb.append(", salePrice=").append(salePrice); + sb.append(", originalPrice=").append(originalPrice); + sb.append(", stock=").append(stock); + sb.append(", showImg=").append(showImg); + sb.append(", bannerImg=").append(bannerImg); + sb.append(", status=").append(status); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java b/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java new file mode 100644 index 0000000..52f7f79 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsSpecsExample.java @@ -0,0 +1,1184 @@ +package com.hfkj.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GoodsSpecsExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public GoodsSpecsExample() { + 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 andGoodsIdIsNull() { + addCriterion("goods_id is null"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNotNull() { + addCriterion("goods_id is not null"); + return (Criteria) this; + } + + public Criteria andGoodsIdEqualTo(Long value) { + addCriterion("goods_id =", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotEqualTo(Long value) { + addCriterion("goods_id <>", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThan(Long value) { + addCriterion("goods_id >", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) { + addCriterion("goods_id >=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThan(Long value) { + addCriterion("goods_id <", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThanOrEqualTo(Long value) { + addCriterion("goods_id <=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIn(List values) { + addCriterion("goods_id in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotIn(List values) { + addCriterion("goods_id not in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdBetween(Long value1, Long value2) { + addCriterion("goods_id between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotBetween(Long value1, Long value2) { + addCriterion("goods_id not between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("`name` is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("`name` is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("`name` =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("`name` <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("`name` >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("`name` >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("`name` <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("`name` <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("`name` like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("`name` not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("`name` in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("`name` not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("`name` between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("`name` not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andPurLimitIsNull() { + addCriterion("pur_limit is null"); + return (Criteria) this; + } + + public Criteria andPurLimitIsNotNull() { + addCriterion("pur_limit is not null"); + return (Criteria) this; + } + + public Criteria andPurLimitEqualTo(Integer value) { + addCriterion("pur_limit =", value, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitNotEqualTo(Integer value) { + addCriterion("pur_limit <>", value, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitGreaterThan(Integer value) { + addCriterion("pur_limit >", value, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitGreaterThanOrEqualTo(Integer value) { + addCriterion("pur_limit >=", value, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitLessThan(Integer value) { + addCriterion("pur_limit <", value, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitLessThanOrEqualTo(Integer value) { + addCriterion("pur_limit <=", value, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitIn(List values) { + addCriterion("pur_limit in", values, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitNotIn(List values) { + addCriterion("pur_limit not in", values, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitBetween(Integer value1, Integer value2) { + addCriterion("pur_limit between", value1, value2, "purLimit"); + return (Criteria) this; + } + + public Criteria andPurLimitNotBetween(Integer value1, Integer value2) { + addCriterion("pur_limit not between", value1, value2, "purLimit"); + return (Criteria) this; + } + + public Criteria andSalePriceIsNull() { + addCriterion("sale_price is null"); + return (Criteria) this; + } + + public Criteria andSalePriceIsNotNull() { + addCriterion("sale_price is not null"); + return (Criteria) this; + } + + public Criteria andSalePriceEqualTo(BigDecimal value) { + addCriterion("sale_price =", value, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceNotEqualTo(BigDecimal value) { + addCriterion("sale_price <>", value, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceGreaterThan(BigDecimal value) { + addCriterion("sale_price >", value, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("sale_price >=", value, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceLessThan(BigDecimal value) { + addCriterion("sale_price <", value, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("sale_price <=", value, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceIn(List values) { + addCriterion("sale_price in", values, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceNotIn(List values) { + addCriterion("sale_price not in", values, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("sale_price between", value1, value2, "salePrice"); + return (Criteria) this; + } + + public Criteria andSalePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("sale_price not between", value1, value2, "salePrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceIsNull() { + addCriterion("original_price is null"); + return (Criteria) this; + } + + public Criteria andOriginalPriceIsNotNull() { + addCriterion("original_price is not null"); + return (Criteria) this; + } + + public Criteria andOriginalPriceEqualTo(BigDecimal value) { + addCriterion("original_price =", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceNotEqualTo(BigDecimal value) { + addCriterion("original_price <>", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceGreaterThan(BigDecimal value) { + addCriterion("original_price >", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("original_price >=", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceLessThan(BigDecimal value) { + addCriterion("original_price <", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("original_price <=", value, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceIn(List values) { + addCriterion("original_price in", values, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceNotIn(List values) { + addCriterion("original_price not in", values, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("original_price between", value1, value2, "originalPrice"); + return (Criteria) this; + } + + public Criteria andOriginalPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("original_price not between", value1, value2, "originalPrice"); + return (Criteria) this; + } + + public Criteria andStockIsNull() { + addCriterion("stock is null"); + return (Criteria) this; + } + + public Criteria andStockIsNotNull() { + addCriterion("stock is not null"); + return (Criteria) this; + } + + public Criteria andStockEqualTo(Integer value) { + addCriterion("stock =", value, "stock"); + return (Criteria) this; + } + + public Criteria andStockNotEqualTo(Integer value) { + addCriterion("stock <>", value, "stock"); + return (Criteria) this; + } + + public Criteria andStockGreaterThan(Integer value) { + addCriterion("stock >", value, "stock"); + return (Criteria) this; + } + + public Criteria andStockGreaterThanOrEqualTo(Integer value) { + addCriterion("stock >=", value, "stock"); + return (Criteria) this; + } + + public Criteria andStockLessThan(Integer value) { + addCriterion("stock <", value, "stock"); + return (Criteria) this; + } + + public Criteria andStockLessThanOrEqualTo(Integer value) { + addCriterion("stock <=", value, "stock"); + return (Criteria) this; + } + + public Criteria andStockIn(List values) { + addCriterion("stock in", values, "stock"); + return (Criteria) this; + } + + public Criteria andStockNotIn(List values) { + addCriterion("stock not in", values, "stock"); + return (Criteria) this; + } + + public Criteria andStockBetween(Integer value1, Integer value2) { + addCriterion("stock between", value1, value2, "stock"); + return (Criteria) this; + } + + public Criteria andStockNotBetween(Integer value1, Integer value2) { + addCriterion("stock not between", value1, value2, "stock"); + return (Criteria) this; + } + + public Criteria andShowImgIsNull() { + addCriterion("show_img is null"); + return (Criteria) this; + } + + public Criteria andShowImgIsNotNull() { + addCriterion("show_img is not null"); + return (Criteria) this; + } + + public Criteria andShowImgEqualTo(String value) { + addCriterion("show_img =", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgNotEqualTo(String value) { + addCriterion("show_img <>", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgGreaterThan(String value) { + addCriterion("show_img >", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgGreaterThanOrEqualTo(String value) { + addCriterion("show_img >=", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgLessThan(String value) { + addCriterion("show_img <", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgLessThanOrEqualTo(String value) { + addCriterion("show_img <=", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgLike(String value) { + addCriterion("show_img like", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgNotLike(String value) { + addCriterion("show_img not like", value, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgIn(List values) { + addCriterion("show_img in", values, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgNotIn(List values) { + addCriterion("show_img not in", values, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgBetween(String value1, String value2) { + addCriterion("show_img between", value1, value2, "showImg"); + return (Criteria) this; + } + + public Criteria andShowImgNotBetween(String value1, String value2) { + addCriterion("show_img not between", value1, value2, "showImg"); + return (Criteria) this; + } + + public Criteria andBannerImgIsNull() { + addCriterion("banner_img is null"); + return (Criteria) this; + } + + public Criteria andBannerImgIsNotNull() { + addCriterion("banner_img is not null"); + return (Criteria) this; + } + + public Criteria andBannerImgEqualTo(String value) { + addCriterion("banner_img =", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotEqualTo(String value) { + addCriterion("banner_img <>", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgGreaterThan(String value) { + addCriterion("banner_img >", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgGreaterThanOrEqualTo(String value) { + addCriterion("banner_img >=", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgLessThan(String value) { + addCriterion("banner_img <", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgLessThanOrEqualTo(String value) { + addCriterion("banner_img <=", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgLike(String value) { + addCriterion("banner_img like", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotLike(String value) { + addCriterion("banner_img not like", value, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgIn(List values) { + addCriterion("banner_img in", values, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotIn(List values) { + addCriterion("banner_img not in", values, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgBetween(String value1, String value2) { + addCriterion("banner_img between", value1, value2, "bannerImg"); + return (Criteria) this; + } + + public Criteria andBannerImgNotBetween(String value1, String value2) { + addCriterion("banner_img not between", value1, value2, "bannerImg"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("`status` is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("`status` is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(Integer value) { + addCriterion("`status` =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(Integer value) { + addCriterion("`status` <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(Integer value) { + addCriterion("`status` >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("`status` >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(Integer value) { + addCriterion("`status` <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(Integer value) { + addCriterion("`status` <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("`status` in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("`status` not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(Integer value1, Integer value2) { + addCriterion("`status` between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(Integer value1, Integer value2) { + addCriterion("`status` not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsVpd.java b/service/src/main/java/com/hfkj/entity/GoodsVpd.java new file mode 100644 index 0000000..048c209 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsVpd.java @@ -0,0 +1,232 @@ +package com.hfkj.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * goods_vpd + * @author + */ +/** + * + * 代码由工具生成 + * + **/ +public class GoodsVpd implements Serializable { + /** + * 主键 + */ + private Long id; + + /** + * 商品ID + */ + private Long goodsId; + + /** + * 编号 + */ + private String key; + + /** + * 归库天数 + */ + private Integer recycleDay; + + /** + * 销售截止日期 + */ + private Date salesEndTime; + + /** + * 类型 1:内部虚拟商品 2:外部虚拟产品 + */ + private Integer type; + + /** + * 产品来源:1.内部虚拟商品 4.贵州中石化 5.重庆中石油 6.比邻星停车券 7.四川中石油 10.中油优途中石油 + */ + private Integer source; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + + private String ext1; + + private String ext2; + + private String ext3; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Long getGoodsId() { + return goodsId; + } + + public void setGoodsId(Long goodsId) { + this.goodsId = goodsId; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public Integer getRecycleDay() { + return recycleDay; + } + + public void setRecycleDay(Integer recycleDay) { + this.recycleDay = recycleDay; + } + + public Date getSalesEndTime() { + return salesEndTime; + } + + public void setSalesEndTime(Date salesEndTime) { + this.salesEndTime = salesEndTime; + } + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + + public Integer getSource() { + return source; + } + + public void setSource(Integer source) { + this.source = source; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getExt1() { + return ext1; + } + + public void setExt1(String ext1) { + this.ext1 = ext1; + } + + public String getExt2() { + return ext2; + } + + public void setExt2(String ext2) { + this.ext2 = ext2; + } + + public String getExt3() { + return ext3; + } + + public void setExt3(String ext3) { + this.ext3 = ext3; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + GoodsVpd other = (GoodsVpd) 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.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey())) + && (this.getRecycleDay() == null ? other.getRecycleDay() == null : this.getRecycleDay().equals(other.getRecycleDay())) + && (this.getSalesEndTime() == null ? other.getSalesEndTime() == null : this.getSalesEndTime().equals(other.getSalesEndTime())) + && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType())) + && (this.getSource() == null ? other.getSource() == null : this.getSource().equals(other.getSource())) + && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) + && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) + && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) + && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) + && (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getGoodsId() == null) ? 0 : getGoodsId().hashCode()); + result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode()); + result = prime * result + ((getRecycleDay() == null) ? 0 : getRecycleDay().hashCode()); + result = prime * result + ((getSalesEndTime() == null) ? 0 : getSalesEndTime().hashCode()); + result = prime * result + ((getType() == null) ? 0 : getType().hashCode()); + result = prime * result + ((getSource() == null) ? 0 : getSource().hashCode()); + result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); + result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); + result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); + result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); + result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", goodsId=").append(goodsId); + sb.append(", key=").append(key); + sb.append(", recycleDay=").append(recycleDay); + sb.append(", salesEndTime=").append(salesEndTime); + sb.append(", type=").append(type); + sb.append(", source=").append(source); + sb.append(", createTime=").append(createTime); + sb.append(", updateTime=").append(updateTime); + sb.append(", ext1=").append(ext1); + sb.append(", ext2=").append(ext2); + sb.append(", ext3=").append(ext3); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/entity/GoodsVpdExample.java b/service/src/main/java/com/hfkj/entity/GoodsVpdExample.java new file mode 100644 index 0000000..43714c6 --- /dev/null +++ b/service/src/main/java/com/hfkj/entity/GoodsVpdExample.java @@ -0,0 +1,983 @@ +package com.hfkj.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class GoodsVpdExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + private Integer limit; + + private Long offset; + + public GoodsVpdExample() { + 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 andGoodsIdIsNull() { + addCriterion("goods_id is null"); + return (Criteria) this; + } + + public Criteria andGoodsIdIsNotNull() { + addCriterion("goods_id is not null"); + return (Criteria) this; + } + + public Criteria andGoodsIdEqualTo(Long value) { + addCriterion("goods_id =", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotEqualTo(Long value) { + addCriterion("goods_id <>", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThan(Long value) { + addCriterion("goods_id >", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdGreaterThanOrEqualTo(Long value) { + addCriterion("goods_id >=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThan(Long value) { + addCriterion("goods_id <", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdLessThanOrEqualTo(Long value) { + addCriterion("goods_id <=", value, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdIn(List values) { + addCriterion("goods_id in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotIn(List values) { + addCriterion("goods_id not in", values, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdBetween(Long value1, Long value2) { + addCriterion("goods_id between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria andGoodsIdNotBetween(Long value1, Long value2) { + addCriterion("goods_id not between", value1, value2, "goodsId"); + return (Criteria) this; + } + + public Criteria 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 andRecycleDayIsNull() { + addCriterion("recycle_day is null"); + return (Criteria) this; + } + + public Criteria andRecycleDayIsNotNull() { + addCriterion("recycle_day is not null"); + return (Criteria) this; + } + + public Criteria andRecycleDayEqualTo(Integer value) { + addCriterion("recycle_day =", value, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayNotEqualTo(Integer value) { + addCriterion("recycle_day <>", value, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayGreaterThan(Integer value) { + addCriterion("recycle_day >", value, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayGreaterThanOrEqualTo(Integer value) { + addCriterion("recycle_day >=", value, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayLessThan(Integer value) { + addCriterion("recycle_day <", value, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayLessThanOrEqualTo(Integer value) { + addCriterion("recycle_day <=", value, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayIn(List values) { + addCriterion("recycle_day in", values, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayNotIn(List values) { + addCriterion("recycle_day not in", values, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayBetween(Integer value1, Integer value2) { + addCriterion("recycle_day between", value1, value2, "recycleDay"); + return (Criteria) this; + } + + public Criteria andRecycleDayNotBetween(Integer value1, Integer value2) { + addCriterion("recycle_day not between", value1, value2, "recycleDay"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeIsNull() { + addCriterion("sales_end_time is null"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeIsNotNull() { + addCriterion("sales_end_time is not null"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeEqualTo(Date value) { + addCriterion("sales_end_time =", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeNotEqualTo(Date value) { + addCriterion("sales_end_time <>", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeGreaterThan(Date value) { + addCriterion("sales_end_time >", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeGreaterThanOrEqualTo(Date value) { + addCriterion("sales_end_time >=", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeLessThan(Date value) { + addCriterion("sales_end_time <", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeLessThanOrEqualTo(Date value) { + addCriterion("sales_end_time <=", value, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeIn(List values) { + addCriterion("sales_end_time in", values, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeNotIn(List values) { + addCriterion("sales_end_time not in", values, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeBetween(Date value1, Date value2) { + addCriterion("sales_end_time between", value1, value2, "salesEndTime"); + return (Criteria) this; + } + + public Criteria andSalesEndTimeNotBetween(Date value1, Date value2) { + addCriterion("sales_end_time not between", value1, value2, "salesEndTime"); + return (Criteria) this; + } + + public Criteria 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 andSourceIsNull() { + addCriterion("`source` is null"); + return (Criteria) this; + } + + public Criteria andSourceIsNotNull() { + addCriterion("`source` is not null"); + return (Criteria) this; + } + + public Criteria andSourceEqualTo(Integer value) { + addCriterion("`source` =", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotEqualTo(Integer value) { + addCriterion("`source` <>", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThan(Integer value) { + addCriterion("`source` >", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceGreaterThanOrEqualTo(Integer value) { + addCriterion("`source` >=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThan(Integer value) { + addCriterion("`source` <", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceLessThanOrEqualTo(Integer value) { + addCriterion("`source` <=", value, "source"); + return (Criteria) this; + } + + public Criteria andSourceIn(List values) { + addCriterion("`source` in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotIn(List values) { + addCriterion("`source` not in", values, "source"); + return (Criteria) this; + } + + public Criteria andSourceBetween(Integer value1, Integer value2) { + addCriterion("`source` between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andSourceNotBetween(Integer value1, Integer value2) { + addCriterion("`source` not between", value1, value2, "source"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNull() { + addCriterion("create_time is null"); + return (Criteria) this; + } + + public Criteria andCreateTimeIsNotNull() { + addCriterion("create_time is not null"); + return (Criteria) this; + } + + public Criteria andCreateTimeEqualTo(Date value) { + addCriterion("create_time =", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotEqualTo(Date value) { + addCriterion("create_time <>", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThan(Date value) { + addCriterion("create_time >", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("create_time >=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThan(Date value) { + addCriterion("create_time <", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeLessThanOrEqualTo(Date value) { + addCriterion("create_time <=", value, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeIn(List values) { + addCriterion("create_time in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotIn(List values) { + addCriterion("create_time not in", values, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeBetween(Date value1, Date value2) { + addCriterion("create_time between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andCreateTimeNotBetween(Date value1, Date value2) { + addCriterion("create_time not between", value1, value2, "createTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNull() { + addCriterion("update_time is null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIsNotNull() { + addCriterion("update_time is not null"); + return (Criteria) this; + } + + public Criteria andUpdateTimeEqualTo(Date value) { + addCriterion("update_time =", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotEqualTo(Date value) { + addCriterion("update_time <>", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThan(Date value) { + addCriterion("update_time >", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) { + addCriterion("update_time >=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThan(Date value) { + addCriterion("update_time <", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeLessThanOrEqualTo(Date value) { + addCriterion("update_time <=", value, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeIn(List values) { + addCriterion("update_time in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotIn(List values) { + addCriterion("update_time not in", values, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeBetween(Date value1, Date value2) { + addCriterion("update_time between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andUpdateTimeNotBetween(Date value1, Date value2) { + addCriterion("update_time not between", value1, value2, "updateTime"); + return (Criteria) this; + } + + public Criteria andExt1IsNull() { + addCriterion("ext_1 is null"); + return (Criteria) this; + } + + public Criteria andExt1IsNotNull() { + addCriterion("ext_1 is not null"); + return (Criteria) this; + } + + public Criteria andExt1EqualTo(String value) { + addCriterion("ext_1 =", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotEqualTo(String value) { + addCriterion("ext_1 <>", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThan(String value) { + addCriterion("ext_1 >", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1GreaterThanOrEqualTo(String value) { + addCriterion("ext_1 >=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThan(String value) { + addCriterion("ext_1 <", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1LessThanOrEqualTo(String value) { + addCriterion("ext_1 <=", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Like(String value) { + addCriterion("ext_1 like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotLike(String value) { + addCriterion("ext_1 not like", value, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1In(List values) { + addCriterion("ext_1 in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotIn(List values) { + addCriterion("ext_1 not in", values, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1Between(String value1, String value2) { + addCriterion("ext_1 between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt1NotBetween(String value1, String value2) { + addCriterion("ext_1 not between", value1, value2, "ext1"); + return (Criteria) this; + } + + public Criteria andExt2IsNull() { + addCriterion("ext_2 is null"); + return (Criteria) this; + } + + public Criteria andExt2IsNotNull() { + addCriterion("ext_2 is not null"); + return (Criteria) this; + } + + public Criteria andExt2EqualTo(String value) { + addCriterion("ext_2 =", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotEqualTo(String value) { + addCriterion("ext_2 <>", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThan(String value) { + addCriterion("ext_2 >", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2GreaterThanOrEqualTo(String value) { + addCriterion("ext_2 >=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThan(String value) { + addCriterion("ext_2 <", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2LessThanOrEqualTo(String value) { + addCriterion("ext_2 <=", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Like(String value) { + addCriterion("ext_2 like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotLike(String value) { + addCriterion("ext_2 not like", value, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2In(List values) { + addCriterion("ext_2 in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotIn(List values) { + addCriterion("ext_2 not in", values, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2Between(String value1, String value2) { + addCriterion("ext_2 between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt2NotBetween(String value1, String value2) { + addCriterion("ext_2 not between", value1, value2, "ext2"); + return (Criteria) this; + } + + public Criteria andExt3IsNull() { + addCriterion("ext_3 is null"); + return (Criteria) this; + } + + public Criteria andExt3IsNotNull() { + addCriterion("ext_3 is not null"); + return (Criteria) this; + } + + public Criteria andExt3EqualTo(String value) { + addCriterion("ext_3 =", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotEqualTo(String value) { + addCriterion("ext_3 <>", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThan(String value) { + addCriterion("ext_3 >", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3GreaterThanOrEqualTo(String value) { + addCriterion("ext_3 >=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThan(String value) { + addCriterion("ext_3 <", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3LessThanOrEqualTo(String value) { + addCriterion("ext_3 <=", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Like(String value) { + addCriterion("ext_3 like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotLike(String value) { + addCriterion("ext_3 not like", value, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3In(List values) { + addCriterion("ext_3 in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotIn(List values) { + addCriterion("ext_3 not in", values, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3Between(String value1, String value2) { + addCriterion("ext_3 between", value1, value2, "ext3"); + return (Criteria) this; + } + + public Criteria andExt3NotBetween(String value1, String value2) { + addCriterion("ext_3 not between", value1, value2, "ext3"); + return (Criteria) this; + } + } + + /** + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/service/src/main/java/com/hfkj/service/goods/impl/GoodsBrandServiceImpl.java b/service/src/main/java/com/hfkj/service/goods/impl/GoodsBrandServiceImpl.java index d7ea040..fa44151 100644 --- a/service/src/main/java/com/hfkj/service/goods/impl/GoodsBrandServiceImpl.java +++ b/service/src/main/java/com/hfkj/service/goods/impl/GoodsBrandServiceImpl.java @@ -2,7 +2,9 @@ package com.hfkj.service.goods.impl; import com.hfkj.dao.GoodsBrandMapper; import com.hfkj.entity.GoodsBrand; +import com.hfkj.entity.GoodsBrandExample; import com.hfkj.service.goods.GoodsBrandService; +import org.apache.commons.collections4.MapUtils; import org.springframework.stereotype.Service; import javax.annotation.Resource; @@ -43,6 +45,15 @@ public class GoodsBrandServiceImpl implements GoodsBrandService { @Override public List getList(Map map) { - return Collections.emptyList(); + GoodsBrandExample example = new GoodsBrandExample(); + GoodsBrandExample.Criteria criteria = example.createCriteria(); + + if (MapUtils.getString(map, "title") != null) { + criteria.andTitleEqualTo(MapUtils.getString(map, "title")); + } + + criteria.andStatusNotEqualTo(0); + + return goodsBrandMapper.selectByExample(example); } }