|
|
@@ -43,24 +43,21 @@ public class GxtMobileNotifyController extends BaseController
|
|
|
boolean isSend = false;
|
|
|
boolean isSendBadge = true;
|
|
|
int taskNum = 0;
|
|
|
- if(!orderScoreInfos.isEmpty()){
|
|
|
- taskNum = orderScoreInfos.size();
|
|
|
- Object taskNumStr = redisCache.lGet(CacheConstants.NOTIFY_STORAGE_KEY, id);
|
|
|
- if(taskNumStr!=null){
|
|
|
- int prevTaskNum = Integer.parseInt(taskNumStr.toString());
|
|
|
- if(taskNum < prevTaskNum){
|
|
|
- isSend = true;
|
|
|
- }
|
|
|
- if(taskNum == prevTaskNum){
|
|
|
- isSendBadge = false;
|
|
|
- }
|
|
|
- }else{
|
|
|
+ Object taskNumStr = redisCache.lGet(CacheConstants.NOTIFY_STORAGE_KEY, id);
|
|
|
+ taskNum = orderScoreInfos.size();
|
|
|
+ if(taskNumStr!=null){
|
|
|
+ int prevTaskNum = Integer.parseInt(taskNumStr.toString());
|
|
|
+ if(taskNum != prevTaskNum){
|
|
|
isSend = true;
|
|
|
+ }else{
|
|
|
+ isSendBadge = false;
|
|
|
}
|
|
|
- redisCache.lPush(CacheConstants.NOTIFY_STORAGE_KEY,id, taskNum+"");
|
|
|
+ }else{
|
|
|
+ isSend = true;
|
|
|
}
|
|
|
+ redisCache.lPush(CacheConstants.NOTIFY_STORAGE_KEY,id, taskNum+"");
|
|
|
GxtNotifyMessage notifyMessage = new GxtNotifyMessage();
|
|
|
- if(isSend) {
|
|
|
+ if(isSend && taskNum > 0) {
|
|
|
notifyMessage.setTitle(DateUtils.getHourTime() + "收到消息");
|
|
|
notifyMessage.setDesc("您有" + taskNum + "个任务待处理");
|
|
|
}
|