Browse Source

管理员修改新增去掉经理

anderx 10 months ago
parent
commit
d96f80f915

+ 3 - 0
src/main/java/com/goafanti/admin/service/impl/NewAdminServiceImpl.java

@@ -124,6 +124,9 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		ad.setType(sumType(roleIds));
 		if (ad.getExpenseSuperExamine()==null)ad.setExpenseSuperExamine(0);
 		int count=adminMapper.update(ad);
+		if (ad.getManagerId()==null){
+			adminMapper.updateManagerId(ad);
+		}
 		//
 		asyncUtils.pushRoleUpdateExamine(ad,useAdmin,roleIds,useRole);
 		//修改公出审核人

+ 2 - 0
src/main/java/com/goafanti/common/dao/AdminMapper.java

@@ -282,6 +282,8 @@ public interface AdminMapper {
     List<Admin> queryByTeamId(Integer id);
 
     AdminStatisticsBo selectUserCount(@Param("aid") String aid, @Param("startTime") String startTime, @Param("endTime") String endTime);
+
+    void updateManagerId(Admin ad);
 }
 
 

+ 3 - 0
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -1301,6 +1301,9 @@
         where a.process_status in (0,1,2,3) and a.status =1 and b.process_status =3 and b.status =0
           and a.apply_dep = #{id}
     </update>
+    <update id="updateManagerId">
+        update admin set manager_id = #{managerId} where id = #{id}
+    </update>
 
     <select id="agentList" resultMap="AdminMap">
         select