feat(后台管理): 添加商品管理

master
wayn 4 years ago
parent 0bc73746b9
commit 79c7cd4618

@ -16,6 +16,6 @@ import com.wayn.common.base.BaseController;
*/ */
@RestController @RestController
@RequestMapping("/shop-goods-attribute") @RequestMapping("/shop-goods-attribute")
public class ShopGoodsAttributeController extends BaseController { public class GoodsAttributeController extends BaseController {
} }

@ -16,6 +16,6 @@ import com.wayn.common.base.BaseController;
*/ */
@RestController @RestController
@RequestMapping("/shop-goods-product") @RequestMapping("/shop-goods-product")
public class ShopGoodsProductController extends BaseController { public class GoodsProductController extends BaseController {
} }

@ -16,6 +16,6 @@ import com.wayn.common.base.BaseController;
*/ */
@RestController @RestController
@RequestMapping("/shop-goods-specification") @RequestMapping("/shop-goods-specification")
public class ShopGoodsSpecificationController extends BaseController { public class GoodsSpecificationController extends BaseController {
} }

@ -3,7 +3,6 @@ package com.wayn.admin.api.domain.shop;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.wayn.common.base.BaseEntity;
import com.wayn.common.base.ShopBaseEntity; import com.wayn.common.base.ShopBaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@ -69,4 +68,9 @@ public class Category extends ShopBaseEntity implements Serializable {
* banner0 1 * banner0 1
*/ */
private Integer delFlag; private Integer delFlag;
/**
*
*/
private String remark;
} }

@ -1,8 +1,10 @@
package com.wayn.admin.api.domain.shop; package com.wayn.admin.api.domain.shop;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.wayn.common.base.ShopBaseEntity; import com.wayn.common.base.ShopBaseEntity;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode; import lombok.EqualsAndHashCode;
@ -48,7 +50,8 @@ public class Goods extends ShopBaseEntity implements Serializable {
/** /**
* JSON * JSON
*/ */
private String gallery; @TableField(typeHandler = JacksonTypeHandler.class)
private String[] gallery;
/** /**
* *

@ -16,6 +16,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="delFlag" column="del_flag" /> <result property="delFlag" column="del_flag" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
</resultMap> </resultMap>
<sql id="selectCategoryVo"> <sql id="selectCategoryVo">

@ -8,7 +8,7 @@
<result column="goods_id" property="goodsId" /> <result column="goods_id" property="goodsId" />
<result column="attribute" property="attribute" /> <result column="attribute" property="attribute" />
<result column="value" property="value" /> <result column="value" property="value" />
<result column="creata_time" property="creataTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="del_flag" property="delFlag" /> <result column="del_flag" property="delFlag" />
</resultMap> </resultMap>
@ -16,7 +16,7 @@
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, id,
goods_id, attribute, value, creata_time, update_time, del_flag goods_id, attribute, value, create_time, update_time, del_flag
</sql> </sql>
</mapper> </mapper>

@ -4,27 +4,27 @@
<!-- 通用查询映射结果 --> <!-- 通用查询映射结果 -->
<resultMap id="ShopGoodsResult" type="com.wayn.admin.api.domain.shop.Goods"> <resultMap id="ShopGoodsResult" type="com.wayn.admin.api.domain.shop.Goods">
<result column="id" property="id" /> <result column="id" property="id" />
<result column="goods_sn" property="goodsSn" /> <result column="goods_sn" property="goodsSn" />
<result column="name" property="name" /> <result column="name" property="name" />
<result column="category_id" property="categoryId" /> <result column="category_id" property="categoryId" />
<result column="brand_id" property="brandId" /> <result column="brand_id" property="brandId" />
<result column="gallery" property="gallery" /> <result column="gallery" property="gallery" typeHandler="com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler"/>
<result column="keywords" property="keywords" /> <result column="keywords" property="keywords" />
<result column="brief" property="brief" /> <result column="brief" property="brief" />
<result column="is_on_sale" property="isOnSale" /> <result column="is_on_sale" property="isOnSale" />
<result column="sort_order" property="sortOrder" /> <result column="sort_order" property="sortOrder" />
<result column="pic_url" property="picUrl" /> <result column="pic_url" property="picUrl" />
<result column="share_url" property="shareUrl" /> <result column="share_url" property="shareUrl" />
<result column="is_new" property="isNew" /> <result column="is_new" property="isNew" />
<result column="is_hot" property="isHot" /> <result column="is_hot" property="isHot" />
<result column="unit" property="unit" /> <result column="unit" property="unit" />
<result column="counter_price" property="counterPrice" /> <result column="counter_price" property="counterPrice" />
<result column="retail_price" property="retailPrice" /> <result column="retail_price" property="retailPrice" />
<result column="detail" property="detail" /> <result column="detail" property="detail" />
<result column="create_time" property="createTime" /> <result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" /> <result column="update_time" property="updateTime" />
<result column="del_flag" property="delFlag" /> <result column="del_flag" property="delFlag" />
</resultMap> </resultMap>
<!-- 通用查询结果列 --> <!-- 通用查询结果列 -->
@ -44,6 +44,7 @@
<if test="goods.endTime != null and goods.endTime != ''"> <if test="goods.endTime != null and goods.endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> DATE_FORMAT(#{goods.endTime},'%Y-%m-%d') and DATE_FORMAT(create_time,'%Y-%m-%d') <![CDATA[ <= ]]> DATE_FORMAT(#{goods.endTime},'%Y-%m-%d')
</if> </if>
order by create_time desc
</where> </where>
</select> </select>
</mapper> </mapper>

Loading…
Cancel
Save