xiaoyong931011
2021-06-24 fa05b2893a53555ad7d1af24f7b5f52c6958cd25
20210624 商品分类
1 files added
5 files modified
50 ■■■■■ changed files
gc-shop/src/main/java/com/xzx/gc/shop/controller/AdminGoodsController.java 5 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/dto/UpdateGoodsDto.java 12 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/dto/ViewGoodsDto.java 10 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/vo/ViewGoodsVo.java 12 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/resources/mapper/shop/ScoreGoodsImagesMapper.xml 1 ●●●● patch | view | raw | blame | history
gc-shop/src/main/resources/mapper/shop/ScoreOrderMapper.xml 10 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/controller/AdminGoodsController.java
@@ -94,10 +94,11 @@
    /**
     * 查看商品详情
     */
    @GetMapping(Constants.ADMIN_VIEW_PREFIX + "/score/goods/viewGoods/{id}")
    @PostMapping(Constants.ADMIN_VIEW_PREFIX + "/score/goods/viewGoods.json")
    @ApiResponses({@ApiResponse( code = 200, message = "success", response = ViewGoodsVo.class)})
    @ApiOperation(value="商品管理-查看商品详情", notes="test: 仅0有正确返回")
    public JsonResult<ViewGoodsVo> viewGoods(@PathVariable long id) {
    public JsonResult<ViewGoodsVo> viewGoods(@RequestBody ViewGoodsDto viewGoodsDto) {
        Long id = viewGoodsDto.getId();
        ViewGoodsVo viewGoodsVo = goodsService.viewGoods(id);
        return JsonResult.success(viewGoodsVo);
    }
gc-shop/src/main/java/com/xzx/gc/shop/dto/UpdateGoodsDto.java
@@ -32,6 +32,18 @@
    @ApiModelProperty(value="商品详情",required=true)
    private String details;
    @ApiModelProperty(value="原价",required=true)
    private String originalPrice;
    @ApiModelProperty(value="现价",required=true)
    private String presentPrice;
    @ApiModelProperty(value="商品分类ID",required=true)
    private String categoryId;
    @ApiModelProperty(value="商品分类名称",required=true)
    private String categoryName;
    /**
     * 是否抢购 1-是 2-否
     */
gc-shop/src/main/java/com/xzx/gc/shop/dto/ViewGoodsDto.java
New file
@@ -0,0 +1,10 @@
package com.xzx.gc.shop.dto;
import lombok.Data;
@Data
public class ViewGoodsDto {
    private Long id;
}
gc-shop/src/main/java/com/xzx/gc/shop/vo/ViewGoodsVo.java
@@ -36,6 +36,18 @@
    @ApiModelProperty(value="商品详情",required=true)
    private String details;
    @ApiModelProperty(value="原价",required=true)
    private String originalPrice;
    @ApiModelProperty(value="现价",required=true)
    private String presentPrice;
    @ApiModelProperty(value="商品分类ID",required=true)
    private String categoryId;
    @ApiModelProperty(value="商品分类名称",required=true)
    private String categoryName;
    /**
     * 是否抢购 1-是 2-否
     */
gc-shop/src/main/resources/mapper/shop/ScoreGoodsImagesMapper.xml
@@ -9,7 +9,6 @@
        xzx_score_goods_images a
        WHERE 1 = 1
            and a.goods_id = #{id}
          and a.del_flag = 0
    </select>
</mapper>
gc-shop/src/main/resources/mapper/shop/ScoreOrderMapper.xml
@@ -11,6 +11,16 @@
        <if test="orderNo != null and orderNo != ''">
            and a.order_no like concat('%',#{orderNo},'%')
        </if>
        <if test="status != null and status != ''">
            and a.status = #{status}
        </if>
        <if test="createdTimeStart != null">
            and a.CREATED_TIME >= #{createdTimeStart}
        </if>
        <if test="createdTimeEnd != null">
            and a.CREATED_TIME >= #{createdTimeEnd}
        </if>
        order by a.CREATED_TIME desc
    </select>