| | |
| | | package com.yeshi.fanli.service.impl.push;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.push.PushRecordMapper;
|
| | | import com.yeshi.fanli.entity.xinge.PushRecord;
|
| | | import com.yeshi.fanli.service.inter.push.PushRecordService;
|
| | | @Service
|
| | | public class PushRecordServiceImpl implements PushRecordService {
|
| | | |
| | | @Resource
|
| | | private PushRecordMapper pushRecordMapper;
|
| | |
|
| | |
|
| | | public List<PushRecord> getPushRecordList(long start, int pageSize,String key, int type) {
|
| | | return pushRecordMapper.listQuery(start, pageSize, key, type);
|
| | | }
|
| | |
|
| | | public Long getCount(String title, int type) {
|
| | | return pushRecordMapper.countQuery(title, type);
|
| | | }
|
| | |
|
| | | public void increaseByAndroid(String pushId) {
|
| | | PushRecord pushRecord = pushRecordMapper.getByAndroidPushId(pushId);
|
| | | if (pushRecord != null) {
|
| | | Long count = pushRecord.getCount();
|
| | | if(count == null) {
|
| | | pushRecord.setCount(1L);
|
| | | } else {
|
| | | pushRecord.setCount(count + 1);
|
| | | }
|
| | | pushRecordMapper.updateByPrimaryKeySelective(pushRecord);
|
| | | }
|
| | | }
|
| | |
|
| | | public void increaseByIOS(String pushId) {
|
| | | PushRecord pushRecord = pushRecordMapper.getByIosPushId(pushId);
|
| | | if (pushRecord != null) {
|
| | | Long count = pushRecord.getCount();
|
| | | if(count == null) {
|
| | | pushRecord.setCount(1L);
|
| | | } else {
|
| | | pushRecord.setCount(count + 1);
|
| | | }
|
| | | pushRecordMapper.updateByPrimaryKeySelective(pushRecord);
|
| | | }
|
| | | }
|
| | | }
|
| | | package com.yeshi.fanli.service.impl.push; |
| | | |
| | | import java.util.List; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.push.PushRecordMapper; |
| | | import com.yeshi.fanli.entity.xinge.PushRecord; |
| | | import com.yeshi.fanli.service.inter.push.PushRecordService; |
| | | @Service |
| | | public class PushRecordServiceImpl implements PushRecordService { |
| | | |
| | | @Resource |
| | | private PushRecordMapper pushRecordMapper; |
| | | |
| | | |
| | | public List<PushRecord> getPushRecordList(long start, int pageSize,String key, int type) { |
| | | return pushRecordMapper.listQuery(start, pageSize, key, type); |
| | | } |
| | | |
| | | public Long getCount(String title, int type) { |
| | | return pushRecordMapper.countQuery(title, type); |
| | | } |
| | | |
| | | public void increaseByAndroid(String pushId) { |
| | | PushRecord pushRecord = pushRecordMapper.getByAndroidPushId(pushId); |
| | | if (pushRecord != null) { |
| | | Long count = pushRecord.getCount(); |
| | | if(count == null) { |
| | | pushRecord.setCount(1L); |
| | | } else { |
| | | pushRecord.setCount(count + 1); |
| | | } |
| | | pushRecordMapper.updateByPrimaryKeySelective(pushRecord); |
| | | } |
| | | } |
| | | |
| | | public void increaseByIOS(String pushId) { |
| | | PushRecord pushRecord = pushRecordMapper.getByIosPushId(pushId); |
| | | if (pushRecord != null) { |
| | | Long count = pushRecord.getCount(); |
| | | if(count == null) { |
| | | pushRecord.setCount(1L); |
| | | } else { |
| | | pushRecord.setCount(count + 1); |
| | | } |
| | | pushRecordMapper.updateByPrimaryKeySelective(pushRecord); |
| | | } |
| | | } |
| | | } |