package cn.qg.qaplatform.controller;

import cn.qg.qaplatform.common.JsonResult;
import cn.qg.qaplatform.domain.GenVccUser;
import cn.qg.qaplatform.service.VccDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("vcc")
public class GenVccController {

    @Autowired
    VccDataService vccDataService;

    @PostMapping("/gen")
    public JsonResult genVccUser(String namespace, String phoneNo, String channel) throws Exception {
        GenVccUser result = vccDataService.makeVccUser(namespace, phoneNo, channel, 0);
        return JsonResult.success(result);
    }
}
