package com.eitc.patient.controller;

import com.eitc.common.core.controller.BaseController;
import com.eitc.common.core.domain.AjaxResult;
import com.eitc.patient.service.IAppUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

/**
 * AppUserController
 *
 * @author mtx
 * @date: 2024/06/12 16:48
 */
@Api(tags = "用户接口")
@RestController
@RequestMapping("/app-user")
public class UserSettingController extends BaseController {

    @Resource
    private IAppUserService appUserService;


    /**
     * 锁定用户&解锁用户
     */
    @PostMapping("/locking")
    @ApiOperation("锁定用户&解锁用户")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "id", dataType = "String", dataTypeClass = String.class),
            @ApiImplicitParam(name = "type", value = "类型（1锁定用户，0解锁用户）", dataType = "String", dataTypeClass = String.class)
    })
    public AjaxResult locking(@RequestBody Map<String, String> map) {
        return appUserService.locking(map);
    }

}
