From fa631b696e6a2e54e5c28fb08efc87b17efafdf3 Mon Sep 17 00:00:00 2001 From: fengb Date: Tue, 22 Aug 2023 21:51:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=95=86=E5=93=81?= =?UTF-8?q?=E6=A8=A1=E5=9D=97=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: fengb --- .../mall/controller/CommonController.java | 12 + .../mall/controller/GoodsController.java | 2 +- .../ProductAttributeController.java | 71 + .../ProductAttributeValueController.java | 69 + .../controller/ProductCategoryController.java | 71 + .../mall/controller/ProductController.java | 106 + .../mall/controller/PurchaseController.java | 99 + .../mall/controller/StockController.java | 53 + .../dao/mapper/ProductAttributeMapper.java | 34 + .../mapper/ProductAttributeValueMapper.java | 33 + .../dao/mapper/ProductCategoryMapper.java | 33 + .../hiver/mall/dao/mapper/ProductMapper.java | 33 + .../mall/dao/mapper/PurchaseDetailMapper.java | 33 + .../hiver/mall/dao/mapper/PurchaseMapper.java | 33 + .../hiver/mall/dao/mapper/StockLogMapper.java | 33 + .../cc/hiver/mall/dao/mapper/StockMapper.java | 33 + .../java/cc/hiver/mall/entity/Product.java | 281 +++ .../hiver/mall/entity/ProductAttribute.java | 112 ++ .../mall/entity/ProductAttributeExample.java | 710 +++++++ .../mall/entity/ProductAttributeValue.java | 112 ++ .../entity/ProductAttributeValueExample.java | 710 +++++++ .../cc/hiver/mall/entity/ProductCategory.java | 112 ++ .../mall/entity/ProductCategoryExample.java | 710 +++++++ .../cc/hiver/mall/entity/ProductExample.java | 1661 +++++++++++++++ .../java/cc/hiver/mall/entity/Purchase.java | 161 ++ .../cc/hiver/mall/entity/PurchaseDetail.java | 136 ++ .../mall/entity/PurchaseDetailExample.java | 830 ++++++++ .../cc/hiver/mall/entity/PurchaseExample.java | 961 +++++++++ .../main/java/cc/hiver/mall/entity/Stock.java | 305 +++ .../cc/hiver/mall/entity/StockExample.java | 1781 +++++++++++++++++ .../java/cc/hiver/mall/entity/StockLog.java | 197 ++ .../cc/hiver/mall/entity/StockLogExample.java | 1151 +++++++++++ .../cc/hiver/mall/pojo/vo/PurchaseVo.java | 19 + .../java/cc/hiver/mall/pojo/vo/StockVo.java | 21 + .../mybatis/ProductAttributeService.java | 8 + .../mybatis/ProductAttributeValueService.java | 8 + .../mybatis/ProductCategoryService.java | 8 + .../mall/service/mybatis/ProductService.java | 8 + .../mybatis/PurchaseDetailService.java | 8 + .../mall/service/mybatis/PurchaseService.java | 8 + .../mall/service/mybatis/StockLogService.java | 8 + .../mall/service/mybatis/StockService.java | 11 + .../mybatis/ProductAttributeServiceImpl.java | 14 + .../ProductAttributeValueServiceImpl.java | 14 + .../mybatis/ProductCategoryServiceImpl.java | 14 + .../mybatis/ProductServiceImpl.java | 14 + .../mybatis/PurchaseDetailServiceImpl.java | 14 + .../mybatis/PurchaseServiceImpl.java | 14 + .../mybatis/StockLogServiceImpl.java | 14 + .../serviceimpl/mybatis/StockServiceImpl.java | 97 + .../mapper/ProductAttributeMapper.xml | 258 +++ .../mapper/ProductAttributeValueMapper.xml | 258 +++ .../mapper/ProductCategoryMapper.xml | 258 +++ .../main/resources/mapper/ProductMapper.xml | 480 +++++ .../resources/mapper/PurchaseDetailMapper.xml | 291 +++ .../main/resources/mapper/PurchaseMapper.xml | 323 +++ .../main/resources/mapper/StockLogMapper.xml | 370 ++++ .../src/main/resources/mapper/StockMapper.xml | 513 +++++ 58 files changed, 13730 insertions(+), 1 deletion(-) create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductCategoryController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PurchaseController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/StockController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeValueMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductCategoryMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseDetailMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockLogMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockMapper.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttribute.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValue.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValueExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategory.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategoryExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Purchase.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetail.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetailExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Stock.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLog.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLogExample.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/PurchaseVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/StockVo.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeValueService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductCategoryService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseDetailService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockLogService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeValueServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductCategoryServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseDetailServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockLogServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeValueMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/ProductCategoryMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseDetailMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/StockLogMapper.xml create mode 100644 hiver-modules/hiver-mall/src/main/resources/mapper/StockMapper.xml diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java index 86ec9a37..7d083f43 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommonController.java @@ -138,4 +138,16 @@ public class CommonController { List users = userService.findAllByInviteCode(u.getId()); return new ResultUtil>().setData(users); } + + @RequestMapping(value = "/user/wechatlist", method = RequestMethod.GET) + @ApiOperation(value = "获得微信小程序用户") + public Result> wechatlist() { + User u = securityUtil.getCurrUser(); + // 清除持久上下文环境 避免后面语句导致持久化 + entityManager.detach(u); + u.setPassword(null); + List users = userService.findAllByInviteCode(u.getId()); + return new ResultUtil>().setData(users); + } + } diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/GoodsController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/GoodsController.java index 66b65859..3916234c 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/GoodsController.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/GoodsController.java @@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*; @Slf4j @RestController -@Api(tags = "商品接口") +@Api(tags = "商品接口(废弃)") @RequestMapping(value = "/hiver/app/goods/") @Transactional public class GoodsController { diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeController.java new file mode 100644 index 00000000..2e9a4940 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeController.java @@ -0,0 +1,71 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductAttribute; +import cc.hiver.mall.service.mybatis.ProductAttributeService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "货品属性接口") +@RequestMapping(value = "/hiver/app/productAttribute/") +@Transactional +public class ProductAttributeController { + @Autowired + private ProductAttributeService productAttributeService; + + @RequestMapping(value = "/save", method = RequestMethod.POST) + @ApiOperation(value = "新增货品属性") + public Result addSpu(ProductAttribute productAttribute) { + boolean result = productAttributeService.save(productAttribute); + if(result) { + return ResultUtil.success("添加成功"); + } else { + return ResultUtil.error("添加失败"); + } + } + + @RequestMapping(value = "/edit", method = RequestMethod.POST) + @ApiOperation(value = "根据id修改货品属性") + public Result updateSpuById(ProductAttribute productAttribute) { + boolean result = productAttributeService.updateById(productAttribute); + if(result) { + return ResultUtil.success("修改成功"); + } else { + return ResultUtil.error("修改失败"); + } + } + + @RequestMapping(value = "/delByIds", method = RequestMethod.POST) + @ApiOperation(value = "根据id删除货品属性") + public Result delete(ProductAttribute productAttribute) { + boolean result = productAttributeService.removeById(productAttribute); + if(result) { + return ResultUtil.success("删除成功"); + } else { + return ResultUtil.error("删除失败"); + } + } + + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ApiOperation(value = "查询货品属性列表") + public Result list() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List list = productAttributeService.list(queryWrapper); + return new ResultUtil>().setData(list); + } + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java new file mode 100644 index 00000000..78dca05f --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductAttributeValueController.java @@ -0,0 +1,69 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.ProductAttributeValue; +import cc.hiver.mall.service.mybatis.ProductAttributeValueService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "货品属性值接口") +@RequestMapping(value = "/hiver/app/productAttributeValue/") +@Transactional +public class ProductAttributeValueController { + @Autowired + private ProductAttributeValueService productAttributeValueService; + + @RequestMapping(value = "/save", method = RequestMethod.POST) + @ApiOperation(value = "新增货品属性值") + public Result addSpu(ProductAttributeValue productAttributeValue) { + boolean result = productAttributeValueService.save(productAttributeValue); + if(result) { + return ResultUtil.success("添加成功"); + } else { + return ResultUtil.error("添加失败"); + } + } + + @RequestMapping(value = "/edit", method = RequestMethod.POST) + @ApiOperation(value = "根据id修改货品属性值") + public Result updateSpuById(ProductAttributeValue productAttributeValue) { + boolean result = productAttributeValueService.updateById(productAttributeValue); + if(result) { + return ResultUtil.success("修改成功"); + } else { + return ResultUtil.error("修改失败"); + } + } + + @RequestMapping(value = "/delByIds", method = RequestMethod.POST) + @ApiOperation(value = "根据id删除货品属性值") + public Result delete(ProductAttributeValue productAttributeValue) { + boolean result = productAttributeValueService.removeById(productAttributeValue); + if(result) { + return ResultUtil.success("删除成功"); + } else { + return ResultUtil.error("删除失败"); + } + } + + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ApiOperation(value = "查询货品属性值列表") + public Result list() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List list = productAttributeValueService.list(queryWrapper); + return new ResultUtil>().setData(list); + } + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductCategoryController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductCategoryController.java new file mode 100644 index 00000000..6639e843 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductCategoryController.java @@ -0,0 +1,71 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductCategory; +import cc.hiver.mall.service.mybatis.ProductCategoryService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "货品类别接口") +@RequestMapping(value = "/hiver/app/productCategory/") +@Transactional +public class ProductCategoryController { + @Autowired + private ProductCategoryService productCategoryService; + + @RequestMapping(value = "/save", method = RequestMethod.POST) + @ApiOperation(value = "新增货品类别") + public Result addSpu(ProductCategory productCategory) { + boolean result = productCategoryService.save(productCategory); + if(result) { + return ResultUtil.success("添加成功"); + } else { + return ResultUtil.error("添加失败"); + } + } + + @RequestMapping(value = "/edit", method = RequestMethod.POST) + @ApiOperation(value = "根据id修改货品类别") + public Result updateSpuById(ProductCategory productCategory) { + boolean result = productCategoryService.updateById(productCategory); + if(result) { + return ResultUtil.success("修改成功"); + } else { + return ResultUtil.error("修改失败"); + } + } + + @RequestMapping(value = "/delByIds", method = RequestMethod.POST) + @ApiOperation(value = "根据id删除货品类别") + public Result delete(ProductCategory productCategory) { + boolean result = productCategoryService.removeById(productCategory); + if(result) { + return ResultUtil.success("删除成功"); + } else { + return ResultUtil.error("删除失败"); + } + } + + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ApiOperation(value = "查询货品类别列表") + public Result list() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List list = productCategoryService.list(queryWrapper); + return new ResultUtil>().setData(list); + } + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java new file mode 100644 index 00000000..fd49cebf --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ProductController.java @@ -0,0 +1,106 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.pojo.form.GoodsForm; +import cc.hiver.mall.pojo.query.GoodsPageQuery; +import cc.hiver.mall.pojo.vo.GoodsDetailVO; +import cc.hiver.mall.pojo.vo.GoodsPageVO; +import cc.hiver.mall.pojo.vo.MallGoodsDetailVO; +import cc.hiver.mall.pojo.vo.MallGoodsPageVO; +import cc.hiver.mall.service.mybatis.GoodsService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "货品接口") +@RequestMapping(value = "/hiver/app/product/") +@Transactional +public class ProductController { + @Autowired + private ProductService productService; + + @RequestMapping(value = "/save", method = RequestMethod.POST) + @ApiOperation(value = "新增货品") + public Result addSpu(Product product) { + boolean result = productService.save(product); + if(result) { + return ResultUtil.success("添加成功"); + } else { + return ResultUtil.error("添加失败"); + } + } + + @RequestMapping(value = "/edit", method = RequestMethod.POST) + @ApiOperation(value = "根据货品id修改货品") + public Result updateSpuById(Product product) { + boolean result = productService.updateById(product); + if(result) { + return ResultUtil.success("修改成功"); + } else { + return ResultUtil.error("修改失败"); + } + } + + @RequestMapping(value = "/delByIds", method = RequestMethod.POST) + @ApiOperation(value = "根据id删除货品") + public Result delete(Product product) { + boolean result = productService.removeById(product); + if(result) { + return ResultUtil.success("删除成功"); + } else { + return ResultUtil.error("删除失败"); + } + } + +// @RequestMapping(value = "/listGoodsPages", method = RequestMethod.POST) +// @ApiOperation(value = "商品分页列表[服务端]") +// public Result> listGoodsPages(GoodsPageQuery queryParams) { +// IPage result = goodsService.listGoodsPages(queryParams); +// return new ResultUtil>().setData(result); +// } + +// @RequestMapping(value = "/getGoodsDetail/{id}", method = RequestMethod.GET) +// @ApiOperation(value = "获得商品详情[服务端]") +// public Result getGoodsDetail(@ApiParam("商品ID") @PathVariable String id) { +// GoodsDetailVO goodsDetailVO = goodsService.getGoodsDetail(id); +// return new ResultUtil().setData(goodsDetailVO); +// } + + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ApiOperation(value = "查询货品列表") + public Result list() { + QueryWrapper queryWrapper = new QueryWrapper<>(); + List list = productService.list(queryWrapper); + return new ResultUtil>().setData(list); + } + + @RequestMapping(value = "/listByName", method = RequestMethod.GET) + @ApiOperation(value = "根据货品名称查询货品列表") + public Result listByName(String name) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.like("product_name",name); + List list = productService.list(queryWrapper); + return new ResultUtil>().setData(list); + } + +// @RequestMapping(value = "/getMallGoodsDetail/{id}", method = RequestMethod.GET) +// @ApiOperation(value = "获取商品详情[客户端]") +// public Result getMallGoodsDetail(@ApiParam("商品ID") @PathVariable String id) { +// MallGoodsDetailVO mallGoodsDetailVO = goodsService.getMallGoodsDetail(id); +// return new ResultUtil().setData(mallGoodsDetailVO); +// } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PurchaseController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PurchaseController.java new file mode 100644 index 00000000..3a28cceb --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PurchaseController.java @@ -0,0 +1,99 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ObjectUtil; +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.utils.StringUtils; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.entity.PurchaseDetail; +import cc.hiver.mall.pojo.vo.PurchaseVo; +import cc.hiver.mall.service.mybatis.PurchaseDetailService; +import cc.hiver.mall.service.mybatis.PurchaseService; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "采购单接口") +@RequestMapping(value = "/hiver/app/purchase/") +@Transactional +public class PurchaseController { + + @Autowired + private PurchaseService purchaseService; + + @Autowired + private PurchaseDetailService purchaseDetailService; + + @RequestMapping(value = "/save", method = RequestMethod.POST) + @ApiOperation(value = "新增采购单") + public Result addSpu(PurchaseVo purchaseVo) { + Purchase purchase = purchaseVo.getPurchase(); + List purchaseDetails = purchaseVo.getPurchaseDetails(); + boolean result = purchaseService.save(purchase); + if(result) { + boolean saveBatch = purchaseDetailService.saveBatch(purchaseDetails); + return saveBatch ? ResultUtil.success("添加成功"):ResultUtil.error("添加失败"); + } else { + return ResultUtil.error("添加失败"); + } + } + + @RequestMapping(value = "/edit", method = RequestMethod.POST) + @ApiOperation(value = "根据id修改货品属性") + public Result updateSpuById(PurchaseVo purchaseVo) { + Purchase purchase = purchaseVo.getPurchase(); + List purchaseDetails = purchaseVo.getPurchaseDetails(); + boolean result = purchaseService.updateById(purchase); + if(result) { + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.eq("purchase_id",purchase.getId()); + boolean removeBatchByIds = purchaseDetailService.remove(deleteWrapper); + if (removeBatchByIds){ + return purchaseDetailService.saveBatch(purchaseDetails)?ResultUtil.success("修改成功"):ResultUtil.error("修改失败"); + } + } + return ResultUtil.error("修改失败"); + } + + @RequestMapping(value = "/delByIds", method = RequestMethod.POST) + @ApiOperation(value = "根据id删除采购单") + public Result delete(Purchase purchase) { + boolean result = purchaseService.removeById(purchase); + if(result) { + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.eq("purchase_id",purchase.getId()); + boolean removeBatchByIds = purchaseDetailService.remove(deleteWrapper); + if (removeBatchByIds){ + return ResultUtil.success("删除成功"); + } + } + return ResultUtil.error("删除失败"); + } + + @RequestMapping(value = "/list", method = RequestMethod.GET) + @ApiOperation(value = "查询采购单列表") + public Result list(Purchase purchase) { + + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (!ObjectUtils.isEmpty(purchase)){ + if (ObjectUtils.isEmpty(purchase.getId())) queryWrapper.eq("id",purchase.getId()); + if (StringUtils.isEmpty(purchase.getShopId())) queryWrapper.eq("shop_id",purchase.getShopId()); + if (StringUtils.isEmpty(purchase.getSupplierId())) queryWrapper.eq("supplier_id",purchase.getSupplierId()); + } + List list = purchaseService.list(queryWrapper); + return new ResultUtil>().setData(list); + } + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/StockController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/StockController.java new file mode 100644 index 00000000..2a6b3a82 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/StockController.java @@ -0,0 +1,53 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.utils.StringUtils; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.entity.PurchaseDetail; +import cc.hiver.mall.entity.Stock; +import cc.hiver.mall.pojo.vo.PurchaseVo; +import cc.hiver.mall.pojo.vo.StockVo; +import cc.hiver.mall.service.mybatis.PurchaseDetailService; +import cc.hiver.mall.service.mybatis.PurchaseService; +import cc.hiver.mall.service.mybatis.StockLogService; +import cc.hiver.mall.service.mybatis.StockService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "库存接口") +@RequestMapping(value = "/hiver/app/stock/") +@Transactional +public class StockController { + + @Autowired + private PurchaseService purchaseService; + + @Autowired + private PurchaseDetailService purchaseDetailService; + + @Autowired + private StockService stockService; + + @Autowired + private StockLogService stockLogService; + + @RequestMapping(value = "/putIn", method = RequestMethod.POST) + @ApiOperation(value = "入库") + public Result putIn(StockVo stockVo) { + return stockService.putIn(stockVo); + } + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeMapper.java new file mode 100644 index 00000000..b16c5e07 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeMapper.java @@ -0,0 +1,34 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.GoodsAttribute; +import cc.hiver.mall.entity.ProductAttribute; +import cc.hiver.mall.entity.ProductAttributeExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface ProductAttributeMapper extends BaseMapper { + long countByExample(ProductAttributeExample example); + + int deleteByExample(ProductAttributeExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProductAttribute record); + + int insertSelective(ProductAttribute record); + + List selectByExample(ProductAttributeExample example); + + ProductAttribute selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProductAttribute record, @Param("example") ProductAttributeExample example); + + int updateByExample(@Param("record") ProductAttribute record, @Param("example") ProductAttributeExample example); + + int updateByPrimaryKeySelective(ProductAttribute record); + + int updateByPrimaryKey(ProductAttribute record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeValueMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeValueMapper.java new file mode 100644 index 00000000..c1fcc2ab --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductAttributeValueMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.ProductAttributeValue; +import cc.hiver.mall.entity.ProductAttributeValueExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface ProductAttributeValueMapper extends BaseMapper { + long countByExample(ProductAttributeValueExample example); + + int deleteByExample(ProductAttributeValueExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProductAttributeValue record); + + int insertSelective(ProductAttributeValue record); + + List selectByExample(ProductAttributeValueExample example); + + ProductAttributeValue selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProductAttributeValue record, @Param("example") ProductAttributeValueExample example); + + int updateByExample(@Param("record") ProductAttributeValue record, @Param("example") ProductAttributeValueExample example); + + int updateByPrimaryKeySelective(ProductAttributeValue record); + + int updateByPrimaryKey(ProductAttributeValue record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductCategoryMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductCategoryMapper.java new file mode 100644 index 00000000..9945518a --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductCategoryMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.ProductCategory; +import cc.hiver.mall.entity.ProductCategoryExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface ProductCategoryMapper extends BaseMapper { + long countByExample(ProductCategoryExample example); + + int deleteByExample(ProductCategoryExample example); + + int deleteByPrimaryKey(Long id); + + int insert(ProductCategory record); + + int insertSelective(ProductCategory record); + + List selectByExample(ProductCategoryExample example); + + ProductCategory selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") ProductCategory record, @Param("example") ProductCategoryExample example); + + int updateByExample(@Param("record") ProductCategory record, @Param("example") ProductCategoryExample example); + + int updateByPrimaryKeySelective(ProductCategory record); + + int updateByPrimaryKey(ProductCategory record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java new file mode 100644 index 00000000..181066cb --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ProductMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface ProductMapper extends BaseMapper { + long countByExample(ProductExample example); + + int deleteByExample(ProductExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Product record); + + int insertSelective(Product record); + + List selectByExample(ProductExample example); + + Product selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Product record, @Param("example") ProductExample example); + + int updateByExample(@Param("record") Product record, @Param("example") ProductExample example); + + int updateByPrimaryKeySelective(Product record); + + int updateByPrimaryKey(Product record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseDetailMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseDetailMapper.java new file mode 100644 index 00000000..22cdf009 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseDetailMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.PurchaseDetail; +import cc.hiver.mall.entity.PurchaseDetailExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface PurchaseDetailMapper extends BaseMapper { + long countByExample(PurchaseDetailExample example); + + int deleteByExample(PurchaseDetailExample example); + + int deleteByPrimaryKey(Long id); + + int insert(PurchaseDetail record); + + int insertSelective(PurchaseDetail record); + + List selectByExample(PurchaseDetailExample example); + + PurchaseDetail selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") PurchaseDetail record, @Param("example") PurchaseDetailExample example); + + int updateByExample(@Param("record") PurchaseDetail record, @Param("example") PurchaseDetailExample example); + + int updateByPrimaryKeySelective(PurchaseDetail record); + + int updateByPrimaryKey(PurchaseDetail record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseMapper.java new file mode 100644 index 00000000..9972e688 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/PurchaseMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.entity.PurchaseExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface PurchaseMapper extends BaseMapper { + long countByExample(PurchaseExample example); + + int deleteByExample(PurchaseExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Purchase record); + + int insertSelective(Purchase record); + + List selectByExample(PurchaseExample example); + + Purchase selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Purchase record, @Param("example") PurchaseExample example); + + int updateByExample(@Param("record") Purchase record, @Param("example") PurchaseExample example); + + int updateByPrimaryKeySelective(Purchase record); + + int updateByPrimaryKey(Purchase record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockLogMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockLogMapper.java new file mode 100644 index 00000000..3d7dd303 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockLogMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.StockLog; +import cc.hiver.mall.entity.StockLogExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface StockLogMapper extends BaseMapper { + long countByExample(StockLogExample example); + + int deleteByExample(StockLogExample example); + + int deleteByPrimaryKey(Long id); + + int insert(StockLog record); + + int insertSelective(StockLog record); + + List selectByExample(StockLogExample example); + + StockLog selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") StockLog record, @Param("example") StockLogExample example); + + int updateByExample(@Param("record") StockLog record, @Param("example") StockLogExample example); + + int updateByPrimaryKeySelective(StockLog record); + + int updateByPrimaryKey(StockLog record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockMapper.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockMapper.java new file mode 100644 index 00000000..dc3123dd --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/StockMapper.java @@ -0,0 +1,33 @@ +package cc.hiver.mall.dao.mapper; + +import cc.hiver.mall.entity.Stock; +import cc.hiver.mall.entity.StockExample; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.stereotype.Repository; + +import java.util.List; +@Repository +public interface StockMapper extends BaseMapper { + long countByExample(StockExample example); + + int deleteByExample(StockExample example); + + int deleteByPrimaryKey(Long id); + + int insert(Stock record); + + int insertSelective(Stock record); + + List selectByExample(StockExample example); + + Stock selectByPrimaryKey(Long id); + + int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); + + int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); + + int updateByPrimaryKeySelective(Stock record); + + int updateByPrimaryKey(Stock record); +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java new file mode 100644 index 00000000..25a73a65 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Product.java @@ -0,0 +1,281 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +@ApiModel(value = "货品表") +public class Product implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "商品名称") + private String productName; + + @ApiModelProperty(value = "单位") + private String unit; + + @ApiModelProperty(value = "店铺ID") + private String shopId; + + @ApiModelProperty(value = "商品分类") + private Long categoryId; + + @ApiModelProperty(value = "商品属性列表") + private String attributeList; + + @ApiModelProperty(value = "供应商") + private String supplierId; + + @ApiModelProperty(value = "货号") + private String productSn; + + @ApiModelProperty(value = "条码") + private String barcode; + + @ApiModelProperty(value = "市场价") + private BigDecimal price; + + @ApiModelProperty(value = "采购价") + private BigDecimal purchasePrice; + + @ApiModelProperty(value = "批发价") + private BigDecimal wholesalePrice; + + @ApiModelProperty(value = "货品图片") + private String productPicture; + + @ApiModelProperty(value = "货品视频") + private String productVideo; + + @ApiModelProperty(value = "货品简介") + private String productIntro; + + @ApiModelProperty(value = "销售周期") + private String salesWeek; + + @ApiModelProperty(value = "打印条码(自己制作的)") + private String printBarcode; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public Long getCategoryId() { + return categoryId; + } + + public void setCategoryId(Long categoryId) { + this.categoryId = categoryId; + } + + public String getAttributeList() { + return attributeList; + } + + public void setAttributeList(String attributeList) { + this.attributeList = attributeList; + } + + public String getSupplierId() { + return supplierId; + } + + public void setSupplierId(String supplierId) { + this.supplierId = supplierId; + } + + public String getProductSn() { + return productSn; + } + + public void setProductSn(String productSn) { + this.productSn = productSn; + } + + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public BigDecimal getPurchasePrice() { + return purchasePrice; + } + + public void setPurchasePrice(BigDecimal purchasePrice) { + this.purchasePrice = purchasePrice; + } + + public BigDecimal getWholesalePrice() { + return wholesalePrice; + } + + public void setWholesalePrice(BigDecimal wholesalePrice) { + this.wholesalePrice = wholesalePrice; + } + + public String getProductPicture() { + return productPicture; + } + + public void setProductPicture(String productPicture) { + this.productPicture = productPicture; + } + + public String getProductVideo() { + return productVideo; + } + + public void setProductVideo(String productVideo) { + this.productVideo = productVideo; + } + + public String getProductIntro() { + return productIntro; + } + + public void setProductIntro(String productIntro) { + this.productIntro = productIntro; + } + + public String getSalesWeek() { + return salesWeek; + } + + public void setSalesWeek(String salesWeek) { + this.salesWeek = salesWeek; + } + + public String getPrintBarcode() { + return printBarcode; + } + + public void setPrintBarcode(String printBarcode) { + this.printBarcode = printBarcode; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", productName=").append(productName); + sb.append(", unit=").append(unit); + sb.append(", shopId=").append(shopId); + sb.append(", categoryId=").append(categoryId); + sb.append(", attributeList=").append(attributeList); + sb.append(", supplierId=").append(supplierId); + sb.append(", productSn=").append(productSn); + sb.append(", barcode=").append(barcode); + sb.append(", price=").append(price); + sb.append(", purchasePrice=").append(purchasePrice); + sb.append(", wholesalePrice=").append(wholesalePrice); + sb.append(", productPicture=").append(productPicture); + sb.append(", productVideo=").append(productVideo); + sb.append(", productIntro=").append(productIntro); + sb.append(", salesWeek=").append(salesWeek); + sb.append(", printBarcode=").append(printBarcode); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttribute.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttribute.java new file mode 100644 index 00000000..9dfdf4f2 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttribute.java @@ -0,0 +1,112 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; +@ApiModel(value = "货品属性") +public class ProductAttribute implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "商品类别ID") + private Long categoryId; + + @ApiModelProperty(value = "属性名称") + private String attributeName; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getCategoryId() { + return categoryId; + } + + public void setCategoryId(Long categoryId) { + this.categoryId = categoryId; + } + + public String getAttributeName() { + return attributeName; + } + + public void setAttributeName(String attributeName) { + this.attributeName = attributeName; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", categoryId=").append(categoryId); + sb.append(", attributeName=").append(attributeName); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeExample.java new file mode 100644 index 00000000..be5bcf0c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeExample.java @@ -0,0 +1,710 @@ +package cc.hiver.mall.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductAttributeExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductAttributeExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andCategoryIdIsNull() { + addCriterion("category_id is null"); + return (Criteria) this; + } + + public Criteria andCategoryIdIsNotNull() { + addCriterion("category_id is not null"); + return (Criteria) this; + } + + public Criteria andCategoryIdEqualTo(Long value) { + addCriterion("category_id =", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotEqualTo(Long value) { + addCriterion("category_id <>", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdGreaterThan(Long value) { + addCriterion("category_id >", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdGreaterThanOrEqualTo(Long value) { + addCriterion("category_id >=", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdLessThan(Long value) { + addCriterion("category_id <", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdLessThanOrEqualTo(Long value) { + addCriterion("category_id <=", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdIn(List values) { + addCriterion("category_id in", values, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotIn(List values) { + addCriterion("category_id not in", values, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdBetween(Long value1, Long value2) { + addCriterion("category_id between", value1, value2, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotBetween(Long value1, Long value2) { + addCriterion("category_id not between", value1, value2, "categoryId"); + return (Criteria) this; + } + + public Criteria andAttributeNameIsNull() { + addCriterion("attribute_name is null"); + return (Criteria) this; + } + + public Criteria andAttributeNameIsNotNull() { + addCriterion("attribute_name is not null"); + return (Criteria) this; + } + + public Criteria andAttributeNameEqualTo(String value) { + addCriterion("attribute_name =", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameNotEqualTo(String value) { + addCriterion("attribute_name <>", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameGreaterThan(String value) { + addCriterion("attribute_name >", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameGreaterThanOrEqualTo(String value) { + addCriterion("attribute_name >=", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameLessThan(String value) { + addCriterion("attribute_name <", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameLessThanOrEqualTo(String value) { + addCriterion("attribute_name <=", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameLike(String value) { + addCriterion("attribute_name like", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameNotLike(String value) { + addCriterion("attribute_name not like", value, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameIn(List values) { + addCriterion("attribute_name in", values, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameNotIn(List values) { + addCriterion("attribute_name not in", values, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameBetween(String value1, String value2) { + addCriterion("attribute_name between", value1, value2, "attributeName"); + return (Criteria) this; + } + + public Criteria andAttributeNameNotBetween(String value1, String value2) { + addCriterion("attribute_name not between", value1, value2, "attributeName"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValue.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValue.java new file mode 100644 index 00000000..6db5ce32 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValue.java @@ -0,0 +1,112 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; +@ApiModel(value = "货品规格表") +public class ProductAttributeValue implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "商品属性ID") + private Long attributeId; + + @ApiModelProperty(value = "属性值") + private String value; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getAttributeId() { + return attributeId; + } + + public void setAttributeId(Long attributeId) { + this.attributeId = attributeId; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", attributeId=").append(attributeId); + sb.append(", value=").append(value); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValueExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValueExample.java new file mode 100644 index 00000000..d9232797 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductAttributeValueExample.java @@ -0,0 +1,710 @@ +package cc.hiver.mall.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductAttributeValueExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductAttributeValueExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andAttributeIdIsNull() { + addCriterion("attribute_id is null"); + return (Criteria) this; + } + + public Criteria andAttributeIdIsNotNull() { + addCriterion("attribute_id is not null"); + return (Criteria) this; + } + + public Criteria andAttributeIdEqualTo(Long value) { + addCriterion("attribute_id =", value, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdNotEqualTo(Long value) { + addCriterion("attribute_id <>", value, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdGreaterThan(Long value) { + addCriterion("attribute_id >", value, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdGreaterThanOrEqualTo(Long value) { + addCriterion("attribute_id >=", value, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdLessThan(Long value) { + addCriterion("attribute_id <", value, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdLessThanOrEqualTo(Long value) { + addCriterion("attribute_id <=", value, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdIn(List values) { + addCriterion("attribute_id in", values, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdNotIn(List values) { + addCriterion("attribute_id not in", values, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdBetween(Long value1, Long value2) { + addCriterion("attribute_id between", value1, value2, "attributeId"); + return (Criteria) this; + } + + public Criteria andAttributeIdNotBetween(Long value1, Long value2) { + addCriterion("attribute_id not between", value1, value2, "attributeId"); + return (Criteria) this; + } + + public Criteria andValueIsNull() { + addCriterion("value is null"); + return (Criteria) this; + } + + public Criteria andValueIsNotNull() { + addCriterion("value is not null"); + return (Criteria) this; + } + + public Criteria andValueEqualTo(String value) { + addCriterion("value =", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotEqualTo(String value) { + addCriterion("value <>", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThan(String value) { + addCriterion("value >", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThanOrEqualTo(String value) { + addCriterion("value >=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThan(String value) { + addCriterion("value <", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThanOrEqualTo(String value) { + addCriterion("value <=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLike(String value) { + addCriterion("value like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotLike(String value) { + addCriterion("value not like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueIn(List values) { + addCriterion("value in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List values) { + addCriterion("value not in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueBetween(String value1, String value2) { + addCriterion("value between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andValueNotBetween(String value1, String value2) { + addCriterion("value not between", value1, value2, "value"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategory.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategory.java new file mode 100644 index 00000000..545dec03 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategory.java @@ -0,0 +1,112 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; +@ApiModel(value = "货品分类表") +public class ProductCategory implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "商品类别名称") + private String categoryName; + + @ApiModelProperty(value = "父id") + private Long parentId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getCategoryName() { + return categoryName; + } + + public void setCategoryName(String categoryName) { + this.categoryName = categoryName; + } + + public Long getParentId() { + return parentId; + } + + public void setParentId(Long parentId) { + this.parentId = parentId; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", categoryName=").append(categoryName); + sb.append(", parentId=").append(parentId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategoryExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategoryExample.java new file mode 100644 index 00000000..63d4e19b --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductCategoryExample.java @@ -0,0 +1,710 @@ +package cc.hiver.mall.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductCategoryExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductCategoryExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andCategoryNameIsNull() { + addCriterion("category_name is null"); + return (Criteria) this; + } + + public Criteria andCategoryNameIsNotNull() { + addCriterion("category_name is not null"); + return (Criteria) this; + } + + public Criteria andCategoryNameEqualTo(String value) { + addCriterion("category_name =", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameNotEqualTo(String value) { + addCriterion("category_name <>", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameGreaterThan(String value) { + addCriterion("category_name >", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameGreaterThanOrEqualTo(String value) { + addCriterion("category_name >=", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameLessThan(String value) { + addCriterion("category_name <", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameLessThanOrEqualTo(String value) { + addCriterion("category_name <=", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameLike(String value) { + addCriterion("category_name like", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameNotLike(String value) { + addCriterion("category_name not like", value, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameIn(List values) { + addCriterion("category_name in", values, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameNotIn(List values) { + addCriterion("category_name not in", values, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameBetween(String value1, String value2) { + addCriterion("category_name between", value1, value2, "categoryName"); + return (Criteria) this; + } + + public Criteria andCategoryNameNotBetween(String value1, String value2) { + addCriterion("category_name not between", value1, value2, "categoryName"); + return (Criteria) this; + } + + public Criteria andParentIdIsNull() { + addCriterion("parent_id is null"); + return (Criteria) this; + } + + public Criteria andParentIdIsNotNull() { + addCriterion("parent_id is not null"); + return (Criteria) this; + } + + public Criteria andParentIdEqualTo(Long value) { + addCriterion("parent_id =", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotEqualTo(Long value) { + addCriterion("parent_id <>", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThan(Long value) { + addCriterion("parent_id >", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdGreaterThanOrEqualTo(Long value) { + addCriterion("parent_id >=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThan(Long value) { + addCriterion("parent_id <", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdLessThanOrEqualTo(Long value) { + addCriterion("parent_id <=", value, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdIn(List values) { + addCriterion("parent_id in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotIn(List values) { + addCriterion("parent_id not in", values, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdBetween(Long value1, Long value2) { + addCriterion("parent_id between", value1, value2, "parentId"); + return (Criteria) this; + } + + public Criteria andParentIdNotBetween(Long value1, Long value2) { + addCriterion("parent_id not between", value1, value2, "parentId"); + return (Criteria) this; + } + } + + public 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductExample.java new file mode 100644 index 00000000..01849921 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/ProductExample.java @@ -0,0 +1,1661 @@ +package cc.hiver.mall.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ProductExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public ProductExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andProductNameIsNull() { + addCriterion("product_name is null"); + return (Criteria) this; + } + + public Criteria andProductNameIsNotNull() { + addCriterion("product_name is not null"); + return (Criteria) this; + } + + public Criteria andProductNameEqualTo(String value) { + addCriterion("product_name =", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotEqualTo(String value) { + addCriterion("product_name <>", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThan(String value) { + addCriterion("product_name >", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThanOrEqualTo(String value) { + addCriterion("product_name >=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThan(String value) { + addCriterion("product_name <", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThanOrEqualTo(String value) { + addCriterion("product_name <=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLike(String value) { + addCriterion("product_name like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotLike(String value) { + addCriterion("product_name not like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameIn(List values) { + addCriterion("product_name in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotIn(List values) { + addCriterion("product_name not in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameBetween(String value1, String value2) { + addCriterion("product_name between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotBetween(String value1, String value2) { + addCriterion("product_name not between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andUnitIsNull() { + addCriterion("unit is null"); + return (Criteria) this; + } + + public Criteria andUnitIsNotNull() { + addCriterion("unit is not null"); + return (Criteria) this; + } + + public Criteria andUnitEqualTo(String value) { + addCriterion("unit =", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotEqualTo(String value) { + addCriterion("unit <>", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitGreaterThan(String value) { + addCriterion("unit >", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitGreaterThanOrEqualTo(String value) { + addCriterion("unit >=", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitLessThan(String value) { + addCriterion("unit <", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitLessThanOrEqualTo(String value) { + addCriterion("unit <=", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitLike(String value) { + addCriterion("unit like", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotLike(String value) { + addCriterion("unit not like", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitIn(List values) { + addCriterion("unit in", values, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotIn(List values) { + addCriterion("unit not in", values, "unit"); + return (Criteria) this; + } + + public Criteria andUnitBetween(String value1, String value2) { + addCriterion("unit between", value1, value2, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotBetween(String value1, String value2) { + addCriterion("unit not between", value1, value2, "unit"); + return (Criteria) this; + } + + public Criteria andShopIdIsNull() { + addCriterion("shop_id is null"); + return (Criteria) this; + } + + public Criteria andShopIdIsNotNull() { + addCriterion("shop_id is not null"); + return (Criteria) this; + } + + public Criteria andShopIdEqualTo(String value) { + addCriterion("shop_id =", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotEqualTo(String value) { + addCriterion("shop_id <>", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThan(String value) { + addCriterion("shop_id >", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThanOrEqualTo(String value) { + addCriterion("shop_id >=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThan(String value) { + addCriterion("shop_id <", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThanOrEqualTo(String value) { + addCriterion("shop_id <=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLike(String value) { + addCriterion("shop_id like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotLike(String value) { + addCriterion("shop_id not like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdIn(List values) { + addCriterion("shop_id in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotIn(List values) { + addCriterion("shop_id not in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdBetween(String value1, String value2) { + addCriterion("shop_id between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotBetween(String value1, String value2) { + addCriterion("shop_id not between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andCategoryIdIsNull() { + addCriterion("category_id is null"); + return (Criteria) this; + } + + public Criteria andCategoryIdIsNotNull() { + addCriterion("category_id is not null"); + return (Criteria) this; + } + + public Criteria andCategoryIdEqualTo(Long value) { + addCriterion("category_id =", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotEqualTo(Long value) { + addCriterion("category_id <>", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdGreaterThan(Long value) { + addCriterion("category_id >", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdGreaterThanOrEqualTo(Long value) { + addCriterion("category_id >=", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdLessThan(Long value) { + addCriterion("category_id <", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdLessThanOrEqualTo(Long value) { + addCriterion("category_id <=", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdIn(List values) { + addCriterion("category_id in", values, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotIn(List values) { + addCriterion("category_id not in", values, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdBetween(Long value1, Long value2) { + addCriterion("category_id between", value1, value2, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotBetween(Long value1, Long value2) { + addCriterion("category_id not between", value1, value2, "categoryId"); + return (Criteria) this; + } + + public Criteria andAttributeListIsNull() { + addCriterion("attribute_list is null"); + return (Criteria) this; + } + + public Criteria andAttributeListIsNotNull() { + addCriterion("attribute_list is not null"); + return (Criteria) this; + } + + public Criteria andAttributeListEqualTo(String value) { + addCriterion("attribute_list =", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotEqualTo(String value) { + addCriterion("attribute_list <>", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListGreaterThan(String value) { + addCriterion("attribute_list >", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListGreaterThanOrEqualTo(String value) { + addCriterion("attribute_list >=", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListLessThan(String value) { + addCriterion("attribute_list <", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListLessThanOrEqualTo(String value) { + addCriterion("attribute_list <=", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListLike(String value) { + addCriterion("attribute_list like", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotLike(String value) { + addCriterion("attribute_list not like", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListIn(List values) { + addCriterion("attribute_list in", values, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotIn(List values) { + addCriterion("attribute_list not in", values, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListBetween(String value1, String value2) { + addCriterion("attribute_list between", value1, value2, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotBetween(String value1, String value2) { + addCriterion("attribute_list not between", value1, value2, "attributeList"); + return (Criteria) this; + } + + public Criteria andSupplierIdIsNull() { + addCriterion("supplier_id is null"); + return (Criteria) this; + } + + public Criteria andSupplierIdIsNotNull() { + addCriterion("supplier_id is not null"); + return (Criteria) this; + } + + public Criteria andSupplierIdEqualTo(String value) { + addCriterion("supplier_id =", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotEqualTo(String value) { + addCriterion("supplier_id <>", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdGreaterThan(String value) { + addCriterion("supplier_id >", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdGreaterThanOrEqualTo(String value) { + addCriterion("supplier_id >=", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLessThan(String value) { + addCriterion("supplier_id <", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLessThanOrEqualTo(String value) { + addCriterion("supplier_id <=", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLike(String value) { + addCriterion("supplier_id like", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotLike(String value) { + addCriterion("supplier_id not like", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdIn(List values) { + addCriterion("supplier_id in", values, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotIn(List values) { + addCriterion("supplier_id not in", values, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdBetween(String value1, String value2) { + addCriterion("supplier_id between", value1, value2, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotBetween(String value1, String value2) { + addCriterion("supplier_id not between", value1, value2, "supplierId"); + return (Criteria) this; + } + + public Criteria andProductSnIsNull() { + addCriterion("product_sn is null"); + return (Criteria) this; + } + + public Criteria andProductSnIsNotNull() { + addCriterion("product_sn is not null"); + return (Criteria) this; + } + + public Criteria andProductSnEqualTo(String value) { + addCriterion("product_sn =", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotEqualTo(String value) { + addCriterion("product_sn <>", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnGreaterThan(String value) { + addCriterion("product_sn >", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnGreaterThanOrEqualTo(String value) { + addCriterion("product_sn >=", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnLessThan(String value) { + addCriterion("product_sn <", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnLessThanOrEqualTo(String value) { + addCriterion("product_sn <=", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnLike(String value) { + addCriterion("product_sn like", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotLike(String value) { + addCriterion("product_sn not like", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnIn(List values) { + addCriterion("product_sn in", values, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotIn(List values) { + addCriterion("product_sn not in", values, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnBetween(String value1, String value2) { + addCriterion("product_sn between", value1, value2, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotBetween(String value1, String value2) { + addCriterion("product_sn not between", value1, value2, "productSn"); + return (Criteria) this; + } + + public Criteria andBarcodeIsNull() { + addCriterion("barcode is null"); + return (Criteria) this; + } + + public Criteria andBarcodeIsNotNull() { + addCriterion("barcode is not null"); + return (Criteria) this; + } + + public Criteria andBarcodeEqualTo(String value) { + addCriterion("barcode =", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotEqualTo(String value) { + addCriterion("barcode <>", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeGreaterThan(String value) { + addCriterion("barcode >", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeGreaterThanOrEqualTo(String value) { + addCriterion("barcode >=", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeLessThan(String value) { + addCriterion("barcode <", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeLessThanOrEqualTo(String value) { + addCriterion("barcode <=", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeLike(String value) { + addCriterion("barcode like", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotLike(String value) { + addCriterion("barcode not like", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeIn(List values) { + addCriterion("barcode in", values, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotIn(List values) { + addCriterion("barcode not in", values, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeBetween(String value1, String value2) { + addCriterion("barcode between", value1, value2, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotBetween(String value1, String value2) { + addCriterion("barcode not between", value1, value2, "barcode"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(BigDecimal value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(BigDecimal value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(BigDecimal value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(BigDecimal value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIsNull() { + addCriterion("purchase_price is null"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIsNotNull() { + addCriterion("purchase_price is not null"); + return (Criteria) this; + } + + public Criteria andPurchasePriceEqualTo(BigDecimal value) { + addCriterion("purchase_price =", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotEqualTo(BigDecimal value) { + addCriterion("purchase_price <>", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceGreaterThan(BigDecimal value) { + addCriterion("purchase_price >", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("purchase_price >=", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceLessThan(BigDecimal value) { + addCriterion("purchase_price <", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("purchase_price <=", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIn(List values) { + addCriterion("purchase_price in", values, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotIn(List values) { + addCriterion("purchase_price not in", values, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("purchase_price between", value1, value2, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("purchase_price not between", value1, value2, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIsNull() { + addCriterion("wholesale_price is null"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIsNotNull() { + addCriterion("wholesale_price is not null"); + return (Criteria) this; + } + + public Criteria andWholesalePriceEqualTo(BigDecimal value) { + addCriterion("wholesale_price =", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotEqualTo(BigDecimal value) { + addCriterion("wholesale_price <>", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceGreaterThan(BigDecimal value) { + addCriterion("wholesale_price >", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("wholesale_price >=", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceLessThan(BigDecimal value) { + addCriterion("wholesale_price <", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("wholesale_price <=", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIn(List values) { + addCriterion("wholesale_price in", values, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotIn(List values) { + addCriterion("wholesale_price not in", values, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("wholesale_price between", value1, value2, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("wholesale_price not between", value1, value2, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andProductPictureIsNull() { + addCriterion("product_picture is null"); + return (Criteria) this; + } + + public Criteria andProductPictureIsNotNull() { + addCriterion("product_picture is not null"); + return (Criteria) this; + } + + public Criteria andProductPictureEqualTo(String value) { + addCriterion("product_picture =", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotEqualTo(String value) { + addCriterion("product_picture <>", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureGreaterThan(String value) { + addCriterion("product_picture >", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureGreaterThanOrEqualTo(String value) { + addCriterion("product_picture >=", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureLessThan(String value) { + addCriterion("product_picture <", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureLessThanOrEqualTo(String value) { + addCriterion("product_picture <=", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureLike(String value) { + addCriterion("product_picture like", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotLike(String value) { + addCriterion("product_picture not like", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureIn(List values) { + addCriterion("product_picture in", values, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotIn(List values) { + addCriterion("product_picture not in", values, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureBetween(String value1, String value2) { + addCriterion("product_picture between", value1, value2, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotBetween(String value1, String value2) { + addCriterion("product_picture not between", value1, value2, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductVideoIsNull() { + addCriterion("product_video is null"); + return (Criteria) this; + } + + public Criteria andProductVideoIsNotNull() { + addCriterion("product_video is not null"); + return (Criteria) this; + } + + public Criteria andProductVideoEqualTo(String value) { + addCriterion("product_video =", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotEqualTo(String value) { + addCriterion("product_video <>", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoGreaterThan(String value) { + addCriterion("product_video >", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoGreaterThanOrEqualTo(String value) { + addCriterion("product_video >=", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoLessThan(String value) { + addCriterion("product_video <", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoLessThanOrEqualTo(String value) { + addCriterion("product_video <=", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoLike(String value) { + addCriterion("product_video like", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotLike(String value) { + addCriterion("product_video not like", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoIn(List values) { + addCriterion("product_video in", values, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotIn(List values) { + addCriterion("product_video not in", values, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoBetween(String value1, String value2) { + addCriterion("product_video between", value1, value2, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotBetween(String value1, String value2) { + addCriterion("product_video not between", value1, value2, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductIntroIsNull() { + addCriterion("product_intro is null"); + return (Criteria) this; + } + + public Criteria andProductIntroIsNotNull() { + addCriterion("product_intro is not null"); + return (Criteria) this; + } + + public Criteria andProductIntroEqualTo(String value) { + addCriterion("product_intro =", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotEqualTo(String value) { + addCriterion("product_intro <>", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroGreaterThan(String value) { + addCriterion("product_intro >", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroGreaterThanOrEqualTo(String value) { + addCriterion("product_intro >=", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroLessThan(String value) { + addCriterion("product_intro <", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroLessThanOrEqualTo(String value) { + addCriterion("product_intro <=", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroLike(String value) { + addCriterion("product_intro like", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotLike(String value) { + addCriterion("product_intro not like", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroIn(List values) { + addCriterion("product_intro in", values, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotIn(List values) { + addCriterion("product_intro not in", values, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroBetween(String value1, String value2) { + addCriterion("product_intro between", value1, value2, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotBetween(String value1, String value2) { + addCriterion("product_intro not between", value1, value2, "productIntro"); + return (Criteria) this; + } + + public Criteria andSalesWeekIsNull() { + addCriterion("sales_week is null"); + return (Criteria) this; + } + + public Criteria andSalesWeekIsNotNull() { + addCriterion("sales_week is not null"); + return (Criteria) this; + } + + public Criteria andSalesWeekEqualTo(String value) { + addCriterion("sales_week =", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotEqualTo(String value) { + addCriterion("sales_week <>", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekGreaterThan(String value) { + addCriterion("sales_week >", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekGreaterThanOrEqualTo(String value) { + addCriterion("sales_week >=", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekLessThan(String value) { + addCriterion("sales_week <", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekLessThanOrEqualTo(String value) { + addCriterion("sales_week <=", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekLike(String value) { + addCriterion("sales_week like", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotLike(String value) { + addCriterion("sales_week not like", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekIn(List values) { + addCriterion("sales_week in", values, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotIn(List values) { + addCriterion("sales_week not in", values, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekBetween(String value1, String value2) { + addCriterion("sales_week between", value1, value2, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotBetween(String value1, String value2) { + addCriterion("sales_week not between", value1, value2, "salesWeek"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeIsNull() { + addCriterion("print_barcode is null"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeIsNotNull() { + addCriterion("print_barcode is not null"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeEqualTo(String value) { + addCriterion("print_barcode =", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotEqualTo(String value) { + addCriterion("print_barcode <>", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeGreaterThan(String value) { + addCriterion("print_barcode >", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeGreaterThanOrEqualTo(String value) { + addCriterion("print_barcode >=", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeLessThan(String value) { + addCriterion("print_barcode <", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeLessThanOrEqualTo(String value) { + addCriterion("print_barcode <=", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeLike(String value) { + addCriterion("print_barcode like", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotLike(String value) { + addCriterion("print_barcode not like", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeIn(List values) { + addCriterion("print_barcode in", values, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotIn(List values) { + addCriterion("print_barcode not in", values, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeBetween(String value1, String value2) { + addCriterion("print_barcode between", value1, value2, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotBetween(String value1, String value2) { + addCriterion("print_barcode not between", value1, value2, "printBarcode"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Purchase.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Purchase.java new file mode 100644 index 00000000..0024cb1a --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Purchase.java @@ -0,0 +1,161 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +@ApiModel(value = "采购单主表") +public class Purchase implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "供应商ID") + private String supplierId; + + @ApiModelProperty(value = "店铺ID") + private String shopId; + + @ApiModelProperty(value = "订单金额") + private BigDecimal totalAmount; + + @ApiModelProperty(value = "应付") + private BigDecimal shouldPay; + + @ApiModelProperty(value = "已付") + private BigDecimal alreadyPay; + + @ApiModelProperty(value = "未付") + private BigDecimal noPay; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public String getSupplierId() { + return supplierId; + } + + public void setSupplierId(String supplierId) { + this.supplierId = supplierId; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public BigDecimal getTotalAmount() { + return totalAmount; + } + + public void setTotalAmount(BigDecimal totalAmount) { + this.totalAmount = totalAmount; + } + + public BigDecimal getShouldPay() { + return shouldPay; + } + + public void setShouldPay(BigDecimal shouldPay) { + this.shouldPay = shouldPay; + } + + public BigDecimal getAlreadyPay() { + return alreadyPay; + } + + public void setAlreadyPay(BigDecimal alreadyPay) { + this.alreadyPay = alreadyPay; + } + + public BigDecimal getNoPay() { + return noPay; + } + + public void setNoPay(BigDecimal noPay) { + this.noPay = noPay; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", supplierId=").append(supplierId); + sb.append(", shopId=").append(shopId); + sb.append(", totalAmount=").append(totalAmount); + sb.append(", shouldPay=").append(shouldPay); + sb.append(", alreadyPay=").append(alreadyPay); + sb.append(", noPay=").append(noPay); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetail.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetail.java new file mode 100644 index 00000000..fef1ed66 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetail.java @@ -0,0 +1,136 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.util.Date; +@ApiModel(value = "采购单明细表") +public class PurchaseDetail implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "采购单ID") + private Long purchaseId; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "商品规格") + private String productSpecs; + + @ApiModelProperty(value = "采购数量") + private Integer productCount; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getPurchaseId() { + return purchaseId; + } + + public void setPurchaseId(Long purchaseId) { + this.purchaseId = purchaseId; + } + + public Long getProductId() { + return productId; + } + + public void setProductId(Long productId) { + this.productId = productId; + } + + public String getProductSpecs() { + return productSpecs; + } + + public void setProductSpecs(String productSpecs) { + this.productSpecs = productSpecs; + } + + public Integer getProductCount() { + return productCount; + } + + public void setProductCount(Integer productCount) { + this.productCount = productCount; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", purchaseId=").append(purchaseId); + sb.append(", productId=").append(productId); + sb.append(", productSpecs=").append(productSpecs); + sb.append(", productCount=").append(productCount); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetailExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetailExample.java new file mode 100644 index 00000000..c3b78a5b --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseDetailExample.java @@ -0,0 +1,830 @@ +package cc.hiver.mall.entity; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class PurchaseDetailExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public PurchaseDetailExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andPurchaseIdIsNull() { + addCriterion("purchase_id is null"); + return (Criteria) this; + } + + public Criteria andPurchaseIdIsNotNull() { + addCriterion("purchase_id is not null"); + return (Criteria) this; + } + + public Criteria andPurchaseIdEqualTo(Long value) { + addCriterion("purchase_id =", value, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdNotEqualTo(Long value) { + addCriterion("purchase_id <>", value, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdGreaterThan(Long value) { + addCriterion("purchase_id >", value, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdGreaterThanOrEqualTo(Long value) { + addCriterion("purchase_id >=", value, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdLessThan(Long value) { + addCriterion("purchase_id <", value, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdLessThanOrEqualTo(Long value) { + addCriterion("purchase_id <=", value, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdIn(List values) { + addCriterion("purchase_id in", values, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdNotIn(List values) { + addCriterion("purchase_id not in", values, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdBetween(Long value1, Long value2) { + addCriterion("purchase_id between", value1, value2, "purchaseId"); + return (Criteria) this; + } + + public Criteria andPurchaseIdNotBetween(Long value1, Long value2) { + addCriterion("purchase_id not between", value1, value2, "purchaseId"); + return (Criteria) this; + } + + public Criteria andProductIdIsNull() { + addCriterion("product_id is null"); + return (Criteria) this; + } + + public Criteria andProductIdIsNotNull() { + addCriterion("product_id is not null"); + return (Criteria) this; + } + + public Criteria andProductIdEqualTo(Long value) { + addCriterion("product_id =", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotEqualTo(Long value) { + addCriterion("product_id <>", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThan(Long value) { + addCriterion("product_id >", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_id >=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThan(Long value) { + addCriterion("product_id <", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThanOrEqualTo(Long value) { + addCriterion("product_id <=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdIn(List values) { + addCriterion("product_id in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotIn(List values) { + addCriterion("product_id not in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdBetween(Long value1, Long value2) { + addCriterion("product_id between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotBetween(Long value1, Long value2) { + addCriterion("product_id not between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductSpecsIsNull() { + addCriterion("product_specs is null"); + return (Criteria) this; + } + + public Criteria andProductSpecsIsNotNull() { + addCriterion("product_specs is not null"); + return (Criteria) this; + } + + public Criteria andProductSpecsEqualTo(String value) { + addCriterion("product_specs =", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotEqualTo(String value) { + addCriterion("product_specs <>", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsGreaterThan(String value) { + addCriterion("product_specs >", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsGreaterThanOrEqualTo(String value) { + addCriterion("product_specs >=", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsLessThan(String value) { + addCriterion("product_specs <", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsLessThanOrEqualTo(String value) { + addCriterion("product_specs <=", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsLike(String value) { + addCriterion("product_specs like", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotLike(String value) { + addCriterion("product_specs not like", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsIn(List values) { + addCriterion("product_specs in", values, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotIn(List values) { + addCriterion("product_specs not in", values, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsBetween(String value1, String value2) { + addCriterion("product_specs between", value1, value2, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotBetween(String value1, String value2) { + addCriterion("product_specs not between", value1, value2, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductCountIsNull() { + addCriterion("product_count is null"); + return (Criteria) this; + } + + public Criteria andProductCountIsNotNull() { + addCriterion("product_count is not null"); + return (Criteria) this; + } + + public Criteria andProductCountEqualTo(Integer value) { + addCriterion("product_count =", value, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountNotEqualTo(Integer value) { + addCriterion("product_count <>", value, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountGreaterThan(Integer value) { + addCriterion("product_count >", value, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountGreaterThanOrEqualTo(Integer value) { + addCriterion("product_count >=", value, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountLessThan(Integer value) { + addCriterion("product_count <", value, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountLessThanOrEqualTo(Integer value) { + addCriterion("product_count <=", value, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountIn(List values) { + addCriterion("product_count in", values, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountNotIn(List values) { + addCriterion("product_count not in", values, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountBetween(Integer value1, Integer value2) { + addCriterion("product_count between", value1, value2, "productCount"); + return (Criteria) this; + } + + public Criteria andProductCountNotBetween(Integer value1, Integer value2) { + addCriterion("product_count not between", value1, value2, "productCount"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseExample.java new file mode 100644 index 00000000..1e10fea7 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/PurchaseExample.java @@ -0,0 +1,961 @@ +package cc.hiver.mall.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class PurchaseExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public PurchaseExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andSupplierIdIsNull() { + addCriterion("supplier_id is null"); + return (Criteria) this; + } + + public Criteria andSupplierIdIsNotNull() { + addCriterion("supplier_id is not null"); + return (Criteria) this; + } + + public Criteria andSupplierIdEqualTo(String value) { + addCriterion("supplier_id =", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotEqualTo(String value) { + addCriterion("supplier_id <>", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdGreaterThan(String value) { + addCriterion("supplier_id >", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdGreaterThanOrEqualTo(String value) { + addCriterion("supplier_id >=", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLessThan(String value) { + addCriterion("supplier_id <", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLessThanOrEqualTo(String value) { + addCriterion("supplier_id <=", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLike(String value) { + addCriterion("supplier_id like", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotLike(String value) { + addCriterion("supplier_id not like", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdIn(List values) { + addCriterion("supplier_id in", values, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotIn(List values) { + addCriterion("supplier_id not in", values, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdBetween(String value1, String value2) { + addCriterion("supplier_id between", value1, value2, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotBetween(String value1, String value2) { + addCriterion("supplier_id not between", value1, value2, "supplierId"); + return (Criteria) this; + } + + public Criteria andShopIdIsNull() { + addCriterion("shop_id is null"); + return (Criteria) this; + } + + public Criteria andShopIdIsNotNull() { + addCriterion("shop_id is not null"); + return (Criteria) this; + } + + public Criteria andShopIdEqualTo(String value) { + addCriterion("shop_id =", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotEqualTo(String value) { + addCriterion("shop_id <>", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThan(String value) { + addCriterion("shop_id >", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThanOrEqualTo(String value) { + addCriterion("shop_id >=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThan(String value) { + addCriterion("shop_id <", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThanOrEqualTo(String value) { + addCriterion("shop_id <=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLike(String value) { + addCriterion("shop_id like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotLike(String value) { + addCriterion("shop_id not like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdIn(List values) { + addCriterion("shop_id in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotIn(List values) { + addCriterion("shop_id not in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdBetween(String value1, String value2) { + addCriterion("shop_id between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotBetween(String value1, String value2) { + addCriterion("shop_id not between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andTotalAmountIsNull() { + addCriterion("total_amount is null"); + return (Criteria) this; + } + + public Criteria andTotalAmountIsNotNull() { + addCriterion("total_amount is not null"); + return (Criteria) this; + } + + public Criteria andTotalAmountEqualTo(BigDecimal value) { + addCriterion("total_amount =", value, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountNotEqualTo(BigDecimal value) { + addCriterion("total_amount <>", value, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountGreaterThan(BigDecimal value) { + addCriterion("total_amount >", value, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("total_amount >=", value, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountLessThan(BigDecimal value) { + addCriterion("total_amount <", value, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountLessThanOrEqualTo(BigDecimal value) { + addCriterion("total_amount <=", value, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountIn(List values) { + addCriterion("total_amount in", values, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountNotIn(List values) { + addCriterion("total_amount not in", values, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_amount between", value1, value2, "totalAmount"); + return (Criteria) this; + } + + public Criteria andTotalAmountNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_amount not between", value1, value2, "totalAmount"); + return (Criteria) this; + } + + public Criteria andShouldPayIsNull() { + addCriterion("should_pay is null"); + return (Criteria) this; + } + + public Criteria andShouldPayIsNotNull() { + addCriterion("should_pay is not null"); + return (Criteria) this; + } + + public Criteria andShouldPayEqualTo(BigDecimal value) { + addCriterion("should_pay =", value, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayNotEqualTo(BigDecimal value) { + addCriterion("should_pay <>", value, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayGreaterThan(BigDecimal value) { + addCriterion("should_pay >", value, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("should_pay >=", value, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayLessThan(BigDecimal value) { + addCriterion("should_pay <", value, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayLessThanOrEqualTo(BigDecimal value) { + addCriterion("should_pay <=", value, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayIn(List values) { + addCriterion("should_pay in", values, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayNotIn(List values) { + addCriterion("should_pay not in", values, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("should_pay between", value1, value2, "shouldPay"); + return (Criteria) this; + } + + public Criteria andShouldPayNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("should_pay not between", value1, value2, "shouldPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayIsNull() { + addCriterion("already_pay is null"); + return (Criteria) this; + } + + public Criteria andAlreadyPayIsNotNull() { + addCriterion("already_pay is not null"); + return (Criteria) this; + } + + public Criteria andAlreadyPayEqualTo(BigDecimal value) { + addCriterion("already_pay =", value, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayNotEqualTo(BigDecimal value) { + addCriterion("already_pay <>", value, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayGreaterThan(BigDecimal value) { + addCriterion("already_pay >", value, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("already_pay >=", value, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayLessThan(BigDecimal value) { + addCriterion("already_pay <", value, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayLessThanOrEqualTo(BigDecimal value) { + addCriterion("already_pay <=", value, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayIn(List values) { + addCriterion("already_pay in", values, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayNotIn(List values) { + addCriterion("already_pay not in", values, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("already_pay between", value1, value2, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andAlreadyPayNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("already_pay not between", value1, value2, "alreadyPay"); + return (Criteria) this; + } + + public Criteria andNoPayIsNull() { + addCriterion("no_pay is null"); + return (Criteria) this; + } + + public Criteria andNoPayIsNotNull() { + addCriterion("no_pay is not null"); + return (Criteria) this; + } + + public Criteria andNoPayEqualTo(BigDecimal value) { + addCriterion("no_pay =", value, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayNotEqualTo(BigDecimal value) { + addCriterion("no_pay <>", value, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayGreaterThan(BigDecimal value) { + addCriterion("no_pay >", value, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("no_pay >=", value, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayLessThan(BigDecimal value) { + addCriterion("no_pay <", value, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayLessThanOrEqualTo(BigDecimal value) { + addCriterion("no_pay <=", value, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayIn(List values) { + addCriterion("no_pay in", values, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayNotIn(List values) { + addCriterion("no_pay not in", values, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("no_pay between", value1, value2, "noPay"); + return (Criteria) this; + } + + public Criteria andNoPayNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("no_pay not between", value1, value2, "noPay"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Stock.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Stock.java new file mode 100644 index 00000000..03ca2543 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Stock.java @@ -0,0 +1,305 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +@ApiModel(value = "商品实时库存表") +public class Stock implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "商品id") + private Long productId; + + @ApiModelProperty(value = "商品名称") + private String productName; + + @ApiModelProperty(value = "单位") + private String unit; + + @ApiModelProperty(value = "店铺ID") + private String shopId; + + @ApiModelProperty(value = "商品分类") + private Long categoryId; + + @ApiModelProperty(value = "商品属性列表") + private String attributeList; + + @ApiModelProperty(value = "供应商") + private String supplierId; + + @ApiModelProperty(value = "货号") + private String productSn; + + @ApiModelProperty(value = "条码") + private String barcode; + + @ApiModelProperty(value = "市场价") + private BigDecimal price; + + @ApiModelProperty(value = "采购价") + private BigDecimal purchasePrice; + + @ApiModelProperty(value = "批发价") + private BigDecimal wholesalePrice; + + @ApiModelProperty(value = "货品图片") + private String productPicture; + + @ApiModelProperty(value = "货品视频") + private String productVideo; + + @ApiModelProperty(value = "货品简介") + private String productIntro; + + @ApiModelProperty(value = "销售周期") + private String salesWeek; + + @ApiModelProperty(value = "打印条码(自己制作的)") + private String printBarcode; + + @ApiModelProperty(value = "库存数量") + private Integer stockCount; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getProductId() { + return productId; + } + + public void setProductId(Long productId) { + this.productId = productId; + } + + public String getProductName() { + return productName; + } + + public void setProductName(String productName) { + this.productName = productName; + } + + public String getUnit() { + return unit; + } + + public void setUnit(String unit) { + this.unit = unit; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + public Long getCategoryId() { + return categoryId; + } + + public void setCategoryId(Long categoryId) { + this.categoryId = categoryId; + } + + public String getAttributeList() { + return attributeList; + } + + public void setAttributeList(String attributeList) { + this.attributeList = attributeList; + } + + public String getSupplierId() { + return supplierId; + } + + public void setSupplierId(String supplierId) { + this.supplierId = supplierId; + } + + public String getProductSn() { + return productSn; + } + + public void setProductSn(String productSn) { + this.productSn = productSn; + } + + public String getBarcode() { + return barcode; + } + + public void setBarcode(String barcode) { + this.barcode = barcode; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public BigDecimal getPurchasePrice() { + return purchasePrice; + } + + public void setPurchasePrice(BigDecimal purchasePrice) { + this.purchasePrice = purchasePrice; + } + + public BigDecimal getWholesalePrice() { + return wholesalePrice; + } + + public void setWholesalePrice(BigDecimal wholesalePrice) { + this.wholesalePrice = wholesalePrice; + } + + public String getProductPicture() { + return productPicture; + } + + public void setProductPicture(String productPicture) { + this.productPicture = productPicture; + } + + public String getProductVideo() { + return productVideo; + } + + public void setProductVideo(String productVideo) { + this.productVideo = productVideo; + } + + public String getProductIntro() { + return productIntro; + } + + public void setProductIntro(String productIntro) { + this.productIntro = productIntro; + } + + public String getSalesWeek() { + return salesWeek; + } + + public void setSalesWeek(String salesWeek) { + this.salesWeek = salesWeek; + } + + public String getPrintBarcode() { + return printBarcode; + } + + public void setPrintBarcode(String printBarcode) { + this.printBarcode = printBarcode; + } + + public Integer getStockCount() { + return stockCount; + } + + public void setStockCount(Integer stockCount) { + this.stockCount = stockCount; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", productId=").append(productId); + sb.append(", productName=").append(productName); + sb.append(", unit=").append(unit); + sb.append(", shopId=").append(shopId); + sb.append(", categoryId=").append(categoryId); + sb.append(", attributeList=").append(attributeList); + sb.append(", supplierId=").append(supplierId); + sb.append(", productSn=").append(productSn); + sb.append(", barcode=").append(barcode); + sb.append(", price=").append(price); + sb.append(", purchasePrice=").append(purchasePrice); + sb.append(", wholesalePrice=").append(wholesalePrice); + sb.append(", productPicture=").append(productPicture); + sb.append(", productVideo=").append(productVideo); + sb.append(", productIntro=").append(productIntro); + sb.append(", salesWeek=").append(salesWeek); + sb.append(", printBarcode=").append(printBarcode); + sb.append(", stockCount=").append(stockCount); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockExample.java new file mode 100644 index 00000000..f0099eb7 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockExample.java @@ -0,0 +1,1781 @@ +package cc.hiver.mall.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StockExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StockExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andProductIdIsNull() { + addCriterion("product_id is null"); + return (Criteria) this; + } + + public Criteria andProductIdIsNotNull() { + addCriterion("product_id is not null"); + return (Criteria) this; + } + + public Criteria andProductIdEqualTo(Long value) { + addCriterion("product_id =", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotEqualTo(Long value) { + addCriterion("product_id <>", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThan(Long value) { + addCriterion("product_id >", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_id >=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThan(Long value) { + addCriterion("product_id <", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThanOrEqualTo(Long value) { + addCriterion("product_id <=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdIn(List values) { + addCriterion("product_id in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotIn(List values) { + addCriterion("product_id not in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdBetween(Long value1, Long value2) { + addCriterion("product_id between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotBetween(Long value1, Long value2) { + addCriterion("product_id not between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductNameIsNull() { + addCriterion("product_name is null"); + return (Criteria) this; + } + + public Criteria andProductNameIsNotNull() { + addCriterion("product_name is not null"); + return (Criteria) this; + } + + public Criteria andProductNameEqualTo(String value) { + addCriterion("product_name =", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotEqualTo(String value) { + addCriterion("product_name <>", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThan(String value) { + addCriterion("product_name >", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameGreaterThanOrEqualTo(String value) { + addCriterion("product_name >=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThan(String value) { + addCriterion("product_name <", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLessThanOrEqualTo(String value) { + addCriterion("product_name <=", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameLike(String value) { + addCriterion("product_name like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotLike(String value) { + addCriterion("product_name not like", value, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameIn(List values) { + addCriterion("product_name in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotIn(List values) { + addCriterion("product_name not in", values, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameBetween(String value1, String value2) { + addCriterion("product_name between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andProductNameNotBetween(String value1, String value2) { + addCriterion("product_name not between", value1, value2, "productName"); + return (Criteria) this; + } + + public Criteria andUnitIsNull() { + addCriterion("unit is null"); + return (Criteria) this; + } + + public Criteria andUnitIsNotNull() { + addCriterion("unit is not null"); + return (Criteria) this; + } + + public Criteria andUnitEqualTo(String value) { + addCriterion("unit =", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotEqualTo(String value) { + addCriterion("unit <>", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitGreaterThan(String value) { + addCriterion("unit >", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitGreaterThanOrEqualTo(String value) { + addCriterion("unit >=", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitLessThan(String value) { + addCriterion("unit <", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitLessThanOrEqualTo(String value) { + addCriterion("unit <=", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitLike(String value) { + addCriterion("unit like", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotLike(String value) { + addCriterion("unit not like", value, "unit"); + return (Criteria) this; + } + + public Criteria andUnitIn(List values) { + addCriterion("unit in", values, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotIn(List values) { + addCriterion("unit not in", values, "unit"); + return (Criteria) this; + } + + public Criteria andUnitBetween(String value1, String value2) { + addCriterion("unit between", value1, value2, "unit"); + return (Criteria) this; + } + + public Criteria andUnitNotBetween(String value1, String value2) { + addCriterion("unit not between", value1, value2, "unit"); + return (Criteria) this; + } + + public Criteria andShopIdIsNull() { + addCriterion("shop_id is null"); + return (Criteria) this; + } + + public Criteria andShopIdIsNotNull() { + addCriterion("shop_id is not null"); + return (Criteria) this; + } + + public Criteria andShopIdEqualTo(String value) { + addCriterion("shop_id =", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotEqualTo(String value) { + addCriterion("shop_id <>", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThan(String value) { + addCriterion("shop_id >", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThanOrEqualTo(String value) { + addCriterion("shop_id >=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThan(String value) { + addCriterion("shop_id <", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThanOrEqualTo(String value) { + addCriterion("shop_id <=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLike(String value) { + addCriterion("shop_id like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotLike(String value) { + addCriterion("shop_id not like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdIn(List values) { + addCriterion("shop_id in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotIn(List values) { + addCriterion("shop_id not in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdBetween(String value1, String value2) { + addCriterion("shop_id between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotBetween(String value1, String value2) { + addCriterion("shop_id not between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andCategoryIdIsNull() { + addCriterion("category_id is null"); + return (Criteria) this; + } + + public Criteria andCategoryIdIsNotNull() { + addCriterion("category_id is not null"); + return (Criteria) this; + } + + public Criteria andCategoryIdEqualTo(Long value) { + addCriterion("category_id =", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotEqualTo(Long value) { + addCriterion("category_id <>", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdGreaterThan(Long value) { + addCriterion("category_id >", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdGreaterThanOrEqualTo(Long value) { + addCriterion("category_id >=", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdLessThan(Long value) { + addCriterion("category_id <", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdLessThanOrEqualTo(Long value) { + addCriterion("category_id <=", value, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdIn(List values) { + addCriterion("category_id in", values, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotIn(List values) { + addCriterion("category_id not in", values, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdBetween(Long value1, Long value2) { + addCriterion("category_id between", value1, value2, "categoryId"); + return (Criteria) this; + } + + public Criteria andCategoryIdNotBetween(Long value1, Long value2) { + addCriterion("category_id not between", value1, value2, "categoryId"); + return (Criteria) this; + } + + public Criteria andAttributeListIsNull() { + addCriterion("attribute_list is null"); + return (Criteria) this; + } + + public Criteria andAttributeListIsNotNull() { + addCriterion("attribute_list is not null"); + return (Criteria) this; + } + + public Criteria andAttributeListEqualTo(String value) { + addCriterion("attribute_list =", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotEqualTo(String value) { + addCriterion("attribute_list <>", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListGreaterThan(String value) { + addCriterion("attribute_list >", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListGreaterThanOrEqualTo(String value) { + addCriterion("attribute_list >=", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListLessThan(String value) { + addCriterion("attribute_list <", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListLessThanOrEqualTo(String value) { + addCriterion("attribute_list <=", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListLike(String value) { + addCriterion("attribute_list like", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotLike(String value) { + addCriterion("attribute_list not like", value, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListIn(List values) { + addCriterion("attribute_list in", values, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotIn(List values) { + addCriterion("attribute_list not in", values, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListBetween(String value1, String value2) { + addCriterion("attribute_list between", value1, value2, "attributeList"); + return (Criteria) this; + } + + public Criteria andAttributeListNotBetween(String value1, String value2) { + addCriterion("attribute_list not between", value1, value2, "attributeList"); + return (Criteria) this; + } + + public Criteria andSupplierIdIsNull() { + addCriterion("supplier_id is null"); + return (Criteria) this; + } + + public Criteria andSupplierIdIsNotNull() { + addCriterion("supplier_id is not null"); + return (Criteria) this; + } + + public Criteria andSupplierIdEqualTo(String value) { + addCriterion("supplier_id =", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotEqualTo(String value) { + addCriterion("supplier_id <>", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdGreaterThan(String value) { + addCriterion("supplier_id >", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdGreaterThanOrEqualTo(String value) { + addCriterion("supplier_id >=", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLessThan(String value) { + addCriterion("supplier_id <", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLessThanOrEqualTo(String value) { + addCriterion("supplier_id <=", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdLike(String value) { + addCriterion("supplier_id like", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotLike(String value) { + addCriterion("supplier_id not like", value, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdIn(List values) { + addCriterion("supplier_id in", values, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotIn(List values) { + addCriterion("supplier_id not in", values, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdBetween(String value1, String value2) { + addCriterion("supplier_id between", value1, value2, "supplierId"); + return (Criteria) this; + } + + public Criteria andSupplierIdNotBetween(String value1, String value2) { + addCriterion("supplier_id not between", value1, value2, "supplierId"); + return (Criteria) this; + } + + public Criteria andProductSnIsNull() { + addCriterion("product_sn is null"); + return (Criteria) this; + } + + public Criteria andProductSnIsNotNull() { + addCriterion("product_sn is not null"); + return (Criteria) this; + } + + public Criteria andProductSnEqualTo(String value) { + addCriterion("product_sn =", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotEqualTo(String value) { + addCriterion("product_sn <>", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnGreaterThan(String value) { + addCriterion("product_sn >", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnGreaterThanOrEqualTo(String value) { + addCriterion("product_sn >=", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnLessThan(String value) { + addCriterion("product_sn <", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnLessThanOrEqualTo(String value) { + addCriterion("product_sn <=", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnLike(String value) { + addCriterion("product_sn like", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotLike(String value) { + addCriterion("product_sn not like", value, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnIn(List values) { + addCriterion("product_sn in", values, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotIn(List values) { + addCriterion("product_sn not in", values, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnBetween(String value1, String value2) { + addCriterion("product_sn between", value1, value2, "productSn"); + return (Criteria) this; + } + + public Criteria andProductSnNotBetween(String value1, String value2) { + addCriterion("product_sn not between", value1, value2, "productSn"); + return (Criteria) this; + } + + public Criteria andBarcodeIsNull() { + addCriterion("barcode is null"); + return (Criteria) this; + } + + public Criteria andBarcodeIsNotNull() { + addCriterion("barcode is not null"); + return (Criteria) this; + } + + public Criteria andBarcodeEqualTo(String value) { + addCriterion("barcode =", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotEqualTo(String value) { + addCriterion("barcode <>", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeGreaterThan(String value) { + addCriterion("barcode >", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeGreaterThanOrEqualTo(String value) { + addCriterion("barcode >=", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeLessThan(String value) { + addCriterion("barcode <", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeLessThanOrEqualTo(String value) { + addCriterion("barcode <=", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeLike(String value) { + addCriterion("barcode like", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotLike(String value) { + addCriterion("barcode not like", value, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeIn(List values) { + addCriterion("barcode in", values, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotIn(List values) { + addCriterion("barcode not in", values, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeBetween(String value1, String value2) { + addCriterion("barcode between", value1, value2, "barcode"); + return (Criteria) this; + } + + public Criteria andBarcodeNotBetween(String value1, String value2) { + addCriterion("barcode not between", value1, value2, "barcode"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(BigDecimal value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(BigDecimal value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(BigDecimal value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(BigDecimal value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIsNull() { + addCriterion("purchase_price is null"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIsNotNull() { + addCriterion("purchase_price is not null"); + return (Criteria) this; + } + + public Criteria andPurchasePriceEqualTo(BigDecimal value) { + addCriterion("purchase_price =", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotEqualTo(BigDecimal value) { + addCriterion("purchase_price <>", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceGreaterThan(BigDecimal value) { + addCriterion("purchase_price >", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("purchase_price >=", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceLessThan(BigDecimal value) { + addCriterion("purchase_price <", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("purchase_price <=", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIn(List values) { + addCriterion("purchase_price in", values, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotIn(List values) { + addCriterion("purchase_price not in", values, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("purchase_price between", value1, value2, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("purchase_price not between", value1, value2, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIsNull() { + addCriterion("wholesale_price is null"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIsNotNull() { + addCriterion("wholesale_price is not null"); + return (Criteria) this; + } + + public Criteria andWholesalePriceEqualTo(BigDecimal value) { + addCriterion("wholesale_price =", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotEqualTo(BigDecimal value) { + addCriterion("wholesale_price <>", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceGreaterThan(BigDecimal value) { + addCriterion("wholesale_price >", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("wholesale_price >=", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceLessThan(BigDecimal value) { + addCriterion("wholesale_price <", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("wholesale_price <=", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIn(List values) { + addCriterion("wholesale_price in", values, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotIn(List values) { + addCriterion("wholesale_price not in", values, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("wholesale_price between", value1, value2, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("wholesale_price not between", value1, value2, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andProductPictureIsNull() { + addCriterion("product_picture is null"); + return (Criteria) this; + } + + public Criteria andProductPictureIsNotNull() { + addCriterion("product_picture is not null"); + return (Criteria) this; + } + + public Criteria andProductPictureEqualTo(String value) { + addCriterion("product_picture =", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotEqualTo(String value) { + addCriterion("product_picture <>", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureGreaterThan(String value) { + addCriterion("product_picture >", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureGreaterThanOrEqualTo(String value) { + addCriterion("product_picture >=", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureLessThan(String value) { + addCriterion("product_picture <", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureLessThanOrEqualTo(String value) { + addCriterion("product_picture <=", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureLike(String value) { + addCriterion("product_picture like", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotLike(String value) { + addCriterion("product_picture not like", value, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureIn(List values) { + addCriterion("product_picture in", values, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotIn(List values) { + addCriterion("product_picture not in", values, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureBetween(String value1, String value2) { + addCriterion("product_picture between", value1, value2, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductPictureNotBetween(String value1, String value2) { + addCriterion("product_picture not between", value1, value2, "productPicture"); + return (Criteria) this; + } + + public Criteria andProductVideoIsNull() { + addCriterion("product_video is null"); + return (Criteria) this; + } + + public Criteria andProductVideoIsNotNull() { + addCriterion("product_video is not null"); + return (Criteria) this; + } + + public Criteria andProductVideoEqualTo(String value) { + addCriterion("product_video =", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotEqualTo(String value) { + addCriterion("product_video <>", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoGreaterThan(String value) { + addCriterion("product_video >", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoGreaterThanOrEqualTo(String value) { + addCriterion("product_video >=", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoLessThan(String value) { + addCriterion("product_video <", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoLessThanOrEqualTo(String value) { + addCriterion("product_video <=", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoLike(String value) { + addCriterion("product_video like", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotLike(String value) { + addCriterion("product_video not like", value, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoIn(List values) { + addCriterion("product_video in", values, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotIn(List values) { + addCriterion("product_video not in", values, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoBetween(String value1, String value2) { + addCriterion("product_video between", value1, value2, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductVideoNotBetween(String value1, String value2) { + addCriterion("product_video not between", value1, value2, "productVideo"); + return (Criteria) this; + } + + public Criteria andProductIntroIsNull() { + addCriterion("product_intro is null"); + return (Criteria) this; + } + + public Criteria andProductIntroIsNotNull() { + addCriterion("product_intro is not null"); + return (Criteria) this; + } + + public Criteria andProductIntroEqualTo(String value) { + addCriterion("product_intro =", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotEqualTo(String value) { + addCriterion("product_intro <>", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroGreaterThan(String value) { + addCriterion("product_intro >", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroGreaterThanOrEqualTo(String value) { + addCriterion("product_intro >=", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroLessThan(String value) { + addCriterion("product_intro <", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroLessThanOrEqualTo(String value) { + addCriterion("product_intro <=", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroLike(String value) { + addCriterion("product_intro like", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotLike(String value) { + addCriterion("product_intro not like", value, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroIn(List values) { + addCriterion("product_intro in", values, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotIn(List values) { + addCriterion("product_intro not in", values, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroBetween(String value1, String value2) { + addCriterion("product_intro between", value1, value2, "productIntro"); + return (Criteria) this; + } + + public Criteria andProductIntroNotBetween(String value1, String value2) { + addCriterion("product_intro not between", value1, value2, "productIntro"); + return (Criteria) this; + } + + public Criteria andSalesWeekIsNull() { + addCriterion("sales_week is null"); + return (Criteria) this; + } + + public Criteria andSalesWeekIsNotNull() { + addCriterion("sales_week is not null"); + return (Criteria) this; + } + + public Criteria andSalesWeekEqualTo(String value) { + addCriterion("sales_week =", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotEqualTo(String value) { + addCriterion("sales_week <>", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekGreaterThan(String value) { + addCriterion("sales_week >", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekGreaterThanOrEqualTo(String value) { + addCriterion("sales_week >=", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekLessThan(String value) { + addCriterion("sales_week <", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekLessThanOrEqualTo(String value) { + addCriterion("sales_week <=", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekLike(String value) { + addCriterion("sales_week like", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotLike(String value) { + addCriterion("sales_week not like", value, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekIn(List values) { + addCriterion("sales_week in", values, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotIn(List values) { + addCriterion("sales_week not in", values, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekBetween(String value1, String value2) { + addCriterion("sales_week between", value1, value2, "salesWeek"); + return (Criteria) this; + } + + public Criteria andSalesWeekNotBetween(String value1, String value2) { + addCriterion("sales_week not between", value1, value2, "salesWeek"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeIsNull() { + addCriterion("print_barcode is null"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeIsNotNull() { + addCriterion("print_barcode is not null"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeEqualTo(String value) { + addCriterion("print_barcode =", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotEqualTo(String value) { + addCriterion("print_barcode <>", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeGreaterThan(String value) { + addCriterion("print_barcode >", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeGreaterThanOrEqualTo(String value) { + addCriterion("print_barcode >=", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeLessThan(String value) { + addCriterion("print_barcode <", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeLessThanOrEqualTo(String value) { + addCriterion("print_barcode <=", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeLike(String value) { + addCriterion("print_barcode like", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotLike(String value) { + addCriterion("print_barcode not like", value, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeIn(List values) { + addCriterion("print_barcode in", values, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotIn(List values) { + addCriterion("print_barcode not in", values, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeBetween(String value1, String value2) { + addCriterion("print_barcode between", value1, value2, "printBarcode"); + return (Criteria) this; + } + + public Criteria andPrintBarcodeNotBetween(String value1, String value2) { + addCriterion("print_barcode not between", value1, value2, "printBarcode"); + return (Criteria) this; + } + + public Criteria andStockCountIsNull() { + addCriterion("stock_count is null"); + return (Criteria) this; + } + + public Criteria andStockCountIsNotNull() { + addCriterion("stock_count is not null"); + return (Criteria) this; + } + + public Criteria andStockCountEqualTo(Integer value) { + addCriterion("stock_count =", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountNotEqualTo(Integer value) { + addCriterion("stock_count <>", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountGreaterThan(Integer value) { + addCriterion("stock_count >", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountGreaterThanOrEqualTo(Integer value) { + addCriterion("stock_count >=", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountLessThan(Integer value) { + addCriterion("stock_count <", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountLessThanOrEqualTo(Integer value) { + addCriterion("stock_count <=", value, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountIn(List values) { + addCriterion("stock_count in", values, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountNotIn(List values) { + addCriterion("stock_count not in", values, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountBetween(Integer value1, Integer value2) { + addCriterion("stock_count between", value1, value2, "stockCount"); + return (Criteria) this; + } + + public Criteria andStockCountNotBetween(Integer value1, Integer value2) { + addCriterion("stock_count not between", value1, value2, "stockCount"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLog.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLog.java new file mode 100644 index 00000000..5ec1571c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLog.java @@ -0,0 +1,197 @@ +package cc.hiver.mall.entity; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +@ApiModel(value = "商品库存履历表") +public class StockLog implements Serializable { + private Long id; + + private String createBy; + + private Date createTime; + + private Integer delFlag; + + private String updateBy; + + private Date updateTime; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "商品规格") + private String productSpecs; + + @ApiModelProperty(value = "出入库前库存数量") + private Integer stock; + + @ApiModelProperty(value = "出入库数量") + private Integer changeStock; + + @ApiModelProperty(value = "出入库类型(0-入库;1-出库)") + private String changeType; + + @ApiModelProperty(value = "市场价") + private BigDecimal price; + + @ApiModelProperty(value = "采购价") + private BigDecimal purchasePrice; + + @ApiModelProperty(value = "批发价") + private BigDecimal wholesalePrice; + + @ApiModelProperty(value = "店铺id") + private String shopId; + + private static final long serialVersionUID = 1L; + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCreateBy() { + return createBy; + } + + public void setCreateBy(String createBy) { + this.createBy = createBy; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Integer getDelFlag() { + return delFlag; + } + + public void setDelFlag(Integer delFlag) { + this.delFlag = delFlag; + } + + public String getUpdateBy() { + return updateBy; + } + + public void setUpdateBy(String updateBy) { + this.updateBy = updateBy; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getProductId() { + return productId; + } + + public void setProductId(Long productId) { + this.productId = productId; + } + + public String getProductSpecs() { + return productSpecs; + } + + public void setProductSpecs(String productSpecs) { + this.productSpecs = productSpecs; + } + + public Integer getStock() { + return stock; + } + + public void setStock(Integer stock) { + this.stock = stock; + } + + public Integer getChangeStock() { + return changeStock; + } + + public void setChangeStock(Integer changeStock) { + this.changeStock = changeStock; + } + + public String getChangeType() { + return changeType; + } + + public void setChangeType(String changeType) { + this.changeType = changeType; + } + + public BigDecimal getPrice() { + return price; + } + + public void setPrice(BigDecimal price) { + this.price = price; + } + + public BigDecimal getPurchasePrice() { + return purchasePrice; + } + + public void setPurchasePrice(BigDecimal purchasePrice) { + this.purchasePrice = purchasePrice; + } + + public BigDecimal getWholesalePrice() { + return wholesalePrice; + } + + public void setWholesalePrice(BigDecimal wholesalePrice) { + this.wholesalePrice = wholesalePrice; + } + + public String getShopId() { + return shopId; + } + + public void setShopId(String shopId) { + this.shopId = shopId; + } + + @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(", createBy=").append(createBy); + sb.append(", createTime=").append(createTime); + sb.append(", delFlag=").append(delFlag); + sb.append(", updateBy=").append(updateBy); + sb.append(", updateTime=").append(updateTime); + sb.append(", productId=").append(productId); + sb.append(", productSpecs=").append(productSpecs); + sb.append(", stock=").append(stock); + sb.append(", changeStock=").append(changeStock); + sb.append(", changeType=").append(changeType); + sb.append(", price=").append(price); + sb.append(", purchasePrice=").append(purchasePrice); + sb.append(", wholesalePrice=").append(wholesalePrice); + sb.append(", shopId=").append(shopId); + sb.append(", serialVersionUID=").append(serialVersionUID); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLogExample.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLogExample.java new file mode 100644 index 00000000..c9beb1af --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/StockLogExample.java @@ -0,0 +1,1151 @@ +package cc.hiver.mall.entity; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StockLogExample { + protected String orderByClause; + + protected boolean distinct; + + protected List oredCriteria; + + public StockLogExample() { + 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; + } + + 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 andCreateByIsNull() { + addCriterion("create_by is null"); + return (Criteria) this; + } + + public Criteria andCreateByIsNotNull() { + addCriterion("create_by is not null"); + return (Criteria) this; + } + + public Criteria andCreateByEqualTo(String value) { + addCriterion("create_by =", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotEqualTo(String value) { + addCriterion("create_by <>", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThan(String value) { + addCriterion("create_by >", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByGreaterThanOrEqualTo(String value) { + addCriterion("create_by >=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThan(String value) { + addCriterion("create_by <", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLessThanOrEqualTo(String value) { + addCriterion("create_by <=", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByLike(String value) { + addCriterion("create_by like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotLike(String value) { + addCriterion("create_by not like", value, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByIn(List values) { + addCriterion("create_by in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotIn(List values) { + addCriterion("create_by not in", values, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByBetween(String value1, String value2) { + addCriterion("create_by between", value1, value2, "createBy"); + return (Criteria) this; + } + + public Criteria andCreateByNotBetween(String value1, String value2) { + addCriterion("create_by not between", value1, value2, "createBy"); + 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 andDelFlagIsNull() { + addCriterion("del_flag is null"); + return (Criteria) this; + } + + public Criteria andDelFlagIsNotNull() { + addCriterion("del_flag is not null"); + return (Criteria) this; + } + + public Criteria andDelFlagEqualTo(Integer value) { + addCriterion("del_flag =", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotEqualTo(Integer value) { + addCriterion("del_flag <>", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThan(Integer value) { + addCriterion("del_flag >", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagGreaterThanOrEqualTo(Integer value) { + addCriterion("del_flag >=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThan(Integer value) { + addCriterion("del_flag <", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagLessThanOrEqualTo(Integer value) { + addCriterion("del_flag <=", value, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagIn(List values) { + addCriterion("del_flag in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotIn(List values) { + addCriterion("del_flag not in", values, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagBetween(Integer value1, Integer value2) { + addCriterion("del_flag between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andDelFlagNotBetween(Integer value1, Integer value2) { + addCriterion("del_flag not between", value1, value2, "delFlag"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNull() { + addCriterion("update_by is null"); + return (Criteria) this; + } + + public Criteria andUpdateByIsNotNull() { + addCriterion("update_by is not null"); + return (Criteria) this; + } + + public Criteria andUpdateByEqualTo(String value) { + addCriterion("update_by =", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotEqualTo(String value) { + addCriterion("update_by <>", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThan(String value) { + addCriterion("update_by >", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByGreaterThanOrEqualTo(String value) { + addCriterion("update_by >=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThan(String value) { + addCriterion("update_by <", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLessThanOrEqualTo(String value) { + addCriterion("update_by <=", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByLike(String value) { + addCriterion("update_by like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotLike(String value) { + addCriterion("update_by not like", value, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByIn(List values) { + addCriterion("update_by in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotIn(List values) { + addCriterion("update_by not in", values, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByBetween(String value1, String value2) { + addCriterion("update_by between", value1, value2, "updateBy"); + return (Criteria) this; + } + + public Criteria andUpdateByNotBetween(String value1, String value2) { + addCriterion("update_by not between", value1, value2, "updateBy"); + 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 andProductIdIsNull() { + addCriterion("product_id is null"); + return (Criteria) this; + } + + public Criteria andProductIdIsNotNull() { + addCriterion("product_id is not null"); + return (Criteria) this; + } + + public Criteria andProductIdEqualTo(Long value) { + addCriterion("product_id =", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotEqualTo(Long value) { + addCriterion("product_id <>", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThan(Long value) { + addCriterion("product_id >", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdGreaterThanOrEqualTo(Long value) { + addCriterion("product_id >=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThan(Long value) { + addCriterion("product_id <", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdLessThanOrEqualTo(Long value) { + addCriterion("product_id <=", value, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdIn(List values) { + addCriterion("product_id in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotIn(List values) { + addCriterion("product_id not in", values, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdBetween(Long value1, Long value2) { + addCriterion("product_id between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductIdNotBetween(Long value1, Long value2) { + addCriterion("product_id not between", value1, value2, "productId"); + return (Criteria) this; + } + + public Criteria andProductSpecsIsNull() { + addCriterion("product_specs is null"); + return (Criteria) this; + } + + public Criteria andProductSpecsIsNotNull() { + addCriterion("product_specs is not null"); + return (Criteria) this; + } + + public Criteria andProductSpecsEqualTo(String value) { + addCriterion("product_specs =", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotEqualTo(String value) { + addCriterion("product_specs <>", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsGreaterThan(String value) { + addCriterion("product_specs >", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsGreaterThanOrEqualTo(String value) { + addCriterion("product_specs >=", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsLessThan(String value) { + addCriterion("product_specs <", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsLessThanOrEqualTo(String value) { + addCriterion("product_specs <=", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsLike(String value) { + addCriterion("product_specs like", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotLike(String value) { + addCriterion("product_specs not like", value, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsIn(List values) { + addCriterion("product_specs in", values, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotIn(List values) { + addCriterion("product_specs not in", values, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsBetween(String value1, String value2) { + addCriterion("product_specs between", value1, value2, "productSpecs"); + return (Criteria) this; + } + + public Criteria andProductSpecsNotBetween(String value1, String value2) { + addCriterion("product_specs not between", value1, value2, "productSpecs"); + 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 andChangeStockIsNull() { + addCriterion("change_stock is null"); + return (Criteria) this; + } + + public Criteria andChangeStockIsNotNull() { + addCriterion("change_stock is not null"); + return (Criteria) this; + } + + public Criteria andChangeStockEqualTo(Integer value) { + addCriterion("change_stock =", value, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockNotEqualTo(Integer value) { + addCriterion("change_stock <>", value, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockGreaterThan(Integer value) { + addCriterion("change_stock >", value, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockGreaterThanOrEqualTo(Integer value) { + addCriterion("change_stock >=", value, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockLessThan(Integer value) { + addCriterion("change_stock <", value, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockLessThanOrEqualTo(Integer value) { + addCriterion("change_stock <=", value, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockIn(List values) { + addCriterion("change_stock in", values, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockNotIn(List values) { + addCriterion("change_stock not in", values, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockBetween(Integer value1, Integer value2) { + addCriterion("change_stock between", value1, value2, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeStockNotBetween(Integer value1, Integer value2) { + addCriterion("change_stock not between", value1, value2, "changeStock"); + return (Criteria) this; + } + + public Criteria andChangeTypeIsNull() { + addCriterion("change_type is null"); + return (Criteria) this; + } + + public Criteria andChangeTypeIsNotNull() { + addCriterion("change_type is not null"); + return (Criteria) this; + } + + public Criteria andChangeTypeEqualTo(String value) { + addCriterion("change_type =", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeNotEqualTo(String value) { + addCriterion("change_type <>", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeGreaterThan(String value) { + addCriterion("change_type >", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeGreaterThanOrEqualTo(String value) { + addCriterion("change_type >=", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeLessThan(String value) { + addCriterion("change_type <", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeLessThanOrEqualTo(String value) { + addCriterion("change_type <=", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeLike(String value) { + addCriterion("change_type like", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeNotLike(String value) { + addCriterion("change_type not like", value, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeIn(List values) { + addCriterion("change_type in", values, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeNotIn(List values) { + addCriterion("change_type not in", values, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeBetween(String value1, String value2) { + addCriterion("change_type between", value1, value2, "changeType"); + return (Criteria) this; + } + + public Criteria andChangeTypeNotBetween(String value1, String value2) { + addCriterion("change_type not between", value1, value2, "changeType"); + return (Criteria) this; + } + + public Criteria andPriceIsNull() { + addCriterion("price is null"); + return (Criteria) this; + } + + public Criteria andPriceIsNotNull() { + addCriterion("price is not null"); + return (Criteria) this; + } + + public Criteria andPriceEqualTo(BigDecimal value) { + addCriterion("price =", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotEqualTo(BigDecimal value) { + addCriterion("price <>", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThan(BigDecimal value) { + addCriterion("price >", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("price >=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThan(BigDecimal value) { + addCriterion("price <", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("price <=", value, "price"); + return (Criteria) this; + } + + public Criteria andPriceIn(List values) { + addCriterion("price in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotIn(List values) { + addCriterion("price not in", values, "price"); + return (Criteria) this; + } + + public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("price not between", value1, value2, "price"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIsNull() { + addCriterion("purchase_price is null"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIsNotNull() { + addCriterion("purchase_price is not null"); + return (Criteria) this; + } + + public Criteria andPurchasePriceEqualTo(BigDecimal value) { + addCriterion("purchase_price =", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotEqualTo(BigDecimal value) { + addCriterion("purchase_price <>", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceGreaterThan(BigDecimal value) { + addCriterion("purchase_price >", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("purchase_price >=", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceLessThan(BigDecimal value) { + addCriterion("purchase_price <", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("purchase_price <=", value, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceIn(List values) { + addCriterion("purchase_price in", values, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotIn(List values) { + addCriterion("purchase_price not in", values, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("purchase_price between", value1, value2, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andPurchasePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("purchase_price not between", value1, value2, "purchasePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIsNull() { + addCriterion("wholesale_price is null"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIsNotNull() { + addCriterion("wholesale_price is not null"); + return (Criteria) this; + } + + public Criteria andWholesalePriceEqualTo(BigDecimal value) { + addCriterion("wholesale_price =", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotEqualTo(BigDecimal value) { + addCriterion("wholesale_price <>", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceGreaterThan(BigDecimal value) { + addCriterion("wholesale_price >", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("wholesale_price >=", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceLessThan(BigDecimal value) { + addCriterion("wholesale_price <", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceLessThanOrEqualTo(BigDecimal value) { + addCriterion("wholesale_price <=", value, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceIn(List values) { + addCriterion("wholesale_price in", values, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotIn(List values) { + addCriterion("wholesale_price not in", values, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("wholesale_price between", value1, value2, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andWholesalePriceNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("wholesale_price not between", value1, value2, "wholesalePrice"); + return (Criteria) this; + } + + public Criteria andShopIdIsNull() { + addCriterion("shop_id is null"); + return (Criteria) this; + } + + public Criteria andShopIdIsNotNull() { + addCriterion("shop_id is not null"); + return (Criteria) this; + } + + public Criteria andShopIdEqualTo(String value) { + addCriterion("shop_id =", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotEqualTo(String value) { + addCriterion("shop_id <>", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThan(String value) { + addCriterion("shop_id >", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdGreaterThanOrEqualTo(String value) { + addCriterion("shop_id >=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThan(String value) { + addCriterion("shop_id <", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLessThanOrEqualTo(String value) { + addCriterion("shop_id <=", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdLike(String value) { + addCriterion("shop_id like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotLike(String value) { + addCriterion("shop_id not like", value, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdIn(List values) { + addCriterion("shop_id in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotIn(List values) { + addCriterion("shop_id not in", values, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdBetween(String value1, String value2) { + addCriterion("shop_id between", value1, value2, "shopId"); + return (Criteria) this; + } + + public Criteria andShopIdNotBetween(String value1, String value2) { + addCriterion("shop_id not between", value1, value2, "shopId"); + 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/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/PurchaseVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/PurchaseVo.java new file mode 100644 index 00000000..f31abe4a --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/PurchaseVo.java @@ -0,0 +1,19 @@ +package cc.hiver.mall.pojo.vo; + +import cc.hiver.mall.entity.*; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +@Data +@Accessors(chain = true) +public class PurchaseVo { + @ApiModelProperty(value = "采购单主表") + private Purchase purchase; + + @ApiModelProperty(value = "采购单子表") + private List purchaseDetails; + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/StockVo.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/StockVo.java new file mode 100644 index 00000000..9985e3b5 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/StockVo.java @@ -0,0 +1,21 @@ +package cc.hiver.mall.pojo.vo; + +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.entity.PurchaseDetail; +import cc.hiver.mall.entity.Stock; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.util.List; + +@Data +@Accessors(chain = true) +public class StockVo { + @ApiModelProperty(value = "采购单主表") + private Purchase purchase; + + @ApiModelProperty(value = "入库商品信息") + private List stockList; + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeService.java new file mode 100644 index 00000000..dc72dc46 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.ProductAttribute; +import cc.hiver.mall.entity.ProductCategory; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface ProductAttributeService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeValueService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeValueService.java new file mode 100644 index 00000000..993a130c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductAttributeValueService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.ProductAttribute; +import cc.hiver.mall.entity.ProductAttributeValue; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface ProductAttributeValueService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductCategoryService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductCategoryService.java new file mode 100644 index 00000000..75dbf0e1 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductCategoryService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductCategory; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface ProductCategoryService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java new file mode 100644 index 00000000..7bc8a82a --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/ProductService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.GoodsAttribute; +import cc.hiver.mall.entity.Product; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface ProductService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseDetailService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseDetailService.java new file mode 100644 index 00000000..c4702679 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseDetailService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.entity.PurchaseDetail; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface PurchaseDetailService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseService.java new file mode 100644 index 00000000..7f84defe --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/PurchaseService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.ProductAttribute; +import cc.hiver.mall.entity.Purchase; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface PurchaseService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockLogService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockLogService.java new file mode 100644 index 00000000..e1ff6a4c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockLogService.java @@ -0,0 +1,8 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.Stock; +import cc.hiver.mall.entity.StockLog; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface StockLogService extends IService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockService.java new file mode 100644 index 00000000..0ca4e9c7 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/StockService.java @@ -0,0 +1,11 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.entity.Stock; +import cc.hiver.mall.pojo.vo.StockVo; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface StockService extends IService { + Result putIn(StockVo stockVo); +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeServiceImpl.java new file mode 100644 index 00000000..6ff89da4 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.ProductAttributeMapper; +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductAttribute; +import cc.hiver.mall.service.mybatis.ProductAttributeService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class ProductAttributeServiceImpl extends ServiceImpl implements ProductAttributeService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeValueServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeValueServiceImpl.java new file mode 100644 index 00000000..0df0151c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductAttributeValueServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.ProductAttributeValueMapper; +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductAttributeValue; +import cc.hiver.mall.service.mybatis.ProductAttributeValueService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class ProductAttributeValueServiceImpl extends ServiceImpl implements ProductAttributeValueService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductCategoryServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductCategoryServiceImpl.java new file mode 100644 index 00000000..2b2e315a --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductCategoryServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.ProductCategoryMapper; +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.ProductCategory; +import cc.hiver.mall.service.mybatis.ProductCategoryService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class ProductCategoryServiceImpl extends ServiceImpl implements ProductCategoryService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java new file mode 100644 index 00000000..6b07966c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/ProductServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.GoodsAttributeMapper; +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.entity.GoodsAttribute; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.service.mybatis.GoodsAttributeService; +import cc.hiver.mall.service.mybatis.ProductService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class ProductServiceImpl extends ServiceImpl implements ProductService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseDetailServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseDetailServiceImpl.java new file mode 100644 index 00000000..cfff28b0 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseDetailServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.dao.mapper.PurchaseDetailMapper; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.PurchaseDetail; +import cc.hiver.mall.service.mybatis.ProductService; +import cc.hiver.mall.service.mybatis.PurchaseDetailService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class PurchaseDetailServiceImpl extends ServiceImpl implements PurchaseDetailService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseServiceImpl.java new file mode 100644 index 00000000..03c0912e --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/PurchaseServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.dao.mapper.PurchaseMapper; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.Purchase; +import cc.hiver.mall.service.mybatis.ProductService; +import cc.hiver.mall.service.mybatis.PurchaseService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class PurchaseServiceImpl extends ServiceImpl implements PurchaseService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockLogServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockLogServiceImpl.java new file mode 100644 index 00000000..db616620 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockLogServiceImpl.java @@ -0,0 +1,14 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.dao.mapper.StockLogMapper; +import cc.hiver.mall.entity.Product; +import cc.hiver.mall.entity.StockLog; +import cc.hiver.mall.service.mybatis.ProductService; +import cc.hiver.mall.service.mybatis.StockLogService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +@Service +public class StockLogServiceImpl extends ServiceImpl implements StockLogService { +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockServiceImpl.java new file mode 100644 index 00000000..0acdd580 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/mybatis/StockServiceImpl.java @@ -0,0 +1,97 @@ +package cc.hiver.mall.serviceimpl.mybatis; + +import cc.hiver.core.common.utils.BeanUtils; +import cc.hiver.core.common.utils.ObjectUtil; +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.dao.mapper.ProductMapper; +import cc.hiver.mall.dao.mapper.StockMapper; +import cc.hiver.mall.entity.*; +import cc.hiver.mall.pojo.vo.StockVo; +import cc.hiver.mall.service.mybatis.*; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; + +import java.util.ArrayList; +import java.util.List; + +@Service +public class StockServiceImpl extends ServiceImpl implements StockService { + + @Autowired + private PurchaseService purchaseService; + + @Autowired + private PurchaseDetailService purchaseDetailService; + + @Autowired + private StockLogService stockLogService; + + @Transactional + @Override + public Result putIn(StockVo stockVo) { + Boolean result = false; + List purchaseDetails = new ArrayList<>(); + //1.判断入库的货品是否有库存,有则修改库存数量,没有则新建库存数据 + Purchase purchase = stockVo.getPurchase(); + List stockList = stockVo.getStockList(); + for (Stock stock:stockList){ + Long productId = stock.getProductId(); + String attributeList = stock.getAttributeList(); + QueryWrapper stockQueryWrapper = new QueryWrapper<>(); + stockQueryWrapper.eq("product_id",productId); + stockQueryWrapper.eq("attribute_list",attributeList); + List originList = this.list(stockQueryWrapper); + Integer stockCount = 0; + if(originList.size() > 0){ + //存在库存则修改库存数量 + Stock origin = originList.get(0); + stockCount = origin.getStockCount(); + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("id",origin.getId()); + updateWrapper.set("stock_count",stockCount + stock.getStockCount()); + this.update(); + }else { + //没有则新建库存数据 + save(stock); + } + //创建采购单明细 + PurchaseDetail purchaseDetail = new PurchaseDetail(); + purchaseDetail.setProductId(stock.getProductId()); + purchaseDetail.setProductSpecs(stock.getAttributeList()); + purchaseDetail.setPurchaseId(purchase.getId()); + purchaseDetail.setProductCount(stock.getStockCount()); + purchaseDetails.add(purchaseDetail); + //2.记录库存履历 + StockLog stockLog = new StockLog(); + stockLog.setChangeType("0");//入库 + stockLog.setProductId(stock.getProductId()); + stockLog.setProductSpecs(stock.getAttributeList()); + stockLog.setStock(stockCount);//入库前数量 + stockLog.setChangeStock(stock.getStockCount());//入库数量 + stockLog.setPrice(stock.getPrice()); + stockLog.setPurchasePrice(stock.getPurchasePrice()); + stockLog.setWholesalePrice(stock.getWholesalePrice()); + stockLog.setShopId(stock.getShopId()); + stockLogService.save(stockLog); + } + + //3.登记采购单主表和采购单明细表 + if(purchaseService.save(purchase)){ + result = purchaseDetailService.saveBatch(purchaseDetails); + }; + + if(result) { + return ResultUtil.success("添加成功"); + } else { + return ResultUtil.error("添加失败"); + } + + } +} diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeMapper.xml new file mode 100644 index 00000000..aabd9de7 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, category_id, attribute_name + + + + + delete from t_product_attribute + where id = #{id,jdbcType=BIGINT} + + + delete from t_product_attribute + + + + + + insert into t_product_attribute (id, create_by, create_time, + del_flag, update_by, update_time, + category_id, attribute_name) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{categoryId,jdbcType=BIGINT}, #{attributeName,jdbcType=VARCHAR}) + + + insert into t_product_attribute + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + category_id, + + + attribute_name, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{categoryId,jdbcType=BIGINT}, + + + #{attributeName,jdbcType=VARCHAR}, + + + + + + update t_product_attribute + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + category_id = #{record.categoryId,jdbcType=BIGINT}, + + + attribute_name = #{record.attributeName,jdbcType=VARCHAR}, + + + + + + + + update t_product_attribute + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + category_id = #{record.categoryId,jdbcType=BIGINT}, + attribute_name = #{record.attributeName,jdbcType=VARCHAR} + + + + + + update t_product_attribute + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + category_id = #{categoryId,jdbcType=BIGINT}, + + + attribute_name = #{attributeName,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product_attribute + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + category_id = #{categoryId,jdbcType=BIGINT}, + attribute_name = #{attributeName,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeValueMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeValueMapper.xml new file mode 100644 index 00000000..8d8461e8 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductAttributeValueMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, attribute_id, value + + + + + delete from t_product_attribute_value + where id = #{id,jdbcType=BIGINT} + + + delete from t_product_attribute_value + + + + + + insert into t_product_attribute_value (id, create_by, create_time, + del_flag, update_by, update_time, + attribute_id, value) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{attributeId,jdbcType=BIGINT}, #{value,jdbcType=VARCHAR}) + + + insert into t_product_attribute_value + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + attribute_id, + + + value, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{attributeId,jdbcType=BIGINT}, + + + #{value,jdbcType=VARCHAR}, + + + + + + update t_product_attribute_value + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + attribute_id = #{record.attributeId,jdbcType=BIGINT}, + + + value = #{record.value,jdbcType=VARCHAR}, + + + + + + + + update t_product_attribute_value + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + attribute_id = #{record.attributeId,jdbcType=BIGINT}, + value = #{record.value,jdbcType=VARCHAR} + + + + + + update t_product_attribute_value + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + attribute_id = #{attributeId,jdbcType=BIGINT}, + + + value = #{value,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product_attribute_value + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + attribute_id = #{attributeId,jdbcType=BIGINT}, + value = #{value,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ProductCategoryMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductCategoryMapper.xml new file mode 100644 index 00000000..91beb420 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductCategoryMapper.xml @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, category_name, parent_id + + + + + delete from t_product_category + where id = #{id,jdbcType=BIGINT} + + + delete from t_product_category + + + + + + insert into t_product_category (id, create_by, create_time, + del_flag, update_by, update_time, + category_name, parent_id) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{categoryName,jdbcType=VARCHAR}, #{parentId,jdbcType=BIGINT}) + + + insert into t_product_category + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + category_name, + + + parent_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{categoryName,jdbcType=VARCHAR}, + + + #{parentId,jdbcType=BIGINT}, + + + + + + update t_product_category + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + category_name = #{record.categoryName,jdbcType=VARCHAR}, + + + parent_id = #{record.parentId,jdbcType=BIGINT}, + + + + + + + + update t_product_category + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + category_name = #{record.categoryName,jdbcType=VARCHAR}, + parent_id = #{record.parentId,jdbcType=BIGINT} + + + + + + update t_product_category + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + category_name = #{categoryName,jdbcType=VARCHAR}, + + + parent_id = #{parentId,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product_category + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + category_name = #{categoryName,jdbcType=VARCHAR}, + parent_id = #{parentId,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml new file mode 100644 index 00000000..35476763 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/ProductMapper.xml @@ -0,0 +1,480 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, product_name, unit, + shop_id, category_id, attribute_list, supplier_id, product_sn, barcode, price, purchase_price, + wholesale_price, product_picture, product_video, product_intro, sales_week, print_barcode + + + + + delete from t_product + where id = #{id,jdbcType=BIGINT} + + + delete from t_product + + + + + + insert into t_product (id, create_by, create_time, + del_flag, update_by, update_time, + product_name, unit, shop_id, + category_id, attribute_list, supplier_id, + product_sn, barcode, price, + purchase_price, wholesale_price, product_picture, + product_video, product_intro, sales_week, + print_barcode) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{productName,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, + #{categoryId,jdbcType=BIGINT}, #{attributeList,jdbcType=VARCHAR}, #{supplierId,jdbcType=VARCHAR}, + #{productSn,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, + #{purchasePrice,jdbcType=DECIMAL}, #{wholesalePrice,jdbcType=DECIMAL}, #{productPicture,jdbcType=VARCHAR}, + #{productVideo,jdbcType=VARCHAR}, #{productIntro,jdbcType=VARCHAR}, #{salesWeek,jdbcType=VARCHAR}, + #{printBarcode,jdbcType=VARCHAR}) + + + insert into t_product + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + product_name, + + + unit, + + + shop_id, + + + category_id, + + + attribute_list, + + + supplier_id, + + + product_sn, + + + barcode, + + + price, + + + purchase_price, + + + wholesale_price, + + + product_picture, + + + product_video, + + + product_intro, + + + sales_week, + + + print_barcode, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{productName,jdbcType=VARCHAR}, + + + #{unit,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{categoryId,jdbcType=BIGINT}, + + + #{attributeList,jdbcType=VARCHAR}, + + + #{supplierId,jdbcType=VARCHAR}, + + + #{productSn,jdbcType=VARCHAR}, + + + #{barcode,jdbcType=VARCHAR}, + + + #{price,jdbcType=DECIMAL}, + + + #{purchasePrice,jdbcType=DECIMAL}, + + + #{wholesalePrice,jdbcType=DECIMAL}, + + + #{productPicture,jdbcType=VARCHAR}, + + + #{productVideo,jdbcType=VARCHAR}, + + + #{productIntro,jdbcType=VARCHAR}, + + + #{salesWeek,jdbcType=VARCHAR}, + + + #{printBarcode,jdbcType=VARCHAR}, + + + + + + update t_product + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + product_name = #{record.productName,jdbcType=VARCHAR}, + + + unit = #{record.unit,jdbcType=VARCHAR}, + + + shop_id = #{record.shopId,jdbcType=VARCHAR}, + + + category_id = #{record.categoryId,jdbcType=BIGINT}, + + + attribute_list = #{record.attributeList,jdbcType=VARCHAR}, + + + supplier_id = #{record.supplierId,jdbcType=VARCHAR}, + + + product_sn = #{record.productSn,jdbcType=VARCHAR}, + + + barcode = #{record.barcode,jdbcType=VARCHAR}, + + + price = #{record.price,jdbcType=DECIMAL}, + + + purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, + + + wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, + + + product_picture = #{record.productPicture,jdbcType=VARCHAR}, + + + product_video = #{record.productVideo,jdbcType=VARCHAR}, + + + product_intro = #{record.productIntro,jdbcType=VARCHAR}, + + + sales_week = #{record.salesWeek,jdbcType=VARCHAR}, + + + print_barcode = #{record.printBarcode,jdbcType=VARCHAR}, + + + + + + + + update t_product + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + product_name = #{record.productName,jdbcType=VARCHAR}, + unit = #{record.unit,jdbcType=VARCHAR}, + shop_id = #{record.shopId,jdbcType=VARCHAR}, + category_id = #{record.categoryId,jdbcType=BIGINT}, + attribute_list = #{record.attributeList,jdbcType=VARCHAR}, + supplier_id = #{record.supplierId,jdbcType=VARCHAR}, + product_sn = #{record.productSn,jdbcType=VARCHAR}, + barcode = #{record.barcode,jdbcType=VARCHAR}, + price = #{record.price,jdbcType=DECIMAL}, + purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, + wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, + product_picture = #{record.productPicture,jdbcType=VARCHAR}, + product_video = #{record.productVideo,jdbcType=VARCHAR}, + product_intro = #{record.productIntro,jdbcType=VARCHAR}, + sales_week = #{record.salesWeek,jdbcType=VARCHAR}, + print_barcode = #{record.printBarcode,jdbcType=VARCHAR} + + + + + + update t_product + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + product_name = #{productName,jdbcType=VARCHAR}, + + + unit = #{unit,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + category_id = #{categoryId,jdbcType=BIGINT}, + + + attribute_list = #{attributeList,jdbcType=VARCHAR}, + + + supplier_id = #{supplierId,jdbcType=VARCHAR}, + + + product_sn = #{productSn,jdbcType=VARCHAR}, + + + barcode = #{barcode,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=DECIMAL}, + + + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, + + + wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, + + + product_picture = #{productPicture,jdbcType=VARCHAR}, + + + product_video = #{productVideo,jdbcType=VARCHAR}, + + + product_intro = #{productIntro,jdbcType=VARCHAR}, + + + sales_week = #{salesWeek,jdbcType=VARCHAR}, + + + print_barcode = #{printBarcode,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_product + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + product_name = #{productName,jdbcType=VARCHAR}, + unit = #{unit,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + category_id = #{categoryId,jdbcType=BIGINT}, + attribute_list = #{attributeList,jdbcType=VARCHAR}, + supplier_id = #{supplierId,jdbcType=VARCHAR}, + product_sn = #{productSn,jdbcType=VARCHAR}, + barcode = #{barcode,jdbcType=VARCHAR}, + price = #{price,jdbcType=DECIMAL}, + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, + wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, + product_picture = #{productPicture,jdbcType=VARCHAR}, + product_video = #{productVideo,jdbcType=VARCHAR}, + product_intro = #{productIntro,jdbcType=VARCHAR}, + sales_week = #{salesWeek,jdbcType=VARCHAR}, + print_barcode = #{printBarcode,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseDetailMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseDetailMapper.xml new file mode 100644 index 00000000..3c7b5ae2 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseDetailMapper.xml @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, purchase_id, product_id, + product_specs, product_count + + + + + delete from t_purchase_detail + where id = #{id,jdbcType=BIGINT} + + + delete from t_purchase_detail + + + + + + insert into t_purchase_detail (id, create_by, create_time, + del_flag, update_by, update_time, + purchase_id, product_id, product_specs, + product_count) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{purchaseId,jdbcType=BIGINT}, #{productId,jdbcType=BIGINT}, #{productSpecs,jdbcType=VARCHAR}, + #{productCount,jdbcType=INTEGER}) + + + insert into t_purchase_detail + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + purchase_id, + + + product_id, + + + product_specs, + + + product_count, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{purchaseId,jdbcType=BIGINT}, + + + #{productId,jdbcType=BIGINT}, + + + #{productSpecs,jdbcType=VARCHAR}, + + + #{productCount,jdbcType=INTEGER}, + + + + + + update t_purchase_detail + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + purchase_id = #{record.purchaseId,jdbcType=BIGINT}, + + + product_id = #{record.productId,jdbcType=BIGINT}, + + + product_specs = #{record.productSpecs,jdbcType=VARCHAR}, + + + product_count = #{record.productCount,jdbcType=INTEGER}, + + + + + + + + update t_purchase_detail + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + purchase_id = #{record.purchaseId,jdbcType=BIGINT}, + product_id = #{record.productId,jdbcType=BIGINT}, + product_specs = #{record.productSpecs,jdbcType=VARCHAR}, + product_count = #{record.productCount,jdbcType=INTEGER} + + + + + + update t_purchase_detail + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + purchase_id = #{purchaseId,jdbcType=BIGINT}, + + + product_id = #{productId,jdbcType=BIGINT}, + + + product_specs = #{productSpecs,jdbcType=VARCHAR}, + + + product_count = #{productCount,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_purchase_detail + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + purchase_id = #{purchaseId,jdbcType=BIGINT}, + product_id = #{productId,jdbcType=BIGINT}, + product_specs = #{productSpecs,jdbcType=VARCHAR}, + product_count = #{productCount,jdbcType=INTEGER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseMapper.xml new file mode 100644 index 00000000..edd2bfc9 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/PurchaseMapper.xml @@ -0,0 +1,323 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, supplier_id, shop_id, + total_amount, should_pay, already_pay, no_pay + + + + + delete from t_purchase + where id = #{id,jdbcType=BIGINT} + + + delete from t_purchase + + + + + + insert into t_purchase (id, create_by, create_time, + del_flag, update_by, update_time, + supplier_id, shop_id, total_amount, + should_pay, already_pay, no_pay + ) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{supplierId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, + #{shouldPay,jdbcType=DECIMAL}, #{alreadyPay,jdbcType=DECIMAL}, #{noPay,jdbcType=DECIMAL} + ) + + + insert into t_purchase + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + supplier_id, + + + shop_id, + + + total_amount, + + + should_pay, + + + already_pay, + + + no_pay, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{supplierId,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{totalAmount,jdbcType=DECIMAL}, + + + #{shouldPay,jdbcType=DECIMAL}, + + + #{alreadyPay,jdbcType=DECIMAL}, + + + #{noPay,jdbcType=DECIMAL}, + + + + + + update t_purchase + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + supplier_id = #{record.supplierId,jdbcType=VARCHAR}, + + + shop_id = #{record.shopId,jdbcType=VARCHAR}, + + + total_amount = #{record.totalAmount,jdbcType=DECIMAL}, + + + should_pay = #{record.shouldPay,jdbcType=DECIMAL}, + + + already_pay = #{record.alreadyPay,jdbcType=DECIMAL}, + + + no_pay = #{record.noPay,jdbcType=DECIMAL}, + + + + + + + + update t_purchase + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + supplier_id = #{record.supplierId,jdbcType=VARCHAR}, + shop_id = #{record.shopId,jdbcType=VARCHAR}, + total_amount = #{record.totalAmount,jdbcType=DECIMAL}, + should_pay = #{record.shouldPay,jdbcType=DECIMAL}, + already_pay = #{record.alreadyPay,jdbcType=DECIMAL}, + no_pay = #{record.noPay,jdbcType=DECIMAL} + + + + + + update t_purchase + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + supplier_id = #{supplierId,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + total_amount = #{totalAmount,jdbcType=DECIMAL}, + + + should_pay = #{shouldPay,jdbcType=DECIMAL}, + + + already_pay = #{alreadyPay,jdbcType=DECIMAL}, + + + no_pay = #{noPay,jdbcType=DECIMAL}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_purchase + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + supplier_id = #{supplierId,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + total_amount = #{totalAmount,jdbcType=DECIMAL}, + should_pay = #{shouldPay,jdbcType=DECIMAL}, + already_pay = #{alreadyPay,jdbcType=DECIMAL}, + no_pay = #{noPay,jdbcType=DECIMAL} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/StockLogMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/StockLogMapper.xml new file mode 100644 index 00000000..857eda34 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/StockLogMapper.xml @@ -0,0 +1,370 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, product_id, product_specs, + stock, change_stock, change_type, price, purchase_price, wholesale_price, shop_id + + + + + delete from t_stock_log + where id = #{id,jdbcType=BIGINT} + + + delete from t_stock_log + + + + + + insert into t_stock_log (id, create_by, create_time, + del_flag, update_by, update_time, + product_id, product_specs, stock, + change_stock, change_type, price, + purchase_price, wholesale_price, shop_id + ) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{productId,jdbcType=BIGINT}, #{productSpecs,jdbcType=VARCHAR}, #{stock,jdbcType=INTEGER}, + #{changeStock,jdbcType=INTEGER}, #{changeType,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, + #{purchasePrice,jdbcType=DECIMAL}, #{wholesalePrice,jdbcType=DECIMAL}, #{shopId,jdbcType=VARCHAR} + ) + + + insert into t_stock_log + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + product_id, + + + product_specs, + + + stock, + + + change_stock, + + + change_type, + + + price, + + + purchase_price, + + + wholesale_price, + + + shop_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{productId,jdbcType=BIGINT}, + + + #{productSpecs,jdbcType=VARCHAR}, + + + #{stock,jdbcType=INTEGER}, + + + #{changeStock,jdbcType=INTEGER}, + + + #{changeType,jdbcType=VARCHAR}, + + + #{price,jdbcType=DECIMAL}, + + + #{purchasePrice,jdbcType=DECIMAL}, + + + #{wholesalePrice,jdbcType=DECIMAL}, + + + #{shopId,jdbcType=VARCHAR}, + + + + + + update t_stock_log + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + product_id = #{record.productId,jdbcType=BIGINT}, + + + product_specs = #{record.productSpecs,jdbcType=VARCHAR}, + + + stock = #{record.stock,jdbcType=INTEGER}, + + + change_stock = #{record.changeStock,jdbcType=INTEGER}, + + + change_type = #{record.changeType,jdbcType=VARCHAR}, + + + price = #{record.price,jdbcType=DECIMAL}, + + + purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, + + + wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, + + + shop_id = #{record.shopId,jdbcType=VARCHAR}, + + + + + + + + update t_stock_log + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + product_id = #{record.productId,jdbcType=BIGINT}, + product_specs = #{record.productSpecs,jdbcType=VARCHAR}, + stock = #{record.stock,jdbcType=INTEGER}, + change_stock = #{record.changeStock,jdbcType=INTEGER}, + change_type = #{record.changeType,jdbcType=VARCHAR}, + price = #{record.price,jdbcType=DECIMAL}, + purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, + wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, + shop_id = #{record.shopId,jdbcType=VARCHAR} + + + + + + update t_stock_log + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + product_id = #{productId,jdbcType=BIGINT}, + + + product_specs = #{productSpecs,jdbcType=VARCHAR}, + + + stock = #{stock,jdbcType=INTEGER}, + + + change_stock = #{changeStock,jdbcType=INTEGER}, + + + change_type = #{changeType,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=DECIMAL}, + + + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, + + + wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_stock_log + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + product_id = #{productId,jdbcType=BIGINT}, + product_specs = #{productSpecs,jdbcType=VARCHAR}, + stock = #{stock,jdbcType=INTEGER}, + change_stock = #{changeStock,jdbcType=INTEGER}, + change_type = #{changeType,jdbcType=VARCHAR}, + price = #{price,jdbcType=DECIMAL}, + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, + wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, + shop_id = #{shopId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/resources/mapper/StockMapper.xml b/hiver-modules/hiver-mall/src/main/resources/mapper/StockMapper.xml new file mode 100644 index 00000000..d5f8b8b2 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/resources/mapper/StockMapper.xml @@ -0,0 +1,513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + id, create_by, create_time, del_flag, update_by, update_time, product_id, product_name, + unit, shop_id, category_id, attribute_list, supplier_id, product_sn, barcode, price, + purchase_price, wholesale_price, product_picture, product_video, product_intro, sales_week, + print_barcode, stock_count + + + + + delete from t_stock + where id = #{id,jdbcType=BIGINT} + + + delete from t_stock + + + + + + insert into t_stock (id, create_by, create_time, + del_flag, update_by, update_time, + product_id, product_name, unit, + shop_id, category_id, attribute_list, + supplier_id, product_sn, barcode, + price, purchase_price, wholesale_price, + product_picture, product_video, product_intro, + sales_week, print_barcode, stock_count + ) + values (#{id,jdbcType=BIGINT}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, + #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{productId,jdbcType=BIGINT}, #{productName,jdbcType=VARCHAR}, #{unit,jdbcType=VARCHAR}, + #{shopId,jdbcType=VARCHAR}, #{categoryId,jdbcType=BIGINT}, #{attributeList,jdbcType=VARCHAR}, + #{supplierId,jdbcType=VARCHAR}, #{productSn,jdbcType=VARCHAR}, #{barcode,jdbcType=VARCHAR}, + #{price,jdbcType=DECIMAL}, #{purchasePrice,jdbcType=DECIMAL}, #{wholesalePrice,jdbcType=DECIMAL}, + #{productPicture,jdbcType=VARCHAR}, #{productVideo,jdbcType=VARCHAR}, #{productIntro,jdbcType=VARCHAR}, + #{salesWeek,jdbcType=VARCHAR}, #{printBarcode,jdbcType=VARCHAR}, #{stockCount,jdbcType=INTEGER} + ) + + + insert into t_stock + + + id, + + + create_by, + + + create_time, + + + del_flag, + + + update_by, + + + update_time, + + + product_id, + + + product_name, + + + unit, + + + shop_id, + + + category_id, + + + attribute_list, + + + supplier_id, + + + product_sn, + + + barcode, + + + price, + + + purchase_price, + + + wholesale_price, + + + product_picture, + + + product_video, + + + product_intro, + + + sales_week, + + + print_barcode, + + + stock_count, + + + + + #{id,jdbcType=BIGINT}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{productId,jdbcType=BIGINT}, + + + #{productName,jdbcType=VARCHAR}, + + + #{unit,jdbcType=VARCHAR}, + + + #{shopId,jdbcType=VARCHAR}, + + + #{categoryId,jdbcType=BIGINT}, + + + #{attributeList,jdbcType=VARCHAR}, + + + #{supplierId,jdbcType=VARCHAR}, + + + #{productSn,jdbcType=VARCHAR}, + + + #{barcode,jdbcType=VARCHAR}, + + + #{price,jdbcType=DECIMAL}, + + + #{purchasePrice,jdbcType=DECIMAL}, + + + #{wholesalePrice,jdbcType=DECIMAL}, + + + #{productPicture,jdbcType=VARCHAR}, + + + #{productVideo,jdbcType=VARCHAR}, + + + #{productIntro,jdbcType=VARCHAR}, + + + #{salesWeek,jdbcType=VARCHAR}, + + + #{printBarcode,jdbcType=VARCHAR}, + + + #{stockCount,jdbcType=INTEGER}, + + + + + + update t_stock + + + id = #{record.id,jdbcType=BIGINT}, + + + create_by = #{record.createBy,jdbcType=VARCHAR}, + + + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{record.delFlag,jdbcType=INTEGER}, + + + update_by = #{record.updateBy,jdbcType=VARCHAR}, + + + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + + + product_id = #{record.productId,jdbcType=BIGINT}, + + + product_name = #{record.productName,jdbcType=VARCHAR}, + + + unit = #{record.unit,jdbcType=VARCHAR}, + + + shop_id = #{record.shopId,jdbcType=VARCHAR}, + + + category_id = #{record.categoryId,jdbcType=BIGINT}, + + + attribute_list = #{record.attributeList,jdbcType=VARCHAR}, + + + supplier_id = #{record.supplierId,jdbcType=VARCHAR}, + + + product_sn = #{record.productSn,jdbcType=VARCHAR}, + + + barcode = #{record.barcode,jdbcType=VARCHAR}, + + + price = #{record.price,jdbcType=DECIMAL}, + + + purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, + + + wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, + + + product_picture = #{record.productPicture,jdbcType=VARCHAR}, + + + product_video = #{record.productVideo,jdbcType=VARCHAR}, + + + product_intro = #{record.productIntro,jdbcType=VARCHAR}, + + + sales_week = #{record.salesWeek,jdbcType=VARCHAR}, + + + print_barcode = #{record.printBarcode,jdbcType=VARCHAR}, + + + stock_count = #{record.stockCount,jdbcType=INTEGER}, + + + + + + + + update t_stock + set id = #{record.id,jdbcType=BIGINT}, + create_by = #{record.createBy,jdbcType=VARCHAR}, + create_time = #{record.createTime,jdbcType=TIMESTAMP}, + del_flag = #{record.delFlag,jdbcType=INTEGER}, + update_by = #{record.updateBy,jdbcType=VARCHAR}, + update_time = #{record.updateTime,jdbcType=TIMESTAMP}, + product_id = #{record.productId,jdbcType=BIGINT}, + product_name = #{record.productName,jdbcType=VARCHAR}, + unit = #{record.unit,jdbcType=VARCHAR}, + shop_id = #{record.shopId,jdbcType=VARCHAR}, + category_id = #{record.categoryId,jdbcType=BIGINT}, + attribute_list = #{record.attributeList,jdbcType=VARCHAR}, + supplier_id = #{record.supplierId,jdbcType=VARCHAR}, + product_sn = #{record.productSn,jdbcType=VARCHAR}, + barcode = #{record.barcode,jdbcType=VARCHAR}, + price = #{record.price,jdbcType=DECIMAL}, + purchase_price = #{record.purchasePrice,jdbcType=DECIMAL}, + wholesale_price = #{record.wholesalePrice,jdbcType=DECIMAL}, + product_picture = #{record.productPicture,jdbcType=VARCHAR}, + product_video = #{record.productVideo,jdbcType=VARCHAR}, + product_intro = #{record.productIntro,jdbcType=VARCHAR}, + sales_week = #{record.salesWeek,jdbcType=VARCHAR}, + print_barcode = #{record.printBarcode,jdbcType=VARCHAR}, + stock_count = #{record.stockCount,jdbcType=INTEGER} + + + + + + update t_stock + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + del_flag = #{delFlag,jdbcType=INTEGER}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + product_id = #{productId,jdbcType=BIGINT}, + + + product_name = #{productName,jdbcType=VARCHAR}, + + + unit = #{unit,jdbcType=VARCHAR}, + + + shop_id = #{shopId,jdbcType=VARCHAR}, + + + category_id = #{categoryId,jdbcType=BIGINT}, + + + attribute_list = #{attributeList,jdbcType=VARCHAR}, + + + supplier_id = #{supplierId,jdbcType=VARCHAR}, + + + product_sn = #{productSn,jdbcType=VARCHAR}, + + + barcode = #{barcode,jdbcType=VARCHAR}, + + + price = #{price,jdbcType=DECIMAL}, + + + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, + + + wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, + + + product_picture = #{productPicture,jdbcType=VARCHAR}, + + + product_video = #{productVideo,jdbcType=VARCHAR}, + + + product_intro = #{productIntro,jdbcType=VARCHAR}, + + + sales_week = #{salesWeek,jdbcType=VARCHAR}, + + + print_barcode = #{printBarcode,jdbcType=VARCHAR}, + + + stock_count = #{stockCount,jdbcType=INTEGER}, + + + where id = #{id,jdbcType=BIGINT} + + + update t_stock + set create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + del_flag = #{delFlag,jdbcType=INTEGER}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + product_id = #{productId,jdbcType=BIGINT}, + product_name = #{productName,jdbcType=VARCHAR}, + unit = #{unit,jdbcType=VARCHAR}, + shop_id = #{shopId,jdbcType=VARCHAR}, + category_id = #{categoryId,jdbcType=BIGINT}, + attribute_list = #{attributeList,jdbcType=VARCHAR}, + supplier_id = #{supplierId,jdbcType=VARCHAR}, + product_sn = #{productSn,jdbcType=VARCHAR}, + barcode = #{barcode,jdbcType=VARCHAR}, + price = #{price,jdbcType=DECIMAL}, + purchase_price = #{purchasePrice,jdbcType=DECIMAL}, + wholesale_price = #{wholesalePrice,jdbcType=DECIMAL}, + product_picture = #{productPicture,jdbcType=VARCHAR}, + product_video = #{productVideo,jdbcType=VARCHAR}, + product_intro = #{productIntro,jdbcType=VARCHAR}, + sales_week = #{salesWeek,jdbcType=VARCHAR}, + print_barcode = #{printBarcode,jdbcType=VARCHAR}, + stock_count = #{stockCount,jdbcType=INTEGER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file From 40e08784192983f5f775ae8e606033e40156775c Mon Sep 17 00:00:00 2001 From: Houpn Date: Fri, 25 Aug 2023 20:48:24 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E6=9E=81=E5=85=89?= =?UTF-8?q?=E6=8E=A8=E9=80=81=E7=9B=B8=E5=85=B3=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/application.yml | 6 +- hiver-core/pom.xml | 10 ++ .../hiver/core/config/jpush/JPushConfig.java | 24 ++++ .../cc/hiver/core/service/JPushService.java | 36 +++++ .../hiver/mall/controller/PushController.java | 24 ++++ .../hiver/mall/controller/SaleController.java | 136 ++++++++++++++++++ .../main/java/cc/hiver/mall/entity/Sale.java | 8 +- .../java/cc/hiver/mall/pojo/dto/SaleDTO.java | 29 ++++ .../java/cc/hiver/mall/pojo/vo/MessageVO.java | 15 ++ .../cc/hiver/mall/pojo/vo/SaleQueryVO.java | 22 +++ .../java/cc/hiver/mall/pojo/vo/SaleVO.java | 28 ++++ .../hiver/mall/service/RushOrderService.java | 9 ++ .../mall/service/SalesAndDetailsService.java | 13 ++ .../mall/service/SendMessageService.java | 9 ++ .../mall/service/StockAndLogService.java | 15 ++ .../service/mybatis/SaleDetailService.java | 10 ++ .../serviceimpl/RushOrderServiceImpl.java | 41 ++++++ .../SalesAndDetailsServiceImpl.java | 103 +++++++++++++ .../serviceimpl/SendMessageServiceImpl.java | 25 ++++ .../serviceimpl/StockAndLogServiceImpl.java | 95 ++++++++++++ 20 files changed, 653 insertions(+), 5 deletions(-) create mode 100644 hiver-core/src/main/java/cc/hiver/core/config/jpush/JPushConfig.java create mode 100644 hiver-core/src/main/java/cc/hiver/core/service/JPushService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PushController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SaleDTO.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/MessageVO.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleQueryVO.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/RushOrderService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SalesAndDetailsService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SendMessageService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/StockAndLogService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SaleDetailService.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/RushOrderServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SalesAndDetailsServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SendMessageServiceImpl.java create mode 100644 hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/StockAndLogServiceImpl.java diff --git a/hiver-admin/src/main/resources/application.yml b/hiver-admin/src/main/resources/application.yml index d2e60c6a..639fa094 100644 --- a/hiver-admin/src/main/resources/application.yml +++ b/hiver-admin/src/main/resources/application.yml @@ -287,6 +287,7 @@ ignored: # 临时增加 - /hiver/app/** - /hiver/thorui/** + - /hiver/order/** # 限流及黑名单不拦截的路径 limitUrls: - /**/*.js @@ -351,4 +352,7 @@ logging: # 最大保存天数 max-history: 7 # 每个文件最大大小 - max-file-size: 5MB \ No newline at end of file + max-file-size: 5MB +jpush: + appKey: 130f556e8473c9b558777fe3 + masterSecret: 2b4e5196dfc40a78db36480d \ No newline at end of file diff --git a/hiver-core/pom.xml b/hiver-core/pom.xml index f3039e4e..6939a04e 100644 --- a/hiver-core/pom.xml +++ b/hiver-core/pom.xml @@ -138,5 +138,15 @@ org.seleniumhq.selenium selenium-java + + cn.jpush.api + jpush-client + 3.2.17 + + + cn.jpush.api + jiguang-common + 1.1.12 + \ No newline at end of file diff --git a/hiver-core/src/main/java/cc/hiver/core/config/jpush/JPushConfig.java b/hiver-core/src/main/java/cc/hiver/core/config/jpush/JPushConfig.java new file mode 100644 index 00000000..65f1dc8f --- /dev/null +++ b/hiver-core/src/main/java/cc/hiver/core/config/jpush/JPushConfig.java @@ -0,0 +1,24 @@ +package cc.hiver.core.config.jpush; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import cn.jiguang.common.ClientConfig; +import cn.jpush.api.JPushClient; + +@Configuration +public class JPushConfig { + + @Value("${jpush.appKey}") + private String appKey; + + @Value("${jpush.masterSecret}") + private String masterSecret; + + @Bean + public JPushClient jPushClient() { + ClientConfig clientConfig = ClientConfig.getInstance(); + return new JPushClient(masterSecret, appKey, null, clientConfig); + } +} diff --git a/hiver-core/src/main/java/cc/hiver/core/service/JPushService.java b/hiver-core/src/main/java/cc/hiver/core/service/JPushService.java new file mode 100644 index 00000000..c113b9a6 --- /dev/null +++ b/hiver-core/src/main/java/cc/hiver/core/service/JPushService.java @@ -0,0 +1,36 @@ +package cc.hiver.core.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import cn.jpush.api.JPushClient; +import cn.jpush.api.push.PushResult; +import cn.jpush.api.push.model.Message; +import cn.jpush.api.push.model.PushPayload; +import cn.jpush.api.push.model.notification.Notification; + +@Service +public class JPushService { + + private final JPushClient jPushClient; + + @Autowired + public JPushService(JPushClient jPushClient) { + this.jPushClient = jPushClient; + } + + public void sendPushNotification(String registrationId, String message) { + PushPayload payload = PushPayload.newBuilder() + .setPlatform(cn.jpush.api.push.model.Platform.all()) + .setAudience(cn.jpush.api.push.model.audience.Audience.registrationId(registrationId)) + .setNotification(Notification.alert(message)) + .build(); + + try { + PushResult result = jPushClient.sendPush(payload); + System.out.println("Push result: " + result); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PushController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PushController.java new file mode 100644 index 00000000..5364f7f6 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/PushController.java @@ -0,0 +1,24 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.service.JPushService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@RestController +public class PushController { + + private final JPushService jPushService; + + @Autowired + public PushController(JPushService jPushService) { + this.jPushService = jPushService; + } + + @GetMapping("/push") + public String pushNotification(@RequestParam String registrationId, @RequestParam String message) { + jPushService.sendPushNotification(registrationId, message); + return "Push request sent!"; + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java new file mode 100644 index 00000000..963c83b5 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SaleController.java @@ -0,0 +1,136 @@ +package cc.hiver.mall.controller; + +import cc.hiver.core.common.utils.ResultUtil; +import cc.hiver.core.common.utils.SecurityUtil; +import cc.hiver.core.common.utils.StringUtils; +import cc.hiver.core.common.vo.Result; +import cc.hiver.mall.entity.*; + + +import cc.hiver.mall.pojo.dto.SaleDTO; +import cc.hiver.mall.pojo.vo.SaleQueryVO; +import cc.hiver.mall.pojo.vo.SaleVO; +import cc.hiver.mall.service.*; +import cc.hiver.mall.service.mybatis.SaleDetailService; +import cc.hiver.mall.service.mybatis.SaleService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.util.ObjectUtils; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Slf4j +@RestController +@Api(tags = "销售订单接口") +@RequestMapping(value = "/hiver/app/sale/") +@Transactional +public class SaleController { + @Autowired + private SalesAndDetailsService salesAndDetailsService; + + @Autowired + private StockAndLogService stockAndLogService; + + @Autowired + private RushOrderService rushOrderService; + + @Autowired + private SendMessageService sendMessageService; + + @Autowired + private SaleService saleService; + + @Autowired + private SaleDetailService saleDetailService; + + @Autowired + private SecurityUtil securityUtil; + + + @RequestMapping(value = "/buy", method = RequestMethod.POST) + @ApiOperation(value = "下单操作") + @Transactional + public Result buy(@RequestBody SaleDTO saleDTO) { + + /** + * 订单中是物流且包含扛包工人员的话,直接进入抢单表 + * */ + //1.处理订单表模块 + Sale sale = salesAndDetailsService.handleSalesAndDetails(saleDTO); + //更新sale + saleDTO.setSale(sale); + //2.处理库存模块 + stockAndLogService.handleSubStockAndLog(saleDTO.getSaleDetailList()); + //3.处理抢单模块 + rushOrderService.handleRushOrder(saleDTO); + //4.消息推送模块 + sendMessageService.handleSendAppMessage(); + + return ResultUtil.success("下单成功"); + + } + + @RequestMapping(value = "/edit", method = RequestMethod.POST) + @ApiOperation(value = "根据id修改货品属性") + public Result edit(SaleQueryVO saleQueryVO) { + Sale sale = saleQueryVO.getSale(); + List saleDetailList = saleQueryVO.getSaleDetailList(); + boolean result = saleService.updateById(sale); + if(result) { + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.eq("sale_id",sale.getId()); + boolean removeBatchByIds = saleDetailService.remove(deleteWrapper); + if (removeBatchByIds){ + return saleDetailService.saveBatch(saleDetailList)?ResultUtil.success("修改成功"):ResultUtil.error("修改失败"); + } + } + return ResultUtil.error("修改失败"); + } + + @RequestMapping(value = "/delById", method = RequestMethod.POST) + @ApiOperation(value = "根据id删除订单") + public Result delete(Sale sale) { + boolean result = saleService.removeById(sale); + if(result) { + QueryWrapper deleteWrapper = new QueryWrapper<>(); + deleteWrapper.eq("sale_id",sale.getId()); + boolean removeBatchByIds = saleDetailService.remove(deleteWrapper); + if (removeBatchByIds){ + return ResultUtil.success("删除成功"); + } + } + return ResultUtil.error("删除失败"); + } + + @RequestMapping(value = "/list", method = RequestMethod.POST) + @ApiOperation(value = "根据条件获得分页") + public Result> queryAll(SaleVO saleVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (!ObjectUtils.isEmpty(saleVO)){ + if (ObjectUtils.isEmpty(saleVO.getPayStatus())) queryWrapper.eq("pay_status",saleVO.getPayStatus()); + if (StringUtils.isEmpty(saleVO.getStatus())) queryWrapper.eq("status",saleVO.getStatus()); + if (StringUtils.isEmpty(saleVO.getTransportType())) queryWrapper.eq("transport_type",saleVO.getTransportType()); + } + List saleList = saleService.list(queryWrapper); + return new ResultUtil>().setData(saleList); + } + + @RequestMapping(value = "/get/{id}", method = RequestMethod.GET) + @ApiOperation(value = "获得订单详情") + public Result get(@PathVariable String id) { + SaleQueryVO saleQueryVO = new SaleQueryVO(); + Sale sale = saleService.getById(id); + saleQueryVO.setSale(sale); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq("sale_id",id); + List saleDetailList = saleDetailService.list(queryWrapper); + saleQueryVO.setSaleDetailList(saleDetailList); + return new ResultUtil().setData(saleQueryVO); + } + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Sale.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Sale.java index 0b72aeed..e1e86046 100644 --- a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Sale.java +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Sale.java @@ -12,7 +12,7 @@ import java.util.Date; @ApiModel(value = "销售单主表") @TableName(value = "t_sale", autoResultMap = true) public class Sale implements Serializable { - private String id = SnowFlakeUtil.nextId().toString(); + private String id = "XD" + SnowFlakeUtil.nextId().toString(); private String createBy; @@ -48,13 +48,13 @@ public class Sale implements Serializable { @ApiModelProperty(value = "未收") private BigDecimal noEarn; - @ApiModelProperty(value = "收款状态 0-未收款 1-已收款") + @ApiModelProperty(value = "收款状态 0-未收款 1-已收款 2-部分收款") private String payStatus; - @ApiModelProperty(value = "订单状态 0-拣货中 1-已提交抢单 2-已取货 3-已送达") + @ApiModelProperty(value = "订单状态 1-拣货中 2-已预定 3-已作废 4-已取货 5-已送达") private String status; - @ApiModelProperty(value = "物流类别 0-物流 1-快递 2-自提 3-拼单") + @ApiModelProperty(value = "物流类别 1-物流 2-自提 3-快递 4-拼单") private String transportType; @ApiModelProperty(value = "拼单店铺地址 为拼单类别时手动输入") diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SaleDTO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SaleDTO.java new file mode 100644 index 00000000..d1374354 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/dto/SaleDTO.java @@ -0,0 +1,29 @@ +package cc.hiver.mall.pojo.dto; + +import cc.hiver.mall.entity.Sale; +import cc.hiver.mall.entity.SaleDetail; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@ApiModel(value = "销售单主表") +@Data +public class SaleDTO implements Serializable { + + @ApiModelProperty(value = "订单") + private Sale sale; + + @ApiModelProperty(value = "订单明细") + private List saleDetailList; + + + @ApiModelProperty(value = "扛包工编号") + private String orderByWorker; + + @ApiModelProperty(value = "物流公司编号") + private String transCompany; + +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/MessageVO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/MessageVO.java new file mode 100644 index 00000000..bc2b6e68 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/MessageVO.java @@ -0,0 +1,15 @@ +package cc.hiver.mall.pojo.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +import java.io.Serializable; + +@ApiModel(value = "消息推送实体") +public class MessageVO implements Serializable { + @ApiModelProperty(value = "客户端标识") + private String registrationId; + + @ApiModelProperty(value = "消息内容") + private String message; +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleQueryVO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleQueryVO.java new file mode 100644 index 00000000..33750c3e --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleQueryVO.java @@ -0,0 +1,22 @@ +package cc.hiver.mall.pojo.vo; + +import cc.hiver.mall.entity.Sale; +import cc.hiver.mall.entity.SaleDetail; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@ApiModel(value = "销售单主表") +@Data +public class SaleQueryVO implements Serializable { + + @ApiModelProperty(value = "订单") + private Sale sale; + + @ApiModelProperty(value = "订单明细") + private List saleDetailList; + +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java new file mode 100644 index 00000000..4fe6f5d1 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/vo/SaleVO.java @@ -0,0 +1,28 @@ +package cc.hiver.mall.pojo.vo; + +import cc.hiver.mall.entity.SaleDetail; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.List; +@Data +@ApiModel(value = "销售单主表") +public class SaleVO implements Serializable { + + @ApiModelProperty(value = "收款状态 0-未收款 1-已收款 2-部分收款") + private String payStatus; + + @ApiModelProperty(value = "订单状态 1-未预定 2-已预定 3-待自提 4-已取货 5-已送达") + private String status; + + @ApiModelProperty(value = "物流类别 1-物流 2-快递 3-自提 4-拼单") + private String transportType; + + + + +} \ No newline at end of file diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/RushOrderService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/RushOrderService.java new file mode 100644 index 00000000..4f5c8605 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/RushOrderService.java @@ -0,0 +1,9 @@ +package cc.hiver.mall.service; + +import cc.hiver.mall.pojo.dto.SaleDTO; + +public interface RushOrderService { + + void handleRushOrder(SaleDTO saleDTO); + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SalesAndDetailsService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SalesAndDetailsService.java new file mode 100644 index 00000000..91c97381 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SalesAndDetailsService.java @@ -0,0 +1,13 @@ +package cc.hiver.mall.service; + +import cc.hiver.mall.entity.Sale; +import cc.hiver.mall.pojo.dto.SaleDTO; +import cc.hiver.mall.pojo.vo.SaleVO; + +public interface SalesAndDetailsService { + + public Sale handleSalesAndDetails(SaleDTO saleDTO); + + public Sale handleBackSalesAndDetails(SaleDTO saleDTO); + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SendMessageService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SendMessageService.java new file mode 100644 index 00000000..0d6f66e2 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/SendMessageService.java @@ -0,0 +1,9 @@ +package cc.hiver.mall.service; + +public interface SendMessageService { + + void handleSendAppMessage(); + + void handleSendWXMessage(); + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/StockAndLogService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/StockAndLogService.java new file mode 100644 index 00000000..fb77d744 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/StockAndLogService.java @@ -0,0 +1,15 @@ +package cc.hiver.mall.service; + +import cc.hiver.mall.entity.SaleDetail; + +import java.util.List; + +public interface StockAndLogService { + + //出 + void handleSubStockAndLog(List saleDetailList); + + //入 + void handleIncStockAndLog(List saleDetailList); + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SaleDetailService.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SaleDetailService.java new file mode 100644 index 00000000..e90c8d4e --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/mybatis/SaleDetailService.java @@ -0,0 +1,10 @@ +package cc.hiver.mall.service.mybatis; + +import cc.hiver.mall.entity.SaleDetail; +import com.baomidou.mybatisplus.extension.service.IService; + +public interface SaleDetailService extends IService { + + + +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/RushOrderServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/RushOrderServiceImpl.java new file mode 100644 index 00000000..5394a03c --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/RushOrderServiceImpl.java @@ -0,0 +1,41 @@ +package cc.hiver.mall.serviceimpl; + +import cc.hiver.mall.entity.OrderXd; +import cc.hiver.mall.entity.Sale; +import cc.hiver.mall.pojo.dto.SaleDTO; +import cc.hiver.mall.service.OrderService; +import cc.hiver.mall.service.RushOrderService; +import cn.hutool.core.util.StrUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class RushOrderServiceImpl implements RushOrderService { + + @Autowired + OrderService orderService; + + @Override + public void handleRushOrder(SaleDTO saleDTO) { + /** + * 根据销售单推入至抢单表 + * */ + Sale sale = saleDTO.getSale(); + OrderXd orderXd = new OrderXd(); + orderXd.setOrderId(sale.getId()); + orderXd.setOrderLogistics(sale.getTransportType()); + orderXd.setOrderAddress(sale.getProvince()+","+sale.getCity()+","+sale.getArea()); + if("4".equals(sale.getTransportType())) + orderXd.setOrderStreet(sale.getShareAddress()); + else + orderXd.setOrderStreet(sale.getReceiveAddress()); + orderXd.setOrderStatus(Integer.valueOf(sale.getStatus())); + orderXd.setOrderByWorker(StrUtil.isNotEmpty(saleDTO.getOrderByWorker())? saleDTO.getOrderByWorker() : null); + orderXd.setTransCompany(saleDTO.getTransCompany()); + orderXd.setOrderByWorkertime(sale.getCreateTime()); + orderXd.setTimeout(2); + + orderService.save(orderXd); + + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SalesAndDetailsServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SalesAndDetailsServiceImpl.java new file mode 100644 index 00000000..50f23298 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SalesAndDetailsServiceImpl.java @@ -0,0 +1,103 @@ +package cc.hiver.mall.serviceimpl; + +import cc.hiver.mall.entity.Sale; +import cc.hiver.mall.entity.SaleDetail; +import cc.hiver.mall.pojo.dto.SaleDTO; +import cc.hiver.mall.service.SalesAndDetailsService; +import cc.hiver.mall.service.mybatis.SaleDetailService; +import cc.hiver.mall.service.mybatis.SaleService; +import cn.hutool.core.util.StrUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; + +@Service +public class SalesAndDetailsServiceImpl implements SalesAndDetailsService { + + + @Autowired + SaleService saleService; + + @Autowired + SaleDetailService saleDetailService; + + @Override + public Sale handleSalesAndDetails(SaleDTO saleDTO) { + + /** + * 1.处理Sale总订单 + * 处理订单状态/收款状态 + * */ + Sale sale = saleDTO.getSale(); + + BigDecimal realAmount = sale.getRealAmount(); + BigDecimal alreadyEarn = sale.getAlreadyEarn(); + if(realAmount.subtract(alreadyEarn).compareTo(BigDecimal.ZERO)>0 && alreadyEarn.compareTo(BigDecimal.ZERO)>0){ + sale.setPayStatus("2"); + } else if (realAmount.subtract(alreadyEarn).compareTo(BigDecimal.ZERO)==0){ + sale.setPayStatus("1"); + } else { + sale.setPayStatus("0"); + } + + if (StrUtil.isNotBlank(saleDTO.getOrderByWorker())) { + sale.setStatus("2"); + } else { + sale.setStatus("1"); + } + saleService.save(sale); + + String saleId = sale.getId(); + /** + * 2.处理SaleDetail明细单 + * */ + + List saleDetailList = saleDTO.getSaleDetailList(); + for(SaleDetail saleDetail : saleDetailList) + saleDetail.setSaleId(saleId); + saleDetailService.saveBatch(saleDetailList); + + return sale; + } + + @Override + public Sale handleBackSalesAndDetails(SaleDTO saleDTO) { + + /** + * 1.处理Sale总订单 + * 处理订单状态/收款状态 + * */ + Sale sale = saleDTO.getSale(); + + BigDecimal realAmount = sale.getRealAmount(); + BigDecimal alreadyEarn = sale.getAlreadyEarn(); + if(realAmount.subtract(alreadyEarn).compareTo(BigDecimal.ZERO)>0 && alreadyEarn.compareTo(BigDecimal.ZERO)>0){ + sale.setPayStatus("2"); + } else if (realAmount.subtract(alreadyEarn).compareTo(BigDecimal.ZERO)==0){ + sale.setPayStatus("1"); + } else { + sale.setPayStatus("0"); + } + + if (StrUtil.isNotBlank(saleDTO.getOrderByWorker())) { + sale.setStatus("2"); + } else { + sale.setStatus("1"); + } + saleService.save(sale); + + String saleId = sale.getId(); + /** + * 2.处理SaleDetail明细单 + * */ + + List saleDetailList = saleDTO.getSaleDetailList(); + for(SaleDetail saleDetail : saleDetailList) + saleDetail.setSaleId(saleId); + saleDetailService.saveBatch(saleDetailList); + + return sale; + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SendMessageServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SendMessageServiceImpl.java new file mode 100644 index 00000000..1140c364 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/SendMessageServiceImpl.java @@ -0,0 +1,25 @@ +package cc.hiver.mall.serviceimpl; + +import cc.hiver.core.service.JPushService; +import cc.hiver.mall.service.SendMessageService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +@Service +public class SendMessageServiceImpl implements SendMessageService { + + @Autowired + JPushService jPushService; + + @Override + public void handleSendAppMessage() { + String registrationId = ""; + String message = "宝贝儿,来订单了"; + jPushService.sendPushNotification(registrationId, message); + } + + @Override + public void handleSendWXMessage() { + + } +} diff --git a/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/StockAndLogServiceImpl.java b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/StockAndLogServiceImpl.java new file mode 100644 index 00000000..d625f6b2 --- /dev/null +++ b/hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/StockAndLogServiceImpl.java @@ -0,0 +1,95 @@ +package cc.hiver.mall.serviceimpl; + +import cc.hiver.core.common.utils.BeanUtils; +import cc.hiver.mall.entity.SaleDetail; +import cc.hiver.mall.entity.Stock; +import cc.hiver.mall.entity.StockLog; +import cc.hiver.mall.service.StockAndLogService; +import cc.hiver.mall.service.mybatis.SaleDetailService; +import cc.hiver.mall.service.mybatis.StockLogService; +import cc.hiver.mall.service.mybatis.StockService; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class StockAndLogServiceImpl implements StockAndLogService { + + @Autowired + StockService stockService; + + @Autowired + StockLogService stockLogService; + + @Autowired + SaleDetailService saleDetailService; + + @Override + public void handleSubStockAndLog(List saleDetailList) { + + //根据销售单明细进行库存消减 + for(SaleDetail saleDetail : saleDetailList){ + String productId = saleDetail.getProductId(); + String attributeList = saleDetail.getAttributeList(); + QueryWrapper stockQueryWrapper = new QueryWrapper<>(); + stockQueryWrapper.eq("product_id",productId); + stockQueryWrapper.eq("attribute_list",attributeList); + //存在库存则修改库存数量 + Stock origin = stockService.getOne(stockQueryWrapper); + Integer stockCount = origin.getStockCount(); + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("id",origin.getId()); + updateWrapper.set("stock_count",stockCount - saleDetail.getProductCount()); + stockService.update(updateWrapper); + + //2.记录库存履历 + StockLog stockLog = new StockLog(); + stockLog.setChangeType("1");//出库 + stockLog.setProductId(saleDetail.getProductId()); + stockLog.setProductSpecs(saleDetail.getAttributeList()); + stockLog.setStock(stockCount);//出库前数量 + stockLog.setChangeStock(saleDetail.getProductCount());//出库数量 + stockLog.setPrice(saleDetail.getPrice()); + stockLog.setPurchasePrice(saleDetail.getPurchasePrice()); + stockLog.setWholesalePrice(saleDetail.getWholesalePrice()); + stockLog.setShopId(saleDetail.getShopId()); + stockLogService.save(stockLog); + } + + } + + @Override + public void handleIncStockAndLog(List saleDetailList) { + //根据销售单明细进行库存消减 + for(SaleDetail saleDetail : saleDetailList){ + String productId = saleDetail.getProductId(); + String attributeList = saleDetail.getAttributeList(); + QueryWrapper stockQueryWrapper = new QueryWrapper<>(); + stockQueryWrapper.eq("product_id",productId); + stockQueryWrapper.eq("attribute_list",attributeList); + //存在库存则修改库存数量 + Stock origin = stockService.getOne(stockQueryWrapper); + Integer stockCount = origin.getStockCount(); + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.eq("id",origin.getId()); + updateWrapper.set("stock_count",stockCount + saleDetail.getProductCount()); + stockService.update(updateWrapper); + + //2.记录库存履历 + StockLog stockLog = new StockLog(); + stockLog.setChangeType("0");//退货-入库 + stockLog.setProductId(saleDetail.getProductId()); + stockLog.setProductSpecs(saleDetail.getAttributeList()); + stockLog.setStock(stockCount);//退货-入库前数量 + stockLog.setChangeStock(saleDetail.getProductCount());//退货-入库数量 + stockLog.setPrice(saleDetail.getPrice()); + stockLog.setPurchasePrice(saleDetail.getPurchasePrice()); + stockLog.setWholesalePrice(saleDetail.getWholesalePrice()); + stockLog.setShopId(saleDetail.getShopId()); + stockLogService.save(stockLog); + } + } +}