| | |
| | |
|
| | | @Override
|
| | | public void bindPhone(Long uid, String phone) throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null)
|
| | | throw new UserAccountException(4, "用户不存在");
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public void unBindPhone(Long uid, String phone) throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null)
|
| | | throw new UserAccountException(4, "用户不存在");
|
| | |
|
| | |
| | | @Override
|
| | | public void bindTaoBao(Long uid, String tbOpenId, String tbNickName, String tbPortrait)
|
| | | throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null)
|
| | | throw new UserAccountException(4, "用户不存在");
|
| | |
|
| | |
| | |
|
| | | @Override
|
| | | public void unBindTaoBao(Long uid) throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null)
|
| | | throw new UserAccountException(4, "用户不存在");
|
| | | if (StringUtil.isNullOrEmpty(user.getOpenid()))
|
| | |
| | |
|
| | | @Override
|
| | | public void changeWXBind(AcceptData acceptData, Long uid, String code) throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null)
|
| | | throw new UserAccountException(4, "用户不存在");
|
| | | WXAccountInfoDTO wxAccount = Constant.getWXAccount(acceptData.getPlatform(), acceptData.getVersion());
|
| | |
| | | TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyyMMddHHmmss"));
|
| | |
|
| | | // 备份用户信息
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | |
|
| | | // TODO 备份资金明细
|
| | |
|
| | |
| | | public void clearUserPortrait(Long uid) {
|
| | | if (uid == null)
|
| | | return;
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | String prefix = String.format("/portrait/wx/%s_", user.getWxUnionId());
|
| | | ObjectListing list = COSManager.getInstance().getObjectList(prefix, null, 30);
|
| | | if (list != null && list.getObjectSummaries() != null)
|
| | |
| | | public String repairPortrait(Long uid) {
|
| | | if (uid == null)
|
| | | return null;
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null)
|
| | | return null;
|
| | | String prefix = String.format("/portrait/wx/%s_", user.getWxUnionId());
|
| | |
| | |
|
| | | @Override
|
| | | public void bindPhoneNew(Long uid, String phone) throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null) {
|
| | | throw new UserAccountException(1, "用户不存在");
|
| | | }
|
| | |
| | |
|
| | | @Override
|
| | | public void bindWeiXin(AcceptData acceptData, Long uid, String code) throws UserAccountException {
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | UserInfo user = userInfoMapper.selectAvailableByPrimaryKey(uid);
|
| | | if (user == null) {
|
| | | throw new UserAccountException(1, "用户不存在");
|
| | | }
|