Commit bcd6e3f7 by huangZW

111

parent a74d794b
...@@ -75,7 +75,13 @@ public interface StaffClerkRelationApiService { ...@@ -75,7 +75,13 @@ public interface StaffClerkRelationApiService {
* @return * @return
*/ */
StaffClerkRelationDTO getByClerkId(String clerkId); StaffClerkRelationDTO getByClerkId(String clerkId);
/**
*
* @param enterpriseId
* @param wxUserId
* @return
*/
List<StaffClerkRelationDTO> listByEnterpriseIdAndWxUserId(String enterpriseId,String wxUserId);
/** /**
* 删除关联关系 * 删除关联关系
* @param clerkId * @param clerkId
......
...@@ -5,6 +5,7 @@ import java.util.Set; ...@@ -5,6 +5,7 @@ import java.util.Set;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation; import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation;
public interface TabHaobanStaffClerkRelationMapper { public interface TabHaobanStaffClerkRelationMapper {
...@@ -76,4 +77,6 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -76,4 +77,6 @@ public interface TabHaobanStaffClerkRelationMapper {
int delByPrimaryKey(@Param("staffClerkRelationId")String staffClerkRelationId); int delByPrimaryKey(@Param("staffClerkRelationId")String staffClerkRelationId);
void delByClerkId(@Param("clerkId")String clerkId); void delByClerkId(@Param("clerkId")String clerkId);
List<TabHaobanStaffClerkRelation>listByEnterpriseIdAndWxUserId(@Param("enterpriseId")String enterpriseId,@Param("wxUserId")String wxUserId);
} }
\ No newline at end of file
...@@ -23,6 +23,7 @@ import com.gic.haoban.manage.service.service.StaffClerkRelationService; ...@@ -23,6 +23,7 @@ import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -221,4 +222,9 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -221,4 +222,9 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
public void delByClerkId(String clerkId) { public void delByClerkId(String clerkId) {
tabHaobanStaffClerkRelationMapper.delByClerkId(clerkId); tabHaobanStaffClerkRelationMapper.delByClerkId(clerkId);
} }
@Override
public List<StaffClerkRelationDTO> listByEnterpriseIdAndWxUserId(String enterpriseId,String wxUserId) {
List<TabHaobanStaffClerkRelation> list = tabHaobanStaffClerkRelationMapper.listByEnterpriseIdAndWxUserId(enterpriseId,wxUserId);
return EntityUtil.changeEntityListByJSON(StaffClerkRelationDTO.class, list);
}
} }
...@@ -329,4 +329,13 @@ ...@@ -329,4 +329,13 @@
and status_flag =1 and status_flag =1
</update> </update>
<select id="listByEnterpriseIdAndWxUserId" 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 wx_user_id = #{wxUserId}
</select>
</mapper> </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