| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.doumee.biz.system.SystemDictDataBiz; |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.core.haikang.model.HKConstants; |
| | |
| | | import com.doumee.core.haikang.model.param.respose.*; |
| | | import com.doumee.core.haikang.service.HKService; |
| | | import com.doumee.core.utils.Constants; |
| | | import com.doumee.core.utils.DESUtil; |
| | | import com.doumee.core.utils.DateUtil; |
| | | import com.doumee.core.utils.ImageBase64Util; |
| | | import com.doumee.core.wx.wxPlat.WxPlatNotice; |
| | | import com.doumee.dao.business.DeviceRoleMapper; |
| | | import com.doumee.dao.business.MemberMapper; |
| | | import com.doumee.dao.business.RetentionMapper; |
| | | import com.doumee.dao.business.join.VisitsJoinMapper; |
| | | import com.doumee.dao.business.model.DeviceRole; |
| | | import com.doumee.dao.business.dao.MemberMapper; |
| | | import com.doumee.dao.business.model.Member; |
| | | import com.doumee.dao.business.model.Retention; |
| | | import com.doumee.dao.business.model.Visits; |
| | | import com.doumee.dao.system.SystemUserMapper; |
| | | import com.doumee.dao.system.join.NoticesJoinMapper; |
| | | import com.doumee.dao.system.model.Notices; |
| | | import com.doumee.dao.system.model.SystemUser; |
| | | import com.doumee.service.system.NoticesService; |
| | | import com.github.yulichang.wrapper.MPJLambdaWrapper; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | Constants.DEALING_HK_NOTICE_LIST =true; |
| | | try { |
| | | List<String> users = new ArrayList<>(); |
| | | users.add(username); |
| | | |
| | | List<Integer> userIds = new ArrayList<>(); |
| | | List<Member > userList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .in(Member::getPhone,users) |
| | | .eq(Member::getType,Constants.TWO) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)); |
| | | Member tu= getFromUserList(username,userList); |
| | | if(tu!=null){ |
| | | userIds.add(tu.getId()); |
| | | }else{ |
| | | throw new BusinessException(ResponseStatus.SERVER_ERROR.getCode(), "对不起,无效账号~"); |
| | | } |
| | | if(userIds.size()>0){ |
| | | //清空海康全部的代办数据 |
| | | noticesJoinMapper.delete(new UpdateWrapper<Notices>().lambda() |
| | | .eq(Notices::getType, Constants.noticesObjectType.hknotice) |
| | | .in(Notices::getUserId, userIds)); |
| | | } |
| | | Date date = new Date(); |
| | | List<GetTodoListResponse> allHkList = new ArrayList<>(); |
| | | boolean hasNext = true; |
| | |
| | | } |
| | | curPage++; |
| | | } |
| | | if(allHkList!=null && allHkList.size()>0){ |
| | | List<Notices> list = new ArrayList<>(); |
| | | List<String> users = new ArrayList<>(); |
| | | for(GetTodoListResponse data :allHkList){ |
| | | users.add(data.getUserId()); |
| | | } |
| | | List<Integer> userIds = new ArrayList<>(); |
| | | List<Member > userList = memberMapper.selectList(new QueryWrapper<Member>().lambda() |
| | | .in(Member::getPhone,users) |
| | | .eq(Member::getIsdeleted,Constants.ZERO)); |
| | | |
| | | |
| | | if(allHkList!=null && allHkList.size()>0){ |
| | | List<Notices> list = new ArrayList<>(); |
| | | for(GetTodoListResponse data :allHkList){ |
| | | Member u = getFromUserList(data.getUserId(),userList); |
| | | if(u==null){ |
| | |
| | | notices.setType(Constants.noticesObjectType.hknotice); |
| | | list.add(notices); |
| | | } |
| | | if(list.size()>0){ |
| | | //清空海康全部的代办数据 |
| | | noticesJoinMapper.delete(new UpdateWrapper<Notices>().lambda() |
| | | .eq(Notices::getType, Constants.noticesObjectType.hknotice) |
| | | .in(Notices::getUserId, userIds)); |
| | | if(list.size()>0){ |
| | | noticesJoinMapper.insert(list);//批量插入记录 |
| | | } |
| | | } |