package com.cftech.consultsheet.web;

import com.alibaba.fastjson.JSONObject;
import com.cftech.consultsheet.model.ConsultSheet;
import com.cftech.consultsheet.service.ConsultSheetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

/**
 * Created by 16444 on 2020/10/15.
 */
@RestController
@RequestMapping("/mobile/auth/consultSheet")
public class MobileConsultSheetController {

    @Autowired
    private ConsultSheetService consultSheetService;

    /**
     * 提交咨询单接口
     * @return
     */
    @RequestMapping(value = "/submitConsultSheet",
            method = {RequestMethod.GET, RequestMethod.POST},
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    public JSONObject submitConsultSheet(@RequestBody ConsultSheet consultSheet) {
        return consultSheetService.pollingConsultSheet(consultSheet);
    }
}
