zoujiajian 2 anni fa
parent
commit
dc01ced3db

+ 7 - 2
netflix-service/src/main/java/com/cyksj/service/user/impl/UserSysMsgNotifyServiceImpl.java

@@ -1,5 +1,6 @@
 package com.cyksj.service.user.impl;
 
+import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.cyksj.common.constant.Constant;
 import com.cyksj.mapper.UserSysMsgNotifyMapper;
@@ -40,7 +41,9 @@ public class UserSysMsgNotifyServiceImpl extends ServiceImpl<UserSysMsgNotifyMap
 			userSet.add(e.getUserId());
 			return true;
 		}).collect(Collectors.toList());
-		userSysMsgNotifyMapper.recordUserAccountUpdateSysMsg(goodsId, skuId, collect, account, sysMsg);
+		if (CollUtil.isNotEmpty(collect)) {
+			userSysMsgNotifyMapper.recordUserAccountUpdateSysMsg(goodsId, skuId, collect, account, sysMsg);
+		}
 	}
 
 	@Override
@@ -54,6 +57,8 @@ public class UserSysMsgNotifyServiceImpl extends ServiceImpl<UserSysMsgNotifyMap
 			userSet.add(e.getUserId());
 			return true;
 		}).collect(Collectors.toList());
-		userSysMsgNotifyMapper.recordUserAccountSetSysMsg(goodsId, skuId, collect, account, sysMsg);
+		if (CollUtil.isNotEmpty(collect)) {
+			userSysMsgNotifyMapper.recordUserAccountSetSysMsg(goodsId, skuId, collect, account, sysMsg);
+		}
 	}
 }