Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sup-server
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
sup-server
Commits
3e88c38d
Commit
3e88c38d
authored
Nov 23, 2022
by
liaoxingda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://192.168.60.201/root/sup-server
parents
a7b37049
da25937e
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
527 additions
and
189 deletions
+527
-189
package.json
dsk-srm-server/package.json
+1
-1
login.js
dsk-srm-server/src/api/login.js
+8
-4
UpdatePass.vue
dsk-srm-server/src/components/UpdatePass.vue
+163
-0
home.vue
dsk-srm-server/src/home.vue
+52
-5
login.vue
dsk-srm-server/src/login.vue
+13
-9
main.js
dsk-srm-server/src/main.js
+40
-0
routes-config.js
dsk-srm-server/src/router/routes-config.js
+0
-32
certificationManagement.vue
dsk-srm-server/src/views/certificationManagement.vue
+99
-5
test1.vue
dsk-srm-server/src/views/test1.vue
+0
-30
test2.vue
dsk-srm-server/src/views/test2.vue
+0
-30
vue.config.js
dsk-srm-server/vue.config.js
+2
-2
UserRegisterService.java
...erver/framework/security/service/UserRegisterService.java
+14
-6
CaptchaController.java
.../java/com/supServer/project/common/CaptchaController.java
+2
-2
CompanyAuthenticationController.java
...r/project/controller/CompanyAuthenticationController.java
+0
-31
SmsController.java
.../java/com/supServer/project/controller/SmsController.java
+1
-1
BizBlacklist.java
src/main/java/com/supServer/project/entity/BizBlacklist.java
+57
-0
AttestationVo.java
...n/java/com/supServer/project/entity/vo/AttestationVo.java
+3
-3
BizBlacklistMapper.java
...java/com/supServer/project/mapper/BizBlacklistMapper.java
+17
-0
BizCompanyInfoMapper.java
...va/com/supServer/project/mapper/BizCompanyInfoMapper.java
+0
-2
BizCompanyInfoService.java
.../com/supServer/project/service/BizCompanyInfoService.java
+0
-7
IBizBlacklistService.java
...a/com/supServer/project/service/IBizBlacklistService.java
+14
-0
BizBlacklistServiceImpl.java
...pServer/project/service/impl/BizBlacklistServiceImpl.java
+27
-0
BizCompanyInfoServiceImpl.java
...erver/project/service/impl/BizCompanyInfoServiceImpl.java
+0
-8
BizBlacklistMapper.xml
src/main/resources/mybatis/mapper/BizBlacklistMapper.xml
+12
-0
BizCompanyInfoMapper.xml
src/main/resources/mybatis/mapper/BizCompanyInfoMapper.xml
+2
-11
No files found.
dsk-srm-server/package.json
View file @
3e88c38d
...
...
@@ -3,7 +3,7 @@
"version"
:
"0.1.0"
,
"private"
:
true
,
"scripts"
:
{
"test"
:
"vue-cli-service serve --host 192.168.
60.48
--development"
,
"test"
:
"vue-cli-service serve --host 192.168.
1.3
--development"
,
"serve"
:
"vue-cli-service serve --production"
,
"build"
:
"vue-cli-service build --production"
},
...
...
dsk-srm-server/src/api/login.js
View file @
3e88c38d
...
...
@@ -41,8 +41,8 @@ export const loginApi = (data) => network({
});
export
const
loginOutApi
=
()
=>
network
({
url
:
""
,
method
:
"
pos
t"
,
url
:
"
/logOut
"
,
method
:
"
ge
t"
,
});
export
const
getUserInfoApi
=
()
=>
network
({
...
...
@@ -61,7 +61,11 @@ export const register = (data) => network({
method
:
"post"
,
data
});
export
const
updatePassApi
=
(
data
)
=>
network
({
url
:
"/system/userInfo/resetPwd"
,
method
:
"post"
,
data
});
export
const
uploadFile
=
(
data
)
=>
network
({
url
:
"/file/uploadFile"
,
method
:
"post"
,
...
...
@@ -69,4 +73,4 @@ export const uploadFile = (data) => network({
headers
:
{
'Content-Type'
:
'multipart/form-data'
},
});
\ No newline at end of file
});
dsk-srm-server/src/components/UpdatePass.vue
0 → 100644
View file @
3e88c38d
<
template
>
<div
class=
"update-pass"
>
<el-dialog
:visible
.
sync=
"updatePassDialogStatus"
width=
"600px"
@
close=
"dialogClose"
:close-on-click-modal=
"false"
custom-class=
"update-pass-dialog"
:show-close=
"false"
>
<el-form
:model=
"resetForm"
ref=
"updateForm"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"旧密码"
prop=
"oldPassword"
>
<el-input
v-model=
"resetForm.oldPassword"
placeholder=
"请输入旧密码"
show-password
></el-input>
</el-form-item>
<el-form-item
label=
"新密码"
prop=
"newPassword"
>
<el-input
v-model=
"resetForm.newPassword"
placeholder=
"请输入新密码"
show-password
></el-input>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirmPassword"
>
<el-input
v-model=
"resetForm.confirmPassword"
placeholder=
"请确认密码"
show-password
></el-input>
</el-form-item>
</el-form>
<template
slot=
"title"
>
<div
class=
"update-pass-header"
>
<span>
修改密码
</span>
<i
class=
"el-icon-close"
@
click=
"dialogClose"
></i>
</div>
</
template
>
<span
slot=
"footer"
>
<el-button
type=
"primary"
@
click=
"confirm"
>
保存
</el-button>
<el-button
@
click=
"dialogClose"
>
返回
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
{
updatePassApi
}
from
"@/api/login"
;
export
default
{
name
:
"updatePass"
,
props
:
{
updatePassDialogStatus
:
{
type
:
Boolean
,
default
:
false
}
},
model
:
{
prop
:
"updatePassDialogStatus"
,
event
:
"dialogClose"
},
data
()
{
const
reg
=
/
\s
+/g
;
const
checkPass
=
str
=>
{
return
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
&&
value
!=
"0"
)
{
return
callback
(
new
Error
(
`
${
str
}
不能为空`
));
}
if
(
reg
.
test
(
value
))
{
return
callback
(
new
Error
(
`密码不能包含空格`
));
}
if
(
str
===
"新密码"
&&
this
.
resetForm
.
newPassword
==
this
.
resetForm
.
oldPassword
)
{
return
callback
(
new
Error
(
`新密码不能跟旧密码相同`
));
}
if
(
str
===
"确认密码"
&&
this
.
resetForm
.
confirmPassword
!==
this
.
resetForm
.
newPassword
)
{
return
callback
(
new
Error
(
`确认密码跟新密码不相同`
));
}
if
((
str
===
"确认密码"
||
str
===
"新密码"
)
&&
(
value
.
length
<
8
||
value
.
length
>
12
))
{
return
callback
(
new
Error
(
`密码长度必须在8到12个字符之间`
));
}
callback
();
};
};
return
{
resetForm
:
{
oldPassword
:
""
,
newPassword
:
""
,
confirmPassword
:
""
},
rules
:
{
oldPassword
:
[{
required
:
true
,
trigger
:
"blur"
,
validator
:
checkPass
(
"旧密码"
)
}],
newPassword
:
[{
required
:
true
,
trigger
:
"blur"
,
validator
:
checkPass
(
"新密码"
)
}],
confirmPassword
:
[{
required
:
true
,
trigger
:
"blur"
,
validator
:
checkPass
(
"确认密码"
)
}],
}
};
},
//可访问data属性
created
()
{
},
//计算集
computed
:
{
},
//方法集
methods
:
{
dialogClose
()
{
this
.
$refs
[
"updateForm"
].
resetFields
();
this
.
resetForm
=
this
.
$options
.
data
.
call
(
this
).
resetForm
;
this
.
$emit
(
"dialog-close"
,
false
);
},
confirm
()
{
this
.
$refs
[
"updateForm"
].
validate
(
flag
=>
{
if
(
flag
)
{
const
{
oldPassword
,
newPassword
}
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
resetForm
));
updatePassApi
({
oldPassword
,
newPassword
}).
then
(
res
=>
{
this
.
$message
.
success
(
"密码修改成功!"
);
setTimeout
(()
=>
{
this
.
$store
.
dispatch
(
"user/loginOut"
).
finally
(()
=>
location
.
href
=
"/login"
);
},
1000
);
});
}
});
}
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.update-pass
{
::v-deep
.update-pass-dialog
{
margin
:
0
!
important
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
.el-dialog__header
{
padding
:
10px
20px
;
border-bottom
:
1px
solid
#eeeeee
;
}
.el-dialog__body
{
padding
:
30px
50px
;
}
.update-pass-header
{
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
&
>
span
:first-of-type
{
color
:
#0081ff
;
font-weight
:
bold
;
font-size
:
14px
;
}
&
>
i
{
&
:hover
{
cursor
:
pointer
;
color
:
#0081ff
;
}
}
}
.el-dialog__footer
{
display
:
flex
;
justify-content
:
center
;
button
{
width
:
89px
;
height
:
35px
;
line-height
:
35px
;
padding
:
0
;
}
}
}
}
</
style
>
dsk-srm-server/src/home.vue
View file @
3e88c38d
...
...
@@ -10,7 +10,15 @@
<div
class=
"main-container"
>
<div
class=
"nav-bar"
>
<el-dropdown
class=
"user-menu"
>
<span
class=
"user-menu-link"
>
<span>
{{
$store
.
state
.
user
.
userInfo
.
user
.
phone
}}
</span><i
class=
"el-icon-caret-bottom el-icon--right"
></i>
</span>
<el-dropdown-menu
slot=
"dropdown"
>
<el-dropdown-item
@
click
.
native=
"updatePass"
>
修改密码
</el-dropdown-item>
<el-dropdown-item
@
click
.
native=
"loginOut"
>
退出登录
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<div
class=
"content-container"
>
...
...
@@ -19,18 +27,22 @@
</div>
<update-pass
v-model=
"updatePassDialogStatus"
@
dialog-close=
"dialogClose"
></update-pass>
</div>
</
template
>
<
script
>
import
SideBar
from
"@/components/SideBar"
;
import
UpdatePass
from
"@/components/UpdatePass"
;
export
default
{
name
:
"Home"
,
components
:
{
SideBar
SideBar
,
UpdatePass
},
data
()
{
return
{
updatePassDialogStatus
:
false
};
},
//可访问data属性
...
...
@@ -43,7 +55,21 @@ export default {
},
//方法集
methods
:
{
updatePass
()
{
this
.
updatePassDialogStatus
=
true
;
},
loginOut
()
{
this
.
$confirm
(
'是否确定退出登录?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(()
=>
{
this
.
$store
.
dispatch
(
"user/loginOut"
).
catch
(
err
=>
console
.
log
(
err
)).
finally
(()
=>
location
.
href
=
"/login"
);
}).
catch
(
err
=>
console
.
log
(
err
));
},
dialogClose
(
v
)
{
this
.
updatePassDialogStatus
=
v
;
}
},
}
</
script
>
...
...
@@ -70,8 +96,29 @@ export default {
.nav-bar
{
width
:
100%
;
height
:
70px
;
border-bottom
:
1px
solid
#
EEEEEE
;
border-bottom
:
1px
solid
#
eeeeee
;
box-sizing
:
border-box
;
display
:
flex
;
justify-content
:
flex-end
;
align-items
:
center
;
padding
:
16px
;
box-sizing
:
border-box
;
.user-menu
{
.user-menu-link
{
display
:
flex
;
align-items
:
center
;
cursor
:
pointer
;
&
>
span
{
margin-top
:
2px
;
}
&
>
i
{
font-size
:
24px
;
}
}
}
}
.content-container
{
...
...
dsk-srm-server/src/login.vue
View file @
3e88c38d
...
...
@@ -430,7 +430,7 @@ export default {
this
.
$message
.
error
(
'账号、验证码不能为空!'
);
return
false
;
}
this
.
$store
.
dispatch
(
"user/smsLogin"
,
this
.
yzmparam
).
then
(
res
=>
{
this
.
$store
.
dispatch
(
"user/smsLogin
Handler
"
,
this
.
yzmparam
).
then
(
res
=>
{
this
.
toList
();
});
},
...
...
@@ -444,15 +444,15 @@ export default {
phone
:
this
.
resetparam
.
phone
,
code
:
this
.
resetparam
.
smsCode
};
//校验短信验证码
validateSmsCode
(
param
).
then
(
res
=>
{
let
params
=
{
uuid
:
this
.
uuid
,
code
:
this
.
resetparam
.
code
};
// 校验图形验证码;
validateCaptcha
(
params
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
let
params
=
{
uuid
:
this
.
uuid
,
code
:
this
.
resetparam
.
code
};
// 校验图形验证码;
validateCaptcha
(
params
).
then
(
res
=>
{
//校验短信验证码
validateSmsCode
(
param
).
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
this
.
type
=
'tjmm'
;
}
else
{
...
...
@@ -517,6 +517,10 @@ export default {
},
// 验证手机号发送验证码
yzPohne
(
phone
)
{
if
(
phone
.
length
>
11
){
this
.
$message
.
error
(
'请输入正确的手机号!'
);
return
false
}
var
param
=
{
phone
:
phone
,
type
:
1
//0:注册,1:短信登录/忘记密码
...
...
dsk-srm-server/src/main.js
View file @
3e88c38d
...
...
@@ -10,6 +10,46 @@ Vue.use(ElementUI);
Vue
.
config
.
productionTip
=
false
;
Vue
.
prototype
.
flattenedToTree
=
(
data
,
parentId
=
0
,
pidName
=
"parentId"
,
idName
=
"deptId"
,
childrenName
=
"children"
)
=>
{
if
(
!
data
)
return
[];
// 遍历结果
const
result
=
[];
// 存储id 唯一值
const
map
=
{};
for
(
const
iterator
of
data
)
{
const
id
=
iterator
[
idName
];
const
pid
=
iterator
[
pidName
];
// 如果map对象不存在此id
if
(
!
map
[
id
])
{
map
[
id
]
=
{
[
childrenName
]:
[]
};
}
map
[
id
]
=
{
...
iterator
,
[
childrenName
]:
map
[
id
][
childrenName
]
};
const
treeItem
=
map
[
id
];
// 当前的pid 等于传进来的pid 处于顶级节点
if
(
pid
===
parentId
)
{
result
.
push
(
treeItem
);
}
else
{
// 是否存在pid为键名的对象 否创建对象
if
(
!
map
[
pid
])
{
map
[
pid
]
=
{
[
childrenName
]:
[]
};
}
// 处于子级 找到相应pid 对象下的children
map
[
pid
][
childrenName
].
push
(
treeItem
);
}
}
return
result
;
};
new
Vue
({
router
,
store
,
...
...
dsk-srm-server/src/router/routes-config.js
View file @
3e88c38d
...
...
@@ -54,38 +54,6 @@ export const rolesOfRoutes = [
roles
:
[
"normal"
],
},
},
{
path
:
'/test1'
,
name
:
'test1'
,
component
:
"catalogue"
,
meta
:
{
title
:
"测试目录1"
,
icon
:
""
,
menuType
:
"M"
,
inSideBar
:
true
,
inBread
:
true
,
cache
:
false
,
permission
:
[],
roles
:
[
"normal"
],
},
children
:
[
{
path
:
'/test2'
,
name
:
'test2'
,
component
:
"views/test2"
,
meta
:
{
title
:
"测试菜单2"
,
icon
:
""
,
menuType
:
"C"
,
inSideBar
:
true
,
inBread
:
true
,
cache
:
false
,
permission
:
[],
roles
:
[
"normal"
],
}
}
]
},
]
},
];
\ No newline at end of file
dsk-srm-server/src/views/certificationManagement.vue
View file @
3e88c38d
...
...
@@ -71,19 +71,25 @@
</el-form-item>
<el-form-item
label=
"企业注册地:"
prop=
"registeredAddress"
>
<el-
input
v-model=
"form.registeredAddress"
></el-input
>
<el-
cascader
v-model=
"form.registeredAddress"
:options=
"areaOptions"
disabled
placeholder=
""
:props=
"areaProps"
></el-cascader
>
</el-form-item>
<el-form-item
label=
"
企业注册地
:"
prop=
"addressDetail"
style=
"width:100%"
>
<el-form-item
label=
"
办公地址
:"
prop=
"addressDetail"
style=
"width:100%"
>
<el-input
v-model=
"form.addressDetail"
></el-input>
</el-form-item>
<el-form-item
label=
"营业执照扫描件:"
prop=
"licenseUrl"
>
<el-form-item
label=
"营业执照扫描件:"
prop=
"licenseUrl"
class=
"license-url"
>
<img
v-if=
"form.licenseUrl"
:src=
"form.licenseUrl"
alt=
""
>
<div
class=
"img-model"
v-if=
"form.licenseUrl"
>
<i
class=
"el-icon-full-screen"
@
click=
"viewImg(form.licenseUrl)"
></i>
</div>
</el-form-item>
<el-form-item
label=
"法人代表身份证扫描件:"
prop=
"cardUrl"
>
<el-form-item
label=
"法人代表身份证扫描件:"
prop=
"cardUrl"
class=
"card-url"
>
<img
v-if=
"form.licenseUrl"
:src=
"form.cardUrl"
alt=
""
>
<div
class=
"img-model"
v-if=
"form.licenseUrl"
>
<i
class=
"el-icon-full-screen"
@
click=
"viewImg(form.licenseUrl)"
></i>
</div>
</el-form-item>
<el-form-item
label=
"供应商类型选择:"
prop=
"catId"
>
...
...
@@ -98,11 +104,19 @@
</el-form>
<el-dialog
:visible
.
sync=
"viewDialogStatus"
width=
"650px"
@
close=
"viewDialogClose"
:show-close=
"false"
custom-class=
"view-dialog"
>
<img
:src=
"viewSrc"
>
<span
slot=
"footer"
>
<el-button
@
click=
"viewDialogClose"
>
关闭
</el-button>
</span>
</el-dialog>
</div>
</
template
>
<
script
>
import
{
getAuthenticationDetailApi
,
getSupplierTypeApi
}
from
"@/api/authentication"
;
import
{
mapState
}
from
"vuex"
;
import
areaData
from
"@/utils/jsk.json"
;
export
default
{
name
:
"certificationManagement"
,
data
()
{
...
...
@@ -143,11 +157,20 @@ export default {
props
:
{
value
:
"catId"
,
label
:
"name"
},
viewSrc
:
""
,
viewDialogStatus
:
false
,
areaOptions
:
[],
areaProps
:
{
value
:
"id"
,
label
:
"regionName"
,
checkStrictly
:
true
}
};
},
//可访问data属性
created
()
{
this
.
createAreaTree
();
this
.
getDetail
();
},
//计算集
...
...
@@ -167,10 +190,23 @@ export default {
let
res
=
await
getAuthenticationDetailApi
();
if
(
res
)
{
this
.
form
=
{
...
this
.
form
,
...
this
.
userInfo
,
...
res
.
data
};
this
.
form
.
registeredAddress
?
this
.
form
.
registeredAddress
=
parseInt
(
this
.
form
.
registeredAddress
)
:
""
;
}
}
catch
(
error
)
{
console
.
log
(
error
);
}
},
createAreaTree
()
{
// this.areaOptions = this.flattenedToTree(areaData, 100000, "parentId", "id");
this
.
areaOptions
=
areaData
;
},
viewImg
(
src
)
{
this
.
viewSrc
=
src
;
this
.
viewDialogStatus
=
true
;
},
viewDialogClose
()
{
this
.
viewSrc
=
""
;
this
.
viewDialogStatus
=
false
;
}
},
}
...
...
@@ -227,7 +263,42 @@ export default {
img
{
width
:
100%
;
max-height
:
200px
;
height
:
100%
;
}
}
}
::v-deep
.card-url
,
::v-deep
.license-url
{
.el-form-item__content
{
position
:
relative
;
height
:
200px
;
&
:hover
.img-model
{
visibility
:
visible
;
opacity
:
1
;
}
.img-model
{
position
:
absolute
;
left
:
0
;
top
:
0
;
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
opacity
:
0
;
visibility
:
hidden
;
transition
:
opacity
0
.3s
;
&
>
i
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
color
:
#fff
;
font-size
:
30px
;
cursor
:
pointer
;
}
}
}
}
...
...
@@ -259,5 +330,28 @@ export default {
}
}
}
::v-deep
.view-dialog
{
display
:
flex
;
flex-direction
:
column
;
margin
:
0
!
important
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
max-height
:
80%
;
overflow
:
hidden
;
.el-dialog__body
{
height
:
calc
(
100%
-
100px
);
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
overflow
:
auto
;
&
>
img
{
width
:
100%
;
}
}
}
}
</
style
>
dsk-srm-server/src/views/test1.vue
deleted
100644 → 0
View file @
a7b37049
<
template
>
<div
class=
"test1"
>
111
</div>
</
template
>
<
script
>
export
default
{
name
:
"test1"
,
data
()
{
return
{
}
},
//可访问data属性
created
(){
},
//计算集
computed
:{
},
//方法集
methods
:{
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
dsk-srm-server/src/views/test2.vue
deleted
100644 → 0
View file @
a7b37049
<
template
>
<div
class=
"test2"
>
22
</div>
</
template
>
<
script
>
export
default
{
name
:
"test2"
,
data
()
{
return
{
}
},
//可访问data属性
created
(){
},
//计算集
computed
:{
},
//方法集
methods
:{
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
dsk-srm-server/vue.config.js
View file @
3e88c38d
...
...
@@ -91,8 +91,8 @@ module.exports = defineConfig({
open
:
true
,
proxy
:
{
[
process
.
env
.
VUE_APP_BASE_API
]:
{
//
target: `http://139.9.157.49:8088`,
target
:
`http://192.168.60.172:8188`
,
target
:
`http://139.9.157.49:8088`
,
//
target: `http://192.168.60.172:8188`,
changeOrigin
:
true
,
pathRewrite
:
{
[
'^'
+
process
.
env
.
VUE_APP_BASE_API
]:
''
...
...
src/main/java/com/supServer/framework/security/service/UserRegisterService.java
View file @
3e88c38d
...
...
@@ -11,13 +11,12 @@ import com.supServer.common.utils.StringUtils;
import
com.supServer.common.utils.uuid.IdUtils
;
import
com.supServer.framework.redis.RedisCache
;
import
com.supServer.framework.security.mode.RegisterBody
;
import
com.supServer.framework.web.domain.AjaxResult
;
import
com.supServer.project.entity.BizBlacklist
;
import
com.supServer.project.entity.BizCompanyInfo
;
import
com.supServer.project.entity.BizVerify
;
import
com.supServer.project.entity.UserInfo
;
import
com.supServer.project.service.BizCompanyInfoService
;
import
com.supServer.project.service.IBizVerifyService
;
import
com.supServer.project.service.SmsService
;
import
com.supServer.project.service.UserInfoService
;
import
com.supServer.project.service.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
@@ -47,10 +46,19 @@ public class UserRegisterService {
@Autowired
private
IBizVerifyService
bizVerifyService
;
@Autowired
private
IBizBlacklistService
iBizBlacklistService
;
public
String
register
(
RegisterBody
registerBody
)
throws
IOException
{
String
msg
=
""
,
username
=
registerBody
.
getUserName
(),
password
=
registerBody
.
getPassword
();
//查询黑名单列表
Integer
bizBlackNum
=
iBizBlacklistService
.
selectBycode
(
registerBody
.
getCreditCode
());
if
(
bizBlackNum
>=
1
){
msg
=
"保存企业'"
+
registerBody
.
getCompanyName
()
+
"'失败,该企业无法注册"
;
return
msg
;
}
//校验短信验证码
// boolean code = smsService.validateCode(registerBody.getPhone(), registerBody.getSmsCode());
// if(code){
...
...
@@ -191,8 +199,7 @@ public class UserRegisterService {
* @param uuid 唯一标识
* @return 结果
*/
public
void
validateCaptcha
(
String
code
,
String
uuid
)
{
public
AjaxResult
validateCaptcha
(
String
code
,
String
uuid
)
{
String
verifyKey
=
Constants
.
CAPTCHA_CODE_KEY
+
StringUtils
.
nvl
(
uuid
,
""
);
String
captcha
=
redisCache
.
getCacheObject
(
verifyKey
);
redisCache
.
deleteObject
(
verifyKey
);
...
...
@@ -204,6 +211,7 @@ public class UserRegisterService {
{
throw
new
CaptchaException
();
}
return
AjaxResult
.
success
();
}
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/java/com/supServer/project/common/CaptchaController.java
View file @
3e88c38d
...
...
@@ -84,8 +84,8 @@ public class CaptchaController
@GetMapping
(
"/validateCaptcha"
)
public
void
validateCaptcha
(
String
code
,
String
uuid
){
registerService
.
validateCaptcha
(
code
,
uuid
);
public
AjaxResult
validateCaptcha
(
String
code
,
String
uuid
){
re
turn
re
gisterService
.
validateCaptcha
(
code
,
uuid
);
}
}
src/main/java/com/supServer/project/controller/CompanyAuthenticationController.java
deleted
100644 → 0
View file @
a7b37049
package
com
.
supServer
.
project
.
controller
;
import
com.supServer.framework.web.domain.AjaxResult
;
import
com.supServer.project.service.BizCompanyInfoService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* 认证管理
*/
@RestController
@RequestMapping
(
"/authentication"
)
public
class
CompanyAuthenticationController
{
@Autowired
private
BizCompanyInfoService
companyInfoService
;
/***
*
* 认证信息
*/
@GetMapping
(
"/information"
)
public
AjaxResult
information
(
String
phone
){
return
companyInfoService
.
information
(
phone
);
}
}
src/main/java/com/supServer/project/controller/SmsController.java
View file @
3e88c38d
...
...
@@ -86,7 +86,7 @@ public class SmsController {
if
(
bool
){
return
AjaxResult
.
success
();
}
else
{
return
AjaxResult
.
error
(
"
验证失败
"
);
return
AjaxResult
.
error
(
"
短信验证码错误
"
);
}
}
...
...
src/main/java/com/supServer/project/entity/BizBlacklist.java
0 → 100644
View file @
3e88c38d
package
com
.
supServer
.
project
.
entity
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* 供应商黑名单
* </p>
*
* @author
* @since 2022-11-22
*/
@Data
public
class
BizBlacklist
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* id
*/
private
Integer
id
;
/**
* 统一社会信用代码
*/
private
String
creditCode
;
/**
* 列入黑名单原因
*/
private
String
reason
;
/**
* 创建时间
*/
private
LocalDateTime
createTime
;
/**
* 更新时间
*/
private
LocalDateTime
updateTime
;
/**
* 企业名称
*/
private
String
companyName
;
/**
* 是否删除(0-删除 1-未删除)
*/
private
Integer
isDelete
;
}
src/main/java/com/supServer/project/entity/vo/AttestationVo.java
View file @
3e88c38d
...
...
@@ -46,7 +46,7 @@ public class AttestationVo {
/**
* 成立日期
*/
private
Date
registeredDate
;
private
String
registeredDate
;
/**
* 注册地址
*/
...
...
@@ -156,11 +156,11 @@ public class AttestationVo {
this
.
registeredCapital
=
registeredCapital
;
}
public
Date
getRegisteredDate
()
{
public
String
getRegisteredDate
()
{
return
registeredDate
;
}
public
void
setRegisteredDate
(
Date
registeredDate
)
{
public
void
setRegisteredDate
(
String
registeredDate
)
{
this
.
registeredDate
=
registeredDate
;
}
...
...
src/main/java/com/supServer/project/mapper/BizBlacklistMapper.java
0 → 100644
View file @
3e88c38d
package
com
.
supServer
.
project
.
mapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* <p>
* 供应商黑名单 Mapper 接口
* </p>
*
* @author
* @since 2022-11-22
*/
@Mapper
public
interface
BizBlacklistMapper
{
Integer
selectBycode
(
String
creditCode
);
}
src/main/java/com/supServer/project/mapper/BizCompanyInfoMapper.java
View file @
3e88c38d
...
...
@@ -10,8 +10,6 @@ import org.apache.ibatis.annotations.Param;
public
interface
BizCompanyInfoMapper
{
int
insertCompany
(
BizCompanyInfo
companyInfo
);
CompanyAuthenticationDto
information
(
String
phone
);
Integer
selectBycode
(
@Param
(
"creditCode"
)
String
creditCode
);
BizCompanyInfo
selectCompanyInfo
(
String
creditCode
);
...
...
src/main/java/com/supServer/project/service/BizCompanyInfoService.java
View file @
3e88c38d
...
...
@@ -6,13 +6,6 @@ import com.supServer.project.entity.BizCompanyInfo;
public
interface
BizCompanyInfoService
{
int
insertCompany
(
BizCompanyInfo
companyInfo
);
/**
* 认证信息
* @param
* @return
*/
AjaxResult
information
(
String
phone
);
Integer
selectBycode
(
String
creditCode
);
BizCompanyInfo
selectCompanyInfo
(
String
creditCode
);
...
...
src/main/java/com/supServer/project/service/IBizBlacklistService.java
0 → 100644
View file @
3e88c38d
package
com
.
supServer
.
project
.
service
;
/**
* <p>
* 供应商黑名单 服务类
* </p>
*
* @author
* @since 2022-11-22
*/
public
interface
IBizBlacklistService
{
Integer
selectBycode
(
String
creditCode
);
}
src/main/java/com/supServer/project/service/impl/BizBlacklistServiceImpl.java
0 → 100644
View file @
3e88c38d
package
com
.
supServer
.
project
.
service
.
impl
;
import
com.supServer.project.mapper.BizBlacklistMapper
;
import
com.supServer.project.service.IBizBlacklistService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* <p>
* 供应商黑名单 服务实现类
* </p>
*
* @author
* @since 2022-11-22
*/
@Service
public
class
BizBlacklistServiceImpl
implements
IBizBlacklistService
{
@Autowired
private
BizBlacklistMapper
bizBlacklistMapper
;
@Override
public
Integer
selectBycode
(
String
creditCode
)
{
return
bizBlacklistMapper
.
selectBycode
(
creditCode
);
}
}
src/main/java/com/supServer/project/service/impl/BizCompanyInfoServiceImpl.java
View file @
3e88c38d
...
...
@@ -23,14 +23,6 @@ public class BizCompanyInfoServiceImpl implements BizCompanyInfoService {
return
bizCompanyInfoMapper
.
insertCompany
(
companyInfo
);
}
@Override
public
AjaxResult
information
(
String
phone
)
{
CompanyAuthenticationDto
dto
=
bizCompanyInfoMapper
.
information
(
phone
);
if
(
ObjectUtil
.
isNotEmpty
(
dto
)){
}
return
null
;
}
@Override
public
Integer
selectBycode
(
String
creditCode
)
{
...
...
src/main/resources/mybatis/mapper/BizBlacklistMapper.xml
0 → 100644
View file @
3e88c38d
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.supServer.project.mapper.BizBlacklistMapper"
>
<select
id=
"selectBycode"
resultType=
"java.lang.Integer"
>
select count(id) from biz_blacklist where credit_code = #{creditCode}
</select>
</mapper>
src/main/resources/mybatis/mapper/BizCompanyInfoMapper.xml
View file @
3e88c38d
...
...
@@ -32,16 +32,6 @@
#{briefing},#{licenseUrl},#{cardUrl},#{catId},#{fileUrl},#{fileName},#{source},NOW(),NOW(),#{contacts},#{phone})
</insert>
<select
id=
"information"
resultType=
"com.supServer.project.entity.dto.CompanyAuthenticationDto"
>
SELECT
bci.company_name,sui.phone,sui.user_name,sui.sex,sui.email,bci.credit_code,bci.legal_person,bci.registered_capital,
bci.registered_date,bci.registered_address,bci.address_detail,bci.license_url,bci.card_url,bci.cat_id
FROM
sup_user_info sui
left join biz_company_info bci on sui.user_id = bci.user_id
WHERE
sui.phone = #{phone}
</select>
<select
id=
"selectBycode"
resultType=
"java.lang.Integer"
>
select bv.review_status
...
...
@@ -88,7 +78,8 @@
select
sui.user_id as userId,sui.user_name as userName,sui.phone,sui.sex,sui.email,
bci.company_name as companyName,bci.credit_code as creditCode,bci.legal_person as legalPerson,
bci.registered_capital as registeredCapital,bci.registered_date as registeredDate,
bci.registered_capital as registeredCapital,
DATE_FORMAT(bci.registered_date,'%Y-%m-%d') as registeredDate,
bci.registered_address as registeredAddress,bci.address_detail as addressDetail,bci.license_url as licenseUrl,
bci.card_url as cardUrl,bci.cat_id as catId,bci.file_url as fileUrl,bci.file_name as fileName
from biz_company_info bci
...
...
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