| | |
| | | package com.consum.base.controller; |
| | | |
| | | import com.consum.base.BaseController; |
| | | import com.consum.base.core.utils.CommonUtil; |
| | | import com.consum.base.pojo.request.WarehouseManagerParam; |
| | | import com.consum.base.service.BaseWarehouseManagerServiceImpl; |
| | | import com.consum.model.po.BaseWarehouseManager; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | @ApiOperation(value = "新增", notes = "新增") |
| | | @ApiImplicitParam(name = "warehouseManagerParam", value = "库管员信息", required = true, dataType = "WarehouseManagerParam", paramType = "body") |
| | | @PostMapping("/save") |
| | | public ResponseValue add(@RequestBody WarehouseManagerParam warehouseManagerParam) throws Exception { |
| | | public ResponseValue add() throws Exception { |
| | | WarehouseManagerParam param = CommonUtil.getObjFromReqBody(WarehouseManagerParam.class); |
| | | WarehouseManagerParam baseWarehouseParam = new WarehouseManagerParam(); |
| | | CommonUtil.copyProperties(param, baseWarehouseParam); |
| | | param = baseWarehouseParam; |
| | | |
| | | FinSysTenantUser sysInfo = this.getSysInfo(); |
| | | if (sysInfo == null) { |
| | | return ResponseValue.error("请先登录"); |
| | | } |
| | | this.baseWarehouseManagerService.add(warehouseManagerParam); |
| | | this.baseWarehouseManagerService.add(param); |
| | | return ResponseValue.success(); |
| | | } |
| | | |