品牌、菜窖
This commit is contained in:
3
docs/databases/mallplus1-pms-modify.sql
Normal file
3
docs/databases/mallplus1-pms-modify.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
|
||||
ALTER TABLE pms_brand ADD qssl int default 0 COMMENT '起始销售数量';
|
||||
ALTER TABLE pms_brand ADD dgxy varchar(255) DEFAULT NULL COMMENT '订购协议';
|
||||
5
docs/databases/修改商品信息表.sql
Normal file
5
docs/databases/修改商品信息表.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
ALTER TABLE lpk_goods ADD brandId bigint default NULL COMMENT '品牌ID';
|
||||
ALTER TABLE lpk_goods ADD brandName varchar(255) DEFAULT NULL COMMENT '品牌名称';
|
||||
ALTER TABLE lpk_goods ADD categoryId bigint DEFAULT NULL COMMENT '类别ID';
|
||||
ALTER TABLE lpk_goods ADD categoryName varchar(255) DEFAULT NULL COMMENT '类别名称';
|
||||
33
src/main/java/com/yxt/yythmall/adminapi/AdminMallRest.java
Normal file
33
src/main/java/com/yxt/yythmall/adminapi/AdminMallRest.java
Normal file
@@ -0,0 +1,33 @@
|
||||
package com.yxt.yythmall.adminapi;
|
||||
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
|
||||
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
|
||||
import com.yxt.yythmall.adminservice.AdminMallService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController("com.yxt.yythmall.adminapi.AdminMallRest")
|
||||
@RequestMapping("/adminapi/mall")
|
||||
public class AdminMallRest {
|
||||
|
||||
@Autowired
|
||||
private AdminMallService adminMallService;
|
||||
|
||||
@GetMapping(value = "/listAllBrand")
|
||||
public ResultBean<List<PmsBrandVo>> listAllBrand() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<PmsBrandVo> list = adminMallService.listBrand();
|
||||
return rb.success().setData(list);
|
||||
}
|
||||
@GetMapping(value = "/listAllCategory")
|
||||
public ResultBean<List<PmsBrandVo>> listAllCategory() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<PmsProductCategoryVo> list = adminMallService.listAllCategory();
|
||||
return rb.success().setData(list);
|
||||
}
|
||||
}
|
||||
31
src/main/java/com/yxt/yythmall/adminapi/vo/PmsBrandVo.java
Normal file
31
src/main/java/com/yxt/yythmall/adminapi/vo/PmsBrandVo.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package com.yxt.yythmall.adminapi.vo;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PmsBrandVo {
|
||||
|
||||
private Long id;
|
||||
|
||||
private String name;
|
||||
private Integer sort;
|
||||
/**
|
||||
* 起始销售数量
|
||||
*/
|
||||
private Integer qssl;
|
||||
/**
|
||||
* 订购协议
|
||||
*/
|
||||
private String dgxy;
|
||||
/**
|
||||
* 品牌logo
|
||||
*/
|
||||
private String logo;
|
||||
|
||||
/**
|
||||
* 专区大图
|
||||
*/
|
||||
private String bigPic;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.yxt.yythmall.adminapi.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PmsProductCategoryVo {
|
||||
private Long id;
|
||||
private Long parentId;
|
||||
|
||||
private String name;
|
||||
private Integer level;
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
private String keywords;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.yxt.yythmall.adminservice;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
|
||||
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
|
||||
import com.yxt.yythmall.api.lpkgoods.LpkGoods;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface AdminMallMapper extends BaseMapper<LpkGoods> {
|
||||
|
||||
@Select("select * from pms_brand ")
|
||||
List<PmsBrandVo> listBrand();
|
||||
|
||||
@Select("select * from pms_product_category where parent_id=0 ")
|
||||
List<PmsProductCategoryVo> listAllCategory();
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.yxt.yythmall.adminservice;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.yxt.yythmall.adminapi.vo.PmsBrandVo;
|
||||
import com.yxt.yythmall.adminapi.vo.PmsProductCategoryVo;
|
||||
import com.yxt.yythmall.api.lpkgoods.LpkGoods;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class AdminMallService extends ServiceImpl<AdminMallMapper, LpkGoods> {
|
||||
|
||||
|
||||
public List<PmsBrandVo> listBrand() {
|
||||
return baseMapper.listBrand();
|
||||
}
|
||||
|
||||
public List<PmsProductCategoryVo> listAllCategory() {
|
||||
return baseMapper.listAllCategory();
|
||||
}
|
||||
}
|
||||
@@ -36,4 +36,9 @@ public class LpkGoods {
|
||||
private String content;
|
||||
private String weight;
|
||||
private String useTo;
|
||||
|
||||
private Long brandId; // 品牌ID';
|
||||
private String brandName; // 品牌名称';
|
||||
private Long categoryId; // 类别ID';
|
||||
private String categoryName; // 类别名称';
|
||||
}
|
||||
|
||||
@@ -26,4 +26,10 @@ public class LpkGoodsDetailsVo implements Vo {
|
||||
private double number;
|
||||
private String content;
|
||||
private String weight;
|
||||
|
||||
|
||||
private Long brandId; // 品牌ID';
|
||||
private String brandName; // 品牌名称';
|
||||
private Long categoryId; // 类别ID';
|
||||
private String categoryName; // 类别名称';
|
||||
}
|
||||
|
||||
@@ -26,4 +26,9 @@ public class LpkGoodsDto implements Dto {
|
||||
private String content;
|
||||
private String weight;
|
||||
private String useTo;
|
||||
|
||||
private Long brandId; // 品牌ID';
|
||||
private String brandName; // 品牌名称';
|
||||
private Long categoryId; // 类别ID';
|
||||
private String categoryName; // 类别名称';
|
||||
}
|
||||
|
||||
@@ -36,4 +36,8 @@ public class LpkGoodsVo implements Vo {
|
||||
private String useTo;
|
||||
private String weight;
|
||||
|
||||
private Long brandId; // 品牌ID';
|
||||
private String brandName; // 品牌名称';
|
||||
private Long categoryId; // 类别ID';
|
||||
private String categoryName; // 类别名称';
|
||||
}
|
||||
|
||||
@@ -12,11 +12,8 @@ import com.yxt.yythmall.mallplus.mbg.pms.vo.PmsProductResult;
|
||||
//import com.zscat.mallplus.sys.entity.SysUser;
|
||||
//import com.zscat.mallplus.ums.service.RedisService;
|
||||
import com.yxt.yythmall.mallplus.biz.util.DateUtils;
|
||||
import com.yxt.yythmall.mallplus.biz.util.JsonUtil;
|
||||
import com.yxt.yythmall.mallplus.biz.util.UserUtils;
|
||||
import com.zscat.mallplus.utils.IdWorker;
|
||||
import com.zscat.mallplus.utils.ValidatorUtils;
|
||||
import com.zscat.mallplus.vo.Rediskey;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@@ -182,7 +179,8 @@ public class PmsProductServiceImpl extends ServiceImpl<PmsProductMapper, PmsProd
|
||||
|
||||
@Override
|
||||
public PmsProductResult getUpdateInfo(Long id) {
|
||||
return productMapper.getUpdateInfo(id);
|
||||
// return productMapper.getUpdateInfo(id);
|
||||
return productMapper.getUpdateInfoLiu1(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -71,6 +71,16 @@ public class PmsBrand extends BaseEntity implements Serializable {
|
||||
*/
|
||||
@TableField("brand_story")
|
||||
private String brandStory;
|
||||
/**
|
||||
* 起始销售数量
|
||||
*/
|
||||
@TableField("qssl")
|
||||
private Integer qssl;
|
||||
/**
|
||||
* 订购协议
|
||||
*/
|
||||
@TableField("dgxy")
|
||||
private String dgxy;
|
||||
|
||||
|
||||
public Long getId() {
|
||||
@@ -161,6 +171,22 @@ public class PmsBrand extends BaseEntity implements Serializable {
|
||||
this.brandStory = brandStory;
|
||||
}
|
||||
|
||||
public Integer getQssl() {
|
||||
return qssl;
|
||||
}
|
||||
|
||||
public void setQssl(Integer qssl) {
|
||||
this.qssl = qssl;
|
||||
}
|
||||
|
||||
public String getDgxy() {
|
||||
return dgxy;
|
||||
}
|
||||
|
||||
public void setDgxy(String dgxy) {
|
||||
this.dgxy = dgxy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "PmsBrand{" +
|
||||
|
||||
@@ -32,4 +32,6 @@ public interface PmsProductMapper extends BaseMapper<PmsProduct> {
|
||||
List<PmsProduct> listByDate(@Param("date") String date, @Param("type") Integer type);
|
||||
|
||||
List<PmsProduct> selectByTags(@Param("tags") String tags);
|
||||
|
||||
PmsProductResult getUpdateInfoLiu1(Long id);
|
||||
}
|
||||
|
||||
@@ -226,4 +226,50 @@
|
||||
select id, brand_id, product_category_id, product_attribute_category_id, name,area_id, pic , sale, price, original_price ,
|
||||
weight from pms_product where find_in_set(#{tags}, tags) and publish_status=1 and verify_status=1
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<resultMap id="updateInfoMapLiu1" type="com.yxt.yythmall.mallplus.mbg.pms.vo.PmsProductResult"
|
||||
extends="BaseResultMap">
|
||||
<result column="cateParentId" jdbcType="BIGINT" property="cateParentId"/>
|
||||
<collection property="productLadderList" columnPrefix="ladder_"
|
||||
resultMap="com.yxt.yythmall.mallplus.mbg.pms.mapper.PmsProductLadderMapper.BaseResultMap">
|
||||
</collection>
|
||||
<collection property="productFullReductionList" columnPrefix="full_"
|
||||
resultMap="com.yxt.yythmall.mallplus.mbg.pms.mapper.PmsProductFullReductionMapper.BaseResultMap">
|
||||
</collection>
|
||||
<collection property="memberPriceList" columnPrefix="member_"
|
||||
resultMap="com.yxt.yythmall.mallplus.mbg.pms.mapper.PmsMemberPriceMapper.BaseResultMap">
|
||||
</collection>
|
||||
<collection property="skuStockList" columnPrefix="sku_"
|
||||
resultMap="com.yxt.yythmall.mallplus.mbg.pms.mapper.PmsSkuStockMapper.BaseResultMap">
|
||||
</collection>
|
||||
<collection property="productAttributeValueList" columnPrefix="attribute_"
|
||||
resultMap="com.yxt.yythmall.mallplus.mbg.pms.mapper.PmsProductAttributeValueMapper.BaseResultMap">
|
||||
</collection>
|
||||
|
||||
</resultMap>
|
||||
<select id="getUpdateInfoLiu1" resultMap="updateInfoMapLiu1">
|
||||
|
||||
SELECT *,
|
||||
pc.parent_id cateParentId,
|
||||
l.id ladder_id,l.product_id ladder_product_id,l.discount ladder_discount,l.count ladder_count,l.price
|
||||
ladder_price,
|
||||
pf.id full_id,pf.product_id full_product_id,pf.full_price full_full_price,pf.reduce_price full_reduce_price,
|
||||
m.id member_id,m.product_id member_product_id,m.member_level_id member_member_level_id,m.member_price
|
||||
member_member_price,m.member_level_name member_member_level_name,
|
||||
s.id sku_id,s.product_id sku_product_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale
|
||||
sku_sale,s.sku_code sku_sku_code,s.sp1 sku_sp1,s.sp2 sku_sp2,s.sp3 sku_sp3,s.stock sku_stock,s.lock_stock
|
||||
sku_lock_stock,
|
||||
a.id attribute_id,a.product_id attribute_product_id,a.product_attribute_id
|
||||
attribute_product_attribute_id,a.value attribute_value
|
||||
FROM pms_product p
|
||||
LEFT JOIN pms_product_category pc on pc.id = p.product_category_id
|
||||
LEFT JOIN pms_product_ladder l ON p.id = l.product_id
|
||||
LEFT JOIN pms_product_full_reduction pf ON pf.product_id=p.id
|
||||
LEFT JOIN pms_member_price m ON m.product_id = p.id
|
||||
LEFT JOIN pms_sku_stock s ON s.product_id = p.id
|
||||
LEFT JOIN pms_product_attribute_value a ON a.product_id=p.id
|
||||
WHERE p.id=#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -12,7 +12,13 @@ public class ConstansValue {
|
||||
"information_schema.tables", "oms_payments", "oms_order_return_reason", "sys_role", "ums_integration_consume_setting", "sys_user", "sys_store", "sys_area", "sys_school", "sys_permission", "pms_product_attribute", "pms_product_category_attribute_relation", "pms_product_attribute_value",
|
||||
"pms_product_category_attribute_relation", "admin_day_statics", "ums_member_tag","sys_store_rank", "pms_small_navicon_category", "bak_category", "es_shop_goods_group_map", "sys_applet_set", "bak_goods", "pms_product_category", "bak_brand", "oms_order_setting", "ums_member", "ums_member_level", "building_user_community", "gen_config");
|
||||
|
||||
public static final String sampleGoodsList = "id, brand_id, product_category_id, feight_template_id, product_attribute_category_id, name, pic, product_sn,\n" +
|
||||
// public static final String sampleGoodsList = "id, brand_id, product_category_id, feight_template_id, product_attribute_category_id, name, pic, product_sn,\n" +
|
||||
// " delete_status, publish_status, new_status, recommand_status, verify_status, sort, sale, price, promotion_price,\n" +
|
||||
// " original_price, stock, low_stock, store_name,sub_title,store_id,unit,\n" +
|
||||
// " weight, preview_status, service_ids,is_fenxiao, tags, brand_name,\n" +
|
||||
// " product_category_name, supply_id, create_time,tags, school_id,area_id,is_vip";
|
||||
|
||||
public static final String sampleGoodsList = "id, brand_id, product_category_id, feight_template_id, product_attribute_category_id, name, pic, product_sn,\n" +
|
||||
" delete_status, publish_status, new_status, recommand_status, verify_status, sort, sale, price, promotion_price,\n" +
|
||||
" original_price, stock, low_stock, store_name,sub_title,store_id,unit,\n" +
|
||||
" weight, preview_status, service_ids,is_fenxiao, tags, brand_name,\n" +
|
||||
|
||||
Reference in New Issue
Block a user