添加网格员区域统计接口
This commit is contained in:
parent
f4443bc2d3
commit
aa29d8f460
@ -137,6 +137,16 @@ public class TeamMemberController extends DefaultBaseController {
|
|||||||
return new SuccessResultData<>(teamMemberService.count(params));
|
return new SuccessResultData<>(teamMemberService.count(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "队伍人员区域统计", notes = "队伍人员区域统计接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "areaCode", paramType = "path"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("count/area-code/{areaCode}")
|
||||||
|
SuccessResultData<Integer> countByAreaCode(@PathVariable("areaCode") String areaCode) {
|
||||||
|
return new SuccessResultData<>(teamMemberService.countByAreaCode(areaCode));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "队伍人员列表", notes = "队伍人员列表接口")
|
@ApiOperation(value = "队伍人员列表", notes = "队伍人员列表接口")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "areaCode", value = "地区编码", paramType = "path", required = true),
|
@ApiImplicitParam(name = "areaCode", value = "地区编码", paramType = "path", required = true),
|
||||||
|
@ -77,6 +77,16 @@ public class TeamMemberResourceController extends DefaultBaseController {
|
|||||||
return new SuccessResultData<>(teamMemberService.count(params));
|
return new SuccessResultData<>(teamMemberService.count(params));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "队伍人员区域统计", notes = "队伍人员区域统计接口")
|
||||||
|
@ApiImplicitParams({
|
||||||
|
@ApiImplicitParam(name = "page", value = "areaCode", paramType = "path"),
|
||||||
|
})
|
||||||
|
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||||
|
@GetMapping("count/area-code/{areaCode}")
|
||||||
|
SuccessResultData<Integer> countByAreaCode(@PathVariable("areaCode") String areaCode) {
|
||||||
|
return new SuccessResultData<>(teamMemberService.countByAreaCode(areaCode));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "队伍人员列表", notes = "队伍人员列表接口")
|
@ApiOperation(value = "队伍人员列表", notes = "队伍人员列表接口")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||||
|
@ -194,6 +194,14 @@ public interface ITeamMemberService {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params);
|
Integer count(Map<String, Object> params);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 队伍人员区域统计
|
||||||
|
*
|
||||||
|
* @param areaCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Integer countByAreaCode(String areaCode);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 队伍人员列表
|
* 队伍人员列表
|
||||||
*
|
*
|
||||||
@ -294,4 +302,5 @@ public interface ITeamMemberService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
SuccessResultList<List<TeamMemberDTO>> listPageSubByAreaCodeAndSort(String areaCode, String sort, ListPage page);
|
SuccessResultList<List<TeamMemberDTO>> listPageSubByAreaCodeAndSort(String areaCode, String sort, ListPage page);
|
||||||
|
|
||||||
}
|
}
|
@ -201,6 +201,13 @@ public class TeamMemberServiceImpl extends DefaultBaseService implements ITeamMe
|
|||||||
return count == null ? 0 : count;
|
return count == null ? 0 : count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer countByAreaCode(String areaCode) {
|
||||||
|
Map<String, Object> params = getHashMap(2);
|
||||||
|
params.put("areaCode", areaCode);
|
||||||
|
return count(params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<TeamMemberDTO> listByTeamId(String teamId, Map<String, Object> params) {
|
public List<TeamMemberDTO> listByTeamId(String teamId, Map<String, Object> params) {
|
||||||
params.put("teamId", teamId);
|
params.put("teamId", teamId);
|
||||||
|
@ -369,6 +369,11 @@
|
|||||||
COUNT(*)
|
COUNT(*)
|
||||||
FROM
|
FROM
|
||||||
city_team_member t1
|
city_team_member t1
|
||||||
|
<where>
|
||||||
|
<if test="areaCode != null and areaCode != ''">
|
||||||
|
t1.area_code = #{areaCode}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user