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
764c44f2
Commit
764c44f2
authored
Sep 14, 2023
by
yht15023815643
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zuhuduan' of
http://192.168.60.201/root/dsk-operate-sys
into zuhuduan
parents
69611ed1
8690ea02
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
444 additions
and
145 deletions
+444
-145
CaptchaController.java
...java/com/dsk/web/controller/common/CaptchaController.java
+22
-15
SysRegionController.java
...va/com/dsk/web/controller/system/SysRegionController.java
+37
-0
SysUserController.java
...java/com/dsk/web/controller/system/SysUserController.java
+3
-6
TenantTimerTask.java
...n/src/main/java/com/dsk/web/schedule/TenantTimerTask.java
+1
-1
application.yml
dsk-admin/src/main/resources/application.yml
+1
-0
InvalidExtensionException.java
.../dsk/common/exception/file/InvalidExtensionException.java
+2
-1
CustomerServiceImpl.java
...in/java/com/dsk/biz/service/impl/CustomerServiceImpl.java
+13
-6
BusinessInfoMapper.xml
...-api/src/main/resources/mapper/biz/BusinessInfoMapper.xml
+1
-2
jskplug.js
dsk-operate-ui/src/assets/js/jskplug.js
+25
-8
index.vue
dsk-operate-ui/src/layout/components/TagsView/index.vue
+4
-2
index.vue
dsk-operate-ui/src/views/custom/customList/index.vue
+3
-3
index.vue
dsk-operate-ui/src/views/detail/groupAccount/index.vue
+0
-1
index.vue
dsk-operate-ui/src/views/detail/party-b/index.vue
+56
-21
index.vue
...te-ui/src/views/enterpriseData/components/Group/index.vue
+2
-2
index.vue
dsk-operate-ui/src/views/enterpriseManagement/index.vue
+1
-1
programme.vue
dsk-operate-ui/src/views/enterpriseManagement/programme.vue
+1
-1
index.vue
dsk-operate-ui/src/views/index.vue
+5
-0
login.vue
dsk-operate-ui/src/views/login.vue
+7
-4
gzdb.vue
...erate-ui/src/views/project/projectList/component/gzdb.vue
+5
-1
index.vue
dsk-operate-ui/src/views/system/user/index.vue
+4
-0
SysRegion.java
...system/src/main/java/com/dsk/system/domain/SysRegion.java
+75
-0
SysUser.java
dsk-system/src/main/java/com/dsk/system/domain/SysUser.java
+7
-2
SysUserExportVo.java
...c/main/java/com/dsk/system/domain/vo/SysUserExportVo.java
+55
-48
SysRegionMapper.java
.../src/main/java/com/dsk/system/mapper/SysRegionMapper.java
+18
-0
SysRegionService.java
...rc/main/java/com/dsk/system/service/SysRegionService.java
+17
-0
ISysTenantServiceImpl.java
...va/com/dsk/system/service/impl/ISysTenantServiceImpl.java
+26
-13
SysRegionServiceImpl.java
...ava/com/dsk/system/service/impl/SysRegionServiceImpl.java
+32
-0
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 @
764c44f2
...
...
@@ -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_181860796"
,
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/SysRegionController.java
0 → 100644
View file @
764c44f2
package
com
.
dsk
.
web
.
controller
.
system
;
import
com.dsk.common.core.controller.BaseController
;
import
com.dsk.common.core.domain.AjaxResult
;
import
com.dsk.common.core.domain.R
;
import
com.dsk.system.domain.SysRegion
;
import
com.dsk.system.service.SysRegionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* 地区信息
*
* @author lcl
* @create 2023/6/28
*/
@RestController
@RequestMapping
(
"/system/region"
)
public
class
SysRegionController
extends
BaseController
{
@Autowired
private
SysRegionService
baseService
;
/**
* 通过父id获取下级地区信息
*/
@GetMapping
(
"/list/{parentId}"
)
public
R
<
List
<
SysRegion
>>
listByParentId
(
@PathVariable
Integer
parentId
)
{
return
R
.
ok
(
baseService
.
selectByParentId
(
parentId
));
}
}
dsk-admin/src/main/java/com/dsk/web/controller/system/SysUserController.java
View file @
764c44f2
...
...
@@ -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.*
;
/**
* 用户信息
...
...
@@ -81,7 +78,7 @@ public class SysUserController extends BaseController {
SysUserExportVo
vo
=
listVo
.
get
(
i
);
if
(
ObjectUtil
.
isNotEmpty
(
dept
))
{
vo
.
setDeptName
(
dept
.
getDeptName
());
vo
.
setLeader
(
dept
.
getLeader
());
//
vo.setLeader(dept.getLeader());
}
}
ExcelUtil
.
exportExcel
(
listVo
,
"用户数据"
,
SysUserExportVo
.
class
,
response
);
...
...
@@ -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-admin/src/main/java/com/dsk/web/schedule/TenantTimerTask.java
View file @
764c44f2
...
...
@@ -23,7 +23,7 @@ public class TenantTimerTask {
/**
* 每6小时扫描并禁用已过期租户账号
*/
@Scheduled
(
cron
=
"0 0
0/6 * * ?
"
)
@Scheduled
(
cron
=
"0 0
/10 * * * ?
"
)
public
void
updateExpiredTenantStatus
()
{
log
.
info
(
"执行定时禁用已过期租户账号(6h/次)"
);
TenantHelper
.
ignore
(
tenantService:
:
handleExpiredTenant
);
...
...
dsk-admin/src/main/resources/application.yml
View file @
764c44f2
...
...
@@ -157,6 +157,7 @@ tenant:
-
sys_user_post
-
sys_user_role
-
sys_client
-
sys_region
-
contact_info
-
customer_user
-
customer_follow_record
...
...
dsk-common/src/main/java/com/dsk/common/exception/file/InvalidExtensionException.java
View file @
764c44f2
...
...
@@ -9,7 +9,8 @@ import java.util.Arrays;
*
* @author dsk
*/
public
class
InvalidExtensionException
extends
FileUploadException
//public class InvalidExtensionException extends FileUploadException
public
class
InvalidExtensionException
extends
RuntimeException
{
private
static
final
long
serialVersionUID
=
1L
;
...
...
dsk-module/dsk-biz-api/src/main/java/com/dsk/biz/service/impl/CustomerServiceImpl.java
View file @
764c44f2
...
...
@@ -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 @
764c44f2
...
...
@@ -316,10 +316,9 @@
</delete>
<delete
id=
"deleteBusinessInfoByIds"
parameterType=
"Long"
>
delete i,b,
co,
f,l,r,u
delete i,b,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/assets/js/jskplug.js
View file @
764c44f2
/*
*
* 1、url地址,如
企业详情:https://pre-plug.jiansheku.com/enterprise?ak=aec7b3ff2y2q8x6t49a7e2c463ce21912&uid=a704fb35bca54707b9b5f8c9bba57815(ak:平台唯一标识
;uid:用户标识)
* 1、url地址,如
正式环境企业详情:https://plug.jiansheku.com/enterprise/56546856314e567a69?ak=bc8e534da5ea40639b2f084919280a82&initTime=1694507179060&uid=4a3b4bfdfbca4bff9d9bd7c8fd42f533(ak:接口获得的accesToken;initTime:获得accesToken时的时间戳
;uid:用户标识)
*
* */
const
steerScroll
=
function
(
iframeId
,
navigation
,
state
,
parentId
)
{
// state:监听or移除监听;navigation:页面排除iframe后剩下高度;iframeId: iframe的id
const
steerScroll
=
function
(
iframeId
,
navigation
,
footHeight
,
state
,
parentId
,
_this
)
{
// iframeId: iframe的id;navigation:页面排除iframe后剩下的顶部高度;footHeight: 页面排除iframe后剩下的底部高度;state:监听or移除监听;parentId: 父级id[不带默认就是铺满整个页面]];_this:指向当前实例(可忽略)
let
dom
=
window
if
(
parentId
)
{
// 默认页面可以滚动
dom
=
document
.
getElementById
(
parentId
)
...
...
@@ -22,7 +22,12 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
// 动态设置iFrame高度
if
(
data
.
height
)
{
document
.
getElementById
(
iframeId
).
style
.
height
=
data
.
height
+
'px'
scrolling
(
iframeId
,
navigation
,
parentId
)
// 初始加载获取滚动条距离顶部高度
scrolling
(
iframeId
,
navigation
,
footHeight
,
parentId
)
// 初始加载获取滚动条距离顶部高度
}
// 插件当前路由
if
(
_this
&&
data
.
currentPath
)
{
_this
.
currentRoute
=
data
_this
.
searchFlag
=
data
.
currentName
.
includes
(
'search-'
)
?
true
:
false
}
// 点击企业详情页 栏目名动态设置滚动高度
if
(
data
.
scrollHeight
)
{
...
...
@@ -48,23 +53,35 @@ const steerScroll = function(iframeId, navigation, state, parentId) { // state:
}
})
dom
.
addEventListener
(
'scroll'
,
(
event
)
=>
{
scrolling
(
iframeId
,
navigation
,
parentId
)
scrolling
(
iframeId
,
navigation
,
footHeight
,
parentId
)
})
}
else
{
dom
.
removeEventListener
(
'scroll'
,
(
event
)
=>
{
scrolling
(
iframeId
,
navigation
,
parentId
)
scrolling
(
iframeId
,
navigation
,
footHeight
,
parentId
)
})
}
}
const
scrolling
=
function
(
iframeId
,
navigation
,
parentId
)
{
const
scrolling
=
function
(
iframeId
,
navigation
,
footHeight
,
parentId
)
{
// 滚动条距文档顶部的距离
let
scrollTop
=
parentId
?
document
.
getElementById
(
parentId
).
scrollTop
:
window
.
pageYOffset
||
document
.
documentElement
.
scrollTop
||
document
.
body
.
scrollTop
// 将滚动距离传入子组件
const
ifa
=
document
.
getElementById
(
iframeId
)
scrollTop
=
scrollTop
+
navigation
.
totalHeight
const
bodyHeight
=
document
.
body
.
clientHeight
-
navigation
.
totalHeight
ifa
.
contentWindow
.
postMessage
({
'scrollTop'
:
scrollTop
,
'navHeight'
:
navigation
.
totalHeight
,
'bodyHeight'
:
bodyHeight
},
'*'
)
let
rippleHeight
=
0
//插件筛选条件浮动层距离底部距离
let
scrollGap
=
parentId
?
document
.
getElementById
(
parentId
).
scrollTop
:
window
.
scrollTop
||
document
.
body
.
scrollTop
||
document
.
documentElement
.
scrollTop
let
scrollHeight
=
parentId
?
document
.
getElementById
(
parentId
).
offsetHeight
:
window
.
scrollHeight
||
document
.
body
.
scrollHeight
||
document
.
documentElement
.
scrollHeight
let
domHeight
=
parentId
?
document
.
getElementById
(
parentId
).
clientHeight
:
window
.
clientHeight
||
document
.
body
.
clientHeight
||
document
.
documentElement
.
clientHeight
if
(
parentId
){
//网页内部嵌套时
rippleHeight
=
scrollHeight
-
scrollGap
-
domHeight
}
else
{
//
if
(
scrollHeight
-
scrollGap
-
domHeight
<=
footHeight
){
rippleHeight
=
0
}
else
{
rippleHeight
=
scrollHeight
-
scrollGap
-
domHeight
-
footHeight
}
}
ifa
.
contentWindow
.
postMessage
({
'scrollTop'
:
scrollTop
,
'navHeight'
:
navigation
.
totalHeight
,
'rippleHeight'
:
rippleHeight
},
'*'
)
}
export
{
...
...
dsk-operate-ui/src/layout/components/TagsView/index.vue
View file @
764c44f2
...
...
@@ -101,8 +101,10 @@ 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
)
currentIcon
=
currentRoute
.
meta
&&
currentRoute
.
meta
.
icon
icon
=
this
.
isActive
(
val
)
?
currentIcon
+
'Tags'
:
currentIcon
+
'Tag'
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/custom/customList/index.vue
View file @
764c44f2
...
...
@@ -467,7 +467,7 @@
params
.
cityIds
=
cityCode
}
if
(
countyCode
.
length
>
0
){
params
.
area
Ids
=
countyCode
params
.
district
Ids
=
countyCode
}
}
else
{
if
(
params
.
provinceIds
){
...
...
@@ -476,8 +476,8 @@
if
(
params
.
cityIds
){
delete
params
.
cityIds
}
if
(
params
.
area
Ids
){
delete
params
.
area
Ids
if
(
params
.
district
Ids
){
delete
params
.
district
Ids
}
}
...
...
dsk-operate-ui/src/views/detail/groupAccount/index.vue
View file @
764c44f2
...
...
@@ -60,7 +60,6 @@
this
.
details
=
res
.
data
;
})
infoMemberCount
({
combineId
:
this
.
customerId
}).
then
(
res
=>
{
console
.
log
(
res
.
data
)
if
(
res
.
code
==
200
){
this
.
statisticObj
=
res
.
data
}
...
...
dsk-operate-ui/src/views/detail/party-b/index.vue
View file @
764c44f2
...
...
@@ -5,8 +5,10 @@
</
template
>
<
script
>
import
{
steerScroll
}
from
'@/assets/js/jskplug'
export
default
{
import
{
steerScroll
}
from
'@/assets/js/jskplug'
import
{
dskAccessToken
}
from
'@/api/common'
export
default
{
name
:
'Company'
,
components
:
{
...
...
@@ -18,29 +20,17 @@ export default {
iframeHight
:
window
.
innerHeight
,
// iframe高度-当前页控制
navigation
:
{
isFixed
:
true
,
fixedHeight
:
56
,
totalHeight
:
68
},
// iframe之外页面顶部对象,ifFixed:是否浮动;fixedHeight:浮动对象高度;totalHeight:顶部整体高度
src
:
''
,
//iframe嵌套页面地址
domain
:
'https://pre-plug.jiansheku.com'
,
domain
:
'https://plug.jiansheku.com'
,
// 插件地址
// domain: 'http://192.168.60.19:3400',
// domain: 'http://192.168.60.30:3300',
ak
:
'aec7b3ff2y2q8x6t49a7e2c463ce21912'
// 需要携带的sdkId
ak
:
'aec7b3ff2y2q8x6t49a7e2c463ce21912'
,
// 需要携带的sdkId
uid
:
this
.
$store
.
state
.
user
.
userId
,
// 需要携带的uid
timelongs
:
7200
,
//刷新token时间
tokentimer
:
null
,
}
},
created
()
{
if
(
this
.
$route
.
params
.
id
)
{
// 获取companyId
this
.
loading
=
true
if
(
this
.
$route
.
name
==
'Company'
){
//企业详情
if
(
this
.
$route
.
query
.
html
){
if
(
this
.
$route
.
query
.
type
){
this
.
src
=
`
${
this
.
domain
}
/enterprise/
${
this
.
$route
.
params
.
id
}
/
${
this
.
$route
.
query
.
html
}
?flag=true&type=
${
this
.
$route
.
query
.
type
}
&ak=
${
this
.
ak
}
`
}
else
{
this
.
src
=
`
${
this
.
domain
}
/enterprise/
${
this
.
$route
.
params
.
id
}
/
${
this
.
$route
.
query
.
html
}
?ak=
${
this
.
ak
}
`
}
}
else
{
this
.
src
=
`
${
this
.
domain
}
/enterprise/
${
this
.
$route
.
params
.
id
}
?ak=
${
this
.
ak
}
`
}
}
if
(
this
.
$route
.
name
==
'Personnel'
){
//人员详情
this
.
src
=
`
${
this
.
domain
}
/personnel/
${
this
.
$route
.
params
.
id
}
.html?ak=
${
this
.
ak
}
`
}
}
this
.
gettokens
()
},
mounted
()
{
this
.
iframeLoading
()
// 判断iframe页面是否加载完成-当前页控制
...
...
@@ -49,8 +39,53 @@ export default {
beforeDestroy
()
{
clearInterval
(
this
.
iframeTimer
)
// -当前页控制
steerScroll
(
'companyIframe'
,
this
.
navigation
)
// 销毁滚动
clearInterval
(
this
.
tokentimer
)
},
methods
:
{
gettokens
(){
dskAccessToken
().
then
(
res
=>
{
if
(
res
.
code
==
200
){
this
.
timelongs
=
res
.
data
.
expire
this
.
ak
=
res
.
data
.
accessToken
if
(
this
.
$route
.
params
.
id
)
{
// 获取companyId
this
.
loading
=
true
if
(
this
.
$route
.
name
==
'Company'
){
//企业详情
if
(
this
.
$route
.
query
.
html
){
if
(
this
.
$route
.
query
.
type
){
this
.
src
=
`
${
this
.
domain
}
/enterprise/
${
this
.
$route
.
params
.
id
}
/
${
this
.
$route
.
query
.
html
}
?flag=true&type=
${
this
.
$route
.
query
.
type
}
&ak=
${
this
.
ak
}
&initTime=
${
new
Date
().
getTime
()}
&uid=
${
this
.
ak
}
`
}
else
{
this
.
src
=
`
${
this
.
domain
}
/enterprise/
${
this
.
$route
.
params
.
id
}
/
${
this
.
$route
.
query
.
html
}
?ak=
${
this
.
ak
}
&initTime=
${
new
Date
().
getTime
()}
&uid=
${
this
.
ak
}
`
}
}
else
{
this
.
src
=
`
${
this
.
domain
}
/enterprise/
${
this
.
$route
.
params
.
id
}
?ak=
${
this
.
ak
}
&initTime=
${
new
Date
().
getTime
()}
&uid=
${
this
.
ak
}
`
}
}
if
(
this
.
$route
.
name
==
'Personnel'
){
//人员详情
this
.
src
=
`
${
this
.
domain
}
/personnel/
${
this
.
$route
.
params
.
id
}
.html?ak=
${
this
.
ak
}
&initTime=
${
new
Date
().
getTime
()}
&uid=
${
this
.
ak
}
`
}
}
this
.
refreshtoken
()
}
else
{
clearTimeout
(
this
.
tokentimer
)
}
})
},
refreshtoken
(){
this
.
tokentimer
=
setTimeout
(()
=>
{
dskAccessToken
().
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
timelongs
=
res
.
data
.
expire
this
.
ak
=
res
.
data
.
accessToken
let
ifam
=
document
.
getElementById
(
'companyIframe'
)
//iframe的id
let
akObj
=
res
.
data
.
expire
//accessToken接口的返回值
let
initTime
=
new
Date
().
getTime
()
//accessToken接口返回后的当前时间戳
ifam
.
contentWindow
.
postMessage
({
'accessToken'
:
akObj
.
accessToken
,
'initTime'
:
initTime
},
'*'
)
}
else
{
clearTimeout
(
this
.
tokentimer
)
}
})
},
this
.
timelongs
*
1000
)
},
//判断iframe页面是否加载完成-当前页控制
iframeLoading
()
{
let
iframeHeight
=
document
.
getElementById
(
"companyIframe"
).
clientHeight
,
number
=
0
...
...
dsk-operate-ui/src/views/enterpriseData/components/Group/index.vue
View file @
764c44f2
...
...
@@ -377,13 +377,13 @@ export default {
return
this
.
$message
.
warning
(
"抱歉,没找到相关数据,建议调整关键词或筛选条件,重新搜索"
)
}
let
item
=
this
.
searchList
[
0
]
this
.
$router
.
push
({
path
:
`/groupAccount/
${
item
.
combineId
}
?name=
${
item
.
combineName
.
replace
(
new
RegExp
(
"<font color='#FF204E'>"
,
'g'
),
''
).
replace
(
new
RegExp
(
"</font>"
,
'g'
),
''
)}
&cid=
${
item
.
combineMemberCid
}
`
})
this
.
$router
.
push
({
path
:
`/groupAccount/
${
item
.
combineId
}
?name=
${
item
.
combineName
.
replace
(
new
RegExp
(
"<font color='#FF204E'>"
,
'g'
),
''
).
replace
(
new
RegExp
(
"</font>"
,
'g'
),
''
)}
`
})
},
selCompany
(
item
=
this
.
searchList
[
0
]){
if
(
!
item
){
return
this
.
$message
.
warning
(
"抱歉,没找到相关数据,建议调整关键词或筛选条件,重新搜索"
)
}
this
.
$router
.
push
({
path
:
`/groupAccount/
${
item
.
combineId
}
?name=
${
item
.
combineName
.
replace
(
new
RegExp
(
"<font color='#FF204E'>"
,
'g'
),
''
).
replace
(
new
RegExp
(
"</font>"
,
'g'
),
''
)}
&cid=
${
item
.
combineMemberCid
}
`
})
this
.
$router
.
push
({
path
:
`/groupAccount/
${
item
.
combineId
}
?name=
${
item
.
combineName
.
replace
(
new
RegExp
(
"<font color='#FF204E'>"
,
'g'
),
''
).
replace
(
new
RegExp
(
"</font>"
,
'g'
),
''
)}
`
})
},
}
}
...
...
dsk-operate-ui/src/views/enterpriseManagement/index.vue
View file @
764c44f2
...
...
@@ -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/enterpriseManagement/programme.vue
View file @
764c44f2
...
...
@@ -142,7 +142,7 @@
></el-tree>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-input
:disabled=
"disabled"
v-model=
"form.remark"
maxlength=
"50"
type=
"textarea"
placeholder=
"请输入
内容
"
></el-input>
<el-input
:disabled=
"disabled"
v-model=
"form.remark"
maxlength=
"50"
type=
"textarea"
placeholder=
"请输入
文字(50字以内)
"
></el-input>
</el-form-item>
</el-form>
<div
slot=
"footer"
class=
"dialog-footer"
v-if=
"!disabled"
>
...
...
dsk-operate-ui/src/views/index.vue
View file @
764c44f2
...
...
@@ -186,6 +186,11 @@
</el-tab-pane>
<el-tab-pane
label=
"大项目最新招标"
name=
"second"
>
<skeleton
v-if=
"zhaobiaoIsSkeleton"
style=
"padding: 16px"
></skeleton>
<div
class=
"empty"
v-if=
"zbList.length === 0 && !zhaobiaoIsSkeleton"
>
<img
class=
"img"
src=
"@/assets/images/project/empty.png"
>
<div
class=
"p1"
>
抱歉,没找到相关数据
</div>
</div>
<div
v-if=
"!zhaobiaoIsSkeleton"
class=
"list"
>
<div
class=
"item"
v-for=
"(item,index) in zbList"
:key=
"index"
>
<p
class=
"list-title"
><router-link
:to=
"`/radar/Notice/details/${item.id}`"
tag=
"a"
class=
"a-link"
v-if=
"item.id"
v-html=
"item.projectName"
></router-link></p>
...
...
dsk-operate-ui/src/views/login.vue
View file @
764c44f2
...
...
@@ -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 @
764c44f2
...
...
@@ -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-operate-ui/src/views/system/user/index.vue
View file @
764c44f2
...
...
@@ -370,6 +370,10 @@
<font
color=
"red"
>
导入失败
</font>
</
template
>
</el-table-column>
<el-table-column
prop=
"deptName"
label=
"所属组织"
>
</el-table-column>
<el-table-column
prop=
"nickName"
label=
"用户昵称"
>
...
...
dsk-system/src/main/java/com/dsk/system/domain/SysRegion.java
0 → 100644
View file @
764c44f2
package
com
.
dsk
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.experimental.Accessors
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 行政区编码表(SysRegion)实体类
*
* @author makejava
* @since 2023-06-28 11:23:12
*/
@Data
@NoArgsConstructor
@Accessors
(
chain
=
true
)
@TableName
(
"sys_region"
)
public
class
SysRegion
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
17128129449360485L
;
/**
* 行政区编码(数字型)
*/
private
Integer
id
;
/**
* 行政区名称
*/
private
String
regionName
;
/**
* 行政区名称(最新)
*/
private
String
fullName
;
/**
* 行政区简称
*/
private
String
nameSimple
;
/**
* 行政区编码(字符型)
*/
private
String
regionCode
;
/**
* 行政区等级:1:省级,2:地市,3:区县,4:乡镇,
*/
private
Integer
regionLevel
;
/**
* 父级id
*/
private
Integer
parentId
;
/**
* 行政区类型:0:其他,1:省,2:直辖市,3:特别行政区,4:自治区
*/
private
Integer
regionType
;
/**
* 权重
*/
private
Integer
weight
;
/**
* 备注
*/
private
String
remark
;
/**
* 0:开启,1:准备中,2:关闭
*/
private
Integer
status
;
private
Date
createTime
;
private
Date
updateTime
;
private
Integer
updateId
;
}
dsk-system/src/main/java/com/dsk/system/domain/SysUser.java
View file @
764c44f2
...
...
@@ -5,10 +5,9 @@ import com.dsk.common.annotation.Sensitive;
import
com.dsk.common.constant.UserConstants
;
import
com.dsk.common.enums.SensitiveStrategy
;
import
com.dsk.common.tenant.core.TenantEntity
;
import
com.dsk.common.xss.Xss
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.dsk.common.core.domain.BaseEntity
;
import
com.dsk.common.xss.Xss
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.NoArgsConstructor
;
...
...
@@ -129,6 +128,11 @@ public class SysUser extends TenantEntity {
*/
private
String
remark
;
/**
* 创建时间
*/
private
Date
createTime
;
/**
* 部门对象
*/
...
...
@@ -159,6 +163,7 @@ public class SysUser extends TenantEntity {
@TableField
(
exist
=
false
)
private
Long
roleId
;
public
SysUser
(
Long
userId
)
{
this
.
userId
=
userId
;
}
...
...
dsk-system/src/main/java/com/dsk/system/domain/vo/SysUserExportVo.java
View file @
764c44f2
package
com
.
dsk
.
system
.
domain
.
vo
;
import
com.alibaba.excel.annotation.ExcelProperty
;
import
com.dsk.common.annotation.ExcelDictFormat
;
import
com.dsk.common.convert.ExcelDictConvert
;
import
com.alibaba.excel.annotation.write.style.ColumnWidth
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -20,29 +19,29 @@ import java.util.Date;
public
class
SysUserExportVo
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 用户ID
*/
@ExcelProperty
(
value
=
"用户序号"
)
private
Long
userId
;
/**
* 用户账号
*/
@ExcelProperty
(
value
=
"登录名称"
)
private
String
userName
;
/
//
**
//
* 用户ID
//
*/
//
@ExcelProperty(value = "用户序号")
//
private Long userId;
//
/
//
**
//
* 用户账号
//
*/
//
@ExcelProperty(value = "登录名称")
//
private String userName;
/**
* 用户昵称
*/
@ExcelProperty
(
value
=
"用户
名
称"
)
@ExcelProperty
(
value
=
"用户
昵
称"
)
private
String
nickName
;
/**
* 用户邮箱
*/
@ExcelProperty
(
value
=
"用户邮箱"
)
private
String
email
;
/
//
**
//
* 用户邮箱
//
*/
//
@ExcelProperty(value = "用户邮箱")
//
private String email;
/**
* 手机号码
...
...
@@ -50,42 +49,50 @@ public class SysUserExportVo implements Serializable {
@ExcelProperty
(
value
=
"手机号码"
)
private
String
phonenumber
;
/**
* 用户性别
*/
@ExcelProperty
(
value
=
"用户性别"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
dictType
=
"sys_user_sex"
)
private
String
sex
;
/**
* 帐号状态(0正常 1停用)
*/
@ExcelProperty
(
value
=
"帐号状态"
,
converter
=
ExcelDictConvert
.
class
)
@ExcelDictFormat
(
dictType
=
"sys_normal_disable"
)
private
String
status
;
/**
* 最后登录IP
*/
@ExcelProperty
(
value
=
"最后登录IP"
)
private
String
loginIp
;
/**
* 最后登录时间
*/
@ExcelProperty
(
value
=
"最后登录时间"
)
private
Date
loginDate
;
/
//
**
//
* 用户性别
//
*/
//
@ExcelProperty(value = "用户性别", converter = ExcelDictConvert.class)
//
@ExcelDictFormat(dictType = "sys_user_sex")
//
private String sex;
//
/
//
**
//
* 帐号状态(0正常 1停用)
//
*/
//
@ExcelProperty(value = "帐号状态", converter = ExcelDictConvert.class)
//
@ExcelDictFormat(dictType = "sys_normal_disable")
//
private String status;
//
/
//
**
//
* 最后登录IP
//
*/
//
@ExcelProperty(value = "最后登录IP")
//
private String loginIp;
//
/
//
**
//
* 最后登录时间
//
*/
//
@ExcelProperty(value = "最后登录时间")
//
private Date loginDate;
/**
* 部门名称
*/
@ExcelProperty
(
value
=
"
部门
名称"
)
@ExcelProperty
(
value
=
"
组织
名称"
)
private
String
deptName
;
///**
// * 负责人
// */
//@ExcelProperty(value = "部门负责人")
//private String leader;
/**
*
负责人
*
创建时间
*/
@ExcelProperty
(
value
=
"部门负责人"
)
private
String
leader
;
@ExcelProperty
(
value
=
"创建时间"
)
@ColumnWidth
(
value
=
25
)
// 列宽
private
Date
createTime
;
}
dsk-system/src/main/java/com/dsk/system/mapper/SysRegionMapper.java
0 → 100644
View file @
764c44f2
package
com
.
dsk
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.dsk.system.domain.SysRegion
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 行政区编码表(SysRegion)表数据库访问层
*
* @author makejava
* @since 2023-06-28 11:23:13
*/
@Mapper
public
interface
SysRegionMapper
extends
BaseMapper
<
SysRegion
>
{
}
dsk-system/src/main/java/com/dsk/system/service/SysRegionService.java
0 → 100644
View file @
764c44f2
package
com
.
dsk
.
system
.
service
;
import
com.dsk.system.domain.SysRegion
;
import
java.util.List
;
/**
* 行政区编码表(SysRegion)表服务接口
*
* @author makejava
* @since 2023-06-28 11:23:12
*/
public
interface
SysRegionService
{
List
<
SysRegion
>
selectByParentId
(
Integer
parentId
);
}
dsk-system/src/main/java/com/dsk/system/service/impl/ISysTenantServiceImpl.java
View file @
764c44f2
...
...
@@ -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
;
...
...
@@ -229,21 +231,32 @@ public class ISysTenantServiceImpl implements ISysTenantService {
dictDataMapper
.
insertBatch
(
dictDataList
);
List
<
SysConfig
>
sysConfigList
=
configMapper
.
selectList
(
new
LambdaQueryWrapper
<
SysConfig
>().
eq
(
SysConfig:
:
getTenantId
,
defaultTenantId
));
new
LambdaQueryWrapper
<
SysConfig
>()
.
eq
(
SysConfig:
:
getTenantId
,
defaultTenantId
)
.
eq
(
SysConfig:
:
getConfigType
,
"Y"
));
for
(
SysConfig
config
:
sysConfigList
)
{
config
.
setConfigId
(
null
);
config
.
setTenantId
(
tenantId
);
}
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/SysRegionServiceImpl.java
0 → 100644
View file @
764c44f2
package
com
.
dsk
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.toolkit.Wrappers
;
import
com.dsk.system.domain.SysRegion
;
import
com.dsk.system.mapper.SysRegionMapper
;
import
com.dsk.system.service.SysRegionService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
javax.annotation.Resource
;
import
java.util.List
;
/**
* 行政区编码表(SysRegion)表服务实现类
*
* @author makejava
* @since 2023-06-28 11:23:12
*/
@Service
(
"sysRegionService"
)
public
class
SysRegionServiceImpl
implements
SysRegionService
{
@Resource
private
SysRegionMapper
baseMapper
;
private
static
final
Integer
ACQUIESCE_PARENT_ID
=
100000
;
@Override
public
List
<
SysRegion
>
selectByParentId
(
Integer
parentId
)
{
return
baseMapper
.
selectList
(
Wrappers
.<
SysRegion
>
lambdaQuery
()
.
eq
(
SysRegion:
:
getParentId
,
ObjectUtils
.
isEmpty
(
parentId
)
?
ACQUIESCE_PARENT_ID
:
parentId
)
.
orderByAsc
(
SysRegion:
:
getId
));
}
}
dsk-system/src/main/java/com/dsk/system/service/impl/SysUserServiceImpl.java
View file @
764c44f2
...
...
@@ -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