| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | 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) {
|
| | |
| | |
|
| | |
|
| | | @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
|
| | |
| | |
|
| | | 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());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public List<PushCoupon> listQueryEffective() {
|
| | | return pushCouponMapper.listQueryEffective();
|
| | | public List<PushCoupon> listQueryEffective(SystemEnum system) {
|
| | | return pushCouponMapper.listQueryEffective(system);
|
| | | }
|
| | |
|
| | | }
|