封版
This commit is contained in:
@@ -63,7 +63,6 @@ public class UserController extends BaseController {
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:auth:user')")
|
||||
@OperationLog
|
||||
@ApiOperation("查询全部用户")
|
||||
@GetMapping()
|
||||
public ApiResult<List<User>> list(UserParam param) {
|
||||
@@ -71,7 +70,6 @@ public class UserController extends BaseController {
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:auth:user')")
|
||||
@OperationLog
|
||||
@ApiOperation("根据id查询用户")
|
||||
@GetMapping("/{id}")
|
||||
public ApiResult<User> get(@PathVariable("id") Integer id) {
|
||||
@@ -79,7 +77,6 @@ public class UserController extends BaseController {
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:auth:user')")
|
||||
@OperationLog
|
||||
@ApiOperation("根据手机号码查询用户")
|
||||
@GetMapping("/getByPhone/{phone}")
|
||||
public ApiResult<User> getByPhone(@PathVariable("phone") String phone) {
|
||||
@@ -87,7 +84,6 @@ public class UserController extends BaseController {
|
||||
}
|
||||
|
||||
@PreAuthorize("hasAuthority('sys:user:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("添加用户")
|
||||
@PostMapping()
|
||||
public ApiResult<?> add(@RequestBody User user) {
|
||||
@@ -251,7 +247,6 @@ public class UserController extends BaseController {
|
||||
* excel导入用户
|
||||
*/
|
||||
@PreAuthorize("hasAuthority('sys:user:save')")
|
||||
@OperationLog
|
||||
@ApiOperation("导入用户")
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
@PostMapping("/import")
|
||||
|
||||
@@ -28,7 +28,7 @@ public class User implements UserDetails {
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer userId;
|
||||
|
||||
@ApiModelProperty("用户类型, 0普通用户 6开发者 10企业用户")
|
||||
@ApiModelProperty("用户类型, 0普通用户")
|
||||
private Integer type;
|
||||
|
||||
@ApiModelProperty("用户编码")
|
||||
|
||||
@@ -26,10 +26,7 @@
|
||||
<sql id="selectSql">
|
||||
SELECT a.*,
|
||||
b.organization_name,
|
||||
c.dict_data_name sex_name,
|
||||
e.tenant_name,
|
||||
g.grade_id,g.name as gradeName,
|
||||
h.dealer_id
|
||||
c.dict_data_name sex_name
|
||||
FROM sys_user a
|
||||
LEFT JOIN sys_organization b ON a.organization_id = b.organization_id
|
||||
LEFT JOIN (
|
||||
@@ -38,9 +35,6 @@
|
||||
LEFT JOIN(
|
||||
<include refid="selectUserRoleSql"/>
|
||||
) d ON a.user_id = d.user_id
|
||||
LEFT JOIN sys_tenant e ON a.tenant_id = e.tenant_id
|
||||
LEFT JOIN sys_user_grade g ON a.grade_id = g.grade_id
|
||||
LEFT JOIN sys_user_referee h ON a.user_id = h.user_id and h.deleted = 0
|
||||
<where>
|
||||
<if test="param.userId != null">
|
||||
AND a.user_id = #{param.userId}
|
||||
@@ -126,9 +120,6 @@
|
||||
<if test="param.city != null">
|
||||
AND a.city LIKE CONCAT('%', #{param.city}, '%')
|
||||
</if>
|
||||
<if test="param.cityMate != null">
|
||||
AND i.city_mate LIKE CONCAT('%', #{param.cityMate}, '%')
|
||||
</if>
|
||||
<if test="param.region != null">
|
||||
AND a.region LIKE CONCAT('%', #{param.region}, '%')
|
||||
</if>
|
||||
@@ -138,21 +129,14 @@
|
||||
<if test="param.sexName != null">
|
||||
AND c.dict_data_name = #{param.sexName}
|
||||
</if>
|
||||
<if test="param.gradeId != null">
|
||||
AND g.grade_id = #{param.gradeId}
|
||||
</if>
|
||||
<if test="param.keywords != null">
|
||||
AND (
|
||||
a.username LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
a.username = #{param.keywords}
|
||||
OR a.user_id = #{param.keywords}
|
||||
OR a.nickname LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.real_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.alias LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.phone LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.email LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR b.organization_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR c.dict_data_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR d.role_name LIKE CONCAT('%', #{param.keywords}, '%')
|
||||
OR a.phone = #{param.keywords}
|
||||
OR a.email = #{param.keywords}
|
||||
)
|
||||
</if>
|
||||
<if test="param.parentId != null">
|
||||
@@ -175,13 +159,12 @@
|
||||
<select id="selectByUsername" resultType="com.gxwebsoft.common.system.entity.User">
|
||||
SELECT a.* ,
|
||||
b.organization_name,
|
||||
c.dict_data_name sex_name,f.oauth_id as openid,f.unionid
|
||||
c.dict_data_name sex_name
|
||||
FROM sys_user a
|
||||
LEFT JOIN sys_organization b ON a.organization_id = b.organization_id
|
||||
LEFT JOIN (
|
||||
<include refid="selectSexDictSql"/>
|
||||
) c ON a.sex = c.dict_data_code
|
||||
LEFT JOIN sys_user_oauth f ON f.user_id = a.user_id and f.oauth_type = 'MP-WEIXIN'
|
||||
<where>
|
||||
AND a.deleted = 0
|
||||
AND (a.username = #{username} OR a.phone = #{username} OR a.email = #{username})
|
||||
|
||||
@@ -69,7 +69,8 @@ public class SysGenerator {
|
||||
// "sys_website_field",
|
||||
// "sys_white_domain"
|
||||
// "sys_order",
|
||||
"sys_user_collection"
|
||||
// "sys_user_collection",
|
||||
"sys_user"
|
||||
};
|
||||
// 需要去除的表前缀
|
||||
private static final String[] TABLE_PREFIX = new String[]{
|
||||
|
||||
Reference in New Issue
Block a user