|
@ -13,6 +13,7 @@ import com.epmet.commons.tools.validator.group.DefaultGroup; |
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|
|
import com.epmet.dto.IcComplaintsDTO; |
|
|
import com.epmet.dto.IcComplaintsDTO; |
|
|
import com.epmet.service.IcComplaintsService; |
|
|
import com.epmet.service.IcComplaintsService; |
|
|
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
@ -91,7 +92,11 @@ public class IcComplaintsController { |
|
|
@PostMapping("getComplaintsById") |
|
|
@PostMapping("getComplaintsById") |
|
|
public Result<IcComplaintsDTO> getComplaintsById(@LoginUser TokenDto tokenDto, @RequestParam Map<String, String> params) { |
|
|
public Result<IcComplaintsDTO> getComplaintsById(@LoginUser TokenDto tokenDto, @RequestParam Map<String, String> params) { |
|
|
if (null != tokenDto) { |
|
|
if (null != tokenDto) { |
|
|
return new Result<IcComplaintsDTO>().ok(icComplaintsService.get(params.get("id"))); |
|
|
if (StringUtils.isNotEmpty(params.get("id"))) { |
|
|
|
|
|
return new Result<IcComplaintsDTO>().ok(icComplaintsService.get(params.get("id"))); |
|
|
|
|
|
} else { |
|
|
|
|
|
throw new EpmetException("参数错误,请检查参数是否正确或联系管理员!"); |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
throw new EpmetException("请登陆后查询!"); |
|
|
throw new EpmetException("请登陆后查询!"); |
|
|
} |
|
|
} |
|
|