admin
2020-07-04 9d35ba657fa5e3add766405d76e3ff8c4dcd4ad4
fanli/src/main/java/com/yeshi/fanli/service/impl/push/PushCouponServiceImpl.java
@@ -7,6 +7,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.SystemEnum;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -32,16 +33,10 @@
   private PushService pushService;
   @Resource
   private ConfigService configService;
   @Resource
   private PushCouponMapper pushCouponMapper;
   
   @Resource
   private PushCouponRecordService pushCouponRecordService;
   @Resource
   private UserSystemCouponService userSystemCouponService;
   
   @Override
   public int deleteByPrimaryKey(Long id) {
@@ -75,13 +70,13 @@
   @Override
   public List<PushCoupon> listQuery(long start, int count, String key, Integer state) {
      return pushCouponMapper.listQuery(start, count, key, state);
    public List<PushCoupon> listQuery(long start, int count, String key, Integer state, SystemEnum system) {
        return pushCouponMapper.listQuery(start, count, key, state, system);
   }
   @Override
   public long countQuery(String key, Integer state) {
      return pushCouponMapper.countQuery(key, state);
    public long countQuery(String key, Integer state, SystemEnum system) {
        return pushCouponMapper.countQuery(key, state, system);
   }
   @Override
@@ -210,13 +205,13 @@
      
      if (listuid == null) {
         // 全推
         pushService.pushWelfareCenter(null, title, content, listIOS, listAndroid);
            pushService.pushWelfareCenter(null, title, content, listIOS, listAndroid, pushCoupon.getSystem());
         
      } else {
         // 指定用户推送
         for (String str_uid: listuid) {
            if (str_uid != null && str_uid.trim().length() > 0) {
               pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listIOS, listAndroid);
                    pushService.pushWelfareCenter(Long.parseLong(str_uid), title, content, listIOS, listAndroid, pushCoupon.getSystem());
            }
         }
      }
@@ -251,8 +246,8 @@
   }
   @Override
   public List<PushCoupon> listQueryEffective() {
      return pushCouponMapper.listQueryEffective();
    public List<PushCoupon> listQueryEffective(SystemEnum system) {
        return pushCouponMapper.listQueryEffective(system);
   }
   
}