CZT
2023-11-27 c206acfaedc69c390fb67daa81bc686f58a212ef
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.ld.igds.sys;
 
import com.bstek.bdf2.core.business.IUser;
import com.bstek.bdf2.core.service.IUserService;
import com.bstek.dorado.annotation.Expose;
import com.ld.igds.models.DeviceSer;
import com.ld.igds.util.ContextUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
/**
 * 系统相关调用入口
 * 
 * @author jiazx
 *
 */
@Slf4j
@Component
public class SystemPR {
 
    @Autowired
    private IUserService userService;
    
    /**
     * systemPR#checkUserByPwd
     * 当前登陆人密码验证
     * @param pwd
     * @return
     */
    @Expose
    public String checkUserByPwd(String pwd){
        IUser user = ContextUtil.getLoginUser();
        if(null == user){
            return "您已经掉线,请重新登录后确认!";
        }
        log.debug("密码={}",user.getPassword());
        
        String dd = userService.checkPassword(user.getUsername(), pwd);
        return dd;
    }
    
    //systemPR#updateSer
    @Expose
    public void updateSer(DeviceSer data)throws Exception{
        log.info("----------------------------------------------------------------");
    }
}