Browse Source

新增营销团队新增、详情、列表开发

anderx 1 year ago
parent
commit
eab3048b7c

+ 19 - 0
src/main/java/com/goafanti/admin/bo/AdminListBo.java

@@ -132,6 +132,25 @@ public class AdminListBo {
 	private String ambRole;
 	private String publicCarbonCopy;
 
+	private Integer teamId;
+	private String teamName;
+
+	public Integer getTeamId() {
+		return teamId;
+	}
+
+	public void setTeamId(Integer teamId) {
+		this.teamId = teamId;
+	}
+
+	public String getTeamName() {
+		return teamName;
+	}
+
+	public void setTeamName(String teamName) {
+		this.teamName = teamName;
+	}
+
 	public String getPublicCarbonCopy() {
 		return publicCarbonCopy;
 	}

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

@@ -49,6 +49,7 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		if(StringUtils.isNotBlank(alb.getMobile())) params.put("mobile", alb.getMobile());
 		if(StringUtils.isNotBlank(alb.getSuperiorId())) params.put("superiorId", alb.getSuperiorId());
 		if(StringUtils.isNotBlank(alb.getAmbId())) params.put("ambId", alb.getAmbId());
+		if(alb.getTeamId()!=null) params.put("teamId", alb.getTeamId());
 		if(StringUtils.isNotBlank(alb.getAncestors())) params.put("ancestors", alb.getAncestors());
 		if(alb.getAmbManage()!=null) params.put("ambManage", alb.getAmbManage());
 		if(alb.getSeniorStaff()!=null) params.put("seniorStaff", alb.getSeniorStaff());

+ 21 - 9
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -35,10 +35,11 @@
         <result property="expenseSuperExamine" column="expense_super_examine" jdbcType="INTEGER"/>
         <result property="publicCarbonCopy" column="public_carbon_copy" jdbcType="VARCHAR"/>
         <result property="callNo" column="call_no" jdbcType="VARCHAR"/>
+        <result property="teamId" column="team_id" jdbcType="INTEGER"/>
     </resultMap>
 
     <sql id="AdminAllSql">
-        id, mobile, name, password, email, create_time, number, province, position, superior_id, city, department_id, status, user_no, duty, district, head_portrait_url, contact_mobile, last_login_time, open_id, type, reviewer, amb_id, amb_role, amb_manage, manager_id, senior_staff, public_purview, expense_open_id, expense_super_examine, public_carbon_copy, call_no
+        id, mobile, name, password, email, create_time, number, province, position, superior_id, city, department_id, status, user_no, duty, district, head_portrait_url, contact_mobile, last_login_time, open_id, type, reviewer, amb_id, amb_role, amb_manage, manager_id, senior_staff, public_purview, expense_open_id, expense_super_examine, public_carbon_copy, call_no, team_id
     </sql>
 
     <!--查询单个-->
@@ -55,19 +56,19 @@
                           department_id, status, user_no, duty, district, head_portrait_url, contact_mobile,
                           last_login_time, open_id, type, reviewer, amb_id, amb_role, amb_manage, manager_id,
                           senior_staff, public_purview, expense_open_id, expense_super_examine, public_carbon_copy,
-                          call_no)
+                          call_no, team_id)
         values (#{mobile}, #{name}, #{password}, #{email}, #{createTime}, #{number}, #{province}, #{position},
                 #{superiorId}, #{city}, #{departmentId}, #{status}, #{userNo}, #{duty}, #{district}, #{headPortraitUrl},
                 #{contactMobile}, #{lastLoginTime}, #{openId}, #{type}, #{reviewer}, #{ambId}, #{ambRole}, #{ambManage},
                 #{managerId}, #{seniorStaff}, #{publicPurview}, #{expenseOpenId}, #{expenseSuperExamine},
-                #{publicCarbonCopy}, #{callNo})
+                #{publicCarbonCopy}, #{callNo}, #{teamId})
     </insert>
 
     <insert id="insertBatch">
         insert into admin(mobile, name, password, email, create_time, number, province, position, superior_id, city,
         department_id, status, user_no, duty, district, head_portrait_url, contact_mobile, last_login_time, open_id,
         type, reviewer, amb_id, amb_role, amb_manage, manager_id, senior_staff, public_purview, expense_open_id,
-        expense_super_examine, public_carbon_copy, call_no)
+        expense_super_examine, public_carbon_copy, call_no, team_id)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.mobile}, #{entity.name}, #{entity.password}, #{entity.email}, #{entity.createTime},
@@ -76,7 +77,7 @@
             #{entity.headPortraitUrl}, #{entity.contactMobile}, #{entity.lastLoginTime}, #{entity.openId},
             #{entity.type}, #{entity.reviewer}, #{entity.ambId}, #{entity.ambRole}, #{entity.ambManage},
             #{entity.managerId}, #{entity.seniorStaff}, #{entity.publicPurview}, #{entity.expenseOpenId},
-            #{entity.expenseSuperExamine}, #{entity.publicCarbonCopy}, #{entity.callNo})
+            #{entity.expenseSuperExamine}, #{entity.publicCarbonCopy}, #{entity.callNo}, #{entity.teamId})
         </foreach>
     </insert>
 
