无关风月
2024-09-14 3f481005be717250a2ea87ff9367aa84d6a3eb13
xinquan-modules/xinquan-system/src/main/java/com/xinquan/system/controller/UserLevelSettingController.java
@@ -1,9 +1,13 @@
package com.xinquan.system.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.xinquan.common.core.domain.R;
import com.xinquan.system.api.domain.vo.AppUserVO;
import com.xinquan.system.api.domain.UserLevelSetting;
import com.xinquan.system.service.UserLevelSettingService;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
 * <p>
@@ -16,6 +20,19 @@
@RestController
@RequestMapping("/system/user-level-setting")
public class UserLevelSettingController {
    @Resource
    private UserLevelSettingService userLevelSettingService;
    /**
     * 远程调用根据树苗等级获取疗愈图标和疗愈名称
     *
     * @return 用户信息
     * @see AppUserVO
     */
    @GetMapping("/getIconNameByLevel/{level}")
    public R<UserLevelSetting> getIconNameByLevel(@PathVariable("level")Integer level) {
        UserLevelSetting one = userLevelSettingService.lambdaQuery()
                .eq(UserLevelSetting::getTreeLevelType, level).one();
        return R.ok(one);
    }
}