package com.jwipc.sys.controller;

import com.jwipc.api.dto.ApiResult;
import com.jwipc.log.annotation.ApiOperateLog;
import com.jwipc.log.constant.ApiDirection;
import com.jwipc.log.constant.ThirdSysType;
import com.jwipc.sys.dto.ShopCartDTO;
import com.jwipc.sys.logic.ShoppingCartLogic;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
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;


@RestController
@RequestMapping( "/oa/api/shopCart")
@RequiredArgsConstructor
public class ShoppingCartApiController {

    @Autowired
    ShoppingCartLogic shoppingCartLogic;


    @PostMapping("/updateStatus")
    @ApiOperateLog(code = "updateStatus",name = "更新购物订单状态", direction = ApiDirection.OTHER_TO_SRM, thirdSysType = ThirdSysType.OA)
    public ApiResult updateStatus(@RequestBody ShopCartDTO param){
        return shoppingCartLogic.updateStatus(param);
    }

}
