package com.yami.shop.platform.controller.hb;

import com.alibaba.fastjson.JSONObject;
import com.yami.shop.common.util.hb.HBR;
import com.yami.shop.service.hb.IStoreManagementService;
import com.yami.shop.service.hb.ITransportService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * 海博-运费模板管理
 *
 * @author fubojin
 * @version 1.0.0
 * @since 2025-09-01
 */
@Slf4j
@RestController
@RequestMapping("/hb/transport")
@AllArgsConstructor
@CrossOrigin
public class TransportController {

    private final ITransportService transportService;

    /**
     * 海博运费模板信息-回调
     *
     * @param HBRequest 运费模板请求参数
     * @return 运费模板响应
     */
    @PostMapping("/update")
    public HBR addRegisterStore(@RequestBody JSONObject HBRequest) {
        log.info("海博添加运费模板{}",HBRequest);
        return transportService.addTransport(HBRequest);
    }


}
