写法1:string xxx

  1. [HttpGet]
  2. public async Task<ResponseInfo<FertilizerV2StatusInfo>> FertilizerGetStatus(string gatCode, int deviceId)
  3. {
  4. }

写法2:FromQuery

  1. [HttpGet]
  2. public async Task<ResponseInfo<FertilizerV2StatusInfo>> FertilizerGetStatus([FromQuery] GatDeviceApiGet api)