Przeglądaj źródła

Merge remote-tracking branch 'origin/developerF' into developerC

# Conflicts:
#	src/main/java/com/caimei365/commodity/model/search/ProductListVo.java
#	src/main/resources/mapper/PageMapper.xml
#	src/main/resources/mapper/SearchMapper.xml
zhijiezhao 3 lat temu
rodzic
commit
5aa55472f0

+ 1 - 1
src/main/java/com/caimei365/commodity/components/SearchOpenService.java

@@ -336,7 +336,7 @@ public class SearchOpenService {
         // config.setStart(0) scroll该参数不起作用,默认为0
         config.setHits(size);
         // 设置搜索结果返回应用中哪些字段
-        config.setFetchFields(Lists.newArrayList("id", "p_id", "p_name", "p_image", "p_brand_name", "p_unit", "p_code", "p_price_flag", "p_price_grade", "p_supplier_id", "p_keyword", "p_act_flag", "p_brand_id"));
+        config.setFetchFields(Lists.newArrayList("id", "p_id", "p_name", "p_image", "p_brand_name", "p_unit", "p_code", "p_price_flag", "p_price_grade", "p_supplier_id", "p_keyword", "p_act_flag", "p_brand_id","p_product_type"));
         // 设置返回格式为json格式
         config.setSearchFormat(SearchFormat.JSON);
         // 创建参数对象

+ 20 - 0
src/main/java/com/caimei365/commodity/controller/ProductPageApi.java

@@ -2,6 +2,7 @@ package com.caimei365.commodity.controller;
 
 import com.caimei365.commodity.annotation.Statistics;
 import com.caimei365.commodity.model.ResponseJson;
+import com.caimei365.commodity.model.po.AnnouncementPo;
 import com.caimei365.commodity.model.po.ProductParameterPo;
 import com.caimei365.commodity.model.search.ProductListVo;
 import com.caimei365.commodity.model.vo.*;
@@ -94,6 +95,25 @@ public class ProductPageApi {
     public ResponseJson<Map<String, Object>> getHomeInit(Integer source) {
         return pageService.getHomeInit(source);
     }
+    @ApiOperation("公告展示列表")
+    @ApiImplicitParam(required = false, name = "source", value = "来源:1网站,2小程序")
+    @GetMapping("/home/title")
+    ResponseJson<PaginationVo<AnnouncementPo>> getannlist(@RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                          @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return pageService.getannlist(pageNum, pageSize);
+    }
+
+    @ApiOperation("公告展示内容页面")
+    @GetMapping("/home/capacity")
+    public ResponseJson<AnnouncementPo> getcapacity(Integer id) {
+        if (id == null || id==0) {
+            return ResponseJson.error("参数异常", null);
+        }
+        return pageService.getcapacity(id);
+    }
+
+
+
 
     /**
      * 首页侧边栏数据(小程序)

+ 32 - 0
src/main/java/com/caimei365/commodity/mapper/AnnouncementMapper.java

@@ -0,0 +1,32 @@
+package com.caimei365.commodity.mapper;
+
+
+import com.caimei365.commodity.model.ResponseJson;
+import com.caimei365.commodity.model.po.AnnouncementPo;
+import org.apache.ibatis.annotations.Mapper;
+
+
+import java.util.List;
+
+@Mapper
+public interface AnnouncementMapper {
+
+    /**
+     * 查找公告列表头两个
+     * @return
+     */
+   List<AnnouncementPo> gteannhade();
+
+    /**
+     * 查找公告列表
+     * @return
+     */
+    List<AnnouncementPo> getannlist();
+
+    /**
+     * 根据id查找公告内容
+     * @return
+     */
+   AnnouncementPo getcapacity(Integer id);
+
+}

+ 29 - 0
src/main/java/com/caimei365/commodity/model/po/AnnouncementPo.java

@@ -0,0 +1,29 @@
+package com.caimei365.commodity.model.po;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class AnnouncementPo {
+
+    private int id;
+    //标题
+    private String title;
+    //内容
+    private String capacity;
+    //状态1为上线2为下线
+    private String state;
+    //创建时间
+    @JsonFormat(pattern = "yyyy年MM月dd日")
+    private Date creationtime;
+    //上线时间
+    @JsonFormat(pattern = "yyyy年MM月dd日")
+    private Date livetime;
+    //下线时间
+    @JsonFormat(pattern = "yyyy年MM月dd日")
+    private Date  offlinetime;
+
+}

+ 2 - 1
src/main/java/com/caimei365/commodity/model/search/ProductListVo.java

@@ -77,9 +77,10 @@ public class ProductListVo implements Serializable {
      */
     private Integer actStatus;
     /**
-     * 商品类型:0其它类型(默认),1妆字号,2械字号
+     * 商品类型:1妆字号,2械字号
      */
     private Integer productType;
+
     private static final long serialVersionUID = 1L;
 
 }

+ 2 - 0
src/main/java/com/caimei365/commodity/model/vo/CombinationVo.java

@@ -46,4 +46,6 @@ public class CombinationVo implements Serializable {
 	 * 组合里面选中的商品总金额
 	 */
 	private BigDecimal productTotalAmount;
+
+	private Integer productType;
 }

+ 1 - 0
src/main/java/com/caimei365/commodity/model/vo/ProductItemVo.java

@@ -79,6 +79,7 @@ public class ProductItemVo implements Serializable {
      * 成本价选中标志:1固定成本 2比例成
      */
     private Integer costCheckFlag;
+
     /**
      * 固定成本价
      */

+ 11 - 0
src/main/java/com/caimei365/commodity/service/PageService.java

@@ -1,6 +1,7 @@
 package com.caimei365.commodity.service;
 
 import com.caimei365.commodity.model.ResponseJson;
+import com.caimei365.commodity.model.po.AnnouncementPo;
 import com.caimei365.commodity.model.po.ProductParameterPo;
 import com.caimei365.commodity.model.search.ProductListVo;
 import com.caimei365.commodity.model.vo.*;
@@ -138,6 +139,16 @@ public interface PageService {
      * @param userId        用户Id
      */
     ResponseJson<List<ProductListVo>> getProductDetailRecommends(Integer productId, Integer recommendType, Integer userId);
+    //公告展示
+    ResponseJson<PaginationVo<AnnouncementPo>> getannlist(int pageNum, int pageSize);
+
+    /**
+     * 公告展示-公告详细内容
+     *
+     * @param  id 公告列表Id
+     */
+    ResponseJson<AnnouncementPo> getcapacity(Integer id);
+
 
     /**
      * 商品维修(链接分享数据)

+ 26 - 4
src/main/java/com/caimei365/commodity/service/impl/PageServiceImpl.java

@@ -37,7 +37,8 @@ import java.util.stream.Collectors;
 public class PageServiceImpl implements PageService {
     @Value("${caimei.wwwDomain}")
     private String domain;
-
+    @Resource
+    private AnnouncementMapper announcementMapper;
     @Resource
     private UserLikeMapper likeMapper;
     @Resource
@@ -245,6 +246,8 @@ public class PageServiceImpl implements PageService {
         } else {
             map.put("couponEntry", 2);
         }
+       List<AnnouncementPo>annlist= announcementMapper.gteannhade();
+        map.put("annlist",annlist);
         return ResponseJson.success(map);
     }
 
@@ -610,9 +613,9 @@ public class PageServiceImpl implements PageService {
             // 没有权限查看该商品
             if (!(pass1 || pass2 || pass3 || pass4 || pass5)) {
                 return ResponseJson.success(1, "没有权限查看该商品", new ProductDetailVo());
-            }
-        } else if (2 == visibility || 1 == visibility || 4 == visibility) {
-            return ResponseJson.success(1, "没有权限查看该商品,userId为空", new ProductDetailVo());
+            }//|| 4 == visibility
+        } else if (2 == visibility || 1 == visibility) {
+            return ResponseJson.success(1, "没有权限查看该商品", new ProductDetailVo());
         }
         // 商品不处于已删除/待审核/审核未通过的状态
         if (0 != product.getValidFlag()) {
@@ -832,6 +835,25 @@ public class PageServiceImpl implements PageService {
         return ResponseJson.success(list);
     }
 
+    @Override
+    public ResponseJson<PaginationVo<AnnouncementPo>> getannlist(int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum, pageSize);
+        List<AnnouncementPo>list= announcementMapper.getannlist();
+        PaginationVo<AnnouncementPo> pageData = new PaginationVo(list);
+        return ResponseJson.success(pageData);
+    }
+
+    /**
+     * 公告展示-公告详细内容
+     *
+     * @param id 公告列表Id
+     */
+    @Override
+    public ResponseJson<AnnouncementPo> getcapacity(Integer id) {
+        AnnouncementPo announcementPo= announcementMapper.getcapacity(id);
+        return ResponseJson.success(announcementPo);
+    }
+
     /**
      * 商品维修(链接分享数据)
      *

+ 27 - 0
src/main/resources/mapper/AnnouncementMapper.xml

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei365.commodity.mapper.AnnouncementMapper">
+
+
+    <select id="gteannhade" resultType="com.caimei365.commodity.model.po.AnnouncementPo">
+        SELECT id,title
+        FROM `announcement_management`
+        WHERE state=1
+        ORDER BY Creationtime DESC
+        LIMIT 10
+    </select>
+
+<select id="getannlist" resultType="com.caimei365.commodity.model.po.AnnouncementPo">
+    SELECT id,title,Creationtime
+    FROM `announcement_management`
+    WHERE state=1
+    ORDER BY Creationtime DESC
+</select>
+
+    <select id="getcapacity" resultType="com.caimei365.commodity.model.po.AnnouncementPo">
+        SELECT title,capacity,Creationtime
+        FROM `announcement_management`
+        WHERE id = #{id} AND state=1
+    </select>
+
+</mapper>

+ 5 - 3
src/main/resources/mapper/CouponMapper.xml

@@ -49,7 +49,8 @@
         SELECT id AS "couponId",
                NAME,
                pcBanner,
-               appletsBanner
+               appletsBanner,
+               productType
         FROM cm_coupon
         WHERE productType = 2
           AND delFlag = 0
@@ -90,7 +91,8 @@
         p.commodityType,
         p.bigTypeID AS bigTypeId,
         p.smallTypeID AS smallTypeId,
-        p.tinyTypeID AS tinyTypeId
+        p.tinyTypeID AS tinyTypeId,
+        p.productType
         FROM
         cm_coupon_product a
         LEFT JOIN product p ON a.productId = p.productID
@@ -313,4 +315,4 @@
     <select id="findUserPermission" resultType="java.lang.Integer">
         select userIdentity from user where userID = #{userId}
     </select>
-</mapper>
+</mapper>

+ 12 - 8
src/main/resources/mapper/PageMapper.xml

@@ -45,7 +45,7 @@
 		order by -sort desc,createDate desc
     </select>
     <select id="getFloorByPageId" resultType="com.caimei365.commodity.model.vo.PageFloorVo">
-        select id, pageId as type, title ,description as detail
+        select id, title ,description as detail
         from cm_page_centre
         where pageId = #{pageId}
         <if test="source == 1">
@@ -58,8 +58,8 @@
     </select>
     <select id="getFloorContentById" resultType="com.caimei365.commodity.model.vo.FloorContentVo">
         select
-         id, floorId, centreId, templateType, pcAdsImage1, pcAdsImage2, pcAdsImage3,pcAdsImage4,pcAdsImage5,
-         appletsAdsImage1, appletsAdsImage2, appletsAdsImage3, appletsAdsImage4, appletsAdsImage5, adsLink1, adsLink2, adsLink3
+         id, floorId, centreId, templateType, pcAdsImage1, pcAdsImage2, pcAdsImage3,
+         appletsAdsImage1, appletsAdsImage2, appletsAdsImage3, adsLink1, adsLink2, adsLink3
          from new_page_floor_content where floorId = #{id}
     </select>
     <select id="getFloorImageById" resultType="com.caimei365.commodity.model.vo.FloorImageVo">
@@ -103,7 +103,7 @@
     </select>
     <select id="getFloorImageByCentreId" resultType="com.caimei365.commodity.model.vo.FloorImageVo">
         select
-            id, floorId, centreId, productId, name, link, image, appletsImage,adsImage, label,content, pcStatus, appletsStatus, sort,displaySort, createDate
+            id, floorId, centreId, productId, name, link, image, appletsImage, label, pcStatus, appletsStatus, sort, createDate
         from new_page_floor_image
         where centreId = #{id}
         <if test="source == 1">
@@ -214,7 +214,8 @@
             p.bigTypeID as bigTypeId,
             p.smallTypeID as smallTypeId,
             p.tinyTypeID as tinyTypeId,
-            rpp.currentPrice as discountPrice
+            rpp.currentPrice as discountPrice,
+            p.productType
         from
           repeat_purchase_price rpp
           left join product p on rpp.productId = p.productID
@@ -248,7 +249,8 @@
             p.actStatus,
 			p.`name` as `name`,
 			p.mainImage as image,
-            IFNULL(p.visibility,3) as visibility
+            IFNULL(p.visibility,3) as visibility,
+               p.productType
         from product as p
         left join cm_product_recommend as pr on pr.recommendProductID = p.productID
         where
@@ -261,7 +263,8 @@
             p.actStatus,
 			p.`name` as `name`,
 			p.mainImage as image,
-            IFNULL(p.visibility,3) as visibility
+            IFNULL(p.visibility,3) as visibility,
+               p.productType
         from product as p
         where p.validFlag  = 2
         and p.commodityType = (select commodityType from product as p1 where p1.productID = #{productId})
@@ -280,7 +283,8 @@
                headText,
                redPacketBeginTime,
                redPacketEndTime,
-               infoBarStatus
+               infoBarStatus,
+                productType
         from cm_page
         where id = #{pageId}
           and enabledStatus = '1'

+ 9 - 5
src/main/resources/mapper/PriceMapper.xml

@@ -25,7 +25,8 @@
             if(csp.id is not null,1,0) as svipProductFlag,
             csp.priceType as svipPriceType,
             csp.discount as svipDiscount,
-            csp.discountPrice as svipDiscountPrice
+            csp.discountPrice as svipDiscountPrice,
+            p.productType
         from product p
         left join cm_svip_product csp on p.productID = csp.productId
         where p.productID = #{productId}
@@ -51,7 +52,8 @@
             if(csp.id is not null,1,0) as svipProductFlag,
             csp.priceType as svipPriceType,
             csp.discount as svipDiscount,
-            csp.discountPrice as svipDiscountPrice
+            csp.discountPrice as svipDiscountPrice,
+            p.productType
         from product p
         left join cm_svip_product csp on p.productID = csp.productId
         where p.productID in
@@ -84,7 +86,7 @@
     </select>
     <select id="getRepurchasePrice" resultType="java.lang.Double">
         select
-          r.currentPrice
+          r.currentPrice,p.productType
         from repeat_purchase_price r
         left join product p on p.productID = r.productId
         where r.productId = #{productId} and userId = #{userId}
@@ -96,7 +98,8 @@
         select
         p.includedTax as includedTax,
         p.invoiceType as invoiceType,
-        p.taxPoint as taxPoint
+        p.taxPoint as taxPoint,
+        p.productType
         from product p
         where productID = #{productId}
     </select>
@@ -120,7 +123,8 @@
                s.productId AS id,
                s.shop AS shopName,
                s.productCount AS productCount,
-               s.property AS property
+               s.property AS property,
+               p.productType
         FROM product p
         LEFT JOIN cm_product_sales s ON p.productID = s.productId
         where p.productId=#{productId}

+ 5 - 3
src/main/resources/mapper/PromotionsMapper.xml

@@ -34,7 +34,7 @@
         from cm_promotions pr
                  left join cm_promotions_product prp on pr.id = prp.promotionsId
         where (prp.productId = #{productId} or
-               prp.supplierId = (select p.shopID from product p where p.productID = #{productId})
+               prp.supplierId = (select p.shopID,p.productType from product p where p.productID = #{productId})
             )
         and (pr.status = 1 or (pr.status = 2 and (NOW() between pr.beginTime and pr.endTime)))
         and pr.delFlag not in (1, 2)
@@ -81,7 +81,8 @@
                p.price    as originalPrice,
                p.unit      as unit,
                p.validFlag as validFlag,
-               p.stock     as stock
+               p.stock     as stock,
+               p.productType
         from product p
                  left join cm_promotions_gift cpg on cpg.productId = p.productID
         where cpg.promotionsId = #{promotionsId}
@@ -126,7 +127,8 @@
         p.price,
         p.unit as unit,
         p.priceFlag,
-        IFNULL(p.visibility,3) as visibility
+        IFNULL(p.visibility,3) as visibility,
+        p.productType
         from product p
         left join cm_promotions_product cpp on cpp.productId = p.productID
         where cpp.promotionsId = #{promotionsId}

+ 2 - 3
src/main/resources/mapper/SearchMapper.xml

@@ -24,7 +24,6 @@
         p.preferredFlag as p_preferred,
         p.productCategory as p_type,
         p.validFlag as p_valid,
-        p.productType as p_product_type,
         br.weights as p_sort,
         DATE_FORMAT(p.ADDTIME,'%Y%m%d') as p_time,
         IFNULL(p.visibility,3) as p_visibility
@@ -293,8 +292,8 @@
         p.priceFlag,
         p.price,
         p.shopID as shopId,
-        p.searchKey as keyword,
-        p.productType
+        p.productType,
+        p.searchKey as keyword
         from product p
         left join cm_brand as br on p.brandID = br.id
         where p.productCategory = 1

+ 36 - 34
src/main/resources/mapper/SellerMapper.xml

@@ -28,13 +28,15 @@
                p.commodityType,
                p.bigTypeID       as bigTypeId,
                p.smallTypeID     as smallTypeId,
-               p.tinyTypeID      as tinyTypeId
+               p.tinyTypeID      as tinyTypeId,
+               p.productType
         from product p
-        where (name LIKE CONCAT('%', #{searchWord}, '%') or productCode LIKE CONCAT('%', #{searchWord}, '%'))
-          and validFlag in (2, 3, 9)
+        where
+        (name LIKE CONCAT('%',#{searchWord},'%') or productCode LIKE CONCAT('%',#{searchWord},'%'))
+        and validFlag in (2,3,9)
     </select>
     <select id="getCombinationList" resultType="com.caimei365.commodity.model.vo.CombinationVo">
-        select c.id, c.name, c.addTime, c.updateTime
+        select c.id, c.name, c.addTime, c.updateTime,p.productType
         from cm_product_combination c
         left join product p on p.combinationID = c.id
         where c.delFlag = 0 and p.validFlag = 2
@@ -46,33 +48,32 @@
         order by c.addTime desc
     </select>
     <select id="getCombinationProductList" resultType="com.caimei365.commodity.model.vo.ProductItemVo">
-        select p.productID       as productId,
-               p.actStatus,
-               p.name,
-               p.aliasName,
-               p.mainImage       as image,
-               p.unit,
-               p.productCode     as code,
-               p.priceFlag,
-               p.price,
-               p.shopID          as shopId,
-               p.searchKey       as keyword,
-               p.minBuyNumber    as minBuyNumber,
-               p.maxBuyNumber    as maxBuyNumber,
-               p.ladderPriceFlag,
-               p.normalPrice,
-               p.step,
-               p.shopID          as shopId,
-               p.taxPoint        as taxRate,
-               p.includedTax,
-               p.invoiceType,
-               p.productCategory as productCategory,
-               p.validFlag,
-               p.featuredFlag,
-               p.commodityType,
-               p.bigTypeID       as bigTypeId,
-               p.smallTypeID     as smallTypeId,
-               p.tinyTypeID      as tinyTypeId
+        select
+            p.productID as productId,
+            p.actStatus,
+            p.name,
+            p.aliasName,
+            p.unit,
+            p.productCode as code,
+            p.priceFlag as priceFlag,
+            p.price as price,
+            p.shopID as shopId,
+            p.minBuyNumber as minBuyNumber,
+            p.maxBuyNumber as maxBuyNumber,
+            p.ladderPriceFlag,
+            p.normalPrice,
+            p.step,
+            p.shopID as shopId,
+            p.includedTax,
+            p.invoiceType,
+            p.productCategory as productCategory,
+            p.validFlag,
+            p.featuredFlag,
+            p.commodityType,
+            p.bigTypeID as bigTypeId,
+            p.smallTypeID as smallTypeId,
+            p.tinyTypeID as tinyTypeId,
+            p.productType
         from product p
         where p.validFlag = 2
           and p.combinationID = #{id}
@@ -80,13 +81,13 @@
     </select>
 
     <select id="findCombination" resultType="java.lang.Integer">
-        select c.id
+        select c.id,p.productType
         from cm_product_combination c
                  left join product p on p.combinationID = c.id
         where p.productID = #{productId}
     </select>
     <select id="findProductList" resultType="java.lang.Integer">
-        select productID
+        select productID,productType
         from product
         where combinationID = #{combinationId}
     </select>
@@ -118,7 +119,8 @@
         p.commodityType,
         p.bigTypeID as bigTypeId,
         p.smallTypeID as smallTypeId,
-        p.tinyTypeID as tinyTypeId
+        p.tinyTypeID as tinyTypeId,
+        p.productType
         from product p
         where
         p.productID in

+ 9 - 35
src/main/resources/mapper/ShopMapper.xml

@@ -4,7 +4,7 @@
     <insert id="insertProduct" keyColumn="productID" keyProperty="productId"  parameterType="com.caimei365.commodity.model.po.ProductPo" useGeneratedKeys="true">
         insert into product (
             shopID, name, aliasName, commodityType, bigTypeID, smallTypeID, tinyTypeID, mainImage,
-            brandID, productType, tags, unit, normalPrice, price, includedTax, minBuyNumber, stock,
+            brandID, productType, tags, unit, normalPrice, price, price1, includedTax, minBuyNumber, stock,
             <if test="productCategory != null and  productCategory != ''">
                 productCategory,
             </if>
@@ -36,7 +36,7 @@
                 recommendType,
             </if>
             <if test="priceFlag != null and  priceFlag != ''">
-                priceFlag,
+                price1TextFlag,
             </if>
             <if test="actFlag != null and  actFlag != ''">
                 actFlag,
@@ -74,19 +74,10 @@
             <if test="invoiceType != null and  invoiceType != ''">
                 invoiceType,
             </if>
-            <if test="trainingMethod != null">
-                trainingMethod,
-            </if>
-            <if test="trainingType != null">
-                trainingType,
-            </if>
-            <if test="trainingFee != null">
-                trainingFee,
-            </if>
             updateTime, validFlag
         ) values (
             #{shopId}, #{name}, #{aliasName}, #{commodityType}, #{bigTypeId}, #{smallTypeId}, #{tinyTypeId}, #{mainImage},
-            #{brandId}, #{productType}, #{tags}, #{unit}, #{normalPrice}, #{price}, #{includedTax}, #{minBuyNumber}, #{stock},
+            #{brandId}, #{productType}, #{tags}, #{unit}, #{normalPrice}, #{price}, #{price}, #{includedTax}, #{minBuyNumber}, #{stock},
             <if test="productCategory != null and  productCategory != ''">
                 #{productCategory},
             </if>
@@ -155,15 +146,6 @@
             </if>
             <if test="invoiceType != null and  invoiceType != ''">
                 #{invoiceType},
-            </if>
-            <if test="trainingMethod != null">
-                #{trainingMethod},
-            </if>
-            <if test="trainingType != null">
-                #{trainingType},
-            </if>
-            <if test="trainingFee != null">
-                #{trainingFee},
             </if>
              #{updateTime}, #{validFlag}
         )
@@ -173,7 +155,7 @@
             shopID = #{shopId}, name = #{name}, aliasName = #{aliasName}, commodityType = #{commodityType},
             bigTypeId = #{bigTypeId}, smallTypeId = #{smallTypeId}, tinyTypeId = #{tinyTypeId}, mainImage = #{mainImage},
             brandId = #{brandId}, productType = #{productType}, tags = #{tags}, unit = #{unit}, normalPrice = #{normalPrice},
-            price = #{price}, includedTax = #{includedTax}, minBuyNumber = #{minBuyNumber}, stock = #{stock},
+            price = #{price}, price1 = #{price}, includedTax = #{includedTax}, minBuyNumber = #{minBuyNumber}, stock = #{stock},
             <if test="productCategory != null and  productCategory != ''">
                 productCategory = #{productCategory},
             </if>
@@ -205,7 +187,7 @@
                 recommendType = #{recommendType},
             </if>
             <if test="priceFlag != null and  priceFlag != ''">
-                priceFlag = #{priceFlag},
+                price1TextFlag = #{priceFlag},
             </if>
             <if test="actFlag != null and  actFlag != ''">
                 actFlag = #{actFlag},
@@ -243,15 +225,6 @@
             <if test="invoiceType != null and  invoiceType != ''">
                 invoiceType = #{invoiceType},
             </if>
-            <if test="trainingMethod != null">
-                trainingMethod = #{trainingMethod},
-            </if>
-            <if test="trainingType != null">
-                trainingType = #{trainingType},
-            </if>
-            <if test="trainingFee != null">
-                trainingFee = #{trainingFee},
-            </if>
             updateTime = #{updateTime}, validFlag = #{validFlag}
         where productID = #{productId}
     </update>
@@ -351,10 +324,11 @@
 			p.shopID as shopId,
 			p.`name` as `name`,
 			p.mainImage as image,
-			p.price,
+			p.price as price,
 			p.unit as unit,
-			p.priceFlag,
-            IFNULL(p.visibility,3) as visibility
+			p.priceFlag as priceFlag,
+            IFNULL(p.visibility,3) as visibility,
+            p.productType
 		from product p
         where p.shopID = #{shopId}
         and p.visibility in

+ 3 - 2
src/main/resources/mapper/UserLikeMapper.xml

@@ -59,7 +59,8 @@
                p.bigTypeID       AS bigTypeId,
                p.smallTypeID     AS smallTypeId,
                p.tinyTypeID      AS tinyTypeId,
-               p.visibility      AS visibility
+               p.visibility      AS visibility,
+               p.productType
         FROM product p
                  LEFT JOIN cm_product_userlike cpu ON p.productID = cpu.productID
         WHERE p.validFlag = '2'
@@ -67,4 +68,4 @@
           AND cpu.userID = #{userId}
         ORDER BY cpu.likeTime DESC
     </select>
-</mapper>
+</mapper>