Merge pull request !70 from 小诺/dev
pull/74/head v2.1.4
小诺 2022-12-08 09:36:54 +00:00 committed by Gitee
commit e533167710
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
25 changed files with 119 additions and 46 deletions

View File

@ -47,7 +47,9 @@ Snowy谐音“小诺”恰应小诺团队名称意思为”下雪的、纯
## 快速链接 ## 快速链接
下载地址:[https://gitee.com/xiaonuobase/snowy](https://gitee.com/xiaonuobase/snowy) gitee下载地址[https://gitee.com/xiaonuobase/snowy](https://gitee.com/xiaonuobase/snowy)
github下载地址镜像[https://github.com/xiaonuobase/Snowy](https://github.com/xiaonuobase/Snowy)
演示地址:[https://snowy.xiaonuo.vip](https://snowy.xiaonuo.vip) 演示地址:[https://snowy.xiaonuo.vip](https://snowy.xiaonuo.vip)
@ -135,10 +137,9 @@ snowy
## 视频教程 ## 视频教程
免费教程地址:[https://space.bilibili.com/50101698/channel/collectiondetail?sid=739071](https://space.bilibili.com/50101698/channel/collectiondetail?sid=739071) 教程地址(免费开放)[https://space.bilibili.com/50101698/channel/collectiondetail?sid=739071](https://space.bilibili.com/50101698/channel/collectiondetail?sid=739071)
<img src="https://pan.xiaonuo.vip/?explorer/share/file&hash=4016e9m3XODiVlJlUQUS03pg7bCCXa_TYalxvdtil320XXItVMh4-gAe&name=/001.jpg"/> <img src="https://pan.xiaonuo.vip/?explorer/share/fileOut&shareID=8nOccuKg&path=%7BshareItemLink%3A8nOccuKg%7D%2F"/>
<img src="https://pan.xiaonuo.vip/?explorer/share/file&hash=902bZPTH7tjPGGSj05qVl8OHdqZFO-EBeD_OmmYnr3Bg-vUuxXnr0COr&name=/002.jpg"/>
作者也在上班工作,所以在利用休息时间为大家创作,录制视频的目的也是为各位小伙伴提供文档跟技术交流群聊之外的上手学习资料 作者也在上班工作,所以在利用休息时间为大家创作,录制视频的目的也是为各位小伙伴提供文档跟技术交流群聊之外的上手学习资料
@ -190,6 +191,18 @@ QQ技术群732230670
</tr> </tr>
</table> </table>
## 代码贡献
近期有很多热心开源的小伙伴陆续为咱们Snowy框架提交PR或者提出好的建议基本合格的PR我们都接受这样您的头像就列入到咱们Snowy仓库的贡献者列表啦
如何贡献:
1、fork一份代码至自己的账号下本地修改您要提的代码提交至您fork的仓库
2、登录gitee后到Snowy仓库下创建Pull Requests,选择您的仓库到Snowy的dev分支提交即可
因为dev分支是团队开发分支并不是统一发版本的测试过的所以我们建议提代码至dev即可
## 团队成员 ## 团队成员
| 成员 | 技术 | 昵称 | | 成员 | 技术 | 昵称 |

View File

@ -60,7 +60,7 @@
}, },
// //
defaultSetting(value) { defaultSetting(value) {
if ((value !== undefined) & (value !== '') & (value !== 'undefined')) { if (value) {
this.modelValue = value this.modelValue = value
// //
if (value.indexOf('-outlined') > -1 || value.indexOf('-filled') > -1 || value.indexOf('-two-tone') > -1) { if (value.indexOf('-outlined') > -1 || value.indexOf('-filled') > -1 || value.indexOf('-two-tone') > -1) {

View File

@ -38,8 +38,8 @@
<!-- 右侧布局 --> <!-- 右侧布局 -->
<a-layout> <a-layout>
<div id="snowyHeader" class="snowy-header"> <div id="snowyHeader" class="snowy-header">
<div class="snowy-header-left" style="padding-left: 0px"> <div class="snowy-header-left w-full" style="padding-left: 0px">
<moduleMenu @switchModule="switchModule" /> <moduleMenu class="w-full" @switchModule="switchModule" />
<Topbar v-if="!ismobile && breadcrumbOpen" /> <Topbar v-if="!ismobile && breadcrumbOpen" />
</div> </div>
<div class="snowy-header-right"> <div class="snowy-header-right">
@ -139,8 +139,8 @@
<Side-m v-if="ismobile"></Side-m> <Side-m v-if="ismobile"></Side-m>
<a-layout> <a-layout>
<div id="snowyHeader" class="snowy-header"> <div id="snowyHeader" class="snowy-header">
<div class="snowy-header-left" style="padding-left: 0px"> <div class="snowy-header-left w-full" style="padding-left: 0px">
<moduleMenu @switchModule="switchModule" /> <moduleMenu class="w-full" @switchModule="switchModule" />
<Topbar v-if="!ismobile && breadcrumbOpen" /> <Topbar v-if="!ismobile && breadcrumbOpen" />
</div> </div>
<div class="snowy-header-right"> <div class="snowy-header-right">

View File

@ -92,6 +92,7 @@
import router from '@/router' import router from '@/router'
import { required, rules } from '@/utils/formRules' import { required, rules } from '@/utils/formRules'
import userCenterApi from '@/api/sys/userCenterApi' import userCenterApi from '@/api/sys/userCenterApi'
import smCrypto from "@/utils/smCrypto"
const emailResetFormRef = ref() const emailResetFormRef = ref()
const emailFormData = ref({}) const emailFormData = ref({})
const islogin = ref(false) const islogin = ref(false)
@ -102,7 +103,7 @@
let formRules = ref({}) let formRules = ref({})
const emailValidCodeReqNo = ref('') const emailValidCodeReqNo = ref('')
// //
const getEmailValidCode = () => { const getEmailValidCode = () => {
formRules.value.email = [required(), rules.email] formRules.value.email = [required(), rules.email]
delete formRules.value.emailValidCode delete formRules.value.emailValidCode
@ -122,8 +123,8 @@
emailResetFormRef.value.validate().then(() => { emailResetFormRef.value.validate().then(() => {
emailFormData.value.validCode = emailFormData.value.emailValidCode emailFormData.value.validCode = emailFormData.value.emailValidCode
// delete emailFormData.value.emailValidCode
emailFormData.value.validCodeReqNo = emailValidCodeReqNo.value emailFormData.value.validCodeReqNo = emailValidCodeReqNo.value
emailFormData.value.newPassword = smCrypto.doSm2Encrypt(emailFormData.value.newPassword)
islogin.value = true islogin.value = true
userCenterApi userCenterApi
.userFindPasswordByEmail(emailFormData.value) .userFindPasswordByEmail(emailFormData.value)
@ -144,7 +145,6 @@
const emailLoginFormModalRef = ref() const emailLoginFormModalRef = ref()
const emailFormModalData = ref({}) const emailFormModalData = ref({})
const validCodeBase64 = ref('') const validCodeBase64 = ref('')
const validCodeReqNo = ref('')
const formModalRules = { const formModalRules = {
validCode: [required(), rules.lettersNum] validCode: [required(), rules.lettersNum]
} }
@ -158,10 +158,10 @@
visible.value = false visible.value = false
} }
const handleOk = () => { const handleOk = () => {
// //
emailLoginFormModalRef.value.validate().then(() => { emailLoginFormModalRef.value.validate().then(() => {
visible.value = false visible.value = false
// //
emailFormModalData.value.email = emailFormData.value.email emailFormModalData.value.email = emailFormData.value.email
// //
state.value.smsSendBtn = true state.value.smsSendBtn = true
@ -180,13 +180,15 @@
emailValidCodeReqNo.value = data emailValidCodeReqNo.value = data
visible.value = false visible.value = false
setTimeout(hide, 500) setTimeout(hide, 500)
emailFormModalData.value.validCode = ''
}) })
.catch(() => { .catch(() => {
setTimeout(hide, 100) setTimeout(hide, 100)
clearInterval(interval) clearInterval(interval)
state.value.smsSendBtn = false state.value.smsSendBtn = false
}) })
.finally(() => {
emailFormModalData.value.validCode = ''
})
}) })
} }
</script> </script>

View File

@ -93,6 +93,7 @@
import router from '@/router' import router from '@/router'
import { required, rules } from '@/utils/formRules' import { required, rules } from '@/utils/formRules'
import userCenterApi from '@/api/sys/userCenterApi' import userCenterApi from '@/api/sys/userCenterApi'
import smCrypto from "@/utils/smCrypto"
const phoneLoginFormRef = ref() const phoneLoginFormRef = ref()
const phoneFormData = ref({}) const phoneFormData = ref({})
const islogin = ref(false) const islogin = ref(false)
@ -123,8 +124,8 @@
phoneLoginFormRef.value.validate().then(() => { phoneLoginFormRef.value.validate().then(() => {
phoneFormData.value.validCode = phoneFormData.value.phoneValidCode phoneFormData.value.validCode = phoneFormData.value.phoneValidCode
// delete phoneFormData.value.phoneValidCode
phoneFormData.value.validCodeReqNo = phoneValidCodeReqNo.value phoneFormData.value.validCodeReqNo = phoneValidCodeReqNo.value
phoneFormData.value.newPassword = smCrypto.doSm2Encrypt(phoneFormData.value.newPassword)
islogin.value = true islogin.value = true
userCenterApi userCenterApi
.userFindPasswordByPhone(phoneFormData.value) .userFindPasswordByPhone(phoneFormData.value)
@ -145,7 +146,6 @@
const phoneLoginFormModalRef = ref() const phoneLoginFormModalRef = ref()
const phoneFormModalData = ref({}) const phoneFormModalData = ref({})
const validCodeBase64 = ref('') const validCodeBase64 = ref('')
const validCodeReqNo = ref('')
const formModalRules = { const formModalRules = {
validCode: [required(), rules.lettersNum] validCode: [required(), rules.lettersNum]
} }
@ -181,13 +181,15 @@
phoneValidCodeReqNo.value = data phoneValidCodeReqNo.value = data
visible.value = false visible.value = false
setTimeout(hide, 500) setTimeout(hide, 500)
phoneFormModalData.value.validCode = ''
}) })
.catch(() => { .catch(() => {
setTimeout(hide, 100) setTimeout(hide, 100)
clearInterval(interval) clearInterval(interval)
state.value.smsSendBtn = false state.value.smsSendBtn = false
}) })
.finally(() => {
phoneFormModalData.value.validCode = ''
})
}) })
} }
</script> </script>

View File

@ -158,10 +158,12 @@
submitLoading.value = true submitLoading.value = true
formData.value.extJson = JSON.stringify(extJson.value) formData.value.extJson = JSON.stringify(extJson.value)
bizOrgApi.submitForm(formData.value, !formData.value.id).then(() => { bizOrgApi.submitForm(formData.value, !formData.value.id).then(() => {
submitLoading.value = false
visible = false visible = false
emit('successful') emit('successful')
}) })
.finally(() => {
submitLoading.value = false
})
}) })
.catch(() => {}) .catch(() => {})
} }

View File

@ -156,6 +156,9 @@
}) })
} }
}) })
.finally(() => {
cardLoading.value = false
})
} }
// //
const treeSelect = (selectedKeys) => { const treeSelect = (selectedKeys) => {

View File

@ -115,9 +115,11 @@
submitLoading.value = true submitLoading.value = true
bizPositionApi.submitForm(formData.value, !formData.value.id).then(() => { bizPositionApi.submitForm(formData.value, !formData.value.id).then(() => {
visible = false visible = false
submitLoading.value = false
emit('successful') emit('successful')
}) })
.finally(() => {
submitLoading.value = false
})
}) })
.catch(() => {}) .catch(() => {})
} }

View File

@ -155,6 +155,9 @@
}) })
} }
}) })
.finally(() => {
cardLoading.value = false
})
// //
const treeSelect = (selectedKeys) => { const treeSelect = (selectedKeys) => {
if (selectedKeys.length > 0) { if (selectedKeys.length > 0) {

View File

@ -208,6 +208,9 @@
}) })
} }
}) })
.finally(() => {
cardLoading.value = false
})
// //
const options = { const options = {
alert: { alert: {
@ -236,14 +239,18 @@
loading.value = true loading.value = true
if (record.userStatus === 'ENABLE') { if (record.userStatus === 'ENABLE') {
bizUserApi.userDisableUser(record).then(() => { bizUserApi.userDisableUser(record).then(() => {
loading.value = false
table.value.refresh() table.value.refresh()
}) })
.finally(() => {
loading.value = false
})
} else { } else {
bizUserApi.userEnableUser(record).then(() => { bizUserApi.userEnableUser(record).then(() => {
loading.value = false
table.value.refresh() table.value.refresh()
}) })
.finally(() => {
loading.value = false
})
} }
} }
// //

View File

@ -154,7 +154,7 @@
} }
] ]
emailApi.emailDelete(params).then(() => { emailApi.emailDelete(params).then(() => {
table.refresh(true) table.value.refresh(true)
}) })
} }
// //

View File

@ -178,7 +178,7 @@
} }
] ]
fileApi.fileDelete(params).then(() => { fileApi.fileDelete(params).then(() => {
table.refresh(true) table.value.refresh(true)
}) })
} }
// //

View File

@ -118,7 +118,7 @@
uploadLoading.value = false uploadLoading.value = false
}) })
} }
// // Minio
const customRequestMinio = (data) => { const customRequestMinio = (data) => {
uploadLoading.value = true uploadLoading.value = true
const fileData = new FormData() const fileData = new FormData()

View File

@ -118,7 +118,7 @@
} }
] ]
messageApi.messageDelete(params).then(() => { messageApi.messageDelete(params).then(() => {
table.refresh(true) table.value.refresh(true)
}) })
} }
// //

View File

@ -154,7 +154,7 @@
} }
] ]
smsApi.smsDelete(params).then(() => { smsApi.smsDelete(params).then(() => {
table.refresh(true) table.value.refresh(true)
}) })
} }
// //

View File

@ -33,7 +33,7 @@
const resultDataModel = { const resultDataModel = {
dataScopeId: '', dataScopeId: '',
defineOrgIdData: { defineOrgIdData: {
scopeCategory: 'SCOPE_DEFINE_ORG', scopeCategory: 'SCOPE_ORG_DEFINE',
scopeDefineOrgIdList: [] scopeDefineOrgIdList: []
} }
} }

