Quellcode durchsuchen

正品联盟商品详情

Aslee vor 4 Jahren
Ursprung
Commit
81720009c6

+ 5 - 0
product/src/main/java/com/caimei/module/product/dao/ProductModuleDao.java

@@ -1,6 +1,7 @@
 package com.caimei.module.product.dao;
 
 import com.caimei.module.base.entity.po.CmBrand;
+import com.caimei.module.base.entity.po.CmBrandProductParamPo;
 import com.caimei.module.base.entity.po.SeconHandProduct;
 import com.caimei.module.base.entity.vo.*;
 import org.apache.ibatis.annotations.Mapper;
@@ -100,4 +101,8 @@ public interface ProductModuleDao {
     Integer getBigTypeIdByTinyTypeId(Integer typeId);
 
     BigtypeVo getBigTypeByBigTypeId(Integer bigTypeID);
+
+    AuthProductVo findAuthProductDetailsByProductId(Integer productId);
+
+    List<CmBrandProductParamPo> getParamsByProductId(Integer productId);
 }

+ 13 - 0
product/src/main/resources/com-caimei-module-product/ProductModuleMapper.xml

@@ -593,4 +593,17 @@
         from bigtype
         where bigTypeID = #{bigTypeID}
     </select>
+    <select id="findAuthProductDetailsByProductId" resultType="com.caimei.module.base.entity.vo.AuthProductVo">
+        select bap.name,bap.snCode,bap.image,cb.authLogo,cb.name as brandName,c.name as productionPlace,
+               ba.securityLink,ba.agentFlag,ba.agentName,ba.statementType,ba.statementContent,
+               ba.statementLink,ba.authParty
+           from cm_brand_auth_product bap
+            left join cm_brand_auth ba on bap.authId = ba.id
+            left join cm_brand cb on ba.brandId = cb.id
+            left join country c on ba.countryId = c.countryId
+        where bap.id = #{productId}
+    </select>
+    <select id="getParamsByProductId" resultType="com.caimei.module.base.entity.po.CmBrandProductParamPo">
+        select name,content from cm_brand_product_param where productId = #{productId}
+    </select>
 </mapper>