|
|
@@ -359,8 +359,8 @@ public class BankInfoServiceImpl implements BankInfoService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public ResultMap getCountByNumber(Integer type, String number) {
|
|
|
- if (type != Type.MALL.value() && type != Type.BUYER.value() && type != Type.SUP.value()){
|
|
|
+ public ResultMap getCountByNumber(String accountType, String number) {
|
|
|
+ if (!AccountType.PAY_TYPE.equals(accountType) && !AccountType.RECEIVE_TYPE.equals(accountType)){
|
|
|
return new ResultMap(CodeType.ERROR_STATE, "类型不存在,确认要查找账户的类型");
|
|
|
}
|
|
|
if (StringUtils.isEmpty(number)) {
|
|
|
@@ -368,10 +368,10 @@ public class BankInfoServiceImpl implements BankInfoService {
|
|
|
}
|
|
|
Integer count = null;
|
|
|
User user = SystemSession.getUser();
|
|
|
- if (user.getEnterprise() != null) {
|
|
|
- count = bankInfoDao.getSupCountByNumberAndDissociative(user.getEnterprise().getUu(), Type.ENTERPRISING.value(), Status.ALLOW.value(), number);
|
|
|
+ if (user.getEnterprise() == null) {
|
|
|
+ count = bankInfoDao.getBuyCountByNumberAndDissociative(user.getUserUU(), Type.PERSONAL.value(), Status.ALLOW.value(), number, accountType);
|
|
|
}else {
|
|
|
- count = bankInfoDao.getBuyerCountByNumberAndDissociative(user.getUserUU(), Type.PERSONAL.value(), Status.ALLOW.value(), number);
|
|
|
+ count = bankInfoDao.getSupCountByNumberAndDissociative(user.getEnterprise().getUu(), Type.ENTERPRISING.value(), Status.ALLOW.value(), number, accountType);
|
|
|
}
|
|
|
return ResultMap.success(count);
|
|
|
}
|