OMS-GW-企业国别
This commit is contained in:
@@ -2,15 +2,17 @@ package com.mhd.oms.interfaces.facade.erpCountry;
|
||||
|
||||
|
||||
import com.mhd.common.core.web.controller.BaseController;
|
||||
import com.mhd.common.core.web.domain.AjaxResult;
|
||||
import com.mhd.common.core.web.page.TableDataInfo;
|
||||
import com.mhd.oms.application.service.erpCountry.ErpCountryApplicationService;
|
||||
import com.mhd.oms.interfaces.dto.erpCountry.ErpCountryDTO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Api(tags = "企业国别管理")
|
||||
@@ -27,5 +29,29 @@ public class ErpCountryApi extends BaseController{
|
||||
return erpCountryApplicationService.queryList(erpCountryDTO);
|
||||
}
|
||||
|
||||
@ApiOperation("编辑企业国别")
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody ErpCountryDTO erpCountryDTO) {
|
||||
if (erpCountryDTO.getId() != null) {
|
||||
return toAjax(erpCountryApplicationService.update(erpCountryDTO));
|
||||
} else {
|
||||
return toAjax(erpCountryApplicationService.insert(erpCountryDTO));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("删除企业国别")
|
||||
@DeleteMapping("/deleteBatch")
|
||||
public AjaxResult deleteBatch(@RequestParam("ids") String ids) {
|
||||
if (ids == null || ids.isEmpty()) {
|
||||
return AjaxResult.error("没有选择要删除的数据");
|
||||
}
|
||||
List<Long> idList = new ArrayList<>();
|
||||
for (String id : ids.split(",")) {
|
||||
idList.add(Long.parseLong(id));
|
||||
}
|
||||
return toAjax(erpCountryApplicationService.deleteByIds(idList));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user