feat(商品): 添加商品使用说明字段
在商品相关的DTO、Entity和查询类中添加`usageInstruction`字段,用于存储商品的使用说明信息。同时更新了Mapper中的SQL查询语句,确保该字段在查询结果中返回。
This commit is contained in:
parent
34f250b354
commit
32bf187134
|
@ -20,6 +20,7 @@ public class SearchGoodsWithCabinetDO extends BaseEntity<SearchGoodsWithCabinetD
|
||||||
private Integer status;
|
private Integer status;
|
||||||
private String coverImg;
|
private String coverImg;
|
||||||
private String goodsDetail;
|
private String goodsDetail;
|
||||||
|
private String usageInstruction;
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
@TableField("sc.cabinet_id")
|
@TableField("sc.cabinet_id")
|
||||||
|
|
|
@ -68,6 +68,9 @@ public class ShopGoodsEntity extends BaseEntity<ShopGoodsEntity> {
|
||||||
@TableField("remark")
|
@TableField("remark")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
|
@ApiModelProperty("商品使用说明")
|
||||||
|
@TableField("usage_instruction")
|
||||||
|
private String usageInstruction;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Serializable pkVal() {
|
public Serializable pkVal() {
|
||||||
|
|
|
@ -36,7 +36,7 @@ public interface ShopGoodsMapper extends BaseMapper<ShopGoodsEntity> {
|
||||||
@Param(Constants.WRAPPER) Wrapper<SearchGoodsDO> queryWrapper
|
@Param(Constants.WRAPPER) Wrapper<SearchGoodsDO> queryWrapper
|
||||||
); */
|
); */
|
||||||
@Select("SELECT g.goods_id, g.goods_name, g.category_id, g.price, " +
|
@Select("SELECT g.goods_id, g.goods_name, g.category_id, g.price, " +
|
||||||
"g.stock, g.status, g.auto_approval, g.cover_img, SUM(cc.stock) AS total_stock, " +
|
"g.stock, g.status, g.auto_approval, g.cover_img, g.usage_instruction, SUM(cc.stock) AS total_stock, " +
|
||||||
"GROUP_CONCAT(DISTINCT cc.cell_no) AS cell_no_str, " +
|
"GROUP_CONCAT(DISTINCT cc.cell_no) AS cell_no_str, " +
|
||||||
"GROUP_CONCAT(DISTINCT sc.cabinet_name) AS cabinet_name " +
|
"GROUP_CONCAT(DISTINCT sc.cabinet_name) AS cabinet_name " +
|
||||||
"FROM shop_goods g " +
|
"FROM shop_goods g " +
|
||||||
|
@ -63,7 +63,7 @@ public interface ShopGoodsMapper extends BaseMapper<ShopGoodsEntity> {
|
||||||
* @return 商品列表
|
* @return 商品列表
|
||||||
*/
|
*/
|
||||||
@Select("SELECT g.goods_id, g.goods_name, g.category_id, g.price, " +
|
@Select("SELECT g.goods_id, g.goods_name, g.category_id, g.price, " +
|
||||||
"g.status, g.cover_img, g.goods_detail, " +
|
"g.status, g.cover_img, g.goods_detail, g.usage_instruction, " +
|
||||||
"g.creator_id, g.create_time, g.updater_id, g.update_time, g.remark, g.deleted, " +
|
"g.creator_id, g.create_time, g.updater_id, g.update_time, g.remark, g.deleted, " +
|
||||||
"sc.cabinet_id, sc.cabinet_name, cc.stock, cc.cell_id " +
|
"sc.cabinet_id, sc.cabinet_name, cc.stock, cc.cell_id " +
|
||||||
"FROM shop_goods g " +
|
"FROM shop_goods g " +
|
||||||
|
@ -73,7 +73,7 @@ public interface ShopGoodsMapper extends BaseMapper<ShopGoodsEntity> {
|
||||||
List<SearchGoodsWithCabinetDO> getGoodsWithCabinetList();
|
List<SearchGoodsWithCabinetDO> getGoodsWithCabinetList();
|
||||||
|
|
||||||
@Select("SELECT g.goods_id, g.goods_name, g.category_id, g.price, " +
|
@Select("SELECT g.goods_id, g.goods_name, g.category_id, g.price, " +
|
||||||
"g.status, g.cover_img, g.goods_detail, " +
|
"g.status, g.cover_img, g.goods_detail, g.usage_instruction, " +
|
||||||
"g.creator_id, g.create_time, g.updater_id, g.update_time, g.remark, g.deleted, " +
|
"g.creator_id, g.create_time, g.updater_id, g.update_time, g.remark, g.deleted, " +
|
||||||
"sc.cabinet_id, sc.cabinet_name, sc.shop_id, cc.stock, cc.cell_id " +
|
"sc.cabinet_id, sc.cabinet_name, sc.shop_id, cc.stock, cc.cell_id " +
|
||||||
"FROM shop_goods g " +
|
"FROM shop_goods g " +
|
||||||
|
|
|
@ -86,4 +86,7 @@ public class ShopGoodsDTO {
|
||||||
private String cellNoStr;
|
private String cellNoStr;
|
||||||
@ExcelColumn(name = "已分配库存")
|
@ExcelColumn(name = "已分配库存")
|
||||||
private Integer totalStock;
|
private Integer totalStock;
|
||||||
|
|
||||||
|
@ExcelColumn(name = "商品使用说明")
|
||||||
|
private String usageInstruction;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue