Commit 9c0e5a67 by 陶光胜

门店保存修改

parent 28990fce
......@@ -10,7 +10,6 @@ import javax.validation.Validator;
import org.hibernate.validator.HibernateValidator;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.error.ErrorCode;
/**
* service层面的参数校验工具
......@@ -50,7 +49,7 @@ public class ValidUtil {
if (constraintViolations.size() > 0) {
String paramName = constraintViolations.iterator().next().getPropertyPath().toString();
String paramError = constraintViolations.iterator().next().getMessage();
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), getFailFastMsg(paramName, paramError));
return ServiceResponse.failure("0005", getFailFastMsg(paramName, paramError));
}
return ServiceResponse.success();
}
......@@ -74,7 +73,7 @@ public class ValidUtil {
errorMessages.append(getFailFastMsg(violation.getPropertyPath().toString(), violation.getMessage()))
.append(",");
}
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), errorMessages.toString());
return ServiceResponse.failure("0005", errorMessages.toString());
}
return ServiceResponse.success();
}
......
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