|
@@ -0,0 +1,40 @@
|
|
|
+package com.ozs.web.controller.base;
|
|
|
+
|
|
|
+import com.ozs.common.core.controller.BaseController;
|
|
|
+import com.ozs.common.core.domain.AjaxResult;
|
|
|
+import com.ozs.common.utils.StringUtils;
|
|
|
+import com.ozs.base.domain.BaseSupplier;
|
|
|
+import com.ozs.base.service.BaseSupplierService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 供应商管理
|
|
|
+ *
|
|
|
+ * @author sunhh
|
|
|
+ */
|
|
|
+@Api("供应商管理")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/base/supplier")
|
|
|
+public class BaseSupplierController extends BaseController {
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BaseSupplierService baseSupplierService;
|
|
|
+
|
|
|
+ @ApiOperation("新增供应商户")
|
|
|
+ @ApiImplicitParams({@ApiImplicitParam(paramType = "body", dataType = "BaseSupplier",
|
|
|
+ name = "req", value = "信息参数", required = true)})
|
|
|
+ @PostMapping("/save")
|
|
|
+ public AjaxResult save(BaseSupplier baseSupplier) {
|
|
|
+ if (StringUtils.isNull(baseSupplier) || StringUtils.isNull(baseSupplier.getSupplierName())) {
|
|
|
+ return error("供应商名称不能为空");
|
|
|
+ }
|
|
|
+ return toAjax(baseSupplierService.insertBaseSupplier(baseSupplier));
|
|
|
+ }
|
|
|
+}
|