@@ -1,6 +1,7 @@
package com.qmrb.system.pojo.bo;
import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import java.util.Date;
@@ -60,6 +61,18 @@ public class UserBO {
private String deptName;
/**
+ * 用户类型 1 系统用户 2客商
+ */
+ @Schema(description="用户类型")
+ private String userType;
+
+ /**
+ * 优惠券模式 1:扫码模式 2:登记模式
+ @Schema(description="优惠券模式")
+ private String couponMode;
* 角色名称,多个使用英文逗号(,)分割
*/
private String roleNames;
@@ -1,5 +1,6 @@
+import com.baomidou.mybatisplus.annotation.TableField;
import java.util.List;
@@ -59,6 +60,16 @@ public class UserFormBO {
private Long deptId;
* 角色ID集合
private List<Long> roleIds;
@@ -78,6 +78,18 @@ public class SysUser implements Serializable {
* 逻辑删除标识(0:未删除;1:已删除)
private Integer deleted;
+ @TableField("user_type")
+ @TableField("coupon_mode")
@TableField(fill = FieldFill.INSERT)
@JsonInclude(value = JsonInclude.Include.NON_NULL)
package com.qmrb.system.pojo.form;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -53,4 +54,15 @@ public class UserForm {
@NotEmpty(message = "用户角色不能为空")
}
@@ -25,5 +25,9 @@ public class UserPageQuery extends BasePageQuery {
@Schema(description="部门ID")
-
@@ -57,4 +57,15 @@ public class UserPageVO {
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
@@ -14,6 +14,8 @@
u.gender,
u.avatar,
u.STATUS,
+ u.user_type,
+ u.coupon_mode,
d.NAME AS dept_name,
GROUP_CONCAT( r.NAME ) AS roleNames,
u.create_time,
@@ -39,6 +41,9 @@
<if test='queryParams.deptId!=null'>
AND concat(',',concat(d.tree_path,',',d.id),',') like concat('%,',#{queryParams.deptId},',%')
</if>
+ <if test='queryParams.userType!=null and queryParams.userType.trim() neq ""'>
+ AND u.user_type = #{queryParams.userType}
+ </if>
</where>
GROUP BY u.id,b.name
</select>
@@ -72,6 +77,8 @@
avatar,
email,
STATUS,
+ user_type,
+ coupon_mode,
dept_id
FROM sys_user
WHERE id = #{userId}