瀏覽代碼

二手商品小程序优化

jun.li@caimei365.com 4 年之前
父節點
當前提交
09bef86ba1

+ 5 - 0
base-module/src/main/java/com/caimei/module/base/entity/po/SeconHandProduct.java

@@ -167,6 +167,11 @@ public class SeconHandProduct extends Product implements Serializable {
      */
     private String typeStr;
 
+    /**
+     * 品牌信息(品牌描述)
+     */
+    private String brandInfo;
+
     @Override
     public String toString() {
         return "SeconHandProduct{" +

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

@@ -368,7 +368,7 @@
 
     <select id="getSeconHandProductList" resultType="com.caimei.module.base.entity.po.SeconHandProduct">
         SELECT
-	        *,IF(p.brandID != 161,cb.name ,cshd.brandName) as "brandName"
+	        IF(p.brandID != 161,cb.name ,cshd.brandName) as "brandName",p.*,cb.*,cshd.*
         FROM
             product p
         LEFT JOIN cm_second_hand_detail cshd ON p.productID = cshd.productID
@@ -386,7 +386,7 @@
     </select>
     <select id="getSencondHandProductDetail" resultType="com.caimei.module.base.entity.po.SeconHandProduct">
         SELECT
-            *,cb.name as "brandName"
+            IF(p.brandID != 161,cb.name ,cshd.brandName) as "brandName",p.*,cb.*,cshd.*,cb.description as "brandInfo"
         FROM
             product p
             LEFT JOIN cm_second_hand_detail cshd ON p.productID = cshd.productID