‘linchangsheng’ il y a 3 semaines
Parent
commit
5abd6df688

+ 2 - 0
src/main/java/com/gree/mall/manager/commonmapper/CountMapper.java

@@ -1,6 +1,7 @@
 package com.gree.mall.manager.commonmapper;
 
 import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
+import com.baomidou.mybatisplus.annotation.SqlParser;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.gree.mall.manager.bean.count.CountBean;
 import com.gree.mall.manager.bean.count.CountOrderBean;
@@ -37,6 +38,7 @@ public interface CountMapper {
      * 商品销量排行
      */
     @InterceptorIgnore(tenantLine = "1", blockAttack = "1", illegalSql = "1")
+    @SqlParser
     public List<GoodsRankBean> countGoodsRank(@Param("startTime") String startTime,
                                               @Param("endTime") String endTime,
                                               @Param("companyWechatIds") List<String> companyWechatIds,

+ 3 - 3
src/main/java/com/gree/mall/manager/logic/coupon/CouponLogic.java

@@ -142,20 +142,20 @@ public class CouponLogic {
     public void add(HttpServletRequest request,CouponBean couponBean) throws RemoteServiceException {
         AdminUserCom adminUser = commonLogic.getAdminUser(request);
 
-        if (couponBean.getActiveType() == 1) {
+ /*       if (couponBean.getActiveType() == 1) {
             if (Objects.isNull(couponBean.getActiveStartTime()) || Objects.isNull(couponBean.getActiveEndTime())) {
                 throw new RemoteServiceException("使用时间区间不能为空!");
             }
             if (couponBean.getActiveEndTime().compareTo(couponBean.getActiveStartTime()) < 0) {
                 throw new RemoteServiceException("使用结束时间不能少于开始时间!");
             }
-        }
+        }*/
         couponBean.setFlag(CouponFlagEnum.WAIT.toString());
         couponBean.setLeftAmount(couponBean.getCouponAmount());
         couponBean.setCreateTime(new Date());
         couponBean.setCompanyWechatId(adminUser.getLoginCompanyWechatId());
         couponBean.setCompanyName(adminUser.getLoginCompanyName());
-        couponBean.setActiveType(couponBean.getActiveDay() != null ? 2:1);
+        couponBean.setActiveType(2);
         couponService.save(couponBean);
         String couponId = couponBean.getCouponId();
         if (couponBean.getCouponType().trim().equals(CouponTypeEnum.GOODS.getRemark()) && couponBean.getGoodsList() != null) {

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

@@ -65,7 +65,7 @@
             <foreach item="item" index="index" collection="websitIds" open="(" separator="," close=")">
                 #{item}
             </foreach>
-        </if>-->
+        </if>
     </select>