Commit 5cdbb856 by qwmqiuwenmin

fix

parent bcfd11e1
......@@ -43,4 +43,6 @@ public interface MemberUnionidRelatedMapper {
@Param("enterpriseId")String enterpriseId);
List<MemberUnionidRelated> getByWxUserIdListAndWxEnterpriseId(@Param("userIdList")List<String> userIdList, @Param("wxEnterpriseId")String wxEnterpriseId);
void cleanStaffRelated(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("staffIds")List<String> staffIds);
}
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated;
......@@ -22,4 +24,6 @@ public interface TabHaobanExternalClerkRelatedMapper {
void delByUserIdAndExternalUserId(TabHaobanExternalClerkRelated record);
void delByClerkIdAndStaffId(@Param("clerkId")String clerkId, @Param("staffId")String staffId);
void cleanStaffRelated(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("staffIds")List<String> staffIds);
}
\ No newline at end of file
package com.gic.haoban.manage.service.service;
import java.util.List;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
import com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated;
......@@ -11,4 +13,6 @@ public interface ExternalClerkRelatedService {
void delByClerkIdAndStaffId(String clerkId, String staffId);
void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds);
}
......@@ -25,4 +25,6 @@ public interface MemberUnionRelatedService {
com.github.pagehelper.Page<MemberUnionidRelated> pageMemberUnionByParams(List<String> userIdList, List<String> sendMemberIds,
String enterpriseId);
void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds);
}
package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -45,4 +46,12 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
mapper.delByClerkIdAndStaffId(clerkId,staffId);
}
@Override
public void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds) {
if(staffIds != null && !staffIds.isEmpty()){
mapper.cleanStaffRelated(wxEnterpriseId,staffIds);
}
}
}
......@@ -70,4 +70,12 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
String enterpriseId) {
return mapper.pageMemberUnionByParams(userIdList,sendMemberIds,enterpriseId);
}
@Override
public void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds) {
if(staffIds == null || staffIds.isEmpty()){
return;
}
mapper.cleanStaffRelated(wxEnterpriseId,staffIds);
}
}
......@@ -10,7 +10,7 @@ import com.gic.commons.util.ToolUtil;
import com.gic.haoban.manage.api.enums.BindTypeEnum;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
import com.gic.haoban.manage.service.service.ExternalClerkRelatedService;
import com.gic.haoban.manage.service.service.StaffClerkBindLogService;
import javafx.scene.control.Tab;
......@@ -37,6 +37,9 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Autowired
private StaffClerkBindLogService staffClerkBindLogService;
@Autowired
private ExternalClerkRelatedService externalClerkRelatedService;
@Override
public List<StaffClerkRelationDTO> listBindCode(String enterpriseId, Set<String> clerkCodeList) {
......@@ -121,6 +124,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
});
int ret = mapper.cleanStaffDepart(wxEnterpriseId, staffIds);
externalClerkRelatedService.cleanStaffRelated(wxEnterpriseId,staffIds);
return ret;
}
......
......@@ -13,6 +13,7 @@ import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.service.dao.mapper.StaffMapper;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.service.MemberUnionRelatedService;
import com.gic.haoban.manage.service.service.StaffService;
import com.github.pagehelper.Page;
......@@ -21,6 +22,9 @@ public class StaffServiceImpl implements StaffService {
@Autowired
StaffMapper mapper;
@Autowired
private MemberUnionRelatedService memberUnionRelatedService;
@Override
public TabHaobanStaff selectById(String id) {
......@@ -85,6 +89,7 @@ public class StaffServiceImpl implements StaffService {
@Override
public int cleanStaff(String wxEnterpriseId, List<String> staffIds) {
memberUnionRelatedService.cleanStaffRelated(wxEnterpriseId,staffIds);
return mapper.cleanStaff(wxEnterpriseId,staffIds);
}
......
......@@ -290,4 +290,16 @@
#{wxUserId, jdbcType=CHAR}
</foreach>
</select>
<update id="cleanStaffRelated" parameterType="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
update tab_haoban_member_unionid_related
set status_flag = 0,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id in #{wxUserId}
<foreach collection="staffIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR}
</foreach>
and status_flag = 1
</update>
</mapper>
\ No newline at end of file
......@@ -248,4 +248,17 @@
and staff_id = #{staffId}
and status_flag = 1
</update>
<update id="cleanStaffRelated" parameterType="com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated" >
update tab_haoban_external_clerk_related
set
status_flag = 2,
update_time = now()
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and staff_id IN
<foreach collection="staffIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR}
</foreach>
and status_flag = 1
</update>
</mapper>
\ No newline at end of file
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