@Test public void testQueryWater() throws UnsupportedEncodingException, Exception { ResultActions results = mockMvc.perform( MockMvcRequestBuilders.post("/settlementservice/revenueservice/v1/querywater")) .andExpect(status().isOk()); results.andDo(new ResultHandler() { @Override public void handle(MvcResult result) throws Exception { System.out.println("*********"+result.getResponse().getContentAsString()); } }); }
@PostMapping("/querywater") public ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber, @RequestParam(value = "pageSize", defaultValue = "20") int pageSize, @RequestParam(value = "type", defaultValue = "list") String type, @RequestParam Map<String, Object> params, String waterType) { if ("list".equals(type)) { PageHelper.startPage(pageNumber, pageSize); } if (!Strings.isNullOrEmpty(waterType)) { List<String> waterTypeList = Arrays.asList(waterType.split(",")); params.put("waterType", waterTypeList); } List<EcmMzfWater> waterList = agentService.getWaterList(params); int total = agentService.getWaterCount(params); Map<String, Object> map = Maps.newHashMap(); map.put("waterList", waterList); map.put("total", total); return SettlementUtil.success(map); }
WaterController { @PostMapping("/querywater") public ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber, @RequestParam(value = "pageSize", defaultValue = "20") int pageSize, @RequestParam(value = "type", defaultValue = "list") String type, @RequestParam Map<String, Object> params, String waterType) { if ("list".equals(type)) { PageHelper.startPage(pageNumber, pageSize); } if (!Strings.isNullOrEmpty(waterType)) { List<String> waterTypeList = Arrays.asList(waterType.split(",")); params.put("waterType", waterTypeList); } List<EcmMzfWater> waterList = agentService.getWaterList(params); int total = agentService.getWaterCount(params); Map<String, Object> map = Maps.newHashMap(); map.put("waterList", waterList); map.put("total", total); return SettlementUtil.success(map); } }
WaterController { @PostMapping("/querywater") public ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber, @RequestParam(value = "pageSize", defaultValue = "20") int pageSize, @RequestParam(value = "type", defaultValue = "list") String type, @RequestParam Map<String, Object> params, String waterType) { if ("list".equals(type)) { PageHelper.startPage(pageNumber, pageSize); } if (!Strings.isNullOrEmpty(waterType)) { List<String> waterTypeList = Arrays.asList(waterType.split(",")); params.put("waterType", waterTypeList); } List<EcmMzfWater> waterList = agentService.getWaterList(params); int total = agentService.getWaterCount(params); Map<String, Object> map = Maps.newHashMap(); map.put("waterList", waterList); map.put("total", total); return SettlementUtil.success(map); }  }
WaterController { @PostMapping("/querywater") public ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber, @RequestParam(value = "pageSize", defaultValue = "20") int pageSize, @RequestParam(value = "type", defaultValue = "list") String type, @RequestParam Map<String, Object> params, String waterType) { if ("list".equals(type)) { PageHelper.startPage(pageNumber, pageSize); } if (!Strings.isNullOrEmpty(waterType)) { List<String> waterTypeList = Arrays.asList(waterType.split(",")); params.put("waterType", waterTypeList); } List<EcmMzfWater> waterList = agentService.getWaterList(params); int total = agentService.getWaterCount(params); Map<String, Object> map = Maps.newHashMap(); map.put("waterList", waterList); map.put("total", total); return SettlementUtil.success(map); }  @PostMapping("/querywater") ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber,
			@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
			@RequestParam(value = "type", defaultValue = "list") String type,
			@RequestParam Map<String, Object> params, String waterType); @PostMapping("/querywaterbyid") ResBodyData queryWaterById(String waterId, String waterType, Integer loginType, String code,
			Integer pageNumber, Integer pageSize); @PostMapping("/getrecmoney") ResBodyData getRecMoney(@RequestParam Map<String, Object> params); }
WaterController { @PostMapping("/querywater") public ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber, @RequestParam(value = "pageSize", defaultValue = "20") int pageSize, @RequestParam(value = "type", defaultValue = "list") String type, @RequestParam Map<String, Object> params, String waterType) { if ("list".equals(type)) { PageHelper.startPage(pageNumber, pageSize); } if (!Strings.isNullOrEmpty(waterType)) { List<String> waterTypeList = Arrays.asList(waterType.split(",")); params.put("waterType", waterTypeList); } List<EcmMzfWater> waterList = agentService.getWaterList(params); int total = agentService.getWaterCount(params); Map<String, Object> map = Maps.newHashMap(); map.put("waterList", waterList); map.put("total", total); return SettlementUtil.success(map); }  @PostMapping("/querywater") ResBodyData queryWater(@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber,
			@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
			@RequestParam(value = "type", defaultValue = "list") String type,
			@RequestParam Map<String, Object> params, String waterType); @PostMapping("/querywaterbyid") ResBodyData queryWaterById(String waterId, String waterType, Integer loginType, String code,
			Integer pageNumber, Integer pageSize); @PostMapping("/getrecmoney") ResBodyData getRecMoney(@RequestParam Map<String, Object> params);  }