View File

@ -32,6 +32,7 @@ import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType; import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import vip.xiaonuo.auth.core.enums.SaClientTypeEnum; import vip.xiaonuo.auth.core.enums.SaClientTypeEnum;
import vip.xiaonuo.auth.core.util.StpClientLoginUserUtil;
import vip.xiaonuo.auth.core.util.StpLoginUserUtil; import vip.xiaonuo.auth.core.util.StpLoginUserUtil;
import vip.xiaonuo.common.pojo.CommonResult; import vip.xiaonuo.common.pojo.CommonResult;
@ -100,7 +101,11 @@ public class AuthConfigure implements WebMvcConfigurer {
*/ */
@Override @Override
public List<String> getPermissionList(Object loginId, String loginType) { public List<String> getPermissionList(Object loginId, String loginType) {
return StpLoginUserUtil.getLoginUser().getPermissionCodeList(); if (SaClientTypeEnum.B.getValue().equals(loginType)) {
return StpLoginUserUtil.getLoginUser().getPermissionCodeList();
} else {
return StpClientLoginUserUtil.getClientLoginUser().getPermissionCodeList();
}
} }
/** /**
@ -108,7 +113,11 @@ public class AuthConfigure implements WebMvcConfigurer {
*/ */
@Override @Override
public List<String> getRoleList(Object loginId, String loginType) { public List<String> getRoleList(Object loginId, String loginType) {
return StpLoginUserUtil.getLoginUser().getRoleCodeList(); if (SaClientTypeEnum.B.getValue().equals(loginType)) {
return StpLoginUserUtil.getLoginUser().getRoleCodeList();
} else {
return StpClientLoginUserUtil.getClientLoginUser().getRoleCodeList();
}
} }
} }

