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.ExchangeRateItemDTO;
import com.jwipc.sys.logic.ExchangeRateApiLogic;
import lombok.RequiredArgsConstructor;
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;

/**
 * @author shenyang.ou
 * @date 2024/4/3 9:46
 * @desc
 */
@RestController
@RequestMapping( "/sap/api/exchangeRate")
@RequiredArgsConstructor
public class ExchangeRateApiController {
    private final ExchangeRateApiLogic exchangeRateApiLogic;
    @PostMapping("/sync")
    @ApiOperateLog(code = "exchangeRateSync",name = "汇率同步", direction = ApiDirection.OTHER_TO_SRM, thirdSysType = ThirdSysType.SAP)
    public ApiResult sync(@RequestBody ExchangeRateItemDTO param){
        return exchangeRateApiLogic.sync(param);
    }
}
