瀏覽代碼

记录错误数据时,新增类型 标记是手机号还是费用或者其他

王苗苗 2 月之前
父節點
當前提交
02df56a727

+ 1 - 1
slibra-admin/src/main/java/com/slibra/web/controller/business/ExcelController.java

@@ -304,7 +304,7 @@ public class ExcelController extends BaseController {
 
 
     /**
-     * 查询【请填写功能名称】列表
+     * 查询导入失败数据列表
      */
     @GetMapping("/getImportFailList")
     public R<List<TImportFail>> getImportFailList()

+ 1 - 0
slibra-admin/src/main/java/com/slibra/web/controller/listener/UpdateUserDataListener.java

@@ -88,6 +88,7 @@ public class UpdateUserDataListener extends AnalysisEventListener<UpdateUserExce
         map.put("failNum", failNum);
         map.put("successNum", successNum);
         map.put("failList", failList);
+        tImportFail.setType(0);
         tImportFail.setContent(JSON.toJSONString(map));
         tImportFail.setCreateTime(nowDate);
         tImportFail.setCreateBy("system");

+ 14 - 1
slibra-system/src/main/java/com/slibra/business/domain/TImportFail.java

@@ -18,6 +18,10 @@ public class TImportFail extends BaseEntity
     /** 主键 */
     private Long id;
 
+    /** 模块(0更新用户手机号 1更新费用等信息) */
+    @Excel(name = "模块", readConverterExp = "0=更新用户手机号,1=更新费用等信息")
+    private Integer type;
+
     /** 失败内容(JSON格式) */
     @Excel(name = "失败内容", readConverterExp = "J=SON格式")
     private String content;
@@ -38,7 +42,16 @@ public class TImportFail extends BaseEntity
     {
         return id;
     }
-    public void setContent(String content) 
+
+    public Integer getType() {
+        return type;
+    }
+
+    public void setType(Integer type) {
+        this.type = type;
+    }
+
+    public void setContent(String content)
     {
         this.content = content;
     }

+ 6 - 1
slibra-system/src/main/resources/mapper/business/TImportFailMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="TImportFail" id="TImportFailResult">
         <result property="id"    column="id"    />
+        <result property="type"    column="type"    />
         <result property="content"    column="content"    />
         <result property="delFlag"    column="del_flag"    />
         <result property="revision"    column="revision"    />
@@ -17,13 +18,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTImportFailVo">
-        select id, content, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_import_fail
+        select id, type, content, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_import_fail
     </sql>
 
     <select id="selectTImportFailList" parameterType="TImportFail" resultMap="TImportFailResult">
         <include refid="selectTImportFailVo"/>
         <where>
             1 = 1
+            <if test="type != null "> and type = #{type}</if>
             <if test="content != null  and content != ''"> and content = #{content}</if>
             <if test="revision != null "> and revision = #{revision}</if>
         </where>
@@ -38,6 +40,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertTImportFail" parameterType="TImportFail" useGeneratedKeys="true" keyProperty="id">
         insert into t_import_fail
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="type != null">type,</if>
             <if test="content != null">content,</if>
             <if test="delFlag != null">del_flag,</if>
             <if test="revision != null">revision,</if>
@@ -48,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="remark != null">remark,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="type != null">#{type},</if>
             <if test="content != null">#{content},</if>
             <if test="delFlag != null">#{delFlag},</if>
             <if test="revision != null">#{revision},</if>
@@ -62,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <update id="updateTImportFail" parameterType="TImportFail">
         update t_import_fail
         <trim prefix="SET" suffixOverrides=",">
+            <if test="type != null">type = #{type},</if>
             <if test="content != null">content = #{content},</if>
             <if test="delFlag != null">del_flag = #{delFlag},</if>
             <if test="revision != null">revision = #{revision},</if>