@@ -84,7 +85,7 @@
         insert into admin(mobile, name, password, email, create_time, number, province, position, superior_id, city,
         department_id, status, user_no, duty, district, head_portrait_url, contact_mobile, last_login_time, open_id,
         type, reviewer, amb_id, amb_role, amb_manage, manager_id, senior_staff, public_purview, expense_open_id,
-        expense_super_examine, public_carbon_copy, call_no)
+        expense_super_examine, public_carbon_copy, call_no, team_id)
         values
         <foreach collection="entities" item="entity" separator=",">
             (#{entity.mobile}, #{entity.name}, #{entity.password}, #{entity.email}, #{entity.createTime},
@@ -93,7 +94,7 @@
             #{entity.headPortraitUrl}, #{entity.contactMobile}, #{entity.lastLoginTime}, #{entity.openId},
             #{entity.type}, #{entity.reviewer}, #{entity.ambId}, #{entity.ambRole}, #{entity.ambManage},
             #{entity.managerId}, #{entity.seniorStaff}, #{entity.publicPurview}, #{entity.expenseOpenId},
-            #{entity.expenseSuperExamine}, #{entity.publicCarbonCopy}, #{entity.callNo})
+            #{entity.expenseSuperExamine}, #{entity.publicCarbonCopy}, #{entity.callNo}, #{entity.teamId})
         </foreach>
         on duplicate key update
         mobile = values(mobile),
@@ -126,7 +127,8 @@
         expense_open_id = values(expense_open_id),
         expense_super_examine = values(expense_super_examine),
         public_carbon_copy = values(public_carbon_copy),
-        call_no = values(call_no)
+        call_no = values(call_no),
+        team_id = values(team_id)
     </insert>
 
     <!--通过主键修改数据-->
@@ -226,6 +228,9 @@
             <if test="callNo != null and callNo != ''">
                 call_no = #{callNo},
             </if>
+            <if test="teamId != null">
+                team_id = #{teamId},
+            </if>
         </set>
         where id = #{id}
     </update>
@@ -482,13 +487,14 @@
     <!--*************************************************************************-->
     <select id="selectAdminListByPage" parameterType="java.lang.String" resultType="com.goafanti.admin.bo.AdminListBo">
         select a.id, a.mobile, a.name, a.position, a.email, a.province, a.city, a.create_time as createTime, aa.name as superior,dep.name departmentName,
-        a.superior_id as superiorId, a.department_id as departmentId, a.last_login_time as lastLoginTime, a.contact_mobile as contactMobile,
+        a.superior_id as superiorId, a.department_id as departmentId, a.last_login_time as lastLoginTime, a.contact_mobile as contactMobile,st.name teamName,a.team_id teamId,
         a.duty,a.status, a.type, ambs.id ambId,ambs.name ambName,ambs.ancestors_names ancestorsNames ,a.amb_role ambRole,a.senior_staff seniorStaff,a.public_purview publicPurview
         from admin a
         left join admin_location al on a.id = al.admin_id
         left join admin aa on aa.id = a.superior_id
         left join amb_system ambs on a.amb_id=ambs.id
         left join department dep on a.department_id = dep.id
+        left join sales_team st on a.team_id=st.id
         <if test="rid != null">
             RIGHT join (select uid from user_role where rid=#{rid,jdbcType=VARCHAR}) ur on a.id=ur.uid
         </if>
@@ -522,6 +528,9 @@
         <if test="ambId != null">
             and a.amb_id = #{ambId}
         </if>
+          <if test="teamId !=null">
+              and a.team_id=#{teamId}
+          </if>
         <if test="seniorStaff != null">
             and a.senior_staff = #{seniorStaff}
         </if>
@@ -579,6 +588,9 @@
         <if test="ambId != null">
             and a.amb_id = #{ambId}
         </if>
+        <if test="teamId !=null">
+            and a.team_id= #{teamId}
+        </if>
         <if test="seniorStaff != null">
             and a.senior_staff = #{seniorStaff}
         </if>

+ 13 - 4
src/main/java/com/goafanti/common/model/Admin.java

@@ -10,7 +10,7 @@ import java.util.Date;
  * (Admin)实体类
  *
  * @author makejava
- * @since 2024-11-19 11:09:35
+ * @since 2024-12-09 15:16:51
  */
 public class Admin extends BaseModel implements AftUser{
 
@@ -133,13 +133,14 @@ public class Admin extends BaseModel implements AftUser{
      * 公出抄送人
      */
     private String publicCarbonCopy;
-
-
-
     /**
      * 外呼号码
      */
     private String callNo;
+    /**
+     * 团队编号
+     */
+    private Integer teamId;
 
     private String	superior;
     private String reviewerName;
@@ -451,5 +452,13 @@ public class Admin extends BaseModel implements AftUser{
         this.callNo = callNo;
     }
 
+    public Integer getTeamId() {
+        return teamId;
+    }
+
+    public void setTeamId(Integer teamId) {
+        this.teamId = teamId;
+    }
+
 }