Commit fc6a2d8f by 徐高华

企微托管

parent 0da3d7dc
...@@ -17,8 +17,11 @@ import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO; ...@@ -17,8 +17,11 @@ import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.StoreClerkDTO; import com.gic.haoban.manage.api.dto.StoreClerkDTO;
import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum; import com.gic.haoban.manage.api.enums.NoticeMessageTypeEnum;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
import com.gic.haoban.manage.api.service.notify.NoticeMessageApiService;
import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil; import com.gic.haoban.manage.api.util.notify.NoticeMessageUtil;
import com.gic.haoban.manage.service.dao.mapper.OpenStaffMapper; import com.gic.haoban.manage.service.dao.mapper.OpenStaffMapper;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.entity.TabOpenStaff; import com.gic.haoban.manage.service.entity.TabOpenStaff;
import com.gic.haoban.manage.service.service.OpenStaffService; import com.gic.haoban.manage.service.service.OpenStaffService;
import com.gic.haoban.manage.service.service.StaffClerkRelationService; import com.gic.haoban.manage.service.service.StaffClerkRelationService;
...@@ -49,6 +52,10 @@ public class OpenStaffServiceImpl implements OpenStaffService { ...@@ -49,6 +52,10 @@ public class OpenStaffServiceImpl implements OpenStaffService {
private StoreService storeService; private StoreService storeService;
@Autowired @Autowired
private ClerkService clerkService ; private ClerkService clerkService ;
@Autowired
private NoticeMessageApiService noticeMessageApiService ;
@Autowired
private StaffMapper staffMapper ;
@Override @Override
public TabOpenStaff save(TabOpenStaff tab) { public TabOpenStaff save(TabOpenStaff tab) {
...@@ -96,11 +103,13 @@ public class OpenStaffServiceImpl implements OpenStaffService { ...@@ -96,11 +103,13 @@ public class OpenStaffServiceImpl implements OpenStaffService {
// 发送通知 // 发送通知
if(StringUtils.isNotBlank(noticeReason)) { if(StringUtils.isNotBlank(noticeReason)) {
log.info("发送退出登录通知,staffId={}",openStaff.getStaffId()); log.info("发送退出登录通知,staffId={}",openStaff.getStaffId());
TabHaobanStaff staff = this.staffMapper.selectByPrimaryKey(openStaff.getStaffId()) ;
this.noticeMessageApiService.sendMessageForOpenStaff(openStaff.getEnterpriseId(),staff.getStaffName() , noticeReason);
// 发送通知 // 发送通知
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
map.put("reason", noticeReason); map.put("reason", noticeReason);
int messageType = NoticeMessageTypeEnum.HAOBAN_OPEN_STAFF_LOGOUT.getType(); int messageType = NoticeMessageTypeEnum.HAOBAN_OPEN_STAFF_LOGOUT.getType();
NoticeMessageUtil.sendNoticeMessageByStaff(openStaff.getEnterpriseId(),openStaff.getStaffId(),null,messageType,null,map,null); NoticeMessageUtil.sendNoticeMessageByStaff(openStaff.getEnterpriseId(),openStaff.getStaffId(),"-1",messageType,null,map,null);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment