Merge remote-tracking branch 'ruoyi-vue/master' into dev
# Conflicts: # README.md # pom.xml # ruoyi-admin/pom.xml # ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java # ruoyi-admin/src/main/resources/application.yml # ruoyi-common/pom.xml # ruoyi-common/src/main/java/com/ruoyi/common/core/domain/R.java # ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtil.java # ruoyi-framework/pom.xml # ruoyi-framework/src/main/java/com/ruoyi/framework/aspectj/RateLimiterAspect.java # ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysRegisterService.java # ruoyi-generator/pom.xml # ruoyi-job/pom.xml # ruoyi-system/pom.xml # ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java # ruoyi-system/src/main/java/com/ruoyi/system/service/ISysUserService.java # ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java # ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml # ruoyi-ui/package.json # ruoyi-ui/src/views/index.vue
This commit is contained in:
commit
95010d4a4c
@ -158,7 +158,9 @@ public class SysUserController extends BaseController {
|
|||||||
public R<Void> edit(@Validated @RequestBody SysUser user) {
|
public R<Void> edit(@Validated @RequestBody SysUser user) {
|
||||||
userService.checkUserAllowed(user);
|
userService.checkUserAllowed(user);
|
||||||
userService.checkUserDataScope(user.getUserId());
|
userService.checkUserDataScope(user.getUserId());
|
||||||
if (StringUtils.isNotEmpty(user.getPhonenumber())
|
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) {
|
||||||
|
return R.fail("修改用户'" + user.getUserName() + "'失败,登录账号已存在");
|
||||||
|
} else if (StringUtils.isNotEmpty(user.getPhonenumber())
|
||||||
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
|
&& UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) {
|
||||||
return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在");
|
||||||
} else if (StringUtils.isNotEmpty(user.getEmail())
|
} else if (StringUtils.isNotEmpty(user.getEmail())
|
||||||
|
@ -75,11 +75,11 @@ public class R<T> implements Serializable {
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isError() {
|
public static <T> Boolean isError(R<T> ret) {
|
||||||
return !isSuccess();
|
return !isSuccess(ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Boolean isSuccess() {
|
public static <T> Boolean isSuccess(R<T> ret) {
|
||||||
return R.SUCCESS == getCode();
|
return R.SUCCESS == ret.getCode();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,3 +37,4 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ public interface ISysUserService {
|
|||||||
/**
|
/**
|
||||||
* 校验用户名称是否唯一
|
* 校验用户名称是否唯一
|
||||||
*
|
*
|
||||||
* @param userName 用户名称
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
String checkUserNameUnique(String userName);
|
String checkUserNameUnique(String userName);
|
||||||
|
@ -38,9 +38,9 @@
|
|||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"axios": "0.24.0",
|
"axios": "0.24.0",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
"core-js": "3.19.1",
|
"core-js": "3.25.3",
|
||||||
"echarts": "4.9.0",
|
"echarts": "4.9.0",
|
||||||
"element-ui": "2.15.8",
|
"element-ui": "2.15.10",
|
||||||
"file-saver": "2.0.5",
|
"file-saver": "2.0.5",
|
||||||
"fuse.js": "6.4.3",
|
"fuse.js": "6.4.3",
|
||||||
"highlight.js": "9.18.5",
|
"highlight.js": "9.18.5",
|
||||||
|
@ -132,12 +132,13 @@ service.interceptors.response.use(res => {
|
|||||||
)
|
)
|
||||||
|
|
||||||
// 通用下载方法
|
// 通用下载方法
|
||||||
export function download(url, params, filename) {
|
export function download(url, params, filename, config) {
|
||||||
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
downloadLoadingInstance = Loading.service({ text: "正在下载数据,请稍候", spinner: "el-icon-loading", background: "rgba(0, 0, 0, 0.7)", })
|
||||||
return service.post(url, params, {
|
return service.post(url, params, {
|
||||||
transformRequest: [(params) => { return tansParams(params) }],
|
transformRequest: [(params) => { return tansParams(params) }],
|
||||||
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
||||||
responseType: 'blob'
|
responseType: 'blob',
|
||||||
|
...config
|
||||||
}).then(async (data) => {
|
}).then(async (data) => {
|
||||||
const isLogin = await blobValidate(data);
|
const isLogin = await blobValidate(data);
|
||||||
if (isLogin) {
|
if (isLogin) {
|
||||||
|
@ -189,8 +189,8 @@ export default {
|
|||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
||||||
this.handleQuery();
|
|
||||||
},
|
},
|
||||||
/** 多选框选中数据 */
|
/** 多选框选中数据 */
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
|
@ -255,8 +255,8 @@ export default {
|
|||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.dateRange = [];
|
this.dateRange = [];
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order)
|
||||||
this.handleQuery();
|
|
||||||
},
|
},
|
||||||
/** 多选框选中数据 */
|
/** 多选框选中数据 */
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
|
@ -45,22 +45,22 @@
|
|||||||
|
|
||||||
<el-table-column label="插入" min-width="5%">
|
<el-table-column label="插入" min-width="5%">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox true-label="1" v-model="scope.row.isInsert"></el-checkbox>
|
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isInsert"></el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="编辑" min-width="5%">
|
<el-table-column label="编辑" min-width="5%">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox true-label="1" v-model="scope.row.isEdit"></el-checkbox>
|
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isEdit"></el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="列表" min-width="5%">
|
<el-table-column label="列表" min-width="5%">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox true-label="1" v-model="scope.row.isList"></el-checkbox>
|
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isList"></el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="查询" min-width="5%">
|
<el-table-column label="查询" min-width="5%">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox true-label="1" v-model="scope.row.isQuery"></el-checkbox>
|
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isQuery"></el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="查询方式" min-width="10%">
|
<el-table-column label="查询方式" min-width="10%">
|
||||||
@ -79,7 +79,7 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="必填" min-width="5%">
|
<el-table-column label="必填" min-width="5%">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-checkbox true-label="1" v-model="scope.row.isRequired"></el-checkbox>
|
<el-checkbox true-label="1" false-label="0" v-model="scope.row.isRequired"></el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="显示类型" min-width="12%">
|
<el-table-column label="显示类型" min-width="12%">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user