|
@@ -36,10 +36,12 @@ public class UserAccountBankServiceImpl extends ServiceImpl<UserAccountBankMappe
|
|
@Override
|
|
@Override
|
|
public ResultData addOrEditAccountBank(UserAccountBank userAccountBank) {
|
|
public ResultData addOrEditAccountBank(UserAccountBank userAccountBank) {
|
|
ResultData resultData = this.checkUserAccountBank(userAccountBank);
|
|
ResultData resultData = this.checkUserAccountBank(userAccountBank);
|
|
|
|
+ userAccountBank.setIsDelete(false);
|
|
if (resultData.getErr() != 0)
|
|
if (resultData.getErr() != 0)
|
|
return resultData;
|
|
return resultData;
|
|
QueryWrapper<UserAccountBank> queryByUnionid = new QueryWrapper<>();
|
|
QueryWrapper<UserAccountBank> queryByUnionid = new QueryWrapper<>();
|
|
queryByUnionid.eq("unionid", userAccountBank.getUnionid());
|
|
queryByUnionid.eq("unionid", userAccountBank.getUnionid());
|
|
|
|
+ queryByUnionid.eq("is_delete", false);
|
|
int existNumber = userAccountBankMapper.selectCount(queryByUnionid);
|
|
int existNumber = userAccountBankMapper.selectCount(queryByUnionid);
|
|
if (existNumber == 0)
|
|
if (existNumber == 0)
|
|
userAccountBank.setIsDefault(true);
|
|
userAccountBank.setIsDefault(true);
|
|
@@ -67,6 +69,7 @@ public class UserAccountBankServiceImpl extends ServiceImpl<UserAccountBankMappe
|
|
return ResultData.getFailResult("操作失败");
|
|
return ResultData.getFailResult("操作失败");
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public ResultData checkUserAccountBank(UserAccountBank userAccountBank) {
|
|
public ResultData checkUserAccountBank(UserAccountBank userAccountBank) {
|
|
if (StringUtils.isEmpty(userAccountBank.getUserId()))
|
|
if (StringUtils.isEmpty(userAccountBank.getUserId()))
|