提交 b613b354 作者: xiaowang

修复

上级 67f74f42
......@@ -22,127 +22,127 @@ import java.util.List;
/**
* @Author LW
*
* @date 2023/3/14 13:22 概要:
*/
@RestController
@RequestMapping("/goods")
@Api(tags = {"后台-商品管理-相关接口"})
public class BackstageGoodsManageController extends BaseController {
@Resource private GoodsInfoService goodsInfoService;
@ApiOperation(value = "新增(租赁/销售)商品")
@PostMapping("addGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addGoods(
@ApiParam("商品信息VO") @Validated(Create.class) @RequestBody GoodsAddVO goodsAddVO,
HttpServletRequest request) {
return goodsInfoService.addGoods(
goodsAddVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "修改(租赁/销售)商品")
@PostMapping("editGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editGoodsInfo(
@ApiParam("商品信息VO") @Validated(Update.class) @RequestBody GoodsAddVO goodsAddVO) {
return goodsInfoService.editGoodsInfo(goodsAddVO);
}
@ApiOperation(value = "PC端-商品详情")
@GetMapping("getGoodsInfoDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsDetailDTO.class)})
public ResultBody getGoodsInfoDetail(
@ApiParam("商品id") @RequestParam Integer goodsInfoId,
@RequestParam Integer type,
@RequestParam(required = false) @ApiParam("租赁时限:(输入0:1-7天、输入1:8-15天、输入2:16-30天、输入3:30天以上)")
Integer leaseTerm) {
return goodsInfoService.getGoodsInfoDetail(goodsInfoId, type, leaseTerm);
}
@ApiOperation(value = "商品列表-分页")
@PostMapping("listPageGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)})
public ResultBody listPageGoodsInfo(@ApiParam("商品查询条件QO") @RequestBody MallGoodsQO param) {
return ResultBody.success(goodsInfoService.listPageGoodsInfo(param));
}
@ApiOperation(value = "商品批量上下架")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchOnShelfOrTakeDown")
public ResultBody batchOnShelfOrTakeDown(
@ApiParam(value = "商品上下架参数", required = true) @RequestBody BatchShelfVO batchOnShelfVO) {
return goodsInfoService.batchOnShelfOrTakeDown(
batchOnShelfVO.getGoodsIds(), batchOnShelfVO.getStatus());
}
@ApiOperation(value = "商品批量删除")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchRemoveWareInfo")
public ResultBody batchRemoveWareInfo(
@ApiParam(value = "商品id数组", required = true) @RequestBody List<Integer> ids) {
return goodsInfoService.batchRemoveWareInfo(ids);
}
@ApiOperation(value = "单位信息")
@GetMapping("getSkuUnit")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = SkuUnitDTO.class)})
public ResultBody getSkuUnit() {
return goodsInfoService.getSkuUnit();
}
@ApiOperation(value = "PC端-其他服务-列表")
@GetMapping("listOtherService")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = SaleServiceDTO.class)})
public ResultBody listOtherService() {
return goodsInfoService.getSaleServiceInfoToList();
}
@ApiOperation(value = "feign根据购物车信息填充未知信息", hidden = true)
@PostMapping("fillGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsShopCarDTO.class)})
public List<MallGoodsShopCarDTO> fillGoodsInfo(@RequestBody List<MallGoodsShopCarDTO> param) {
return goodsInfoService.fillGoodsInfo(param);
}
@ApiOperation(value = "feign根据渠道等级和产品规格id获取对应价格", hidden = true)
@PostMapping("feignListProductSpecPrice")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public List<MallProductSpecPriceDTO> feignListProductSpecPrice(
@RequestBody ProductSpecPriceQO productSpecPriceQO) {
return goodsInfoService.feignListProductSpecPrice(productSpecPriceQO);
}
@ApiOperation(value = "feign根据渠道等级获取单价信息", hidden = true)
@GetMapping("feignGetUnitPriceByTag")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSpecPriceDTO.class)})
public ProductSpecPriceDTO feignGetUnitPriceByTag(
@RequestParam(value = "specId") Integer specId,
@RequestParam(value = "tagId") Integer tagId) {
return goodsInfoService.feignGetUnitPriceByTag(specId, tagId);
}
@ApiOperation(value = "feign根据商品的产品规格id查询商品信息", hidden = true)
@PostMapping("feignListProdGoodsSkuInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderGoodsProdDTO.class)})
public List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(
@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListProdGoodsSkuInfo(mallOrderGoodsInfoQO);
}
@ApiOperation(value = "feign根据商品的行业规格id查询商品清单信息", hidden = true)
@PostMapping("feignListIndstGoodsSkuInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderGoodsProdDTO.class)})
public List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(
@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListIndstGoodsSkuInfo(mallOrderGoodsInfoQO);
}
@ApiOperation(value = "商品列表-排序")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("exchangeGoodsInfo")
public ResultBody exchangeGoodsInfo(@ApiParam(value = "第一个参数id", required = true) @RequestParam(value = "firstId") Integer firstId,
@ApiParam(value = "第二个参数id", required = true) @RequestParam(value = "secondId") Integer secondId) {
return goodsInfoService.exchangeGoodsInfo(firstId, secondId);
}
@Resource
private GoodsInfoService goodsInfoService;
@ApiOperation(value = "新增(租赁/销售)商品")
@PostMapping("addGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addGoods(
@ApiParam("商品信息VO") @Validated(Create.class) @RequestBody GoodsAddVO goodsAddVO,
HttpServletRequest request) {
return goodsInfoService.addGoods(
goodsAddVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "修改(租赁/销售)商品")
@PostMapping("editGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editGoodsInfo(
@ApiParam("商品信息VO") @Validated(Update.class) @RequestBody GoodsAddVO goodsAddVO) {
return goodsInfoService.editGoodsInfo(goodsAddVO);
}
@ApiOperation(value = "PC端-商品详情")
@GetMapping("getGoodsInfoDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsDetailDTO.class)})
public ResultBody getGoodsInfoDetail(
@ApiParam("商品id") @RequestParam Integer goodsInfoId,
@RequestParam Integer type,
@RequestParam(required = false) @ApiParam("租赁时限:(输入0:1-7天、输入1:8-15天、输入2:16-30天、输入3:30天以上)")
Integer leaseTerm) {
return goodsInfoService.getGoodsInfoDetail(goodsInfoId, type, leaseTerm);
}
@ApiOperation(value = "商品列表-分页")
@PostMapping("listPageGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)})
public ResultBody listPageGoodsInfo(@ApiParam("商品查询条件QO") @RequestBody MallGoodsQO param) {
return ResultBody.success(goodsInfoService.listPageGoodsInfo(param));
}
@ApiOperation(value = "商品批量上下架")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchOnShelfOrTakeDown")
public ResultBody batchOnShelfOrTakeDown(
@ApiParam(value = "商品上下架参数", required = true) @RequestBody BatchShelfVO batchOnShelfVO) {
return goodsInfoService.batchOnShelfOrTakeDown(
batchOnShelfVO.getGoodsIds(), batchOnShelfVO.getStatus());
}
@ApiOperation(value = "商品批量删除")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchRemoveWareInfo")
public ResultBody batchRemoveWareInfo(
@ApiParam(value = "商品id数组", required = true) @RequestBody List<Integer> ids) {
return goodsInfoService.batchRemoveWareInfo(ids);
}
@ApiOperation(value = "单位信息")
@GetMapping("getSkuUnit")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = SkuUnitDTO.class)})
public ResultBody getSkuUnit() {
return goodsInfoService.getSkuUnit();
}
@ApiOperation(value = "PC端-其他服务-列表")
@GetMapping("listOtherService")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = SaleServiceDTO.class)})
public ResultBody listOtherService() {
return goodsInfoService.getSaleServiceInfoToList();
}
@ApiOperation(value = "feign根据购物车信息填充未知信息", hidden = true)
@PostMapping("fillGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsShopCarDTO.class)})
public List<MallGoodsShopCarDTO> fillGoodsInfo(@RequestBody List<MallGoodsShopCarDTO> param) {
return goodsInfoService.fillGoodsInfo(param);
}
@ApiOperation(value = "feign根据渠道等级和产品规格id获取对应价格", hidden = true)
@PostMapping("feignListProductSpecPrice")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public List<MallProductSpecPriceDTO> feignListProductSpecPrice(
@RequestBody ProductSpecPriceQO productSpecPriceQO) {
return goodsInfoService.feignListProductSpecPrice(productSpecPriceQO);
}
@ApiOperation(value = "feign根据渠道等级获取单价信息", hidden = true)
@GetMapping("feignGetUnitPriceByTag")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSpecPriceDTO.class)})
public ProductSpecPriceDTO feignGetUnitPriceByTag(
@RequestParam(value = "specId") Integer specId,
@RequestParam(value = "tagId") Integer tagId) {
return goodsInfoService.feignGetUnitPriceByTag(specId, tagId);
}
@ApiOperation(value = "feign根据商品的产品规格id查询商品信息", hidden = true)
@PostMapping("feignListProdGoodsSkuInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderGoodsProdDTO.class)})
public List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(
@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListProdGoodsSkuInfo(mallOrderGoodsInfoQO);
}
@ApiOperation(value = "feign根据商品的行业规格id查询商品清单信息", hidden = true)
@PostMapping("feignListIndstGoodsSkuInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderGoodsProdDTO.class)})
public List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(
@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListIndstGoodsSkuInfo(mallOrderGoodsInfoQO);
}
@ApiOperation(value = "商品列表-排序")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("exchangeGoodsInfo")
public ResultBody exchangeGoodsInfo(@ApiParam(value = "第一个参数id", required = true) @RequestParam(value = "firstId") Integer firstId,
@ApiParam(value = "第二个参数id", required = true) @RequestParam(value = "secondId") Integer secondId) {
return goodsInfoService.exchangeGoodsInfo(firstId, secondId);
}
}
......@@ -4,7 +4,7 @@ import com.mmc.pms.common.ResultBody;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.sale.dto.SkuUnitDTO;
import com.mmc.pms.model.sale.qo.MallGoodsQO;
import com.mmc.pms.model.sale.qo.MallGoodsInfoQO;
import com.mmc.pms.service.mall.MallGoodsService;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;
......@@ -54,7 +54,7 @@ public class MallGoodsController extends BaseController {
@ApiOperation(value = "商品列表-分页")
@PostMapping("listPageGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsVO.class)})
public ResultBody<MallGoodsVO> listPageGoodsInfo(@ApiParam("商品查询条件QO") @RequestBody MallGoodsQO param, HttpServletRequest request) {
public ResultBody<MallGoodsVO> listPageGoodsInfo(@ApiParam("商品查询条件QO") @RequestBody MallGoodsInfoQO param, HttpServletRequest request) {
return ResultBody.success(mallGoodsService.listPageGoodsInfo(param, this.getUserLoginInfoFromRedis(request)));
}
......
......@@ -18,102 +18,102 @@ import java.util.Set;
@Mapper
public interface GoodsInfoDao {
int countGoodsInfoByName(GoodsAddVO goodsAddVO);
int countGoodsInfoByName(GoodsAddVO goodsAddVO);
void insertGoodsInfo(GoodsInfo goodsInfo);
void insertGoodsInfo(GoodsInfo goodsInfo);
int countGoodsInfo();
int countGoodsInfo();
void insertGoodsImgInfo(List<GoodsImgDO> list);
void insertGoodsImgInfo(List<GoodsImgDO> list);
void insertVideoInfo(GoodsVideoDO goodsVideoDO);
void insertVideoInfo(GoodsVideoDO goodsVideoDO);
void insertGoodsDetail(GoodsDetailDO goodsDetailDO);
void insertGoodsDetail(GoodsDetailDO goodsDetailDO);
void insertGoodsService(List<GoodsServiceDO> otherList);
void insertGoodsService(List<GoodsServiceDO> otherList);
int countGoodsInfoById(Integer id);
int countGoodsInfoById(Integer id);
void updateGoodsInfo(GoodsInfo goodsInfo);
void updateGoodsInfo(GoodsInfo goodsInfo);
void updateGoodsDetail(GoodsDetailDO goodsDetailDO);
void updateGoodsDetail(GoodsDetailDO goodsDetailDO);
List<GoodsImgDO> listGoodsInfoByGoodsId(Integer id);
List<GoodsImgDO> listGoodsInfoByGoodsId(Integer id);
void deleteImgByIds(List<Integer> deleteIds);
void deleteImgByIds(List<Integer> deleteIds);
void deleteGoodsVideoById(Integer id);
void deleteGoodsVideoById(Integer id);
void deleteGoodsServiceByGoodsId(Integer id);
void deleteGoodsServiceByGoodsId(Integer id);
void insertMallIndustrySkuInfo(MallIndustrySkuInfoDO mallIndustrySkuInfoDO);
void insertMallIndustrySkuInfo(MallIndustrySkuInfoDO mallIndustrySkuInfoDO);
void insertMallIndustrySkuInfoSpec(MallIndustrySkuInfoSpecDO mallIndustrySkuInfoSpecDO);
void insertMallIndustrySkuInfoSpec(MallIndustrySkuInfoSpecDO mallIndustrySkuInfoSpecDO);
List<MallProdInfoDO> getMallProSkuInfo(Integer id);
List<MallProdInfoDO> getMallProSkuInfo(Integer id);
void batchUpdateMallProductSku(List<Integer> delIds);
void batchUpdateMallProductSku(List<Integer> delIds);
void batchUpdateMallProdSkuInfo(List<MallProdInfoDO> list);
void batchUpdateMallProdSkuInfo(List<MallProdInfoDO> list);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer id);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer id);
GoodsInfo getGoodsSimpleInfo(Integer goodsInfoId);
GoodsInfo getGoodsSimpleInfo(Integer goodsInfoId);
GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsInfoId);
GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsInfoId);
List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsInfoId);
List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsInfoId);
List<SkuUnitDO> getSkuUnit();
List<SkuUnitDO> getSkuUnit();
List<GoodsInfo> listSimpleGoodsInfoByIds(@Param("ids") Set<Integer> ids);
List<GoodsInfo> listSimpleGoodsInfoByIds(@Param("ids") Set<Integer> ids);
void insertMallProdSkuInfoSpec(MallProdSkuInfoSpecDO mallProdSkuInfoSpecDO);
void insertMallProdSkuInfoSpec(MallProdSkuInfoSpecDO mallProdSkuInfoSpecDO);
void batchUpdateMallProSpec(@Param("list") List<Integer> list, @Param("id") Integer id);
void batchUpdateMallProSpec(@Param("list") List<Integer> list, @Param("id") Integer id);
List<MallProdSkuInfoSpecDO> listMallProdSpecInfo(List<Integer> mallSkuIds);
List<MallProdSkuInfoSpecDO> listMallProdSpecInfo(List<Integer> mallSkuIds);
void batchUpdateMallProdSpec(List<Integer> delSpecId);
void batchUpdateMallProdSpec(List<Integer> delSpecId);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
List<MallGoodsSpecInfoDO> listIndstSpecInfo(@Param("indstIds") Set<Integer> indstIds);
List<MallGoodsSpecInfoDO> listIndstSpecInfo(@Param("indstIds") Set<Integer> indstIds);
List<GoodsServiceDO> listGoodsService(List<Integer> goodsIds);
List<GoodsServiceDO> listGoodsService(List<Integer> goodsIds);
List<MallGoodsInfoSimpleDO> listMallGoodsIndstSimpleInfo(
@Param("indstSkuSpecIds") Set<Integer> indstSkuSpecIds);
List<MallGoodsInfoSimpleDO> listMallGoodsIndstSimpleInfo(
@Param("indstSkuSpecIds") Set<Integer> indstSkuSpecIds);
List<Integer> listIndustrySpecIds(Set<Integer> mallIndstSkuSpecIds);
List<Integer> listIndustrySpecIds(Set<Integer> mallIndstSkuSpecIds);
List<MallGoodsProductDO> listIndustryProductList(List<Integer> industrySpecIds);
List<MallGoodsProductDO> listIndustryProductList(List<Integer> industrySpecIds);
List<GoodsInfo> ListGoodsInfoByCategoryId(Integer pageNo,Integer pageSize,Integer id,int type);
List<GoodsInfo> ListGoodsInfoByCategoryId(Integer pageNo, Integer pageSize, Integer id, int type);
List<MallProdSkuInfoSpecDO> getMallProSkuInfoSpec(Integer goodsInfoId);
List<MallProdSkuInfoSpecDO> getMallProSkuInfoSpec(Integer goodsInfoId);
List<MallProdSkuInfoSpecDO> listMallprodSpecById(List<Integer> goodsIds);
List<MallProdSkuInfoSpecDO> listMallprodSpecById(List<Integer> goodsIds);
List<SaleServiceDO> listSaleServiceInfo();
List<SaleServiceDO> listSaleServiceInfo();
int countListGoodsInfo(MallGoodsQO param);
int countListGoodsInfo(MallGoodsQO param);
List<GoodsInfo> listGoodsInfo(MallGoodsQO param);
List<GoodsInfo> listGoodsInfo(MallGoodsQO param);
void batchUpOrDownWare(@Param("ids") List<Integer> ids, @Param("status") Integer status);
void batchUpOrDownWare(@Param("ids") List<Integer> ids, @Param("status") Integer status);
void removeWareInfo(List<Integer> ids);
void removeWareInfo(List<Integer> ids);
List<SpecPriceVO> getPriceBySpecId(Integer productSpecId, Integer leaseTerm);
List<SpecPriceVO> getPriceBySpecId(Integer productSpecId, Integer leaseTerm);
int countGoodsInfoByCategoryId(Integer id);
int countGoodsInfoByCategoryId(Integer id);
void updateMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
void updateMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<MallProdInfoDO> getAllMallProSkuInfo(Integer goodsInfoId);
List<MallProdInfoDO> getAllMallProSkuInfo(Integer goodsInfoId);
int updateGoodsInfoSort(Integer id, Integer sort);
int updateGoodsInfoSort(Integer id, Integer sort);
int countServiceByCategoryId(Integer id);
int countServiceByCategoryId(Integer id);
}
......@@ -6,7 +6,7 @@ import com.mmc.pms.entity.mall.GoodsSpecValuesDO;
import com.mmc.pms.entity.mall.MallGoodsDO;
import com.mmc.pms.entity.mall.MallGoodsResourcesDO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.sale.qo.MallGoodsQO;
import com.mmc.pms.model.sale.qo.MallGoodsInfoQO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
......@@ -52,9 +52,9 @@ public interface MallGoodsDao {
List<SkuUnitDO> getSkuUnit();
int countListMallGoods(MallGoodsQO param);
int countListMallGoods(MallGoodsInfoQO param);
List<MallGoodsDO> listMallGoods(MallGoodsQO param);
List<MallGoodsDO> listMallGoods(MallGoodsInfoQO param);
int updateMallGoodsSort(Integer id, Integer sort);
......
package com.mmc.pms.model.sale.qo;
import com.mmc.pms.common.Page;
import com.mmc.pms.model.group.Freeze;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* @Author LW
* @date 2022/3/22 9:44 概要:商品列表查询QO
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class MallGoodsInfoQO {
@ApiModelProperty(value = "商品名称", example = "商品名称")
private String tradeName;
@ApiModelProperty(value = "商品一级分类", example = "1")
private Integer categoryPrimaryId;
@ApiModelProperty(value = "用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "商品状态 0:下架 1:上架")
private Integer shelfStatus;
@ApiModelProperty(value = "页码", required = true, example = "1")
@NotNull(
message = "页码不能为空",
groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true, example = "10")
@NotNull(
message = "每页显示数不能为空",
groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
......@@ -21,16 +21,22 @@ import javax.validation.constraints.NotNull;
@NoArgsConstructor
public class MallGoodsQO {
@ApiModelProperty(value = "商品名称", example = "商品名称")
private String tradeName;
private String goodsName;
@ApiModelProperty(value = "商品一级分类", example = "1")
private Integer categoryPrimaryId;
@ApiModelProperty(value = "商品类型 0:销售 1:租赁", example = "0")
private Integer goodsType;
@ApiModelProperty(value = "用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "开始时间", example = "2023-06-09 00:00:00")
private String startTime;
@ApiModelProperty(value = "商品状态 0:下架 1:上架")
private Integer shelfStatus;
@ApiModelProperty(value = "结束时间", example = "2023-06-11 23:59:59")
private String endTime;
@ApiModelProperty(value = "状态 0:下架(仓库中)1:上架", example = "1")
private Integer status;
@ApiModelProperty(value = "目录id", example = "1")
private Integer directoryId;
@ApiModelProperty(value = "页码", required = true, example = "1")
@NotNull(
......
......@@ -21,31 +21,31 @@ import java.util.List;
*/
public interface GoodsInfoService {
ResultBody addGoods(GoodsAddVO goodsAddVO, Integer userAccountId);
ResultBody addGoods(GoodsAddVO goodsAddVO, Integer userAccountId);
ResultBody editGoodsInfo(GoodsAddVO goodsAddVO);
ResultBody editGoodsInfo(GoodsAddVO goodsAddVO);
ResultBody getGoodsInfoDetail(Integer goodsInfoId, Integer type, Integer leaseTerm);
ResultBody getGoodsInfoDetail(Integer goodsInfoId, Integer type, Integer leaseTerm);
ResultBody getSkuUnit();
ResultBody getSkuUnit();
ResultBody getSaleServiceInfoToList();
ResultBody getSaleServiceInfoToList();
List<MallGoodsShopCarDTO> fillGoodsInfo(List<MallGoodsShopCarDTO> param);
List<MallGoodsShopCarDTO> fillGoodsInfo(List<MallGoodsShopCarDTO> param);
List<MallProductSpecPriceDTO> feignListProductSpecPrice(ProductSpecPriceQO productSpecPriceQO);
List<MallProductSpecPriceDTO> feignListProductSpecPrice(ProductSpecPriceQO productSpecPriceQO);
ProductSpecPriceDTO feignGetUnitPriceByTag(Integer specId, Integer tagId);
ProductSpecPriceDTO feignGetUnitPriceByTag(Integer specId, Integer tagId);
List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
PageResult listPageGoodsInfo(MallGoodsQO param);
PageResult listPageGoodsInfo(MallGoodsQO param);
ResultBody batchOnShelfOrTakeDown(List<Integer> goodsIds, Integer status);
ResultBody batchOnShelfOrTakeDown(List<Integer> goodsIds, Integer status);
ResultBody batchRemoveWareInfo(List<Integer> ids);
ResultBody batchRemoveWareInfo(List<Integer> ids);
ResultBody exchangeGoodsInfo(Integer firstId, Integer secondId);
ResultBody exchangeGoodsInfo(Integer firstId, Integer secondId);
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -3,7 +3,7 @@ package com.mmc.pms.service.mall;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.sale.qo.MallGoodsQO;
import com.mmc.pms.model.sale.qo.MallGoodsInfoQO;
import com.mmc.pms.page.PageResult;
/**
......@@ -19,7 +19,7 @@ public interface MallGoodsService {
ResultBody getSkuUnit();
PageResult listPageGoodsInfo(MallGoodsQO param, LoginSuccessDTO loginSuccessDTO);
PageResult listPageGoodsInfo(MallGoodsInfoQO param, LoginSuccessDTO loginSuccessDTO);
ResultBody exchange(Integer firstId, Integer secondId);
......
......@@ -14,7 +14,7 @@ import com.mmc.pms.model.mall.GoodsSpecVO;
import com.mmc.pms.model.mall.GoodsSpecValuesVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.sale.dto.SkuUnitDTO;
import com.mmc.pms.model.sale.qo.MallGoodsQO;
import com.mmc.pms.model.sale.qo.MallGoodsInfoQO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.mall.MallGoodsService;
import com.mmc.pms.util.CodeUtil;
......@@ -198,7 +198,7 @@ public class MallGoodsServiceImpl implements MallGoodsService {
@Override
public PageResult listPageGoodsInfo(MallGoodsQO param, LoginSuccessDTO loginSuccessDTO) {
public PageResult listPageGoodsInfo(MallGoodsInfoQO param, LoginSuccessDTO loginSuccessDTO) {
if (loginSuccessDTO.getRoleInfo().getSuperAdmin().equals(1)) {
// 超级管理员获取所有商品信息
return getMallGoodsInfo(param);
......@@ -209,7 +209,7 @@ public class MallGoodsServiceImpl implements MallGoodsService {
}
}
private PageResult getMallGoodsInfo(MallGoodsQO param) {
private PageResult getMallGoodsInfo(MallGoodsInfoQO param) {
int count;
List<MallGoodsDO> mallGoodsList;
count = mallGoodsDao.countListMallGoods(param);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论