1、字段少的话 最好使用@Requestparam 的Key-value形式
前段所传的参数为对象
@PostMapping("/getCashFlowSeq")
public ResultJson getCashFlowSeq(@RequestHeader("tenantUid") String tenantUid,
@RequestParam("accsetUid") String accSetUid, @RequestParam("period") String period) {
return cashJournalAccountService.getCashFlowSeq(accSetUid, period);
}
2、所传的字段为List<String>的形式,用@Requestparam来修饰传递参数 所传对象为对象
@PostMapping("/getCashFlowSeq")
public ResultJson getCashFlowSeq(@RequestHeader("tenantUid") String tenantUid,
@RequestParam("ids") List<String> ids) {
}