Browse Source

无法删除门店优化

liyuan 1 week ago
parent
commit
486d41ebce

+ 1 - 4
blade-service/gubersail-dealer-admin/src/main/java/com/gubersail/admin/corp/controller/CorpsDescController.java

@@ -151,10 +151,7 @@ public class CorpsDescController extends BladeController {
 	@Transactional(rollbackFor = Exception.class)
 	@RepeatSubmit
 	public R update(@Valid @RequestBody PjCorpsDesc corpsDesc) {
-		if (!AuthUtil.getUserRole().contains("admin") && !AuthUtil.getUserRole().contains("基础资料")) {
-			throw new RuntimeException("暂无权限,删除失败");
-		}
-		if (corpsDesc.getId() == null) {
+		if (Objects.isNull(corpsDesc.getId())) {
 			return R.data(500, "请选择要删除的数据", "error");
 		}
 		List<PjCorpsAttn> corpsAttnList = corpsAttnService.list(new LambdaQueryWrapper<PjCorpsAttn>()