Commit 0b27e5f4 by huangZW

bug

parent 182cb903
...@@ -48,6 +48,8 @@ public interface StaffDepartmentRelatedMapper { ...@@ -48,6 +48,8 @@ public interface StaffDepartmentRelatedMapper {
List<TabHaobanStaffDepartmentRelated> listByClerkCode(@Param("clerkCode")String clerkCode); List<TabHaobanStaffDepartmentRelated> listByClerkCode(@Param("clerkCode")String clerkCode);
List<TabHaobanStaffDepartmentRelated> listByWxEnterpriseIdAndClerkCode(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("clerkCode")String clerkCode);
List<TabHaobanStaffDepartmentRelated> listStaffDepartmentByStaffIds(@Param("staffIds")List<String> staffIds); List<TabHaobanStaffDepartmentRelated> listStaffDepartmentByStaffIds(@Param("staffIds")List<String> staffIds);
} }
\ No newline at end of file
...@@ -29,9 +29,11 @@ import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService; ...@@ -29,9 +29,11 @@ import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService;
import com.gic.haoban.manage.service.config.Config; import com.gic.haoban.manage.service.config.Config;
import com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper; 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.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.TabHaobanApplication;
import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated; import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise; 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.ApplicationService;
import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService; import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService;
import com.gic.wechat.api.dto.qywx.ItemDTO; import com.gic.wechat.api.dto.qywx.ItemDTO;
...@@ -54,7 +56,8 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela ...@@ -54,7 +56,8 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
private QywxSuiteApiService qywxSuiteApiService; private QywxSuiteApiService qywxSuiteApiService;
@Autowired @Autowired
private WxEnterpriseMapper wxEnterpriseMapper; private WxEnterpriseMapper wxEnterpriseMapper;
@Autowired
private WxEnterpriseRelatedMapper wxEnterpriseRelatedMapper;
@Autowired @Autowired
private Config config; private Config config;
...@@ -137,12 +140,18 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela ...@@ -137,12 +140,18 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
if(StringUtil.isEmpty(clerkCode) ){ if(StringUtil.isEmpty(clerkCode) ){
return map; return map;
} }
List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedMapper.listByClerkCode(clerkCode); String enterpriseId = clerkDTO.getEnterpriseId();
TabHaobanWxEnterpriseRelated relate = wxEnterpriseRelatedMapper.findOneByEnterpriseId(enterpriseId);
if(relate == null){
return map;
}
String wxEnterpriseId = relate.getWxEnterpriseId();
List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedMapper.listByWxEnterpriseIdAndClerkCode(wxEnterpriseId, clerkCode);
if(CollectionUtil.isEmpty(list)){ if(CollectionUtil.isEmpty(list)){
return map; return map;
} }
String wxUserId = list.get(0).getWxUserId(); String wxUserId = list.get(0).getWxUserId();
String wxEnterpriseId = list.get(0).getWxEnterpriseId();
TabHaobanWxEnterprise tabHaobanWxEnterprise = wxEnterpriseMapper.selectByPrimaryKey(wxEnterpriseId); TabHaobanWxEnterprise tabHaobanWxEnterprise = wxEnterpriseMapper.selectByPrimaryKey(wxEnterpriseId);
map.put("wxUserId", wxUserId); map.put("wxUserId", wxUserId);
......
...@@ -249,6 +249,14 @@ ...@@ -249,6 +249,14 @@
and status_flag = 1 and status_flag = 1
</select> </select>
<select id="listByWxEnterpriseIdAndClerkCode" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_staff_department_related
where clerk_code = #{clerkCode}
and wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1
</select>
<select id="countByDepartmentId" resultType="java.lang.Integer" parameterType="java.lang.String" > <select id="countByDepartmentId" resultType="java.lang.Integer" parameterType="java.lang.String" >
select select
......
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