Browse Source

报销详情修改

anderx 1 year ago
parent
commit
342c57a596

+ 2 - 4
src/main/java/com/goafanti/common/dao/UserSuperEvaluateMapper.java

@@ -10,7 +10,7 @@ import java.util.List;
  * 客户上级评价(UserSuperEvaluate)表数据库访问层
  *
  * @author makejava
- * @since 2024-07-17 08:51:36
+ * @since 2024-09-25 15:42:39
  */
 public interface UserSuperEvaluateMapper {
 
@@ -22,13 +22,12 @@ public interface UserSuperEvaluateMapper {
      */
     UserSuperEvaluate queryById(Integer id);
 
-    
 
     /**
      * 查询指定行数据
      *
      * @param userSuperEvaluate 查询条件
-     * @param pageable         分页对象
+     * @param pageable          分页对象
      * @return 对象列表
      */
     List<UserSuperEvaluate> findUserSuperEvaluateList(UserSuperEvaluate userSuperEvaluate, @Param("pageable") Pageable pageable);
@@ -82,6 +81,5 @@ public interface UserSuperEvaluateMapper {
      */
     int deleteById(Integer id);
 
-
 }
 

+ 62 - 31
src/main/java/com/goafanti/common/mapper/UserSuperEvaluateMapper.xml

@@ -1,40 +1,53 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.goafanti.common.dao.UserSuperEvaluateMapper">
-
     <resultMap type="com.goafanti.common.model.UserSuperEvaluate" id="UserSuperEvaluateMap">
         <result property="id" column="id" jdbcType="INTEGER"/>
         <result property="uid" column="uid" jdbcType="VARCHAR"/>
         <result property="aid" column="aid" jdbcType="VARCHAR"/>
         <result property="content" column="content" jdbcType="VARCHAR"/>
         <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
+        <result property="type" column="type" jdbcType="INTEGER"/>
     </resultMap>
-    
+
     <sql id="UserSuperEvaluateAllSql">
-id, uid, aid, content, create_time        
+        id, uid, aid, content, create_time, type
     </sql>
 
     <!--查询单个-->
     <select id="queryById" resultMap="UserSuperEvaluateMap">
         select
-          <include refid="UserSuperEvaluateAllSql"/>
+        <include refid="UserSuperEvaluateAllSql"/>
         from user_super_evaluate
         where id = #{id}
     </select>
 
     <!--查询指定行数据-->
-    <select id="findUserSuperEvaluateList" resultType="com.goafanti.customer.bo.OutUserSuperEvaluate">
+    <select id="findUserSuperEvaluateList" resultMap="UserSuperEvaluateMap">
         select
-          a.id, a.uid, a.aid, a.content, a.create_time as createTime,b.name adminName
-        from user_super_evaluate a left join admin b  on a.aid=b.id
-        where 1=1
+        <include refid="UserSuperEvaluateAllSql"/>
+
+        from user_super_evaluate
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
             <if test="uid != null and uid != ''">
-                and a.uid = #{uid}
+                and uid = #{uid}
             </if>
             <if test="aid != null and aid != ''">
-                and a.aid = #{aid}
+                and aid = #{aid}
+            </if>
+            <if test="content != null and content != ''">
+                and content = #{content}
             </if>
-            order by a.create_time desc
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="type != null">
+                and type = #{type}
+            </if>
+        </where>
         <if test="page_sql != null">
             ${page_sql}
         </if>
@@ -44,40 +57,54 @@ id, uid, aid, content, create_time
     <select id="findUserSuperEvaluateCount" resultType="java.lang.Integer">
         select count(1)
         from user_super_evaluate
-        where 1=1
-        <if test="uid != null and uid != ''">
-            and uid = #{uid}
-        </if>
-        <if test="aid != null and aid != ''">
-            and aid = #{aid}
-        </if>
+        <where>
+            <if test="id != null">
+                and id = #{id}
+            </if>
+            <if test="uid != null and uid != ''">
+                and uid = #{uid}
+            </if>
+            <if test="aid != null and aid != ''">
+                and aid = #{aid}
+            </if>
+            <if test="content != null and content != ''">
+                and content = #{content}
+            </if>
+            <if test="createTime != null">
+                and create_time = #{createTime}
+            </if>
+            <if test="type != null">
+                and type = #{type}
+            </if>
+        </where>
     </select>
 
     <!--新增所有列-->
     <insert id="insert" keyProperty="id" useGeneratedKeys="true">
-        insert into user_super_evaluate(uid, aid, content)
-        values (#{uid}, #{aid}, #{content})
+        insert into user_super_evaluate(uid, aid, content, create_time, type)
+        values (#{uid}, #{aid}, #{content}, #{createTime}, #{type})
     </insert>
 
-    <insert id="insertBatch" >
-        insert into user_super_evaluate(uid, aid, content, create_time)
+    <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
+        insert into user_super_evaluate(uid, aid, content, create_time, type)
         values
         <foreach collection="entities" item="entity" separator=",">
-        (#{entity.uid}, #{entity.aid}, #{entity.content}, #{entity.createTime})
+            (#{entity.uid}, #{entity.aid}, #{entity.content}, #{entity.createTime}, #{entity.type})
         </foreach>
     </insert>
 
     <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
-        insert into user_super_evaluate(uid, aid, content, create_time)
+        insert into user_super_evaluate(uid, aid, content, create_time, type)
         values
         <foreach collection="entities" item="entity" separator=",">
-            (#{entity.uid}, #{entity.aid}, #{entity.content}, #{entity.createTime})
+            (#{entity.uid}, #{entity.aid}, #{entity.content}, #{entity.createTime}, #{entity.type})
         </foreach>
         on duplicate key update
-uid = values(uid),
-aid = values(aid),
-content = values(content),
-create_time = values(create_time)
+        uid = values(uid),
+        aid = values(aid),
+        content = values(content),
+        create_time = values(create_time),
+        type = values(type)
     </insert>
 
     <!--通过主键修改数据-->
@@ -96,14 +123,18 @@ create_time = values(create_time)
             <if test="createTime != null">
                 create_time = #{createTime},
             </if>
+            <if test="type != null">
+                type = #{type},
+            </if>
         </set>
         where id = #{id}
     </update>
 
     <!--通过主键删除-->
     <delete id="deleteById">
-        delete from user_super_evaluate where id = #{id}
+        delete
+        from user_super_evaluate
+        where id = #{id}
     </delete>
-
 </mapper>
 

+ 17 - 5
src/main/java/com/goafanti/common/model/UserSuperEvaluate.java

@@ -10,26 +10,30 @@ import java.util.Date;
  * 客户上级评价(UserSuperEvaluate)实体类
  *
  * @author makejava
- * @since 2024-07-17 08:51:36
+ * @since 2024-09-25 15:42:39
  */
 public class UserSuperEvaluate implements Serializable {
-    private static final long serialVersionUID = 929784712765516591L;
+    private static final long serialVersionUID = 641598732129602417L;
 
     private Integer id;
 
     private String uid;
-/**
+    /**
      * 评价人
      */
     private String aid;
-/**
+    /**
      * 面谈思路
      */
     private String content;
-/**
+    /**
      * 创建时间
      */
     private Date createTime;
+    /**
+     * 类别 0=其他,1=技术,2=营销,3=业务
+     */
+    private Integer type;
 
 
     public Integer getId() {
@@ -73,5 +77,13 @@ public class UserSuperEvaluate implements Serializable {
         this.createTime = createTime;
     }
 
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
 }
 

+ 1 - 0
src/main/java/com/goafanti/customer/service/impl/UserSuperEvaluateServiceImpl.java

@@ -31,6 +31,7 @@ public class UserSuperEvaluateServiceImpl extends BaseMybatisDao< UserSuperEvalu
 		Map<String, Object> params = new HashMap<>();
         params.put("uid",userSuperEvaluate.getUid());
         params.put("aid",userSuperEvaluate.getAid());
+        params.put("type",userSuperEvaluate.getType());
 		return (Pagination<OutUserSuperEvaluate>) findPage("findUserSuperEvaluateList",
 				"findUserSuperEvaluateCount", params, pageNo, pageSize);
 	}