|
|
@@ -5,16 +5,17 @@ import com.ruoyi.business.service.IBjTrackShipCompanyService;
|
|
|
import com.ruoyi.common.core.web.controller.BaseController;
|
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
+import com.ruoyi.common.log.annotation.Log;
|
|
|
+import com.ruoyi.common.log.enums.BusinessType;
|
|
|
+import com.ruoyi.common.security.annotation.RequiresPermissions;
|
|
|
import io.swagger.v3.oas.annotations.Operation;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* 重点跟踪航运公司查询
|
|
|
@@ -55,4 +56,39 @@ public class BjTrackShipCompanyController extends BaseController {
|
|
|
return success(bjTrackShipCompanyService.queryById(trackShipCompanyId));
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新增重点跟踪航运公司
|
|
|
+ */
|
|
|
+ @Operation(summary = "新增重点跟踪航运公司")
|
|
|
+// @RequiresPermissions("business:trackShipCompany:add")
|
|
|
+ @Log(title = "重点跟踪航运公司", businessType = BusinessType.INSERT)
|
|
|
+ @PostMapping()
|
|
|
+ public AjaxResult add(@RequestBody BjTrackShipCompanyBo bo) {
|
|
|
+ return toAjax(bjTrackShipCompanyService.insertByBo(bo));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改重点跟踪航运公司
|
|
|
+ */
|
|
|
+ @Operation(summary = "修改重点跟踪航运公司")
|
|
|
+// @RequiresPermissions("business:trackShipCompany:edit")
|
|
|
+ @Log(title = "重点跟踪航运公司", businessType = BusinessType.UPDATE)
|
|
|
+ @PutMapping()
|
|
|
+ public AjaxResult edit(@RequestBody BjTrackShipCompanyBo bo) {
|
|
|
+ return toAjax(bjTrackShipCompanyService.updateByBo(bo));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除重点跟踪航运公司
|
|
|
+ *
|
|
|
+ * @param trackShipCompanyId 主键串
|
|
|
+ */
|
|
|
+ @Operation(summary = "删除重点跟踪航运公司")
|
|
|
+// @RequiresPermissions("business:trackShipCompany:remove")
|
|
|
+ @Log(title = "重点跟踪航运公司", businessType = BusinessType.DELETE)
|
|
|
+ @DeleteMapping("/{trackShipCompanyId}")
|
|
|
+ public AjaxResult remove(@PathVariable("trackShipCompanyId") String[] trackShipCompanyId) {
|
|
|
+ return toAjax(bjTrackShipCompanyService.deleteWithValidByIds(List.of(trackShipCompanyId), true));
|
|
|
+ }
|
|
|
+
|
|
|
}
|