Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
3a0dcbbf
Commit
3a0dcbbf
authored
Sep 14, 2023
by
danfuman
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zuhuduan' of
http://192.168.60.201/root/dsk-operate-sys
into zuhuduan
parents
cd7d63d5
6c0c5b7f
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
98 additions
and
54 deletions
+98
-54
CaptchaController.java
...java/com/dsk/web/controller/common/CaptchaController.java
+22
-15
SysUserController.java
...java/com/dsk/web/controller/system/SysUserController.java
+2
-5
CustomerServiceImpl.java
...in/java/com/dsk/biz/service/impl/CustomerServiceImpl.java
+13
-6
BusinessInfoMapper.xml
...-api/src/main/resources/mapper/biz/BusinessInfoMapper.xml
+0
-1
index.vue
dsk-operate-ui/src/layout/components/TagsView/index.vue
+4
-2
index.vue
dsk-operate-ui/src/views/enterpriseManagement/index.vue
+1
-1
login.vue
dsk-operate-ui/src/views/login.vue
+7
-4
gzdb.vue
...erate-ui/src/views/project/projectList/component/gzdb.vue
+5
-1
ISysTenantServiceImpl.java
...va/com/dsk/system/service/impl/ISysTenantServiceImpl.java
+23
-12
SysUserServiceImpl.java
.../java/com/dsk/system/service/impl/SysUserServiceImpl.java
+21
-7
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/common/CaptchaController.java
View file @
3a0dcbbf
...
...
@@ -5,7 +5,6 @@ import cn.hutool.captcha.AbstractCaptcha;
import
cn.hutool.captcha.generator.CodeGenerator
;
import
cn.hutool.core.util.IdUtil
;
import
cn.hutool.core.util.RandomUtil
;
import
com.dsk.common.constant.CacheConstants
;
import
com.dsk.common.constant.Constants
;
import
com.dsk.common.constant.GlobalConstants
;
import
com.dsk.common.core.domain.R
;
...
...
@@ -13,8 +12,6 @@ import com.dsk.common.enums.CaptchaType;
import
com.dsk.common.exception.user.CaptchaException
;
import
com.dsk.common.exception.user.CaptchaExpireException
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.MessageUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.common.utils.email.MailUtils
;
import
com.dsk.common.utils.redis.RedisUtils
;
...
...
@@ -82,14 +79,13 @@ public class CaptchaController {
// 验证码模板id 自行处理 (查数据库或写死均可)
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"code"
,
code
);
// SmsBlend smsBlend = SmsFactory.createSmsBlend(SupplierType.ALIBABA);
// SmsResponse smsResponse = smsBlend.sendMessage(phonenumber, templateId, map);
// if (!"OK".equals(smsResponse.getCode())) {
// log.error("验证码短信发送异常 => {}", smsResponse);
// return R.fail(smsResponse.getMessage());
// }
DingTalkUtil
.
sendDingTalkMsg
(
"短信通知:"
+
phonenumber
+
"登录验证码:"
+
code
+
",请尽快输入验证码完成验证,勿将验证码透露给他人,如非本人操作,请忽略本条短信。"
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
phonenumber
,
templateId
,
map
);
if
(!
"OK"
.
equals
(
smsResponse
.
getCode
()))
{
log
.
error
(
"验证码短信发送异常 => {}"
,
smsResponse
);
return
R
.
fail
(
smsResponse
.
getMessage
());
}
//DingTalkUtil.sendDingTalkMsg("短信通知:"+phonenumber+"登录验证码:"+code+",请尽快输入验证码完成验证,勿将验证码透露给他人,如非本人操作,请忽略本条短信。");
return
R
.
ok
();
}
...
...
@@ -108,19 +104,30 @@ public class CaptchaController {
}
/**
*
开发需要,临时
发送短信验证码
* 发送短信验证码
*/
@GetMapping
(
"/getTempSmsCode"
)
public
R
<
Void
>
getTempSmsCode
()
{
SysUser
sysUser
=
userMapper
.
selectUserById
(
LoginHelper
.
getUserId
());
String
key
=
GlobalConstants
.
CAPTCHA_CODE_KEY
+
sysUser
.
getPhonenumber
();
String
phonenumber
=
sysUser
.
getPhonenumber
();
String
key
=
GlobalConstants
.
CAPTCHA_CODE_KEY
+
phonenumber
;
String
code
=
RandomUtil
.
randomNumbers
(
6
);
RedisUtils
.
setCacheObject
(
key
,
code
,
Duration
.
ofMinutes
(
Constants
.
CAPTCHA_EXPIRATION
));
return
R
.
ok
(
"验证码:"
+
code
);
// 验证码模板id 自行处理 (查数据库或写死均可)
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"code"
,
code
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
phonenumber
,
"SMS_170345261"
,
map
);
if
(!
"OK"
.
equals
(
smsResponse
.
getCode
()))
{
log
.
error
(
"验证码短信发送异常 => {}"
,
smsResponse
);
return
R
.
fail
(
smsResponse
.
getMessage
());
}
//DingTalkUtil.sendDingTalkMsg("短信通知:"+phonenumber+"登录验证码:"+code+",请尽快输入验证码完成验证,勿将验证码透露给他人,如非本人操作,请忽略本条短信。");
return
R
.
ok
();
}
/**
*
开发需要,临时
校验短信验证码
* 校验短信验证码
*
* @param smsCode 验证码
*/
...
...
dsk-admin/src/main/java/com/dsk/web/controller/system/SysUserController.java
View file @
3a0dcbbf
...
...
@@ -37,10 +37,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* 用户信息
...
...
@@ -209,7 +206,7 @@ public class SysUserController extends BaseController {
public
R
<
Void
>
resetPwd
(
@RequestBody
SysUser
user
)
{
userService
.
checkUserAllowed
(
user
);
userService
.
checkUserDataScope
(
user
.
getUserId
());
user
.
setPassword
(
BCrypt
.
hashpw
(
user
.
getPassword
(
)));
user
.
setPassword
(
BCrypt
.
hashpw
(
new
String
(
Base64
.
getDecoder
().
decode
(
user
.
getPassword
())
)));
return
toAjax
(
userService
.
resetPwd
(
user
));
}
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/service/impl/CustomerServiceImpl.java
View file @
3a0dcbbf
...
...
@@ -61,7 +61,7 @@ public class CustomerServiceImpl implements ICustomerService {
dto
.
setUserId
(
LoginHelper
.
getUserId
());
dto
.
setStatus
(
ObjectUtils
.
isEmpty
(
dto
.
getStatus
())
?
0
:
dto
.
getStatus
());
final
TableDataInfo
<
CustomerListVo
>
result
=
TableDataInfo
.
build
(
baseMapper
.
selectList
(
pageQuery
.
build
(),
dto
));
if
(!
ObjectUtils
.
isEmpty
(
result
.
getRows
())
&&
!
ObjectUtils
.
isEmpty
(
dto
.
getCompanyName
()))
{
if
(!
ObjectUtils
.
isEmpty
(
result
.
getRows
())
&&
!
ObjectUtils
.
isEmpty
(
dto
.
getCompanyName
()))
{
for
(
CustomerListVo
vo
:
result
.
getRows
())
{
vo
.
setCompanyName
(
StringUtils
.
markInRed
(
vo
.
getCompanyName
(),
dto
.
getCompanyName
()));
}
...
...
@@ -121,7 +121,7 @@ public class CustomerServiceImpl implements ICustomerService {
public
TableDataInfo
<
CustomerBusinessListVo
>
selectBusinessList
(
CustomerBusinessSearchDto
dto
,
PageQuery
pageQuery
)
{
if
(
ObjectUtils
.
isEmpty
(
dto
.
getCustomerId
()))
throw
new
BeanException
(
"客户id不能为空"
);
dto
.
setUserId
(
LoginHelper
.
getUserId
());
return
businessInfoService
.
selectCustomerBusinessList
(
dto
,
pageQuery
);
return
businessInfoService
.
selectCustomerBusinessList
(
dto
,
pageQuery
);
}
@Override
...
...
@@ -197,7 +197,14 @@ public class CustomerServiceImpl implements ICustomerService {
customer
.
setLegalPerson
(
MapUtil
.
getStr
(
data
,
"legalPerson"
));
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getRegisterCapital
()))
{
customer
.
setRegisterCapital
(
MapUtil
.
getStr
(
data
,
"registeredCapitalStr"
));
String
registeredCapitalStr
=
MapUtil
.
getStr
(
data
,
"registeredCapitalStr"
);
if
(!
ObjectUtils
.
isEmpty
(
registeredCapitalStr
))
{
int
length
=
registeredCapitalStr
.
indexOf
(
".0"
);
if
(
length
==
registeredCapitalStr
.
length
()
-
2
)
{
registeredCapitalStr
=
registeredCapitalStr
.
replace
(
".0"
,
""
);
}
}
customer
.
setRegisterCapital
(
registeredCapitalStr
);
}
if
(
ObjectUtils
.
isEmpty
(
customer
.
getProvinceId
()))
{
customer
.
setProvinceId
(
MapUtil
.
getInt
(
data
,
"provinceId"
));
...
...
@@ -213,11 +220,11 @@ public class CustomerServiceImpl implements ICustomerService {
customer
.
setRegisterAddress
(
MapUtil
.
getStr
(
data
,
"domicile"
));
}
else
{
String
address
=
null
;
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"province"
)))
{
if
(
!
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"province"
)))
{
address
=
MapUtil
.
getStr
(
data
,
"province"
);
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"city"
)))
{
if
(
!
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"city"
)))
{
address
=
address
.
concat
(
"-"
).
concat
(
MapUtil
.
getStr
(
data
,
"city"
));
if
(
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"county"
)))
{
if
(
!
ObjectUtils
.
isEmpty
(
MapUtil
.
getStr
(
data
,
"county"
)))
{
address
=
address
.
concat
(
"-"
).
concat
(
MapUtil
.
getStr
(
data
,
"county"
));
}
}
...
...
dsk-module/dsk-biz-api/src/main/resources/mapper/biz/BusinessInfoMapper.xml
View file @
3a0dcbbf
...
...
@@ -319,7 +319,6 @@
delete i,b,co,f,l,r,u
from business_info i
left join business_backlog b on b.business_id = i.id
left join business_contacts co on co.business_id = i.id
left join business_follow_record f on f.business_id = i.id
left join business_label l on l.business_id = i.id
left join business_relate_company r on r.business_id = i.id
...
...
dsk-operate-ui/src/layout/components/TagsView/index.vue
View file @
3a0dcbbf
...
...
@@ -101,9 +101,11 @@ export default {
const
index
=
val
.
path
.
indexOf
(
'/'
,
val
.
path
.
indexOf
(
'/'
)
+
1
)
const
parentPath
=
val
.
path
.
slice
(
0
,
index
)
const
currentRoute
=
this
.
$router
.
options
.
routes
.
find
(
item
=>
item
.
path
===
parentPath
)
if
(
currentRoute
){
currentIcon
=
currentRoute
.
meta
&&
currentRoute
.
meta
.
icon
icon
=
this
.
isActive
(
val
)
?
currentIcon
+
'Tags'
:
currentIcon
+
'Tag'
}
}
icon
=
(
svgIcon
&&
svgIcon
!=
'#'
)
||
(
currentIcon
&&
svgIcon
!=
'#'
)
?
icon
:
this
.
isActive
(
val
)
?
'defaultTags'
:
'defaultTag'
return
`#icon-
${
icon
}
`
}
...
...
dsk-operate-ui/src/views/enterpriseManagement/index.vue
View file @
3a0dcbbf
...
...
@@ -132,7 +132,7 @@
@
pagination=
"getList"
/>
<!-- 添加或修改
角色配置
对话框 -->
<!-- 添加或修改对话框 -->
<el-dialog
:title=
"title"
:visible
.
sync=
"open"
width=
"800px"
append-to-body
>
<el-form
ref=
"form"
:model=
"form"
:rules=
"rules"
label-width=
"100px"
>
<el-row>
...
...
dsk-operate-ui/src/views/login.vue
View file @
3a0dcbbf
...
...
@@ -45,7 +45,7 @@
<img
class=
"img"
slot=
"prefix"
src=
"../assets/images/validCode.png"
/>
</el-input>
<div
class=
"login-code"
>
<div
class=
"hqyzm"
@
click=
"getsms"
>
{{
smstitle
}}
</div>
<div
class=
"hqyzm"
@
click=
"getsms"
:class=
"
{'disableds':smstitle!='获取验证码'}"
>
{{
smstitle
}}
</div>
</div>
</el-form-item>
<el-form-item
style=
"width:100%;margin-top: 42px"
>
...
...
@@ -151,7 +151,7 @@
<img
class=
"img"
slot=
"prefix"
src=
"../assets/images/validCode.png"
/>
</el-input>
<div
class=
"login-code"
>
<div
class=
"hqyzm"
@
click=
"getsms"
>
{{
smstitle
}}
</div>
<div
class=
"hqyzm"
@
click=
"getsms"
:class=
"
{'disableds':smstitle!='获取验证码'}"
>
{{
smstitle
}}
</div>
</div>
</el-form-item>
<el-form-item
style=
"width:100%;margin-top: 42px"
>
...
...
@@ -280,7 +280,7 @@
_this
.
smstitle
=
_this
.
smstime
+
'秒后重试'
_this
.
smstime
--
;
if
(
_this
.
smstime
<=
0
){
_this
.
smstitle
=
'
发送
验证码'
_this
.
smstitle
=
'
获取
验证码'
clearInterval
(
_this
.
timers
)
_this
.
nosend
=
false
}
...
...
@@ -529,11 +529,14 @@
border-radius
:
4px
;
border
:
1px
solid
#EFEFEF
;
text-align
:
center
;
color
:
rgba
(
35
,
35
,
35
,
0
.
4
0
);
color
:
rgba
(
35
,
35
,
35
,
0
.
8
0
);
font-size
:
14px
;
cursor
:
pointer
;
line-height
:
48px
;
}
.disableds
{
color
:
rgba
(
35
,
35
,
35
,
0
.40
);
}
}
.el-login-footer
{
height
:
40px
;
...
...
dsk-operate-ui/src/views/project/projectList/component/gzdb.vue
View file @
3a0dcbbf
...
...
@@ -122,6 +122,7 @@
created
(){
this
.
getList
()
this
.
getCount
()
console
.
log
(
777
)
},
methods
:{
getCount
(){
...
...
@@ -190,11 +191,11 @@
if
(
result
.
code
==
200
){
this
.
$message
.
success
(
'修改成功!'
)
this
.
getList
()
this
.
getCount
()
}
else
{
this
.
$message
.
error
(
result
.
msg
)
}
})
this
.
getCount
()
},
getYQ
(){
let
state
=
this
.
searchPram
.
state
...
...
@@ -206,6 +207,9 @@
</
script
>
<
style
lang=
"scss"
scoped
>
.app-container
{
background
:
#fff
;
}
.records
{
.tasklist
{
.select
{
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/ISysTenantServiceImpl.java
View file @
3a0dcbbf
...
...
@@ -16,7 +16,6 @@ import com.dsk.common.core.domain.entity.SysDictData;
import
com.dsk.common.core.domain.entity.SysDictType
;
import
com.dsk.common.core.page.TableDataInfo
;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.PasswordUtils
;
import
com.dsk.common.utils.StringUtils
;
import
com.dsk.system.domain.*
;
...
...
@@ -25,15 +24,17 @@ import com.dsk.system.domain.vo.SysTenantVo;
import
com.dsk.system.mapper.*
;
import
com.dsk.system.service.ISysTenantService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.dromara.sms4j.api.SmsBlend
;
import
org.dromara.sms4j.api.entity.SmsResponse
;
import
org.dromara.sms4j.core.factory.SmsFactory
;
import
org.dromara.sms4j.provider.enumerate.SupplierType
;
import
org.springframework.cache.annotation.CacheEvict
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.*
;
/**
* 企业Service业务层处理
...
...
@@ -43,6 +44,7 @@ import java.util.List;
*/
@RequiredArgsConstructor
@Service
@Slf4j
public
class
ISysTenantServiceImpl
implements
ISysTenantService
{
private
final
SysTenantMapper
baseMapper
;
...
...
@@ -236,14 +238,23 @@ public class ISysTenantServiceImpl implements ISysTenantService {
}
configMapper
.
insertBatch
(
sysConfigList
);
////此处暂用钉钉机器人模拟发送短信
//String content = "【短信通知】:"
// + bo.getContactUserName()
// + ",您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
// + password
// + "。友情提示:为了您的账号安全,请勿泄露密码。";
//DingTalkUtil.sendDingTalkMsg(content);
//租户新增成功,发送短信通知租户
//此处暂用钉钉机器人模拟发送短信
String
content
=
"【短信通知】:"
+
bo
.
getContactUserName
()
+
",您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
+
password
+
"。友情提示:为了您的账号安全,请勿泄露密码。"
;
DingTalkUtil
.
sendDingTalkMsg
(
content
);
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"company"
,
bo
.
getContactUserName
());
map
.
put
(
"pwd"
,
password
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
bo
.
getContactPhone
(),
"SMS_463175230"
,
map
);
if
(!
"OK"
.
equals
(
smsResponse
.
getCode
()))
{
log
.
error
(
"新增租户通知短信发送异常 => {}"
,
smsResponse
);
}
return
true
;
}
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysUserServiceImpl.java
View file @
3a0dcbbf
...
...
@@ -18,7 +18,6 @@ import com.dsk.common.core.service.UserService;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.helper.DataBaseHelper
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.PasswordUtils
;
import
com.dsk.common.utils.StreamUtils
;
import
com.dsk.common.utils.StringUtils
;
...
...
@@ -27,11 +26,16 @@ import com.dsk.system.mapper.*;
import
com.dsk.system.service.ISysUserService
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.dromara.sms4j.api.SmsBlend
;
import
org.dromara.sms4j.api.entity.SmsResponse
;
import
org.dromara.sms4j.core.factory.SmsFactory
;
import
org.dromara.sms4j.provider.enumerate.SupplierType
;
import
org.springframework.cache.annotation.Cacheable
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Arrays
;
import
java.util.LinkedHashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -273,13 +277,23 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
// 新增用户信息
int
rows
=
baseMapper
.
insert
(
user
);
if
(
rows
>
0
)
{
//租户新增成功,发送短信通知租户
//此处暂用钉钉机器人模拟发送短信
String
content
=
"短信通知:"
+
user
.
getNickName
()
+
"您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
+
password
+
"。友情提示:为了您的账号安全,请勿泄露密码。"
;
DingTalkUtil
.
sendDingTalkMsg
(
content
);
//String content = "短信通知:"+user.getNickName()
// + "您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
// + password
// + "。友情提示:为了您的账号安全,请勿泄露密码。";
//DingTalkUtil.sendDingTalkMsg(content);
//租户新增成功,发送短信通知租户
LinkedHashMap
<
String
,
String
>
map
=
new
LinkedHashMap
<>(
1
);
map
.
put
(
"company"
,
user
.
getNickName
());
map
.
put
(
"pwd"
,
password
);
SmsBlend
smsBlend
=
SmsFactory
.
createSmsBlend
(
SupplierType
.
ALIBABA
);
SmsResponse
smsResponse
=
smsBlend
.
sendMessage
(
user
.
getPhonenumber
(),
"SMS_463175230"
,
map
);
if
(!
"OK"
.
equals
(
smsResponse
.
getCode
()))
{
log
.
error
(
"新增用户通知短信发送异常 => {}"
,
smsResponse
);
}
}
// 新增用户岗位关联
insertUserPost
(
user
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment