修改错误返回语句
This commit is contained in:
+3
-1
@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
@@ -91,9 +92,10 @@ public class LawsBrowsingHistoryController extends JeroController<LawsBrowsingHi
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
this.lawsBrowsingHistoryService.removeByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Result.error(MessageUtils.getMessage(ResultCommon.SUCCESSFULLY_DELETED_IN_BULK));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+7
-6
@@ -5,13 +5,14 @@ import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
import com.jero.modules.laws.enterprise.entity.EnterpriseStandard;
|
||||
import com.jero.modules.laws.enterprise.service.EnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.entity.LawsDomesticStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsEnterpriseStandard;
|
||||
import com.jero.modules.laws.standard.entity.LawsOverseasStandard;
|
||||
import com.jero.modules.laws.standard.service.EnterpriseStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsDomesticStandardService;
|
||||
import com.jero.modules.laws.standard.service.ILawsOverseasStandardService;
|
||||
import com.jero.modules.personal.entity.LawsStandardCollection;
|
||||
@@ -100,7 +101,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
|
||||
@PostMapping(value = "/domestic/delete")
|
||||
public Result<T> domesticDelete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
lawsStandardCollectionService.deleteById(map.get("id"));
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
@@ -152,7 +153,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
|
||||
@ApiOperation(value="标准收藏-企标收藏", notes="标准收藏-企标收藏")
|
||||
@PostMapping(value = "/enterprise/add")
|
||||
public Result<T> enterpriseAdd(@Validated @RequestBody LawsStandardCollection lawsStandardCollection) {
|
||||
EnterpriseStandard standard = enterpriseStandardService.getById(lawsStandardCollection.getStandardId());
|
||||
LawsEnterpriseStandard standard = enterpriseStandardService.getById(lawsStandardCollection.getStandardId());
|
||||
lawsStandardCollection.setStandardClass(standard.getCategoryCode());
|
||||
lawsStandardCollection.setStandardName(standard.getStandardName());
|
||||
|
||||
@@ -177,7 +178,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
|
||||
@PostMapping(value = "/enterprise/delete")
|
||||
public Result<T> enterpriseDelete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
lawsStandardCollectionService.deleteById(map.get("id"));
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
@@ -191,7 +192,7 @@ public class LawsStandardCollectionController extends JeroController<LawsStandar
|
||||
@PostMapping(value = "/delete")
|
||||
public Result<T> delete(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("id") || StringUtils.isEmpty(map.get("id"))){
|
||||
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
lawsStandardCollectionService.removeById(map.get("id"));
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@ package com.jero.modules.personal.controller;
|
||||
import java.util.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.util.MessageUtils;
|
||||
import com.jero.modules.laws.common.constant.ResultCommon;
|
||||
@@ -204,7 +205,7 @@ public class LawsStandardSharingController extends JeroController<LawsStandardSh
|
||||
@PostMapping(value = "/deleteBatch")
|
||||
public Result<T> deleteBatch(@RequestBody Map<String, String> map) {
|
||||
if(!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))){
|
||||
return Result.error(MessageUtils.getLanguage().equals("EN") ? "Please select data!" : "请选择数据!");
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
this.lawsStandardSharingService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
|
||||
Reference in New Issue
Block a user