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
| | |
| | | public R<Void> edit(@Validated @RequestBody SysUser user) { |
| | | userService.checkUserAllowed(user); |
| | | 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))) { |
| | | return R.fail("修改用户'" + user.getUserName() + "'失败,手机号码已存在"); |
| | | } else if (StringUtils.isNotEmpty(user.getEmail()) |
| | |
| | | return r; |
| | | } |
| | | |
| | | public Boolean isError() { |
| | | return !isSuccess(); |
| | | public static <T> Boolean isError(R<T> ret) { |
| | | return !isSuccess(ret); |
| | | } |
| | | |
| | | public Boolean isSuccess() { |
| | | return R.SUCCESS == getCode(); |
| | | public static <T> Boolean isSuccess(R<T> ret) { |
| | | return R.SUCCESS == ret.getCode(); |
| | | } |
| | | } |
| | |
| | | </dependencies> |
| | | |
| | | </project> |
| | | |
| | |
| | | /** |
| | | * 校验用户名称是否唯一 |
| | | * |
| | | * @param userName 用户名称 |
| | | * @param user 用户信息 |
| | | * @return 结果 |
| | | */ |
| | | String checkUserNameUnique(String userName); |
| | |
| | | "@riophae/vue-treeselect": "0.4.0", |
| | | "axios": "0.24.0", |
| | | "clipboard": "2.0.8", |
| | | "core-js": "3.19.1", |
| | | "core-js": "3.25.3", |
| | | "echarts": "4.9.0", |
| | | "element-ui": "2.15.8", |
| | | "element-ui": "2.15.10", |
| | | "file-saver": "2.0.5", |
| | | "fuse.js": "6.4.3", |
| | | "highlight.js": "9.18.5", |
| | |
| | | ) |
| | | |
| | | // 通用下载方法 |
| | | 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)", }) |
| | | return service.post(url, params, { |
| | | transformRequest: [(params) => { return tansParams(params) }], |
| | | headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, |
| | | responseType: 'blob' |
| | | responseType: 'blob', |
| | | ...config |
| | | }).then(async (data) => { |
| | | const isLogin = await blobValidate(data); |
| | | if (isLogin) { |
| | |
| | | resetQuery() { |
| | | this.dateRange = []; |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.pageNum = 1; |
| | | this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order) |
| | | this.handleQuery(); |
| | | }, |
| | | /** 多选框选中数据 */ |
| | | handleSelectionChange(selection) { |
| | |
| | | resetQuery() { |
| | | this.dateRange = []; |
| | | this.resetForm("queryForm"); |
| | | this.queryParams.pageNum = 1; |
| | | this.$refs.tables.sort(this.defaultSort.prop, this.defaultSort.order) |
| | | this.handleQuery(); |
| | | }, |
| | | /** 多选框选中数据 */ |
| | | handleSelectionChange(selection) { |
| | |
| | | |
| | | <el-table-column label="插入" min-width="5%"> |
| | | <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> |
| | | </el-table-column> |
| | | <el-table-column label="编辑" min-width="5%"> |
| | | <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> |
| | | </el-table-column> |
| | | <el-table-column label="列表" min-width="5%"> |
| | | <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> |
| | | </el-table-column> |
| | | <el-table-column label="查询" min-width="5%"> |
| | | <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> |
| | | </el-table-column> |
| | | <el-table-column label="查询方式" min-width="10%"> |
| | |
| | | </el-table-column> |
| | | <el-table-column label="必填" min-width="5%"> |
| | | <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> |
| | | </el-table-column> |
| | | <el-table-column label="显示类型" min-width="12%"> |