为了账号安全,请及时绑定邮箱和手机立即绑定

我找不到那些set get 但是每次都是跟着老师来的


package com.miaoshaproject.service.impl;


import com.miaoshaproject.dao.UserDOMapper;
import com.miaoshaproject.dao.UserPasswordDOMapper;
import com.miaoshaproject.dataobject.UserDO;
import com.miaoshaproject.dataobject.UserPasswordDO;
import com.miaoshaproject.service.UserService;
import com.miaoshaproject.service.model.UserModel;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserDOMapper userDOMapper;
//    private Object UserPasswordDO;
//    private Object UserDO;

    @Autowired
    private UserPasswordDOMapper userPasswordDOMapper;


    @Override
    public UserModel getUserById(Integer id) {
        //调用userDOMapper获取用户的dataobject
        UserDO userDO = userDOMapper.selectByPrimaryKey(id);

        UserPasswordDO userPasswordDO = userPasswordDOMapper.selectByUserId(userDO,getId());
    }

    private UserModel convertFromDataObject(UserDO, UserPasswordDO){
        if (UserDO == null){
            return null;
        }
        UserModel userModel = new UserModel();
        BeanUtils.copyProperties(UserDO,userModel);

        if (UserPasswordDO != null) {
            userModel.setEncrptPassword(UserPasswordDO, userModel.getEncrptPassword());
        }

        return userModel;
    }


正在回答

1 回答

问题描述可否清晰一点,什么叫找不到get,set?

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

我找不到那些set get 但是每次都是跟着老师来的

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信