Commit 8de6ebf7 authored by zhangsen's avatar zhangsen

判断参数不能为空

parent 2078683c
package com.yeejoin.amos.boot.module.ccs.biz.controller;
import cn.hutool.core.date.DatePattern;
import cn.hutool.core.util.StrUtil;
import com.yeejoin.amos.boot.biz.common.controller.BaseController;
import com.yeejoin.amos.boot.module.ccs.api.dto.FireStationInfoDto;
import com.yeejoin.amos.boot.module.ccs.api.enums.StationOrderByTypeEnum;
......@@ -13,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import org.typroject.tyboot.core.restful.exception.instance.BadRequest;
import org.typroject.tyboot.core.restful.utils.ResponseHelper;
import org.typroject.tyboot.core.restful.utils.ResponseModel;
......@@ -111,6 +113,9 @@ public class FireStationInfoController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据换流站code统计消防车", notes = "根据换流站code统计消防车")
@GetMapping(value = "/getCarInfoByStationCode")
public ResponseModel<List<CarInfoVO>> getCarInfoByStationCode(@ApiParam(value = "换流站编号") @RequestParam(required = true) String stationCode) {
if (StrUtil.isEmpty(stationCode)) {
throw new BadRequest("换流站编号不能为空");
}
return ResponseHelper.buildResponse(fireStationInfoServiceImpl.getCarInfoByStationCode(stationCode));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment