package com.ruoyi.system.api;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.web.domain.GenericsAjaxResult;
import com.ruoyi.system.api.domain.SysUser;
import com.ruoyi.system.api.factory.RemoteMmpFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(contextId = "remoteMmpService", value = ServiceNameConstants.MANAGEMENT_SERVICE, fallbackFactory = RemoteMmpFallbackFactory.class)
public interface RemoteMmpService {
    @GetMapping("/gitLink/login")
    public GenericsAjaxResult<String> gitLinkLogin(@RequestParam("username") String username, @RequestParam("password") String password);

    @PostMapping("/gitLink/createGitLinkUser")
    public GenericsAjaxResult<String> createGitLinkUser(@RequestBody SysUser sysUser) throws Exception;

    @PostMapping("/gitLink/resetPwd")
    public GenericsAjaxResult<String> resetPwd(@RequestBody SysUser sysUser) throws Exception;

    @PutMapping("/gitLink/resetEmail")
    public GenericsAjaxResult<String> resetEmail(@RequestBody SysUser sysUser) throws Exception;

    @PutMapping("/gitLink/resetPhoneNum")
    public GenericsAjaxResult<String> resetPhoneNum(@RequestBody SysUser sysUser) throws Exception;

    @DeleteMapping("/gitLink/deleteGitLinkUser")
    public GenericsAjaxResult<String> deleteGitLinkUser(@RequestBody SysUser sysUser) throws Exception;
}
