|
@@ -122,6 +122,9 @@ public class GhDetailServiceImpl implements GhDetailService {
|
|
|
|
|
|
@Override
|
|
|
public CommonResponse<Void> updateDetail(GhDetailVo ghDetailVo) {
|
|
|
+ if (ghDetailVo == null || ghDetailVo.getId() == null) {
|
|
|
+ return CommonResponse.create(500, "参数错误");
|
|
|
+ }
|
|
|
CommonResponse<Void> checkParamRes = checkParam(ghDetailVo);
|
|
|
if (checkParamRes != null) {
|
|
|
return checkParamRes;
|
|
@@ -159,13 +162,13 @@ public class GhDetailServiceImpl implements GhDetailService {
|
|
|
private CommonResponse<Void> checkParam(GhDetailVo ghDetailVo) {
|
|
|
if (StringUtils.isNotEmpty(ghDetailVo.getRate())) {
|
|
|
if (!JSONArray.isValidArray(ghDetailVo.getRate())) {
|
|
|
- return CommonResponse.create(500, "参数错误");
|
|
|
+ return CommonResponse.create(500, "保底比率格式错误");
|
|
|
}
|
|
|
List<Integer> list = JSONArray.parseArray(ghDetailVo.getRate(), Integer.class);
|
|
|
if (!CollectionUtils.isEmpty(list)) {
|
|
|
for (Integer i : list) {
|
|
|
if (i < 0 || i > 9) {
|
|
|
- return CommonResponse.create(500, "参数错误");
|
|
|
+ return CommonResponse.create(500, "保底比率需要再0-9之间");
|
|
|
}
|
|
|
}
|
|
|
}
|