Commit ef759161 by huangZW

111

parent 6b3dbe6b
......@@ -31,10 +31,12 @@ import com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper;
import com.gic.haoban.manage.service.entity.TabHaobanApplication;
import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
import com.gic.haoban.manage.service.service.ApplicationService;
import com.gic.haoban.manage.service.service.DepartmentService;
import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService;
import com.gic.wechat.api.dto.qywx.ItemDTO;
import com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO;
......@@ -59,6 +61,8 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
@Autowired
private WxEnterpriseRelatedMapper wxEnterpriseRelatedMapper;
@Autowired
private DepartmentService departmentService;
@Autowired
private Config config;
@Override
......@@ -146,12 +150,18 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
return map;
}
String wxEnterpriseId = relate.getWxEnterpriseId();
String storeId = clerkDTO.getStoreId();
TabHaobanDepartment tabDepart = departmentService.selectByRelatedId(storeId);
if(tabDepart == null){
return map;
}
String departmentId = tabDepart.getDepartmentId();
List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedMapper.listByWxEnterpriseIdAndClerkCode(wxEnterpriseId, clerkCode);
if(CollectionUtil.isEmpty(list)){
TabHaobanStaffDepartmentRelated tabHaobanStaffDepartmentRelated = staffDepartmentRelatedMapper.getDepartmentIdAndCode(departmentId, clerkCode);
if(tabHaobanStaffDepartmentRelated == null){
return map;
}
String wxUserId = list.get(0).getWxUserId();
String wxUserId = tabHaobanStaffDepartmentRelated.getWxUserId();
TabHaobanWxEnterprise tabHaobanWxEnterprise = wxEnterpriseMapper.selectByPrimaryKey(wxEnterpriseId);
map.put("wxUserId", wxUserId);
......
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