package com.dy.pmsGlobal.global; 
 | 
  
 | 
import com.dy.common.aop.SsoPowerAop; 
 | 
import com.dy.common.webUtil.BaseResponse; 
 | 
import com.dy.common.webUtil.BaseResponseUtils; 
 | 
import com.dy.pmsGlobal.pojoBa.BaSysSet; 
 | 
import com.dy.pmsGlobal.pojoBa.BaUser; 
 | 
import lombok.extern.slf4j.Slf4j; 
 | 
import org.springframework.beans.factory.annotation.Autowired; 
 | 
import org.springframework.web.bind.annotation.GetMapping; 
 | 
import org.springframework.web.bind.annotation.RequestMapping; 
 | 
import org.springframework.web.bind.annotation.RestController; 
 | 
  
 | 
/** 
 | 
 * 系统设置 
 | 
 */ 
 | 
@Slf4j 
 | 
@RestController 
 | 
@RequestMapping(path = "sysSet") 
 | 
@SuppressWarnings("unchecked")//java版本越高,对泛型约束越严,所以配置SuppressWarnings("unchecked") 
 | 
public class SysSetCtrl { 
 | 
  
 | 
    @Autowired 
 | 
    private SysSetSv sv; 
 | 
  
 | 
    /** 
 | 
     * 得到唯一系统设置 
 | 
     * @return 唯一系统设置 
 | 
     */ 
 | 
    //@GetMapping(path = "one", consumes = MediaType.TEXT_PLAIN_VALUE)//指前端向后传的参数类型 
 | 
    @GetMapping(path = "single") 
 | 
    //@SsoAop() //只有登录验证,没有权限验证 
 | 
    @SsoPowerAop(power = "-1") //登录与权限同时验证 
 | 
    public BaseResponse<BaSysSet> single() { 
 | 
        try { 
 | 
            return BaseResponseUtils.buildSuccess(this.sv.selectSingle()); 
 | 
        } catch (Exception e) { 
 | 
            log.error("查询一个用户数据异常", e); 
 | 
            return BaseResponseUtils.buildException(e.getMessage()); 
 | 
        } 
 | 
    } 
 | 
} 
 |