Commit 9265a16c by 徐高华

删除多余接口

parent 18caf22e
...@@ -73,16 +73,10 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -73,16 +73,10 @@ public interface TabHaobanStaffClerkRelationMapper {
*/ */
int cleanStaffDepart(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds); int cleanStaffDepart(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("staffIds") List<String> staffIds);
TabHaobanStaffClerkRelation getOneBindCodeNoStatus(@Param("enterpriseId") String enterpriseId, @Param("clerkCode") String clerkCode);
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); TabHaobanStaffClerkRelation getByClerkId(@Param("clerkId") String clerkId);
StaffClerkRelationDTO getByClerkIdForWxUserId(@Param("clerkId") String clerkId);
TabHaobanStaffClerkRelation getByClerkIdNoStatus(@Param("clerkId") String clerkId);
int delByPrimaryKey(@Param("staffClerkRelationId") String staffClerkRelationId); int delByPrimaryKey(@Param("staffClerkRelationId") String staffClerkRelationId);
void delByClerkId(@Param("clerkId") String clerkId); void delByClerkId(@Param("clerkId") String clerkId);
......
...@@ -14,14 +14,6 @@ public interface StaffClerkRelationService { ...@@ -14,14 +14,6 @@ public interface StaffClerkRelationService {
List<StaffClerkRelationDTO> listBindCodeByStaffId(List<String> enterpriseIdList, String staffId); List<StaffClerkRelationDTO> listBindCodeByStaffId(List<String> enterpriseIdList, String staffId);
/**
* 解绑-删除绑定(导购级别)
*
* @param clerkId
* @return
*/
boolean delBind(String clerkId, String optStaffId, int channelCode);
boolean delBind(String clerkId, String optStaffId, int channelCode , String newClerkId); boolean delBind(String clerkId, String optStaffId, int channelCode , String newClerkId);
/** /**
...@@ -64,16 +56,10 @@ public interface StaffClerkRelationService { ...@@ -64,16 +56,10 @@ public interface StaffClerkRelationService {
int cleanStaffClerk(String wxEnterpriseId, List<String> staffIds); int cleanStaffClerk(String wxEnterpriseId, List<String> staffIds);
StaffClerkRelationDTO getOneBindCodeNoStatus(String enterpriseId, String clerkCode);
StaffClerkRelationDTO getOneBindByStoreId(String staffId, String storeId); StaffClerkRelationDTO getOneBindByStoreId(String staffId, String storeId);
StaffClerkRelationDTO getByClerkId(String clerkId); StaffClerkRelationDTO getByClerkId(String clerkId);
StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId);
StaffClerkRelationDTO getByClerkIdNoStatus(String clerkId);
List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkList); List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkList);
List<StaffClerkRelationDTO> listByStaffId(String wxEnterpriseId, String staffId); List<StaffClerkRelationDTO> listByStaffId(String wxEnterpriseId, String staffId);
......
...@@ -78,11 +78,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -78,11 +78,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
@Override @Override
public boolean delBind(String oldClerkId, String optStaffId, int channelCode) {
return this.delBind(oldClerkId, optStaffId, channelCode, null) ;
}
@Override
public boolean delBind(String oldClerkId, String optStaffId, int channelCode, String newClerkId) { public boolean delBind(String oldClerkId, String optStaffId, int channelCode, String newClerkId) {
TabHaobanStaffClerkRelation clerkRelation = mapper.getByClerkId(oldClerkId); TabHaobanStaffClerkRelation clerkRelation = mapper.getByClerkId(oldClerkId);
if (null == clerkRelation) { if (null == clerkRelation) {
...@@ -244,11 +239,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -244,11 +239,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
@Override @Override
public StaffClerkRelationDTO getOneBindCodeNoStatus(String enterpriseId, String clerkCode) {
return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getOneBindCodeNoStatus(enterpriseId, clerkCode));
}
@Override
public StaffClerkRelationDTO getOneBindByStoreId(String staffId, String storeId) { public StaffClerkRelationDTO getOneBindByStoreId(String staffId, String storeId) {
return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getOneBindStoreId(staffId, storeId)); return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getOneBindStoreId(staffId, storeId));
} }
...@@ -259,16 +249,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -259,16 +249,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
@Override @Override
public StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId) {
return this.mapper.getByClerkIdForWxUserId(clerkId);
}
@Override
public StaffClerkRelationDTO getByClerkIdNoStatus(String clerkId) {
return EntityUtil.changeEntityByJSON(StaffClerkRelationDTO.class, mapper.getByClerkIdNoStatus(clerkId));
}
@Override
public List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkList) { public List<StaffClerkRelationDTO> listByClerkIds(List<String> clerkList) {
if (CollectionUtils.isEmpty(clerkList)) { if (CollectionUtils.isEmpty(clerkList)) {
return Collections.EMPTY_LIST; return Collections.EMPTY_LIST;
......
...@@ -102,7 +102,7 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService { ...@@ -102,7 +102,7 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
wxEnterpriseId = haobanStaff != null ? haobanStaff.getWxEnterpriseId() : null; wxEnterpriseId = haobanStaff != null ? haobanStaff.getWxEnterpriseId() : null;
} }
if (StringUtils.isNotEmpty(messageQDTO.getClerkId())) { if (StringUtils.isNotEmpty(messageQDTO.getClerkId())) {
clerkRelationDTO = staffClerkRelationService.getByClerkIdForWxUserId(messageQDTO.getClerkId()); clerkRelationDTO = staffClerkRelationService.getByClerkId(messageQDTO.getClerkId());
} }
if (staffId == null && clerkRelationDTO == null) { if (staffId == null && clerkRelationDTO == null) {
logger.info("没有导购:{}", messageQDTO.getClerkId()); logger.info("没有导购:{}", messageQDTO.getClerkId());
......
...@@ -634,7 +634,7 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -634,7 +634,7 @@ public class StaffApiServiceImpl implements StaffApiService {
} }
ClerkDTO clerkDTO = list.get(0); ClerkDTO clerkDTO = list.get(0);
StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkIdForWxUserId(clerkDTO.getClerkId()); StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkId(clerkDTO.getClerkId());
if (relationDTO == null) { if (relationDTO == null) {
logger.info("成员没有关联:{}", clerkCode); logger.info("成员没有关联:{}", clerkCode);
return null; return null;
......
...@@ -235,7 +235,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -235,7 +235,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override @Override
public boolean unbindByStaffAndClerkId(String staffId, String clerkId, int channelCode) { public boolean unbindByStaffAndClerkId(String staffId, String clerkId, int channelCode) {
return staffClerkRelationService.delBind(clerkId, staffId, channelCode); return staffClerkRelationService.delBind(clerkId, staffId, channelCode,null);
} }
@Override @Override
...@@ -253,7 +253,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -253,7 +253,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override @Override
public StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId) { public StaffClerkRelationDTO getByClerkIdForWxUserId(String clerkId) {
return staffClerkRelationService.getByClerkIdForWxUserId(clerkId); return this.getByClerkId(clerkId) ;
} }
@Override @Override
...@@ -377,7 +377,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -377,7 +377,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
@Override @Override
public com.gic.haoban.base.api.common.ServiceResponse<String> getClerkMemberChatConfig(String clerkId) { public com.gic.haoban.base.api.common.ServiceResponse<String> getClerkMemberChatConfig(String clerkId) {
com.gic.haoban.base.api.common.ServiceResponse response = new com.gic.haoban.base.api.common.ServiceResponse(); com.gic.haoban.base.api.common.ServiceResponse response = new com.gic.haoban.base.api.common.ServiceResponse();
StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkIdForWxUserId(clerkId); StaffClerkRelationDTO relationDTO = staffClerkRelationService.getByClerkId(clerkId);
if (null == relationDTO) { if (null == relationDTO) {
logger.info("导购没有关联企业微信:{}", clerkId); logger.info("导购没有关联企业微信:{}", clerkId);
response.setCode(2); response.setCode(2);
...@@ -460,11 +460,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -460,11 +460,11 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
Integer status = clerkDTO.getStatus(); Integer status = clerkDTO.getStatus();
logger.info("导购删除,clerkId:{},status:{}", clerkId, status); logger.info("导购删除,clerkId:{},status:{}", clerkId, status);
if (!status.equals(1)) { if (!status.equals(1)) {
staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode()); staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode(),null);
} }
} else if (type == 2) { } else if (type == 2) {
logger.info("导购门店转移,新的导购和门店,clerkId={},storeId={}", clerkId,clerkSyncQDTO.getStoreId()); logger.info("导购门店转移,新的导购和门店,clerkId={},storeId={}", clerkId,clerkSyncQDTO.getStoreId());
StaffClerkRelationDTO oldRelationDTO = staffClerkRelationService.getOneBindCodeNoStatus(enterpriseId, clerkCode); StaffClerkRelationDTO oldRelationDTO = staffClerkRelationService.getByCodeAndEnterpriseId(clerkCode,enterpriseId);
if (null == oldRelationDTO) { if (null == oldRelationDTO) {
logger.info("导购未关联成员,clerkCode={}",clerkCode); logger.info("导购未关联成员,clerkCode={}",clerkCode);
return; return;
...@@ -497,7 +497,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -497,7 +497,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} else if (clerkType == 2) { } else if (clerkType == 2) {
logger.info("区经变更为导购,解绑:{}", clerkId); logger.info("区经变更为导购,解绑:{}", clerkId);
//解绑 //解绑
staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode()); staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode(),null);
} }
} }
} }
......
...@@ -169,16 +169,6 @@ ...@@ -169,16 +169,6 @@
</foreach> </foreach>
</update> </update>
<select id="getOneBindCodeNoStatus" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from tab_haoban_staff_clerk_relation
where enterprise_id = #{enterpriseId,jdbcType=VARCHAR}
and clerk_code = #{clerkCode}
order by update_time desc limit 1
</select>
<select id="getOneBindStoreId" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="getOneBindStoreId" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
...@@ -197,33 +187,6 @@ ...@@ -197,33 +187,6 @@
and status_flag=1 order by create_time desc limit 1 and status_flag=1 order by create_time desc limit 1
</select> </select>
<select id="getByClerkIdForWxUserId" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO"
parameterType="java.lang.String">
select
a.staff_clerk_relation_id staffClerkRelationId,
a.staff_id staffId,
a.wx_enterprise_id wxEnterpriseId,
a.enterprise_id enterpriseId,
a.store_id storeId,
a.clerk_id clerkId,
a.clerk_code clerkCode,
a.status_flag statusFlag,
b.wx_user_id qwUserId ,
b.wx_open_user_id openUserId
from tab_haoban_staff_clerk_relation a
left join tab_haoban_staff b on b.staff_id = a.staff_id
where a.clerk_id = #{clerkId,jdbcType=VARCHAR} and a.status_flag=1
</select>
<select id="getByClerkIdNoStatus" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from tab_haoban_staff_clerk_relation
where clerk_id = #{clerkId,jdbcType=VARCHAR}
</select>
<update id="delByPrimaryKey"> <update id="delByPrimaryKey">
update tab_haoban_staff_clerk_relation update tab_haoban_staff_clerk_relation
set status_flag = 0, set status_flag = 0,
......
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