Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
csbr-daop
/
ms-data-circulation-portal-service
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
e5e6f8eb
authored
2025-02-12 14:06:30 +0800
by
肖初晴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【DAOP-1.0】企业认证
【功能点】测试问题处理
1 parent
dbc107bc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
196 additions
and
0 deletions
src/main/java/com/csbr/qingcloud/portal/domain/vo/UserQueryDTO.java
src/main/java/com/csbr/qingcloud/portal/domain/vo/UserVO.java
src/main/java/com/csbr/qingcloud/portal/feign/UserFeign.java
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
src/main/java/com/csbr/qingcloud/portal/domain/vo/UserQueryDTO.java
0 → 100644
View file @
e5e6f8e
package
com
.
csbr
.
qingcloud
.
portal
.
domain
.
vo
;
import
com.csbr.cloud.mybatis.annotations.LikeQuery
;
import
com.csbr.cloud.mybatis.enums.LikeQueryEnum
;
import
csbr.cloud.entity.domain.base.dto.BasePageDTO
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
jakarta.validation.constraints.Pattern
;
import
lombok.Data
;
import
java.util.List
;
/**
* @program: common-admin-platform-auth-service
* @description: 用户查询参数
* @author: yio
* @create: 2020-07-28 13:47
**/
@Data
@Schema
(
name
=
"用户查询参数"
)
public
class
UserQueryDTO
extends
BasePageDTO
{
/** 系统唯一标识 */
@Schema
(
name
=
"guid"
,
title
=
"系统唯一标识"
)
private
String
guid
;
/** 锁定(Y 是;N 否) */
@Schema
(
name
=
"guid"
,
title
=
"锁定(Y 是;N 否)"
)
@Pattern
(
regexp
=
"^Y|N$"
,
message
=
"锁定应该为Y、N中的值。"
)
private
String
isLocked
;
/** 登录账号 */
@Schema
(
name
=
"guid"
,
title
=
"登录账号"
)
@LikeQuery
(
type
=
LikeQueryEnum
.
ALL
)
private
String
logonUser
;
/** 登录账号(多个) */
@Schema
(
name
=
"guid"
,
title
=
"登录账号(多个)"
)
private
List
<
String
>
logonUserList
;
/** 手机号 */
@Schema
(
name
=
"guid"
,
title
=
"手机号"
)
@LikeQuery
(
type
=
LikeQueryEnum
.
ALL
)
private
String
mobileNo
;
/** 手机号 */
@Schema
(
name
=
"guid"
,
title
=
"手机号(多个)"
)
@LikeQuery
(
type
=
LikeQueryEnum
.
ALL
)
private
List
<
String
>
mobileNoList
;
/** 姓名 */
@Schema
(
name
=
"guid"
,
title
=
"姓名"
)
@LikeQuery
(
type
=
LikeQueryEnum
.
ALL
)
private
String
name
;
/** 平台GUID */
@Schema
(
name
=
"guid"
,
title
=
"平台GUID"
)
private
String
platformGuid
;
/** 业务状态(Y 有效;S 停用) */
@Schema
(
name
=
"guid"
,
title
=
"业务状态(Y 有效;S 停用)"
)
@Pattern
(
regexp
=
"^Y|S$"
,
message
=
"业务状态应该为Y、S中的值。"
)
private
String
bizState
;
}
src/main/java/com/csbr/qingcloud/portal/domain/vo/UserVO.java
0 → 100644
View file @
e5e6f8e
package
com
.
csbr
.
qingcloud
.
portal
.
domain
.
vo
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Data
;
import
java.sql.Timestamp
;
/**
* @program: common-admin-platform-auth-service
* @description: 获取用户查询的返回值对象
* @author: yio
* @create: 2020-07-28 14:46
**/
@Data
@Schema
(
name
=
"获取用户查询的返回值对象"
)
public
class
UserVO
{
/** 业务状态(Y 有效;S 停用) */
@Schema
(
name
=
"guid"
,
title
=
"业务状态(Y 有效;S 停用)"
)
private
String
bizState
;
/** 创建时间 */
@Schema
(
name
=
"guid"
,
title
=
"创建时间"
)
private
Timestamp
createTime
;
/** 创建人 */
@Schema
(
name
=
"guid"
,
title
=
"创建人"
)
private
String
createUserId
;
/** 创建人姓名 */
@Schema
(
name
=
"guid"
,
title
=
"创建人姓名"
)
private
String
createUserName
;
/** 系统唯一标识 */
@Schema
(
name
=
"guid"
,
title
=
"系统唯一标识"
)
private
String
guid
;
/** 是否删除(null 是;N 否 默认 N) */
@Schema
(
name
=
"guid"
,
title
=
"是否删除(Y 是;N 否 默认 N)"
)
@TableLogic
private
String
isDeleted
;
/** 锁定(Y 是;N 否) */
@Schema
(
name
=
"guid"
,
title
=
"锁定(Y 是;N 否)"
)
private
String
isLocked
;
/** 最后登录时间 */
@Schema
(
name
=
"guid"
,
title
=
"最后登录时间"
)
private
Timestamp
lastLoginTime
;
/** 登录失败次数 */
@Schema
(
name
=
"guid"
,
title
=
"登录失败次数"
)
private
Integer
loginErrorCount
;
/** 登录账号 */
@Schema
(
name
=
"guid"
,
title
=
"登录账号"
)
private
String
logonUser
;
/** 手机号 */
@Schema
(
name
=
"guid"
,
title
=
"手机号"
)
private
String
mobileNo
;
/** 姓名 */
@Schema
(
name
=
"guid"
,
title
=
"姓名"
)
private
String
name
;
/** 平台GUID */
@Schema
(
name
=
"guid"
,
title
=
"平台GUID"
)
private
String
platformGuid
;
/** 密码 */
@Schema
(
name
=
"guid"
,
title
=
"密码"
)
private
String
pwd
;
/** 修改时间 */
@Schema
(
name
=
"guid"
,
title
=
"修改时间"
)
private
Timestamp
updateTime
;
/** 修改人 */
@Schema
(
name
=
"guid"
,
title
=
"修改人"
)
private
String
updateUserId
;
/** 修改姓名 */
@Schema
(
name
=
"guid"
,
title
=
"修改姓名"
)
private
String
updateUserName
;
@Schema
(
name
=
"guid"
,
title
=
"微信授权认证的unionId"
)
private
String
unionId
;
}
src/main/java/com/csbr/qingcloud/portal/feign/UserFeign.java
0 → 100644
View file @
e5e6f8e
package
com
.
csbr
.
qingcloud
.
portal
.
feign
;
import
com.csbr.cloud.common.config.FastCallFeignConfiguration
;
import
com.csbr.cloud.common.response.CommonRes
;
import
com.csbr.qingcloud.portal.domain.vo.UserQueryDTO
;
import
com.csbr.qingcloud.portal.domain.vo.UserVO
;
import
csbr.cloud.entity.domain.base.vo.PageListVO
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
/**
* @author Xiaocq
*/
@FeignClient
(
value
=
"ms-daop-user-service"
,
configuration
=
FastCallFeignConfiguration
.
class
)
public
interface
UserFeign
{
@PostMapping
(
value
=
"/user/data/get-some-info"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
CommonRes
<
PageListVO
<
UserVO
>>
getUserSomeInfo
(
@RequestBody
UserQueryDTO
dto
);
/**
* 通过手机查用户
*/
@PostMapping
(
value
=
"/user/data/get/mobile"
,
produces
=
MediaType
.
APPLICATION_JSON_VALUE
,
consumes
=
MediaType
.
APPLICATION_JSON_VALUE
)
CommonRes
<
List
<
UserVO
>>
getUserByMobileOrIdCode
(
@RequestBody
UserQueryDTO
dto
);
}
src/main/java/com/csbr/qingcloud/portal/service/impl/EnterpriseServiceImpl.java
View file @
e5e6f8e
...
...
@@ -4,9 +4,12 @@ import com.alibaba.fastjson.JSON;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.csbr.cloud.common.enums.SystemError
;
import
com.csbr.cloud.common.enums.UserError
;
import
com.csbr.cloud.common.enums.WorkFlowBizEnum
;
import
com.csbr.cloud.common.exception.CsbrUserException
;
import
com.csbr.qingcloud.portal.domain.vo.*
;
import
com.csbr.qingcloud.portal.feign.PersonelFeign
;
import
com.csbr.qingcloud.portal.feign.UserFeign
;
import
com.csbr.qingcloud.portal.mybatis.entity.MfDemand
;
import
com.csbr.qingcloud.portal.mybatis.entity.MfEnterpriseChangeApprove
;
import
com.csbr.qingcloud.portal.mybatis.service.MfDemandService
;
...
...
@@ -76,6 +79,9 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
@Resource
private
MfDemandService
mfDemandService
;
@Resource
private
UserFeign
userFeign
;
/**
* 企业信息分页查询
* @author xcq
...
...
@@ -446,6 +452,13 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
@Override
public
Boolean
check
(
EnterpriseRQVO
vo
)
{
//检查管理员账号
UserQueryDTO
dto
=
new
UserQueryDTO
();
dto
.
setLogonUser
(
vo
.
getLogonUser
());
List
<
UserVO
>
userList
=
userFeign
.
getUserSomeInfo
(
dto
).
getData
().
getRecords
();
if
(
CollectionUtils
.
isNotEmpty
(
userList
)){
throw
new
CsbrUserException
(
UserError
.
VALIDATE_CODE_ERROR
,
"账号管理人手机号已存在!"
);
}
return
true
;
}
...
...
@@ -480,6 +493,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
*/
private
void
beforeSave
(
EnterpriseRQVO
rqVO
)
{
//region 1.输入基础验证
check
(
rqVO
);
//endregion
//region 2.数据验证特殊处理
...
...
@@ -539,6 +553,7 @@ public class EnterpriseServiceImpl extends FlowAbstractImpl implements Enterpris
*/
private
void
beforeUpdate
(
EnterpriseRQVO
rqVO
)
{
//region 1.输入基础验证
check
(
rqVO
);
if
(
StringUtils
.
isBlank
(
rqVO
.
getGuid
()))
{
// W00012 = {0}:参数[{1}]不能为空!
throw
new
CsbrSystemException
(
SystemError
.
DATA_INPUT_ERROR
,
messageSourceUtil
.
getMessage
(
"W00010"
,
String
.
format
(
"修改%s数据"
,
FUNCTION_NAME
),
"数据唯一标识"
));
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment