|
@@ -44,7 +44,7 @@ public class ServiceInfoFacade extends ServiceInfoServiceImpl {
|
|
|
throw new CommonException(CommonErrorCode.IS_EXISTS,
|
|
|
"服务端【" + serviceSaveVO.getName() + "】已存在,不允许重复建立");
|
|
|
}
|
|
|
- serviceInfo =new ServiceInfo();
|
|
|
+ serviceInfo = new ServiceInfo();
|
|
|
serviceInfo.setName(serviceSaveVO.getName());
|
|
|
serviceInfo.setDescription(serviceSaveVO.getDescription());
|
|
|
serviceInfo.setType(serviceSaveVO.getType());
|
|
@@ -63,7 +63,7 @@ public class ServiceInfoFacade extends ServiceInfoServiceImpl {
|
|
|
*/
|
|
|
public Boolean updateService(ServiceInfo serviceInfo) {
|
|
|
Long userId = Long.parseLong(UserUtils.getCurrentPrincipleID());
|
|
|
- if (userId != serviceInfo.getUserId()) {
|
|
|
+ if (!userId.equals(serviceInfo.getUserId())) {
|
|
|
throw new CommonException(CommonErrorCode.UPDATE_INFO_FAIL,
|
|
|
"服务端【" + serviceInfo.getName() + "】关联用户与当前登录用户不匹配");
|
|
|
}
|
|
@@ -85,7 +85,7 @@ public class ServiceInfoFacade extends ServiceInfoServiceImpl {
|
|
|
ServiceInfo serviceInfo = this.getById(serviceId);
|
|
|
if (serviceInfo == null) {
|
|
|
throw new CommonException(CommonErrorCode.NOT_EXISTS, "服务端不存在");
|
|
|
- } else if (userId != serviceInfo.getUserId()) {
|
|
|
+ } else if (!userId.equals(serviceInfo.getUserId())) {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR,
|
|
|
"服务端【" + serviceInfo.getName() + "】关联用户与当前登录用户不匹配,不允许删除");
|
|
|
}
|