Browse Source

新增每次通过后计算累计

anderx 3 years ago
parent
commit
3eb40f284a

+ 2 - 1
src/main/java/com/goafanti/ambSystem/service/AmbInvestService.java

@@ -2,6 +2,7 @@ package com.goafanti.ambSystem.service;
 
 import com.goafanti.ambSystem.bo.InputAmbInvest;
 import com.goafanti.ambSystem.bo.InputInvestList;
+import com.goafanti.ambSystem.bo.OutInvestList;
 import com.goafanti.ambSystem.bo.OutInvestLog;
 import com.goafanti.common.model.AmbSystem;
 import com.goafanti.core.mybatis.page.Pagination;
@@ -23,5 +24,5 @@ public interface AmbInvestService {
 
     List<AmbSystem> getInvestAmbList(Long id);
 
-    List<Object> AmbInvestDtailsList(Long id);
+    List<OutInvestList> AmbInvestDtailsList(Long id);
 }

+ 3 - 2
src/main/java/com/goafanti/ambSystem/service/Impl/AmbInvestServiceImpl.java

@@ -2,6 +2,7 @@ package com.goafanti.ambSystem.service.Impl;
 
 import com.goafanti.ambSystem.bo.InputAmbInvest;
 import com.goafanti.ambSystem.bo.InputInvestList;
+import com.goafanti.ambSystem.bo.OutInvestList;
 import com.goafanti.ambSystem.bo.OutInvestLog;
 import com.goafanti.ambSystem.service.AmbInvestService;
 import com.goafanti.common.constant.AFTConstants;
@@ -181,8 +182,8 @@ public class AmbInvestServiceImpl extends BaseMybatisDao<AmbInvestMapper> implem
     }
 
     @Override
-    public List<Object> AmbInvestDtailsList(Long id) {
+    public List<OutInvestList> AmbInvestDtailsList(Long id) {
 
-        return null;
+        return ambInvestMapper.selectAmbInvestDtailsList(id);
     }
 }

+ 4 - 4
src/main/java/com/goafanti/ambSystem/service/Impl/AmbServiceImpl.java

@@ -4,10 +4,7 @@ import com.goafanti.ambSystem.bo.AmbAll;
 import com.goafanti.ambSystem.bo.InputAmb;
 import com.goafanti.ambSystem.bo.OutAmb;
 import com.goafanti.ambSystem.service.AmbService;
-import com.goafanti.common.dao.AdminMapper;
-import com.goafanti.common.dao.AmbInvestLogMapper;
-import com.goafanti.common.dao.AmbInvestMapper;
-import com.goafanti.common.dao.AmbSystemMapper;
+import com.goafanti.common.dao.*;
 import com.goafanti.common.error.BusinessException;
 import com.goafanti.common.model.Admin;
 import com.goafanti.common.model.AmbSystem;
@@ -33,6 +30,8 @@ public class AmbServiceImpl extends BaseMybatisDao<AmbSystemMapper> implements A
     private AmbInvestLogMapper ambInvestLogMapper;
     @Autowired
     private AmbInvestMapper ambInvestMapper;
+    @Autowired
+    private RoleMapper roleMapper;
 
 
     @Override
@@ -66,6 +65,7 @@ public class AmbServiceImpl extends BaseMybatisDao<AmbSystemMapper> implements A
         if (in.getName()!=null&&!in.getName().equals(use.getName())){
             i=updateAncestorsNames(in,use.getName(),i);
         }
+
         in.setUpdateBy(TokenManager.getAdminId());
         in.setUpdateTime(new Date());
         ambSystemMapper.updateByPrimaryKeySelective(in);

+ 1 - 0
src/main/java/com/goafanti/common/dao/AmbInvestLogMapper.java

@@ -19,4 +19,5 @@ public interface AmbInvestLogMapper {
     int updateByPrimaryKey(AmbInvestLog record);
 
     List<OutInvestLog> selectByAmbInvestId(String id);
+
 }

+ 5 - 0
src/main/java/com/goafanti/common/dao/AmbInvestMapper.java

@@ -1,7 +1,10 @@
 package com.goafanti.common.dao;
 
+import com.goafanti.ambSystem.bo.OutInvestList;
 import com.goafanti.common.model.AmbInvest;
 
+import java.util.List;
+
 public interface AmbInvestMapper {
     int deleteByPrimaryKey(Long id);
 
@@ -16,4 +19,6 @@ public interface AmbInvestMapper {
     int updateByPrimaryKey(AmbInvest record);
 
     Integer selectCountAmountById(Long id);
+
+    List<OutInvestList> selectAmbInvestDtailsList(Long id);
 }

+ 9 - 0
src/main/java/com/goafanti/common/mapper/AmbInvestMapper.xml

@@ -161,4 +161,13 @@
     from amb_invest
     where status=2 and  accept_amb_id = #{id}
   </select>
+  <select id="selectAmbInvestDtailsList" resultType="com.goafanti.ambSystem.bo.OutInvestList">
+    select a.id,a.initiate_amb_id initiateAmbId ,a.accept_amb_id acceptAmbId,a.amount ,a.status ,
+           a.comment , date_format(a.create_time,'%Y-%m-%d %H:%i:%S') createTimes,
+           b.name initiateName,c.name acceptName,d.name operator
+    from amb_invest  a left join amb_system b on a.initiate_amb_id =b.id
+    left join amb_system c on a.accept_amb_id =c.id left join admin d on a.operator =d.id
+    where a.accept_amb_id = #{id} and a.status =2
+
+  </select>
 </mapper>

+ 1 - 1
src/main/resources/props/config_local.properties

@@ -52,7 +52,7 @@ yxjl_max=100
 amb.maxLvl=6
 
 avatar.host=//static.jishutao.com
-static.host=//static.jishutao.com/1.2.55
+static.host=//static.jishutao.com/1.2.56
 #avatar.host=//172.16.0.255:3000
 #static.host=//172.16.0.255:3000/1.2.14
 #static.host=http://172.16.1.187/prod/1.2.25