Browse Source

管理员搜索列表去空处理修改

anderx 3 years ago
parent
commit
012b20b6c8

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

@@ -86,6 +86,9 @@ public class NewAdminServiceImpl extends BaseMybatisDao<AdminMapper> implements
 		}
 		ad.setType(sumType(roleIds));
 		int count=adminMapper.updateByPrimaryKeySelective(ad);
+		if (count>0&&ad.getAmbid()!=null){
+			//进行巴人数计算
+		}
 		List<Admin> Nos =adminMapper.selectIDNBySuperiorId(ad.getId());
 		return count;
 	}

+ 11 - 12
src/main/java/com/goafanti/common/mapper/AdminMapper.xml

@@ -24,12 +24,12 @@
     <result column="open_id" jdbcType="VARCHAR" property="openId" />
     <result column="type" jdbcType="INTEGER" property="type" />
     <result column="reviewer" jdbcType="VARCHAR" property="reviewer" />
-    <result column="ambId" jdbcType="VARCHAR" property="ambid" />
+    <result column="amb_id" jdbcType="VARCHAR" property="ambId" />
   </resultMap>
   <sql id="Base_Column_List">
     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, ambId
+    contact_mobile, last_login_time, open_id, `type`, reviewer, amb_id
   </sql>
   <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
     select
@@ -49,7 +49,7 @@
       user_no, duty, district,
       head_portrait_url, contact_mobile, last_login_time,
       open_id, `type`, reviewer,
-      ambId)
+      amb_id)
     values (#{mobile,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
       #{email,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{number,jdbcType=INTEGER},
       #{province,jdbcType=VARCHAR}, #{position,jdbcType=VARCHAR}, #{superiorId,jdbcType=VARCHAR},
@@ -57,7 +57,7 @@
       #{userNo,jdbcType=VARCHAR}, #{duty,jdbcType=VARCHAR}, #{district,jdbcType=VARCHAR},
       #{headPortraitUrl,jdbcType=VARCHAR}, #{contactMobile,jdbcType=VARCHAR}, #{lastLoginTime,jdbcType=TIMESTAMP},
       #{openId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{reviewer,jdbcType=VARCHAR},
-      #{ambid,jdbcType=VARCHAR})
+      #{ambId,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.Admin" useGeneratedKeys="true">
     insert into admin
@@ -125,8 +125,8 @@
       <if test="reviewer != null">
         reviewer,
       </if>
-      <if test="ambid != null">
-        ambId,
+      <if test="ambId != null">
+        amb_id,
       </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
@@ -193,8 +193,8 @@
       <if test="reviewer != null">
         #{reviewer,jdbcType=VARCHAR},
       </if>
-      <if test="ambid != null">
-        #{ambid,jdbcType=VARCHAR},
+      <if test="ambId != null">
+        #{ambId,jdbcType=VARCHAR},
       </if>
     </trim>
   </insert>
@@ -264,8 +264,8 @@
       <if test="reviewer != null">
         reviewer = #{reviewer,jdbcType=VARCHAR},
       </if>
-      <if test="ambid != null">
-        ambId = #{ambid,jdbcType=VARCHAR},
+      <if test="ambId != null">
+        amb_id = #{ambId,jdbcType=VARCHAR},
       </if>
     </set>
     where id = #{id,jdbcType=VARCHAR}
@@ -293,11 +293,10 @@
       open_id = #{openId,jdbcType=VARCHAR},
       `type` = #{type,jdbcType=INTEGER},
       reviewer = #{reviewer,jdbcType=VARCHAR},
-      ambId = #{ambid,jdbcType=VARCHAR}
+      amb_id = #{ambId,jdbcType=VARCHAR}
     where id = #{id,jdbcType=VARCHAR}
   </update>
 
-
   <select id="selectAllAdmin" resultMap="BaseResultMap">
     select
     <include refid="Base_Column_List" />

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

@@ -120,8 +120,7 @@ public class Admin extends BaseModel implements AftUser {
     /**
      * 阿米巴编号
      */
-    private String ambid;
-
+    private String ambId;
 
     /**
      * 上级管理用户名称
@@ -130,13 +129,6 @@ public class Admin extends BaseModel implements AftUser {
     private String reviewerName;
 
 
-    public String getAmbid() {
-        return ambid;
-    }
-
-    public void setAmbid(String ambid) {
-        this.ambid = ambid;
-    }
 
     public String getReviewerName() {
         return reviewerName;
@@ -342,4 +334,12 @@ public class Admin extends BaseModel implements AftUser {
     public void setReviewer(String reviewer) {
         this.reviewer = reviewer;
     }
+
+    public String getAmbId() {
+        return ambId;
+    }
+
+    public void setAmbId(String ambId) {
+        this.ambId = ambId;
+    }
 }