DrawController { @PostMapping(value="/rejectdrawcashbyid") public ResBodyData rejectDrawCashById(EcmMzfDraw ecmmzfdraw) { if(StringUtil.isEmpty(ecmmzfdraw.getDrawCode()) || StringUtil.isEmpty(ecmmzfdraw.getRemark())){ throw new ServiceException(SettlementApiCode.REJECT_DRAWCODE_REMARK_ISNULL, BaseApiCode.getZhMsg(SettlementApiCode.REJECT_DRAWCODE_REMARK_ISNULL)); } ecmmzfdraw.setStatus(DrawCashConstants.STATUS_VERIFIED_REJECTED); ecmmzfdraw.setVerifyName(StringUtil.isEmpty(ecmmzfdraw.getVerifyName())?ADMIN:ecmmzfdraw.getVerifyName()); ecmmzfdraw.setVerifyStatus(DrawCashConstants.STATUS_VERIFIED_REJECTED); ecmmzfdraw.setVerifyTime(DateUtil.getCurrentTimeSec()); Map<String, Object> hashMap = drawService.rejectDrawCashById(ecmmzfdraw); return SettlementUtil.success(hashMap); }  @PostMapping(value="/queryaccoutbalance") ResBodyData queryAccoutBalance(String code); @PostMapping(value = "/drawcash") ResBodyData drawCash(@Validated EcmMzfDraw ecmMzfDraw); @PostMapping(value = "/querydrawcash") ResBodyData queryDrawCash(
			@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); @PostMapping(value="/querydrawcashbyid") ResBodyData queryDrawCashById(String drawCode); @PostMapping(value="/verifydrawcashbyid") ResBodyData verifyDrawCashById(EcmMzfDraw ecmmzfdraw); @PostMapping(value="/rejectdrawcashbyid") ResBodyData rejectDrawCashById(EcmMzfDraw ecmmzfdraw); @PostMapping(value="/confirmdrawcashbyidbytype") ResBodyData confirmDrawCashByIdByType(EcmMzfDraw ecmmzfdraw);  }
@Test public void testRejectDrawCashById() throws Exception { ResultActions results = mockMvc .perform(MockMvcRequestBuilders.post("/settlementservice/drawservice/v1/rejectdrawcashbyid") .param("drawCode", "QZ187147764266217033101").param("remark", "驳回原因").param("verifyId", "1") .param("drawName", "人工")) .andExpect(status().isOk()); results.andDo(new ResultHandler() { @Override public void handle(MvcResult result) throws Exception { System.out.println("*********" + result.getResponse().getContentAsString()); } }); }