Browse Source

ldm版本part4

Aslee 3 years ago
parent
commit
d14f405f16

+ 0 - 2
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -532,8 +532,6 @@ public class AuthServiceImpl implements AuthService {
                                 ProductSaveDto product = new ProductSaveDto();
                                 // 品牌id
                                 product.setBrandId(brandId);
-                                // 商品名称
-                                product.setProductName(productName);
                                 // sn码
                                 product.setSnCode(snCode);
                                 // 商品图片

+ 1 - 0
src/main/java/com/caimei/task/LdmTask.java

@@ -107,6 +107,7 @@ public class LdmTask {
             authPo.setAuthUserId(10);
             authPo.setCreateBy(10);
             authPo.setLogo(logo);
+            authPo.setCustomFlag(0);
             authMapper.insertAuth(authPo);
             // 保存轮播图
             if (addPicList.size() > 0) {

+ 1 - 1
src/main/resources/mapper/AuthMapper.xml

@@ -5,7 +5,7 @@
         insert into cm_brand_auth (authUserId, authParty, provinceId, cityId, townId, address, lng, lat,
                                    mobile, logo, customFLag, remarks, status, createTime, createBy, auditStatus, delFlag)
         values (#{authUserId}, #{authParty}, #{provinceId}, #{cityId}, #{townId}, #{address}, #{lng}, #{lat},
-                #{mobile}, #{logo}, #{customFLag}, #{remarks}, #{status}, NOW(), #{createBy}, #{auditStatus}, #{delFlag})
+                #{mobile}, #{logo}, #{customFlag}, #{remarks}, #{status}, NOW(), #{createBy}, #{auditStatus}, #{delFlag})
     </insert>
     <insert id="insertBanner">
         insert into cm_brand_auth_banner (authId, banner)

+ 11 - 6
src/main/resources/mapper/AuthProductMapper.xml

@@ -108,14 +108,15 @@
         delete from cm_brand_product_type where id = #{productTypeId}
     </delete>
     <select id="getProductList" resultType="com.caimei.model.vo.ProductListVo">
-        select id as productId,p.name as productName,snCode,p.status,p.auditStatus,p.createTime,cu.name as createBy,
+        select p.id as productId,t.name as productName,snCode,p.status,p.auditStatus,p.createTime,cu.name as createBy,
                au.name as auditBy,p.auditTime,p.invalidReason
         from cm_brand_auth_product p
+        left join cm_brand_product_type t on p.productTypeId = t.id
         left join cm_brand_auth_user cu on p.createBy = cu.authUserId
         left join cm_brand_auth_user au on p.auditBy = au.authUserId
         where authId = #{authId}
         <if test="productName != null and productName != ''">
-            and p.name like CONCAT('%',#{productName},'%')
+            and t.name like CONCAT('%',#{productName},'%')
         </if>
         <if test="snCode != null and snCode != ''">
             and snCode like CONCAT('%',#{snCode},'%')
@@ -186,8 +187,9 @@
         from cm_brand_auth_product
     </select>
     <select id="getWxProductList" resultType="com.caimei.model.vo.WxProductListVo">
-        select p.id as productId,p.authId, p.name as productName,p.snCode,p.image as productImage,a.authParty as clubName
+        select p.id as productId,p.authId, t.name as productName,p.snCode,p.image as productImage,a.authParty as clubName
         from cm_brand_auth_product p
+        left join cm_brand_product_type t on p.productTypeId = t.id
         left join cm_brand_auth a on p.authId = a.id
         left join cm_brand_auth_user au on a.authUserId = au.authUserId
         where p.productTypeId = #{productTypeId}
@@ -205,14 +207,15 @@
         select id from cm_brand where name = #{brand}
     </select>
     <select id="getAuthProductList" resultType="com.caimei.model.vo.ProductFormVo">
-        select p.id as productId,p.name as productName,snCode,cb.name as brandName,image as productImage,certificateImage
+        select p.id as productId,t.name as productName,snCode,cb.name as brandName,image as productImage,certificateImage
         from cm_brand_auth_product p
+        left join cm_brand_product_type t on p.productTypeId = t.id
         left join cm_brand cb on p.brandId = cb.id
         where authId = #{authId}
         order by createTime desc
     </select>
     <select id="getAuthProductByProductId" resultType="com.caimei.module.base.entity.vo.AuthProductVo">
-        select p.name       as productName,
+        select t.name       as productName,
                p.snCode,
                p.pcImage,
                p.appletsImage,
@@ -234,6 +237,7 @@
                i.statementLink,
                i.statementImage
         from cm_brand_auth_product p
+                 left join cm_brand_product_type t on p.productTypeId = t.id
                  left join cm_brand_auth a on p.authId = a.id
                  left join cm_brand_auth_user u on a.authUserId = u.authUserId
                  left join cm_brand_auth_shop_info i on u.authUserId = i.authUserId and p.brandId = i.brandId
@@ -259,8 +263,9 @@
         where productId = #{productId}
     </select>
     <select id="getClubProductList" resultType="com.caimei.model.vo.WxProductListVo">
-        select p.id as productId, p.name as productName, p.snCode
+        select p.id as productId, t.name as productName, p.snCode
         from cm_brand_auth_product p
+        left join cm_brand_product_type t on p.productTypeId = t.id
         where p.authId = #{authId}
           and p.status = 1
           and p.auditStatus = 1