Browse Source

Merge remote-tracking branch 'origin/developerA' into developer

chao 3 years ago
parent
commit
23a5c54c8d

+ 3 - 4
src/main/java/com/caimei365/commodity/mapper/CouponMapper.java

@@ -51,15 +51,16 @@ public interface CouponMapper {
      * @param userId
      * @return
      */
-    List<CouponVo> findCouponList(Integer userId);
+    List<CouponVo> findCouponList(@Param("userId") Integer userId, @Param("registerTime") Date registerTime);
 
     /**
      * 查询优惠券信息
      *
      * @param couponId
+     * @param registerTime
      * @return
      */
-    CouponVo getCoupons(Integer couponId);
+    CouponVo getCoupons(@Param("couponId") Integer couponId, @Param("registerTime") Date registerTime);
 
     /**
      * 查询兑换码是否有效
@@ -108,6 +109,4 @@ public interface CouponMapper {
      * @return
      */
     List<Integer> findVipCoupon();
-
-
 }

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

@@ -64,10 +64,10 @@ public class ProductListVo implements Serializable {
      * 搜索关键词searchKey
      */
     private String keyword;
-    /**
-     * 美博会商品活动状态
-     */
-    private Integer beautyActFlag;
+//    /**
+//     * 美博会商品活动状态
+//     */
+//    private Integer beautyActFlag;
     /**
      * 商品可见度: 3:所有人可见,2:普通机构可见,1:会员机构可见
      */

+ 5 - 0
src/main/java/com/caimei365/commodity/model/vo/CouponVo.java

@@ -81,4 +81,9 @@ public class CouponVo implements Serializable {
      * 领取状态: 0未领取 1已领取 (前端使用)
      */
     private Integer couponBtnType = 0;
+
+    /**
+     * 使用截止时间
+     */
+    private Date usePeriod;
 }

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

@@ -67,10 +67,10 @@ public class ProductItemVo implements Serializable {
      * 搜索关键词searchKey
      */
     private String keyword;
-    /**
-     * 美博会商品活动状态
-     */
-    private Integer beautyActFlag;
+//    /**
+//     * 美博会商品活动状态
+//     */
+//    private Integer beautyActFlag;
     /**
      * 商品原价
      */

+ 11 - 4
src/main/java/com/caimei365/commodity/service/impl/CouponServiceImpl.java

@@ -111,7 +111,8 @@ public class CouponServiceImpl implements CouponService {
     @Override
     public ResponseJson<PageInfo<CouponVo>> collarCouponsList(Integer userId, int pageNum, int pageSize) {
         PageHelper.startPage(pageNum, pageSize);
-        List<CouponVo> couponList = couponMapper.findCouponList(userId);
+        Date registerTime = couponMapper.findUserRegisterTime(userId);
+        List<CouponVo> couponList = couponMapper.findCouponList(userId, registerTime);
         //剔除超级会员优惠券
         List<Integer> vipCoupon = couponMapper.findVipCoupon();
         if (couponList != null && couponList.size() > 0) {
@@ -155,8 +156,10 @@ public class CouponServiceImpl implements CouponService {
         if (redemptionCode.getStatus() == 2) {
             return ResponseJson.error("兑换码已使用,请更换兑换码进行兑换", null);
         }
-        CouponVo coupon = couponMapper.getCoupons(redemptionCode.getCouponId());
+        Date registerTime = couponMapper.findUserRegisterTime(redeemCouponsDto.getUserId());
+        CouponVo coupon = couponMapper.getCoupons(redemptionCode.getCouponId(), registerTime);
         Date date = new Date();
+        // 判断是否在领取期限内
         if (coupon == null || date.compareTo(coupon.getStartDate()) < 0 || date.compareTo(coupon.getEndDate()) > 0) {
             return ResponseJson.error("兑换的优惠券已失效", null);
         }
@@ -164,7 +167,6 @@ public class CouponServiceImpl implements CouponService {
             return ResponseJson.error("该优惠券属于其他用户,您不能兑换", null);
         }
         if (coupon.getCouponType() == 4) {
-            Date registerTime = couponMapper.findUserRegisterTime(redeemCouponsDto.getUserId());
             if (registerTime == null || registerTime.compareTo(coupon.getStartDate()) < 0) {
                 return ResponseJson.error("该优惠券只供新用户使用,您不能兑换", null);
             }
@@ -179,6 +181,9 @@ public class CouponServiceImpl implements CouponService {
         couponClub.setDelFlag("0");
         couponMapper.insertCouponClub(couponClub);
         couponMapper.updateRedemptionCode(redemptionCode.getId(), couponClub.getId());
+        // 设置使用有效期
+        coupon.setStartDate(new Date());
+        coupon.setEndDate(coupon.getUsePeriod());
         return ResponseJson.success(coupon);
     }
 
@@ -205,8 +210,10 @@ public class CouponServiceImpl implements CouponService {
             return ResponseJson.error("商品数据异常", null);
         }
         List<Integer> vipCoupon = couponMapper.findVipCoupon();
+        // 注册时间
+        Date registerTime = couponMapper.findUserRegisterTime(userId);
         //未领取
-        List<CouponVo> notCouponList = couponMapper.findCouponList(userId);
+        List<CouponVo> notCouponList = couponMapper.findCouponList(userId, registerTime);
         filterCoupon(source, product, notCouponList);
         //超级会员优惠券移除
         if (notCouponList != null && notCouponList.size() > 0) {

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

@@ -231,7 +231,7 @@ public class PageServiceImpl implements PageService {
         List<BaseLinkVo> friendLinks = pageMapper.getFriendLinks();
         map.put("friendLinks", friendLinks);
         //是否显示领取优惠券入口
-        List<CouponVo> couponList = couponMapper.findCouponList(null);
+        List<CouponVo> couponList = couponMapper.findCouponList(null, null);
         if (couponList != null && couponList.size() > 0) {
             //展示
             map.put("couponEntry", 1);

+ 2 - 2
src/main/java/com/caimei365/commodity/utils/Json2PojoUtil.java

@@ -50,8 +50,8 @@ public class Json2PojoUtil {
             product.setBrandName(json.getString("p_brand_name"));
             /* 所属供应商Id,关联供应商表 */
             product.setShopId(json.getInt("p_supplier_id"));
-            /* 美博会商品活动状态 */
-            product.setBeautyActFlag(json.getInt("p_act_flag"));
+//            /* 美博会商品活动状态 */
+//            product.setBeautyActFlag(json.getInt("p_act_flag"));
             /* 品牌id*/
             product.setBrandId(json.getInt("p_brand_id"));
             productList.add(product);

+ 25 - 14
src/main/resources/mapper/CouponMapper.xml

@@ -8,8 +8,8 @@
         cc.`id` AS "couponId",
         cc.`couponAmount`,
         cc.`touchPrice`,
-        cc.`startDate`,
-        cc.`endDate`,
+        a.`createDate` as `startDate`,
+        date_add(a.createDate,interval cc.usePeriod DAY) as `endDate`,
         cc.`couponType`,
         cc.`userId`,
         cc.`shopId`,
@@ -24,17 +24,14 @@
         AND a.userId = #{userId}
         <if test="status == 1">
             AND a.status = 1
-            AND NOW() BETWEEN cc.startDate
-            AND cc.endDate
+            AND NOW() <![CDATA[ < ]]> date_add(a.createDate,interval cc.usePeriod DAY)
         </if>
         <if test="status == 2">
             AND a.status = 2
-            AND NOW() BETWEEN cc.startDate
-            AND cc.endDate
         </if>
         <if test="status == 3">
-            AND NOW() NOT BETWEEN cc.startDate
-            AND cc.endDate
+            AND a.status = 1
+            AND NOW() <![CDATA[ > ]]> date_add(a.createDate,interval cc.usePeriod DAY)
         </if>
         AND cc.status != 2
         ORDER BY
@@ -65,13 +62,12 @@
         p.mainImage AS image,
         p.unit,
         p.productCode AS CODE,
-        p.price1TextFlag AS priceFlag,
-        p.price1 AS price,
+        p.priceFlag,
+        p.price,
         p.costPrice,
         p.costCheckFlag,
         p.shopID AS shopId,
         p.searchKey AS keyword,
-        p.price8Text AS beautyActFlag,
         p.minBuyNumber AS minBuyNumber,
         p.maxBuyNumber AS maxBuyNumber,
         p.ladderPriceFlag,
@@ -109,6 +105,14 @@
         `id` AS "couponId",
         `couponAmount`,
         `touchPrice`,
+        <if test="userId == null || userId == 0">
+            startDate,
+            endDate,
+        </if>
+        <if test="userId >0">
+            if(#{registerTime} <![CDATA[ > ]]> startDate,#{registerTime},startDate) as startDate,
+            if(receiveFlag=1,endDate,date_add(if(#{registerTime} <![CDATA[ > ]]> startDate,#{registerTime},startDate),interval receivePeriod day)) as endDate,
+        </if>
         `startDate`,
         `endDate`,
         `couponType`,
@@ -120,12 +124,12 @@
         cm_coupon
         WHERE
         delFlag = 0 AND vipFlag != 1
-        AND NOW() BETWEEN startDate
-        AND endDate
         AND status != 2
         AND couponsMode = 0
         <if test="userId == null or userId == 0">
             AND couponType != 2
+            AND NOW() <![CDATA[ > ]]> startDate
+            AND NOW() <![CDATA[ < ]]> if(receiveFlag = 1,endDate,date_add(startDate,interval receivePeriod day))
         </if>
         <if test="userId > 0">
             AND id NOT IN(SELECT couponId FROM cm_coupon_club WHERE userId = #{userId})
@@ -133,6 +137,10 @@
             OR couponType = 2 AND userId = #{userId}
             OR ((SELECT registerTime FROM USER WHERE userID = #{userId}) <![CDATA[ >= ]]> startDate
             AND couponType = 4))
+            and NOW() <![CDATA[ > ]]> startDate
+            and NOW() <![CDATA[ < ]]> if(receiveFlag = 1,endDate,
+                    date_add(if(#{registerTime} <![CDATA[ > ]]> startDate,#{registerTime},startDate),interval receivePeriod day)
+                )
         </if>
         ORDER BY
         createDate DESC
@@ -142,7 +150,10 @@
         SELECT `id` AS "couponId",
                `couponAmount`,
                `touchPrice`,
-               `startDate`,
+               if(#{registerTime} <![CDATA[ > ]]> startDate,#{registerTime},startDate),
+               if(receiveFlag=1,endDate,date_add(if(#{registerTime} <![CDATA[ > ]]> startDate,#{registerTime},startDate),
+                   interval receivePeriod day)) as endDate,
+               date_add(NOW(),interval usePeriod day ) as usePeriod,
                `endDate`,
                `couponType`,
                `userId`,

+ 15 - 13
src/main/resources/mapper/PageMapper.xml

@@ -123,11 +123,10 @@
             p.mainImage as image,
             p.unit,
             p.productCode as code,
-            p.price1TextFlag as priceFlag,
-            p.price1 as price,
+            p.priceFlag,
+            p.price,
             p.shopID as shopId,
             p.searchKey as keyword,
-            p.price8Text as beautyActFlag,
             p.minBuyNumber as minBuyNumber,
             p.maxBuyNumber as maxBuyNumber,
             p.ladderPriceFlag,
@@ -174,8 +173,8 @@
     <select id="getProductDetails" resultType="com.caimei365.commodity.model.vo.ProductDetailVo">
         select productID as productId, shopID as shopId,  name, aliasName, commodityType, mainImage, stock, invoiceType,
             bigTypeID as bigTypeId, smallTypeID as smallTypeId, tinyTypeID as tinyTypeId, searchKey, visibility,
-            brandID as brandId,  productType, tags, unit, normalPrice, price1 as price, includedTax, minBuyNumber,
-            productCategory, serviceNumber, taxPoint, supplierTaxPoint, price1TextFlag as priceFlag, actFlag, ladderPriceFlag,
+            brandID as brandId,  productType, tags, unit, normalPrice, price, includedTax, minBuyNumber,
+            productCategory, serviceNumber, taxPoint, supplierTaxPoint, priceFlag, actFlag, ladderPriceFlag,
             addTime, hasSkuFlag, sellNumber, sortIndex, featuredFlag, costCheckFlag, recommendType, machineType,
             productCode, updateTime, validFlag, searchKey, allAreaFlag, step, costPrice, provinceIds, qualificationImg,
             trainingMethod, trainingType ,trainingFee
@@ -191,12 +190,11 @@
             p.mainImage as image,
             p.unit,
             p.productCode as code,
-            p.price1TextFlag as priceFlag,
-            p.price1 as price,
+            p.priceFlag,
+            p.price,
             p.costPrice,
             ifnull(p.costCheckFlag,1) as costCheckFlag,
             p.searchKey as keyword,
-            p.price8Text as beautyActFlag,
             p.minBuyNumber as minBuyNumber,
             p.maxBuyNumber as maxBuyNumber,
             p.ladderPriceFlag,
@@ -459,10 +457,15 @@
         order by addTime desc
     </select>
     <select id="getArchiveImageList" resultType="java.lang.String">
-        select ossUrl from cm_product_archive_file where archiveContentId = #{archiveContentId}
+        select ifnull(waterOssUrl, ossUrl) as ossUrl
+        from cm_product_archive_file
+        where archiveContentId = #{archiveContentId}
     </select>
     <select id="getArchiveFile" resultType="com.caimei365.commodity.model.po.ArchiveFilePo">
-        select fileName,ossName,uploadTime from cm_product_archive_file where archiveContentId = #{archiveContentId}
+        select fileName, if(cc.type = 2,ossName,ifnull(waterOssName, ossName)) as ossName, uploadTime
+        from cm_product_archive_file cf
+        left join cm_product_archive_content cc on cf.archiveContentId = cc.id
+        where archiveContentId = #{archiveContentId}
     </select>
     <select id="getArchiveByArchiveId" resultType="com.caimei365.commodity.model.po.ArchivePo">
         select cpa.id                                                                                   AS "archiveId",
@@ -502,11 +505,10 @@
             p.mainImage as image,
             p.unit,
             p.productCode as code,
-            p.price1TextFlag as priceFlag,
-            p.price1 as price,
+            p.priceFlag,
+            p.price,
             p.shopID as shopId,
             p.searchKey as keyword,
-            p.price8Text as beautyActFlag,
             p.minBuyNumber as minBuyNumber,
             p.maxBuyNumber as maxBuyNumber,
             p.ladderPriceFlag,

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

@@ -8,10 +8,10 @@
         select
             p.productID as productId,
             p.actStatus,
-            p.price1 as price,
+            p.price,
             p.minBuyNumber,
             p.maxBuyNumber,
-            p.price1TextFlag as priceFlag,
+            p.priceFlag,
             p.ladderPriceFlag,
             p.normalPrice,
             p.costPrice,
@@ -34,10 +34,10 @@
         select
             p.productID as productId,
             p.actStatus,
-            p.price1 as price,
+            p.price,
             p.minBuyNumber,
             p.maxBuyNumber,
-            p.price1TextFlag as priceFlag,
+            p.priceFlag,
             p.ladderPriceFlag,
             p.normalPrice,
             p.costPrice,
@@ -89,7 +89,7 @@
         left join product p on p.productID = r.productId
         where r.productId = #{productId} and userId = #{userId}
         and ((p.costCheckFlag=1 and r.currentPrice <![CDATA[ >= ]]> p.costPrice) or p.costCheckFlag=2)
-        and p.price1 <![CDATA[ >= ]]> r.currentPrice
+        and p.price <![CDATA[ >= ]]> r.currentPrice
         and r.delFlag = 0
     </select>
     <select id="getTaxByProductId" resultType="com.caimei365.commodity.model.vo.TaxVo">

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

@@ -51,7 +51,7 @@
                cpg.number  as number,
                0           as price,
                2           as productType,
-               p.price1    as originalPrice,
+               p.price    as originalPrice,
                p.unit      as unit,
                p.validFlag as validFlag,
                p.stock     as stock
@@ -96,9 +96,9 @@
         p.productID as productId,
         p.`name` as `name`,
         p.mainImage as image,
-        p.price1 as price,
+        p.price,
         p.unit as unit,
-        p.price1TextFlag as priceFlag,
+        p.priceFlag,
         IFNULL(p.visibility,3) as visibility
         from product p
         left join cm_promotions_product cpp on cpp.productId = p.productID

+ 7 - 9
src/main/resources/mapper/SearchMapper.xml

@@ -7,8 +7,8 @@
         p.searchKey as p_keyword,
         p.tags as p_tags,
         p.mainImage as p_image,
-        p.price1 as p_price,
-        p.price1TextFlag as p_price_flag,
+        p.price as p_price,
+        p.priceFlag as p_price_flag,
         p.productCode as p_code,
         p.sortIndex as p_sort,
         p.unit as p_unit,
@@ -28,8 +28,7 @@
         p.productCategory as p_type,
         p.validFlag as p_valid,
         DATE_FORMAT(p.ADDTIME,'%Y%m%d') as p_time,
-        IFNULL(p.visibility,3) as p_visibility,
-        IFNULL(p.price8Text,0) as p_act_flag
+        IFNULL(p.visibility,3) as p_visibility
     </sql>
     <sql id="Product_Joins">
         left join tinytype as t on p.tinyTypeID = t.tinyTypeID
@@ -291,11 +290,10 @@
         br.name as brandName,
         p.unit as unit,
         p.productCode as code,
-        p.price1TextFlag as priceFlag,
-        p.price1 as price,
+        p.priceFlag,
+        p.price,
         p.shopID as shopId,
-        p.searchKey as keyword,
-        IFNULL(p.price8Text,0) as beautyActFlag
+        p.searchKey as keyword
         from product p
         left join cm_brand as br on p.brandID = br.id
         where p.productCategory = 1
@@ -332,7 +330,7 @@
             <when test="sortField != null and sortField != ''">
                 <choose>
                     <when test="sortField == 'price'">
-                        order by p.price1
+                        order by p.price
                     </when>
                     <when test="sortField == 'sales'">
                         order by p.sellNumber

+ 7 - 7
src/main/resources/mapper/SecondHandMapper.xml

@@ -22,12 +22,12 @@
     </insert>
     <insert id="insertProduct" keyColumn="productID" keyProperty="productId" parameterType="com.caimei365.commodity.model.po.ProductPo" useGeneratedKeys="true">
         insert into product (
-            brandId, name, price, price1, stock, aliasName, normalPrice, mainImage, productCategory, preferredFlag, shopId,
+            brandId, name, price, stock, aliasName, normalPrice, mainImage, productCategory, preferredFlag, shopId,
             sellNumber, costPrice, costCheckFlag, costProportional, hasSkuFlag, validFlag, ladderPriceFlag, sortIndex, featuredFlag, byFlag,
             step, actFlag, actStatus, freePostFlag, productType, machineType, includedTax, recommendType, invoiceType,
             visibility, addTime, updateTime, onlineTime, downlineTime
         ) values (
-            #{brandId}, #{name}, #{price}, #{price}, #{stock}, #{aliasName}, #{normalPrice}, #{mainImage}, #{productCategory},
+            #{brandId}, #{name}, #{price}, #{stock}, #{aliasName}, #{normalPrice}, #{mainImage}, #{productCategory},
             #{preferredFlag}, #{shopId}, #{sellNumber}, #{costPrice}, #{costCheckFlag}, #{costProportional}, #{hasSkuFlag}, #{validFlag},
             #{ladderPriceFlag}, #{sortIndex}, #{featuredFlag}, #{byFlag}, #{step}, #{actFlag}, #{actStatus},
             #{freePostFlag}, #{productType}, #{machineType}, #{includedTax}, #{recommendType}, #{invoiceType},
@@ -44,7 +44,7 @@
             p.actStatus,
             p.`name` as name,
             p.mainImage as image,
-            p.price1 as price,
+            p.price,
             p.brandID as brandId,
 	        IF(p.brandID != 161,cb.name ,cshd.brandName) as "brandName",
 	        cshd.sold as "sold",
@@ -81,7 +81,7 @@
             p.actStatus,
             p.`name` as name,
             p.mainImage as image,
-            p.price1 as price,
+            p.price,
             p.normalPrice,
             p.productType,
             p.stock,
@@ -129,7 +129,7 @@
             p.actStatus,
             p.`name` as name,
             p.mainImage as image,
-            p.price1 as price,
+            p.price,
             p.brandID as brandId,
 	        IF(p.brandID != 161,cb.name ,cshd.brandName) as "brandName",
 	        cshd.sold as "sold",
@@ -161,7 +161,7 @@
             p.actStatus,
             p.`name` as name,
             p.mainImage as image,
-            p.price1 as price,
+            p.price,
             p.brandID as brandId,
 	        IF(p.brandID != 161,cb.name ,cshd.brandName) as "brandName",
 	        cshd.sold as "sold",
@@ -192,7 +192,7 @@
         p.actStatus,
         p.`name` as name,
         p.mainImage as image,
-        p.price1 as price,
+        p.price,
         p.brandID as brandId,
         cb.name as "brandName"
         from product p

+ 6 - 9
src/main/resources/mapper/SellerMapper.xml

@@ -9,11 +9,10 @@
                p.mainImage       as image,
                p.unit,
                p.productCode     as code,
-               p.price1TextFlag  as priceFlag,
-               p.price1          as price,
+               p.priceFlag,
+               p.price,
                p.shopID          as shopId,
                p.searchKey       as keyword,
-               p.price8Text      as beautyActFlag,
                p.minBuyNumber    as minBuyNumber,
                p.maxBuyNumber    as maxBuyNumber,
                p.ladderPriceFlag,
@@ -54,11 +53,10 @@
                p.mainImage       as image,
                p.unit,
                p.productCode     as code,
-               p.price1TextFlag  as priceFlag,
-               p.price1          as price,
+               p.priceFlag,
+               p.price,
                p.shopID          as shopId,
                p.searchKey       as keyword,
-               p.price8Text      as beautyActFlag,
                p.minBuyNumber    as minBuyNumber,
                p.maxBuyNumber    as maxBuyNumber,
                p.ladderPriceFlag,
@@ -101,11 +99,10 @@
         p.mainImage as image,
         p.unit,
         p.productCode as code,
-        p.price1TextFlag as priceFlag,
-        p.price1 as price,
+        p.priceFlag,
+        p.price,
         p.shopID as shopId,
         p.searchKey as keyword,
-        p.price8Text as beautyActFlag,
         p.minBuyNumber as minBuyNumber,
         p.maxBuyNumber as maxBuyNumber,
         p.ladderPriceFlag,

+ 13 - 15
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, price1, includedTax, minBuyNumber, stock,
+            brandID, productType, tags, unit, normalPrice, price, includedTax, minBuyNumber, stock,
             <if test="productCategory != null and  productCategory != ''">
                 productCategory,
             </if>
@@ -36,7 +36,7 @@
                 recommendType,
             </if>
             <if test="priceFlag != null and  priceFlag != ''">
-                price1TextFlag,
+                priceFlag,
             </if>
             <if test="actFlag != null and  actFlag != ''">
                 actFlag,
@@ -86,7 +86,7 @@
             updateTime, validFlag
         ) values (
             #{shopId}, #{name}, #{aliasName}, #{commodityType}, #{bigTypeId}, #{smallTypeId}, #{tinyTypeId}, #{mainImage},
-            #{brandId}, #{productType}, #{tags}, #{unit}, #{normalPrice}, #{price}, #{price}, #{includedTax}, #{minBuyNumber}, #{stock},
+            #{brandId}, #{productType}, #{tags}, #{unit}, #{normalPrice}, #{price}, #{includedTax}, #{minBuyNumber}, #{stock},
             <if test="productCategory != null and  productCategory != ''">
                 #{productCategory},
             </if>
@@ -173,7 +173,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}, price1 = #{price}, includedTax = #{includedTax}, minBuyNumber = #{minBuyNumber}, stock = #{stock},
+            price = #{price}, includedTax = #{includedTax}, minBuyNumber = #{minBuyNumber}, stock = #{stock},
             <if test="productCategory != null and  productCategory != ''">
                 productCategory = #{productCategory},
             </if>
@@ -205,7 +205,7 @@
                 recommendType = #{recommendType},
             </if>
             <if test="priceFlag != null and  priceFlag != ''">
-                price1TextFlag = #{priceFlag},
+                priceFlag = #{priceFlag},
             </if>
             <if test="actFlag != null and  actFlag != ''">
                 actFlag = #{actFlag},
@@ -351,11 +351,10 @@
 			p.shopID as shopId,
 			p.`name` as `name`,
 			p.mainImage as image,
-			p.price1 as price,
+			p.price,
 			p.unit as unit,
-			p.price1TextFlag as priceFlag,
-            IFNULL(p.visibility,3) as visibility,
-		    p.price8Text as beautyActFlag
+			p.priceFlag,
+            IFNULL(p.visibility,3) as visibility
 		from product p
         where p.shopID = #{shopId}
         and p.visibility in
@@ -374,11 +373,10 @@
             p.mainImage as image,
             p.unit,
             p.productCode as code,
-            p.price1TextFlag as priceFlag,
-            p.price1 as price,
+            p.priceFlag,
+            p.price,
             p.shopID as shopId,
             p.searchKey as keyword,
-            p.price8Text as beautyActFlag,
             p.minBuyNumber as minBuyNumber,
             p.maxBuyNumber as maxBuyNumber,
             p.ladderPriceFlag,
@@ -469,8 +467,8 @@
     <select id="getProductForm" resultType="com.caimei365.commodity.model.vo.ProductFormVo">
         select productID as productId, shopID as shopId,  name, aliasName, commodityType, mainImage, stock, invoiceType,
             bigTypeID as bigTypeId, smallTypeID as smallTypeId, tinyTypeID as tinyTypeId, searchKey, visibility,
-            brandID as brandId,  productType, tags, unit, normalPrice, price1 as price, includedTax, minBuyNumber,
-            productCategory, serviceNumber, supplierTaxPoint, price1TextFlag as priceFlag, actFlag, ladderPriceFlag,
+            brandID as brandId,  productType, tags, unit, normalPrice, price, includedTax, minBuyNumber,
+            productCategory, serviceNumber, supplierTaxPoint, priceFlag, actFlag, ladderPriceFlag,
             addTime, hasSkuFlag, sellNumber, sortIndex, featuredFlag, costCheckFlag, recommendType, machineType,
             productCode, updateTime, validFlag, searchKey, allAreaFlag, step, costPrice, provinceIds, qualificationImg,
             trainingMethod, trainingType ,trainingFee
@@ -498,7 +496,7 @@
     </select>
     <select id="getProductShopById" resultType="com.caimei365.commodity.model.vo.ShopVo">
         select userID as userId, shopID as shopId, name, sname as shortName, linkMan, contractMobile,
-               contractEmail1 as contractEmail, contractEmail1 as email, provinceID as proviceId, cityID as cityId, townID as townId,
+               contractEmail, contractEmail as email, provinceID as proviceId, cityID as cityId, townID as townId,
                address, socialCreditCode, businessLicenseImage as businessLicense, firstShopType, secondShopType,
                mainpro as mainProduct, productDesc as mainProductDesc,legalPerson,registeredCapital,fax as faxNumber,
                nature as companyNature, turnover, medicalPracticeLicenseImg1 as medicalPracticeLicense, info as shopDesc,

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

@@ -40,10 +40,9 @@
                p.mainImage       AS image,
                p.unit,
                p.productCode     AS CODE,
-               p.price1TextFlag  AS priceFlag,
-               p.price1          AS price,
+               p.priceFlag,
+               p.price,
                p.searchKey       AS keyword,
-               p.price8Text      AS beautyActFlag,
                p.minBuyNumber    AS minBuyNumber,
                p.maxBuyNumber    AS maxBuyNumber,
                p.ladderPriceFlag,