|
|
@@ -1,6 +1,7 @@
|
|
|
package com.goafanti.expenseAccount.service.impl;
|
|
|
|
|
|
import com.goafanti.common.dao.ExpenseAccountPrivateMapper;
|
|
|
+import com.goafanti.common.model.ExpenseAccountPrivate;
|
|
|
import com.goafanti.core.mybatis.BaseMybatisDao;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
@@ -52,11 +53,8 @@ public class ExpenseAccountPrivateServiceImpl extends BaseMybatisDao<ExpenseAcco
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public boolean checkAccounts(InputExpenseAccountPrivate in) {
|
|
|
- InputExpenseAccountPrivate check=new InputExpenseAccountPrivate();
|
|
|
- check.setAid(in.getAid());
|
|
|
- check.setAccounts(in.getAccounts());
|
|
|
- Integer checkCount = expenseAccountPrivateMapper.checkParam(check);
|
|
|
+ public boolean addCheckAccounts(InputExpenseAccountPrivate in) {
|
|
|
+ Integer checkCount =checkCount(in);
|
|
|
if (checkCount>0){
|
|
|
return true;
|
|
|
}else {
|
|
|
@@ -64,4 +62,27 @@ public class ExpenseAccountPrivateServiceImpl extends BaseMybatisDao<ExpenseAcco
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+ private Integer checkCount(InputExpenseAccountPrivate in) {
|
|
|
+ InputExpenseAccountPrivate check=new InputExpenseAccountPrivate();
|
|
|
+ check.setAid(in.getAid());
|
|
|
+ check.setAccounts(in.getAccounts());
|
|
|
+ return expenseAccountPrivateMapper.checkParam(check);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int update(InputExpenseAccountPrivate in) {
|
|
|
+ return 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean updateCheckAccounts(InputExpenseAccountPrivate in) {
|
|
|
+ ExpenseAccountPrivate accountPrivate = expenseAccountPrivateMapper.selectByAccount(in.getAccounts());
|
|
|
+ if (accountPrivate.getAid().equals(in.getAid())){
|
|
|
+ return false;
|
|
|
+ }else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
}
|