Commit bfa986b9 by 墨竹

fix:多好办对应1gic,督导绑定修改

parent 64201457
...@@ -72,7 +72,7 @@ public interface StaffClerkRelationApiService { ...@@ -72,7 +72,7 @@ public interface StaffClerkRelationApiService {
List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkIds); List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkIds);
List<StaffClerkRelationDTO> listByClerkIdsEnterpriseId(List<String> clerkIds, String enterpriseId); List<StaffClerkRelationDTO> listByClerkIdsWxEnterpriseId(List<String> clerkIds, String wxEnterpriseId);
/** /**
* 导购列表 * 导购列表
...@@ -104,7 +104,7 @@ public interface StaffClerkRelationApiService { ...@@ -104,7 +104,7 @@ public interface StaffClerkRelationApiService {
/** /**
* @param enterpriseId * @param enterpriseId
* @param wxUserId * @param staffid
* @return * @return
*/ */
List<StaffClerkRelationDTO> listByEnterpriseIdAndStaffid(String enterpriseId, String staffid); List<StaffClerkRelationDTO> listByEnterpriseIdAndStaffid(String enterpriseId, String staffid);
......
...@@ -63,7 +63,7 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -63,7 +63,7 @@ public interface TabHaobanStaffClerkRelationMapper {
* @date 2022-01-13 11:36:11 * @date 2022-01-13 11:36:11
*/ */
List<StaffClerkRelationDTO> listByClerkIds(@Param("clerkIds") List<String> clerkIds, List<StaffClerkRelationDTO> listByClerkIds(@Param("clerkIds") List<String> clerkIds,
@Param("enterpriseId") String enterpriseId); @Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanStaffClerkRelation> listByStoreId(@Param("storeId") String storeId); List<TabHaobanStaffClerkRelation> listByStoreId(@Param("storeId") String storeId);
...@@ -76,7 +76,7 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -76,7 +76,7 @@ public interface TabHaobanStaffClerkRelationMapper {
TabHaobanStaffClerkRelation getOneBindStoreId(@Param("staffId") String staffId, @Param("storeId") String storeId); TabHaobanStaffClerkRelation getOneBindStoreId(@Param("staffId") String staffId, @Param("storeId") String storeId);
TabHaobanStaffClerkRelation getByClerkId(@Param("clerkId") String clerkId, @Param("enterpriseId") String enterpriseId); TabHaobanStaffClerkRelation getByClerkId(@Param("clerkId") String clerkId, @Param("wxEnterpriseId") String wxEnterpriseId);
int delByPrimaryKey(@Param("staffClerkRelationId") String staffClerkRelationId); int delByPrimaryKey(@Param("staffClerkRelationId") String staffClerkRelationId);
......
...@@ -60,7 +60,7 @@ public interface StaffClerkRelationService { ...@@ -60,7 +60,7 @@ public interface StaffClerkRelationService {
StaffClerkRelationDTO getByClerkId(String clerkId); StaffClerkRelationDTO getByClerkId(String clerkId);
StaffClerkRelationDTO getByClerkId(String clerkId,String enterpriseId); StaffClerkRelationDTO getByClerkId(String clerkId,String wxEnterpriseId);
List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkList); List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkList);
......
...@@ -249,8 +249,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -249,8 +249,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
@Override @Override
public StaffClerkRelationDTO getByClerkId(String clerkId, String enterpriseId) { public StaffClerkRelationDTO getByClerkId(String clerkId, String wxEnterpriseId) {
TabHaobanStaffClerkRelation staffClerkRelation = mapper.getByClerkId(clerkId, enterpriseId); TabHaobanStaffClerkRelation staffClerkRelation = mapper.getByClerkId(clerkId, wxEnterpriseId);
return EntityUtil.changeEntityNew(StaffClerkRelationDTO.class,staffClerkRelation); return EntityUtil.changeEntityNew(StaffClerkRelationDTO.class,staffClerkRelation);
} }
......
...@@ -220,11 +220,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -220,11 +220,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} }
@Override @Override
public List<StaffClerkRelationDTO> listByClerkIdsEnterpriseId(List<String> clerkIds, String enterpriseId) { public List<StaffClerkRelationDTO> listByClerkIdsWxEnterpriseId(List<String> clerkIds, String wxEnterpriseId) {
if (CollectionUtil.isEmpty(clerkIds)) { if (CollectionUtil.isEmpty(clerkIds)) {
return Collections.emptyList(); return Collections.emptyList();
} }
return tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds, enterpriseId); return tabHaobanStaffClerkRelationMapper.listByClerkIds(clerkIds, wxEnterpriseId);
} }
@Override @Override
...@@ -299,13 +299,14 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -299,13 +299,14 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
private ServiceResponse getManageFlagBind(StaffClerkRelationDTO staffClerkRelation) { private ServiceResponse getManageFlagBind(StaffClerkRelationDTO staffClerkRelation) {
String enterpriseId = staffClerkRelation.getEnterpriseId(); String enterpriseId = staffClerkRelation.getEnterpriseId();
String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId();
String clerkId = staffClerkRelation.getClerkId(); String clerkId = staffClerkRelation.getClerkId();
String staffId = staffClerkRelation.getStaffId(); String staffId = staffClerkRelation.getStaffId();
boolean bindFlag = staffClerkRelationService.getBindByStaffIdAndEnterpriseId(enterpriseId, staffId); boolean bindFlag = staffClerkRelationService.getBindByStaffIdAndEnterpriseId(enterpriseId, staffId);
if (bindFlag) { if (bindFlag) {
return ServiceResponse.failure("3", "该员工已经绑定,不允许绑定区经/督导"); return ServiceResponse.failure("3", "该员工已经绑定,不允许绑定区经/督导");
} }
StaffClerkRelationDTO staffClerkRelationDTO = staffClerkRelationService.getByClerkId(clerkId, enterpriseId); StaffClerkRelationDTO staffClerkRelationDTO = staffClerkRelationService.getByClerkId(clerkId, wxEnterpriseId);
if (staffClerkRelationDTO != null) { if (staffClerkRelationDTO != null) {
return ServiceResponse.failure("3", "该导购已经被绑定,不允许绑定"); return ServiceResponse.failure("3", "该导购已经被绑定,不允许绑定");
} }
......
...@@ -135,8 +135,8 @@ ...@@ -135,8 +135,8 @@
<foreach collection="clerkIds" item="id" index="index" open="(" close=")" separator=","> <foreach collection="clerkIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR} #{id,jdbcType=VARCHAR}
</foreach> </foreach>
<if test="enterpriseId != null and enterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and a.enterprise_id = #{enterpriseId} and a.wx_enterprise_id = #{wxEnterpriseId}
</if> </if>
</select> </select>
...@@ -186,8 +186,8 @@ ...@@ -186,8 +186,8 @@
from tab_haoban_staff_clerk_relation from tab_haoban_staff_clerk_relation
where clerk_id = #{clerkId,jdbcType=VARCHAR} where clerk_id = #{clerkId,jdbcType=VARCHAR}
and status_flag=1 and status_flag=1
<if test="enterpriseId != null and enterpriseId != ''"> <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and enterprise_id = #{enterpriseId} and wx_enterprise_id = #{wxEnterpriseId}
</if> </if>
order by create_time desc limit 1 order by create_time desc limit 1
</select> </select>
......
...@@ -327,7 +327,7 @@ public class StaffController extends WebBaseController { ...@@ -327,7 +327,7 @@ public class StaffController extends WebBaseController {
List<String> clerkIds = retList.stream().map(ClerkInfoVo::getClerkId).collect(Collectors.toList()); List<String> clerkIds = retList.stream().map(ClerkInfoVo::getClerkId).collect(Collectors.toList());
List<StaffClerkRelationDTO> dtos = new ArrayList<>(); List<StaffClerkRelationDTO> dtos = new ArrayList<>();
if (manageFlag != null && manageFlag == 1) { if (manageFlag != null && manageFlag == 1) {
dtos = staffClerkRelationApiService.listByClerkIdsEnterpriseId(clerkIds, enterpriseId); dtos = staffClerkRelationApiService.listByClerkIdsWxEnterpriseId(clerkIds, wxEnterpriseId);
} else { } else {
dtos = staffClerkRelationApiService.listByClerkIds(clerkIds); dtos = staffClerkRelationApiService.listByClerkIds(clerkIds);
} }
......
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