package com.xy.service;

import com.xy.annotate.RestMappingController;
import com.xy.dto.SysWorkUser.*;
import com.xy.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;
import java.util.List;

/***
 * 业务用户服务类
 * @author 谭斌
 * @date 2022/12/13 19:06
 */

@RestMappingController("sysWorkUser")
public interface SysWorkUserService {


    @PostMapping("register")
    R<Long> register(@Valid @RequestBody AddDto addDto);


    @PostMapping("update")
    R<Boolean> update(@Valid @RequestBody UpdateDto updateDto);


    @PostMapping("del")
    R del(@RequestBody @Validated DelDto delDto);

    @PostMapping("login")
    R<String> login(@RequestBody @Validated LoginDto loginDto);

    @PostMapping("logout")
    @ApiOperation("登出")
    R logout();

    @PostMapping("list")
    R<List<SysWorkVo>> list(@RequestBody ListDto listDto);
}
