完成商品管理的多规格保存入库
This commit is contained in:
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsAttrResultService;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrResult;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrResultParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性详情表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "商品属性详情表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-attr-result")
|
||||
public class GoodsAttrResultController extends BaseController {
|
||||
@Resource
|
||||
private GoodsAttrResultService goodsAttrResultService;
|
||||
|
||||
@ApiOperation("分页查询商品属性详情表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsAttrResult>> page(GoodsAttrResultParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrResultService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品属性详情表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsAttrResult>> list(GoodsAttrResultParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrResultService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品属性详情表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsAttrResult> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrResultService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品属性详情表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsAttrResult goodsAttrResult) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsAttrResult.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsAttrResultService.save(goodsAttrResult)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品属性详情表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsAttrResult goodsAttrResult) {
|
||||
if (goodsAttrResultService.updateById(goodsAttrResult)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品属性详情表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsAttrResultService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品属性详情表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsAttrResult> list) {
|
||||
if (goodsAttrResultService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品属性详情表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsAttrResult> batchParam) {
|
||||
if (batchParam.update(goodsAttrResultService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品属性详情表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsAttrResultService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsAttrValueService;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrValue;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrValueParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性值表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "商品属性值表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-attr-value")
|
||||
public class GoodsAttrValueController extends BaseController {
|
||||
@Resource
|
||||
private GoodsAttrValueService goodsAttrValueService;
|
||||
|
||||
@ApiOperation("分页查询商品属性值表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsAttrValue>> page(GoodsAttrValueParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrValueService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品属性值表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsAttrValue>> list(GoodsAttrValueParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrValueService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品属性值表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsAttrValue> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrValueService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品属性值表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsAttrValue goodsAttrValue) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsAttrValue.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsAttrValueService.save(goodsAttrValue)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品属性值表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsAttrValue goodsAttrValue) {
|
||||
if (goodsAttrValueService.updateById(goodsAttrValue)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品属性值表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsAttrValueService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品属性值表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsAttrValue> list) {
|
||||
if (goodsAttrValueService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品属性值表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsAttrValue> batchParam) {
|
||||
if (batchParam.update(goodsAttrValueService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品属性值表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsAttrValueService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsCommentService;
|
||||
import com.gxwebsoft.shop.entity.GoodsComment;
|
||||
import com.gxwebsoft.shop.param.GoodsCommentParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评论表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "评论表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-comment")
|
||||
public class GoodsCommentController extends BaseController {
|
||||
@Resource
|
||||
private GoodsCommentService goodsCommentService;
|
||||
|
||||
@ApiOperation("分页查询评论表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsComment>> page(GoodsCommentParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsCommentService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部评论表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsComment>> list(GoodsCommentParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsCommentService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询评论表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsComment> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsCommentService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加评论表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsComment goodsComment) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsComment.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsCommentService.save(goodsComment)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改评论表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsComment goodsComment) {
|
||||
if (goodsCommentService.updateById(goodsComment)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除评论表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsCommentService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加评论表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsComment> list) {
|
||||
if (goodsCommentService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改评论表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsComment> batchParam) {
|
||||
if (batchParam.update(goodsCommentService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除评论表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsCommentService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,6 +1,11 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.entity.GoodsSku;
|
||||
import com.gxwebsoft.shop.entity.GoodsSpec;
|
||||
import com.gxwebsoft.shop.entity.SpecValue;
|
||||
import com.gxwebsoft.shop.service.GoodsService;
|
||||
import com.gxwebsoft.shop.entity.Goods;
|
||||
import com.gxwebsoft.shop.param.GoodsParam;
|
||||
@@ -10,13 +15,18 @@ import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import com.gxwebsoft.shop.service.GoodsSkuService;
|
||||
import com.gxwebsoft.shop.service.GoodsSpecService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.tomcat.util.buf.StringUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 商品记录表控制器
|
||||
@@ -28,87 +38,117 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods")
|
||||
public class GoodsController extends BaseController {
|
||||
@Resource
|
||||
private GoodsService goodsService;
|
||||
@Resource
|
||||
private GoodsService goodsService;
|
||||
@Resource
|
||||
private GoodsSpecService goodsSpecService;
|
||||
@Resource
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@ApiOperation("分页查询商品记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Goods>> page(GoodsParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsService.pageRel(param));
|
||||
}
|
||||
@ApiOperation("分页查询商品记录表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Goods>> page(GoodsParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Goods>> list(GoodsParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsService.listRel(param));
|
||||
}
|
||||
@ApiOperation("查询全部商品记录表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Goods>> list(GoodsParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Goods> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Goods goods) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
goods.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (goodsService.save(goods)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
@ApiOperation("根据id查询商品记录表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Goods> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Goods goods) {
|
||||
if (goodsService.updateById(goods)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
@ApiOperation("添加商品记录表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Goods goods) {
|
||||
// 记录当前登录用户id
|
||||
User loginUser = getLoginUser();
|
||||
if (loginUser != null) {
|
||||
goods.setUserId(loginUser.getUserId());
|
||||
}
|
||||
if (goodsService.save(goods)) {
|
||||
|
||||
@ApiOperation("删除商品记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
// 保存商品规格
|
||||
final List<GoodsSpec> goodsSpecs = goods.getGoodsSpecs();
|
||||
goodsSpecs.forEach(d -> {
|
||||
d.setGoodsId(goods.getGoodsId());
|
||||
final List<String> collect = d.getValueList().stream().map(SpecValue::getSpecValue).collect(Collectors.toList());
|
||||
d.setSpecValues(StringUtils.join(collect, ','));
|
||||
});
|
||||
goodsSpecService.saveBatch(goodsSpecs);
|
||||
|
||||
@ApiOperation("批量添加商品记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Goods> list) {
|
||||
if (goodsService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
// 保存商品sku表
|
||||
final List<GoodsSku> goodsSkus = goods.getGoodsSkus();
|
||||
goodsSkus.forEach(d -> {
|
||||
d.setGoodsId(goods.getGoodsId());
|
||||
});
|
||||
goodsSkuService.saveBatch(goodsSkus);
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Goods> batchParam) {
|
||||
if (batchParam.update(goodsService, "goods_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
@ApiOperation("修改商品记录表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Goods goods) {
|
||||
if (goodsService.updateById(goods)) {
|
||||
// 更新spec规格表
|
||||
if (goodsSpecService.remove(new LambdaQueryWrapper<GoodsSpec>().eq(GoodsSpec::getGoodsId, goods.getGoodsId()))) {
|
||||
goodsSpecService.saveBatch(goods.getGoodsSpecs());
|
||||
}
|
||||
// 更新sku表
|
||||
if (goodsSkuService.remove(new LambdaQueryWrapper<GoodsSku>().eq(GoodsSku::getGoodsId, goods.getGoodsId()))) {
|
||||
goodsSkuService.saveBatch(goods.getGoodsSkus());
|
||||
}
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
@ApiOperation("删除商品记录表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品记录表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Goods> list) {
|
||||
if (goodsService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品记录表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Goods> batchParam) {
|
||||
if (batchParam.update(goodsService, "goods_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品记录表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsCouponService;
|
||||
import com.gxwebsoft.shop.entity.GoodsCoupon;
|
||||
import com.gxwebsoft.shop.param.GoodsCouponParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品优惠券表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "商品优惠券表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-coupon")
|
||||
public class GoodsCouponController extends BaseController {
|
||||
@Resource
|
||||
private GoodsCouponService goodsCouponService;
|
||||
|
||||
@ApiOperation("分页查询商品优惠券表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsCoupon>> page(GoodsCouponParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsCouponService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品优惠券表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsCoupon>> list(GoodsCouponParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsCouponService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品优惠券表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsCoupon> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsCouponService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品优惠券表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsCoupon goodsCoupon) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsCoupon.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsCouponService.save(goodsCoupon)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品优惠券表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsCoupon goodsCoupon) {
|
||||
if (goodsCouponService.updateById(goodsCoupon)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品优惠券表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsCouponService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品优惠券表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsCoupon> list) {
|
||||
if (goodsCouponService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品优惠券表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsCoupon> batchParam) {
|
||||
if (batchParam.update(goodsCouponService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品优惠券表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsCouponService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsDescriptionService;
|
||||
import com.gxwebsoft.shop.entity.GoodsDescription;
|
||||
import com.gxwebsoft.shop.param.GoodsDescriptionParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品描述表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "商品描述表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-description")
|
||||
public class GoodsDescriptionController extends BaseController {
|
||||
@Resource
|
||||
private GoodsDescriptionService goodsDescriptionService;
|
||||
|
||||
@ApiOperation("分页查询商品描述表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsDescription>> page(GoodsDescriptionParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsDescriptionService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品描述表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsDescription>> list(GoodsDescriptionParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsDescriptionService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品描述表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsDescription> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsDescriptionService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品描述表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsDescription goodsDescription) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsDescription.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsDescriptionService.save(goodsDescription)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品描述表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsDescription goodsDescription) {
|
||||
if (goodsDescriptionService.updateById(goodsDescription)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品描述表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsDescriptionService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品描述表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsDescription> list) {
|
||||
if (goodsDescriptionService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品描述表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsDescription> batchParam) {
|
||||
if (batchParam.update(goodsDescriptionService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品描述表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsDescriptionService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsRelationService;
|
||||
import com.gxwebsoft.shop.entity.GoodsRelation;
|
||||
import com.gxwebsoft.shop.param.GoodsRelationParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品点赞和收藏表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "商品点赞和收藏表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-relation")
|
||||
public class GoodsRelationController extends BaseController {
|
||||
@Resource
|
||||
private GoodsRelationService goodsRelationService;
|
||||
|
||||
@ApiOperation("分页查询商品点赞和收藏表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsRelation>> page(GoodsRelationParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsRelationService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品点赞和收藏表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsRelation>> list(GoodsRelationParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsRelationService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品点赞和收藏表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsRelation> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsRelationService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品点赞和收藏表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsRelation goodsRelation) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsRelation.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsRelationService.save(goodsRelation)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品点赞和收藏表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsRelation goodsRelation) {
|
||||
if (goodsRelationService.updateById(goodsRelation)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品点赞和收藏表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsRelationService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品点赞和收藏表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsRelation> list) {
|
||||
if (goodsRelationService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品点赞和收藏表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsRelation> batchParam) {
|
||||
if (batchParam.update(goodsRelationService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品点赞和收藏表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsRelationService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,114 +0,0 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsRuleService;
|
||||
import com.gxwebsoft.shop.entity.GoodsRule;
|
||||
import com.gxwebsoft.shop.param.GoodsRuleParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.annotation.OperationLog;
|
||||
import com.gxwebsoft.common.system.entity.User;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规则值(规格)表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Api(tags = "商品规则值(规格)表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-rule")
|
||||
public class GoodsRuleController extends BaseController {
|
||||
@Resource
|
||||
private GoodsRuleService goodsRuleService;
|
||||
|
||||
@ApiOperation("分页查询商品规则值(规格)表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsRule>> page(GoodsRuleParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsRuleService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品规则值(规格)表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsRule>> list(GoodsRuleParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsRuleService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品规则值(规格)表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsRule> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsRuleService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品规则值(规格)表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsRule goodsRule) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsRule.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsRuleService.save(goodsRule)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品规则值(规格)表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsRule goodsRule) {
|
||||
if (goodsRuleService.updateById(goodsRule)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品规则值(规格)表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsRuleService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品规则值(规格)表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsRule> list) {
|
||||
if (goodsRuleService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品规则值(规格)表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsRule> batchParam) {
|
||||
if (batchParam.update(goodsRuleService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品规则值(规格)表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsRuleService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
+35
-35
@@ -1,9 +1,9 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsLogService;
|
||||
import com.gxwebsoft.shop.entity.GoodsLog;
|
||||
import com.gxwebsoft.shop.param.GoodsLogParam;
|
||||
import com.gxwebsoft.shop.service.GoodsSkuService;
|
||||
import com.gxwebsoft.shop.entity.GoodsSku;
|
||||
import com.gxwebsoft.shop.param.GoodsSkuParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
@@ -19,93 +19,93 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品日志表控制器
|
||||
* 商品sku列表控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Api(tags = "商品日志表管理")
|
||||
@Api(tags = "商品sku列表管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-log")
|
||||
public class GoodsLogController extends BaseController {
|
||||
@RequestMapping("/api/shop/goods-sku")
|
||||
public class GoodsSkuController extends BaseController {
|
||||
@Resource
|
||||
private GoodsLogService goodsLogService;
|
||||
private GoodsSkuService goodsSkuService;
|
||||
|
||||
@ApiOperation("分页查询商品日志表")
|
||||
@ApiOperation("分页查询商品sku列表")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsLog>> page(GoodsLogParam param) {
|
||||
public ApiResult<PageResult<GoodsSku>> page(GoodsSkuParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsLogService.pageRel(param));
|
||||
return success(goodsSkuService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品日志表")
|
||||
@ApiOperation("查询全部商品sku列表")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsLog>> list(GoodsLogParam param) {
|
||||
public ApiResult<List<GoodsSku>> list(GoodsSkuParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsLogService.listRel(param));
|
||||
return success(goodsSkuService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品日志表")
|
||||
@ApiOperation("根据id查询商品sku列表")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsLog> get(@PathVariable("id") Integer id) {
|
||||
public ApiResult<GoodsSku> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsLogService.getByIdRel(id));
|
||||
return success(goodsSkuService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品日志表")
|
||||
@ApiOperation("添加商品sku列表")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsLog goodsLog) {
|
||||
public ApiResult<?> save(@RequestBody GoodsSku goodsSku) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsLog.setUserId(loginUser.getUserId());
|
||||
// goodsSku.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsLogService.save(goodsLog)) {
|
||||
if (goodsSkuService.save(goodsSku)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品日志表")
|
||||
@ApiOperation("修改商品sku列表")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsLog goodsLog) {
|
||||
if (goodsLogService.updateById(goodsLog)) {
|
||||
public ApiResult<?> update(@RequestBody GoodsSku goodsSku) {
|
||||
if (goodsSkuService.updateById(goodsSku)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品日志表")
|
||||
@ApiOperation("删除商品sku列表")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsLogService.removeById(id)) {
|
||||
if (goodsSkuService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品日志表")
|
||||
@ApiOperation("批量添加商品sku列表")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsLog> list) {
|
||||
if (goodsLogService.saveBatch(list)) {
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsSku> list) {
|
||||
if (goodsSkuService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品日志表")
|
||||
@ApiOperation("批量修改商品sku列表")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsLog> batchParam) {
|
||||
if (batchParam.update(goodsLogService, "id")) {
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsSku> batchParam) {
|
||||
if (batchParam.update(goodsSkuService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品日志表")
|
||||
@ApiOperation("批量删除商品sku列表")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsLogService.removeByIds(ids)) {
|
||||
if (goodsSkuService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
+35
-35
@@ -1,9 +1,9 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.shop.service.GoodsAttrService;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttr;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrParam;
|
||||
import com.gxwebsoft.shop.service.GoodsSpecService;
|
||||
import com.gxwebsoft.shop.entity.GoodsSpec;
|
||||
import com.gxwebsoft.shop.param.GoodsSpecParam;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
@@ -19,93 +19,93 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性表控制器
|
||||
* 商品多规格控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Api(tags = "商品属性表管理")
|
||||
@Api(tags = "商品多规格管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/goods-attr")
|
||||
public class GoodsAttrController extends BaseController {
|
||||
@RequestMapping("/api/shop/goods-spec")
|
||||
public class GoodsSpecController extends BaseController {
|
||||
@Resource
|
||||
private GoodsAttrService goodsAttrService;
|
||||
private GoodsSpecService goodsSpecService;
|
||||
|
||||
@ApiOperation("分页查询商品属性表")
|
||||
@ApiOperation("分页查询商品多规格")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<GoodsAttr>> page(GoodsAttrParam param) {
|
||||
public ApiResult<PageResult<GoodsSpec>> page(GoodsSpecParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrService.pageRel(param));
|
||||
return success(goodsSpecService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品属性表")
|
||||
@ApiOperation("查询全部商品多规格")
|
||||
@GetMapping()
|
||||
public ApiResult<List<GoodsAttr>> list(GoodsAttrParam param) {
|
||||
public ApiResult<List<GoodsSpec>> list(GoodsSpecParam param) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrService.listRel(param));
|
||||
return success(goodsSpecService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品属性表")
|
||||
@ApiOperation("根据id查询商品多规格")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<GoodsAttr> get(@PathVariable("id") Integer id) {
|
||||
public ApiResult<GoodsSpec> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(goodsAttrService.getByIdRel(id));
|
||||
return success(goodsSpecService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品属性表")
|
||||
@ApiOperation("添加商品多规格")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody GoodsAttr goodsAttr) {
|
||||
public ApiResult<?> save(@RequestBody GoodsSpec goodsSpec) {
|
||||
// 记录当前登录用户id
|
||||
// User loginUser = getLoginUser();
|
||||
// if (loginUser != null) {
|
||||
// goodsAttr.setUserId(loginUser.getUserId());
|
||||
// goodsSpec.setUserId(loginUser.getUserId());
|
||||
// }
|
||||
if (goodsAttrService.save(goodsAttr)) {
|
||||
if (goodsSpecService.save(goodsSpec)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品属性表")
|
||||
@ApiOperation("修改商品多规格")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody GoodsAttr goodsAttr) {
|
||||
if (goodsAttrService.updateById(goodsAttr)) {
|
||||
public ApiResult<?> update(@RequestBody GoodsSpec goodsSpec) {
|
||||
if (goodsSpecService.updateById(goodsSpec)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品属性表")
|
||||
@ApiOperation("删除商品多规格")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (goodsAttrService.removeById(id)) {
|
||||
if (goodsSpecService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品属性表")
|
||||
@ApiOperation("批量添加商品多规格")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsAttr> list) {
|
||||
if (goodsAttrService.saveBatch(list)) {
|
||||
public ApiResult<?> saveBatch(@RequestBody List<GoodsSpec> list) {
|
||||
if (goodsSpecService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品属性表")
|
||||
@ApiOperation("批量修改商品多规格")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsAttr> batchParam) {
|
||||
if (batchParam.update(goodsAttrService, "id")) {
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsSpec> batchParam) {
|
||||
if (batchParam.update(goodsSpecService, "id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品属性表")
|
||||
@ApiOperation("批量删除商品多规格")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (goodsAttrService.removeByIds(ids)) {
|
||||
if (goodsSpecService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.Spec;
|
||||
import com.gxwebsoft.shop.param.SpecParam;
|
||||
import com.gxwebsoft.shop.service.SpecService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:29:43
|
||||
*/
|
||||
@Api(tags = "商品规格管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/spec")
|
||||
public class SpecController extends BaseController {
|
||||
@Resource
|
||||
private SpecService specService;
|
||||
|
||||
@ApiOperation("分页查询商品规格")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<Spec>> page(SpecParam param) {
|
||||
// 使用关联查询
|
||||
return success(specService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部商品规格")
|
||||
@GetMapping()
|
||||
public ApiResult<List<Spec>> list(SpecParam param) {
|
||||
// 使用关联查询
|
||||
return success(specService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询商品规格")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<Spec> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(specService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加商品规格")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody Spec spec) {
|
||||
if (specService.count(new LambdaQueryWrapper<Spec>().eq(Spec::getSpecName,spec.getSpecName())) > 0) {
|
||||
return fail("规格名称已存在");
|
||||
}
|
||||
if (specService.save(spec)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品规格")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody Spec spec) {
|
||||
if (specService.updateById(spec)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品规格")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (specService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加商品规格")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<Spec> list) {
|
||||
if (specService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改商品规格")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<Spec> batchParam) {
|
||||
if (batchParam.update(specService, "spec_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除商品规格")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (specService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package com.gxwebsoft.shop.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.gxwebsoft.common.core.web.ApiResult;
|
||||
import com.gxwebsoft.common.core.web.BaseController;
|
||||
import com.gxwebsoft.common.core.web.BatchParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.SpecValue;
|
||||
import com.gxwebsoft.shop.param.SpecValueParam;
|
||||
import com.gxwebsoft.shop.service.SpecValueService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值控制器
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:49:15
|
||||
*/
|
||||
@Api(tags = "规格值管理")
|
||||
@RestController
|
||||
@RequestMapping("/api/shop/spec-value")
|
||||
public class SpecValueController extends BaseController {
|
||||
@Resource
|
||||
private SpecValueService specValueService;
|
||||
|
||||
@ApiOperation("分页查询规格值")
|
||||
@GetMapping("/page")
|
||||
public ApiResult<PageResult<SpecValue>> page(SpecValueParam param) {
|
||||
// 使用关联查询
|
||||
return success(specValueService.pageRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("查询全部规格值")
|
||||
@GetMapping()
|
||||
public ApiResult<List<SpecValue>> list(SpecValueParam param) {
|
||||
// 使用关联查询
|
||||
return success(specValueService.listRel(param));
|
||||
}
|
||||
|
||||
@ApiOperation("根据id查询规格值")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<SpecValue> get(@PathVariable("id") Integer id) {
|
||||
// 使用关联查询
|
||||
return success(specValueService.getByIdRel(id));
|
||||
}
|
||||
|
||||
@ApiOperation("添加规格值")
|
||||
@PostMapping()
|
||||
public ApiResult<?> save(@RequestBody SpecValue specValue) {
|
||||
if (specValueService.count(new LambdaQueryWrapper<SpecValue>().eq(SpecValue::getSpecId,specValue.getSpecId()).eq(SpecValue::getSpecValue,specValue.getSpecValue())) > 0) {
|
||||
return fail("规格值已存在");
|
||||
}
|
||||
if (specValueService.save(specValue)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("修改规格值")
|
||||
@PutMapping()
|
||||
public ApiResult<?> update(@RequestBody SpecValue specValue) {
|
||||
if (specValueService.updateById(specValue)) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("删除规格值")
|
||||
@DeleteMapping("/{id}")
|
||||
public ApiResult<?> remove(@PathVariable("id") Integer id) {
|
||||
if (specValueService.removeById(id)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量添加规格值")
|
||||
@PostMapping("/batch")
|
||||
public ApiResult<?> saveBatch(@RequestBody List<SpecValue> list) {
|
||||
if (specValueService.saveBatch(list)) {
|
||||
return success("添加成功");
|
||||
}
|
||||
return fail("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改规格值")
|
||||
@PutMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody BatchParam<SpecValue> batchParam) {
|
||||
if (batchParam.update(specValueService, "spec_value_id")) {
|
||||
return success("修改成功");
|
||||
}
|
||||
return fail("修改失败");
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除规格值")
|
||||
@DeleteMapping("/batch")
|
||||
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
|
||||
if (specValueService.removeByIds(ids)) {
|
||||
return success("删除成功");
|
||||
}
|
||||
return fail("删除失败");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -91,9 +93,17 @@ public class Goods implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty(value = "商品规格")
|
||||
@TableField(exist = false)
|
||||
private List<GoodsSpec> goodsSpecs;
|
||||
|
||||
@ApiModelProperty(value = "商品sku列表")
|
||||
@TableField(exist = false)
|
||||
private List<GoodsSku> goodsSkus;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品属性详情表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsAttrResult对象", description = "商品属性详情表")
|
||||
@TableName("shop_goods_attr_result")
|
||||
public class GoodsAttrResult implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "商品属性参数")
|
||||
private String result;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品属性值表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsAttrValue对象", description = "商品属性值表")
|
||||
@TableName("shop_goods_attr_value")
|
||||
public class GoodsAttrValue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "商品属性索引值 (attr_value|attr_value[|....])")
|
||||
private String suk;
|
||||
|
||||
@ApiModelProperty(value = "属性对应的库存")
|
||||
private Integer stock;
|
||||
|
||||
@ApiModelProperty(value = "销量")
|
||||
private Integer sales;
|
||||
|
||||
@ApiModelProperty(value = "属性金额")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "唯一值")
|
||||
private String unique;
|
||||
|
||||
@ApiModelProperty(value = "成本价")
|
||||
private BigDecimal cost;
|
||||
|
||||
@ApiModelProperty(value = "商品条码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty(value = "原价")
|
||||
private BigDecimal otPrice;
|
||||
|
||||
@ApiModelProperty(value = "重量")
|
||||
private BigDecimal weight;
|
||||
|
||||
@ApiModelProperty(value = "体积")
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty(value = "一级返佣")
|
||||
private BigDecimal brokerage;
|
||||
|
||||
@ApiModelProperty(value = "二级返佣")
|
||||
private BigDecimal brokerageTwo;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "活动限购数量")
|
||||
private Integer quota;
|
||||
|
||||
@ApiModelProperty(value = "活动限购数量显示")
|
||||
private Integer quotaShow;
|
||||
|
||||
@ApiModelProperty(value = "attr_values 创建更新时的属性对应")
|
||||
private String attrValue;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@@ -84,9 +86,9 @@ public class GoodsCategory implements Serializable {
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 评论表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsComment对象", description = "评论表")
|
||||
@TableName("shop_goods_comment")
|
||||
public class GoodsComment implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "评论ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer uid;
|
||||
|
||||
@ApiModelProperty(value = "订单ID")
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty(value = "商品唯一id")
|
||||
private String unique;
|
||||
|
||||
@ApiModelProperty(value = "商品id")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "某种商品类型(普通商品、秒杀商品)")
|
||||
private String replyType;
|
||||
|
||||
@ApiModelProperty(value = "商品分数")
|
||||
private Boolean goodsScore;
|
||||
|
||||
@ApiModelProperty(value = "服务分数")
|
||||
private Boolean serviceScore;
|
||||
|
||||
@ApiModelProperty(value = "评论内容")
|
||||
private String comment;
|
||||
|
||||
@ApiModelProperty(value = "评论图片")
|
||||
private String pics;
|
||||
|
||||
@ApiModelProperty(value = "管理员回复内容")
|
||||
private String merchantReplyContent;
|
||||
|
||||
@ApiModelProperty(value = "管理员回复时间")
|
||||
private Integer merchantReplyTime;
|
||||
|
||||
@ApiModelProperty(value = "0未删除1已删除")
|
||||
private Boolean isDel;
|
||||
|
||||
@ApiModelProperty(value = "0未回复1已回复")
|
||||
private Boolean isReply;
|
||||
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "商品规格属性值,多个,号隔开")
|
||||
private String sku;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品优惠券表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsCoupon对象", description = "商品优惠券表")
|
||||
@TableName("shop_goods_coupon")
|
||||
public class GoodsCoupon implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品id")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "优惠劵id")
|
||||
private Integer issueCouponId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品描述表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsDescription对象", description = "商品描述表")
|
||||
@TableName("shop_goods_description")
|
||||
public class GoodsDescription implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "商品详情")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "商品类型")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品日志表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsLog对象", description = "商品日志表")
|
||||
@TableName("shop_goods_log")
|
||||
public class GoodsLog implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "统计ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "类型visit,cart,order,pay,collect,refund")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "是否浏览")
|
||||
private Boolean visitNum;
|
||||
|
||||
@ApiModelProperty(value = "加入购物车数量")
|
||||
private Integer cartNum;
|
||||
|
||||
@ApiModelProperty(value = "下单数量")
|
||||
private Integer orderNum;
|
||||
|
||||
@ApiModelProperty(value = "支付数量")
|
||||
private Integer payNum;
|
||||
|
||||
@ApiModelProperty(value = "支付金额")
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@ApiModelProperty(value = "商品成本价")
|
||||
private BigDecimal costPrice;
|
||||
|
||||
@ApiModelProperty(value = "支付用户ID")
|
||||
private Integer payUid;
|
||||
|
||||
@ApiModelProperty(value = "退款数量")
|
||||
private Integer refundNum;
|
||||
|
||||
@ApiModelProperty(value = "退款金额")
|
||||
private BigDecimal refundPrice;
|
||||
|
||||
@ApiModelProperty(value = "收藏")
|
||||
private Boolean collectNum;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "注册时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "修改时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品点赞和收藏表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsRelation对象", description = "商品点赞和收藏表")
|
||||
@TableName("shop_goods_relation")
|
||||
public class GoodsRelation implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "类型(收藏(collect)、点赞(like))")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "某种类型的商品(普通商品、秒杀商品)")
|
||||
private String category;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品sku列表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsSku对象", description = "商品sku列表")
|
||||
@TableName("shop_goods_sku")
|
||||
public class GoodsSku implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "规格组ID")
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "规格值ID")
|
||||
private Integer specValueId;
|
||||
|
||||
@ApiModelProperty(value = "规格值0")
|
||||
private String specValue0;
|
||||
|
||||
@ApiModelProperty(value = "规格值1")
|
||||
private String specValue1;
|
||||
|
||||
@ApiModelProperty(value = "规格值2")
|
||||
private String specValue2;
|
||||
|
||||
@ApiModelProperty(value = "商品图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "商品价格")
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "市场价格")
|
||||
private BigDecimal salePrice;
|
||||
|
||||
@ApiModelProperty(value = "库存")
|
||||
private Integer stock;
|
||||
|
||||
@ApiModelProperty(value = "sku编码")
|
||||
private String skuNo;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1异常")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private Date createTime;
|
||||
|
||||
}
|
||||
+22
-14
@@ -1,26 +1,28 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品属性表
|
||||
* 商品多规格
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsAttr对象", description = "商品属性表")
|
||||
@TableName("shop_goods_attr")
|
||||
public class GoodsAttr implements Serializable {
|
||||
@ApiModel(value = "GoodsSpec对象", description = "商品多规格")
|
||||
@TableName("shop_goods_spec")
|
||||
public class GoodsSpec implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@@ -30,19 +32,25 @@ public class GoodsAttr implements Serializable {
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "属性名")
|
||||
private String attrName;
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "属性值")
|
||||
private String attrValues;
|
||||
@ApiModelProperty(value = "规格名称")
|
||||
private String specName;
|
||||
|
||||
@ApiModelProperty(value = "规则值ID")
|
||||
private Integer specValueId;
|
||||
|
||||
@ApiModelProperty(value = "规格值")
|
||||
private String specValues;
|
||||
|
||||
@ApiModelProperty(value = "规格值")
|
||||
@TableField(exist = false)
|
||||
private List<SpecValue> valueList;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@TableLogic
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.gxwebsoft.shop.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品规格组记录表
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:29:43
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "Spec对象", description = "商品规格组记录表")
|
||||
@TableName("shop_spec")
|
||||
public class Spec implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "规格组ID")
|
||||
@TableId(value = "spec_id", type = IdType.AUTO)
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "规格组名称")
|
||||
private String specName;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1禁用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
|
||||
@ApiModelProperty(value = "规则值列表")
|
||||
@TableField(exist = false)
|
||||
private List<SpecValue> specValues;
|
||||
|
||||
}
|
||||
+18
-11
@@ -3,33 +3,40 @@ package com.gxwebsoft.shop.entity;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import java.time.LocalDateTime;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品规则值(规格)表
|
||||
* 规格值
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-01 09:49:15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value = "GoodsRule对象", description = "商品规则值(规格)表")
|
||||
@TableName("shop_goods_rule")
|
||||
public class GoodsRule implements Serializable {
|
||||
@ApiModel(value = "SpecValue对象", description = "规格值")
|
||||
@TableName("shop_spec_value")
|
||||
public class SpecValue implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "规格名称")
|
||||
private String ruleName;
|
||||
@ApiModelProperty(value = "规格值ID")
|
||||
@TableId(value = "spec_value_id", type = IdType.AUTO)
|
||||
private Integer specValueId;
|
||||
|
||||
@ApiModelProperty(value = "规格值")
|
||||
private String ruleValue;
|
||||
private String specValue;
|
||||
|
||||
@ApiModelProperty(value = "规格组ID")
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "排序号")
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "租户id")
|
||||
private Integer tenantId;
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrResult;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrResultParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性详情表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsAttrResultMapper extends BaseMapper<GoodsAttrResult> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsAttrResult>
|
||||
*/
|
||||
List<GoodsAttrResult> selectPageRel(@Param("page") IPage<GoodsAttrResult> page,
|
||||
@Param("param") GoodsAttrResultParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsAttrResult> selectListRel(@Param("param") GoodsAttrResultParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrValue;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrValueParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性值表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsAttrValueMapper extends BaseMapper<GoodsAttrValue> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsAttrValue>
|
||||
*/
|
||||
List<GoodsAttrValue> selectPageRel(@Param("page") IPage<GoodsAttrValue> page,
|
||||
@Param("param") GoodsAttrValueParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsAttrValue> selectListRel(@Param("param") GoodsAttrValueParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsComment;
|
||||
import com.gxwebsoft.shop.param.GoodsCommentParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评论表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsCommentMapper extends BaseMapper<GoodsComment> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsComment>
|
||||
*/
|
||||
List<GoodsComment> selectPageRel(@Param("page") IPage<GoodsComment> page,
|
||||
@Param("param") GoodsCommentParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsComment> selectListRel(@Param("param") GoodsCommentParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsCoupon;
|
||||
import com.gxwebsoft.shop.param.GoodsCouponParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品优惠券表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsCouponMapper extends BaseMapper<GoodsCoupon> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsCoupon>
|
||||
*/
|
||||
List<GoodsCoupon> selectPageRel(@Param("page") IPage<GoodsCoupon> page,
|
||||
@Param("param") GoodsCouponParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsCoupon> selectListRel(@Param("param") GoodsCouponParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsDescription;
|
||||
import com.gxwebsoft.shop.param.GoodsDescriptionParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品描述表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsDescriptionMapper extends BaseMapper<GoodsDescription> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsDescription>
|
||||
*/
|
||||
List<GoodsDescription> selectPageRel(@Param("page") IPage<GoodsDescription> page,
|
||||
@Param("param") GoodsDescriptionParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsDescription> selectListRel(@Param("param") GoodsDescriptionParam param);
|
||||
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsRelation;
|
||||
import com.gxwebsoft.shop.param.GoodsRelationParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品点赞和收藏表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsRelationMapper extends BaseMapper<GoodsRelation> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsRelation>
|
||||
*/
|
||||
List<GoodsRelation> selectPageRel(@Param("page") IPage<GoodsRelation> page,
|
||||
@Param("param") GoodsRelationParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsRelation> selectListRel(@Param("param") GoodsRelationParam param);
|
||||
|
||||
}
|
||||
+9
-9
@@ -2,29 +2,29 @@ package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsLog;
|
||||
import com.gxwebsoft.shop.param.GoodsLogParam;
|
||||
import com.gxwebsoft.shop.entity.GoodsSku;
|
||||
import com.gxwebsoft.shop.param.GoodsSkuParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品日志表Mapper
|
||||
* 商品sku列表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
public interface GoodsLogMapper extends BaseMapper<GoodsLog> {
|
||||
public interface GoodsSkuMapper extends BaseMapper<GoodsSku> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsLog>
|
||||
* @return List<GoodsSku>
|
||||
*/
|
||||
List<GoodsLog> selectPageRel(@Param("page") IPage<GoodsLog> page,
|
||||
@Param("param") GoodsLogParam param);
|
||||
List<GoodsSku> selectPageRel(@Param("page") IPage<GoodsSku> page,
|
||||
@Param("param") GoodsSkuParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
@@ -32,6 +32,6 @@ public interface GoodsLogMapper extends BaseMapper<GoodsLog> {
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsLog> selectListRel(@Param("param") GoodsLogParam param);
|
||||
List<GoodsSku> selectListRel(@Param("param") GoodsSkuParam param);
|
||||
|
||||
}
|
||||
+9
-9
@@ -2,29 +2,29 @@ package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsRule;
|
||||
import com.gxwebsoft.shop.param.GoodsRuleParam;
|
||||
import com.gxwebsoft.shop.entity.Spec;
|
||||
import com.gxwebsoft.shop.param.SpecParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规则值(规格)表Mapper
|
||||
* 商品规格组记录表Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-01 09:29:43
|
||||
*/
|
||||
public interface GoodsRuleMapper extends BaseMapper<GoodsRule> {
|
||||
public interface SpecMapper extends BaseMapper<Spec> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsRule>
|
||||
* @return List<Spec>
|
||||
*/
|
||||
List<GoodsRule> selectPageRel(@Param("page") IPage<GoodsRule> page,
|
||||
@Param("param") GoodsRuleParam param);
|
||||
List<Spec> selectPageRel(@Param("page") IPage<Spec> page,
|
||||
@Param("param") SpecParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
@@ -32,6 +32,6 @@ public interface GoodsRuleMapper extends BaseMapper<GoodsRule> {
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsRule> selectListRel(@Param("param") GoodsRuleParam param);
|
||||
List<Spec> selectListRel(@Param("param") SpecParam param);
|
||||
|
||||
}
|
||||
+9
-9
@@ -2,29 +2,29 @@ package com.gxwebsoft.shop.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttr;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrParam;
|
||||
import com.gxwebsoft.shop.entity.SpecValue;
|
||||
import com.gxwebsoft.shop.param.SpecValueParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性表Mapper
|
||||
* 规格值Mapper
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-01 09:49:15
|
||||
*/
|
||||
public interface GoodsAttrMapper extends BaseMapper<GoodsAttr> {
|
||||
public interface SpecValueMapper extends BaseMapper<SpecValue> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsAttr>
|
||||
* @return List<SpecValue>
|
||||
*/
|
||||
List<GoodsAttr> selectPageRel(@Param("page") IPage<GoodsAttr> page,
|
||||
@Param("param") GoodsAttrParam param);
|
||||
List<SpecValue> selectPageRel(@Param("page") IPage<SpecValue> page,
|
||||
@Param("param") SpecValueParam param);
|
||||
|
||||
/**
|
||||
* 查询全部
|
||||
@@ -32,6 +32,6 @@ public interface GoodsAttrMapper extends BaseMapper<GoodsAttr> {
|
||||
* @param param 查询参数
|
||||
* @return List<User>
|
||||
*/
|
||||
List<GoodsAttr> selectListRel(@Param("param") GoodsAttrParam param);
|
||||
List<SpecValue> selectListRel(@Param("param") SpecValueParam param);
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsAttrMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_attr a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.attrName != null">
|
||||
AND a.attr_name LIKE CONCAT('%', #{param.attrName}, '%')
|
||||
</if>
|
||||
<if test="param.attrValues != null">
|
||||
AND a.attr_values LIKE CONCAT('%', #{param.attrValues}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsAttr">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsAttr">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsAttrValueMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_attr_value a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.suk != null">
|
||||
AND a.suk LIKE CONCAT('%', #{param.suk}, '%')
|
||||
</if>
|
||||
<if test="param.stock != null">
|
||||
AND a.stock = #{param.stock}
|
||||
</if>
|
||||
<if test="param.sales != null">
|
||||
AND a.sales = #{param.sales}
|
||||
</if>
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.unique != null">
|
||||
AND a.unique LIKE CONCAT('%', #{param.unique}, '%')
|
||||
</if>
|
||||
<if test="param.cost != null">
|
||||
AND a.cost = #{param.cost}
|
||||
</if>
|
||||
<if test="param.barCode != null">
|
||||
AND a.bar_code LIKE CONCAT('%', #{param.barCode}, '%')
|
||||
</if>
|
||||
<if test="param.otPrice != null">
|
||||
AND a.ot_price = #{param.otPrice}
|
||||
</if>
|
||||
<if test="param.weight != null">
|
||||
AND a.weight = #{param.weight}
|
||||
</if>
|
||||
<if test="param.volume != null">
|
||||
AND a.volume = #{param.volume}
|
||||
</if>
|
||||
<if test="param.brokerage != null">
|
||||
AND a.brokerage = #{param.brokerage}
|
||||
</if>
|
||||
<if test="param.brokerageTwo != null">
|
||||
AND a.brokerage_two = #{param.brokerageTwo}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.quota != null">
|
||||
AND a.quota = #{param.quota}
|
||||
</if>
|
||||
<if test="param.quotaShow != null">
|
||||
AND a.quota_show = #{param.quotaShow}
|
||||
</if>
|
||||
<if test="param.attrValue != null">
|
||||
AND a.attr_value LIKE CONCAT('%', #{param.attrValue}, '%')
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsAttrValue">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsAttrValue">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsCommentMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_comment a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.uid != null">
|
||||
AND a.uid = #{param.uid}
|
||||
</if>
|
||||
<if test="param.oid != null">
|
||||
AND a.oid = #{param.oid}
|
||||
</if>
|
||||
<if test="param.unique != null">
|
||||
AND a.unique LIKE CONCAT('%', #{param.unique}, '%')
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.replyType != null">
|
||||
AND a.reply_type LIKE CONCAT('%', #{param.replyType}, '%')
|
||||
</if>
|
||||
<if test="param.goodsScore != null">
|
||||
AND a.goods_score = #{param.goodsScore}
|
||||
</if>
|
||||
<if test="param.serviceScore != null">
|
||||
AND a.service_score = #{param.serviceScore}
|
||||
</if>
|
||||
<if test="param.comment != null">
|
||||
AND a.comment LIKE CONCAT('%', #{param.comment}, '%')
|
||||
</if>
|
||||
<if test="param.pics != null">
|
||||
AND a.pics LIKE CONCAT('%', #{param.pics}, '%')
|
||||
</if>
|
||||
<if test="param.merchantReplyContent != null">
|
||||
AND a.merchant_reply_content LIKE CONCAT('%', #{param.merchantReplyContent}, '%')
|
||||
</if>
|
||||
<if test="param.merchantReplyTime != null">
|
||||
AND a.merchant_reply_time = #{param.merchantReplyTime}
|
||||
</if>
|
||||
<if test="param.isDel != null">
|
||||
AND a.is_del = #{param.isDel}
|
||||
</if>
|
||||
<if test="param.isReply != null">
|
||||
AND a.is_reply = #{param.isReply}
|
||||
</if>
|
||||
<if test="param.nickname != null">
|
||||
AND a.nickname LIKE CONCAT('%', #{param.nickname}, '%')
|
||||
</if>
|
||||
<if test="param.avatar != null">
|
||||
AND a.avatar LIKE CONCAT('%', #{param.avatar}, '%')
|
||||
</if>
|
||||
<if test="param.sku != null">
|
||||
AND a.sku LIKE CONCAT('%', #{param.sku}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsComment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsComment">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsCouponMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_coupon a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.issueCouponId != null">
|
||||
AND a.issue_coupon_id = #{param.issueCouponId}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.deleted != null">
|
||||
AND a.deleted = #{param.deleted}
|
||||
</if>
|
||||
<if test="param.deleted == null">
|
||||
AND a.deleted = 0
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsCoupon">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsCoupon">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsDescriptionMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_description a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.description != null">
|
||||
AND a.description LIKE CONCAT('%', #{param.description}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsDescription">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsDescription">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
+26
-32
@@ -1,59 +1,53 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsLogMapper">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsSkuMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_log a
|
||||
FROM shop_goods_sku a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.visitNum != null">
|
||||
AND a.visit_num = #{param.visitNum}
|
||||
<if test="param.specId != null">
|
||||
AND a.spec_id = #{param.specId}
|
||||
</if>
|
||||
<if test="param.cartNum != null">
|
||||
AND a.cart_num = #{param.cartNum}
|
||||
<if test="param.specValueId != null">
|
||||
AND a.spec_value_id = #{param.specValueId}
|
||||
</if>
|
||||
<if test="param.orderNum != null">
|
||||
AND a.order_num = #{param.orderNum}
|
||||
<if test="param.specValue0 != null">
|
||||
AND a.spec_value_0 LIKE CONCAT('%', #{param.specValue0}, '%')
|
||||
</if>
|
||||
<if test="param.payNum != null">
|
||||
AND a.pay_num = #{param.payNum}
|
||||
<if test="param.specValue1 != null">
|
||||
AND a.spec_value_1 LIKE CONCAT('%', #{param.specValue1}, '%')
|
||||
</if>
|
||||
<if test="param.payPrice != null">
|
||||
AND a.pay_price = #{param.payPrice}
|
||||
<if test="param.specValue2 != null">
|
||||
AND a.spec_value_2 LIKE CONCAT('%', #{param.specValue2}, '%')
|
||||
</if>
|
||||
<if test="param.costPrice != null">
|
||||
AND a.cost_price = #{param.costPrice}
|
||||
<if test="param.image != null">
|
||||
AND a.image LIKE CONCAT('%', #{param.image}, '%')
|
||||
</if>
|
||||
<if test="param.payUid != null">
|
||||
AND a.pay_uid = #{param.payUid}
|
||||
<if test="param.price != null">
|
||||
AND a.price = #{param.price}
|
||||
</if>
|
||||
<if test="param.refundNum != null">
|
||||
AND a.refund_num = #{param.refundNum}
|
||||
<if test="param.salePrice != null">
|
||||
AND a.sale_price = #{param.salePrice}
|
||||
</if>
|
||||
<if test="param.refundPrice != null">
|
||||
AND a.refund_price = #{param.refundPrice}
|
||||
<if test="param.stock != null">
|
||||
AND a.stock = #{param.stock}
|
||||
</if>
|
||||
<if test="param.collectNum != null">
|
||||
AND a.collect_num = #{param.collectNum}
|
||||
</if>
|
||||
<if test="param.sortNumber != null">
|
||||
AND a.sort_number = #{param.sortNumber}
|
||||
<if test="param.skuNo != null">
|
||||
AND a.sku_no LIKE CONCAT('%', #{param.skuNo}, '%')
|
||||
</if>
|
||||
<if test="param.status != null">
|
||||
AND a.status = #{param.status}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.comments != null">
|
||||
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
@@ -69,12 +63,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsLog">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsSku">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsLog">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsSku">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+12
-6
@@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsAttrResultMapper">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsSpecMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_attr_result a
|
||||
FROM shop_goods_spec a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
@@ -13,8 +13,14 @@
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.result != null">
|
||||
AND a.result LIKE CONCAT('%', #{param.result}, '%')
|
||||
<if test="param.specId != null">
|
||||
AND a.spec_id = #{param.specId}
|
||||
</if>
|
||||
<if test="param.specName != null">
|
||||
AND a.spec_name LIKE CONCAT('%', #{param.specName}, '%')
|
||||
</if>
|
||||
<if test="param.valueList != null">
|
||||
AND a.value_list LIKE CONCAT('%', #{param.valueList}, '%')
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type = #{param.type}
|
||||
@@ -27,12 +33,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsAttrResult">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsSpec">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsAttrResult">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsSpec">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+13
-14
@@ -1,35 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsRuleMapper">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.SpecMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_rule a
|
||||
FROM shop_spec a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
<if test="param.specId != null">
|
||||
AND a.spec_id = #{param.specId}
|
||||
</if>
|
||||
<if test="param.ruleName != null">
|
||||
AND a.rule_name LIKE CONCAT('%', #{param.ruleName}, '%')
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.ruleValue != null">
|
||||
AND a.rule_value LIKE CONCAT('%', #{param.ruleValue}, '%')
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
</if>
|
||||
<if test="param.createTimeEnd != null">
|
||||
AND a.create_time <= #{param.createTimeEnd}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsRule">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Spec">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsRule">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Spec">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
+10
-16
@@ -1,26 +1,20 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsRelationMapper">
|
||||
<mapper namespace="com.gxwebsoft.shop.mapper.SpecValueMapper">
|
||||
|
||||
<!-- 关联查询sql -->
|
||||
<sql id="selectSql">
|
||||
SELECT a.*
|
||||
FROM shop_goods_relation a
|
||||
FROM shop_spec_value a
|
||||
<where>
|
||||
<if test="param.id != null">
|
||||
AND a.id = #{param.id}
|
||||
<if test="param.specValueId != null">
|
||||
AND a.spec_value_id = #{param.specValueId}
|
||||
</if>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
<if test="param.name != null">
|
||||
AND a.name LIKE CONCAT('%', #{param.name}, '%')
|
||||
</if>
|
||||
<if test="param.goodsId != null">
|
||||
AND a.goods_id = #{param.goodsId}
|
||||
</if>
|
||||
<if test="param.type != null">
|
||||
AND a.type LIKE CONCAT('%', #{param.type}, '%')
|
||||
</if>
|
||||
<if test="param.category != null">
|
||||
AND a.category LIKE CONCAT('%', #{param.category}, '%')
|
||||
<if test="param.specId != null">
|
||||
AND a.spec_id = #{param.specId}
|
||||
</if>
|
||||
<if test="param.createTimeStart != null">
|
||||
AND a.create_time >= #{param.createTimeStart}
|
||||
@@ -36,12 +30,12 @@
|
||||
</sql>
|
||||
|
||||
<!-- 分页查询 -->
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsRelation">
|
||||
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.SpecValue">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
<!-- 查询全部 -->
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsRelation">
|
||||
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.SpecValue">
|
||||
<include refid="selectSql"></include>
|
||||
</select>
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品属性详情表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsAttrResultParam对象", description = "商品属性详情表查询参数")
|
||||
public class GoodsAttrResultParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "商品属性参数")
|
||||
private String result;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean type;
|
||||
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品属性值表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsAttrValueParam对象", description = "商品属性值表查询参数")
|
||||
public class GoodsAttrValueParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "商品属性索引值 (attr_value|attr_value[|....])")
|
||||
private String suk;
|
||||
|
||||
@ApiModelProperty(value = "属性对应的库存")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer stock;
|
||||
|
||||
@ApiModelProperty(value = "销量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sales;
|
||||
|
||||
@ApiModelProperty(value = "属性金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "唯一值")
|
||||
private String unique;
|
||||
|
||||
@ApiModelProperty(value = "成本价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal cost;
|
||||
|
||||
@ApiModelProperty(value = "商品条码")
|
||||
private String barCode;
|
||||
|
||||
@ApiModelProperty(value = "原价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal otPrice;
|
||||
|
||||
@ApiModelProperty(value = "重量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal weight;
|
||||
|
||||
@ApiModelProperty(value = "体积")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal volume;
|
||||
|
||||
@ApiModelProperty(value = "一级返佣")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal brokerage;
|
||||
|
||||
@ApiModelProperty(value = "二级返佣")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal brokerageTwo;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "活动限购数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer quota;
|
||||
|
||||
@ApiModelProperty(value = "活动限购数量显示")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer quotaShow;
|
||||
|
||||
@ApiModelProperty(value = "attr_values 创建更新时的属性对应")
|
||||
private String attrValue;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 评论表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsCommentParam对象", description = "评论表查询参数")
|
||||
public class GoodsCommentParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "评论ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer uid;
|
||||
|
||||
@ApiModelProperty(value = "订单ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer oid;
|
||||
|
||||
@ApiModelProperty(value = "商品唯一id")
|
||||
private String unique;
|
||||
|
||||
@ApiModelProperty(value = "商品id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "某种商品类型(普通商品、秒杀商品)")
|
||||
private String replyType;
|
||||
|
||||
@ApiModelProperty(value = "商品分数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean goodsScore;
|
||||
|
||||
@ApiModelProperty(value = "服务分数")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean serviceScore;
|
||||
|
||||
@ApiModelProperty(value = "评论内容")
|
||||
private String comment;
|
||||
|
||||
@ApiModelProperty(value = "评论图片")
|
||||
private String pics;
|
||||
|
||||
@ApiModelProperty(value = "管理员回复内容")
|
||||
private String merchantReplyContent;
|
||||
|
||||
@ApiModelProperty(value = "管理员回复时间")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer merchantReplyTime;
|
||||
|
||||
@ApiModelProperty(value = "0未删除1已删除")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean isDel;
|
||||
|
||||
@ApiModelProperty(value = "0未回复1已回复")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean isReply;
|
||||
|
||||
@ApiModelProperty(value = "用户名称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "商品规格属性值,多个,号隔开")
|
||||
private String sku;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品优惠券表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsCouponParam对象", description = "商品优惠券表查询参数")
|
||||
public class GoodsCouponParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "优惠劵id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer issueCouponId;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品日志表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsLogParam对象", description = "商品日志表查询参数")
|
||||
public class GoodsLogParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "统计ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "类型visit,cart,order,pay,collect,refund")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "是否浏览")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean visitNum;
|
||||
|
||||
@ApiModelProperty(value = "加入购物车数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer cartNum;
|
||||
|
||||
@ApiModelProperty(value = "下单数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer orderNum;
|
||||
|
||||
@ApiModelProperty(value = "支付数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer payNum;
|
||||
|
||||
@ApiModelProperty(value = "支付金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal payPrice;
|
||||
|
||||
@ApiModelProperty(value = "商品成本价")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal costPrice;
|
||||
|
||||
@ApiModelProperty(value = "支付用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer payUid;
|
||||
|
||||
@ApiModelProperty(value = "退款数量")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer refundNum;
|
||||
|
||||
@ApiModelProperty(value = "退款金额")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal refundPrice;
|
||||
|
||||
@ApiModelProperty(value = "收藏")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean collectNum;
|
||||
|
||||
@ApiModelProperty(value = "排序(数字越小越靠前)")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer sortNumber;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1冻结")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品点赞和收藏表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsRelationParam对象", description = "商品点赞和收藏表查询参数")
|
||||
public class GoodsRelationParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "id")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "类型(收藏(collect)、点赞(like))")
|
||||
private String type;
|
||||
|
||||
@ApiModelProperty(value = "某种类型的商品(普通商品、秒杀商品)")
|
||||
private String category;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package com.gxwebsoft.shop.param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import com.gxwebsoft.common.core.annotation.QueryField;
|
||||
import com.gxwebsoft.common.core.annotation.QueryType;
|
||||
import com.gxwebsoft.common.core.web.BaseParam;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品sku列表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsSkuParam对象", description = "商品sku列表查询参数")
|
||||
public class GoodsSkuParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "规格组ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "规格值ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specValueId;
|
||||
|
||||
@ApiModelProperty(value = "规格值0")
|
||||
private String specValue0;
|
||||
|
||||
@ApiModelProperty(value = "规格值1")
|
||||
private String specValue1;
|
||||
|
||||
@ApiModelProperty(value = "规格值2")
|
||||
private String specValue2;
|
||||
|
||||
@ApiModelProperty(value = "商品图片")
|
||||
private String image;
|
||||
|
||||
@ApiModelProperty(value = "商品价格")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal price;
|
||||
|
||||
@ApiModelProperty(value = "市场价格")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private BigDecimal salePrice;
|
||||
|
||||
@ApiModelProperty(value = "库存")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer stock;
|
||||
|
||||
@ApiModelProperty(value = "sku编码")
|
||||
private String skuNo;
|
||||
|
||||
@ApiModelProperty(value = "状态, 0正常, 1异常")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String comments;
|
||||
|
||||
}
|
||||
+12
-12
@@ -11,16 +11,16 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品属性表查询参数
|
||||
* 商品多规格查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsAttrParam对象", description = "商品属性表查询参数")
|
||||
public class GoodsAttrParam extends BaseParam {
|
||||
@ApiModel(value = "GoodsSpecParam对象", description = "商品多规格查询参数")
|
||||
public class GoodsSpecParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "主键")
|
||||
@@ -31,18 +31,18 @@ public class GoodsAttrParam extends BaseParam {
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "属性名")
|
||||
private String attrName;
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "属性值")
|
||||
private String attrValues;
|
||||
@ApiModelProperty(value = "规格名称")
|
||||
private String specName;
|
||||
|
||||
@ApiModelProperty(value = "规格值")
|
||||
private String valueList;
|
||||
|
||||
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean type;
|
||||
|
||||
@ApiModelProperty(value = "是否删除, 0否, 1是")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer deleted;
|
||||
|
||||
}
|
||||
+8
-15
@@ -11,30 +11,23 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品描述表查询参数
|
||||
* 商品规格组记录表查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-01 09:29:43
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsDescriptionParam对象", description = "商品描述表查询参数")
|
||||
public class GoodsDescriptionParam extends BaseParam {
|
||||
@ApiModel(value = "SpecParam对象", description = "商品规格组记录表查询参数")
|
||||
public class SpecParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "规格组ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
private Integer specId;
|
||||
|
||||
@ApiModelProperty(value = "商品ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer goodsId;
|
||||
|
||||
@ApiModelProperty(value = "商品详情")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "商品类型")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Boolean type;
|
||||
@ApiModelProperty(value = "规格组名称")
|
||||
private String name;
|
||||
|
||||
}
|
||||
+11
-9
@@ -11,25 +11,27 @@ import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 商品规则值(规格)表查询参数
|
||||
* 规格值查询参数
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
* @since 2024-04-01 09:49:15
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@ApiModel(value = "GoodsRuleParam对象", description = "商品规则值(规格)表查询参数")
|
||||
public class GoodsRuleParam extends BaseParam {
|
||||
@ApiModel(value = "SpecValueParam对象", description = "规格值查询参数")
|
||||
public class SpecValueParam extends BaseParam {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "规格值ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "规格名称")
|
||||
private String ruleName;
|
||||
private Integer specValueId;
|
||||
|
||||
@ApiModelProperty(value = "规格值")
|
||||
private String ruleValue;
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = "规格组ID")
|
||||
@QueryField(type = QueryType.EQ)
|
||||
private Integer specId;
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrResult;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrResultParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性详情表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsAttrResultService extends IService<GoodsAttrResult> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsAttrResult>
|
||||
*/
|
||||
PageResult<GoodsAttrResult> pageRel(GoodsAttrResultParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsAttrResult>
|
||||
*/
|
||||
List<GoodsAttrResult> listRel(GoodsAttrResultParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return GoodsAttrResult
|
||||
*/
|
||||
GoodsAttrResult getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttr;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsAttrService extends IService<GoodsAttr> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsAttr>
|
||||
*/
|
||||
PageResult<GoodsAttr> pageRel(GoodsAttrParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsAttr>
|
||||
*/
|
||||
List<GoodsAttr> listRel(GoodsAttrParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return GoodsAttr
|
||||
*/
|
||||
GoodsAttr getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrValue;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrValueParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性值表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsAttrValueService extends IService<GoodsAttrValue> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsAttrValue>
|
||||
*/
|
||||
PageResult<GoodsAttrValue> pageRel(GoodsAttrValueParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsAttrValue>
|
||||
*/
|
||||
List<GoodsAttrValue> listRel(GoodsAttrValueParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return GoodsAttrValue
|
||||
*/
|
||||
GoodsAttrValue getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsComment;
|
||||
import com.gxwebsoft.shop.param.GoodsCommentParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评论表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsCommentService extends IService<GoodsComment> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsComment>
|
||||
*/
|
||||
PageResult<GoodsComment> pageRel(GoodsCommentParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsComment>
|
||||
*/
|
||||
List<GoodsComment> listRel(GoodsCommentParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 评论ID
|
||||
* @return GoodsComment
|
||||
*/
|
||||
GoodsComment getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsCoupon;
|
||||
import com.gxwebsoft.shop.param.GoodsCouponParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品优惠券表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsCouponService extends IService<GoodsCoupon> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsCoupon>
|
||||
*/
|
||||
PageResult<GoodsCoupon> pageRel(GoodsCouponParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsCoupon>
|
||||
*/
|
||||
List<GoodsCoupon> listRel(GoodsCouponParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GoodsCoupon
|
||||
*/
|
||||
GoodsCoupon getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsDescription;
|
||||
import com.gxwebsoft.shop.param.GoodsDescriptionParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品描述表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsDescriptionService extends IService<GoodsDescription> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsDescription>
|
||||
*/
|
||||
PageResult<GoodsDescription> pageRel(GoodsDescriptionParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsDescription>
|
||||
*/
|
||||
List<GoodsDescription> listRel(GoodsDescriptionParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GoodsDescription
|
||||
*/
|
||||
GoodsDescription getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsLog;
|
||||
import com.gxwebsoft.shop.param.GoodsLogParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品日志表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsLogService extends IService<GoodsLog> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsLog>
|
||||
*/
|
||||
PageResult<GoodsLog> pageRel(GoodsLogParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsLog>
|
||||
*/
|
||||
List<GoodsLog> listRel(GoodsLogParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 统计ID
|
||||
* @return GoodsLog
|
||||
*/
|
||||
GoodsLog getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsRelation;
|
||||
import com.gxwebsoft.shop.param.GoodsRelationParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品点赞和收藏表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsRelationService extends IService<GoodsRelation> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsRelation>
|
||||
*/
|
||||
PageResult<GoodsRelation> pageRel(GoodsRelationParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsRelation>
|
||||
*/
|
||||
List<GoodsRelation> listRel(GoodsRelationParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id id
|
||||
* @return GoodsRelation
|
||||
*/
|
||||
GoodsRelation getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsRule;
|
||||
import com.gxwebsoft.shop.param.GoodsRuleParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规则值(规格)表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
public interface GoodsRuleService extends IService<GoodsRule> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsRule>
|
||||
*/
|
||||
PageResult<GoodsRule> pageRel(GoodsRuleParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsRule>
|
||||
*/
|
||||
List<GoodsRule> listRel(GoodsRuleParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id
|
||||
* @return GoodsRule
|
||||
*/
|
||||
GoodsRule getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsSku;
|
||||
import com.gxwebsoft.shop.param.GoodsSkuParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品sku列表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
public interface GoodsSkuService extends IService<GoodsSku> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsSku>
|
||||
*/
|
||||
PageResult<GoodsSku> pageRel(GoodsSkuParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsSku>
|
||||
*/
|
||||
List<GoodsSku> listRel(GoodsSkuParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键ID
|
||||
* @return GoodsSku
|
||||
*/
|
||||
GoodsSku getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.GoodsSpec;
|
||||
import com.gxwebsoft.shop.param.GoodsSpecParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品多规格Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
public interface GoodsSpecService extends IService<GoodsSpec> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<GoodsSpec>
|
||||
*/
|
||||
PageResult<GoodsSpec> pageRel(GoodsSpecParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<GoodsSpec>
|
||||
*/
|
||||
List<GoodsSpec> listRel(GoodsSpecParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return GoodsSpec
|
||||
*/
|
||||
GoodsSpec getByIdRel(Integer id);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.Spec;
|
||||
import com.gxwebsoft.shop.param.SpecParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格组记录表Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:29:43
|
||||
*/
|
||||
public interface SpecService extends IService<Spec> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<Spec>
|
||||
*/
|
||||
PageResult<Spec> pageRel(SpecParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<Spec>
|
||||
*/
|
||||
List<Spec> listRel(SpecParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param specId 规格组ID
|
||||
* @return Spec
|
||||
*/
|
||||
Spec getByIdRel(Integer specId);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gxwebsoft.shop.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.entity.SpecValue;
|
||||
import com.gxwebsoft.shop.param.SpecValueParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值Service
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:49:15
|
||||
*/
|
||||
public interface SpecValueService extends IService<SpecValue> {
|
||||
|
||||
/**
|
||||
* 分页关联查询
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return PageResult<SpecValue>
|
||||
*/
|
||||
PageResult<SpecValue> pageRel(SpecValueParam param);
|
||||
|
||||
/**
|
||||
* 关联查询全部
|
||||
*
|
||||
* @param param 查询参数
|
||||
* @return List<SpecValue>
|
||||
*/
|
||||
List<SpecValue> listRel(SpecValueParam param);
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param specValueId 规格值ID
|
||||
* @return SpecValue
|
||||
*/
|
||||
SpecValue getByIdRel(Integer specValueId);
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsAttrResultMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsAttrResultService;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrResult;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrResultParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性详情表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsAttrResultServiceImpl extends ServiceImpl<GoodsAttrResultMapper, GoodsAttrResult> implements GoodsAttrResultService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsAttrResult> pageRel(GoodsAttrResultParam param) {
|
||||
PageParam<GoodsAttrResult, GoodsAttrResultParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsAttrResult> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsAttrResult> listRel(GoodsAttrResultParam param) {
|
||||
List<GoodsAttrResult> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsAttrResult, GoodsAttrResultParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsAttrResult getByIdRel(Integer id) {
|
||||
GoodsAttrResultParam param = new GoodsAttrResultParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsAttrMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsAttrService;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttr;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsAttrServiceImpl extends ServiceImpl<GoodsAttrMapper, GoodsAttr> implements GoodsAttrService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsAttr> pageRel(GoodsAttrParam param) {
|
||||
PageParam<GoodsAttr, GoodsAttrParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsAttr> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsAttr> listRel(GoodsAttrParam param) {
|
||||
List<GoodsAttr> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsAttr, GoodsAttrParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsAttr getByIdRel(Integer id) {
|
||||
GoodsAttrParam param = new GoodsAttrParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsAttrValueMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsAttrValueService;
|
||||
import com.gxwebsoft.shop.entity.GoodsAttrValue;
|
||||
import com.gxwebsoft.shop.param.GoodsAttrValueParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性值表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsAttrValueServiceImpl extends ServiceImpl<GoodsAttrValueMapper, GoodsAttrValue> implements GoodsAttrValueService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsAttrValue> pageRel(GoodsAttrValueParam param) {
|
||||
PageParam<GoodsAttrValue, GoodsAttrValueParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsAttrValue> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsAttrValue> listRel(GoodsAttrValueParam param) {
|
||||
List<GoodsAttrValue> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsAttrValue, GoodsAttrValueParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsAttrValue getByIdRel(Integer id) {
|
||||
GoodsAttrValueParam param = new GoodsAttrValueParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsCommentMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsCommentService;
|
||||
import com.gxwebsoft.shop.entity.GoodsComment;
|
||||
import com.gxwebsoft.shop.param.GoodsCommentParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 评论表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsCommentServiceImpl extends ServiceImpl<GoodsCommentMapper, GoodsComment> implements GoodsCommentService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsComment> pageRel(GoodsCommentParam param) {
|
||||
PageParam<GoodsComment, GoodsCommentParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsComment> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsComment> listRel(GoodsCommentParam param) {
|
||||
List<GoodsComment> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsComment, GoodsCommentParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsComment getByIdRel(Integer id) {
|
||||
GoodsCommentParam param = new GoodsCommentParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsCouponMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsCouponService;
|
||||
import com.gxwebsoft.shop.entity.GoodsCoupon;
|
||||
import com.gxwebsoft.shop.param.GoodsCouponParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品优惠券表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsCouponServiceImpl extends ServiceImpl<GoodsCouponMapper, GoodsCoupon> implements GoodsCouponService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsCoupon> pageRel(GoodsCouponParam param) {
|
||||
PageParam<GoodsCoupon, GoodsCouponParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsCoupon> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsCoupon> listRel(GoodsCouponParam param) {
|
||||
List<GoodsCoupon> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsCoupon, GoodsCouponParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsCoupon getByIdRel(Integer id) {
|
||||
GoodsCouponParam param = new GoodsCouponParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsDescriptionMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsDescriptionService;
|
||||
import com.gxwebsoft.shop.entity.GoodsDescription;
|
||||
import com.gxwebsoft.shop.param.GoodsDescriptionParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品描述表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsDescriptionServiceImpl extends ServiceImpl<GoodsDescriptionMapper, GoodsDescription> implements GoodsDescriptionService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsDescription> pageRel(GoodsDescriptionParam param) {
|
||||
PageParam<GoodsDescription, GoodsDescriptionParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsDescription> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsDescription> listRel(GoodsDescriptionParam param) {
|
||||
List<GoodsDescription> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsDescription, GoodsDescriptionParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsDescription getByIdRel(Integer id) {
|
||||
GoodsDescriptionParam param = new GoodsDescriptionParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsLogMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsLogService;
|
||||
import com.gxwebsoft.shop.entity.GoodsLog;
|
||||
import com.gxwebsoft.shop.param.GoodsLogParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品日志表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsLogServiceImpl extends ServiceImpl<GoodsLogMapper, GoodsLog> implements GoodsLogService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsLog> pageRel(GoodsLogParam param) {
|
||||
PageParam<GoodsLog, GoodsLogParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsLog> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsLog> listRel(GoodsLogParam param) {
|
||||
List<GoodsLog> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsLog, GoodsLogParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsLog getByIdRel(Integer id) {
|
||||
GoodsLogParam param = new GoodsLogParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsRelationMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsRelationService;
|
||||
import com.gxwebsoft.shop.entity.GoodsRelation;
|
||||
import com.gxwebsoft.shop.param.GoodsRelationParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品点赞和收藏表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsRelationServiceImpl extends ServiceImpl<GoodsRelationMapper, GoodsRelation> implements GoodsRelationService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsRelation> pageRel(GoodsRelationParam param) {
|
||||
PageParam<GoodsRelation, GoodsRelationParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsRelation> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsRelation> listRel(GoodsRelationParam param) {
|
||||
List<GoodsRelation> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsRelation, GoodsRelationParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsRelation getByIdRel(Integer id) {
|
||||
GoodsRelationParam param = new GoodsRelationParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsRuleMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsRuleService;
|
||||
import com.gxwebsoft.shop.entity.GoodsRule;
|
||||
import com.gxwebsoft.shop.param.GoodsRuleParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规则值(规格)表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-03-30 19:09:56
|
||||
*/
|
||||
@Service
|
||||
public class GoodsRuleServiceImpl extends ServiceImpl<GoodsRuleMapper, GoodsRule> implements GoodsRuleService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsRule> pageRel(GoodsRuleParam param) {
|
||||
PageParam<GoodsRule, GoodsRuleParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
List<GoodsRule> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsRule> listRel(GoodsRuleParam param) {
|
||||
List<GoodsRule> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsRule, GoodsRuleParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc, create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsRule getByIdRel(Integer id) {
|
||||
GoodsRuleParam param = new GoodsRuleParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsSkuMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsSkuService;
|
||||
import com.gxwebsoft.shop.entity.GoodsSku;
|
||||
import com.gxwebsoft.shop.param.GoodsSkuParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品sku列表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Service
|
||||
public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> implements GoodsSkuService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsSku> pageRel(GoodsSkuParam param) {
|
||||
PageParam<GoodsSku, GoodsSkuParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<GoodsSku> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsSku> listRel(GoodsSkuParam param) {
|
||||
List<GoodsSku> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsSku, GoodsSkuParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsSku getByIdRel(Integer id) {
|
||||
GoodsSkuParam param = new GoodsSkuParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.GoodsSpecMapper;
|
||||
import com.gxwebsoft.shop.service.GoodsSpecService;
|
||||
import com.gxwebsoft.shop.entity.GoodsSpec;
|
||||
import com.gxwebsoft.shop.param.GoodsSpecParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品多规格Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-03 16:06:23
|
||||
*/
|
||||
@Service
|
||||
public class GoodsSpecServiceImpl extends ServiceImpl<GoodsSpecMapper, GoodsSpec> implements GoodsSpecService {
|
||||
|
||||
@Override
|
||||
public PageResult<GoodsSpec> pageRel(GoodsSpecParam param) {
|
||||
PageParam<GoodsSpec, GoodsSpecParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("create_time desc");
|
||||
List<GoodsSpec> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsSpec> listRel(GoodsSpecParam param) {
|
||||
List<GoodsSpec> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<GoodsSpec, GoodsSpecParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("create_time desc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsSpec getByIdRel(Integer id) {
|
||||
GoodsSpecParam param = new GoodsSpecParam();
|
||||
param.setId(id);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.entity.SpecValue;
|
||||
import com.gxwebsoft.shop.mapper.SpecMapper;
|
||||
import com.gxwebsoft.shop.param.SpecValueParam;
|
||||
import com.gxwebsoft.shop.service.SpecService;
|
||||
import com.gxwebsoft.shop.entity.Spec;
|
||||
import com.gxwebsoft.shop.param.SpecParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import com.gxwebsoft.shop.service.SpecValueService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格组记录表Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:29:43
|
||||
*/
|
||||
@Service
|
||||
public class SpecServiceImpl extends ServiceImpl<SpecMapper, Spec> implements SpecService {
|
||||
@Resource
|
||||
private SpecValueService specValueService;
|
||||
|
||||
@Override
|
||||
public PageResult<Spec> pageRel(SpecParam param) {
|
||||
PageParam<Spec, SpecParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc");
|
||||
List<Spec> list = baseMapper.selectPageRel(page, param);
|
||||
list.forEach(item -> {
|
||||
item.setSpecValues(specValueService.list(new LambdaQueryWrapper<SpecValue>().eq(SpecValue::getSpecId,item.getSpecId())));
|
||||
});
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Spec> listRel(SpecParam param) {
|
||||
List<Spec> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<Spec, SpecParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc");
|
||||
list.forEach(item -> {
|
||||
item.setSpecValues(specValueService.list(new LambdaQueryWrapper<SpecValue>().eq(SpecValue::getSpecId,item.getSpecId())));
|
||||
});
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Spec getByIdRel(Integer specId) {
|
||||
SpecParam param = new SpecParam();
|
||||
param.setSpecId(specId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gxwebsoft.shop.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.gxwebsoft.shop.mapper.SpecValueMapper;
|
||||
import com.gxwebsoft.shop.service.SpecValueService;
|
||||
import com.gxwebsoft.shop.entity.SpecValue;
|
||||
import com.gxwebsoft.shop.param.SpecValueParam;
|
||||
import com.gxwebsoft.common.core.web.PageParam;
|
||||
import com.gxwebsoft.common.core.web.PageResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 规格值Service实现
|
||||
*
|
||||
* @author 科技小王子
|
||||
* @since 2024-04-01 09:49:15
|
||||
*/
|
||||
@Service
|
||||
public class SpecValueServiceImpl extends ServiceImpl<SpecValueMapper, SpecValue> implements SpecValueService {
|
||||
|
||||
@Override
|
||||
public PageResult<SpecValue> pageRel(SpecValueParam param) {
|
||||
PageParam<SpecValue, SpecValueParam> page = new PageParam<>(param);
|
||||
page.setDefaultOrder("sort_number asc");
|
||||
List<SpecValue> list = baseMapper.selectPageRel(page, param);
|
||||
return new PageResult<>(list, page.getTotal());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SpecValue> listRel(SpecValueParam param) {
|
||||
List<SpecValue> list = baseMapper.selectListRel(param);
|
||||
// 排序
|
||||
PageParam<SpecValue, SpecValueParam> page = new PageParam<>();
|
||||
page.setDefaultOrder("sort_number asc");
|
||||
return page.sortRecords(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SpecValue getByIdRel(Integer specValueId) {
|
||||
SpecValueParam param = new SpecValueParam();
|
||||
param.setSpecValueId(specValueId);
|
||||
return param.getOne(baseMapper.selectListRel(param));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user