Explorar el Código

修改其他说明和备注接口开发

anderx hace 1 año
padre
commit
ccb5cc50d3

+ 3 - 3
src/main/java/com/goafanti/expenseAccount/service/impl/ExpenseAccountServiceImpl.java

@@ -378,10 +378,10 @@ public class ExpenseAccountServiceImpl extends BaseMybatisDao<ExpenseAccountMapp
     public Object updateTypeOther(Integer id, String typeOther,String remarks) {
         ExpenseAccount ea = new ExpenseAccount();
         ea.setId(id);
-        ea.setTypeOther(typeOther);
-        ea.setRemarks(remarks);
+        if (StringUtils.isNotEmpty(typeOther))ea.setTypeOther(typeOther);
+        if (StringUtils.isNotEmpty(remarks))ea.setRemarks(remarks);
         expenseAccountMapper.updateByPrimaryKeySelective(ea);
-        if (typeOther!=null){
+        if (StringUtils.isNotEmpty(typeOther)){
             MainExpenseAccount mainExpenseAccount = expenseAccountMapper.selectbySonId(id);
             StringBuffer types=new StringBuffer();
             for (SonExpenseAccount e : mainExpenseAccount.getSonList()) {