package com.malk.hengyilong.controller;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.malk.server.aliwork.YDConf;
import com.malk.server.aliwork.YDParam;
import com.malk.server.common.McR;
import com.malk.service.aliwork.YDClient;
import com.malk.utils.UtilMap;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.*;
import com.malk.hengyilong.service.ClientHylService;

import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.TimeUnit;

/**
 * 功能：
 * 作者：hanxue
 * 日期：2026/2/2 10:14
 */
@RequestMapping
@RestController
@Slf4j
public class HylController {

    @Autowired
    private ClientHylService clientService;
    @Autowired
    private YDClient ydClient;

    //    获取客户档案信息
    @GetMapping("/getClient")
    public McR getClient(@RequestBody  Map param){
        return clientService.getClient(param);
    }
    //同步宜搭客户档案链接
    @PostMapping("/syncClient")
    public McR syncClient(@RequestBody Map map){
        return clientService.syncClient(map);
    }

//    计算账期时间

    @PostMapping("/getAccountPeriod")
    public McR getAccountPeriod(@RequestBody Map map){
        return clientService.getAccountPeriod(map);

    }





}
