Commit a6308adb by huangZW

1111

parent 0478f513
...@@ -22,6 +22,14 @@ public interface DepartmentApiService { ...@@ -22,6 +22,14 @@ public interface DepartmentApiService {
* @return * @return
*/ */
List<DepartmentDTO> listStoreByWxEnterpriseId(String wxEnterpriseId); List<DepartmentDTO> listStoreByWxEnterpriseId(String wxEnterpriseId);
/**
* 查wxEnterprise下所有门店(溢出门店)
* @param wxEnterpriseId
* @return
*/
Page<DepartmentDTO> pageFullStoreByWxEnterpriseId(
String wxEnterpriseId, String search,int count,BasePageInfo pageInfo);
/** /**
* 根据部门id查询部门 * 根据部门id查询部门
* @param departmentId * @param departmentId
......
...@@ -35,4 +35,6 @@ public interface DepartmentMapper { ...@@ -35,4 +35,6 @@ public interface DepartmentMapper {
List<TabHaobanDepartment> listStoreByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId); List<TabHaobanDepartment> listStoreByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
TabHaobanDepartment getRootByEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId); TabHaobanDepartment getRootByEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
Page<TabHaobanDepartment> pageFullStoreByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId,@Param("search")String search,@Param("minCount")int minCount);
} }
\ No newline at end of file
...@@ -162,4 +162,11 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -162,4 +162,11 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
return EntityUtil.changeEntityListByJSON(DepartmentDTO.class, list); return EntityUtil.changeEntityListByJSON(DepartmentDTO.class, list);
} }
@Override
public Page<DepartmentDTO> pageFullStoreByWxEnterpriseId(
String wxEnterpriseId,String search, int count,BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
return PageUtil.changePageHelperToCurrentPage( departmentMapper.pageFullStoreByWxEnterpriseId(wxEnterpriseId,search,count),DepartmentDTO.class);
}
} }
...@@ -278,4 +278,21 @@ ...@@ -278,4 +278,21 @@
and wx_enterprise_id = #{wxEnterpriseId} and wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1 and status_flag = 1
</select> </select>
<select id="pageFullStoreByWxEnterpriseId" resultMap="BaseResultMap" >
SELECT
t.*
FROM
(
select
@rownum := @rownum + 1 AS rownum,
<include refid="Base_Column_List" />
from tab_haoban_department,
(SELECT(@rowNum := 0)) b
where status_flag = 1
and is_store = #{storeFlag,jdbcType=INTEGER}
and wx_enterprise_id = #{wxEnterpriseId}
order by create_time
) WHERE t.rownum > #{minCount};
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -319,10 +319,17 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -319,10 +319,17 @@ public class DepartmentContoller extends WebBaseController{
} }
//溢出门店列表 //溢出门店列表
@RequestMapping("store-full-list") @RequestMapping("store-full-list")
public HaobanResponse storeFullList(BasePageInfo basePageInfo) { public HaobanResponse storeFullList(BasePageInfo basePageInfo,String search) {
LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser(); // LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
String wxEnterpriseId = login.getWxEnterpriseId(); // String wxEnterpriseId = login.getWxEnterpriseId();
int pageNum = basePageInfo.getPageNum(); String wxEnterpriseId = "1";
int maxVersionCount = 0;
Page<DepartmentDTO> page = departmentApiService.pageFullStoreByWxEnterpriseId(wxEnterpriseId, search,maxVersionCount, basePageInfo);
return resultResponse(HaoBanErrCode.ERR_1,page);
/*int pageNum = basePageInfo.getPageNum();
int pageSize = basePageInfo.getPageSize(); int pageSize = basePageInfo.getPageSize();
Page<DepartmentDTO> page = new Page<>(pageNum, pageSize, 0); Page<DepartmentDTO> page = new Page<>(pageNum, pageSize, 0);
...@@ -344,7 +351,7 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -344,7 +351,7 @@ public class DepartmentContoller extends WebBaseController{
} }
List resultList = ListUtils.Pager(pageSize, pageNum, list); List resultList = ListUtils.Pager(pageSize, pageNum, list);
return resultResponse(HaoBanErrCode.ERR_1,resultList); return resultResponse(HaoBanErrCode.ERR_1,resultList);*/
} }
} }
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