Commit cfc091b5 by 徐高华

企微托管

parent 6deea890
...@@ -6,9 +6,12 @@ import com.gic.api.base.commons.ServiceResponse; ...@@ -6,9 +6,12 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO; import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO; import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
import java.util.List;
public interface OpenStaffApiService { public interface OpenStaffApiService {
/** /**
...@@ -90,4 +93,16 @@ public interface OpenStaffApiService { ...@@ -90,4 +93,16 @@ public interface OpenStaffApiService {
ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId); ServiceResponse<OpenStaffLicenseDTO> getLicenseInfo(String wxEnterpriseId, String enterpriseId);
ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo); ServiceResponse<Page<OpenStaffListDTO>> page(OpenStaffPageQDTO qdto, BasePageInfo basePageInfo);
/**
* 查询托管的导购
* @param wxEnterpriseId
* @param enterpriseIdList
* @param clerkIdList
* @return
*/
List<StaffClerkRelationDTO> listOpenStaffByClerk(String wxEnterpriseId , String enterpriseIdList , List<String> clerkIdList) ;
List<StaffClerkRelationDTO> listOpenStaffByStore(String wxEnterpriseId , String enterpriseIdList , List<String> storeIdList) ;
} }
...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.dao.mapper; ...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO; import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
import com.gic.haoban.manage.service.entity.TabOpenStaff; import com.gic.haoban.manage.service.entity.TabOpenStaff;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -42,4 +43,8 @@ public interface OpenStaffMapper { ...@@ -42,4 +43,8 @@ public interface OpenStaffMapper {
TabOpenStaff getByQwUserId(@Param("qwUserId")Long qwUserId); TabOpenStaff getByQwUserId(@Param("qwUserId")Long qwUserId);
List<String> listAllStaffId(String wxEnterpriseId); List<String> listAllStaffId(String wxEnterpriseId);
List<StaffClerkRelationDTO> listOpenStaffByClerk(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId, @Param("list")List<String> clerkIdList);
List<StaffClerkRelationDTO> listOpenStaffByStore(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("enterpriseId")String enterpriseId, @Param("list")List<String> storeIdList);
} }
\ No newline at end of file
...@@ -8,6 +8,7 @@ import com.gic.commons.util.EntityUtil; ...@@ -8,6 +8,7 @@ import com.gic.commons.util.EntityUtil;
import com.gic.haoban.manage.api.dto.OpenStaffDTO; import com.gic.haoban.manage.api.dto.OpenStaffDTO;
import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO; import com.gic.haoban.manage.api.dto.OpenStaffLicenseDTO;
import com.gic.haoban.manage.api.dto.OpenStaffListDTO; import com.gic.haoban.manage.api.dto.OpenStaffListDTO;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.enums.QwOpenStepEnum; import com.gic.haoban.manage.api.enums.QwOpenStepEnum;
import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffInitQDTO;
import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO; import com.gic.haoban.manage.api.qdto.OpenStaffPageQDTO;
...@@ -245,4 +246,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService { ...@@ -245,4 +246,14 @@ public class OpenStaffApiServiceImpl implements OpenStaffApiService {
OpenStaffDTO dto = EntityUtil.changeEntityByJSON(OpenStaffDTO.class,tab) ; OpenStaffDTO dto = EntityUtil.changeEntityByJSON(OpenStaffDTO.class,tab) ;
return ServiceResponse.success(dto); return ServiceResponse.success(dto);
} }
@Override
public List<StaffClerkRelationDTO> listOpenStaffByClerk(String wxEnterpriseId, String enterpriseId, List<String> clerkIdList) {
return this.openStaffMapper.listOpenStaffByClerk(wxEnterpriseId,enterpriseId,clerkIdList);
}
@Override
public List<StaffClerkRelationDTO> listOpenStaffByStore(String wxEnterpriseId, String enterpriseId, List<String> storeIdList) {
return this.openStaffMapper.listOpenStaffByStore(wxEnterpriseId,enterpriseId,storeIdList);
}
} }
...@@ -194,5 +194,24 @@ ...@@ -194,5 +194,24 @@
select staff_id from tab_haoban_open_staff where wx_enterprise_id = #{wxEnterpriseId} and delete_flag = 0 select staff_id from tab_haoban_open_staff where wx_enterprise_id = #{wxEnterpriseId} and delete_flag = 0
</select> </select>
<select id="listOpenStaffByClerk" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO">
select a.staff_id staffId , b.clerk_id clerkId , b.store_id storeId from tab_haoban_open_staff a left join tab_haoban_staff_clerk_relation b
on a.staff_id = b.staff_id and b.status_flag = 1
where a.wx_enterprise_id = #{wxEnterpriseId} and a.enterprise_id = #{enterpriseId} and a.status_flag = 1
and b.clerk_id in
<foreach collection="list" index="idex" item="item" separator="," close=")" open="(">
#{item}
</foreach>
</select>
<select id="listOpenStaffByStore" resultType="com.gic.haoban.manage.api.dto.StaffClerkRelationDTO">
select a.staff_id staffId , b.clerk_id clerkId , b.store_id storeId from tab_haoban_open_staff a left join tab_haoban_staff_clerk_relation b
on a.staff_id = b.staff_id and b.status_flag = 1
where a.wx_enterprise_id = #{wxEnterpriseId} and a.enterprise_id = #{enterpriseId} and a.status_flag = 1
and b.store_id in
<foreach collection="list" index="idex" item="item" separator="," close=")" open="(">
#{item}
</foreach>
</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