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
da25937e
Commit
da25937e
authored
Nov 23, 2022
by
dongyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修改
parent
9adfa239
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
149 additions
and
71 deletions
+149
-71
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.
src/main/java/com/supServer/framework/security/service/UserRegisterService.java
View file @
da25937e
...
...
@@ -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 @
da25937e
...
...
@@ -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 @
9adfa239
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 @
da25937e
...
...
@@ -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 @
da25937e
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 @
da25937e
...
...
@@ -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 @
da25937e
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 @
da25937e
...
...
@@ -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 @
da25937e
...
...
@@ -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 @
da25937e
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 @
da25937e
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 @
da25937e
...
...
@@ -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 @
da25937e
<?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 @
da25937e
...
...
@@ -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