首先明确一点,SpringCloud通过Fegin如果是多个参数,其中一个参数是List,那么是传不过去的,单个List是可以的。
1、单个List实体传递
@RequestMapping("/secret/batchInsert")
public int batchInsert(@RequestBody List<BatchSecretBO> batchSecretBOList){
return batchSecretService.batchInsert(batchSecretBOList);
}
2、基本类型传递
基本类型可以通过数组的方式传递,代码如下所示:
@RequestMapping(value = "/stat/merchant/get_merchant_compare_info", method = RequestMethod.POST)
@ResponseBody
MerchantCompareTotalInfo getMerchantCompareInfo(@RequestParam("licenseNoList") String[] licenseNoList);