mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-21 11:35:12 +08:00
update
This commit is contained in:
@@ -5,6 +5,7 @@ import com.jsowell.common.core.controller.BaseController;
|
||||
import com.jsowell.common.core.domain.AjaxResult;
|
||||
import com.jsowell.common.core.page.TableDataInfo;
|
||||
import com.jsowell.common.enums.BusinessType;
|
||||
import com.jsowell.common.exception.BusinessException;
|
||||
import com.jsowell.common.util.poi.ExcelUtil;
|
||||
import com.jsowell.pile.domain.PileStationWhitelist;
|
||||
import com.jsowell.pile.service.IPileStationWhitelistService;
|
||||
@@ -73,7 +74,16 @@ public class PileStationWhitelistController extends BaseController {
|
||||
@Log(title = "站点白名单", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PileStationWhitelist pileStationWhitelist) {
|
||||
return toAjax(pileStationWhitelistService.insertPileStationWhitelist(pileStationWhitelist));
|
||||
AjaxResult result;
|
||||
try {
|
||||
pileStationWhitelistService.insertPileStationWhitelist(pileStationWhitelist);
|
||||
result = AjaxResult.success();
|
||||
} catch (BusinessException e) {
|
||||
result = AjaxResult.error(e.getMessage());
|
||||
} catch (Exception e) {
|
||||
result = AjaxResult.error("添加站点白名单失败");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user