View File

@ -315,7 +315,7 @@ public class AuthServiceImpl implements AuthService {
saBaseClientLoginUser.setButtonCodeList(clientLoginUserApi.getButtonCodeListListByUserId(saBaseClientLoginUser.getId())); saBaseClientLoginUser.setButtonCodeList(clientLoginUserApi.getButtonCodeListListByUserId(saBaseClientLoginUser.getId()));
// 获取数据范围 // 获取数据范围
saBaseClientLoginUser.setDataScopeList(Convert.toList(SaBaseClientLoginUser.DataScope.class, saBaseClientLoginUser.setDataScopeList(Convert.toList(SaBaseClientLoginUser.DataScope.class,
loginUserApi.getPermissionListByUserId(saBaseClientLoginUser.getId(), null))); clientLoginUserApi.getPermissionListByUserId(saBaseClientLoginUser.getId(), null)));
// 获取权限码 // 获取权限码
saBaseClientLoginUser.setPermissionCodeList(saBaseClientLoginUser.getDataScopeList().stream() saBaseClientLoginUser.setPermissionCodeList(saBaseClientLoginUser.getDataScopeList().stream()
.map(SaBaseClientLoginUser.DataScope::getApiUrl).collect(Collectors.toList())); .map(SaBaseClientLoginUser.DataScope::getApiUrl).collect(Collectors.toList()));
@ -354,7 +354,7 @@ public class AuthServiceImpl implements AuthService {
saBaseClientLoginUser.setPassword(null); saBaseClientLoginUser.setPassword(null);
saBaseClientLoginUser.setPermissionCodeList(null); saBaseClientLoginUser.setPermissionCodeList(null);
saBaseClientLoginUser.setDataScopeList(null); saBaseClientLoginUser.setDataScopeList(null);
return StpClientLoginUserUtil.getClientLoginUser(); return saBaseClientLoginUser;
} }
@Override @Override

View File

