新增:商品管理模块

This commit is contained in:
gxwebsoft
2024-03-31 18:54:37 +08:00
parent 441ea1b5fa
commit c06520ab9b
87 changed files with 4994 additions and 235 deletions
@@ -1,63 +0,0 @@
package com.gxwebsoft.oa.entity;
import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* 商品分类表
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "GoodsCategory对象", description = "商品分类表")
@TableName("oa_goods_category")
public class GoodsCategory implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "自增ID")
@TableId(value = "category_id", type = IdType.AUTO)
private Integer categoryId;
@ApiModelProperty(value = "分类名称")
private String name;
@ApiModelProperty(value = "分类图标")
private String categoryImage;
@ApiModelProperty(value = "分类编码")
private String code;
@ApiModelProperty(value = "状态, 0正常, 1隐藏")
private Integer status;
@ApiModelProperty(value = "备注")
private String comments;
@ApiModelProperty(value = "排序号")
private Integer sortNumber;
@ApiModelProperty(value = "所有人")
private Integer userId;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
}
@@ -0,0 +1,114 @@
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.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")
public class GoodsAttrController extends BaseController {
@Resource
private GoodsAttrService goodsAttrService;
@ApiOperation("分页查询商品属性表")
@GetMapping("/page")
public ApiResult<PageResult<GoodsAttr>> page(GoodsAttrParam param) {
// 使用关联查询
return success(goodsAttrService.pageRel(param));
}
@ApiOperation("查询全部商品属性表")
@GetMapping()
public ApiResult<List<GoodsAttr>> list(GoodsAttrParam param) {
// 使用关联查询
return success(goodsAttrService.listRel(param));
}
@ApiOperation("根据id查询商品属性表")
@GetMapping("/{id}")
public ApiResult<GoodsAttr> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(goodsAttrService.getByIdRel(id));
}
@ApiOperation("添加商品属性表")
@PostMapping()
public ApiResult<?> save(@RequestBody GoodsAttr goodsAttr) {
// 记录当前登录用户id
// User loginUser = getLoginUser();
// if (loginUser != null) {
// goodsAttr.setUserId(loginUser.getUserId());
// }
if (goodsAttrService.save(goodsAttr)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("修改商品属性表")
@PutMapping()
public ApiResult<?> update(@RequestBody GoodsAttr goodsAttr) {
if (goodsAttrService.updateById(goodsAttr)) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("删除商品属性表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (goodsAttrService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@ApiOperation("批量添加商品属性表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<GoodsAttr> list) {
if (goodsAttrService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("批量修改商品属性表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsAttr> batchParam) {
if (batchParam.update(goodsAttrService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("批量删除商品属性表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (goodsAttrService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}
@@ -0,0 +1,114 @@
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("删除失败");
}
}
@@ -0,0 +1,114 @@
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,10 +1,13 @@
package com.gxwebsoft.oa.controller;
package com.gxwebsoft.shop.controller;
import com.gxwebsoft.common.core.web.*;
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.common.system.entity.User;
import com.gxwebsoft.oa.entity.GoodsCategory;
import com.gxwebsoft.oa.param.GoodsCategoryParam;
import com.gxwebsoft.oa.service.GoodsCategoryService;
import com.gxwebsoft.shop.entity.GoodsCategory;
import com.gxwebsoft.shop.param.GoodsCategoryParam;
import com.gxwebsoft.shop.service.GoodsCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
@@ -13,61 +16,54 @@ import javax.annotation.Resource;
import java.util.List;
/**
* 商品分类表控制器
* 商品分类控制器
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 19:34:16
*/
@Api(tags = "商品分类表管理")
@Api(tags = "商品分类管理")
@RestController
@RequestMapping("/api/oa/goods-category")
@RequestMapping("/api/shop/goods-category")
public class GoodsCategoryController extends BaseController {
@Resource
private GoodsCategoryService goodsCategoryService;
@ApiOperation("分页查询商品分类表")
@ApiOperation("分页查询商品分类")
@GetMapping("/page")
public ApiResult<PageResult<GoodsCategory>> page(GoodsCategoryParam param) {
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(goodsCategoryService.page(page, page.getWrapper()));
// 使用关联查询
//return success(goodsCategoryService.pageRel(param));
return success(goodsCategoryService.pageRel(param));
}
@ApiOperation("查询全部商品分类表")
@ApiOperation("查询全部商品分类")
@GetMapping()
public ApiResult<List<GoodsCategory>> list(GoodsCategoryParam param) {
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(goodsCategoryService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(goodsCategoryService.listRel(param));
return success(goodsCategoryService.listRel(param));
}
@ApiOperation("根据id查询商品分类表")
@ApiOperation("根据id查询商品分类")
@GetMapping("/{id}")
public ApiResult<GoodsCategory> get(@PathVariable("id") Integer id) {
return success(goodsCategoryService.getById(id));
// 使用关联查询
//return success(goodsCategoryService.getByIdRel(id));
return success(goodsCategoryService.getByIdRel(id));
}
@ApiOperation("添加商品分类表")
@ApiOperation("添加商品分类")
@PostMapping()
public ApiResult<?> save(@RequestBody GoodsCategory goodsCategory) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
User loginUser = getLoginUser();
if (loginUser != null) {
goodsCategory.setUserId(loginUser.getUserId());
}
}
if (goodsCategoryService.save(goodsCategory)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("修改商品分类表")
@ApiOperation("修改商品分类")
@PutMapping()
public ApiResult<?> update(@RequestBody GoodsCategory goodsCategory) {
if (goodsCategoryService.updateById(goodsCategory)) {
@@ -76,7 +72,7 @@ public class GoodsCategoryController extends BaseController {
return fail("修改失败");
}
@ApiOperation("删除商品分类表")
@ApiOperation("删除商品分类")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (goodsCategoryService.removeById(id)) {
@@ -85,7 +81,7 @@ public class GoodsCategoryController extends BaseController {
return fail("删除失败");
}
@ApiOperation("批量添加商品分类表")
@ApiOperation("批量添加商品分类")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<GoodsCategory> list) {
if (goodsCategoryService.saveBatch(list)) {
@@ -94,7 +90,7 @@ public class GoodsCategoryController extends BaseController {
return fail("添加失败");
}
@ApiOperation("批量修改商品分类表")
@ApiOperation("批量修改商品分类")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsCategory> batchParam) {
if (batchParam.update(goodsCategoryService, "category_id")) {
@@ -103,7 +99,7 @@ public class GoodsCategoryController extends BaseController {
return fail("修改失败");
}
@ApiOperation("批量删除商品分类表")
@ApiOperation("批量删除商品分类")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (goodsCategoryService.removeByIds(ids)) {
@@ -0,0 +1,114 @@
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,12 +1,18 @@
package com.gxwebsoft.oa.controller;
package com.gxwebsoft.shop.controller;
import com.gxwebsoft.common.core.web.*;
import com.gxwebsoft.common.core.web.BaseController;
import com.gxwebsoft.shop.service.GoodsService;
import com.gxwebsoft.shop.entity.Goods;
import com.gxwebsoft.shop.param.GoodsParam;
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 com.gxwebsoft.oa.entity.Goods;
import com.gxwebsoft.oa.param.GoodsParam;
import com.gxwebsoft.oa.service.GoodsService;
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;
@@ -16,11 +22,11 @@ import java.util.List;
* 商品记录表控制器
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 20:00:50
*/
@Api(tags = "商品记录表管理")
@RestController
@RequestMapping("/api/oa/goods")
@RequestMapping("/api/shop/goods")
public class GoodsController extends BaseController {
@Resource
private GoodsService goodsService;
@@ -28,39 +34,32 @@ public class GoodsController extends BaseController {
@ApiOperation("分页查询商品记录表")
@GetMapping("/page")
public ApiResult<PageResult<Goods>> page(GoodsParam param) {
PageParam<Goods, GoodsParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(goodsService.page(page, page.getWrapper()));
// 使用关联查询
//return success(goodsService.pageRel(param));
return success(goodsService.pageRel(param));
}
@ApiOperation("查询全部商品记录表")
@GetMapping()
public ApiResult<List<Goods>> list(GoodsParam param) {
PageParam<Goods, GoodsParam> page = new PageParam<>(param);
page.setDefaultOrder("create_time desc");
return success(goodsService.list(page.getOrderWrapper()));
// 使用关联查询
//return success(goodsService.listRel(param));
return success(goodsService.listRel(param));
}
@ApiOperation("根据id查询商品记录表")
@GetMapping("/{id}")
public ApiResult<Goods> get(@PathVariable("id") Integer id) {
return success(goodsService.getById(id));
// 使用关联查询
//return success(goodsService.getByIdRel(id));
return success(goodsService.getByIdRel(id));
}
@ApiOperation("添加商品记录表")
@PostMapping()
public ApiResult<?> save(@RequestBody Goods goods) {
// 记录当前登录用户id
User loginUser = getLoginUser();
if (loginUser != null) {
User loginUser = getLoginUser();
if (loginUser != null) {
goods.setUserId(loginUser.getUserId());
}
}
if (goodsService.save(goods)) {
return success("添加成功");
}
@@ -0,0 +1,114 @@
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("删除失败");
}
}
@@ -0,0 +1,114 @@
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("删除失败");
}
}
@@ -0,0 +1,114 @@
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.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-log")
public class GoodsLogController extends BaseController {
@Resource
private GoodsLogService goodsLogService;
@ApiOperation("分页查询商品日志表")
@GetMapping("/page")
public ApiResult<PageResult<GoodsLog>> page(GoodsLogParam param) {
// 使用关联查询
return success(goodsLogService.pageRel(param));
}
@ApiOperation("查询全部商品日志表")
@GetMapping()
public ApiResult<List<GoodsLog>> list(GoodsLogParam param) {
// 使用关联查询
return success(goodsLogService.listRel(param));
}
@ApiOperation("根据id查询商品日志表")
@GetMapping("/{id}")
public ApiResult<GoodsLog> get(@PathVariable("id") Integer id) {
// 使用关联查询
return success(goodsLogService.getByIdRel(id));
}
@ApiOperation("添加商品日志表")
@PostMapping()
public ApiResult<?> save(@RequestBody GoodsLog goodsLog) {
// 记录当前登录用户id
// User loginUser = getLoginUser();
// if (loginUser != null) {
// goodsLog.setUserId(loginUser.getUserId());
// }
if (goodsLogService.save(goodsLog)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("修改商品日志表")
@PutMapping()
public ApiResult<?> update(@RequestBody GoodsLog goodsLog) {
if (goodsLogService.updateById(goodsLog)) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("删除商品日志表")
@DeleteMapping("/{id}")
public ApiResult<?> remove(@PathVariable("id") Integer id) {
if (goodsLogService.removeById(id)) {
return success("删除成功");
}
return fail("删除失败");
}
@ApiOperation("批量添加商品日志表")
@PostMapping("/batch")
public ApiResult<?> saveBatch(@RequestBody List<GoodsLog> list) {
if (goodsLogService.saveBatch(list)) {
return success("添加成功");
}
return fail("添加失败");
}
@ApiOperation("批量修改商品日志表")
@PutMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody BatchParam<GoodsLog> batchParam) {
if (batchParam.update(goodsLogService, "id")) {
return success("修改成功");
}
return fail("修改失败");
}
@ApiOperation("批量删除商品日志表")
@DeleteMapping("/batch")
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) {
if (goodsLogService.removeByIds(ids)) {
return success("删除成功");
}
return fail("删除失败");
}
}
@@ -0,0 +1,114 @@
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("删除失败");
}
}
@@ -0,0 +1,114 @@
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("删除失败");
}
}
@@ -1,25 +1,27 @@
package com.gxwebsoft.oa.entity;
package com.gxwebsoft.shop.entity;
import com.baomidou.mybatisplus.annotation.*;
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;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 商品记录表
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 20:00:50
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "Goods对象", description = "商品记录表")
@TableName("oa_goods")
@TableName("shop_goods")
public class Goods implements Serializable {
private static final long serialVersionUID = 1L;
@@ -36,6 +38,15 @@ public class Goods implements Serializable {
@ApiModelProperty(value = "商品标题")
private String title;
@ApiModelProperty(value = "商品封面图")
private String image;
@ApiModelProperty(value = "商品详情")
private String content;
@ApiModelProperty(value = "商品附件")
private String files;
@ApiModelProperty(value = "分类ID")
private Integer categoryId;
@@ -51,8 +62,14 @@ public class Goods implements Serializable {
@ApiModelProperty(value = "销售价格")
private BigDecimal salePrice;
@ApiModelProperty(value = "是否推荐")
private Boolean recommend;
@ApiModelProperty(value = "销量")
private Integer sales;
@ApiModelProperty(value = "库存")
private Integer stock;
@ApiModelProperty(value = "推荐")
private Integer recommend;
@ApiModelProperty(value = "状态, 0正常, 1待修,2异常已修,3异常未修")
private Integer status;
@@ -74,17 +91,9 @@ public class Goods implements Serializable {
private Integer tenantId;
@ApiModelProperty(value = "创建时间")
private Date createTime;
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private Date updateTime;
@ApiModelProperty(value = "分类名称")
@TableField(exist = false)
private String categoryName;
@ApiModelProperty(value = "分类图标")
@TableField(exist = false)
private String categoryImage;
private LocalDateTime updateTime;
}
@@ -0,0 +1,49 @@
package com.gxwebsoft.shop.entity;
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 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 = "GoodsAttr对象", description = "商品属性表")
@TableName("shop_goods_attr")
public class GoodsAttr 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 attrName;
@ApiModelProperty(value = "属性值")
private String attrValues;
@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,45 @@
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;
}
@@ -0,0 +1,96 @@
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;
}
@@ -0,0 +1,92 @@
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:34:16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "GoodsCategory对象", description = "商品分类")
@TableName("shop_goods_category")
public class GoodsCategory implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "商品分类ID")
@TableId(value = "category_id", type = IdType.AUTO)
private Integer categoryId;
@ApiModelProperty(value = "分类标识")
private String categoryCode;
@ApiModelProperty(value = "分类名称")
private String title;
@ApiModelProperty(value = "类型 0列表 1单页 2外链")
private Integer type;
@ApiModelProperty(value = "分类图片")
private String image;
@ApiModelProperty(value = "上级分类ID")
private Integer parentId;
@ApiModelProperty(value = "路由/链接地址")
private String path;
@ApiModelProperty(value = "组件路径")
private String component;
@ApiModelProperty(value = "绑定的页面")
private Integer pageId;
@ApiModelProperty(value = "用户ID")
private Integer userId;
@ApiModelProperty(value = "商品数量")
private Integer count;
@ApiModelProperty(value = "排序(数字越小越靠前)")
private Integer sortNumber;
@ApiModelProperty(value = "备注")
private String comments;
@ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
private Integer hide;
@ApiModelProperty(value = "是否推荐")
private Integer recommend;
@ApiModelProperty(value = "是否显示在首页")
private Integer showIndex;
@ApiModelProperty(value = "状态, 0正常, 1禁用")
private Integer status;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@TableLogic
private Integer deleted;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
@ApiModelProperty(value = "注册时间")
private LocalDateTime createTime;
@ApiModelProperty(value = "修改时间")
private LocalDateTime updateTime;
}
@@ -0,0 +1,98 @@
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;
}
@@ -0,0 +1,58 @@
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;
}
@@ -0,0 +1,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.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;
}
@@ -0,0 +1,85 @@
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;
}
@@ -0,0 +1,51 @@
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,37 @@
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 = "GoodsRule对象", description = "商品规则值(规格)表")
@TableName("shop_goods_rule")
public class GoodsRule implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO)
private Integer id;
@ApiModelProperty(value = "规格名称")
private String ruleName;
@ApiModelProperty(value = "规格值")
private String ruleValue;
@ApiModelProperty(value = "租户id")
private Integer tenantId;
}
@@ -0,0 +1,37 @@
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 org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商品属性表Mapper
*
* @author 科技小王子
* @since 2024-03-30 19:09:56
*/
public interface GoodsAttrMapper extends BaseMapper<GoodsAttr> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<GoodsAttr>
*/
List<GoodsAttr> selectPageRel(@Param("page") IPage<GoodsAttr> page,
@Param("param") GoodsAttrParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<GoodsAttr> selectListRel(@Param("param") GoodsAttrParam param);
}
@@ -0,0 +1,37 @@
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);
}
@@ -0,0 +1,37 @@
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,18 +1,18 @@
package com.gxwebsoft.oa.mapper;
package com.gxwebsoft.shop.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.oa.entity.GoodsCategory;
import com.gxwebsoft.oa.param.GoodsCategoryParam;
import com.gxwebsoft.shop.entity.GoodsCategory;
import com.gxwebsoft.shop.param.GoodsCategoryParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商品分类表Mapper
* 商品分类Mapper
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 19:34:16
*/
public interface GoodsCategoryMapper extends BaseMapper<GoodsCategory> {
@@ -0,0 +1,37 @@
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);
}
@@ -0,0 +1,37 @@
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);
}
@@ -0,0 +1,37 @@
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);
}
@@ -0,0 +1,37 @@
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 org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商品日志表Mapper
*
* @author 科技小王子
* @since 2024-03-30 19:09:56
*/
public interface GoodsLogMapper extends BaseMapper<GoodsLog> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<GoodsLog>
*/
List<GoodsLog> selectPageRel(@Param("page") IPage<GoodsLog> page,
@Param("param") GoodsLogParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<GoodsLog> selectListRel(@Param("param") GoodsLogParam param);
}
@@ -1,9 +1,9 @@
package com.gxwebsoft.oa.mapper;
package com.gxwebsoft.shop.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gxwebsoft.oa.entity.Goods;
import com.gxwebsoft.oa.param.GoodsParam;
import com.gxwebsoft.shop.entity.Goods;
import com.gxwebsoft.shop.param.GoodsParam;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@@ -12,7 +12,7 @@ import java.util.List;
* 商品记录表Mapper
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 20:00:50
*/
public interface GoodsMapper extends BaseMapper<Goods> {
@@ -0,0 +1,37 @@
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);
}
@@ -0,0 +1,37 @@
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 org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 商品规则值(规格)表Mapper
*
* @author 科技小王子
* @since 2024-03-30 19:09:56
*/
public interface GoodsRuleMapper extends BaseMapper<GoodsRule> {
/**
* 分页查询
*
* @param page 分页对象
* @param param 查询参数
* @return List<GoodsRule>
*/
List<GoodsRule> selectPageRel(@Param("page") IPage<GoodsRule> page,
@Param("param") GoodsRuleParam param);
/**
* 查询全部
*
* @param param 查询参数
* @return List<User>
*/
List<GoodsRule> selectListRel(@Param("param") GoodsRuleParam param);
}
@@ -0,0 +1,48 @@
<?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>
@@ -0,0 +1,39 @@
<?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">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_attr_result 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.result != null">
AND a.result LIKE CONCAT('%', #{param.result}, '%')
</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.GoodsAttrResult">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsAttrResult">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,96 @@
<?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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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>
@@ -0,0 +1,90 @@
<?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.GoodsCategoryMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_category a
<where>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
<if test="param.categoryCode != null">
AND a.category_code LIKE CONCAT('%', #{param.categoryCode}, '%')
</if>
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.image != null">
AND a.image LIKE CONCAT('%', #{param.image}, '%')
</if>
<if test="param.parentId != null">
AND a.parent_id = #{param.parentId}
</if>
<if test="param.path != null">
AND a.path LIKE CONCAT('%', #{param.path}, '%')
</if>
<if test="param.component != null">
AND a.component LIKE CONCAT('%', #{param.component}, '%')
</if>
<if test="param.pageId != null">
AND a.page_id = #{param.pageId}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.count != null">
AND a.count = #{param.count}
</if>
<if test="param.sortNumber != null">
AND a.sort_number = #{param.sortNumber}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
</if>
<if test="param.hide != null">
AND a.hide = #{param.hide}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.showIndex != null">
AND a.show_index = #{param.showIndex}
</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.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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.GoodsCategory">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsCategory">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,96 @@
<?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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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,32 +1,26 @@
<?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.oa.mapper.GoodsCategoryMapper">
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsCouponMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM oa_goods_category a
FROM shop_goods_coupon a
<where>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.name != null">
AND a.name LIKE CONCAT('%', #{param.name}, '%')
<if test="param.goodsId != null">
AND a.goods_id = #{param.goodsId}
</if>
<if test="param.code != null">
AND a.code LIKE CONCAT('%', #{param.code}, '%')
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.comments != null">
AND a.comments LIKE CONCAT('%', #{param.comments}, '%')
<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.userId != null">
AND a.user_id = #{param.userId}
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.deleted != null">
AND a.deleted = #{param.deleted}
@@ -34,22 +28,29 @@
<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 &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.GoodsCategory">
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.GoodsCoupon">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.GoodsCategory">
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsCoupon">
<include refid="selectSql"></include>
</select>
@@ -0,0 +1,39 @@
<?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>
@@ -0,0 +1,81 @@
<?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">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_log 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>
<if test="param.cartNum != null">
AND a.cart_num = #{param.cartNum}
</if>
<if test="param.orderNum != null">
AND a.order_num = #{param.orderNum}
</if>
<if test="param.payNum != null">
AND a.pay_num = #{param.payNum}
</if>
<if test="param.payPrice != null">
AND a.pay_price = #{param.payPrice}
</if>
<if test="param.costPrice != null">
AND a.cost_price = #{param.costPrice}
</if>
<if test="param.payUid != null">
AND a.pay_uid = #{param.payUid}
</if>
<if test="param.refundNum != null">
AND a.refund_num = #{param.refundNum}
</if>
<if test="param.refundPrice != null">
AND a.refund_price = #{param.refundPrice}
</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>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</if>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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.GoodsLog">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsLog">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -1,12 +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.oa.mapper.GoodsMapper">
<mapper namespace="com.gxwebsoft.shop.mapper.GoodsMapper">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*,b.name,b.avatar
FROM oa_goods a
LEFT JOIN oa_goods_categroy b ON a.goods_id = b.goods_id
SELECT a.*
FROM shop_goods a
<where>
<if test="param.goodsId != null">
AND a.goods_id = #{param.goodsId}
@@ -20,6 +19,9 @@
<if test="param.title != null">
AND a.title LIKE CONCAT('%', #{param.title}, '%')
</if>
<if test="param.content != null">
AND a.content LIKE CONCAT('%', #{param.content}, '%')
</if>
<if test="param.categoryId != null">
AND a.category_id = #{param.categoryId}
</if>
@@ -35,6 +37,9 @@
<if test="param.salePrice != null">
AND a.sale_price = #{param.salePrice}
</if>
<if test="param.recommend != null">
AND a.recommend = #{param.recommend}
</if>
<if test="param.status != null">
AND a.status = #{param.status}
</if>
@@ -59,16 +64,20 @@
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{param.createTimeEnd}
</if>
<if test="param.keywords != null">
AND (a.comments LIKE CONCAT('%', #{param.keywords}, '%')
)
</if>
</where>
</sql>
<!-- 分页查询 -->
<select id="selectPageRel" resultType="com.gxwebsoft.oa.entity.Goods">
<select id="selectPageRel" resultType="com.gxwebsoft.shop.entity.Goods">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.oa.entity.Goods">
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.Goods">
<include refid="selectSql"></include>
</select>
@@ -0,0 +1,48 @@
<?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">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_relation a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.userId != null">
AND a.user_id = #{param.userId}
</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>
<if test="param.createTimeStart != null">
AND a.create_time &gt;= #{param.createTimeStart}
</if>
<if test="param.createTimeEnd != null">
AND a.create_time &lt;= #{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.GoodsRelation">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsRelation">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,36 @@
<?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">
<!-- 关联查询sql -->
<sql id="selectSql">
SELECT a.*
FROM shop_goods_rule a
<where>
<if test="param.id != null">
AND a.id = #{param.id}
</if>
<if test="param.ruleName != null">
AND a.rule_name LIKE CONCAT('%', #{param.ruleName}, '%')
</if>
<if test="param.ruleValue != null">
AND a.rule_value LIKE CONCAT('%', #{param.ruleValue}, '%')
</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">
<include refid="selectSql"></include>
</select>
<!-- 查询全部 -->
<select id="selectListRel" resultType="com.gxwebsoft.shop.entity.GoodsRule">
<include refid="selectSql"></include>
</select>
</mapper>
@@ -0,0 +1,48 @@
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 = "GoodsAttrParam对象", description = "商品属性表查询参数")
public class GoodsAttrParam 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 attrName;
@ApiModelProperty(value = "属性值")
private String attrValues;
@ApiModelProperty(value = "活动类型 0=商品,1=秒杀,2=砍价,3=拼团")
@QueryField(type = QueryType.EQ)
private Boolean type;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
}
@@ -0,0 +1,41 @@
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;
}
@@ -0,0 +1,101 @@
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;
}
@@ -0,0 +1,92 @@
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:34:16
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "GoodsCategoryParam对象", description = "商品分类查询参数")
public class GoodsCategoryParam extends BaseParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "商品分类ID")
@QueryField(type = QueryType.EQ)
private Integer categoryId;
@ApiModelProperty(value = "分类标识")
private String categoryCode;
@ApiModelProperty(value = "分类名称")
private String title;
@ApiModelProperty(value = "类型 0列表 1单页 2外链")
@QueryField(type = QueryType.EQ)
private Integer type;
@ApiModelProperty(value = "分类图片")
private String image;
@ApiModelProperty(value = "上级分类ID")
@QueryField(type = QueryType.EQ)
private Integer parentId;
@ApiModelProperty(value = "路由/链接地址")
private String path;
@ApiModelProperty(value = "组件路径")
private String component;
@ApiModelProperty(value = "绑定的页面")
@QueryField(type = QueryType.EQ)
private Integer pageId;
@ApiModelProperty(value = "用户ID")
@QueryField(type = QueryType.EQ)
private Integer userId;
@ApiModelProperty(value = "商品数量")
@QueryField(type = QueryType.EQ)
private Integer count;
@ApiModelProperty(value = "排序(数字越小越靠前)")
@QueryField(type = QueryType.EQ)
private Integer sortNumber;
@ApiModelProperty(value = "备注")
private String comments;
@ApiModelProperty(value = "是否隐藏, 0否, 1是(仅注册路由不显示在左侧菜单)")
@QueryField(type = QueryType.EQ)
private Integer hide;
@ApiModelProperty(value = "是否推荐")
@QueryField(type = QueryType.EQ)
private Integer recommend;
@ApiModelProperty(value = "是否显示在首页")
@QueryField(type = QueryType.EQ)
private Integer showIndex;
@ApiModelProperty(value = "状态, 0正常, 1禁用")
@QueryField(type = QueryType.EQ)
private Integer status;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
}
@@ -0,0 +1,98 @@
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,5 +1,6 @@
package com.gxwebsoft.oa.param;
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;
@@ -10,45 +11,43 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
/**
* 商品分类表查询参数
* 商品优惠券表查询参数
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 19:09:56
*/
@Data
@EqualsAndHashCode(callSuper = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel(value = "GoodsCategoryParam对象", description = "商品分类表查询参数")
public class GoodsCategoryParam extends BaseParam {
@ApiModel(value = "GoodsCouponParam对象", description = "商品优惠券表查询参数")
public class GoodsCouponParam extends BaseParam {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "自增ID")
@QueryField(type = QueryType.EQ)
private Integer categoryId;
private Integer id;
@ApiModelProperty(value = "分类名称")
private String name;
@ApiModelProperty(value = "分类编码")
private String code;
@ApiModelProperty(value = "状态, 0正常, 1隐藏")
@ApiModelProperty(value = "商品id")
@QueryField(type = QueryType.EQ)
private Integer status;
private Integer goodsId;
@ApiModelProperty(value = "备注")
private String comments;
@ApiModelProperty(value = "优惠劵id")
@QueryField(type = QueryType.EQ)
private Integer issueCouponId;
@ApiModelProperty(value = "排序号")
@ApiModelProperty(value = "排序(数字越小越靠前)")
@QueryField(type = QueryType.EQ)
private Integer sortNumber;
@ApiModelProperty(value = "所有人")
@ApiModelProperty(value = "状态, 0正常, 1冻结")
@QueryField(type = QueryType.EQ)
private Integer userId;
private Integer status;
@ApiModelProperty(value = "是否删除, 0否, 1是")
@QueryField(type = QueryType.EQ)
private Integer deleted;
@ApiModelProperty(value = "用户ID")
@QueryField(type = QueryType.EQ)
private Integer userId;
}
@@ -0,0 +1,40 @@
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 = "GoodsDescriptionParam对象", description = "商品描述表查询参数")
public class GoodsDescriptionParam 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 = "商品详情")
private String description;
@ApiModelProperty(value = "商品类型")
@QueryField(type = QueryType.EQ)
private Boolean type;
}
@@ -0,0 +1,89 @@
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,21 +1,20 @@
package com.gxwebsoft.oa.param;
package com.gxwebsoft.shop.param;
import com.fasterxml.jackson.annotation.JsonInclude;
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;
import java.math.BigDecimal;
/**
* 商品记录表查询参数
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 20:00:50
*/
@Data
@EqualsAndHashCode(callSuper = false)
@@ -38,6 +37,9 @@ public class GoodsParam extends BaseParam {
@ApiModelProperty(value = "商品标题")
private String title;
@ApiModelProperty(value = "商品详情")
private String content;
@ApiModelProperty(value = "分类ID")
@QueryField(type = QueryType.EQ)
private Integer categoryId;
@@ -56,6 +58,10 @@ public class GoodsParam extends BaseParam {
@QueryField(type = QueryType.EQ)
private BigDecimal salePrice;
@ApiModelProperty(value = "推荐")
@QueryField(type = QueryType.EQ)
private Integer recommend;
@ApiModelProperty(value = "状态, 0正常, 1待修,2异常已修,3异常未修")
@QueryField(type = QueryType.EQ)
private Integer status;
@@ -0,0 +1,44 @@
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,35 @@
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 = "GoodsRuleParam对象", description = "商品规则值(规格)表查询参数")
public class GoodsRuleParam extends BaseParam {
private static final long serialVersionUID = 1L;
@QueryField(type = QueryType.EQ)
private Integer id;
@ApiModelProperty(value = "规格名称")
private String ruleName;
@ApiModelProperty(value = "规格值")
private String ruleValue;
}
@@ -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.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);
}
@@ -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.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);
}
@@ -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.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,17 +1,17 @@
package com.gxwebsoft.oa.service;
package com.gxwebsoft.shop.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.oa.entity.GoodsCategory;
import com.gxwebsoft.oa.param.GoodsCategoryParam;
import com.gxwebsoft.shop.entity.GoodsCategory;
import com.gxwebsoft.shop.param.GoodsCategoryParam;
import java.util.List;
/**
* 商品分类表Service
* 商品分类Service
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 19:34:16
*/
public interface GoodsCategoryService extends IService<GoodsCategory> {
@@ -34,7 +34,7 @@ public interface GoodsCategoryService extends IService<GoodsCategory> {
/**
* 根据id查询
*
* @param categoryId 自增ID
* @param categoryId 商品分类ID
* @return GoodsCategory
*/
GoodsCategory getByIdRel(Integer categoryId);
@@ -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.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);
}
@@ -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.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);
}
@@ -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.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);
}
@@ -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.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);
}
@@ -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.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);
}
@@ -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.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);
}
@@ -1,9 +1,9 @@
package com.gxwebsoft.oa.service;
package com.gxwebsoft.shop.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gxwebsoft.common.core.web.PageResult;
import com.gxwebsoft.oa.entity.Goods;
import com.gxwebsoft.oa.param.GoodsParam;
import com.gxwebsoft.shop.entity.Goods;
import com.gxwebsoft.shop.param.GoodsParam;
import java.util.List;
@@ -11,7 +11,7 @@ import java.util.List;
* 商品记录表Service
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 20:00:50
*/
public interface GoodsService extends IService<Goods> {
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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,10 +1,10 @@
package com.gxwebsoft.oa.service.impl;
package com.gxwebsoft.shop.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.oa.mapper.GoodsCategoryMapper;
import com.gxwebsoft.oa.service.GoodsCategoryService;
import com.gxwebsoft.oa.entity.GoodsCategory;
import com.gxwebsoft.oa.param.GoodsCategoryParam;
import com.gxwebsoft.shop.mapper.GoodsCategoryMapper;
import com.gxwebsoft.shop.service.GoodsCategoryService;
import com.gxwebsoft.shop.entity.GoodsCategory;
import com.gxwebsoft.shop.param.GoodsCategoryParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
@@ -12,10 +12,10 @@ import org.springframework.stereotype.Service;
import java.util.List;
/**
* 商品分类表Service实现
* 商品分类Service实现
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 19:34:16
*/
@Service
public class GoodsCategoryServiceImpl extends ServiceImpl<GoodsCategoryMapper, GoodsCategory> implements GoodsCategoryService {
@@ -23,7 +23,7 @@ public class GoodsCategoryServiceImpl extends ServiceImpl<GoodsCategoryMapper, G
@Override
public PageResult<GoodsCategory> pageRel(GoodsCategoryParam param) {
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>(param);
//page.setDefaultOrder("create_time desc");
page.setDefaultOrder("sort_number asc, create_time desc");
List<GoodsCategory> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@@ -33,7 +33,7 @@ public class GoodsCategoryServiceImpl extends ServiceImpl<GoodsCategoryMapper, G
List<GoodsCategory> list = baseMapper.selectListRel(param);
// 排序
PageParam<GoodsCategory, GoodsCategoryParam> page = new PageParam<>();
//page.setDefaultOrder("create_time desc");
page.setDefaultOrder("sort_number asc, create_time desc");
return page.sortRecords(list);
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -0,0 +1,47 @@
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));
}
}
@@ -1,10 +1,10 @@
package com.gxwebsoft.oa.service.impl;
package com.gxwebsoft.shop.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gxwebsoft.oa.mapper.GoodsMapper;
import com.gxwebsoft.oa.service.GoodsService;
import com.gxwebsoft.oa.entity.Goods;
import com.gxwebsoft.oa.param.GoodsParam;
import com.gxwebsoft.shop.mapper.GoodsMapper;
import com.gxwebsoft.shop.service.GoodsService;
import com.gxwebsoft.shop.entity.Goods;
import com.gxwebsoft.shop.param.GoodsParam;
import com.gxwebsoft.common.core.web.PageParam;
import com.gxwebsoft.common.core.web.PageResult;
import org.springframework.stereotype.Service;
@@ -15,7 +15,7 @@ import java.util.List;
* 商品记录表Service实现
*
* @author 科技小王子
* @since 2024-03-01 12:37:25
* @since 2024-03-30 20:00:50
*/
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements GoodsService {
@@ -23,7 +23,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
@Override
public PageResult<Goods> pageRel(GoodsParam param) {
PageParam<Goods, GoodsParam> page = new PageParam<>(param);
//page.setDefaultOrder("create_time desc");
page.setDefaultOrder("sort_number asc, create_time desc");
List<Goods> list = baseMapper.selectPageRel(page, param);
return new PageResult<>(list, page.getTotal());
}
@@ -33,7 +33,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
List<Goods> list = baseMapper.selectListRel(param);
// 排序
PageParam<Goods, GoodsParam> page = new PageParam<>();
//page.setDefaultOrder("create_time desc");
page.setDefaultOrder("sort_number asc, create_time desc");
return page.sortRecords(list);
}