Browse Source

有效面谈逻辑修改

anderx 9 months ago
parent
commit
5bc4817733

+ 1 - 0
src/main/java/com/goafanti/Interview/service/impl/UserInterviewProjectServiceImpl.java

@@ -58,6 +58,7 @@ public class UserInterviewProjectServiceImpl extends BaseMybatisDao<UserIntervie
     @Override
     public UserInterviewProject insert(UserInterviewProject userInterviewProject) {
         userInterviewProject.setType(0);
+        userInterviewProject.setAid(TokenManager.getAdminId());
         this.userInterviewProjectMapper.insert(userInterviewProject);
         return userInterviewProject;
     }

+ 18 - 22
src/main/java/com/goafanti/common/mapper/UserFirstInterviewMapper.xml

@@ -6,11 +6,12 @@
         <result property="id" column="id" jdbcType="INTEGER"/>
         <result property="uid" column="uid" jdbcType="VARCHAR"/>
         <result property="aid" column="aid" jdbcType="VARCHAR"/>
+        <result property="pid" column="pid" jdbcType="VARCHAR"/>
         <result property="firstTime" column="first_time" jdbcType="TIMESTAMP"/>
     </resultMap>
 
     <sql id="UserFirstInterviewAllSql">
-        id, uid, aid, first_time
+        id, uid, aid, pid, first_time
     </sql>
 
     <!--查询单个-->
@@ -23,27 +24,28 @@
 
     <!--新增所有列-->
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
-        insert into user_first_interview(uid, aid, first_time)
-        values (#{uid}, #{aid}, #{firstTime})
+        insert into user_first_interview(uid, aid, pid, first_time)
+        values (#{uid}, #{aid}, #{pid}, #{firstTime})
     </insert>
 
     <insert id="insertBatch">
-        insert into user_first_interview(uid, aid, first_time)
+        insert into user_first_interview(uid, aid, pid, first_time)
         values
         <foreach collection="entities" item="entity" separator=",">
-            (#{entity.uid}, #{entity.aid}, #{entity.firstTime})
+            (#{entity.uid}, #{entity.aid}, #{entity.pid}, #{entity.firstTime})
         </foreach>
     </insert>
 
     <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into user_first_interview(uid, aid, first_time)
+        insert into user_first_interview(uid, aid, pid, first_time)
         values
         <foreach collection="entities" item="entity" separator=",">
-            (#{entity.uid}, #{entity.aid}, #{entity.firstTime})
+            (#{entity.uid}, #{entity.aid}, #{entity.pid}, #{entity.firstTime})
         </foreach>
         on duplicate key update
         uid = values(uid),
         aid = values(aid),
+        pid = values(pid),
         first_time = values(first_time)
     </insert>
 
@@ -57,6 +59,9 @@
             <if test="aid != null and aid != ''">
                 aid = #{aid},
             </if>
+            <if test="pid != null and pid != ''">
+                pid = #{pid},
+            </if>
             <if test="firstTime != null">
                 first_time = #{firstTime},
             </if>
@@ -80,6 +85,9 @@
             <if test="aid != null and aid != ''">
                 and aid = #{aid}
             </if>
+            <if test="pid != null and pid != ''">
+                and pid = #{pid}
+            </if>
             <if test="firstTime != null">
                 and first_time = #{firstTime}
             </if>
@@ -103,13 +111,15 @@
             <if test="aid != null and aid != ''">
                 and aid = #{aid}
             </if>
+            <if test="pid != null and pid != ''">
+                and pid = #{pid}
+            </if>
             <if test="firstTime != null">
                 and first_time = #{firstTime}
             </if>
         </where>
     </select>
 
-
     <!--通过主键删除-->
     <delete id="deleteById">
         delete
@@ -117,19 +127,5 @@
         where id = #{id}
     </delete>
 
-    <select id="selectByUidAid" resultMap="UserFirstInterviewMap">
-        select
-        <include refid="UserFirstInterviewAllSql"/>
-        from user_first_interview
-        <where>
-        <if test="uid != null and uid != ''">
-            and uid = #{uid}
-        </if>
-        <if test="aid != null and aid != ''">
-            and aid = #{aid}
-        </if>
-        </where>
-    </select>
-
 </mapper>
 

+ 14 - 2
src/main/java/com/goafanti/common/model/UserFirstInterview.java

@@ -8,10 +8,10 @@ import java.util.Date;
  * 客户首次面谈表(UserFirstInterview)实体类
  *
  * @author makejava
- * @since 2025-04-11 14:04:36
+ * @since 2025-04-17 10:58:15
  */
 public class UserFirstInterview implements Serializable {
-    private static final long serialVersionUID = 901985596989280759L;
+    private static final long serialVersionUID = -64029579838669528L;
 
     private Integer id;
     /**
@@ -23,6 +23,10 @@ public class UserFirstInterview implements Serializable {
      */
     private String aid;
     /**
+     * 项目编号
+     */
+    private String pid;
+    /**
      * 首次面谈时间
      */
     private Date firstTime;
@@ -52,6 +56,14 @@ public class UserFirstInterview implements Serializable {
         this.aid = aid;
     }
 
+    public String getPid() {
+        return pid;
+    }
+
+    public void setPid(String pid) {
+        this.pid = pid;
+    }
+
     public Date getFirstTime() {
         return firstTime;
     }

+ 2 - 0
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -1202,6 +1202,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 						UserFirstInterview userFirstInterview = new UserFirstInterview();
 						userFirstInterview.setUid(e.getUid());
 						userFirstInterview.setAid(use.getAid());
+
+						userFirstInterview.setPid(use.getPid());
 						userFirstInterview.setFirstTime(new Date());
 						userFirstInterviewMapper.insert(userFirstInterview);
 					}