package com.qxgmat.controller.admin;

import com.nuliji.tools.Response;
import com.nuliji.tools.ResponseHelp;
import com.qxgmat.dto.admin.request.UserServiceBindDto;
import com.qxgmat.service.inline.ManagerLogService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController("AdminServiceController")
@RequestMapping("/admin/service")
public class ServiceController {
    @Autowired
    private ManagerLogService managerLogService;


    @RequestMapping(value = "/bind", method = RequestMethod.PUT)
    @ApiOperation(value = "绑定用户服务", httpMethod = "PUT")
    public Response<Boolean> edit(@RequestBody @Validated UserServiceBindDto dto, HttpServletRequest request) {

        managerLogService.log(request);
        return ResponseHelp.success(true);
    }
}
