库存记录 增加操作人
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package com.chaozhanggui.system.cashierservice.controller;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.ProductStatusDTO;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.ProductStockDTO;
|
||||
import com.chaozhanggui.system.cashierservice.entity.dto.QuerySpecDTO;
|
||||
import com.chaozhanggui.system.cashierservice.service.ProductService;
|
||||
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
|
||||
import com.chaozhanggui.system.cashierservice.sign.Result;
|
||||
import com.chaozhanggui.system.cashierservice.util.TokenUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -36,9 +38,12 @@ public class ProductController {
|
||||
|
||||
@PutMapping("/productStock")
|
||||
public Result productStock(
|
||||
@RequestHeader("token") String token,
|
||||
@Valid @RequestBody ProductStockDTO productStockDTO
|
||||
) {
|
||||
productService.updateStock(productStockDTO);
|
||||
JSONObject jsonObject = TokenUtil.parseParamFromToken(token);
|
||||
String loginName = jsonObject.getString("loginName");
|
||||
productService.updateStock(productStockDTO,loginName);
|
||||
return Result.success(CodeEnum.SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user