|
@@ -11,7 +11,6 @@ import com.txz.cif.core.*;
|
|
|
import com.txz.cif.dubbo.client.OperatingConfigDubboServiceClient;
|
|
|
import com.txz.cif.enums.MessageBizTypeEnum;
|
|
|
import com.txz.cif.model.*;
|
|
|
-import com.txz.cif.param.MessageParam;
|
|
|
import com.txz.cif.dao.UserMapper;
|
|
|
import com.txz.cif.service.*;
|
|
|
import com.txz.cif.web.para.UserAddParam;
|
|
@@ -177,32 +176,32 @@ public class UserServiceImpl extends AbstractService<User> implements UserServic
|
|
|
return user.getId();
|
|
|
}
|
|
|
|
|
|
- @Override
|
|
|
- public boolean sendMsg(MessageParam param) {
|
|
|
- if (param == null){
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (param.getUserId() == null){
|
|
|
- log.info("[发送消息]失败,未传用户id");
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (param.getBizType() == null){
|
|
|
- log.info("[发送消息]失败,业务类型为空");
|
|
|
- return false;
|
|
|
- }
|
|
|
- User user = findById(param.getUserId());
|
|
|
- if (user == null){
|
|
|
- log.info("[发送消息]失败,用户未找到");
|
|
|
- return false;
|
|
|
- }
|
|
|
- if (user.getLastLoginTime()!= null && DateUtil.between(user.getLastLoginTime(),DateUtil.date(), DateUnit.MINUTE)<=30
|
|
|
- && !MessageBizTypeEnum.getActiveByKey(param.getBizType())){
|
|
|
- log.info("[发送消息]未发送,用户处于活跃状态,不发送消息");
|
|
|
- return true;
|
|
|
- }
|
|
|
-
|
|
|
- return false;
|
|
|
- }
|
|
|
+// @Override
|
|
|
+// public boolean sendMsg(MessageParam param) {
|
|
|
+// if (param == null){
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// if (param.getUserId() == null){
|
|
|
+// log.info("[发送消息]失败,未传用户id");
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// if (param.getBizType() == null){
|
|
|
+// log.info("[发送消息]失败,业务类型为空");
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// User user = findById(param.getUserId());
|
|
|
+// if (user == null){
|
|
|
+// log.info("[发送消息]失败,用户未找到");
|
|
|
+// return false;
|
|
|
+// }
|
|
|
+// if (user.getLastLoginTime()!= null && DateUtil.between(user.getLastLoginTime(),DateUtil.date(), DateUnit.MINUTE)<=30
|
|
|
+// && !MessageBizTypeEnum.getActiveByKey(param.getBizType())){
|
|
|
+// log.info("[发送消息]未发送,用户处于活跃状态,不发送消息");
|
|
|
+// return true;
|
|
|
+// }
|
|
|
+//
|
|
|
+// return false;
|
|
|
+// }
|
|
|
|
|
|
private boolean checkSend(Integer bizType, Integer message, int type) {
|
|
|
boolean isSend = false;
|