@ -81,7 +81,11 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
@Override @Override
public void edit(${className}EditParam ${classNameFirstLower}EditParam) { public void edit(${className}EditParam ${classNameFirstLower}EditParam) {
${className} ${classNameFirstLower} = this.queryEntity(${classNameFirstLower}EditParam.getId()); <% for(var i = 0; i < configList.~size; i++) { %>
<% if(configList[i].needTableId) { %>
${className} ${classNameFirstLower} = this.queryEntity(${classNameFirstLower}EditParam.get${configList[i].fieldNameCamelCaseFirstUpper}());
<% } %>
<% } %>
BeanUtil.copyProperties(${classNameFirstLower}EditParam, ${classNameFirstLower}); BeanUtil.copyProperties(${classNameFirstLower}EditParam, ${classNameFirstLower});
this.updateById(${classNameFirstLower}); this.updateById(${classNameFirstLower});
} }
@ -90,12 +94,20 @@ public class ${className}ServiceImpl extends ServiceImpl<${className}Mapper, ${c
@Override @Override
public void delete(List<${className}IdParam> ${classNameFirstLower}IdParamList) { public void delete(List<${className}IdParam> ${classNameFirstLower}IdParamList) {
// 执行删除 // 执行删除
this.removeBatchByIds(CollStreamUtil.toList(${classNameFirstLower}IdParamList, ${className}IdParam::getId)); <% for(var i = 0; i < configList.~size; i++) { %>
<% if(configList[i].needTableId) { %>
this.removeBatchByIds(CollStreamUtil.toList(${classNameFirstLower}IdParamList, ${className}IdParam::get${configList[i].fieldNameCamelCaseFirstUpper}));
<% } %>
<% } %>
} }
@Override @Override
public ${className} detail(${className}IdParam ${classNameFirstLower}IdParam) { public ${className} detail(${className}IdParam ${classNameFirstLower}IdParam) {
return this.queryEntity(${classNameFirstLower}IdParam.getId()); <% for(var i = 0; i < configList.~size; i++) { %>
<% if(configList[i].needTableId) { %>
return this.queryEntity(${classNameFirstLower}IdParam.get${configList[i].fieldNameCamelCaseFirstUpper}());
<% } %>
<% } %>
} }
@Override @Override

View File

@ -1,6 +1,10 @@
<template> <template>
<a-drawer <a-drawer
:title="formData.id ? '编辑${functionName}' : '增加${functionName}'" <% for(var i = 0; i < configList.~size; i++) { %>
<% if(configList[i].needTableId) { %>
:title="formData.${configList[i].fieldNameCamelCase} ? '编辑${functionName}' : '增加${functionName}'"
<% } %>
<% } %>
:width="600" :width="600"
:visible="visible" :visible="visible"
:destroy-on-close="true" :destroy-on-close="true"

View File

@ -226,7 +226,11 @@
const delete${className} = (record) => { const delete${className} = (record) => {
let params = [ let params = [
{ {
id: record.id <% for(var i = 0; i < configList.~size; i++) { %>
<% if(configList[i].needTableId) { %>
${configList[i].fieldNameCamelCase}: record.${configList[i].fieldNameCamelCase}
<% } %>
<% } %>
} }
] ]
${classNameFirstLower}Api.${classNameFirstLower}Delete(params).then(() => { ${classNameFirstLower}Api.${classNameFirstLower}Delete(params).then(() => {
@ -241,7 +245,11 @@
} }
const params = selectedRowKeys.value.map((m) => { const params = selectedRowKeys.value.map((m) => {
return { return {
id: m <% for(var i = 0; i < configList.~size; i++) { %>
<% if(configList[i].needTableId) { %>
${configList[i].fieldNameCamelCase}: m
<% } %>
<% } %>
} }
}) })
${classNameFirstLower}Api.${classNameFirstLower}Delete(params).then(() => { ${classNameFirstLower}Api.${classNameFirstLower}Delete(params).then(() => {

View File

@ -74,7 +74,7 @@ public class SysUserCenterController {
@ApiOperation("找回密码获取手机验证码") @ApiOperation("找回密码获取手机验证码")
@GetMapping("/sys/userCenter/findPasswordGetPhoneValidCode") @GetMapping("/sys/userCenter/findPasswordGetPhoneValidCode")
public CommonResult<String> findPasswordGetPhoneValidCode(@Valid SysUserGetPhoneValidCodeParam sysUserGetPhoneValidCodeParam) { public CommonResult<String> findPasswordGetPhoneValidCode(@Valid SysUserGetPhoneValidCodeParam sysUserGetPhoneValidCodeParam) {
return CommonResult.ok(sysUserService.findPasswordGetPhoneValidCode(sysUserGetPhoneValidCodeParam)); return CommonResult.data(sysUserService.findPasswordGetPhoneValidCode(sysUserGetPhoneValidCodeParam));
} }
/** /**
@ -87,7 +87,7 @@ public class SysUserCenterController {
@ApiOperation("找回密码获取邮箱验证码") @ApiOperation("找回密码获取邮箱验证码")
@GetMapping("/sys/userCenter/findPasswordGetEmailValidCode") @GetMapping("/sys/userCenter/findPasswordGetEmailValidCode")
public CommonResult<String> findPasswordGetEmailValidCode(@Valid SysUserGetEmailValidCodeParam sysUserGetEmailValidCodeParam) { public CommonResult<String> findPasswordGetEmailValidCode(@Valid SysUserGetEmailValidCodeParam sysUserGetEmailValidCodeParam) {
return CommonResult.ok(sysUserService.findPasswordGetEmailValidCode(sysUserGetEmailValidCodeParam)); return CommonResult.data(sysUserService.findPasswordGetEmailValidCode(sysUserGetEmailValidCodeParam));
} }
/** /**

View File

@ -33,7 +33,6 @@ import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.PhoneUtil; import cn.hutool.core.util.PhoneUtil;
import cn.hutool.core.util.RandomUtil; import cn.hutool.core.util.RandomUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import cn.hutool.crypto.digest.BCrypt;
import cn.hutool.json.JSONArray; import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONObject; import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil; import cn.hutool.json.JSONUtil;
@ -457,7 +456,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
validValidCode(sysUserFindPwdByPhoneParam.getValidCode(), sysUserFindPwdByPhoneParam.getValidCodeReqNo()); validValidCode(sysUserFindPwdByPhoneParam.getValidCode(), sysUserFindPwdByPhoneParam.getValidCodeReqNo());
this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getPhone, this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getPhone,
sysUserFindPwdByPhoneParam.getPhone()).set(SysUser::getPassword, sysUserFindPwdByPhoneParam.getPhone()).set(SysUser::getPassword,
BCrypt.hashpw(sysUserFindPwdByPhoneParam.getNewPassword()))); CommonCryptogramUtil.doHashValue(CommonCryptogramUtil.doSm2Decrypt(sysUserFindPwdByPhoneParam.getNewPassword()))));
} }
@Override @Override
@ -466,7 +465,7 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
validValidCode(sysUserFindPwdByEmailParam.getValidCode(), sysUserFindPwdByEmailParam.getValidCodeReqNo()); validValidCode(sysUserFindPwdByEmailParam.getValidCode(), sysUserFindPwdByEmailParam.getValidCodeReqNo());
this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getEmail, this.update(new LambdaUpdateWrapper<SysUser>().eq(SysUser::getEmail,
sysUserFindPwdByEmailParam.getEmail()).set(SysUser::getPassword, sysUserFindPwdByEmailParam.getEmail()).set(SysUser::getPassword,
BCrypt.hashpw(sysUserFindPwdByEmailParam.getNewPassword()))); CommonCryptogramUtil.doHashValue(CommonCryptogramUtil.doSm2Decrypt(sysUserFindPwdByEmailParam.getNewPassword()))));
} }
@Override @Override

View File

@ -170,6 +170,14 @@ public class GlobalConfigure implements WebMvcConfigurer {
"/dev/sms/detail", "/dev/sms/detail",
}; };
/**
* BC
*/
private static final String[] CLIENT_USER_PERMISSION_PATH_ARR = {
"/auth/c/**",
"/client/c/**"
};
/** /**
* *
*/ */
@ -186,7 +194,7 @@ public class GlobalConfigure implements WebMvcConfigurer {
// 排除无需登录接口 // 排除无需登录接口
.notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR)) .notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR))
// 排除C端认证接口 // 排除C端认证接口
.notMatch("/auth/c/**") .notMatch(CollectionUtil.newArrayList(CLIENT_USER_PERMISSION_PATH_ARR))
// 校验B端登录 // 校验B端登录
.check(r1 -> StpUtil.checkLogin()); .check(r1 -> StpUtil.checkLogin());
@ -195,7 +203,7 @@ public class GlobalConfigure implements WebMvcConfigurer {
// 排除无需登录接口 // 排除无需登录接口
.notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR)) .notMatch(CollectionUtil.newArrayList(NO_LOGIN_PATH_ARR))
// 匹配C端认证接口 // 匹配C端认证接口
.match("/auth/c/**") .match(CollectionUtil.newArrayList(CLIENT_USER_PERMISSION_PATH_ARR))
// 校验C端登录 // 校验C端登录
.check(r1 -> StpClientUtil.checkLogin()); .check(r1 -> StpClientUtil.checkLogin());

View File

@ -2,7 +2,6 @@
# server configuration # server configuration
######################################### #########################################
server.port=82 server.port=82
server.max-http-header-size=100MB
######################################### #########################################
# spring profiles configuration # spring profiles configuration