package com.fuyuanshen.equipment.controller;


import com.fuyuanshen.common.core.domain.R;
import com.fuyuanshen.common.core.validate.EditGroup;
import com.fuyuanshen.common.idempotent.annotation.RepeatSubmit;
import com.fuyuanshen.common.log.annotation.Log;
import com.fuyuanshen.common.log.enums.BusinessType;
import com.fuyuanshen.common.web.core.BaseController;
import com.fuyuanshen.equipment.domain.bo.UserAppBo;
import com.fuyuanshen.equipment.service.AppUserService;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description:
 * @Author: WY
 * @Date: 2025/5/16
 **/
@Slf4j
@Tag(name = "设备管理", description = "设备：设备管理")
@RestController
@RequiredArgsConstructor
@RequestMapping("/api/app/device1")
public class DeviceAPPController extends BaseController {

    private final AppUserService appUserService;


    /**
     * 修改APP用户信息
     */
    // @SaCheckPermission("app:user:edit")
    @Log(title = "APP用户信息", businessType = BusinessType.UPDATE)
    @RepeatSubmit()
    @PutMapping()
    public R<Void> edit(@Validated(EditGroup.class) @RequestBody UserAppBo bo) {
        return toAjax(appUserService.updateByBo(bo));
    }






}


