获取手机号

This commit is contained in:
2024-07-22 11:39:57 +08:00
parent cda3245f7b
commit 9a5c02a949
3 changed files with 22 additions and 4 deletions

View File

@@ -4,10 +4,7 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject;
import com.chaozhanggui.system.cashierservice.dao.*;
import com.chaozhanggui.system.cashierservice.entity.TbPlussShopStaff;
import com.chaozhanggui.system.cashierservice.entity.TbShopInfo;
import com.chaozhanggui.system.cashierservice.entity.TbToken;
import com.chaozhanggui.system.cashierservice.entity.TbmerchantAccount;
import com.chaozhanggui.system.cashierservice.entity.*;
import com.chaozhanggui.system.cashierservice.model.LoginReq;
import com.chaozhanggui.system.cashierservice.rabbit.RabbitProducer;
import com.chaozhanggui.system.cashierservice.sign.CodeEnum;
@@ -35,6 +32,8 @@ public class LoginService {
@Autowired
TbShopInfoMapper tbShopInfoMapper;
@Autowired
TbUserInfoMapper userInfoMapper;
@Autowired
TbProductMapper tbProductMapper;
@@ -187,4 +186,12 @@ public class LoginService {
return Result.success(SUCCESS,shopInfo);
}
public Result getPhone(Integer userId) {
TbUserInfo userInfo = userInfoMapper.selectByPrimaryKey(userId);
if (userInfo != null) {
return Result.success(SUCCESS, userInfo.getTelephone());
}
return Result.success(SUCCESS, "");
}
}