| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import com.yeshi.fanli.entity.SystemEnum;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | |
| | | throw new AlipayAccountException(AlipayAccountException.CODE_NO_PARAMS, "账号不能为空");
|
| | | if (StringUtil.isNullOrEmpty(name))
|
| | | throw new AlipayAccountException(AlipayAccountException.CODE_NO_PARAMS, "真实姓名不能为空");
|
| | | //
|
| | |
|
| | | List<BindingAccount> bindingAccountList = bindingAccountMapper.selectByAccount(account);
|
| | |
|
| | | if (bindingAccountList != null && bindingAccountList.size() > 0) {
|
| | | if (bindingAccountList.get(0).getUserInfo().getId().longValue() != uid)
|
| | | UserInfo user = userInfoMapper.selectByPrimaryKey(uid);
|
| | | SystemEnum systemEnum = user.getSystem();
|
| | |
|
| | | for (int i = 0; i < bindingAccountList.size(); i++) {
|
| | | UserInfo u = userInfoMapper.selectByPrimaryKey(bindingAccountList.get(i).getUserInfo().getId());
|
| | | //同一系统下绑定账号不能重复
|
| | | if (u.getSystem() == systemEnum && bindingAccountList.get(i).getUserInfo().getId().longValue() != uid) {
|
| | | throw new AlipayAccountException(AlipayAccountException.CODE_ALREADY_BIND,
|
| | | "该支付宝账号已被其他账号绑定,请更换其他的支付宝账号来绑定");
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | AlipayAccountValidNormalHistory latest = alipayAccountValidNormalHistoryMapper.selectLatestByUid(uid);
|
| | | if (latest != null) {
|