添加网格员区域统计接口
This commit is contained in:
parent
f4443bc2d3
commit
aa29d8f460
@ -137,6 +137,16 @@ public class TeamMemberController extends DefaultBaseController {
|
||||
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 = "队伍人员列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "areaCode", value = "地区编码", paramType = "path", required = true),
|
||||
|
@ -77,6 +77,16 @@ public class TeamMemberResourceController extends DefaultBaseController {
|
||||
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 = "队伍人员列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"),
|
||||
|
@ -194,6 +194,14 @@ public interface ITeamMemberService {
|
||||
*/
|
||||
Integer count(Map<String, Object> params);
|
||||
|
||||
/**
|
||||
* 队伍人员区域统计
|
||||
*
|
||||
* @param areaCode
|
||||
* @return
|
||||
*/
|
||||
Integer countByAreaCode(String areaCode);
|
||||
|
||||
/**
|
||||
* 队伍人员列表
|
||||
*
|
||||
@ -294,4 +302,5 @@ public interface ITeamMemberService {
|
||||
* @return
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer countByAreaCode(String areaCode) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("areaCode", areaCode);
|
||||
return count(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<TeamMemberDTO> listByTeamId(String teamId, Map<String, Object> params) {
|
||||
params.put("teamId", teamId);
|
||||
|
@ -369,6 +369,11 @@
|
||||
COUNT(*)
|
||||
FROM
|
||||
city_team_member t1
|
||||
<where>
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
t1.area_code = #{areaCode}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
Loading…
Reference in New Issue
Block a user