Browse Source

增加权限申请接口

yangxiaokun 3 years ago
parent
commit
992c1cb7e0

+ 1 - 1
src/main/java/com/zy/bms/common/aspect/LogAspect.java

@@ -32,7 +32,7 @@ public class LogAspect {
         } catch (Throwable throwable) {
             log.error(buildMsg(joinPoint), throwable);
         }
-        return ServerResponse.createByError();
+        return ServerResponse.error();
     }
 
     private String buildMsg(ProceedingJoinPoint joinPoint) {

+ 5 - 2
src/main/java/com/zy/bms/entity/PrivilegeApplyRecord.java

@@ -8,9 +8,7 @@ import java.time.LocalDateTime;
 import java.io.Serializable;
 
 /**
- * <p>
  * 权限申请记录
- * </p>
  *
  * @author chenyi
  * @since 2021-07-12
@@ -28,6 +26,11 @@ public class PrivilegeApplyRecord implements Serializable {
      */
     private Integer userId;
 
+    /**
+     * 姓名
+     */
+    private String name;
+
     /**
      * 手机号
      */

+ 3 - 7
src/main/java/com/zy/bms/pojo/io/PrivilegeApplyIO.java

@@ -12,14 +12,10 @@ import lombok.Data;
 public class PrivilegeApplyIO extends PageIO {
 
     /**
-     * 手机号
+     * 关键字
+     * 手机号,备注
      */
-    private String phone;
-
-    /**
-     * 备注
-     */
-    private String remark;
+    private String key;
 
     /**
      * 1通过 -1拒绝 0待审核

+ 2 - 7
src/main/resources/mapper/PrivilegeApplyRecordMapper.xml

@@ -8,14 +8,9 @@
         FROM
             privilege_apply_record
         <where>
-            <if test="io.phone != null and io.phone != ''">
-                AND phone LIKE CONCAT('%',#{io.phone},'%')
+            <if test="io.key != null and io.key != ''">
+                AND (phone LIKE CONCAT('%',#{io.key},'%') OR remark LIKE CONCAT('%',#{io.key},'%'))
             </if>
-
-            <if test="io.remark != null and io.remark != ''">
-                AND remark LIKE CONCAT('%',#{io.phone},'%')
-            </if>
-
             <if test="io.status != null">
                 AND status = #{io.status}
             </if>