提交 bf10feea 作者: xiaowang

修改:去掉必填字段 新增:小程序商品详情接口

上级 0316b915
package com.mmc.pms.controller.mall;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.service.mall.MallGoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author LW
* @date 2023/7/26 14:26
* 概要:
*/
@RestController
@RequestMapping("/app/goods")
@Api(tags = {"V1.0.3-小程序商城商品-相关接口"})
public class AppMallGoodsController extends BaseController {
@Resource
private MallGoodsService mallGoodsService;
@ApiOperation(value = "小程序商品详情")
@GetMapping("appMallGoodsDetails")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsVO.class)})
public ResultBody<MallGoodsVO> appMallGoodsDetails(@RequestParam Long id) {
return mallGoodsService.mallGoodsDetails(id);
}
}
......@@ -92,7 +92,7 @@ public class MallGoodsDO implements Serializable {
}
public MallGoodsVO buildMallGoodsVO() {
return MallGoodsVO.builder().id(id).tradeName(tradeName).description(description)
return MallGoodsVO.builder().id(id).userAccountId(userAccountId).tradeName(tradeName).description(description)
.categoryPrimaryId(categoryPrimaryId).categorySubId(categorySubId).shelfStatus(shelfStatus)
.goodsLabel(goodsLabel).labelShow(labelShow).goodsDetails(goodsDetails).build();
}
......
......@@ -20,7 +20,7 @@ import java.math.BigDecimal;
public class GoodsSpecValuesVO {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "规格id", example = "1", required = true)
@ApiModelProperty(value = "规格id", example = "1")
private Integer goodsSpecId;
@ApiModelProperty(value = "选项名称", example = "规格值名称", required = true)
private String specValueName;
......@@ -30,10 +30,10 @@ public class GoodsSpecValuesVO {
private String specValueImage;
@ApiModelProperty(value = "是否展示销售价格 0:否 1:是", example = "1", required = true)
private Integer showPrice;
@ApiModelProperty(value = "库存数量", example = "100", required = true)
@ApiModelProperty(value = "库存数量", example = "100")
private Integer stock;
@ApiModelProperty(value = "销售价格", example = "100.00", required = true)
private BigDecimal salePrice;
@ApiModelProperty(value = "渠道价格", example = "50.00", required = true)
@ApiModelProperty(value = "渠道价格", example = "50.00")
private BigDecimal channelPrice;
}
......@@ -67,4 +67,7 @@ public class MallGoodsVO {
@ApiModelProperty(value = "创建时间 用作列表回显")
private Date createTime;
@ApiModelProperty(value = "店铺id 小程序用")
private Integer userAccountId;
}
......@@ -18,3 +18,4 @@ data-filter:
- /pms/webDevice/getSecondDistrictInfo
- /pms/webDevice/ad
- /pms/actuator/health/readiness
- /pms/app/goods/appMallGoodsDetails
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论