Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
668a70e3
提交
668a70e3
authored
8月 01, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
64491e46
96f75725
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
98 个修改的文件
包含
3556 行增加
和
217 行删除
+3556
-217
pom.xml
cms-common/cms-common-model/pom.xml
+7
-2
LoginSuccessDTO.java
...ain/java/com/mmc/iuav/user/model/dto/LoginSuccessDTO.java
+1
-1
RealNameAuthDTO.java
...ain/java/com/mmc/iuav/user/model/dto/RealNameAuthDTO.java
+46
-0
RealNameAuthDetailDTO.java
...va/com/mmc/iuav/user/model/dto/RealNameAuthDetailDTO.java
+37
-0
LicenseType.java
...a/com/mmc/iuav/user/model/dto/dronepilot/LicenseType.java
+81
-0
PilotAbilityDTO.java
...m/mmc/iuav/user/model/dto/dronepilot/PilotAbilityDTO.java
+32
-0
PilotCertificationDTO.java
...iuav/user/model/dto/dronepilot/PilotCertificationDTO.java
+102
-0
PilotCertificationLogDTO.java
...v/user/model/dto/dronepilot/PilotCertificationLogDTO.java
+47
-0
RealNameAuthQO.java
.../main/java/com/mmc/iuav/user/model/qo/RealNameAuthQO.java
+53
-0
RoleInfoQO.java
.../src/main/java/com/mmc/iuav/user/model/qo/RoleInfoQO.java
+3
-0
UserAccountQO.java
...c/main/java/com/mmc/iuav/user/model/qo/UserAccountQO.java
+3
-0
PilotAuditStatusQO.java
...mmc/iuav/user/model/qo/dronepilot/PilotAuditStatusQO.java
+36
-0
PilotCertificationLogQO.java
...uav/user/model/qo/dronepilot/PilotCertificationLogQO.java
+40
-0
PilotCertificationQO.java
...c/iuav/user/model/qo/dronepilot/PilotCertificationQO.java
+62
-0
PilotRemarkQO.java
.../com/mmc/iuav/user/model/qo/dronepilot/PilotRemarkQO.java
+29
-0
ApplyTagEditVO.java
.../main/java/com/mmc/iuav/user/model/vo/ApplyTagEditVO.java
+5
-0
AttachmentVO.java
...rc/main/java/com/mmc/iuav/user/model/vo/AttachmentVO.java
+7
-5
BackUserAccountVO.java
...in/java/com/mmc/iuav/user/model/vo/BackUserAccountVO.java
+2
-0
CompanyAuthVO.java
...c/main/java/com/mmc/iuav/user/model/vo/CompanyAuthVO.java
+4
-5
CompanyInfoVO.java
...c/main/java/com/mmc/iuav/user/model/vo/CompanyInfoVO.java
+32
-10
CooperationTagVO.java
...ain/java/com/mmc/iuav/user/model/vo/CooperationTagVO.java
+4
-5
RealNameAuthVO.java
.../main/java/com/mmc/iuav/user/model/vo/RealNameAuthVO.java
+48
-0
UserAccountVO.java
...c/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
+6
-0
UserApplyTagVO.java
.../main/java/com/mmc/iuav/user/model/vo/UserApplyTagVO.java
+24
-3
BaseEnum.java
.../java/com/mmc/iuav/user/model/vo/dronepilot/BaseEnum.java
+14
-0
EnumUtils.java
...java/com/mmc/iuav/user/model/vo/dronepilot/EnumUtils.java
+60
-0
EnumValue.java
...java/com/mmc/iuav/user/model/vo/dronepilot/EnumValue.java
+62
-0
PilotAbilityVO.java
...com/mmc/iuav/user/model/vo/dronepilot/PilotAbilityVO.java
+36
-0
PilotCertificationVO.java
...c/iuav/user/model/vo/dronepilot/PilotCertificationVO.java
+79
-0
ValueEnum.java
...java/com/mmc/iuav/user/model/vo/dronepilot/ValueEnum.java
+17
-0
ResultBody.java
...-util/src/main/java/com/mmc/iuav/response/ResultBody.java
+2
-1
ResultEnum.java
...-util/src/main/java/com/mmc/iuav/response/ResultEnum.java
+34
-2
pom.xml
csm-service/cms-service-user/pom.xml
+13
-14
PmsClient.java
...ser/src/main/java/com/mmc/iuav/user/client/PmsClient.java
+15
-2
BackUserAccountController.java
...m/mmc/iuav/user/controller/BackUserAccountController.java
+7
-0
CompanyController.java
.../java/com/mmc/iuav/user/controller/CompanyController.java
+59
-14
CooperationController.java
...a/com/mmc/iuav/user/controller/CooperationController.java
+16
-1
RealNameAuthController.java
.../com/mmc/iuav/user/controller/RealNameAuthController.java
+57
-0
TempLoginController.java
...ava/com/mmc/iuav/user/controller/TempLoginController.java
+12
-10
UserAccountController.java
...a/com/mmc/iuav/user/controller/UserAccountController.java
+11
-3
PilotCertificationController.java
...r/controller/dronepilot/PilotCertificationController.java
+117
-0
AppletMsgVOS.java
...in/java/com/mmc/iuav/user/controller/wx/AppletMsgVOS.java
+39
-0
HttpsOpenUtil.java
...n/java/com/mmc/iuav/user/controller/wx/HttpsOpenUtil.java
+123
-0
JsonUtil.java
...c/main/java/com/mmc/iuav/user/controller/wx/JsonUtil.java
+44
-0
WxApiUtilS.java
...main/java/com/mmc/iuav/user/controller/wx/WxApiUtilS.java
+95
-0
WxMsgTemplete.java
...n/java/com/mmc/iuav/user/controller/wx/WxMsgTemplete.java
+14
-0
BackUserAccountDao.java
...c/main/java/com/mmc/iuav/user/dao/BackUserAccountDao.java
+2
-1
CompanyAuthDao.java
...r/src/main/java/com/mmc/iuav/user/dao/CompanyAuthDao.java
+4
-0
CompanyDao.java
...-user/src/main/java/com/mmc/iuav/user/dao/CompanyDao.java
+104
-0
CooperationDao.java
...r/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
+13
-0
RealNameAuthDao.java
.../src/main/java/com/mmc/iuav/user/dao/RealNameAuthDao.java
+34
-0
UserServiceDao.java
...r/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
+8
-0
PilotCertificationDao.java
...m/mmc/iuav/user/dao/dronepilot/PilotCertificationDao.java
+54
-0
BackUserAccountDO.java
...main/java/com/mmc/iuav/user/entity/BackUserAccountDO.java
+1
-1
CompanyAuthDO.java
...src/main/java/com/mmc/iuav/user/entity/CompanyAuthDO.java
+3
-0
CompanyInfoDO.java
...src/main/java/com/mmc/iuav/user/entity/CompanyInfoDO.java
+49
-1
CompanyMemberDO.java
...c/main/java/com/mmc/iuav/user/entity/CompanyMemberDO.java
+25
-0
RealNameAuthDO.java
...rc/main/java/com/mmc/iuav/user/entity/RealNameAuthDO.java
+61
-0
UserAccountDO.java
...src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
+21
-2
UserApplyTagDO.java
...rc/main/java/com/mmc/iuav/user/entity/UserApplyTagDO.java
+24
-13
CertificationMessage.java
...mmc/iuav/user/entity/dronepilot/CertificationMessage.java
+66
-0
PilotAbilityCertification.java
...uav/user/entity/dronepilot/PilotAbilityCertification.java
+35
-0
PilotAbilityDO.java
...a/com/mmc/iuav/user/entity/dronepilot/PilotAbilityDO.java
+47
-0
PilotCertificationDO.java
...mmc/iuav/user/entity/dronepilot/PilotCertificationDO.java
+152
-0
PilotCertificationLogDO.java
.../iuav/user/entity/dronepilot/PilotCertificationLogDO.java
+77
-0
CompanyTypeEnums.java
...c/main/java/com/mmc/iuav/user/enums/CompanyTypeEnums.java
+26
-0
AuthService.java
.../src/main/java/com/mmc/iuav/user/service/AuthService.java
+7
-1
BackUserAccountService.java
...ava/com/mmc/iuav/user/service/BackUserAccountService.java
+8
-0
CompanyService.java
...c/main/java/com/mmc/iuav/user/service/CompanyService.java
+85
-1
CooperationService.java
...in/java/com/mmc/iuav/user/service/CooperationService.java
+4
-0
RealNameAuthService.java
...n/java/com/mmc/iuav/user/service/RealNameAuthService.java
+20
-0
UserAccountService.java
...in/java/com/mmc/iuav/user/service/UserAccountService.java
+10
-1
PilotCertificationService.java
...av/user/service/dronepilot/PilotCertificationService.java
+40
-0
PilotCertificationServiceImpl.java
...ervice/dronepilot/impl/PilotCertificationServiceImpl.java
+0
-0
AuthServiceImpl.java
.../java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
+60
-21
BackUserAccountServiceImpl.java
...mc/iuav/user/service/impl/BackUserAccountServiceImpl.java
+47
-1
CompanyAuthServiceImpl.java
...om/mmc/iuav/user/service/impl/CompanyAuthServiceImpl.java
+0
-0
CompanyServiceImpl.java
...va/com/mmc/iuav/user/service/impl/CompanyServiceImpl.java
+110
-6
CooperationServiceImpl.java
...om/mmc/iuav/user/service/impl/CooperationServiceImpl.java
+0
-0
RealNameAuthServiceImpl.java
...m/mmc/iuav/user/service/impl/RealNameAuthServiceImpl.java
+161
-0
RoleServiceImpl.java
.../java/com/mmc/iuav/user/service/impl/RoleServiceImpl.java
+6
-1
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+23
-1
WxServiceImpl.java
...in/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
+11
-11
RealNameAuthUtil.java
...rc/main/java/com/mmc/iuav/user/util/RealNameAuthUtil.java
+190
-0
SmsUtil.java
...ce-user/src/main/java/com/mmc/iuav/user/util/SmsUtil.java
+63
-0
XmlToMapUtil.java
...er/src/main/java/com/mmc/iuav/user/util/XmlToMapUtil.java
+43
-0
application-dev.yml
...e/cms-service-user/src/main/resources/application-dev.yml
+29
-29
application-prod.yml
.../cms-service-user/src/main/resources/application-prod.yml
+29
-29
BackUserAccountDao.xml
...ice-user/src/main/resources/mapper/BackUserAccountDao.xml
+1
-1
CompanyAuthDao.xml
...service-user/src/main/resources/mapper/CompanyAuthDao.xml
+26
-18
CompanyDao.xml
...cms-service-user/src/main/resources/mapper/CompanyDao.xml
+0
-0
CooperationDao.xml
...service-user/src/main/resources/mapper/CooperationDao.xml
+0
-0
RealNameAuthDao.xml
...ervice-user/src/main/resources/mapper/RealNameAuthDao.xml
+140
-0
RoleDao.xml
...ce/cms-service-user/src/main/resources/mapper/RoleDao.xml
+0
-0
UserServiceDao.xml
...service-user/src/main/resources/mapper/UserServiceDao.xml
+0
-0
PilotCertificationDao.xml
...ain/resources/mapper/dronepilot/PilotCertificationDao.xml
+0
-0
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+0
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+0
-0
没有找到文件。
cms-common/cms-common-model/pom.xml
浏览文件 @
668a70e3
...
...
@@ -40,7 +40,13 @@
<version>
1.0-SNAPSHOT
</version>
<scope>
compile
</scope>
</dependency>
<dependency>
<groupId>
com.google.protobuf
</groupId>
<artifactId>
protobuf-java
</artifactId>
<version>
3.16.3
</version>
<scope>
compile
</scope>
</dependency>
</dependencies>
</project>
\ No newline at end of file
</project>
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/LoginSuccessDTO.java
浏览文件 @
668a70e3
...
...
@@ -29,5 +29,5 @@ public class LoginSuccessDTO implements Serializable {
private
String
nickName
;
private
CompanyInfoVO
companyInfoVO
;
private
RoleInfoDTO
roleInfo
;
private
Integer
appUserAccountId
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/RealNameAuthDTO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/7/27 14:49
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
description
=
"实名认证DTO"
)
public
class
RealNameAuthDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1449716605649423527L
;
@ApiModelProperty
(
value
=
"实名认证id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户userAccountId"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"实名认证状态"
)
private
Integer
checkStatus
;
@ApiModelProperty
(
value
=
"真实姓名"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"身份证号码"
)
private
String
idNumber
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"用户uid"
)
private
String
uid
;
@ApiModelProperty
(
value
=
"用户昵称"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"用户常驻地址"
)
private
String
resAddress
;
@ApiModelProperty
(
value
=
"手机号"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"实名认证时间"
)
private
String
createTime
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/RealNameAuthDetailDTO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/7/27 14:49
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
description
=
"实名认证详情DTO"
)
public
class
RealNameAuthDetailDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3101785098483923008L
;
@ApiModelProperty
(
value
=
"实名认证id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户userAccountId"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"身份证正面"
)
private
String
frontIdImg
;
@ApiModelProperty
(
value
=
"身份证背面"
)
private
String
backIdImg
;
@ApiModelProperty
(
value
=
"身份证号"
)
private
String
idNumber
;
@ApiModelProperty
(
value
=
"姓名"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"状态"
)
private
Integer
checkStatus
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/dronepilot/LicenseType.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
dronepilot
;
import
com.mmc.iuav.user.model.vo.dronepilot.BaseEnum
;
import
lombok.Getter
;
/**
* @Author small
* @Date 2023/7/28 9:42
* @Version 1.0
*/
@Getter
public
enum
LicenseType
implements
BaseEnum
{
CAAC
(
"CAAC"
,
"CAAC"
),
UTC
(
"UTC"
,
"UTC"
),
OTHER
(
"OTHER"
,
"OTHER"
);
private
String
code
;
private
String
desc
;
private
LicenseType
(
String
code
,
String
desc
)
{
this
.
code
=
code
;
this
.
desc
=
desc
;
}
public
String
getCode
()
{
return
code
;
}
public
void
setCode
(
String
code
)
{
this
.
code
=
code
;
}
public
String
getdesc
()
{
return
desc
;
}
public
void
setdesc
(
String
desc
)
{
this
.
desc
=
desc
;
}
public
static
LicenseType
match
(
String
key
)
{
LicenseType
result
=
null
;
for
(
LicenseType
s
:
values
())
{
if
(
s
.
getCode
()
==
key
)
{
result
=
s
;
break
;
}
}
return
result
;
}
public
static
LicenseType
catchdesc
(
String
msg
)
{
LicenseType
result
=
null
;
for
(
LicenseType
s
:
values
())
{
if
(
s
.
getdesc
().
equals
(
msg
))
{
result
=
s
;
break
;
}
}
return
result
;
}
@Override
public
String
getEnumCode
()
{
return
code
;
}
@Override
public
String
getEnumDesc
()
{
return
desc
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/dronepilot/PilotAbilityDTO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
dronepilot
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author small
* @Date 2023/7/28 10:59
* @Version 1.0
*/
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public
class
PilotAbilityDTO
{
@ApiModelProperty
(
value
=
"能力id不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
abilityId
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityName
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/dronepilot/PilotCertificationDTO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
dronepilot
;
import
com.alibaba.fastjson2.annotation.JSONField
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.user.model.vo.dronepilot.EnumValue
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/28 10:02
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PilotCertificationDTO
{
@ApiModelProperty
(
value
=
"飞手执照id"
,
example
=
"1"
)
@NotNull
(
message
=
"飞手执照id不能为空"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照类型 CAAC,UTC,OTHER(其他) 目前只有三种"
,
example
=
"UTC"
,
required
=
false
)
@EnumValue
(
enumClass
=
LicenseType
.
class
,
message
=
"取值不合法,参考:LicenseType"
)
private
String
licenseType
;
@ApiModelProperty
(
value
=
"电子执照的编号"
,
example
=
"231321312313211"
,
required
=
true
)
@NotBlank
(
message
=
"电子执照的编号不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseNumber
;
@ApiModelProperty
(
value
=
"上传执照"
,
example
=
"http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/2cbbeffb-c1d1-4b26-a9a9-9e17c85e35a9.jpg"
,
required
=
true
)
@NotBlank
(
message
=
"上传执照的照片不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseUrl
;
@ApiModelProperty
(
value
=
"地区编号不能为空"
,
example
=
"100001"
,
required
=
true
)
@NotBlank
(
message
=
"地区编号不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
areaNumber
;
@ApiModelProperty
(
value
=
"常驻城市不能为空"
,
example
=
"深圳市"
,
required
=
true
)
@NotBlank
(
message
=
"常驻城市不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
residentCity
;
@ApiModelProperty
(
value
=
"工作年限"
,
example
=
"3"
,
required
=
true
)
@NotBlank
(
message
=
"工作年限不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
yearsOfWorking
;
@NotNull
(
message
=
"能力不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
List
<
PilotAbilityVO
>
pilotAbility
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/2cbbeffb-c1d1-4b26-a9a9-9e17c85e35a9.jpg"
,
required
=
true
)
@NotBlank
(
message
=
"能力图片不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityUrl
;
@ApiModelProperty
(
value
=
"个人简介"
,
example
=
"无人机专业,工作三年"
,
required
=
true
)
@NotBlank
(
message
=
"个人简介不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
max
=
300
,
message
=
"个人不能超过300"
)
private
String
individualResume
;
@ApiModelProperty
(
value
=
"备注"
,
example
=
"航拍摄影,农业植保"
,
required
=
false
)
private
String
remark
;
@ApiModelProperty
(
value
=
"审核是否通过 0审核中 1审核通过 2审核不通过"
,
example
=
"0审核中 1审核通过 2审核不通过"
,
required
=
false
)
private
Integer
auditStatus
;
@ApiModelProperty
(
value
=
"申请用户的id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
timeOfApplication
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
@ApiModelProperty
(
value
=
"申请用户的名称"
,
example
=
"1"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"申请用户的性别"
,
example
=
"1"
)
private
Integer
sex
;
@ApiModelProperty
(
value
=
"申请用户的年龄"
,
example
=
"1"
)
private
Integer
age
;
/**
* 申请飞手的手机号
*/
@ApiModelProperty
(
value
=
"申请飞手的手机号"
,
example
=
"18921312312"
)
private
String
phoneNum
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/dronepilot/PilotCertificationLogDTO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
dronepilot
;
import
com.alibaba.fastjson2.annotation.JSONField
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @Author small
* @Date 2023/7/29 17:09
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PilotCertificationLogDTO
{
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批及认证时间"
,
example
=
"1"
)
private
Date
certificationDate
;
@ApiModelProperty
(
value
=
"申请人员的id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"申请人员的账号名称"
,
example
=
"1"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"申请及审批信息"
,
example
=
"1"
)
private
String
certificationMessage
;
@ApiModelProperty
(
value
=
"操作人员id"
,
example
=
"1"
)
private
Integer
operatorUserId
;
@ApiModelProperty
(
value
=
"操作人员账号"
,
example
=
"1"
)
private
String
operatorUserAccount
;
@ApiModelProperty
(
value
=
"操作人员名称"
,
example
=
"1"
)
private
String
operatorUserName
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"1"
)
private
String
phoneNum
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/RealNameAuthQO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
;
import
com.mmc.iuav.group.Page
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* author:zhenjie
* Date:2021/10/27
* time:20:08
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
description
=
"实名认证查询QO"
)
public
class
RealNameAuthQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3767938308251944541L
;
@ApiModelProperty
(
value
=
"关键字"
)
private
String
keyword
;
@ApiModelProperty
(
value
=
"地区"
,
hidden
=
true
)
private
String
area
;
@ApiModelProperty
(
value
=
"实名认证状态"
,
hidden
=
true
)
private
Integer
checkStatus
;
@ApiModelProperty
(
value
=
"单位id集合"
,
hidden
=
true
)
private
List
<
Integer
>
companyIds
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"每页显示数"
,
required
=
true
)
@NotNull
(
message
=
"每页显示数不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/RoleInfoQO.java
浏览文件 @
668a70e3
...
...
@@ -21,6 +21,9 @@ import java.io.Serializable;
@NoArgsConstructor
public
class
RoleInfoQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3729786590325257669L
;
@ApiModelProperty
(
value
=
"权限角色/或者编号"
,
required
=
false
,
hidden
=
true
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"权限角色/或者编号"
,
required
=
false
)
private
String
NumberOrName
;
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/UserAccountQO.java
浏览文件 @
668a70e3
...
...
@@ -59,6 +59,9 @@ public class UserAccountQO implements Serializable {
@ApiModelProperty
(
value
=
"用户id集合"
)
private
List
<
Integer
>
userIds
;
@ApiModelProperty
(
value
=
"单位id"
,
required
=
false
)
private
Integer
companyInfoId
;
@ApiModelProperty
(
value
=
"页码"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"页码不能为空"
,
groups
=
Page
.
class
)
@Min
(
value
=
1
,
groups
=
Page
.
class
)
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/dronepilot/PilotAuditStatusQO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
dronepilot
;
import
com.mmc.iuav.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
/**
* @Author small
* @Date 2023/7/29 16:42
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PilotAuditStatusQO
{
@ApiModelProperty
(
value
=
"飞手认证id"
,
required
=
true
)
@NotNull
(
message
=
"审批是不能为空不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
@ApiModelProperty
(
value
=
"0审核中 1审核通过 2审核不通过"
,
required
=
false
,
example
=
"0"
)
private
Integer
auditStatus
;
@ApiModelProperty
(
value
=
"2不通过的原因"
,
required
=
false
,
example
=
"信息不完善"
)
private
String
reason
;
@ApiModelProperty
(
value
=
"审批人"
,
required
=
false
,
example
=
"信息不完善"
,
hidden
=
true
)
private
Integer
operatorUserId
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/dronepilot/PilotCertificationLogQO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
dronepilot
;
import
com.mmc.iuav.group.Freeze
;
import
com.mmc.iuav.group.Page
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @Author small
* @Date 2023/7/29 17:15
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PilotCertificationLogQO
implements
Serializable
{
@ApiModelProperty
(
value
=
"账号筛选(uid,姓名,手机号)"
,
required
=
false
,
example
=
"张三"
)
private
String
accountNumber
;
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"页大小"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"页大小不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/dronepilot/PilotCertificationQO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
dronepilot
;
import
com.mmc.iuav.group.Freeze
;
import
com.mmc.iuav.group.Page
;
import
com.mmc.iuav.user.model.dto.dronepilot.LicenseType
;
import
com.mmc.iuav.user.model.vo.dronepilot.EnumValue
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Min
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @Author small
* @Date 2023/7/29 10:14
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PilotCertificationQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3729786590325257669L
;
@ApiModelProperty
(
value
=
"飞手认证id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"地区编码"
,
required
=
false
)
private
Integer
areaNumber
;
@ApiModelProperty
(
value
=
"能力认证id"
,
required
=
false
,
example
=
"1"
)
private
Integer
abilityId
;
@ApiModelProperty
(
value
=
"执照类型 CAAC,UTC,OTHER(其他) 目前只有三种"
,
example
=
"UTC"
,
required
=
false
)
@EnumValue
(
enumClass
=
LicenseType
.
class
,
message
=
"取值不合法,参考:LicenseType"
)
private
String
licenseType
;
@ApiModelProperty
(
value
=
"账号筛选(uid,姓名,手机号)"
,
required
=
false
,
example
=
"张三"
)
private
String
accountNumber
;
@ApiModelProperty
(
value
=
"审核是否通过 0审核中 1审核通过 2审核不通过"
,
required
=
false
,
example
=
"0"
)
private
Integer
auditStatus
;
@ApiModelProperty
(
value
=
"当前页"
,
required
=
true
,
example
=
"1"
)
@NotNull
(
message
=
"当前页不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageNo
;
@ApiModelProperty
(
value
=
"页大小"
,
required
=
true
,
example
=
"10"
)
@NotNull
(
message
=
"页大小不能为空"
,
groups
=
{
Page
.
class
,
Freeze
.
class
})
@Min
(
value
=
1
,
groups
=
Page
.
class
)
private
Integer
pageSize
;
public
void
buildCurrentPage
()
{
this
.
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/dronepilot/PilotRemarkQO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
.
dronepilot
;
import
com.mmc.iuav.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @Author small
* @Date 2023/7/29 16:36
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
PilotRemarkQO
implements
Serializable
{
@ApiModelProperty
(
value
=
"飞手认证id"
,
required
=
true
)
@NotNull
(
message
=
"修改时不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
@ApiModelProperty
(
value
=
"备注"
,
required
=
false
,
example
=
"0"
)
private
String
remark
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/ApplyTagEditVO.java
浏览文件 @
668a70e3
...
...
@@ -7,6 +7,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author LW
...
...
@@ -36,4 +37,8 @@ public class ApplyTagEditVO implements Serializable {
private
Double
lat
;
@ApiModelProperty
(
value
=
"经度"
)
private
Double
lon
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"附件"
)
private
List
<
AttachmentVO
>
attachmentList
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/AttachmentVO.java
浏览文件 @
668a70e3
...
...
@@ -10,7 +10,6 @@ import java.io.Serializable;
/**
* @Author LW
*
* @date 2023/6/27 13:49 概要:
*/
@Data
...
...
@@ -18,9 +17,12 @@ import java.io.Serializable;
@AllArgsConstructor
@Builder
public
class
AttachmentVO
implements
Serializable
{
@ApiModelProperty
(
value
=
"附件url"
)
private
String
url
;
@ApiModelProperty
(
value
=
"附件url"
)
private
String
url
;
@ApiModelProperty
(
value
=
"附件类型:0:图片 1:文件"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
"附件类型:0:图片 1:文件"
)
private
Integer
type
;
@ApiModelProperty
(
value
=
""
)
private
Integer
userApplyTagId
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/BackUserAccountVO.java
浏览文件 @
668a70e3
...
...
@@ -56,6 +56,8 @@ public class BackUserAccountVO implements Serializable {
private
String
tagName
;
@ApiModelProperty
(
value
=
"地址"
)
private
String
address
;
@ApiModelProperty
(
value
=
"禁用状态"
)
private
Integer
disable
;
@ApiModelProperty
(
value
=
"单位信息"
)
private
CompanyInfoVO
companyInfoVO
;
@ApiModelProperty
(
value
=
"角色信息"
)
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/CompanyAuthVO.java
浏览文件 @
668a70e3
...
...
@@ -23,19 +23,18 @@ import java.io.Serializable;
public
class
CompanyAuthVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3584743219477515646L
;
@ApiModelProperty
(
value
=
"id"
)
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户id"
,
hidden
=
true
)
//@NotNull(message = "用户id不能为空", groups = { Insert.class, Update.class})
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"企业名称"
)
@NotBlank
(
message
=
"企业名称"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"企业名称"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
companyName
;
@ApiModelProperty
(
value
=
"统一社会信用代码"
)
@NotBlank
(
message
=
"统一社会信用代码"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"统一社会信用代码"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
creditCode
;
@ApiModelProperty
(
value
=
"营业执照"
)
@NotBlank
(
message
=
"营业执照"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
@NotBlank
(
message
=
"营业执照"
,
groups
=
{
Insert
.
class
,
Update
.
class
})
private
String
licenseImg
;
@ApiModelProperty
(
value
=
"企业认证状态,0未通过,1已通过"
)
private
Integer
authStatus
;
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/CompanyInfoVO.java
浏览文件 @
668a70e3
...
...
@@ -22,27 +22,27 @@ import java.io.Serializable;
public
class
CompanyInfoVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
3247519744829926132L
;
@ApiModelProperty
(
value
=
"id"
)
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
@NotNull
(
message
=
"id不能为空"
,
groups
=
{
Update
.
class
})
private
Integer
id
;
@ApiModelProperty
(
value
=
"单位类型,0科比特,1加盟公司"
,
example
=
"0"
)
@NotNull
(
message
=
"单位类型不能为空"
,
groups
=
{
Insert
.
class
})
@NotNull
(
message
=
"单位类型不能为空"
,
groups
=
{
Insert
.
class
})
private
Integer
companyType
;
@ApiModelProperty
(
value
=
"单位名称"
,
example
=
"科比特"
)
@NotNull
(
message
=
"单位名称不能为空"
,
groups
=
{
Insert
.
class
})
@NotNull
(
message
=
"单位名称不能为空"
,
groups
=
{
Insert
.
class
})
private
String
companyName
;
@ApiModelProperty
(
value
=
"单位全称"
,
example
=
"浙江科比特创新科技有限公司"
)
private
String
fullName
;
@ApiModelProperty
(
value
=
"省份名称"
,
example
=
"广东省"
)
@NotNull
(
message
=
"省份名称不能为空"
,
groups
=
{
Insert
.
class
}
)
@ApiModelProperty
(
value
=
"省份名称"
,
example
=
"广东省"
,
hidden
=
true
)
@NotNull
(
message
=
"省份名称不能为空"
)
private
String
province
;
@ApiModelProperty
(
value
=
"城市名称"
,
example
=
"深圳市"
)
@NotNull
(
message
=
"城市名称不能为空"
,
groups
=
{
Insert
.
class
}
)
@ApiModelProperty
(
value
=
"城市名称"
,
example
=
"深圳市"
,
hidden
=
true
)
@NotNull
(
message
=
"城市名称不能为空"
)
private
String
city
;
@ApiModelProperty
(
value
=
"县区名称"
,
example
=
"南山区"
)
@NotNull
(
message
=
"县区名称不能为空"
,
groups
=
{
Insert
.
class
}
)
@ApiModelProperty
(
value
=
"县区名称"
,
example
=
"南山区"
,
hidden
=
true
)
@NotNull
(
message
=
"县区名称不能为空"
)
private
String
district
;
@ApiModelProperty
(
value
=
"详细地址"
,
example
=
"西丽街道万科云城国际创新谷6栋"
)
@NotNull
(
message
=
"详细地址不能为空"
,
groups
=
{
Insert
.
class
})
@NotNull
(
message
=
"详细地址不能为空"
,
groups
=
{
Insert
.
class
})
private
String
address
;
@ApiModelProperty
(
value
=
"联系人"
,
example
=
"lx"
)
private
String
companyUserName
;
...
...
@@ -50,4 +50,26 @@ public class CompanyInfoVO implements Serializable {
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"备注"
)
private
String
remark
;
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"纬度"
)
private
Double
lat
;
@ApiModelProperty
(
value
=
"经度"
)
private
Double
lon
;
@ApiModelProperty
(
value
=
"社会信用代码"
)
private
String
creditCode
;
@ApiModelProperty
(
value
=
"营业执照"
)
private
String
licenseImg
;
@ApiModelProperty
(
value
=
"品牌名称"
,
example
=
"科比特"
)
private
String
brandName
;
@ApiModelProperty
(
value
=
"品牌logo"
,
example
=
"http://"
)
private
String
brandLogo
;
@ApiModelProperty
(
value
=
"管理员标识"
)
private
Integer
leader
;
@ApiModelProperty
(
value
=
"服务资质信息"
,
example
=
"5星店铺"
)
private
String
content
;
@ApiModelProperty
(
value
=
"评分"
,
example
=
"*****"
)
private
Integer
score
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/CooperationTagVO.java
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
@@ -22,13 +21,13 @@ public class CooperationTagVO implements Serializable {
private
static
final
long
serialVersionUID
=
8884567706797525506L
;
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"合作标签名称"
)
@ApiModelProperty
(
value
=
"合作标签名称"
,
example
=
"企业名称"
)
private
String
tagName
;
@ApiModelProperty
(
value
=
"合作标签img"
)
@ApiModelProperty
(
value
=
"合作标签img"
,
example
=
"http://"
)
private
String
tagImg
;
@ApiModelProperty
(
value
=
"合作标签描述"
)
@ApiModelProperty
(
value
=
"合作标签描述"
,
example
=
"描述"
)
private
String
tagDescription
;
@ApiModelProperty
(
value
=
"注意事项"
)
@ApiModelProperty
(
value
=
"注意事项"
,
example
=
"注意事项"
)
private
String
tagRequire
;
@ApiModelProperty
(
value
=
"创建时间"
)
private
Date
createTime
;
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/RealNameAuthVO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/7/27 14:49
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
description
=
"新增/修改参数类"
)
public
class
RealNameAuthVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8096210744248682679L
;
@ApiModelProperty
(
value
=
"用户ID"
)
@NotNull
(
message
=
"用户ID不能为空"
,
groups
=
{
Update
.
class
,
Create
.
class
})
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"名字"
)
@NotBlank
(
message
=
"名字不能为空"
,
groups
=
{
Create
.
class
})
private
String
userName
;
@ApiModelProperty
(
value
=
"身份证号码"
)
@NotBlank
(
message
=
"身份证号码不能为空"
,
groups
=
{
Create
.
class
})
private
String
idNumber
;
@ApiModelProperty
(
value
=
"身份证正面照片地址"
)
@NotBlank
(
message
=
"身份证正面照片不能为空"
,
groups
=
{
Create
.
class
})
private
String
frontIdImg
;
@ApiModelProperty
(
value
=
"身份证反面照片地址"
)
@NotBlank
(
message
=
"身份证反面照片不能为空"
,
groups
=
{
Create
.
class
})
private
String
backIdImg
;
@ApiModelProperty
(
value
=
"unionId"
)
private
String
unionId
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
浏览文件 @
668a70e3
...
...
@@ -65,4 +65,10 @@ public class UserAccountVO implements Serializable {
private
List
<
CooperationTagVO
>
cooperationTagVOS
;
@ApiModelProperty
(
value
=
"上级推荐人"
)
private
UserRcdVO
userRcdVO
;
@ApiModelProperty
(
value
=
"是否是单位管理员"
)
private
Integer
leader
;
@ApiModelProperty
(
value
=
"实名认证状态"
)
private
Integer
realNameAuthStatus
;
@ApiModelProperty
(
value
=
"飞手审核 0审核中 1审核通过 2审核不通过 null不是飞手"
)
private
Integer
auditStatus
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserApplyTagVO.java
浏览文件 @
668a70e3
...
...
@@ -26,7 +26,7 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"加盟标签id"
)
@ApiModelProperty
(
value
=
"加盟标签id"
,
example
=
"1"
)
@NotNull
(
message
=
"加盟标签id不能为空"
,
groups
=
{
Insert
.
class
})
...
...
@@ -35,13 +35,13 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"申请人名称"
)
@ApiModelProperty
(
value
=
"申请人名称"
,
example
=
"lisi"
)
@NotBlank
(
message
=
"申请人名称不能为空"
,
groups
=
{
Insert
.
class
})
private
String
applyName
;
@ApiModelProperty
(
value
=
"申请人手机号"
)
@ApiModelProperty
(
value
=
"申请人手机号"
,
example
=
"19892885657"
)
@NotBlank
(
message
=
"申请人手机号不能为空"
,
groups
=
{
Insert
.
class
})
...
...
@@ -70,4 +70,25 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty
(
value
=
"服务评价⭐⭐⭐⭐⭐"
)
private
Integer
score
;
@ApiModelProperty
(
value
=
"品牌名称"
,
example
=
"科比特"
)
private
String
brandName
;
@ApiModelProperty
(
value
=
"品牌logo"
,
example
=
"http://"
)
private
String
brandLogo
;
@ApiModelProperty
(
value
=
"营业执照"
,
example
=
"http://"
)
private
String
licenseImg
;
@ApiModelProperty
(
value
=
"地址信息"
,
example
=
"广东省"
,
required
=
true
)
@NotBlank
(
message
=
"地址信息不能为空"
,
groups
=
{
Insert
.
class
})
private
String
address
;
@ApiModelProperty
(
value
=
"纬度"
,
example
=
"22.5749"
,
required
=
true
)
@NotNull
(
message
=
"纬度不能为空"
,
groups
=
{
Insert
.
class
})
private
Double
lat
;
@ApiModelProperty
(
value
=
"经度"
,
example
=
"113.992563"
,
required
=
true
)
@NotNull
(
message
=
"经度不能为空"
,
groups
=
{
Insert
.
class
})
private
Double
lon
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/dronepilot/BaseEnum.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
dronepilot
;
/**
* @Author small
* @Date 2023/7/29 9:47
* @Version 1.0 枚举基类
*/
public
interface
BaseEnum
{
String
getEnumCode
();
String
getEnumDesc
();
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/dronepilot/EnumUtils.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
dronepilot
;
import
com.alibaba.fastjson2.JSONArray
;
import
com.alibaba.fastjson2.JSONObject
;
import
java.lang.reflect.Method
;
import
java.util.Arrays
;
import
java.util.stream.Stream
;
/**
* @Author small
* @Date 2023/7/29 9:48
* @Version 1.0 枚举工具类
*/
public
final
class
EnumUtils
{
public
static
<
T
extends
BaseEnum
>
T
getByCode
(
Class
<
T
>
enumClazz
,
String
code
)
{
BaseEnum
[]
values
;
try
{
Method
method
=
enumClazz
.
getMethod
(
"values"
);
method
.
setAccessible
(
true
);
values
=
(
BaseEnum
[])
method
.
invoke
(
enumClazz
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
BaseEnum
result
=
Stream
.
of
(
values
)
.
filter
(
baseEnum
->
baseEnum
.
getEnumCode
().
equals
(
code
))
.
findFirst
()
.
orElse
(
null
);
return
result
==
null
?
null
:
(
T
)
result
;
}
public
static
boolean
isValidCode
(
Class
<?
extends
BaseEnum
>
enumClazz
,
String
code
)
{
return
getByCode
(
enumClazz
,
code
)
!=
null
;
}
public
static
JSONArray
toJsonArray
(
Class
<?
extends
BaseEnum
>
enumClazz
)
{
JSONArray
array
=
new
JSONArray
();
try
{
Method
method
=
enumClazz
.
getMethod
(
"values"
);
method
.
setAccessible
(
true
);
BaseEnum
[]
values
=
(
BaseEnum
[])
method
.
invoke
(
enumClazz
);
Arrays
.
stream
(
values
).
forEach
(
enumValue
->
{
JSONObject
json
=
new
JSONObject
();
json
.
put
(
"code"
,
enumValue
.
getEnumCode
());
json
.
put
(
"desc"
,
enumValue
.
getEnumDesc
());
array
.
add
(
json
);
});
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
e
);
}
return
array
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/dronepilot/EnumValue.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
dronepilot
;
/**
* @Author small
* @Date 2023/7/29 9:47
* @Version 1.0
*/
import
javax.validation.Constraint
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidatorContext
;
import
javax.validation.Payload
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
@Target
({
ElementType
.
METHOD
,
ElementType
.
FIELD
,
ElementType
.
ANNOTATION_TYPE
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Constraint
(
validatedBy
=
EnumValue
.
Validator
.
class
)
public
@interface
EnumValue
{
String
message
()
default
"{custom.value.invalid}"
;
boolean
nullable
()
default
false
;
Class
<?>[]
groups
()
default
{};
Class
<?
extends
Payload
>[]
payload
()
default
{};
Class
<?
extends
BaseEnum
>
enumClass
();
class
Validator
implements
ConstraintValidator
<
EnumValue
,
Object
>
{
private
Class
<?
extends
BaseEnum
>
enumClass
;
boolean
nullable
=
false
;
@Override
public
void
initialize
(
EnumValue
enumValue
)
{
enumClass
=
enumValue
.
enumClass
();
nullable
=
enumValue
.
nullable
();
}
@Override
public
boolean
isValid
(
Object
value
,
ConstraintValidatorContext
constraintValidatorContext
)
{
if
(
value
==
null
&&
nullable
)
{
return
Boolean
.
TRUE
;
}
if
(
value
==
null
&&
!
nullable
)
{
return
Boolean
.
FALSE
;
}
if
(
enumClass
==
null
)
{
return
Boolean
.
TRUE
;
}
String
enumCode
=
(
String
)
value
;
return
EnumUtils
.
isValidCode
(
enumClass
,
enumCode
);
}
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/dronepilot/PilotAbilityVO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
dronepilot
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author small
* @Date 2023/7/28 11:23
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
PilotAbilityVO
{
private
Integer
id
;
@ApiModelProperty
(
value
=
"能力id不能为空"
,
example
=
"5"
,
required
=
true
)
@NotBlank
(
message
=
"能力id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
abilityId
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"道路检测"
,
required
=
true
)
@NotBlank
(
message
=
"能力名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityName
;
@ApiModelProperty
(
value
=
"飞手认证id"
,
hidden
=
true
)
private
Integer
pilotCertificationId
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/dronepilot/PilotCertificationVO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
dronepilot
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.user.model.dto.dronepilot.LicenseType
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/28 10:02
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
public
class
PilotCertificationVO
{
@ApiModelProperty
(
value
=
"飞手执照id"
,
example
=
"1"
)
@NotNull
(
message
=
"飞手执照id不能为空"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照类型 CAAC,UTC,OTHER(其他) 目前只有三种"
,
example
=
"UTC"
,
required
=
true
)
@NotNull
(
message
=
"执照类型不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@EnumValue
(
enumClass
=
LicenseType
.
class
,
message
=
"取值不合法,参考:LicenseType"
)
private
String
licenseType
;
@ApiModelProperty
(
value
=
"电子执照的编号"
,
example
=
"231321312313211"
,
required
=
true
)
@NotBlank
(
message
=
"电子执照的编号不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseNumber
;
@ApiModelProperty
(
value
=
"上传执照"
,
example
=
"http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/2cbbeffb-c1d1-4b26-a9a9-9e17c85e35a9.jpg"
,
required
=
true
)
@NotBlank
(
message
=
"上传执照的照片不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseUrl
;
@ApiModelProperty
(
value
=
"地区编号不能为空"
,
example
=
"100001"
,
required
=
true
)
@NotNull
(
message
=
"地区编号不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
areaNumber
;
@ApiModelProperty
(
value
=
"常驻城市不能为空"
,
example
=
"深圳市"
,
required
=
true
)
@NotBlank
(
message
=
"常驻城市不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
residentCity
;
@ApiModelProperty
(
value
=
"工作年限"
,
example
=
"3"
,
required
=
true
)
@NotNull
(
message
=
"工作年限不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Max
(
value
=
80
,
message
=
"工作年限不能超过80年"
)
private
Integer
yearsOfWorking
;
@NotNull
(
message
=
"能力不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
List
<
PilotAbilityVO
>
pilotAbility
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/2cbbeffb-c1d1-4b26-a9a9-9e17c85e35a9.jpg"
,
required
=
true
)
@NotBlank
(
message
=
"能力图片不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityUrl
;
@ApiModelProperty
(
value
=
"个人简介"
,
example
=
"无人机专业,工作三年"
,
required
=
true
)
@NotBlank
(
message
=
"个人简介不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
max
=
300
,
message
=
"个人不能超过300"
)
private
String
individualResume
;
@ApiModelProperty
(
value
=
"备注"
,
example
=
"航拍摄影,农业植保"
,
required
=
false
)
private
String
remark
;
@ApiModelProperty
(
value
=
"审核是否通过 0审核中 1审核通过 2审核不通过"
,
example
=
"0"
,
required
=
false
)
private
Integer
auditStatus
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/dronepilot/ValueEnum.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
dronepilot
;
import
java.lang.annotation.Annotation
;
/**
* @Author small
* @Date 2023/7/29 9:43
* @Version 1.0
*/
public
interface
ValueEnum
<
T
>
extends
Annotation
{
/**
* 获取枚举值
*
* @return 枚举值
*/
T
getValue
();
}
cms-common/cms-common-util/src/main/java/com/mmc/iuav/response/ResultBody.java
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
response
;
import
com.alibaba.fastjson2.JSONObject
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
@@ -17,7 +18,7 @@ import java.io.Serializable;
@Data
@AllArgsConstructor
@NoArgsConstructor
//@ApiModel(value = "com.mmc.iuav.response.ResultBody",
description = "请求响应体")
@ApiModel
(
description
=
"请求响应体"
)
public
class
ResultBody
<
T
>
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6913505187877217885L
;
...
...
cms-common/cms-common-util/src/main/java/com/mmc/iuav/response/ResultEnum.java
浏览文件 @
668a70e3
...
...
@@ -14,8 +14,11 @@ public enum ResultEnum implements BaseErrorInfoInterface {
BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR
(
"1000"
,
"营业执照解析失败,请上传有效清晰的执照"
),
COMPANY_NOT_AUTH_ERROR
(
"1001"
,
"未进行企业认证"
),
BUSINESS_LICENSE_CHECK_PARAMETER_ERROR
(
"1002"
,
"企业信息与营业执照信息不一致,请重新上传"
),
THE_BRAND_NAME_CANNOT_BE_EMPTY
(
"1003"
,
"品牌名称不能为空"
),
THE_BRAND_LOGO_CANNOT_BE_EMPTY
(
"1004"
,
"logo图标不能为空"
),
TAG_ALREADY_EXIST_ERROR
(
"2001"
,
"您已拥有该身份,不需要重复提交"
),
TAG_APPLY_ALREADY_EXIST_ERROR
(
"2002"
,
"已存在申请记录,不可重复申请"
),
LOGIN_ACCOUNT_NOT_EXIT_ERROR
(
"5005"
,
"账号不存在"
),
LOGIN_PASSWORD_ERROR
(
"5006"
,
"密码错误"
),
...
...
@@ -23,6 +26,14 @@ public enum ResultEnum implements BaseErrorInfoInterface {
REMOVE_COMPANY_BINDING_ERROR
(
"5009"
,
"删除失败,该单位有绑定账号"
),
REMOVE_COMPANY_TASK_ERROR
(
"5010"
,
"删除失败,该单位有绑定服务"
),
COMPANY_NAME_EXIST_ERROR
(
"5011"
,
"单位名称已存在"
),
NOT_BINDING_COMPANY_ERROR
(
"5012"
,
"未绑定企业,绑定公司再重试!"
),
REMOVE_COMPANY_BINDING_APP_ERROR
(
"5013"
,
"删除失败,该单位有绑定小程序账号!"
),
UNBIND_COMPANY_MEMBER_ERROR
(
"5014"
,
"不能解绑管理员"
),
TRANFER_COMPANY_MEMBER_LEADER_ERROR
(
"5015"
,
"转交人不是管理员!"
),
COMPANY_EXIST_ERROR
(
"5015"
,
"该企业已认证!"
),
COOPERATION_CHECK_NOT_PASS_ERROR
(
"5016"
,
"审核失败,请联系管理人员!"
),
REBINDING_COMPANY_ERROR
(
"5017"
,
"该用户已被企业绑定,请尝试让该用户解绑后再重试!"
),
MEMBER_APPLY_ERROR
(
"5018"
,
"企业成员暂不能提交加盟申请!"
),
//微信相关
PASSWORD_INCONSISTENT
(
"5026"
,
"新密码与确认密码不一致,请确认一致"
),
...
...
@@ -34,7 +45,6 @@ public enum ResultEnum implements BaseErrorInfoInterface {
PWD_CONPARED_ERROR
(
"6002"
,
"密码错误"
),
PWD_ALERT_ERROR
(
"6003"
,
"密码不一致"
),
PWD_REQUEST_AUTH_ERROR
(
"6003"
,
"密码请求验证"
),
APPLET_PORT_TYPE_ERROR
(
"7001"
,
"小程序端口类型错误"
),
APPLET_LOGIN_ERROR
(
"7002"
,
"获取小程序登录信息失败"
),
UPDATE_USER_ACCOUNT_REPEAT
(
"7003"
,
"修改后的账户名已存在"
),
...
...
@@ -47,7 +57,29 @@ public enum ResultEnum implements BaseErrorInfoInterface {
UPDATE_ADMIN_ROLE_ERROR
(
"8009"
,
"禁止修改admin账号的角色"
),
ONLY_ONE_ADMIN_ERROR
(
"8010"
,
"禁止该账号获取超级管理员角色"
),
DELETE_ADMIN_ERROR
(
"8011"
,
"禁止删除超级管理员角色账号"
),
DELETE_YOURSELF_ERROR
(
"8011"
,
"禁止删除自己的账号"
);
DELETE_YOURSELF_ERROR
(
"8011"
,
"禁止删除自己的账号"
),
FRANCHISEE_ACCOUNT_MORE_THAN_ONE_ERROR
(
"8012"
,
"绑定企业为加盟公司,禁止使用该单位"
),
ID_INFO_AND_ID_card_MISMATCH
(
"3904"
,
"身份信息与身份证不匹配"
),
INTERFACE_ACCESS_EXCEPTION
(
"36894"
,
"接口访问异常/次数用尽"
),
FRONT_BACK_VAGUE
(
"35556"
,
"身份证正反面不明确"
),
ID_CARD_THOTO_MESSAGE_ERROR
(
"36651"
,
"身份照信息错误"
),
EXPTION_ID_CARD_THOTO_MESSAGE_ERROR
(
"36651"
,
"信息异常"
),
PHOTO_FORMAT_ERROR
(
"12138"
,
"身份证图片格式错误"
),
VALIDATION_INFO_EXPIRED
(
"32815"
,
"认证时间过长信息过期或认证信息不完整,请重新开始认证"
),
REAL_IMAGE_AUTHENTICATION_SUCESS
(
"38844"
,
"验证成功"
),
REAL_IMAGE_AUTHENTICATION_FAILED
(
"38855"
,
"验证失败,请再次进行人脸识别"
),
IDENTITY_HAS_BEEN_AUTHENTICATED
(
"34444"
,
"此身份证信息已经被认证,请重试"
),
REAL_NAME_ACCOUNT_ID_ERROR
(
"36771"
,
"账户id错误"
),
REAL_NAME_FUSING_ERROR
(
"36772"
,
"认证失败,请重新认证"
),
REAL_NAME_PASS_ERROR
(
"36773"
,
"已成功认证"
),
PLEASE_ERFORM_REAL_NAME_AUTHENTICATION_FIRST
(
"36774"
,
"请先进行实名认证"
),
I_HAVE_APPLIED_FOR_A_PILOT_LICENSE
(
"36775"
,
"已经申请飞手执照及能力认证,请等待审核"
),
CAN_NOT_CHANGE_THE_APPLICATION_OF_OTHERS
(
"36776"
,
"不能变更其他人申请的飞手执照及电子认证"
),
WX_NOT_SEND_MSG_PARAM_ERROR
(
"5029"
,
"userId和openId至少一个不为空"
),
APPLET_USER_ACCESS_TOKE_ERROR
(
"5031"
,
"获取accessToken签名校验失败"
),
WX_NOT_REL_ERROR
(
"5028"
,
"获取微信公众号用户信息失败"
);;
/**
* 错误码
...
...
csm-service/cms-service-user/pom.xml
浏览文件 @
668a70e3
...
...
@@ -68,22 +68,21 @@
<version>
5.5.0
</version>
<!-- 支持开源所有版本 -->
</dependency>
<!-- <dependency>-->
<!-- <groupId>com.github.xiaoymin</groupId>-->
<!-- <artifactId>knife4j-spring-boot-starter</artifactId>-->
<!-- <version>2.0.5</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.xiaoymin</groupId>-->
<!-- <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>-->
<!-- <version>4.0.0</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.xiaoymin</groupId>-->
<!-- <artifactId>knife4j-spring-boot-starter</artifactId>-->
<!-- <version>2.0.5</version>-->
<!-- </dependency>-->
<!-- <dependency>-->
<!-- <groupId>com.github.xiaoymin</groupId>-->
<!-- <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>-->
<!-- <version>4.0.0</version>-->
<!-- </dependency>-->
<!-- https://mvnrepository.com/artifact/com.github.wxpay/wxpay-sdk -->
<dependency>
<groupId>
com.
github.wxpay
</groupId>
<artifactId>
wxpay-sdk
</artifactId>
<version>
0.0.3
</version>
<groupId>
com.
aliyun
</groupId>
<artifactId>
dysmsapi20170525
</artifactId>
<version>
2.0.5
</version>
</dependency>
</dependencies>
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/client/PmsClient.java
浏览文件 @
668a70e3
...
...
@@ -27,12 +27,25 @@ public class PmsClient {
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
null
,
headers
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
pmsAppUri
+
"/pms/backstage/work/queryWorkServiceCount"
+
"?companyId="
+
id
,
HttpMethod
.
GET
,
entity
,
ResultBody
.
class
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
pmsAppUri
+
"/pms/backstage/work/queryWorkServiceCount"
+
"?companyId="
+
id
,
HttpMethod
.
GET
,
entity
,
ResultBody
.
class
);
ResultBody
body
=
responseEntity
.
getBody
();
if
(
body
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
())){
if
(
body
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
Integer
count
=
(
Integer
)
body
.
getResult
();
return
count
;
}
return
null
;
}
public
Integer
removeMallGoods
(
Integer
id
,
String
token
)
{
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
add
(
"token"
,
token
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
null
,
headers
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
pmsAppUri
+
"/pms/mall/goods/feignRemoveGoodsByBackUserAccountId"
+
"?id="
+
id
,
HttpMethod
.
GET
,
entity
,
ResultBody
.
class
);
ResultBody
body
=
responseEntity
.
getBody
();
if
(
body
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
()))
{
return
1
;
}
return
null
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/BackUserAccountController.java
浏览文件 @
668a70e3
...
...
@@ -80,4 +80,11 @@ public class BackUserAccountController extends BaseController {
return
backUserAccountService
.
feignAuthUserPwd
(
id
,
authPwd
);
}
@ApiOperation
(
value
=
"pc后台-获取后台用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"getBackUserAccountById"
)
public
ResultBody
getBackUserAccountById
(
@RequestParam
(
required
=
true
)
Integer
id
)
{
return
ResultBody
.
success
(
backUserAccountService
.
getBackUserAccountById
(
id
));
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/CompanyController.java
浏览文件 @
668a70e3
...
...
@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Insert;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.qo.CompanyInfoQO
;
import
com.mmc.iuav.user.model.vo.CompanyInfoVO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
com.mmc.iuav.user.service.CompanyService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
...
...
@@ -24,51 +25,95 @@ import java.util.List;
@Api
(
tags
=
"单位管理"
)
@RequestMapping
(
"/company/"
)
@RestController
public
class
CompanyController
extends
BaseController
{
public
class
CompanyController
extends
BaseController
{
@Autowired
private
CompanyService
companyService
;
@ApiOperation
(
value
=
"新增"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@PostMapping
(
"add"
)
public
ResultBody
add
(
@Validated
(
Insert
.
class
)
@RequestBody
CompanyInfoVO
companyInfo
){
public
ResultBody
add
(
@Validated
(
Insert
.
class
)
@RequestBody
CompanyInfoVO
companyInfo
)
{
return
companyService
.
addCompanyInfo
(
companyInfo
);
}
@ApiOperation
(
value
=
"移除"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@GetMapping
(
"remove"
)
public
ResultBody
remove
(
@RequestParam
Integer
id
,
@RequestHeader
String
token
){
public
ResultBody
remove
(
@RequestParam
Integer
id
,
@RequestHeader
String
token
)
{
return
companyService
.
removeCompanyInfo
(
id
,
token
);
}
@ApiOperation
(
value
=
"修改"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@PostMapping
(
"update"
)
public
ResultBody
update
(
@RequestBody
CompanyInfoVO
companyInfo
){
public
ResultBody
update
(
@RequestBody
CompanyInfoVO
companyInfo
)
{
return
companyService
.
updateCompanyInfo
(
companyInfo
);
}
@ApiOperation
(
value
=
"单位查询"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)
})
@GetMapping
(
"getCompanyInfoById"
)
public
ResultBody
<
CompanyInfoVO
>
getCompanyInfoById
(
@RequestParam
Integer
id
){
public
ResultBody
<
CompanyInfoVO
>
getCompanyInfoById
(
@RequestParam
Integer
id
)
{
return
companyService
.
getCompanyInfoById
(
id
);
}
@ApiOperation
(
value
=
"pc-后台用户id单位查询"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)})
@GetMapping
(
"getCompanyInfoByBUId"
)
public
ResultBody
<
CompanyInfoVO
>
getCompanyInfoByBUId
(
@RequestParam
Integer
backUserAccountId
)
{
return
companyService
.
getCompanyInfoByBUId
(
backUserAccountId
);
}
@ApiOperation
(
value
=
"单位列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)
})
@PostMapping
(
"listCompanyPage"
)
public
ResultBody
<
CompanyInfoVO
>
listCompanyPage
(
@RequestBody
CompanyInfoQO
companyInfoQO
,
HttpServletRequest
request
){
public
ResultBody
<
CompanyInfoVO
>
listCompanyPage
(
@RequestBody
CompanyInfoQO
companyInfoQO
,
HttpServletRequest
request
)
{
return
companyService
.
listCompanyPage
(
companyInfoQO
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiIgnore
@ApiOperation
(
value
=
"单位列表-后台使用"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
CompanyInfoVO
.
class
)
})
@PostMapping
(
"listCompanyPageBack"
)
public
List
<
CompanyInfoVO
>
listCompanyPageBack
(
@RequestBody
CompanyInfoQO
companyInfoQO
){
public
List
<
CompanyInfoVO
>
listCompanyPageBack
(
@RequestBody
CompanyInfoQO
companyInfoQO
)
{
return
companyService
.
listCompanyPageBack
(
companyInfoQO
);
}
@ApiOperation
(
value
=
"成员-绑定"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"bindingCompanyMember"
)
public
ResultBody
bindingCompanyMember
(
HttpServletRequest
request
,
@RequestParam
Integer
userAccountId
,
@RequestParam
Integer
companyInfoId
)
{
return
companyService
.
bindingCompanyMember
(
this
.
getUserLoginInfoFromRedis
(
request
),
userAccountId
,
companyInfoId
);
}
@ApiOperation
(
value
=
"成员-解绑"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"unbindCompanyMember"
)
public
ResultBody
unbindCompanyMember
(
HttpServletRequest
request
,
@RequestParam
Integer
userAccountId
,
@RequestParam
Integer
companyInfoId
)
{
return
companyService
.
unbindCompanyMember
(
this
.
getUserLoginInfoFromRedis
(
request
),
userAccountId
,
companyInfoId
);
}
@ApiOperation
(
value
=
"成员-转让管理员"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"transferLeader"
)
public
ResultBody
transferLeader
(
HttpServletRequest
request
,
@RequestParam
Integer
fromUserAccountId
,
@RequestParam
Integer
toUserAccountId
,
@RequestParam
Integer
companyInfoId
)
{
return
companyService
.
transferLeader
(
this
.
getUserLoginInfoFromRedis
(
request
),
fromUserAccountId
,
toUserAccountId
,
companyInfoId
);
}
@ApiOperation
(
value
=
"成员-列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"listCompanyMembers"
)
public
ResultBody
<
UserAccountVO
>
listCompanyMembers
(
HttpServletRequest
request
,
@RequestParam
Integer
companyInfoId
,
@RequestParam
Integer
pageNo
,
@RequestParam
Integer
pageSize
)
{
return
companyService
.
listCompanyMembers
(
companyInfoId
,
this
.
getUserLoginInfoFromRedis
(
request
),
pageNo
,
pageSize
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/CooperationController.java
浏览文件 @
668a70e3
...
...
@@ -50,6 +50,21 @@ public class CooperationController extends BaseController {
return
cooperationService
.
apply
(
userApplyTagVO
);
}
@ApiOperation
(
value
=
"app-已申请的品牌与logo列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserApplyTagVO
.
class
)})
@GetMapping
(
"appBrandList"
)
public
ResultBody
<
CompanyInfoVO
>
appBrandList
()
{
return
cooperationService
.
appBrandList
();
}
@ApiOperation
(
value
=
"app-通过用户获取相关品牌信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserApplyTagVO
.
class
)})
@GetMapping
(
"appBrandMessage"
)
public
ResultBody
<
UserApplyTagVO
>
appBrandMessage
(
@ApiParam
(
value
=
"用户id"
,
required
=
true
)
@RequestParam
Integer
userAccountId
)
{
return
cooperationService
.
appBrandMessage
(
userAccountId
);
}
@ApiOperation
(
value
=
"后台-申请列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserApplyTagVO
.
class
)})
@PostMapping
(
"listUserApplyTag"
)
...
...
@@ -82,7 +97,7 @@ public class CooperationController extends BaseController {
return
ResultBody
.
success
(
cooperationService
.
listServiceBitmapData
(
type
,
pageNo
,
pageSize
,
lon
,
lat
));
}
@ApiOperation
(
value
=
"强制删除"
)
@ApiOperation
(
value
=
"强制删除
加盟商标签
"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"deleteApplyTag"
)
public
ResultBody
deleteApplyTag
(
Integer
id
)
{
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/RealNameAuthController.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.qo.RealNameAuthQO
;
import
com.mmc.iuav.user.model.vo.RealNameAuthVO
;
import
com.mmc.iuav.user.service.RealNameAuthService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author: zj
* @Date: 2023/7/27 10:04
*/
@Api
(
tags
=
"实名认证"
)
@RequestMapping
(
"/real-name-auth/"
)
@RestController
public
class
RealNameAuthController
extends
BaseController
{
@Autowired
private
RealNameAuthService
realNameAuthService
;
@ApiOperation
(
value
=
"提交实名认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"add"
)
public
ResultBody
add
(
@Validated
(
value
=
{
Create
.
class
})
@RequestBody
RealNameAuthVO
realNameAuthVO
)
{
return
realNameAuthService
.
add
(
realNameAuthVO
);
}
@ApiOperation
(
value
=
"实名认证详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RealNameAuthDTO
.
class
)})
@GetMapping
(
"detail"
)
public
ResultBody
<
RealNameAuthDTO
>
detail
(
@RequestParam
Integer
id
)
{
return
realNameAuthService
.
detail
(
id
);
}
@ApiOperation
(
value
=
"用户实名认证详情"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RealNameAuthDTO
.
class
)})
@GetMapping
(
"userDetail"
)
public
ResultBody
<
RealNameAuthDTO
>
userDetail
(
HttpServletRequest
request
)
{
return
realNameAuthService
.
userDetail
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
());
}
@ApiOperation
(
value
=
"实名认证列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"listPage"
)
public
ResultBody
listPage
(
@RequestBody
RealNameAuthQO
realNameAuthQO
)
{
return
realNameAuthService
.
listPage
(
realNameAuthQO
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/TempLoginController.java
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.service.AuthService
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @author: zj
...
...
@@ -23,14 +24,15 @@ public class TempLoginController extends BaseController {
private
AuthService
authService
;
@ApiOperation
(
value
=
"小程序确认登录"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@GetMapping
(
"tempConfirmLogin"
)
public
ResultBody
tempConfirmLogin
(
HttpServletRequest
request
,
@ApiParam
(
value
=
"临时登录code"
,
example
=
"kj6d9wcxyp92jajugdnc"
)
@RequestParam
String
randomLoginCode
)
{
return
authService
.
tempConfirmLogin
(
this
.
getUserLoginInfoFromRedis
(
request
),
randomLoginCode
);
public
ResultBody
tempConfirmLogin
(
HttpServletRequest
request
,
@ApiParam
(
value
=
"0:web小程序,1:web后台管理"
,
example
=
"0"
)
@RequestParam
(
defaultValue
=
"0"
)
Integer
port
,
@ApiParam
(
value
=
"临时登录code"
,
example
=
"kj6d9wcxyp92jajugdnc"
)
@RequestParam
String
randomLoginCode
)
{
return
authService
.
tempConfirmLogin
(
this
.
getUserLoginInfoFromRedis
(
request
),
port
,
randomLoginCode
);
}
@ApiOperation
(
value
=
"查询登录信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)
})
@GetMapping
(
"getLoginInfo"
)
public
ResultBody
getLoginInfo
(
@ApiParam
(
value
=
"临时登录code"
,
example
=
"kj6d9wcxyp92jajugdnc"
)
@RequestParam
String
randomLoginCode
)
{
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/UserAccountController.java
浏览文件 @
668a70e3
...
...
@@ -31,14 +31,14 @@ public class UserAccountController extends BaseController {
@ApiOperation
(
value
=
"客户列表"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountVO
.
class
)})
@PostMapping
(
"listAppUser"
)
public
ResultBody
<
UserAccountVO
>
listAppUser
(
@Validated
(
value
=
{
Page
.
class
})
@RequestBody
UserAccountQO
userAccountQO
)
{
return
userAccountService
.
listAppUser
(
userAccountQO
);
public
ResultBody
<
UserAccountVO
>
listAppUser
(
@Validated
(
value
=
{
Page
.
class
})
@RequestBody
UserAccountQO
userAccountQO
,
HttpServletRequest
request
)
{
return
userAccountService
.
listAppUser
(
userAccountQO
,
this
.
getUserLoginInfoFromRedis
(
request
)
);
}
@ApiOperation
(
value
=
"获取用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountVO
.
class
)})
@GetMapping
(
"info"
)
public
ResultBody
info
(
HttpServletRequest
request
)
{
public
ResultBody
<
UserAccountVO
>
info
(
HttpServletRequest
request
)
{
return
ResultBody
.
success
(
userAccountService
.
getUserAccountById
(
this
.
getUserLoginInfoFromRedis
(
request
).
getUserAccountId
()));
}
...
...
@@ -49,6 +49,7 @@ public class UserAccountController extends BaseController {
return
userAccountService
.
update
(
userAccountVO
);
}
@ApiOperation
(
value
=
"获取用户基本信息"
,
hidden
=
true
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountSimpleDTO
.
class
)})
@GetMapping
(
"feignGetUserSimpleInfo"
)
...
...
@@ -135,4 +136,11 @@ public class UserAccountController extends BaseController {
return
userAccountService
.
topRcd
(
topNum
);
}
@ApiOperation
(
value
=
"手机号查询用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"getUserAccountByPhoneNum"
)
public
ResultBody
getUserAccountByPhoneNum
(
@RequestParam
String
phoneNum
)
{
return
userAccountService
.
getUserAccountByPhoneNum
(
phoneNum
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/dronepilot/PilotCertificationController.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
.
dronepilot
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Page
;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.controller.BaseController
;
import
com.mmc.iuav.user.model.dto.RoleInfoDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationLogDTO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotRemarkQO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO
;
import
com.mmc.iuav.user.service.dronepilot.PilotCertificationService
;
import
io.swagger.annotations.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
/**
* @Author small
* @Date 2023/7/28 9:32
* @Version 1.0
*/
@Api
(
tags
=
"飞手执照能力及认证"
)
@RequestMapping
(
"/pilot"
)
@RestController
public
class
PilotCertificationController
extends
BaseController
{
@Autowired
private
PilotCertificationService
certificationService
;
@ApiOperation
(
value
=
"能力类型"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
RoleInfoDTO
.
class
)})
@GetMapping
(
"/abilityList"
)
public
ResultBody
<
PilotAbilityDTO
>
abilityList
(
HttpServletRequest
request
)
{
return
certificationService
.
abilityList
();
}
@ApiOperation
(
value
=
"小程序——申请——飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/insertPilot"
)
public
ResultBody
insertPilot
(
HttpServletRequest
request
,
@RequestBody
@Validated
(
value
=
{
Create
.
class
})
PilotCertificationVO
certificationVO
)
{
return
certificationService
.
insertPilot
(
certificationVO
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiOperation
(
value
=
"小程序——编辑——飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/updatePilot"
)
public
ResultBody
updatePilot
(
HttpServletRequest
request
,
@RequestBody
@Validated
(
value
=
{
Update
.
class
})
PilotCertificationVO
certificationVO
)
{
return
certificationService
.
updatePilot
(
certificationVO
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiOperation
(
value
=
"小程序——列表————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/appListPilot"
)
public
ResultBody
<
PilotCertificationDTO
>
pilotList
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"飞手查询"
,
required
=
true
)
@RequestBody
PilotCertificationQO
param
)
{
return
ResultBody
.
success
(
certificationService
.
pilotList
(
param
));
}
@ApiOperation
(
value
=
"小程序——详情————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/detailPilot"
)
public
ResultBody
<
PilotCertificationDTO
>
detailPilot
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"id"
,
required
=
true
)
Integer
id
)
{
return
ResultBody
.
success
(
certificationService
.
detailPilot
(
id
));
}
@ApiOperation
(
value
=
"后台管理——列表————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/backListPilot"
)
public
ResultBody
<
PilotCertificationDTO
>
backListPilot
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"飞手查询"
,
required
=
true
)
@RequestBody
PilotCertificationQO
param
)
{
return
ResultBody
.
success
(
certificationService
.
backListPilot
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
@ApiOperation
(
value
=
"后台管理——详情————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/backDetailPilot"
)
public
ResultBody
<
PilotCertificationDTO
>
backDetailPilot
(
HttpServletRequest
request
,
@RequestParam
(
value
=
"id"
,
required
=
true
)
Integer
id
)
{
return
ResultBody
.
success
(
certificationService
.
detailPilot
(
id
));
}
@ApiOperation
(
value
=
"后台管理——修改备注————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/updateRemark"
)
public
ResultBody
updateRemark
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Update
.
class
})
@ApiParam
(
value
=
"修改备注"
,
required
=
true
)
@RequestBody
PilotRemarkQO
param
)
{
return
certificationService
.
updateRemark
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiOperation
(
value
=
"后台管理——审批————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/updateAuditStatus"
)
public
ResultBody
updateAuditStatus
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Update
.
class
})
@ApiParam
(
value
=
"修改审批状态"
,
required
=
true
)
@RequestBody
PilotAuditStatusQO
param
)
{
return
certificationService
.
updateAuditStatus
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
));
}
@ApiOperation
(
value
=
"后台管理——日志列表————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/backPilotLogList"
)
public
ResultBody
<
PilotCertificationLogDTO
>
backPilotLogList
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"飞手查询"
,
required
=
true
)
@RequestBody
PilotCertificationLogQO
param
)
{
return
ResultBody
.
success
(
certificationService
.
backPilotLogList
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wx/AppletMsgVOS.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
.
wx
;
import
com.alibaba.fastjson2.JSONObject
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
import
java.io.Serializable
;
/**
* @Author small
* @Date 2023/7/31 11:00
* @Version 1.0
*/
@Builder
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
AppletMsgVOS
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2124104608303700492L
;
@ApiModelProperty
(
value
=
"openid"
)
@NotBlank
private
String
touser
;
@ApiModelProperty
(
value
=
"模板ID"
)
@NotBlank
private
String
template_id
;
@ApiModelProperty
(
value
=
"点击模板卡片后的跳转页面,仅限本小程序内的页面。支持带参数,(示例index?foo=bar)。该字段不填则模板无跳转。"
)
private
String
page
;
@ApiModelProperty
(
value
=
"模板内容"
)
private
JSONObject
data
;
@ApiModelProperty
(
value
=
"跳转小程序类型:developer为开发版;trial为体验版;formal为正式版;默认为正式版"
)
private
String
miniprogram_state
;
@ApiModelProperty
(
value
=
"默认为zh_CN"
)
private
String
lang
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wx/HttpsOpenUtil.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
.
wx
;
import
java.io.BufferedReader
;
import
java.io.IOException
;
import
java.io.InputStreamReader
;
import
java.io.PrintWriter
;
import
java.net.URL
;
import
java.net.URLConnection
;
import
java.util.List
;
import
java.util.Map
;
/**
* @Author small
* @Date 2023/7/31 11:05
* @Version 1.0
*/
public
class
HttpsOpenUtil
{
/**
* http请求
*
* @param url 发送请求的URL
* @param param 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。
* @return URL 所代表远程资源的响应结果
* @category 向指定URL发送GET方法的请求
*/
public
static
String
httpSendGet
(
String
url
,
String
param
)
{
String
result
=
""
;
BufferedReader
in
=
null
;
try
{
String
urlNameString
=
url
+
"?"
+
param
;
URL
realUrl
=
new
URL
(
urlNameString
);
// 打开和URL之间的连接
URLConnection
connection
=
realUrl
.
openConnection
();
// 设置通用的请求属性
connection
.
setRequestProperty
(
"accept"
,
"*/*"
);
connection
.
setRequestProperty
(
"connection"
,
"Keep-Alive"
);
connection
.
setRequestProperty
(
"user-agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
// 建立实际的连接
connection
.
connect
();
// 获取所有响应头字段
Map
<
String
,
List
<
String
>>
map
=
connection
.
getHeaderFields
();
// 遍历所有的响应头字段
// for (String key : map.keySet()) {
// System.out.println(key + "--->" + map.get(key));
// }
// 定义 BufferedReader输入流来读取URL的响应
in
=
new
BufferedReader
(
new
InputStreamReader
(
connection
.
getInputStream
()));
String
line
;
while
((
line
=
in
.
readLine
())
!=
null
)
{
result
+=
line
;
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"发送GET请求出现异常!"
+
e
);
e
.
printStackTrace
();
}
// 使用finally块来关闭输入流
finally
{
try
{
if
(
in
!=
null
)
{
in
.
close
();
}
}
catch
(
Exception
e2
)
{
e2
.
printStackTrace
();
}
}
return
result
;
}
/**
* http请求
*
* @param url 发送请求的 URL
* @return 所代表远程资源的响应结果
* @category 向指定URL 发送POST方法的请求
*/
public
static
String
httpSendPost
(
String
url
,
String
param
)
{
PrintWriter
out
=
null
;
BufferedReader
in
=
null
;
String
result
=
""
;
try
{
URL
realUrl
=
new
URL
(
url
);
// 打开和URL之间的连接
URLConnection
conn
=
realUrl
.
openConnection
();
// 设置通用的请求属性
conn
.
setRequestProperty
(
"accept"
,
"*/*"
);
conn
.
setRequestProperty
(
"connection"
,
"Keep-Alive"
);
conn
.
setRequestProperty
(
"user-agent"
,
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)"
);
// 发送POST请求必须设置如下两行
conn
.
setDoOutput
(
true
);
conn
.
setDoInput
(
true
);
// 获取URLConnection对象对应的输出流
out
=
new
PrintWriter
(
conn
.
getOutputStream
());
// 发送请求参数
out
.
print
(
param
);
// flush输出流的缓冲
out
.
flush
();
// 定义BufferedReader输入流来读取URL的响应
in
=
new
BufferedReader
(
new
InputStreamReader
(
conn
.
getInputStream
()));
String
line
;
while
((
line
=
in
.
readLine
())
!=
null
)
{
result
+=
line
;
}
}
catch
(
Exception
e
)
{
System
.
out
.
println
(
"发送 POST 请求出现异常!"
+
e
);
e
.
printStackTrace
();
}
// 使用finally块来关闭输出流、输入流
finally
{
try
{
if
(
out
!=
null
)
{
out
.
close
();
}
if
(
in
!=
null
)
{
in
.
close
();
}
}
catch
(
IOException
ex
)
{
ex
.
printStackTrace
();
}
}
return
result
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wx/JsonUtil.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
.
wx
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSONObject
;
/**
* @Author small
* @Date 2023/7/31 11:04
* @Version 1.0
*/
public
class
JsonUtil
{
/**
* 把Java对象转换成json字符串
*
* @param object 待转化为JSON字符串的Java对象
* @return json 串 or null
*/
public
static
String
parseObjToJson
(
Object
object
)
{
String
string
=
null
;
try
{
string
=
JSONObject
.
toJSONString
(
object
);
}
catch
(
Exception
e
)
{
// LOGGER.error(e.getMessage());
}
return
string
;
}
/**
* 将Json字符串信息转换成对应的Java对象
*
* @param json json字符串对象
* @param c 对应的类型
*/
public
static
<
T
>
T
parseJsonToObj
(
String
json
,
Class
<
T
>
c
)
{
try
{
JSONObject
jsonObject
=
JSON
.
parseObject
(
json
);
return
JSON
.
toJavaObject
(
jsonObject
,
c
);
}
catch
(
Exception
e
)
{
// LOGGER.error(e.getMessage());
}
return
null
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wx/WxApiUtilS.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
.
wx
;
import
com.alibaba.fastjson2.JSONObject
;
import
java.security.MessageDigest
;
import
java.util.Arrays
;
import
java.util.Map
;
/**
* @Author small
* @Date 2023/7/31 11:03
* @Version 1.0
*/
public
class
WxApiUtilS
{
// 与接口配置信息中的Token要一致
private
static
final
String
token
=
"MMCDingYueHaoToken2020"
;
public
static
boolean
checkSignature
(
String
signature
,
String
timestrap
,
String
nonce
)
{
String
[]
arr
=
new
String
[]{
token
,
timestrap
,
nonce
};
// 将token、timestamp、nonce三个参数进行字典序排序
Arrays
.
sort
(
arr
);
StringBuffer
buf
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
buf
.
append
(
arr
[
i
]);
}
String
temp
=
getSha1
(
buf
.
toString
());
return
temp
.
equals
(
signature
);
}
public
static
String
getSha1
(
String
str
)
{
if
(
null
==
str
||
str
.
length
()
==
0
)
{
return
null
;
}
char
hexDigits
[]
=
{
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'a'
,
'b'
,
'c'
,
'd'
,
'e'
,
'f'
};
try
{
MessageDigest
mdTemp
=
MessageDigest
.
getInstance
(
"SHA1"
);
mdTemp
.
update
(
str
.
getBytes
(
"UTF-8"
));
byte
[]
md
=
mdTemp
.
digest
();
int
j
=
md
.
length
;
char
[]
buf
=
new
char
[
j
*
2
];
int
k
=
0
;
for
(
int
i
=
0
;
i
<
j
;
i
++)
{
byte
byTemp
=
md
[
i
];
buf
[
k
++]
=
hexDigits
[
byTemp
>>>
4
&
0xf
];
buf
[
k
++]
=
hexDigits
[
byTemp
&
0xf
];
}
return
new
String
(
buf
);
}
catch
(
Exception
e
)
{
return
null
;
}
}
/**
* 截取模板长度
*/
public
static
JSONObject
buildMsgJson
(
JSONObject
jsonObject
)
{
for
(
Map
.
Entry
<
String
,
Object
>
entry
:
jsonObject
.
entrySet
())
{
if
(
entry
.
getKey
().
startsWith
(
"thing"
)
&&
entry
.
getValue
()
!=
null
)
{
String
json
=
JsonUtil
.
parseObjToJson
(
entry
.
getValue
());
JSONObject
obj
=
JSONObject
.
parseObject
(
json
);
String
str
=
obj
.
getString
(
"value"
);
if
(
str
.
length
()
>
20
)
{
obj
.
put
(
"value"
,
str
.
substring
(
0
,
17
)
+
"..."
);
entry
.
setValue
(
obj
);
}
}
if
(
entry
.
getKey
().
startsWith
(
"phrase"
)
&&
entry
.
getValue
()
!=
null
)
{
String
json
=
JsonUtil
.
parseObjToJson
(
entry
.
getValue
());
JSONObject
obj
=
JSONObject
.
parseObject
(
json
);
String
str
=
obj
.
getString
(
"value"
);
if
(
str
.
length
()
>
5
)
{
obj
.
put
(
"value"
,
str
.
substring
(
0
,
5
));
entry
.
setValue
(
obj
);
}
}
if
(
entry
.
getKey
().
startsWith
(
"character_string"
)
&&
entry
.
getValue
()
!=
null
)
{
String
json
=
JsonUtil
.
parseObjToJson
(
entry
.
getValue
());
JSONObject
obj
=
JSONObject
.
parseObject
(
json
);
String
str
=
obj
.
getString
(
"value"
);
if
(
str
.
length
()
>
32
)
{
obj
.
put
(
"value"
,
str
.
substring
(
0
,
29
)
+
"..."
);
entry
.
setValue
(
obj
);
}
}
}
return
jsonObject
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wx/WxMsgTemplete.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
controller
.
wx
;
/**
* @Author small
* @Date 2023/7/31 10:20
* @Version 1.0
*/
public
class
WxMsgTemplete
{
/**
* 审核飞手电子执照
*/
public
static
final
String
FW_CHECK_FLYER_AUTH_INFO
=
"skdKu9QngIiUq6lLZQTGNPqJXyJHI6UYCIBLAPddtDY"
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/BackUserAccountDao.java
浏览文件 @
668a70e3
...
...
@@ -54,8 +54,9 @@ public interface BackUserAccountDao {
* 禁用后台用户(原删除信息)
*
* @param id
* @param accountNo
*/
void
disableBackUserAccountDO
(
Integer
id
);
void
disableBackUserAccountDO
(
Integer
id
,
String
accountNo
);
/**
* 远程调用查询用户信息
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/CompanyAuthDao.java
浏览文件 @
668a70e3
...
...
@@ -11,6 +11,7 @@ import org.apache.ibatis.annotations.Mapper;
public
interface
CompanyAuthDao
{
/**
* 通过用户id获取企业认证信息
*
* @param userAccountId
* @return
*/
...
...
@@ -18,7 +19,10 @@ public interface CompanyAuthDao {
/**
* 添加企业认证信息
*
* @param companyAuthDO
*/
void
addCompanyAuth
(
CompanyAuthDO
companyAuthDO
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/CompanyDao.java
浏览文件 @
668a70e3
...
...
@@ -2,6 +2,8 @@ package com.mmc.iuav.user.dao;
import
com.mmc.iuav.user.entity.CompanyBackUserDO
;
import
com.mmc.iuav.user.entity.CompanyInfoDO
;
import
com.mmc.iuav.user.entity.CompanyMemberDO
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.model.qo.CompanyInfoQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -16,24 +18,28 @@ import java.util.List;
public
interface
CompanyDao
{
/**
* 添加单位
*
* @param companyInfoDO
*/
void
addCompanyInfo
(
CompanyInfoDO
companyInfoDO
);
/**
* 移除单位
*
* @param id
*/
void
removeCompanyInfo
(
Integer
id
);
/**
* 修改单位
*
* @param companyInfoDO
*/
void
updateCompanyInfo
(
CompanyInfoDO
companyInfoDO
);
/**
* 单位查询
*
* @param id
* @return
*/
...
...
@@ -41,6 +47,7 @@ public interface CompanyDao {
/**
* 单位数量查询
*
* @param param
* @return
*/
...
...
@@ -48,6 +55,7 @@ public interface CompanyDao {
/**
* 单位列表
*
* @param param
* @return
*/
...
...
@@ -55,6 +63,7 @@ public interface CompanyDao {
/**
* 通过用户ID获取单位信息
*
* @param backUserAccountId
* @return
*/
...
...
@@ -62,18 +71,21 @@ public interface CompanyDao {
/**
* 添加绑定关系
*
* @param companyBackUserDO
*/
void
addCompanyBackUser
(
CompanyBackUserDO
companyBackUserDO
);
/**
* 修改绑定关系
*
* @param companyBackUserDO
*/
void
updateCompanyBackUser
(
CompanyBackUserDO
companyBackUserDO
);
/**
* 查询单位绑定的账号数量
*
* @param id
* @return
*/
...
...
@@ -81,6 +93,7 @@ public interface CompanyDao {
/**
* 通过用户id获取单位信息
*
* @param backUserIds
* @return
*/
...
...
@@ -88,9 +101,100 @@ public interface CompanyDao {
/**
* 查询同名单位个数
*
* @param id
* @param companyName
* @return
*/
int
countCompanyNames
(
Integer
id
,
String
companyName
);
/**
* 通过单位名称查询单位信息
*
* @param companyName
* @return
*/
CompanyInfoDO
getCompanyInfoByName
(
String
companyName
);
/**
* 企业绑定的成员
*
* @param companyInfoId
* @return
*/
List
<
CompanyMemberDO
>
listCompanyMembers
(
Integer
companyInfoId
);
/**
* 绑定成员
*
* @param companyMemberDO
*/
void
addCompanyMember
(
CompanyMemberDO
companyMemberDO
);
/**
* 小程序获取绑定企业信息
*
* @param userAccountId
* @return
*/
CompanyInfoDO
getAppCompanyInfoUId
(
Integer
userAccountId
);
/**
* 获取公司绑定的后台用户id
*
* @param id
* @return
*/
CompanyBackUserDO
getCompanyBackUserByCompanyId
(
Integer
id
);
/**
* 获取绑定关系
*
* @param userAccountId
* @param companyInfoId
* @return
*/
CompanyMemberDO
getCompanyMember
(
Integer
userAccountId
,
Integer
companyInfoId
);
/**
* 解绑单位成员
*
* @param userAccountId
* @param companyInfoId
*/
void
unbindCompanyMember
(
Integer
userAccountId
,
Integer
companyInfoId
);
/**
* 修改单位管理员状态
*
* @param fromUserAccountId
* @param i
* @param companyInfoId
*/
void
updateCompanyMember
(
Integer
fromUserAccountId
,
Integer
i
,
Integer
companyInfoId
);
/**
* 公司绑定成员个数
*
* @param id
* @return
*/
int
countCompanyMembers
(
Integer
id
);
/**
* 单位成员列表-分页
*
* @param id
* @param pageNo
* @param pageSize
* @return
*/
List
<
UserAccountDO
>
listCompanyMembersPage
(
Integer
id
,
Integer
pageNo
,
Integer
pageSize
);
int
countBingingCompanyInfoByUID
(
Integer
userAccountId
);
void
unbindingAllAppUsers
(
Integer
id
);
void
unbindingAllPcUsers
(
Integer
id
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
浏览文件 @
668a70e3
...
...
@@ -3,6 +3,7 @@ package com.mmc.iuav.user.dao;
import
com.mmc.iuav.user.entity.*
;
import
com.mmc.iuav.user.model.qo.ApplyQO
;
import
com.mmc.iuav.user.model.vo.ApplyTagEditVO
;
import
com.mmc.iuav.user.model.vo.AttachmentVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -124,4 +125,16 @@ public interface CooperationDao {
void
updateWebsiteInfo
(
ApplyTagEditVO
applyTagEditVO
);
WebsiteInfoDO
getWebsiteInfoByUserApplyId
(
Integer
id
);
void
deleteApplyResource
(
Integer
id
);
void
insertApplyResource
(
List
<
AttachmentVO
>
list
);
void
updateCompanyInfo
(
UserApplyTagDO
userApplyTagDO
);
List
<
CompanyInfoDO
>
appBrandList
();
int
countUserApplyTagByUid
(
Integer
userAccountId
);
UserApplyTagDO
appBrandMessage
(
Integer
userAccountId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/RealNameAuthDao.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
dao
;
import
com.mmc.iuav.user.entity.RealNameAuthDO
;
import
com.mmc.iuav.user.model.qo.RealNameAuthQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @author: zj
* @Date: 2023/7/27 10:05
*/
@Mapper
public
interface
RealNameAuthDao
{
int
existHasBeenAuth
(
String
unionId
,
String
idNumber
);
RealNameAuthDO
getRealNameAuthByUnionId
(
String
unionId
);
RealNameAuthDO
getRealNameAuthBakByUnionId
(
String
unionId
);
void
addRealNameAuth
(
RealNameAuthDO
realNameAuthDO
);
void
updateRealNameAuth
(
RealNameAuthDO
realNameAuthDO
);
RealNameAuthDO
getRealNameAuthByUId
(
Integer
userAccountId
);
RealNameAuthDO
getRealNameAuthById
(
Integer
id
);
int
countListRealNameAuth
(
RealNameAuthQO
realNameAuthQO
);
List
<
RealNameAuthDO
>
listRealNameAuth
(
RealNameAuthQO
realNameAuthQO
);
RealNameAuthDO
userDetail
(
Integer
userAccountId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
浏览文件 @
668a70e3
...
...
@@ -157,4 +157,12 @@ public interface UserServiceDao {
* @return
*/
List
<
UserAccountDO
>
getInviteCount
(
@Param
(
"uIds"
)
List
<
Integer
>
uIds
);
/**
* 根据手机号查询用户信息
*
* @param phoneNum
* @return
*/
List
<
UserAccountDO
>
getUserAccountByPhoneNum
(
String
phoneNum
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/dronepilot/PilotCertificationDao.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
dao
.
dronepilot
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.entity.dronepilot.PilotAbilityDO
;
import
com.mmc.iuav.user.entity.dronepilot.PilotCertificationDO
;
import
com.mmc.iuav.user.entity.dronepilot.PilotCertificationLogDO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotRemarkQO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/28 9:36
* @Version 1.0
*/
@Mapper
public
interface
PilotCertificationDao
{
List
<
PilotAbilityDO
>
abilityList
();
Integer
selectRealNameAuth
(
Integer
userAccountId
);
void
insertPilot
(
PilotCertificationDO
pilotCertificationDO
);
void
insertAbility
(
List
<
PilotAbilityVO
>
list
);
void
insertPilotLog
(
PilotCertificationLogDO
pilotCertificationLog
);
Integer
selectPilotCertification
(
Integer
userAccountId
);
void
deleteAbility
(
Integer
id
);
void
updatePilot
(
PilotCertificationDO
pilotCertificationDO
);
Integer
selectPilotCount
(
Integer
id
,
Integer
userAccountId
);
List
<
PilotCertificationDO
>
pilotList
(
PilotCertificationQO
param
);
List
<
PilotAbilityVO
>
selectAbilityList
(
Integer
pilotCertificationId
);
PilotCertificationDO
detailPilot
(
Integer
id
);
void
updateRemark
(
PilotRemarkQO
param
);
void
updateAuditStatus
(
PilotAuditStatusQO
param
);
UserAccountDO
selectUserAccountId
(
PilotAuditStatusQO
param
);
List
<
PilotCertificationLogDO
>
backPilotLogList
(
PilotCertificationLogQO
param
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/BackUserAccountDO.java
浏览文件 @
668a70e3
...
...
@@ -52,7 +52,7 @@ public class BackUserAccountDO implements Serializable {
public
BackUserAccountVO
buildBackUserAccountVO
()
{
return
BackUserAccountVO
.
builder
().
id
(
this
.
id
).
uid
(
this
.
id
).
accountNo
(
this
.
accountNo
).
phoneNum
(
this
.
phoneNum
)
.
userName
(
this
.
userName
).
userSex
(
this
.
userSex
).
email
(
this
.
email
).
accountStatus
(
this
.
accountStatus
)
.
remark
(
this
.
remark
).
address
(
this
.
address
).
createTime
(
this
.
createTime
)
.
remark
(
this
.
remark
).
address
(
this
.
address
).
createTime
(
this
.
createTime
)
.
disable
(
this
.
disable
)
.
roleInfoDTO
(
this
.
roleInfoDO
==
null
?
null
:
this
.
roleInfoDO
.
buildRoleInfoDTO
()).
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/CompanyAuthDO.java
浏览文件 @
668a70e3
...
...
@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
...
...
@@ -28,6 +29,8 @@ public class CompanyAuthDO implements Serializable {
private
String
licenseImg
;
@ApiModelProperty
(
value
=
"企业认证状态,0未通过,1已通过"
)
private
Integer
authStatus
;
@ApiModelProperty
(
value
=
"企业认证id"
)
private
Integer
companyInfoId
;
public
CompanyAuthDO
(
CompanyAuthVO
companyAuthVO
)
{
this
.
userAccountId
=
companyAuthVO
.
getUserAccountId
();
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/CompanyInfoDO.java
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
;
import
com.mmc.iuav.user.model.vo.ApplyTagEditVO
;
import
com.mmc.iuav.user.model.vo.CompanyAuthVO
;
import
com.mmc.iuav.user.model.vo.CompanyInfoVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
...
...
@@ -27,10 +31,47 @@ public class CompanyInfoDO implements Serializable {
private
String
phoneNum
;
private
String
remark
;
private
Integer
backUserAccountId
;
private
Double
lat
;
private
Double
lon
;
private
String
creditCode
;
private
String
licenseImg
;
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"品牌名称"
,
example
=
"科比特"
)
private
String
brandName
;
@ApiModelProperty
(
value
=
"品牌logo"
,
example
=
"http://"
)
private
String
brandLogo
;
@ApiModelProperty
(
value
=
"服务资质信息"
,
example
=
"5星店铺"
)
private
String
content
;
@ApiModelProperty
(
value
=
"评分"
,
example
=
"*****"
)
private
Integer
score
;
private
Integer
leader
;
public
CompanyInfoDO
(
ApplyTagEditVO
applyTagEditVO
)
{
this
.
address
=
applyTagEditVO
.
getAddress
();
this
.
lon
=
applyTagEditVO
.
getLon
();
this
.
lat
=
applyTagEditVO
.
getLat
();
this
.
content
=
applyTagEditVO
.
getContent
();
this
.
score
=
applyTagEditVO
.
getScore
();
}
public
CompanyInfoVO
buildCompanyInfoVO
()
{
return
CompanyInfoVO
.
builder
().
id
(
id
).
companyType
(
companyType
).
companyName
(
companyName
).
fullName
(
fullName
).
province
(
province
)
.
city
(
city
).
district
(
district
).
address
(
address
).
companyUserName
(
companyUserName
).
phoneNum
(
phoneNum
).
remark
(
remark
).
build
();
.
brandName
(
brandName
)
.
brandLogo
(
brandLogo
)
.
userAccountId
(
userAccountId
)
.
lon
(
this
.
lon
).
lat
(
this
.
lat
).
creditCode
(
this
.
creditCode
).
licenseImg
(
this
.
licenseImg
).
leader
(
this
.
leader
)
.
city
(
city
).
district
(
district
).
address
(
address
).
companyUserName
(
companyUserName
).
phoneNum
(
phoneNum
).
remark
(
remark
)
.
content
(
this
.
getContent
())
.
score
(
this
.
getScore
())
.
build
();
}
public
CompanyAuthVO
buildCompanyAuthVO
()
{
return
CompanyAuthVO
.
builder
().
id
(
this
.
id
).
companyName
(
this
.
companyName
).
creditCode
(
this
.
creditCode
).
licenseImg
(
this
.
licenseImg
).
build
();
}
public
CompanyInfoDO
(
CompanyInfoVO
companyInfo
)
{
...
...
@@ -45,5 +86,12 @@ public class CompanyInfoDO implements Serializable {
this
.
companyUserName
=
companyInfo
.
getCompanyUserName
();
this
.
phoneNum
=
companyInfo
.
getPhoneNum
();
this
.
remark
=
companyInfo
.
getRemark
();
this
.
userAccountId
=
companyInfo
.
getUserAccountId
();
this
.
brandName
=
companyInfo
.
getBrandName
();
this
.
brandLogo
=
companyInfo
.
getBrandLogo
();
this
.
lon
=
companyInfo
.
getLon
();
this
.
lat
=
companyInfo
.
getLat
();
this
.
content
=
companyInfo
.
getContent
();
this
.
score
=
companyInfo
.
getScore
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/CompanyMemberDO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author: zj
* @Date: 2023/7/24 16:10
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
CompanyMemberDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
794726861746700741L
;
private
Integer
id
;
private
Integer
userAccountId
;
private
Integer
companyInfoId
;
private
Integer
leader
;
private
Date
createTime
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/RealNameAuthDO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDetailDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
/**
* @author: zj
* @Date: 2023/7/27 14:49
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
RealNameAuthDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1752966940978678911L
;
private
Integer
id
;
private
Integer
cuId
;
private
Integer
userAccountId
;
private
String
frontIdImg
;
private
String
backIdImg
;
private
String
idNumber
;
private
String
userName
;
private
Integer
sex
;
private
String
nationality
;
private
Date
birthday
;
private
String
address
;
private
String
issue
;
private
Date
startDate
;
private
Date
endDate
;
private
Integer
fakeFront
;
private
Integer
fakeBack
;
private
Integer
checkStatus
;
private
String
remark
;
private
Date
createTime
;
private
Date
updateTime
;
private
String
uid
;
private
String
nickName
;
private
String
resAddress
;
private
String
phoneNum
;
private
String
unionId
;
public
RealNameAuthDetailDTO
buildRealNameAuthDetailDTO
()
{
return
RealNameAuthDetailDTO
.
builder
().
id
(
this
.
id
).
userAccountId
(
this
.
userAccountId
).
frontIdImg
(
this
.
frontIdImg
)
.
backIdImg
(
this
.
backIdImg
).
idNumber
(
this
.
idNumber
).
userName
(
this
.
userName
).
checkStatus
(
this
.
checkStatus
)
.
build
();
}
public
RealNameAuthDTO
buildRealNameAuthDTO
()
{
SimpleDateFormat
cur
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
RealNameAuthDTO
.
builder
().
id
(
this
.
id
).
userAccountId
(
this
.
userAccountId
).
uid
(
this
.
id
+
""
)
.
nickName
(
this
.
nickName
).
userName
(
this
.
userName
).
phoneNum
(
this
.
phoneNum
).
idNumber
(
this
.
idNumber
)
.
resAddress
(
this
.
resAddress
).
checkStatus
(
this
.
checkStatus
)
.
createTime
((
this
.
createTime
==
null
)
?
null
:
cur
.
format
(
this
.
createTime
)).
remark
(
this
.
remark
).
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
浏览文件 @
668a70e3
...
...
@@ -46,6 +46,11 @@ public class UserAccountDO implements Serializable {
private
Integer
companyAuthStatus
;
private
String
companyName
;
private
Integer
leader
;
/**
* 实名认证状态
*/
private
Integer
realNameAuthStatus
;
/**
* 邀请人数
*/
...
...
@@ -58,6 +63,17 @@ public class UserAccountDO implements Serializable {
* 用户加盟标签
*/
private
List
<
CooperationTagDO
>
cooperationTagDOS
;
/**
* 审核用户
*/
private
String
operatorUserName
;
/**
* 飞手审核状态
*
* @param auditStatus
*/
private
Integer
auditStatus
;
public
UserAccountDO
(
UserAccountVO
userAccountVO
)
{
this
.
id
=
userAccountVO
.
getId
();
...
...
@@ -87,17 +103,20 @@ public class UserAccountDO implements Serializable {
public
UserAccountVO
buildUserAccountVO
()
{
return
UserAccountVO
.
builder
().
id
(
this
.
id
).
uid
(
this
.
id
+
""
).
phoneNum
(
this
.
phoneNum
).
userName
(
this
.
userName
).
nickName
(
this
.
nickName
).
userImg
(
this
.
userImg
)
.
userSex
(
this
.
userSex
).
email
(
this
.
email
).
source
(
this
.
source
).
accountStatus
(
this
.
accountStatus
).
remark
(
this
.
remark
).
portType
(
this
.
portType
).
createTime
(
this
.
createTime
)
.
companyAuthStatus
(
this
.
company
AuthStatus
==
null
||
this
.
companyAuthStatus
!=
1
?
0
:
1
).
companyName
(
this
.
companyName
)
.
companyAuthStatus
(
this
.
company
Name
==
null
?
0
:
1
).
companyName
(
this
.
companyName
)
.
inviteCount
(
this
.
inviteCount
)
.
cooperationTagVOS
(
CollectionUtils
.
isEmpty
(
this
.
cooperationTagDOS
)
?
null
:
this
.
cooperationTagDOS
.
stream
().
map
(
CooperationTagDO:
:
buildCooperationTagVO
).
collect
(
Collectors
.
toList
()))
.
userRcdVO
(
this
.
userRcdDO
==
null
?
null
:
this
.
userRcdDO
.
buildUserRcdVO
())
.
leader
(
this
.
leader
)
.
realNameAuthStatus
(
this
.
realNameAuthStatus
)
.
auditStatus
(
this
.
auditStatus
)
.
build
();
}
public
UserAccountSimpleDTO
buildUserAccountSimpleDTO
()
{
return
UserAccountSimpleDTO
.
builder
().
id
(
this
.
id
).
uid
(
this
.
id
+
""
).
phoneNum
(
this
.
phoneNum
).
userName
(
this
.
userName
).
nickName
(
this
.
nickName
)
.
userImg
(
this
.
userImg
).
openid
(
this
.
openId
).
userSex
(
this
.
userSex
).
email
(
this
.
email
).
source
(
this
.
source
).
accountStatus
(
this
.
accountStatus
).
portType
(
this
.
portType
)
.
companyAuthStatus
(
this
.
company
AuthStatus
==
null
||
this
.
companyAuthStatus
!=
1
?
0
:
1
).
companyName
(
this
.
companyName
)
.
companyAuthStatus
(
this
.
company
Name
==
null
?
0
:
1
).
companyName
(
this
.
companyName
)
.
build
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/UserApplyTagDO.java
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
;
import
com.mmc.iuav.user.model.vo.ApplyTagEditVO
;
import
com.mmc.iuav.user.model.vo.AttachmentVO
;
import
com.mmc.iuav.user.model.vo.UserApplyTagVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author: zj @Date: 2023/5/17 21:59
...
...
@@ -25,18 +28,16 @@ public class UserApplyTagDO implements Serializable {
private
String
remark
;
private
Date
createTime
;
private
Integer
applyStatus
;
private
String
content
;
private
Integer
score
;
/**
* 辅助字段start
*/
@ApiModelProperty
(
value
=
"申请品牌"
)
private
String
tagName
;
private
String
companyName
;
private
String
address
;
private
String
name
;
private
Double
lat
;
private
Double
lon
;
@ApiModelProperty
(
value
=
"用户认证企业"
)
private
CompanyInfoDO
companyInfoDO
;
@ApiModelProperty
(
value
=
"附件"
,
example
=
"http://"
)
private
List
<
AttachmentVO
>
attachmentList
;
/**
* 辅助字段end
...
...
@@ -52,9 +53,16 @@ public class UserApplyTagDO implements Serializable {
.
applyTime
(
createTime
)
.
approvalStatus
(
applyStatus
)
.
cooperationTagName
(
tagName
)
.
companyName
(
companyName
)
.
content
(
content
)
.
score
(
score
)
.
attachmentList
(
this
.
attachmentList
)
.
content
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getContent
())
.
score
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getScore
())
.
companyName
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getCompanyName
())
.
brandName
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getBrandName
())
.
brandLogo
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getBrandLogo
())
.
licenseImg
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getLicenseImg
())
.
address
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getAddress
())
.
lat
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getLat
())
.
lon
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getLon
())
.
build
();
}
...
...
@@ -68,9 +76,12 @@ public class UserApplyTagDO implements Serializable {
public
ApplyTagEditVO
buildApplyTagEditVO
()
{
return
ApplyTagEditVO
.
builder
().
id
(
id
)
.
cooperationTagId
(
cooperationTagId
).
name
(
name
)
.
address
(
address
).
lat
(
lat
).
lon
(
lon
)
.
content
(
content
).
score
(
score
)
.
cooperationTagId
(
cooperationTagId
).
name
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getCompanyName
())
.
address
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getAddress
())
.
lat
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getLat
())
.
lon
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getLon
())
.
content
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getContent
())
.
score
(
this
.
companyInfoDO
==
null
?
null
:
this
.
companyInfoDO
.
getScore
())
.
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/dronepilot/CertificationMessage.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
.
dronepilot
;
/**
* @Author small
* @Date 2023/7/28 10:43
* @Version 1.0
*/
public
enum
CertificationMessage
{
COMMITTED
(
0
,
"已提交电子执照认证。"
),
ALREADY_PASSED
(
1
,
"电子执照认证已通过。"
),
NOT_PASS
(
2
,
"电子执照认证不通过。"
);
private
int
code
;
private
String
message
;
private
CertificationMessage
(
int
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
this
.
code
=
code
;
}
public
String
getMessage
()
{
return
message
;
}
public
void
setMessage
(
String
message
)
{
this
.
message
=
message
;
}
public
static
CertificationMessage
match
(
int
key
)
{
CertificationMessage
result
=
null
;
for
(
CertificationMessage
s
:
values
())
{
if
(
s
.
getCode
()
==
key
)
{
result
=
s
;
break
;
}
}
return
result
;
}
public
static
CertificationMessage
catchMessage
(
String
msg
)
{
CertificationMessage
result
=
null
;
for
(
CertificationMessage
s
:
values
())
{
if
(
s
.
getMessage
().
equals
(
msg
))
{
result
=
s
;
break
;
}
}
return
result
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/dronepilot/PilotAbilityCertification.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
.
dronepilot
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author small
* @Date 2023/7/28 10:37
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
PilotAbilityCertification
{
@ApiModelProperty
(
value
=
"能力id不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
abilityId
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityName
;
@ApiModelProperty
(
value
=
"能力id不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
pilotCertificationId
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/dronepilot/PilotAbilityDO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
.
dronepilot
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotBlank
;
/**
* @Author small
* @Date 2023/7/28 10:34
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
PilotAbilityDO
{
@ApiModelProperty
(
value
=
"能力id不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力id不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
abilityId
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"航拍摄影,农业植保"
,
required
=
true
)
@NotBlank
(
message
=
"能力名称不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityName
;
public
PilotAbilityDTO
buildPilotAbilityDTO
()
{
return
PilotAbilityDTO
.
builder
()
.
abilityId
(
this
.
abilityId
)
.
abilityName
(
this
.
abilityName
)
.
build
();
}
public
PilotAbilityDO
(
PilotAbilityVO
pilotAbilityVO
)
{
this
.
abilityId
=
pilotAbilityVO
.
getAbilityId
();
this
.
abilityName
=
pilotAbilityVO
.
getAbilityName
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/dronepilot/PilotCertificationDO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
.
dronepilot
;
import
com.alibaba.fastjson2.annotation.JSONField
;
import
com.mmc.iuav.group.Create
;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.Max
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Size
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author small
* @Date 2023/7/28 9:39
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
PilotCertificationDO
{
@ApiModelProperty
(
value
=
"飞手执照id"
,
example
=
"1"
)
@NotNull
(
message
=
"飞手执照id不能为空"
,
groups
=
Update
.
class
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"执照类型 CAAC,UTC,OTHER(其他) 目前只有三种"
,
example
=
"UTC"
,
required
=
true
)
@NotNull
(
message
=
"执照类型不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseType
;
@ApiModelProperty
(
value
=
"电子执照的编号"
,
example
=
"231321312313211"
,
required
=
true
)
@NotBlank
(
message
=
"电子执照的编号不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseNumber
;
@ApiModelProperty
(
value
=
"上传执照"
,
example
=
"http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/2cbbeffb-c1d1-4b26-a9a9-9e17c85e35a9.jpg"
,
required
=
true
)
@NotBlank
(
message
=
"上传执照的照片不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
licenseUrl
;
@ApiModelProperty
(
value
=
"地区编号不能为空"
,
example
=
"100001"
,
required
=
true
)
@NotNull
(
message
=
"地区编号不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Max
(
value
=
80
,
message
=
"工作年限不能超过80年"
)
private
Integer
areaNumber
;
@ApiModelProperty
(
value
=
"常驻城市不能为空"
,
example
=
"深圳市"
,
required
=
true
)
@NotBlank
(
message
=
"常驻城市不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
residentCity
;
@ApiModelProperty
(
value
=
"工作年限"
,
example
=
"3"
,
required
=
true
)
@NotNull
(
message
=
"工作年限不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
Integer
yearsOfWorking
;
@ApiModelProperty
(
value
=
"能力"
,
required
=
true
)
@NotNull
(
message
=
"能力不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
List
<
PilotAbilityVO
>
pilotAbility
;
@ApiModelProperty
(
value
=
"能力不能为空"
,
example
=
"http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/2cbbeffb-c1d1-4b26-a9a9-9e17c85e35a9.jpg"
,
required
=
true
)
@NotBlank
(
message
=
"能力图片不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
private
String
abilityUrl
;
@ApiModelProperty
(
value
=
"个人简介"
,
example
=
"无人机专业,工作三年"
,
required
=
true
)
@NotBlank
(
message
=
"个人简介不能为空"
,
groups
=
{
Create
.
class
,
Update
.
class
})
@Size
(
max
=
300
,
message
=
"个人不能超过300"
)
private
String
individualResume
;
@ApiModelProperty
(
value
=
"备注"
,
example
=
"航拍摄影,农业植保"
,
required
=
false
)
private
String
remark
;
@ApiModelProperty
(
value
=
"审核是否通过 0审核中 1审核通过 2审核不通过"
,
example
=
"0审核中 1审核通过 2审核不通过"
,
required
=
false
)
private
Integer
auditStatus
;
@ApiModelProperty
(
value
=
"申请用户的id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
timeOfApplication
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
private
String
userName
;
private
Date
birthday
;
private
Integer
sex
;
private
Integer
age
;
/**
* 申请飞手的手机号
*/
private
String
phoneNum
;
public
PilotCertificationDO
(
PilotCertificationVO
pilotCertificationVO
,
Integer
userAccountId
)
{
this
.
id
=
pilotCertificationVO
.
getId
();
this
.
licenseType
=
pilotCertificationVO
.
getLicenseType
();
this
.
licenseNumber
=
pilotCertificationVO
.
getLicenseNumber
();
this
.
licenseUrl
=
pilotCertificationVO
.
getLicenseUrl
();
this
.
areaNumber
=
pilotCertificationVO
.
getAreaNumber
();
this
.
residentCity
=
pilotCertificationVO
.
getResidentCity
();
this
.
yearsOfWorking
=
pilotCertificationVO
.
getYearsOfWorking
();
this
.
pilotAbility
=
pilotCertificationVO
.
getPilotAbility
();
this
.
abilityUrl
=
pilotCertificationVO
.
getAbilityUrl
();
this
.
individualResume
=
pilotCertificationVO
.
getIndividualResume
();
this
.
remark
=
pilotCertificationVO
.
getRemark
();
this
.
auditStatus
=
pilotCertificationVO
.
getAuditStatus
();
this
.
userAccountId
=
userAccountId
;
}
public
PilotCertificationDTO
buildPilotCertificationDTO
()
{
return
PilotCertificationDTO
.
builder
()
.
id
(
this
.
id
)
.
licenseType
(
this
.
licenseType
)
.
licenseUrl
(
this
.
licenseUrl
)
.
licenseNumber
(
this
.
licenseNumber
)
.
areaNumber
(
this
.
areaNumber
)
.
residentCity
(
this
.
residentCity
)
.
yearsOfWorking
(
this
.
yearsOfWorking
)
.
pilotAbility
(
this
.
pilotAbility
)
.
abilityUrl
(
this
.
abilityUrl
)
.
individualResume
(
this
.
individualResume
)
.
remark
(
this
.
remark
)
.
auditStatus
(
this
.
auditStatus
)
.
userAccountId
(
this
.
userAccountId
)
.
timeOfApplication
(
this
.
timeOfApplication
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
userName
(
this
.
userName
)
.
age
(
this
.
age
)
.
sex
(
this
.
sex
)
.
phoneNum
(
this
.
getPhoneNum
())
.
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/dronepilot/PilotCertificationLogDO.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
entity
.
dronepilot
;
import
com.alibaba.fastjson2.annotation.JSONField
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationLogDTO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
/**
* @Author small
* @Date 2023/7/28 10:38
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
PilotCertificationLogDO
{
@ApiModelProperty
(
value
=
"id"
,
example
=
"1"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"审批及认证时间"
,
example
=
"1"
)
private
Date
certificationDate
;
@ApiModelProperty
(
value
=
"申请人员的id"
,
example
=
"1"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"申请及审批信息"
,
example
=
"1"
)
private
String
certificationMessage
;
@ApiModelProperty
(
value
=
"操作人员id"
,
example
=
"1"
)
private
Integer
operatorUserId
;
@ApiModelProperty
(
value
=
"申请人员的账号名称"
,
example
=
"1"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"手机号"
,
example
=
"1"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"操作人员账号"
,
example
=
"1"
)
private
String
operatorUserAccount
;
@ApiModelProperty
(
value
=
"操作人员名称"
,
example
=
"1"
)
private
String
operatorUserName
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
updateTime
;
public
PilotCertificationLogDO
(
PilotCertificationDO
pilotCertificationDO
,
CertificationMessage
certificationMessage
)
{
this
.
userAccountId
=
pilotCertificationDO
.
getUserAccountId
();
this
.
certificationMessage
=
certificationMessage
.
getMessage
();
}
public
PilotCertificationLogDO
(
Integer
userAccountId
,
Integer
operatorUserId
,
CertificationMessage
certificationMessage
)
{
this
.
userAccountId
=
userAccountId
;
this
.
operatorUserId
=
operatorUserId
;
this
.
certificationMessage
=
certificationMessage
.
getMessage
();
}
public
PilotCertificationLogDTO
buildPlotCertificationLogDTO
()
{
return
PilotCertificationLogDTO
.
builder
()
.
id
(
this
.
id
)
.
certificationDate
(
this
.
certificationDate
)
.
userAccountId
(
this
.
userAccountId
)
.
certificationMessage
(
this
.
certificationMessage
)
.
operatorUserId
(
this
.
operatorUserId
)
.
userName
(
this
.
userName
)
.
phoneNum
(
this
.
phoneNum
)
.
operatorUserAccount
(
this
.
operatorUserAccount
)
.
operatorUserName
(
this
.
operatorUserName
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/enums/CompanyTypeEnums.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
enums
;
/**
* @author: zj
* @Date: 2023/7/26 16:25
*/
public
enum
CompanyTypeEnums
{
KBT
(
0
,
"科比特"
),
FRANCHISEE
(
1
,
"加盟商"
);
private
Integer
type
;
private
String
name
;
CompanyTypeEnums
(
Integer
type
,
String
name
)
{
this
.
type
=
type
;
this
.
name
=
name
;
}
public
Integer
getType
()
{
return
type
;
}
public
String
getName
()
{
return
name
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/AuthService.java
浏览文件 @
668a70e3
...
...
@@ -12,6 +12,7 @@ import com.mmc.iuav.user.model.vo.WxLoginVO;
public
interface
AuthService
{
/**
* 小程序用户登录接口
*
* @param wxLoginVO
* @return
*/
...
...
@@ -19,6 +20,7 @@ public interface AuthService {
/**
* 后台用户登录
*
* @param param
* @return
*/
...
...
@@ -26,6 +28,7 @@ public interface AuthService {
/**
* 小程序用户登录
*
* @param unionId
* @return
*/
...
...
@@ -33,14 +36,17 @@ public interface AuthService {
/**
* 小程序确认登录
*
* @param loginSuccessDTO
* @param port
* @param randomLoginCode
* @return
*/
ResultBody
tempConfirmLogin
(
LoginSuccessDTO
loginSuccessDTO
,
String
randomLoginCode
);
ResultBody
tempConfirmLogin
(
LoginSuccessDTO
loginSuccessDTO
,
Integer
port
,
String
randomLoginCode
);
/**
* 获取用登录信息
*
* @param randomLoginCode
* @return
*/
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/BackUserAccountService.java
浏览文件 @
668a70e3
...
...
@@ -81,4 +81,12 @@ public interface BackUserAccountService {
* @return
*/
BackUserAccountDO
getUserLoginInfo
(
String
accountNo
,
String
passWord
);
/**
* 获取后台用户信息
*
* @param backUserAccountId
* @return
*/
BackUserAccountVO
getBackUserAccountById
(
Integer
backUserAccountId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/CompanyService.java
浏览文件 @
668a70e3
...
...
@@ -16,6 +16,7 @@ import java.util.List;
public
interface
CompanyService
{
/**
* 新增
*
* @param companyInfo
* @return
*/
...
...
@@ -23,6 +24,7 @@ public interface CompanyService {
/**
* 移除
*
* @param id
* @param token
* @return
...
...
@@ -31,6 +33,7 @@ public interface CompanyService {
/**
* 修改
*
* @param companyInfo
* @return
*/
...
...
@@ -38,13 +41,15 @@ public interface CompanyService {
/**
* 单位查询
*
* @param id
* @return
*/
ResultBody
getCompanyInfoById
(
Integer
id
);
ResultBody
<
CompanyInfoVO
>
getCompanyInfoById
(
Integer
id
);
/**
* 单位列表
*
* @param companyInfoQO
* @param userLoginInfoFromRedis
* @return
...
...
@@ -53,6 +58,7 @@ public interface CompanyService {
/**
* 通过用户id获取单位信息
*
* @param backUserAccountId
* @return
*/
...
...
@@ -60,12 +66,14 @@ public interface CompanyService {
/**
* 添加绑定关系
*
* @param companyBackUserDO
*/
void
addCompanyBackUser
(
CompanyBackUserDO
companyBackUserDO
);
/**
* 修改绑定关系
*
* @param companyBackUserDO
*/
void
updateCompanyBackUser
(
CompanyBackUserDO
companyBackUserDO
);
...
...
@@ -74,8 +82,84 @@ public interface CompanyService {
/**
* 通过用户id获取单位信息
*
* @param backUserIds
* @return
*/
List
<
CompanyInfoDO
>
listCompanyInfoByUID
(
List
<
Integer
>
backUserIds
);
/**
* 绑定小程序用户
*
* @param userLoginInfoFromRedis
* @param userAccountId
* @param companyInfoId
* @return
*/
ResultBody
bindingCompanyMember
(
LoginSuccessDTO
userLoginInfoFromRedis
,
Integer
userAccountId
,
Integer
companyInfoId
);
/**
* 获取小程序用户绑定企业信息
*
* @param userAccountId
* @return
*/
CompanyInfoVO
getAppCompanyInfoUId
(
Integer
userAccountId
);
/**
* 获取公司绑定后台用户
*
* @param id
* @return
*/
CompanyBackUserDO
getCompanyBackUserByCompanyId
(
Integer
id
);
/**
* 解绑成员
*
* @param userLoginInfoFromRedis
* @param userAccountId
* @param companyInfoId
* @return
*/
ResultBody
unbindCompanyMember
(
LoginSuccessDTO
userLoginInfoFromRedis
,
Integer
userAccountId
,
Integer
companyInfoId
);
/**
* 转交管理员
*
* @param userLoginInfoFromRedis
* @param fromUserAccountId
* @param toUserAccountId
* @param companyInfoId
* @return
*/
ResultBody
transferLeader
(
LoginSuccessDTO
userLoginInfoFromRedis
,
Integer
fromUserAccountId
,
Integer
toUserAccountId
,
Integer
companyInfoId
);
/**
* 成员列表
*
* @param companyInfoId
* @param userLoginInfoFromRedis
* @param pageNo
* @param pageSize
* @return
*/
ResultBody
listCompanyMembers
(
Integer
companyInfoId
,
LoginSuccessDTO
userLoginInfoFromRedis
,
Integer
pageNo
,
Integer
pageSize
);
ResultBody
<
CompanyInfoVO
>
getCompanyInfoByBUId
(
Integer
backUserAccountId
);
/**
* 查看绑定的后台账号个数
*
* @param id
* @return
*/
Integer
countCompanyBackUser
(
Integer
id
);
/**
* 解绑当前单位全部成员
*
* @param id
*/
void
unbindingAllUsers
(
Integer
id
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/CooperationService.java
浏览文件 @
668a70e3
...
...
@@ -58,4 +58,8 @@ public interface CooperationService {
ResultBody
editUserApplyTagDetails
(
Integer
id
);
PageResult
listServiceBitmapData
(
Integer
type
,
Integer
pageNo
,
Integer
pageSize
,
Double
lon
,
Double
lat
);
ResultBody
appBrandList
();
ResultBody
<
UserApplyTagVO
>
appBrandMessage
(
Integer
userAccountId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/RealNameAuthService.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
service
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.qo.RealNameAuthQO
;
import
com.mmc.iuav.user.model.vo.RealNameAuthVO
;
/**
* @author: zj
* @Date: 2023/7/27 10:07
*/
public
interface
RealNameAuthService
{
ResultBody
add
(
RealNameAuthVO
realNameAuthVO
);
ResultBody
<
RealNameAuthDTO
>
detail
(
Integer
id
);
ResultBody
listPage
(
RealNameAuthQO
realNameAuthQO
);
ResultBody
<
RealNameAuthDTO
>
userDetail
(
Integer
userAccountId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/UserAccountService.java
浏览文件 @
668a70e3
...
...
@@ -2,6 +2,7 @@ package com.mmc.iuav.user.service;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.UserAccountSimpleDTO
;
import
com.mmc.iuav.user.model.qo.UserAccountQO
;
import
com.mmc.iuav.user.model.qo.UserRcdQO
;
...
...
@@ -119,7 +120,7 @@ public interface UserAccountService {
* @param userAccountQO
* @return
*/
ResultBody
listAppUser
(
UserAccountQO
userAccountQO
);
ResultBody
listAppUser
(
UserAccountQO
userAccountQO
,
LoginSuccessDTO
loginSuccessDTO
);
/**
* 删除小程序用户
...
...
@@ -152,4 +153,12 @@ public interface UserAccountService {
* @return
*/
ResultBody
topRcd
(
Integer
topNum
);
/**
* 通过手机号查询用户信息
*
* @param phoneNum
* @return
*/
ResultBody
getUserAccountByPhoneNum
(
String
phoneNum
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/dronepilot/PilotCertificationService.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
service
.
dronepilot
;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO
;
import
com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO
;
import
com.mmc.iuav.user.model.qo.dronepilot.PilotRemarkQO
;
import
com.mmc.iuav.user.model.vo.dronepilot.PilotCertificationVO
;
/**
* @Author small
* @Date 2023/7/28 9:35
* @Version 1.0
*/
public
interface
PilotCertificationService
{
ResultBody
insertPilot
(
PilotCertificationVO
certificationVO
,
LoginSuccessDTO
userLoginInfoFromRedis
);
ResultBody
<
PilotAbilityDTO
>
abilityList
();
ResultBody
updatePilot
(
PilotCertificationVO
certificationVO
,
LoginSuccessDTO
userLoginInfoFromRedis
);
PageResult
pilotList
(
PilotCertificationQO
param
);
PilotCertificationDTO
detailPilot
(
Integer
id
);
PageResult
backListPilot
(
PilotCertificationQO
param
,
LoginSuccessDTO
userLoginInfoFromRedis
);
ResultBody
updateRemark
(
PilotRemarkQO
param
,
LoginSuccessDTO
userLoginInfoFromRedis
);
ResultBody
updateAuditStatus
(
PilotAuditStatusQO
param
,
LoginSuccessDTO
userLoginInfoFromRedis
);
PageResult
backPilotLogList
(
PilotCertificationLogQO
param
,
LoginSuccessDTO
userLoginInfoFromRedis
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/dronepilot/impl/PilotCertificationServiceImpl.java
0 → 100644
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
浏览文件 @
668a70e3
...
...
@@ -10,18 +10,13 @@ import com.mmc.iuav.user.auth.PwdUtil;
import
com.mmc.iuav.user.client.PayClient
;
import
com.mmc.iuav.user.constant.WxConstant
;
import
com.mmc.iuav.user.dao.CompanyAuthDao
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.dao.RoleDao
;
import
com.mmc.iuav.user.entity.BackUserAccountDO
;
import
com.mmc.iuav.user.entity.CompanyAuthDO
;
import
com.mmc.iuav.user.entity.RoleInfoDO
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.entity.*
;
import
com.mmc.iuav.user.enums.UserAccountStatus
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.qo.LoginUserQO
;
import
com.mmc.iuav.user.model.vo.AppUserSucVO
;
import
com.mmc.iuav.user.model.vo.CompanyInfoVO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
com.mmc.iuav.user.model.vo.WxLoginVO
;
import
com.mmc.iuav.user.model.vo.*
;
import
com.mmc.iuav.user.service.*
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -62,6 +57,9 @@ public class AuthServiceImpl implements AuthService {
private
RoleDao
roleDao
;
@Autowired
private
RealNameAuthDao
realNameAuthDao
;
@Autowired
private
CompanyService
companyService
;
@Autowired
...
...
@@ -103,18 +101,22 @@ public class AuthServiceImpl implements AuthService {
userAccountService
.
insertUserAccount
(
userAccountDO
);
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
payClient
.
createWallet
(
userAccountDO
.
getId
());
// 查询之前有没有实名过
RealNameAuthDO
nameAuthByUnionId
=
realNameAuthDao
.
getRealNameAuthBakByUnionId
(
unionId
);
if
(
nameAuthByUnionId
!=
null
)
{
nameAuthByUnionId
.
setUserAccountId
(
userAccountDO
.
getId
());
nameAuthByUnionId
.
setId
(
null
);
realNameAuthDao
.
addRealNameAuth
(
nameAuthByUnionId
);
}
}
else
{
CompanyAuthDO
companyAuthDO
=
companyAuthDao
.
getCompanyAuth
(
userAccountVO
.
getId
());
if
(
companyAuthDO
!=
null
)
{
companyAuthStatus
=
companyAuthDO
.
getAuthStatus
();
}
companyAuthStatus
=
companyAuthDO
==
null
?
0
:
1
;
}
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
JwtConstant
.
USER_ACCOUNT_ID
,
userAccountVO
.
getId
());
//map.put(JwtConstant.ROLE_ID, 0);
map
.
put
(
JwtConstant
.
TOKEN_TYPE
,
JwtConstant
.
IUAV_TOKEN
);
String
token
=
JwtUtil
.
createJwt
(
map
);
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
userAccountVO
.
getId
()
+
""
)
.
userName
(
userAccountVO
.
getUserName
()).
nickName
(
userAccountVO
.
getNickName
()).
phoneNum
(
userAccountVO
.
getPhoneNum
()).
portType
(
100
).
build
();
...
...
@@ -147,6 +149,7 @@ public class AuthServiceImpl implements AuthService {
}
// 查询单位信息
CompanyInfoVO
companyInfoVO
=
companyService
.
getCompanyInfoByBackUserAccountId
(
user
.
getId
());
companyInfoVO
.
setLeader
(
1
);
// 角色信息
RoleInfoDO
roleInfoDO
=
roleDao
.
getRoleInfoByUserId
(
user
.
getId
());
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
...
...
@@ -171,10 +174,7 @@ public class AuthServiceImpl implements AuthService {
map
.
put
(
JwtConstant
.
USER_ACCOUNT_ID
,
userAccountVO
.
getId
());
map
.
put
(
JwtConstant
.
TOKEN_TYPE
,
JwtConstant
.
IUAV_TOKEN
);
CompanyAuthDO
companyAuthDO
=
companyAuthDao
.
getCompanyAuth
(
userAccountVO
.
getId
());
Integer
companyAuthStatus
=
0
;
if
(
companyAuthDO
!=
null
)
{
companyAuthStatus
=
companyAuthDO
.
getAuthStatus
();
}
Integer
companyAuthStatus
=
companyAuthDO
==
null
?
0
:
1
;
String
token
=
JwtUtil
.
createJwt
(
map
);
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
userAccountVO
.
getId
()
+
""
)
.
userName
(
userAccountVO
.
getUserName
()).
nickName
(
userAccountVO
.
getNickName
()).
phoneNum
(
userAccountVO
.
getPhoneNum
()).
portType
(
100
).
build
();
...
...
@@ -189,10 +189,49 @@ public class AuthServiceImpl implements AuthService {
}
@Override
public
ResultBody
tempConfirmLogin
(
LoginSuccessDTO
loginSuccessDTO
,
String
randomLoginCode
)
{
stringRedisTemplate
.
opsForValue
().
set
(
randomLoginCode
,
JSONObject
.
toJSONString
(
loginSuccessDTO
),
JwtConstant
.
TEMP_EXPIRATION
,
TimeUnit
.
MILLISECONDS
);
public
ResultBody
tempConfirmLogin
(
LoginSuccessDTO
loginSuccessDTO
,
Integer
port
,
String
randomLoginCode
)
{
if
(
port
.
equals
(
1
))
{
// 返回所属公司后台账号token
CompanyInfoVO
companyInfoVO
=
companyService
.
getAppCompanyInfoUId
(
loginSuccessDTO
.
getUserAccountId
());
if
(
companyInfoVO
==
null
)
{
return
ResultBody
.
error
(
ResultEnum
.
NOT_BINDING_COMPANY_ERROR
);
}
// 查询所属单位
CompanyBackUserDO
companyBackUserDO
=
companyService
.
getCompanyBackUserByCompanyId
(
companyInfoVO
.
getId
());
if
(
companyBackUserDO
==
null
)
{
return
ResultBody
.
error
(
ResultEnum
.
NOT_BINDING_COMPANY_ERROR
);
}
BackUserAccountVO
backUserAccountVO
=
backUserAccountService
.
getBackUserAccountById
(
companyBackUserDO
.
getBackUserAccountId
());
if
(
backUserAccountVO
.
getDisable
().
equals
(
1
))
{
return
ResultBody
.
error
(
ResultEnum
.
LOGIN_ACCOUNT_NOT_EXIT_ERROR
);
}
// 设置用户角色
RoleInfoDO
roleInfoDO
=
roleDao
.
getRoleInfoByUserId
(
companyBackUserDO
.
getBackUserAccountId
());
Map
<
String
,
Object
>
map
=
new
HashMap
<
String
,
Object
>();
map
.
put
(
JwtConstant
.
USER_ACCOUNT_ID
,
backUserAccountVO
.
getId
());
map
.
put
(
JwtConstant
.
TOKEN_TYPE
,
JwtConstant
.
M_TOKEN
);
String
token
=
JwtUtil
.
createJwt
(
map
);
LoginSuccessDTO
backLoginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
userAccountId
(
backUserAccountVO
.
getId
())
.
accountNo
(
backUserAccountVO
.
getAccountNo
()).
uid
(
backUserAccountVO
.
getId
()
+
""
).
userName
(
backUserAccountVO
.
getUserName
())
.
nickName
(
backUserAccountVO
.
getUserName
()).
phoneNum
(
backUserAccountVO
.
getPhoneNum
()).
portType
(
0
).
companyInfoVO
(
companyInfoVO
==
null
?
null
:
companyInfoVO
)
.
roleInfo
(
roleInfoDO
.
buildRoleInfoDTO
()).
appUserAccountId
(
loginSuccessDTO
.
getUserAccountId
()).
token
(
token
).
build
();
// 设置后台账号token,key为randomLoginCode
stringRedisTemplate
.
opsForValue
().
set
(
randomLoginCode
,
JSONObject
.
toJSONString
(
backLoginSuccessDTO
),
JwtConstant
.
EXPIRATION
,
TimeUnit
.
MILLISECONDS
);
loginSuccessDTO
.
setToken
(
token
);
// 设置后台账号token,key为randomLoginCode
stringRedisTemplate
.
opsForValue
().
set
(
token
,
JSONObject
.
toJSONString
(
backLoginSuccessDTO
),
JwtConstant
.
EXPIRATION
,
TimeUnit
.
MILLISECONDS
);
loginSuccessDTO
.
setToken
(
token
);
}
else
{
stringRedisTemplate
.
opsForValue
().
set
(
randomLoginCode
,
JSONObject
.
toJSONString
(
loginSuccessDTO
),
JwtConstant
.
TEMP_EXPIRATION
,
TimeUnit
.
MILLISECONDS
);
}
return
ResultBody
.
success
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/BackUserAccountServiceImpl.java
浏览文件 @
668a70e3
...
...
@@ -5,20 +5,24 @@ import com.mmc.iuav.page.PageResult;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.auth.PwdUtil
;
import
com.mmc.iuav.user.client.PmsClient
;
import
com.mmc.iuav.user.dao.BackUserAccountDao
;
import
com.mmc.iuav.user.dao.RoleDao
;
import
com.mmc.iuav.user.entity.BackUserAccountDO
;
import
com.mmc.iuav.user.entity.CompanyBackUserDO
;
import
com.mmc.iuav.user.entity.CompanyInfoDO
;
import
com.mmc.iuav.user.entity.RoleInfoDO
;
import
com.mmc.iuav.user.enums.CompanyTypeEnums
;
import
com.mmc.iuav.user.enums.RoleEnums
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.qo.BUserAccountQO
;
import
com.mmc.iuav.user.model.vo.BUserAccountVO
;
import
com.mmc.iuav.user.model.vo.BackUserAccountVO
;
import
com.mmc.iuav.user.model.vo.CompanyInfoVO
;
import
com.mmc.iuav.user.service.BackUserAccountService
;
import
com.mmc.iuav.user.service.CompanyService
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang3.RandomStringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -43,6 +47,10 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
@Autowired
private
RoleDao
roleDao
;
@Autowired
private
PmsClient
pmsClient
;
@Transactional
@Override
public
ResultBody
insertBAccount
(
BUserAccountVO
bUserAccountVO
)
{
if
(!
bUserAccountVO
.
getPassWord
().
equals
(
bUserAccountVO
.
getAlertPwd
()))
{
...
...
@@ -63,6 +71,15 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
}
catch
(
NoSuchAlgorithmException
e
)
{
return
ResultBody
.
error
(
ResultEnum
.
PWD_CREATE_ERROR
);
}
ResultBody
<
CompanyInfoVO
>
companyInfoVOResultBody
=
companyService
.
getCompanyInfoById
(
bUserAccountVO
.
getCompanyId
());
CompanyInfoVO
companyInfoVO
=
companyInfoVOResultBody
.
getResult
();
if
(
companyInfoVO
!=
null
&&
companyInfoVO
.
getCompanyType
().
equals
(
CompanyTypeEnums
.
FRANCHISEE
.
getType
()))
{
// 绑定企业为加盟公司,不能生成多个账号
int
bindingCount
=
companyService
.
countCompanyBackUser
(
companyInfoVO
.
getId
());
if
(
bindingCount
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
FRANCHISEE_ACCOUNT_MORE_THAN_ONE_ERROR
);
}
}
backUserAccountDao
.
insertBackUserAccount
(
backUserAccountDO
);
// 添加角色
roleDao
.
insertUserRoleRel
(
backUserAccountDO
.
getId
(),
bUserAccountVO
.
getRoleId
());
...
...
@@ -101,6 +118,15 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
if
(
bUserAccountVO
.
getId
().
equals
(
1
)
&&
!
bUserAccountVO
.
getRoleId
().
equals
(
RoleEnums
.
ADMIN
.
getId
()))
{
return
ResultBody
.
error
(
ResultEnum
.
UPDATE_ADMIN_ROLE_ERROR
);
}
ResultBody
<
CompanyInfoVO
>
companyInfoVOResultBody
=
companyService
.
getCompanyInfoById
(
bUserAccountVO
.
getCompanyId
());
CompanyInfoVO
companyInfoVO
=
companyInfoVOResultBody
.
getResult
();
if
(
companyInfoVO
!=
null
&&
companyInfoVO
.
getCompanyType
().
equals
(
CompanyTypeEnums
.
FRANCHISEE
.
getType
()))
{
// 绑定企业为加盟公司,不能生成多个账号
int
bindingCount
=
companyService
.
countCompanyBackUser
(
companyInfoVO
.
getId
());
if
(
bindingCount
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
FRANCHISEE_ACCOUNT_MORE_THAN_ONE_ERROR
);
}
}
BackUserAccountDO
userAccountDO
=
new
BackUserAccountDO
(
bUserAccountVO
);
backUserAccountDao
.
updateBackUserAccount
(
userAccountDO
);
// 修改单位信息
...
...
@@ -116,6 +142,7 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
@Override
public
ResultBody
disableBAccount
(
Integer
accountId
,
Integer
backUserAccountId
)
{
BackUserAccountDO
backUserAccountDO
=
backUserAccountDao
.
getBackUserAccountDO
(
accountId
);
RoleInfoDO
roleInfoDO
=
roleDao
.
getRoleInfoByUserId
(
accountId
);
if
(
roleInfoDO
.
getSuperAdmin
().
equals
(
RoleEnums
.
ADMIN
.
getId
()))
{
return
ResultBody
.
error
(
ResultEnum
.
DELETE_ADMIN_ERROR
);
...
...
@@ -123,7 +150,14 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
if
(
accountId
.
toString
().
equals
(
backUserAccountId
.
toString
()))
{
return
ResultBody
.
error
(
ResultEnum
.
DELETE_YOURSELF_ERROR
);
}
backUserAccountDao
.
disableBackUserAccountDO
(
accountId
);
CompanyInfoVO
companyInfoVO
=
companyService
.
getCompanyInfoByBackUserAccountId
(
accountId
);
if
(
companyInfoVO
!=
null
&&
companyInfoVO
.
getCompanyType
().
equals
(
CompanyTypeEnums
.
FRANCHISEE
.
getType
()))
{
// 加盟企业的账号,需要把对应的成员和后台账号解绑
companyService
.
unbindingAllUsers
(
companyInfoVO
.
getId
());
}
String
accountNo
=
"DISABLE_"
+
backUserAccountDO
.
getAccountNo
()
+
RandomStringUtils
.
randomAlphanumeric
(
3
);
backUserAccountDao
.
disableBackUserAccountDO
(
accountId
,
accountNo
);
pmsClient
.
removeMallGoods
(
accountId
,
null
);
return
ResultBody
.
success
();
}
...
...
@@ -199,4 +233,16 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
BackUserAccountDO
userLoginInfo
=
backUserAccountDao
.
getUserLoginInfo
(
accountNo
,
passWord
);
return
userLoginInfo
;
}
@Override
public
BackUserAccountVO
getBackUserAccountById
(
Integer
backUserAccountId
)
{
BackUserAccountDO
backUserAccountDO
=
backUserAccountDao
.
getBackUserAccountDO
(
backUserAccountId
);
if
(
backUserAccountDO
!=
null
)
{
CompanyInfoVO
companyInfoVO
=
companyService
.
getCompanyInfoByBackUserAccountId
(
backUserAccountId
);
BackUserAccountVO
backUserAccountVO
=
backUserAccountDO
.
buildBackUserAccountVO
();
backUserAccountVO
.
setCompanyInfoVO
(
companyInfoVO
);
return
backUserAccountVO
;
}
return
null
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/CompanyAuthServiceImpl.java
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/CompanyServiceImpl.java
浏览文件 @
668a70e3
...
...
@@ -7,12 +7,17 @@ import com.mmc.iuav.user.client.PmsClient;
import
com.mmc.iuav.user.dao.CompanyDao
;
import
com.mmc.iuav.user.entity.CompanyBackUserDO
;
import
com.mmc.iuav.user.entity.CompanyInfoDO
;
import
com.mmc.iuav.user.entity.CompanyMemberDO
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.qo.CompanyInfoQO
;
import
com.mmc.iuav.user.model.vo.CompanyInfoVO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
com.mmc.iuav.user.service.CompanyService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -45,14 +50,19 @@ public class CompanyServiceImpl implements CompanyService {
public
ResultBody
removeCompanyInfo
(
Integer
id
,
String
token
)
{
// 查询绑定账号数量是否大于0
int
backAccountCount
=
companyDao
.
countCompanyBackUser
(
id
);
if
(
backAccountCount
>
0
){
if
(
backAccountCount
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
REMOVE_COMPANY_BINDING_ERROR
);
}
// 查询绑定服务数量是否大于0
Integer
taskCount
=
pmsClient
.
countCompanyTasks
(
id
,
token
);
if
(
taskCount
==
null
||
taskCount
>
0
)
{
if
(
taskCount
==
null
||
taskCount
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
REMOVE_COMPANY_TASK_ERROR
);
}
// 有绑定小程序用户则不能删除
List
<
CompanyMemberDO
>
memberDOS
=
companyDao
.
listCompanyMembers
(
id
);
if
(!
CollectionUtils
.
isEmpty
(
memberDOS
))
{
return
ResultBody
.
error
(
ResultEnum
.
REMOVE_COMPANY_BINDING_APP_ERROR
);
}
companyDao
.
removeCompanyInfo
(
id
);
return
ResultBody
.
success
();
}
...
...
@@ -69,9 +79,9 @@ public class CompanyServiceImpl implements CompanyService {
}
@Override
public
ResultBody
getCompanyInfoById
(
Integer
id
)
{
public
ResultBody
<
CompanyInfoVO
>
getCompanyInfoById
(
Integer
id
)
{
CompanyInfoDO
companyInfoDO
=
companyDao
.
getCompanyInfoById
(
id
);
if
(
companyInfoDO
!=
null
){
if
(
companyInfoDO
!=
null
)
{
return
ResultBody
.
success
(
companyInfoDO
.
buildCompanyInfoVO
());
}
return
ResultBody
.
success
();
...
...
@@ -80,11 +90,11 @@ public class CompanyServiceImpl implements CompanyService {
@Override
public
ResultBody
<
CompanyInfoVO
>
listCompanyPage
(
CompanyInfoQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
CompanyInfoDO
companyInfoDO
=
companyDao
.
getCompanyInfoByBackUserAccountId
(
loginSuccessDTO
.
getUserAccountId
());
if
(
companyInfoDO
!=
null
&&
!
companyInfoDO
.
getCompanyType
().
equals
(
0
)){
if
(
companyInfoDO
!=
null
&&
!
companyInfoDO
.
getCompanyType
().
equals
(
0
))
{
param
.
setCompanyInfoId
(
companyInfoDO
.
getId
());
}
int
count
=
companyDao
.
countListCompanyPage
(
param
);
if
(
count
==
0
){
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
));
}
Integer
pageNo
=
param
.
getPageNo
();
...
...
@@ -112,6 +122,7 @@ public class CompanyServiceImpl implements CompanyService {
public
void
updateCompanyBackUser
(
CompanyBackUserDO
companyBackUserDO
)
{
companyDao
.
updateCompanyBackUser
(
companyBackUserDO
);
}
@Override
public
List
<
CompanyInfoVO
>
listCompanyPageBack
(
CompanyInfoQO
param
)
{
Integer
pageNo
=
param
.
getPageNo
();
...
...
@@ -126,4 +137,97 @@ public class CompanyServiceImpl implements CompanyService {
List
<
CompanyInfoDO
>
companyInfoDOList
=
companyDao
.
listCompanyInfoByUID
(
backUserIds
);
return
companyInfoDOList
;
}
@Override
public
ResultBody
bindingCompanyMember
(
LoginSuccessDTO
loginSuccessDTO
,
Integer
userAccountId
,
Integer
companyInfoId
)
{
// 查看该成员是否已被绑定
int
count
=
companyDao
.
countBingingCompanyInfoByUID
(
userAccountId
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
REBINDING_COMPANY_ERROR
);
}
CompanyMemberDO
companyMemberDO
=
new
CompanyMemberDO
();
companyMemberDO
.
setUserAccountId
(
userAccountId
);
companyMemberDO
.
setCompanyInfoId
(
companyInfoId
);
companyMemberDO
.
setLeader
(
0
);
companyDao
.
addCompanyMember
(
companyMemberDO
);
return
ResultBody
.
success
();
}
@Override
public
CompanyInfoVO
getAppCompanyInfoUId
(
Integer
userAccountId
)
{
CompanyInfoDO
companyInfoDO
=
companyDao
.
getAppCompanyInfoUId
(
userAccountId
);
if
(
companyInfoDO
!=
null
)
{
return
companyInfoDO
.
buildCompanyInfoVO
();
}
return
null
;
}
@Override
public
CompanyBackUserDO
getCompanyBackUserByCompanyId
(
Integer
id
)
{
CompanyBackUserDO
companyBackUserDO
=
companyDao
.
getCompanyBackUserByCompanyId
(
id
);
return
companyBackUserDO
;
}
@Override
public
ResultBody
unbindCompanyMember
(
LoginSuccessDTO
userLoginInfoFromRedis
,
Integer
userAccountId
,
Integer
companyInfoId
)
{
CompanyMemberDO
companyMemberDO
=
companyDao
.
getCompanyMember
(
userAccountId
,
companyInfoId
);
if
(
companyMemberDO
!=
null
)
{
if
(
companyMemberDO
.
getLeader
().
equals
(
1
))
{
return
ResultBody
.
error
(
ResultEnum
.
UNBIND_COMPANY_MEMBER_ERROR
);
}
}
companyDao
.
unbindCompanyMember
(
userAccountId
,
companyInfoId
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
transferLeader
(
LoginSuccessDTO
loginSuccessDTO
,
Integer
fromUserAccountId
,
Integer
toUserAccountId
,
Integer
companyInfoId
)
{
CompanyMemberDO
companyMemberDO
=
companyDao
.
getCompanyMember
(
fromUserAccountId
,
companyInfoId
);
if
(
companyMemberDO
!=
null
)
{
if
(!
companyMemberDO
.
getLeader
().
equals
(
1
))
{
return
ResultBody
.
error
(
ResultEnum
.
TRANFER_COMPANY_MEMBER_LEADER_ERROR
);
}
}
companyDao
.
updateCompanyMember
(
fromUserAccountId
,
0
,
companyInfoId
);
companyDao
.
updateCompanyMember
(
toUserAccountId
,
1
,
companyInfoId
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
listCompanyMembers
(
Integer
companyInfoId
,
LoginSuccessDTO
loginSuccessDTO
,
Integer
pageNo
,
Integer
pageSize
)
{
int
count
=
companyDao
.
countCompanyMembers
(
companyInfoId
);
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
));
}
pageNo
=
(
pageNo
-
1
)
*
pageSize
;
List
<
UserAccountDO
>
userAccountDOS
=
companyDao
.
listCompanyMembersPage
(
companyInfoId
,
pageNo
,
pageSize
);
List
<
UserAccountVO
>
userAccountVOS
=
userAccountDOS
.
stream
().
map
(
UserAccountDO:
:
buildUserAccountVO
).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
,
userAccountVOS
));
}
@Override
public
ResultBody
<
CompanyInfoVO
>
getCompanyInfoByBUId
(
Integer
backUserAccountId
)
{
// 获取公司id
CompanyInfoDO
companyInfoDO
=
companyDao
.
getCompanyInfoByBackUserAccountId
(
backUserAccountId
);
if
(
companyInfoDO
!=
null
)
{
companyInfoDO
.
setLicenseImg
(
null
);
return
ResultBody
.
success
(
companyInfoDO
.
buildCompanyInfoVO
());
}
return
ResultBody
.
success
();
}
@Override
public
Integer
countCompanyBackUser
(
Integer
id
)
{
int
countCompanyBackUser
=
companyDao
.
countCompanyBackUser
(
id
);
return
countCompanyBackUser
;
}
@Transactional
@Override
public
void
unbindingAllUsers
(
Integer
id
)
{
// 解绑小程序成员
companyDao
.
unbindingAllAppUsers
(
id
);
// 解绑后台账号
companyDao
.
unbindingAllPcUsers
(
id
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/CooperationServiceImpl.java
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/RealNameAuthServiceImpl.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
service
.
impl
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.page.PageResult
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.entity.RealNameAuthDO
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.qo.RealNameAuthQO
;
import
com.mmc.iuav.user.model.vo.RealNameAuthVO
;
import
com.mmc.iuav.user.service.RealNameAuthService
;
import
com.mmc.iuav.user.util.RealNameAuthUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author: zj
* @Date: 2023/7/27 10:07
*/
@Service
@Slf4j
public
class
RealNameAuthServiceImpl
implements
RealNameAuthService
{
@Autowired
private
RealNameAuthDao
realNameAuthDao
;
@Override
public
ResultBody
add
(
RealNameAuthVO
realNameAuthVO
)
{
RealNameAuthDO
realNameAuthDO0
=
realNameAuthDao
.
getRealNameAuthByUId
(
realNameAuthVO
.
getUserAccountId
());
if
(
realNameAuthDO0
!=
null
&&
realNameAuthDO0
.
getCheckStatus
().
equals
(
1
))
{
return
ResultBody
.
error
(
ResultEnum
.
REAL_NAME_PASS_ERROR
);
}
// 查询是否已认证
int
count
=
realNameAuthDao
.
existHasBeenAuth
(
realNameAuthVO
.
getUnionId
(),
realNameAuthVO
.
getIdNumber
());
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
IDENTITY_HAS_BEEN_AUTHENTICATED
);
}
// 校验正面
ResultBody
faceResult
=
RealNameAuthUtil
.
deal
(
realNameAuthVO
.
getFrontIdImg
(),
"face"
);
// 校验反面
ResultBody
backResult
=
RealNameAuthUtil
.
deal
(
realNameAuthVO
.
getBackIdImg
(),
"back"
);
String
faceMsg
=
JSONObject
.
parseObject
(
faceResult
.
toString
()).
getString
(
"code"
);
String
backMsg
=
JSONObject
.
parseObject
(
backResult
.
toString
()).
getString
(
"code"
);
// 都解析通过
if
(
faceMsg
.
equals
(
"200"
)
&&
backMsg
.
equals
(
"200"
))
{
// 处理正面
JSONObject
faceResultJson
=
JSONObject
.
parseObject
(
JSONObject
.
parseObject
(
faceResult
.
toString
()).
getString
(
"result"
));
JSONObject
backResultJson
=
JSONObject
.
parseObject
(
JSONObject
.
parseObject
(
backResult
.
toString
()).
getString
(
"result"
));
// 正面解析成功的时候,拿用户输入的信息与解析的数据作对比,一致再进行下一步,不一致提醒"用户输入的信息与身份证的不一致,请重新上传"
if
(!
faceResultJson
.
getString
(
"name"
).
equals
(
realNameAuthVO
.
getUserName
())
||
!
realNameAuthVO
.
getIdNumber
().
equals
(
faceResultJson
.
getString
(
"num"
)))
{
return
ResultBody
.
error
(
ResultEnum
.
ID_INFO_AND_ID_card_MISMATCH
);
}
RealNameAuthDO
realNameAuthDO
=
new
RealNameAuthDO
();
realNameAuthDO
.
setCheckStatus
(
1
);
realNameAuthDO
.
setUserAccountId
(
realNameAuthVO
.
getUserAccountId
());
realNameAuthDO
.
setFrontIdImg
(
realNameAuthVO
.
getFrontIdImg
());
realNameAuthDO
.
setBackIdImg
(
realNameAuthVO
.
getBackIdImg
());
realNameAuthDO
.
setUserName
(
faceResultJson
.
getString
(
"name"
));
realNameAuthDO
.
setIdNumber
(
faceResultJson
.
getString
(
"num"
));
realNameAuthDO
.
setAddress
(
faceResultJson
.
getString
(
"address"
));
realNameAuthDO
.
setNationality
(
faceResultJson
.
getString
(
"nationality"
));
realNameAuthDO
.
setIssue
(
backResultJson
.
getString
(
"issue"
));
if
(
faceResultJson
.
getString
(
"sex"
).
equals
(
"男"
))
{
realNameAuthDO
.
setSex
(
1
);
}
else
if
(
faceResultJson
.
getString
(
"sex"
).
equals
(
"女"
))
{
realNameAuthDO
.
setSex
(
2
);
}
else
{
realNameAuthDO
.
setSex
(
0
);
}
if
(
faceResultJson
.
getString
(
"is_fake"
).
equals
(
false
))
{
realNameAuthDO
.
setFakeFront
(
1
);
}
else
{
realNameAuthDO
.
setFakeFront
(
0
);
}
if
(
backResultJson
.
getString
(
"is_fake"
).
equals
(
false
))
{
realNameAuthDO
.
setFakeBack
(
1
);
}
else
{
realNameAuthDO
.
setFakeBack
(
0
);
}
realNameAuthDO
.
setBirthday
(
this
.
getDate
(
faceResultJson
.
getString
(
"birth"
),
"yyyyMMdd"
));
realNameAuthDO
.
setStartDate
(
this
.
getDate
(
backResultJson
.
getString
(
"start_date"
),
"yyyyMMdd"
));
if
(
backResultJson
.
getString
(
"end_date"
).
equals
(
"长期"
))
{
realNameAuthDO
.
setEndDate
(
null
);
}
else
{
realNameAuthDO
.
setEndDate
(
this
.
getDate
(
backResultJson
.
getString
(
"end_date"
),
"yyyyMMdd"
));
}
// 记录到数据库
// 判断之前有没有认证成功
RealNameAuthDO
beforeRealNameAuthDO
=
realNameAuthDao
.
getRealNameAuthByUnionId
(
realNameAuthVO
.
getUnionId
());
if
(
beforeRealNameAuthDO
==
null
)
{
realNameAuthDao
.
addRealNameAuth
(
realNameAuthDO
);
}
else
{
Date
date
=
new
Date
();
realNameAuthDO
.
setCreateTime
(
date
);
realNameAuthDO
.
setId
(
beforeRealNameAuthDO
.
getId
());
realNameAuthDao
.
updateRealNameAuth
(
realNameAuthDO
);
}
return
ResultBody
.
success
();
}
else
{
return
ResultBody
.
error
(
ResultEnum
.
PHOTO_FORMAT_ERROR
);
}
}
@Override
public
ResultBody
<
RealNameAuthDTO
>
detail
(
Integer
id
)
{
RealNameAuthDO
realNameAuthDO
=
realNameAuthDao
.
getRealNameAuthById
(
id
);
if
(
realNameAuthDO
!=
null
)
{
return
ResultBody
.
success
(
realNameAuthDO
.
buildRealNameAuthDTO
());
}
return
ResultBody
.
success
();
}
@Override
public
ResultBody
listPage
(
RealNameAuthQO
realNameAuthQO
)
{
int
count
=
realNameAuthDao
.
countListRealNameAuth
(
realNameAuthQO
);
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
realNameAuthQO
.
getPageNo
(),
realNameAuthQO
.
getPageSize
(),
count
));
}
int
pageNo
=
realNameAuthQO
.
getPageNo
();
realNameAuthQO
.
buildCurrentPage
();
List
<
RealNameAuthDO
>
list
=
realNameAuthDao
.
listRealNameAuth
(
realNameAuthQO
);
List
<
RealNameAuthDTO
>
pageList
=
list
.
stream
().
map
(
d
->
{
return
d
.
buildRealNameAuthDTO
();
}).
collect
(
Collectors
.
toList
());
return
ResultBody
.
success
(
PageResult
.
buildPage
(
pageNo
,
realNameAuthQO
.
getPageSize
(),
count
,
pageList
));
}
@Override
public
ResultBody
<
RealNameAuthDTO
>
userDetail
(
Integer
userAccountId
)
{
RealNameAuthDO
realNameAuthDO
=
realNameAuthDao
.
userDetail
(
userAccountId
);
if
(
realNameAuthDO
!=
null
)
{
return
ResultBody
.
success
(
realNameAuthDO
.
buildRealNameAuthDTO
());
}
return
ResultBody
.
success
();
}
public
Date
getDate
(
String
str
,
String
format
)
{
Date
date
=
null
;
try
{
// 设置日期格式
SimpleDateFormat
df
=
new
SimpleDateFormat
(
format
);
// String dates=df.format(new Date());// new Date()为获取当前系统时间
date
=
df
.
parse
(
str
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
date
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/RoleServiceImpl.java
浏览文件 @
668a70e3
...
...
@@ -7,6 +7,7 @@ import com.mmc.iuav.response.ResultEnum;
import
com.mmc.iuav.user.dao.RoleDao
;
import
com.mmc.iuav.user.entity.MenuInfoDO
;
import
com.mmc.iuav.user.entity.RoleInfoDO
;
import
com.mmc.iuav.user.enums.CompanyTypeEnums
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.MenuInfoDTO
;
import
com.mmc.iuav.user.model.qo.RoleInfoQO
;
...
...
@@ -70,7 +71,11 @@ public class RoleServiceImpl implements RoleService {
}
@Override
public
PageResult
listPageRoleInfo
(
RoleInfoQO
param
,
LoginSuccessDTO
userLoginInfoFromRedis
)
{
public
PageResult
listPageRoleInfo
(
RoleInfoQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
// 加盟公司只能看自己拥有的角色
if
(!
loginSuccessDTO
.
getCompanyInfoVO
().
getCompanyType
().
equals
(
CompanyTypeEnums
.
KBT
.
getType
()))
{
param
.
setId
(
loginSuccessDTO
.
getRoleInfo
().
getId
());
}
int
count
=
roleDao
.
countPageRoleInfo
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
668a70e3
...
...
@@ -9,6 +9,8 @@ import com.mmc.iuav.user.dao.UserServiceDao;
import
com.mmc.iuav.user.entity.CooperationTagDO
;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.entity.UserRcdDO
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.RealNameAuthDTO
;
import
com.mmc.iuav.user.model.dto.UserAccountSimpleDTO
;
import
com.mmc.iuav.user.model.qo.UserAccountQO
;
import
com.mmc.iuav.user.model.qo.UserRcdQO
;
...
...
@@ -18,6 +20,7 @@ import com.mmc.iuav.user.model.vo.TopInviteVO;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
com.mmc.iuav.user.mq.MqProducer
;
import
com.mmc.iuav.user.service.CompanyAuthService
;
import
com.mmc.iuav.user.service.RealNameAuthService
;
import
com.mmc.iuav.user.service.UserAccountService
;
import
com.mmc.iuav.user.service.WxService
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -44,6 +47,9 @@ public class UserAccountServiceImpl implements UserAccountService {
private
CompanyAuthService
companyAuthService
;
@Autowired
private
RealNameAuthService
realNameAuthService
;
@Autowired
private
CooperationDao
cooperationDao
;
@Autowired
...
...
@@ -73,6 +79,11 @@ public class UserAccountServiceImpl implements UserAccountService {
return
null
;
}
UserAccountVO
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
ResultBody
<
RealNameAuthDTO
>
nameAuthDTOResultBody
=
realNameAuthService
.
userDetail
(
userAccountId
);
RealNameAuthDTO
realNameAuthDTO
=
nameAuthDTOResultBody
.
getResult
();
if
(
realNameAuthDTO
!=
null
&&
realNameAuthDTO
.
getCheckStatus
().
equals
(
1
))
{
userAccountVO
.
setRealNameAuthStatus
(
1
);
}
CompanyAuthVO
companyAuthVO
=
companyAuthService
.
getCompanyAuthByUId
(
userAccountId
);
if
(
companyAuthVO
!=
null
)
{
userAccountVO
.
setCompanyAuthStatus
(
companyAuthVO
.
getAuthStatus
());
...
...
@@ -219,7 +230,10 @@ public class UserAccountServiceImpl implements UserAccountService {
}
@Override
public
ResultBody
listAppUser
(
UserAccountQO
param
)
{
public
ResultBody
listAppUser
(
UserAccountQO
param
,
LoginSuccessDTO
loginSuccessDTO
)
{
if
(
loginSuccessDTO
.
getRoleInfo
()
!=
null
&&
!
loginSuccessDTO
.
getRoleInfo
().
getSuperAdmin
().
equals
(
1
))
{
param
.
setCompanyInfoId
(
loginSuccessDTO
.
getCompanyInfoVO
().
getId
());
}
int
count
=
userServiceDao
.
countListAppUser
(
param
);
if
(
count
==
0
)
{
return
ResultBody
.
success
(
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
));
...
...
@@ -308,5 +322,13 @@ public class UserAccountServiceImpl implements UserAccountService {
return
ResultBody
.
success
();
}
@Override
public
ResultBody
getUserAccountByPhoneNum
(
String
phoneNum
)
{
List
<
UserAccountDO
>
userAccountDOS
=
userServiceDao
.
getUserAccountByPhoneNum
(
phoneNum
);
if
(!
CollectionUtils
.
isEmpty
(
userAccountDOS
))
{
return
ResultBody
.
success
(
userAccountDOS
.
stream
().
map
(
UserAccountDO:
:
buildUserAccountVO
).
collect
(
Collectors
.
toList
()));
}
return
ResultBody
.
success
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
service
.
impl
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.github.wxpay.sdk.WXPayUtil
;
import
com.mmc.iuav.http.HttpHelper
;
import
com.mmc.iuav.http.HttpsRequestUtil
;
import
com.mmc.iuav.response.ResultBody
;
...
...
@@ -15,6 +14,7 @@ import com.mmc.iuav.user.model.vo.WxLoginVO;
import
com.mmc.iuav.user.model.vo.WxMsgVO
;
import
com.mmc.iuav.user.service.WxService
;
import
com.mmc.iuav.user.util.WxApiUtil
;
import
com.mmc.iuav.user.util.XmlToMapUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -65,7 +65,7 @@ public class WxServiceImpl implements WxService {
public
String
getAccessToken
()
{
//token有效期为7200s,需要保存起来,先从redis中获取accessToken,没有则请求获取
String
accessToken
=
stringRedisTemplate
.
opsForValue
().
get
(
WxConstant
.
IUAV_MINI_PROGRAM_ACCESS_TOKEN
);
if
(
StringUtils
.
isBlank
(
accessToken
)){
if
(
StringUtils
.
isBlank
(
accessToken
))
{
String
getAccessTokenUrl
=
"https://api.weixin.qq.com/cgi-bin/token"
+
"?grant_type=client_credential"
+
"&appid="
+
userSystemConstant
.
getWxAppId
()
+
"&secret="
+
userSystemConstant
.
getWxAppSecret
();
String
accessTokenMsg
=
HttpsRequestUtil
.
httpsGet
(
getAccessTokenUrl
,
null
);
...
...
@@ -86,7 +86,7 @@ public class WxServiceImpl implements WxService {
public
String
getStableAccessToken
()
{
//token有效期为7200s,需要保存起来,先从redis中获取accessToken,没有则请求获取
String
accessToken
=
stringRedisTemplate
.
opsForValue
().
get
(
WxConstant
.
IUAV_MINI_PROGRAM_STABLE_ACCESS_TOKEN
);
if
(
StringUtils
.
isBlank
(
accessToken
)){
if
(
StringUtils
.
isBlank
(
accessToken
))
{
Map
<
String
,
String
>
params
=
new
HashMap
<
String
,
String
>();
params
.
put
(
"grant_type"
,
"client_credential"
);
params
.
put
(
"appid"
,
userSystemConstant
.
getWxAppId
());
...
...
@@ -115,13 +115,13 @@ public class WxServiceImpl implements WxService {
public
String
getSubAccessToken
()
{
//token有效期为7200s,需要保存起来,先从redis中获取accessToken,没有则请求获取
String
accessToken
=
stringRedisTemplate
.
opsForValue
().
get
(
WxConstant
.
SHARE_FLY_SUB_ACCESS_TOKEN
);
if
(
StringUtils
.
isBlank
(
accessToken
)){
if
(
StringUtils
.
isBlank
(
accessToken
))
{
String
getAccessTokenUrl
=
"https://api.weixin.qq.com/cgi-bin/token"
+
"?grant_type=client_credential"
+
"&appid="
+
userSystemConstant
.
getWxSubAppId
()
+
"&secret="
+
userSystemConstant
.
getWxSubSecret
();
String
accessTokenMsg
=
HttpsRequestUtil
.
httpsGet
(
getAccessTokenUrl
,
null
);
JSONObject
tokenResult
=
JSONObject
.
parseObject
(
accessTokenMsg
);
if
(
accessTokenMsg
.
indexOf
(
"access_token"
)
==
-
1
)
{
log
.
info
(
"获取公众号access_token有误:{}"
,
tokenResult
);
log
.
info
(
"获取公众号access_token有误:{}"
,
tokenResult
);
return
null
;
}
accessToken
=
tokenResult
.
getString
(
"access_token"
);
...
...
@@ -177,7 +177,7 @@ public class WxServiceImpl implements WxService {
buffer
.
append
(
line
);
}
String
notifyXml
=
buffer
.
toString
();
return
WXPay
Util
.
xmlToMap
(
notifyXml
);
return
XmlToMap
Util
.
xmlToMap
(
notifyXml
);
}
private
void
updateWXUserInfo
(
String
openid
)
{
...
...
@@ -205,7 +205,7 @@ public class WxServiceImpl implements WxService {
log
.
info
(
"未订阅公众号,无法拉取信息。"
);
return
;
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
();
}
}
...
...
@@ -220,7 +220,7 @@ public class WxServiceImpl implements WxService {
String
param
=
ws
.
buildMsgJson
();
String
result
=
HttpHelper
.
httpPost
(
url
,
param
);
}
catch
(
Exception
e
)
{
log
.
error
(
"accessToken获取失败:{}"
,
e
.
getMessage
());
log
.
error
(
"accessToken获取失败:{}"
,
e
.
getMessage
());
return
ResultBody
.
error
(
ResultEnum
.
WX_ACCESS_TOKEN_ERROR
.
getResultCode
(),
ResultEnum
.
WX_ACCESS_TOKEN_ERROR
.
getResultMsg
()
+
e
.
getMessage
());
}
...
...
@@ -250,7 +250,7 @@ public class WxServiceImpl implements WxService {
@Override
public
ResultBody
sendAppletMsg
(
AppletMsgVO
appletMsgVO
)
{
String
accessToken
=
this
.
getStableAccessToken
();
if
(
StringUtils
.
isBlank
(
accessToken
)){
if
(
StringUtils
.
isBlank
(
accessToken
))
{
return
ResultBody
.
error
(
ResultEnum
.
WX_ACCESS_TOKEN_ERROR
.
getResultCode
(),
ResultEnum
.
WX_ACCESS_TOKEN_ERROR
.
getResultMsg
());
}
...
...
@@ -259,8 +259,8 @@ public class WxServiceImpl implements WxService {
appletMsgVO
.
setData
(
WxApiUtil
.
buildMsgJson
(
appletMsgVO
.
getData
()));
String
param
=
JSONObject
.
toJSONString
(
appletMsgVO
);
HttpHelper
.
httpPost
(
url
,
param
);
}
catch
(
Exception
e
){
log
.
error
(
"系统异常:{}"
,
e
.
getMessage
());
}
catch
(
Exception
e
)
{
log
.
error
(
"系统异常:{}"
,
e
.
getMessage
());
}
return
ResultBody
.
success
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/util/RealNameAuthUtil.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
util
;
import
com.alibaba.fastjson2.JSON
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.http.HttpResponse
;
import
org.apache.http.client.HttpClient
;
import
org.apache.http.client.methods.HttpPost
;
import
org.apache.http.conn.ClientConnectionManager
;
import
org.apache.http.conn.scheme.Scheme
;
import
org.apache.http.conn.scheme.SchemeRegistry
;
import
org.apache.http.conn.ssl.SSLSocketFactory
;
import
org.apache.http.entity.StringEntity
;
import
org.apache.http.impl.client.DefaultHttpClient
;
import
org.apache.http.util.EntityUtils
;
import
javax.net.ssl.SSLContext
;
import
javax.net.ssl.TrustManager
;
import
javax.net.ssl.X509TrustManager
;
import
java.io.UnsupportedEncodingException
;
import
java.net.URLEncoder
;
import
java.security.KeyManagementException
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.cert.X509Certificate
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author: zj
* @Date: 2023/7/27 14:54
*/
public
class
RealNameAuthUtil
{
public
static
ResultBody
deal
(
String
idCardUrl
,
String
side
)
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
//最后在header中的格式(中间是英文空格)为Authorization:APPCODE 83359fd73fe94948385f570e3c139105
headers
.
put
(
"Authorization"
,
"APPCODE "
+
"524b1864a88f47458c1061bae3811570"
);
//根据API的要求,定义相对应的Content-Type
headers
.
put
(
"Content-Type"
,
"application/json; charset=UTF-8"
);
Map
<
String
,
String
>
querys
=
new
HashMap
<
String
,
String
>();
//configure配置
JSONObject
configObj
=
new
JSONObject
();
configObj
.
put
(
"side"
,
side
);
String
config_str
=
configObj
.
toString
();
// 拼装请求body的json字符串
JSONObject
requestObj
=
new
JSONObject
();
requestObj
.
put
(
"image"
,
idCardUrl
);
if
(
configObj
.
size
()
>
0
)
{
requestObj
.
put
(
"configure"
,
config_str
);
}
String
bodys
=
requestObj
.
toString
();
return
PhotoMessgHandle
(
idCardUrl
,
side
,
querys
,
headers
,
bodys
);
}
//印刷文字识别
public
static
String
PRINT_HOST
=
"http://dm-51.data.aliyun.com"
;
public
static
String
PRINT_PATH
=
"/rest/160601/ocr/ocr_idcard.json"
;
//信息处理
public
static
ResultBody
PhotoMessgHandle
(
String
idCardUrl
,
String
side
,
Map
<
String
,
String
>
querys
,
Map
<
String
,
String
>
headers
,
String
bodys
)
{
JSONObject
messg
=
null
;
try
{
HttpResponse
response
=
RealNameAuthUtil
.
doPost
(
PRINT_HOST
,
PRINT_PATH
,
"POST"
,
headers
,
querys
,
bodys
);
int
stat
=
response
.
getStatusLine
().
getStatusCode
();
if
(
stat
!=
200
)
{
//输出异常信息
System
.
out
.
println
(
"Http code: "
+
stat
);
System
.
out
.
println
(
"http header error msg: "
+
response
.
getFirstHeader
(
"X-Ca-Error-Message"
));
System
.
out
.
println
(
"Http body error msg:"
+
EntityUtils
.
toString
(
response
.
getEntity
()));
return
ResultBody
.
error
(
ResultEnum
.
EXPTION_ID_CARD_THOTO_MESSAGE_ERROR
.
getResultMsg
());
}
//这是正常的情况
String
res
=
EntityUtils
.
toString
(
response
.
getEntity
());
JSONObject
res_obj
=
JSON
.
parseObject
(
res
);
res_obj
.
remove
(
"face_rect"
);
res_obj
.
remove
(
"card_region"
);
res_obj
.
remove
(
"face_rect_vertices"
);
messg
=
res_obj
;
return
ResultBody
.
success
(
res_obj
);
}
catch
(
Exception
e
)
{
return
ResultBody
.
error
(
ResultEnum
.
ID_CARD_THOTO_MESSAGE_ERROR
.
getResultMsg
());
}
}
/**
* Post String
*
* @param host
* @param path
* @param method
* @param headers
* @param querys
* @param body
* @return
* @throws Exception
*/
public
static
HttpResponse
doPost
(
String
host
,
String
path
,
String
method
,
Map
<
String
,
String
>
headers
,
Map
<
String
,
String
>
querys
,
String
body
)
throws
Exception
{
HttpClient
httpClient
=
wrapClient
(
host
);
HttpPost
request
=
new
HttpPost
(
buildUrl
(
host
,
path
,
querys
));
for
(
Map
.
Entry
<
String
,
String
>
e
:
headers
.
entrySet
())
{
request
.
addHeader
(
e
.
getKey
(),
e
.
getValue
());
}
if
(
StringUtils
.
isNotBlank
(
body
))
{
request
.
setEntity
(
new
StringEntity
(
body
,
"utf-8"
));
}
return
httpClient
.
execute
(
request
);
}
private
static
HttpClient
wrapClient
(
String
host
)
{
HttpClient
httpClient
=
new
DefaultHttpClient
();
if
(
host
.
startsWith
(
"https://"
))
{
sslClient
(
httpClient
);
}
return
httpClient
;
}
private
static
void
sslClient
(
HttpClient
httpClient
)
{
try
{
SSLContext
ctx
=
SSLContext
.
getInstance
(
"TLS"
);
X509TrustManager
tm
=
new
X509TrustManager
()
{
@Override
public
X509Certificate
[]
getAcceptedIssuers
()
{
return
null
;
}
@Override
public
void
checkClientTrusted
(
X509Certificate
[]
xcs
,
String
str
)
{
}
@Override
public
void
checkServerTrusted
(
X509Certificate
[]
xcs
,
String
str
)
{
}
};
ctx
.
init
(
null
,
new
TrustManager
[]{
tm
},
null
);
SSLSocketFactory
ssf
=
new
SSLSocketFactory
(
ctx
);
ssf
.
setHostnameVerifier
(
SSLSocketFactory
.
ALLOW_ALL_HOSTNAME_VERIFIER
);
ClientConnectionManager
ccm
=
httpClient
.
getConnectionManager
();
SchemeRegistry
registry
=
ccm
.
getSchemeRegistry
();
registry
.
register
(
new
Scheme
(
"https"
,
443
,
ssf
));
}
catch
(
KeyManagementException
ex
)
{
throw
new
RuntimeException
(
ex
);
}
catch
(
NoSuchAlgorithmException
ex
)
{
throw
new
RuntimeException
(
ex
);
}
}
private
static
String
buildUrl
(
String
host
,
String
path
,
Map
<
String
,
String
>
querys
)
throws
UnsupportedEncodingException
{
StringBuilder
sbUrl
=
new
StringBuilder
();
sbUrl
.
append
(
host
);
if
(!
StringUtils
.
isBlank
(
path
))
{
sbUrl
.
append
(
path
);
}
if
(
null
!=
querys
)
{
StringBuilder
sbQuery
=
new
StringBuilder
();
for
(
Map
.
Entry
<
String
,
String
>
query
:
querys
.
entrySet
())
{
if
(
0
<
sbQuery
.
length
())
{
sbQuery
.
append
(
"&"
);
}
if
(
StringUtils
.
isBlank
(
query
.
getKey
())
&&
!
StringUtils
.
isBlank
(
query
.
getValue
()))
{
sbQuery
.
append
(
query
.
getValue
());
}
if
(!
StringUtils
.
isBlank
(
query
.
getKey
()))
{
sbQuery
.
append
(
query
.
getKey
());
if
(!
StringUtils
.
isBlank
(
query
.
getValue
()))
{
sbQuery
.
append
(
"="
);
sbQuery
.
append
(
URLEncoder
.
encode
(
query
.
getValue
(),
"utf-8"
));
}
}
}
if
(
0
<
sbQuery
.
length
())
{
sbUrl
.
append
(
"?"
).
append
(
sbQuery
);
}
}
return
sbUrl
.
toString
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/util/SmsUtil.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
util
;
import
com.aliyun.dysmsapi20170525.models.SendSmsRequest
;
import
com.aliyun.dysmsapi20170525.models.SendSmsResponse
;
import
com.aliyun.teaopenapi.models.Config
;
import
com.google.gson.Gson
;
/**
* @author: zj
* @Date: 2023/7/25 17:00
*/
public
class
SmsUtil
{
public
static
String
ALIYUN_OSS_ACCESS_KEY_ID
=
"LTAI4FzCpyrA33PegnxWS6XV"
;
public
static
String
ALIYUN_OSS_ACCESS_KEY_SECRET
=
"ILuNh3zJfRjg3iARSipMWBKCjglz3u"
;
public
static
String
CLOUD_JOIN_WEBSITE
=
"云享飞"
;
private
static
String
ENDPOINT
=
"dysmsapi.aliyuncs.com"
;
/**
* 加盟审核通过
*/
private
static
String
COOPERATION_TEMPLATE_PASS_CODE_0
=
"SMS_461986130"
;
private
static
String
COOPERATION_TEMPLATE_PASS_CODE_2
=
"SMS_462240459"
;
/**
* 加盟审核未通过
*/
private
static
String
COOPERATION_TEMPLATE_CODE_1
=
"SMS_462095054"
;
public
static
String
sendPassCooperationApply
(
String
param
,
String
phone
)
{
return
send
(
CLOUD_JOIN_WEBSITE
,
COOPERATION_TEMPLATE_PASS_CODE_2
,
param
,
phone
);
}
public
static
String
sendNotPassCooperationApply
(
String
phone
)
{
return
send
(
CLOUD_JOIN_WEBSITE
,
COOPERATION_TEMPLATE_CODE_1
,
null
,
phone
);
}
public
static
String
send
(
String
TemplateCode
,
String
param
,
String
phone
)
{
return
send
(
CLOUD_JOIN_WEBSITE
,
TemplateCode
,
param
,
phone
);
}
public
static
String
send
(
String
signName
,
String
TemplateCode
,
String
param
,
String
phone
)
{
Config
config
=
new
Config
().
setAccessKeyId
(
ALIYUN_OSS_ACCESS_KEY_ID
).
setAccessKeySecret
(
ALIYUN_OSS_ACCESS_KEY_SECRET
);
config
.
endpoint
=
ENDPOINT
;
com
.
aliyun
.
dysmsapi20170525
.
Client
client
=
null
;
SendSmsRequest
request
=
new
SendSmsRequest
();
request
.
setPhoneNumbers
(
phone
);
request
.
setSignName
(
signName
);
request
.
setTemplateCode
(
TemplateCode
);
if
(
param
!=
null
)
{
request
.
setTemplateParam
(
param
);
}
SendSmsResponse
response
=
null
;
try
{
client
=
new
com
.
aliyun
.
dysmsapi20170525
.
Client
(
config
);
response
=
client
.
sendSms
(
request
);
}
catch
(
Exception
e
)
{
return
e
.
getMessage
();
}
return
new
Gson
().
toJson
(
response
.
body
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/util/XmlToMapUtil.java
0 → 100644
浏览文件 @
668a70e3
package
com
.
mmc
.
iuav
.
user
.
util
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Element
;
import
org.w3c.dom.Node
;
import
org.w3c.dom.NodeList
;
import
javax.xml.parsers.DocumentBuilder
;
import
javax.xml.parsers.DocumentBuilderFactory
;
import
java.io.ByteArrayInputStream
;
import
java.io.InputStream
;
import
java.util.HashMap
;
import
java.util.Map
;
/**
* @author: zj
* @Date: 2023/7/25 10:13
*/
public
class
XmlToMapUtil
{
public
static
Map
<
String
,
String
>
xmlToMap
(
String
strXML
)
throws
Exception
{
Map
<
String
,
String
>
data
=
new
HashMap
();
DocumentBuilderFactory
documentBuilderFactory
=
DocumentBuilderFactory
.
newInstance
();
DocumentBuilder
documentBuilder
=
documentBuilderFactory
.
newDocumentBuilder
();
InputStream
stream
=
new
ByteArrayInputStream
(
strXML
.
getBytes
(
"UTF-8"
));
Document
doc
=
documentBuilder
.
parse
(
stream
);
doc
.
getDocumentElement
().
normalize
();
NodeList
nodeList
=
doc
.
getDocumentElement
().
getChildNodes
();
for
(
int
idx
=
0
;
idx
<
nodeList
.
getLength
();
++
idx
)
{
Node
node
=
nodeList
.
item
(
idx
);
if
(
node
.
getNodeType
()
==
1
)
{
Element
element
=
(
Element
)
node
;
data
.
put
(
element
.
getNodeName
(),
element
.
getTextContent
());
}
}
try
{
stream
.
close
();
}
catch
(
Exception
var10
)
{
}
return
data
;
}
}
csm-service/cms-service-user/src/main/resources/application-dev.yml
浏览文件 @
668a70e3
...
...
@@ -8,34 +8,34 @@ spring:
password
:
${MYSQL_PASSWORD}
# Druid数据源配置
type
:
com.alibaba.druid.pool.DruidDataSource
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
redis
:
database
:
1
host
:
redis.default
...
...
@@ -43,7 +43,7 @@ spring:
port
:
6379
#rabbitMQ
rabbitmq
:
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.
net
.mq.amqp.aliyuncs.com
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.
vpc
.mq.amqp.aliyuncs.com
port
:
5672
username
:
MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password
:
${RABBITMQ_PASSWORD}
...
...
csm-service/cms-service-user/src/main/resources/application-prod.yml
浏览文件 @
668a70e3
...
...
@@ -8,34 +8,34 @@ spring:
password
:
${MYSQL_PASSWORD}
# Druid数据源配置
type
:
com.alibaba.druid.pool.DruidDataSource
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
# druid:
# initial-size: 10 #初始化连接池大小
# min-idle: 10 #最小大小
# max-active: 50 #最大大小
# max-wait: 60000 #获取连接时最大等待时间,单位毫秒
# time-between-eviction-runs-millis: 60000 #配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
# min-evictable-idle-time-millis: 300000 #配置一个连接在池中最小生存的时间,单位是毫秒
# validation-query: SELECT 1 FROM DUAL #用来检测连接是否有效的sql
# test-while-idle: true #申请连接的时候检测,建议配置为true,不影响性能,并且保证安全性
# testOnBorrow: false #获取连接时执行检测,建议关闭,影响性能
# testOnReturn: false #归还连接时执行检测,建议关闭,影响性能
# pool-prepared-statements: false #是否开启PSCache,PSCache对支持游标的数据库性能提升巨大,oracle建议开启,mysql下建议关闭
# filters: stat,wall #配置扩展插件,常用的插件有=>stat:监控统计 log4j:日志 wall:防御sql注入
# filter:
# wall:
# config:
# multi-statement-allow: true
# db-type: mysql
# enabled: true
# connection-properties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 #打开慢sql记录和延迟时间
# web-stat-filter:
# url-pattern: /*
# exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
# enabled: true
# stat-view-servlet:
# enabled: true
# login-username: druid
# login-password: druid
redis
:
database
:
5
host
:
redis.default
...
...
@@ -43,7 +43,7 @@ spring:
port
:
6379
#rabbitMQ
rabbitmq
:
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.
net
.mq.amqp.aliyuncs.com
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.
vpc
.mq.amqp.aliyuncs.com
port
:
5672
username
:
MjphbXFwLWNuLXp2cDJvemhuajAwMTpMVEFJNEZ6Q3B5ckEzM1BlZ254V1M2WFY=
password
:
${RABBITMQ_PASSWORD}
...
...
csm-service/cms-service-user/src/main/resources/mapper/BackUserAccountDao.xml
浏览文件 @
668a70e3
...
...
@@ -78,7 +78,7 @@
<update
id=
"disableBackUserAccountDO"
>
update back_user_account
set disable = 1
set disable = 1
, account_no = #{accountNo}
where disable = 0
and id = #{id}
</update>
...
...
csm-service/cms-service-user/src/main/resources/mapper/CompanyAuthDao.xml
浏览文件 @
668a70e3
...
...
@@ -4,28 +4,37 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.iuav.user.dao.CompanyAuthDao"
>
<!-- <resultMap id="companyAuthResultMAp" type="com.mmc.iuav.user.entity.CompanyAuthDO">-->
<!-- <id column="id" property="id"/>-->
<!-- <result property="authStatus" column="auth_status"/>-->
<!-- <result property="userAccountId" column="user_account_id"/>-->
<!-- <result property="companyName" column="company_name"/>-->
<!-- <result property="creditCode" column="credit_code"/>-->
<!-- <result property="licenseImg" column="license_img"/>-->
<!-- </resultMap>-->
<!-- <resultMap id="companyAuthResultMAp" type="com.mmc.iuav.user.entity.CompanyAuthDO">-->
<!-- <id column="id" property="id"/>-->
<!-- <result property="authStatus" column="auth_status"/>-->
<!-- <result property="userAccountId" column="user_account_id"/>-->
<!-- <result property="companyName" column="company_name"/>-->
<!-- <result property="creditCode" column="credit_code"/>-->
<!-- <result property="licenseImg" column="license_img"/>-->
<!-- </resultMap>-->
<insert
id=
"addCompanyAuth"
parameterType=
"com.mmc.iuav.user.entity.CompanyAuthDO"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into company_auth(user_account_id,
company_name,credit_code,license_img,auth_status,
create_time)
values (#{userAccountId}, #{companyName}, #{creditCode}, #{licenseImg}, #{authStatus}, NOW())
insert into company_auth(user_account_id,
company_name, credit_code, license_img, auth_status,
create_time)
values (#{userAccountId}, #{companyName}, #{creditCode}, #{licenseImg}, #{authStatus}, NOW())
</insert>
<!-- <select id="getCompanyAuth" resultMap="companyAuthResultMAp">-->
<!-- select id,user_account_id,company_name,credit_code,license_img,auth_status-->
<!-- from company_auth where user_account_id = #{userAccountId}-->
<!-- </select>-->
<!-- <select id="getCompanyAuth" resultMap="companyAuthResultMAp">-->
<!-- select id,user_account_id,company_name,credit_code,license_img,auth_status-->
<!-- from company_auth where user_account_id = #{userAccountId}-->
<!-- </select>-->
<select
id=
"getCompanyAuth"
resultType=
"com.mmc.iuav.user.entity.CompanyAuthDO"
>
select id,user_account_id,company_name,credit_code,license_img,auth_status
from company_auth where user_account_id = #{userAccountId} and is_deleted = 0
SELECT cm.id,
cm.user_account_id,
cm.company_info_id,
cm.is_leader,
cm.create_time,
ci.company_name,
ci.credit_code,
ci.license_img
FROM company_member cm
LEFT JOIN company_info ci ON ci.id = cm.company_info_id
WHERE ci.is_deleted = 0 and cm.user_account_id = #{userAccountId}
</select>
</mapper>
\ No newline at end of file
</mapper>
csm-service/cms-service-user/src/main/resources/mapper/CompanyDao.xml
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/resources/mapper/CooperationDao.xml
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/resources/mapper/RealNameAuthDao.xml
0 → 100644
浏览文件 @
668a70e3
<?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.mmc.iuav.user.dao.RealNameAuthDao"
>
<insert
id=
"addRealNameAuth"
parameterType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into real_name_auth(user_account_id, union_id, front_id_img, back_id_img, id_number, user_name, sex, nationality,
birthday, address, issue,
start_date, end_date, is_fake_front, is_fake_back, check_status, remark, create_time)
values (#{userAccountId}, #{unionId}, #{frontIdImg}, #{backIdImg}, #{idNumber}, #{userName}, #{sex}, #{nationality},
#{birthday}, #{address}, #{issue},
#{startDate}, #{endDate}, #{fakeFront}, #{fakeBack}, #{checkStatus}, #{remark}, NOW())
</insert>
<update
id=
"updateRealNameAuth"
parameterType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
>
update real_name_auth
<set>
<if
test=
" frontIdImg != null and frontIdImg != '' "
>
front_id_img = #{frontIdImg},
</if>
<if
test=
" backIdImg != null and backIdImg != '' "
>
back_id_img = #{backIdImg},
</if>
<if
test=
" idNumber != null and idNumber != '' "
>
id_number = #{idNumber},
</if>
<if
test=
" userName != null and userName != '' "
>
user_name = #{userName},
</if>
<if
test=
" sex != null "
>
sex = #{sex},
</if>
<if
test=
" nationality != null and nationality != '' "
>
nationality = #{nationality},
</if>
<if
test=
" birthday != null "
>
birthday = #{birthday},
</if>
<if
test=
" address != null and address != '' "
>
address = #{address},
</if>
<if
test=
" issue != null and issue != '' "
>
issue = #{issue},
</if>
<if
test=
" startDate != null "
>
start_date = #{startDate},
</if>
<if
test=
" fakeFront != null "
>
is_fake_front = #{fakeFront},
</if>
<if
test=
" fakeBack != null "
>
is_fake_back = #{fakeBack},
</if>
<if
test=
" checkStatus != null "
>
check_status = #{checkStatus},
</if>
<if
test=
" endDate != null "
>
end_date = #{endDate},
</if>
<if
test=
" remark != null and remark != '' "
>
remark = #{remark},
</if>
<if
test=
"createTime !=null"
>
create_time = NOW(),
</if>
</set>
where id = #{id}
</update>
<select
id=
"existHasBeenAuth"
resultType=
"java.lang.Integer"
>
select count(*) from real_name_auth where union_id
<![CDATA[<>]]>
#{unionId} and id_number = #{idNumber} and check_status = 1
</select>
<select
id=
"getRealNameAuthByUnionId"
resultType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
>
select rna.id, rna.user_account_id, rna.union_id, rna.front_id_img, rna.back_id_img, rna.id_number, rna.user_name, rna.sex, rna.nationality,
rna.birthday, rna.address, rna.issue, rna.start_date, rna.end_date, rna.is_fake_front, rna.is_fake_back, rna.check_status, rna.remark,
rna.create_time
from real_name_auth rna
where rna.union_id = #{unionId} and rna.is_deleted = 0
</select>
<select
id=
"getRealNameAuthBakByUnionId"
resultType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
>
select rna.id, rna.user_account_id, rna.union_id, rna.front_id_img, rna.back_id_img, rna.id_number, rna.user_name, rna.sex, rna.nationality,
rna.birthday, rna.address, rna.issue, rna.start_date, rna.end_date, rna.is_fake_front, rna.is_fake_back, rna.check_status, rna.remark,
rna.create_time
from real_name_auth_bak rna
where rna.union_id = #{unionId} and rna.is_deleted = 0 and rna.check_status = 1
</select>
<select
id=
"getRealNameAuthByUId"
resultType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
>
select rna.id,rna.union_id,rna.user_name,rna.id_number,rna.check_status,rna.sex
from real_name_auth rna
where rna.user_account_id = #{userAccountId} and rna.is_deleted = 0
</select>
<select
id=
"getRealNameAuthById"
resultType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
>
select rna.id, rna.user_account_id, rna.union_id, rna.front_id_img, rna.back_id_img, rna.id_number, rna.user_name, rna.sex, rna.nationality,
rna.birthday, rna.address, rna.issue, rna.start_date, rna.end_date, rna.is_fake_front, rna.is_fake_back, rna.check_status, rna.remark,
rna.create_time
from real_name_auth rna
where rna.id = #{id} and rna.is_deleted = 0
</select>
<select
id=
"countListRealNameAuth"
resultType=
"java.lang.Integer"
>
select count(*) from real_name_auth where is_deleted = 0 and check_status = 1
</select>
<select
id=
"listRealNameAuth"
resultType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
parameterType=
"com.mmc.iuav.user.model.qo.RealNameAuthQO"
>
select
rna.id,rna.user_account_id,ua.nick_name,rna.user_name,ua.phone_num,rna.check_status,rna.create_time,ua.remark
from user_account ua inner join real_name_auth rna on
ua.id=rna.user_account_id
where ua.`disable` = 0
<if
test=
"keyword != null and keyword != '' "
>
and ( ua.id like concat('%',#{keyword},'%')
or
ua.user_name like concat('%',#{keyword},'%')
or ua.phone_num like
concat('%',#{keyword},'%')
)
</if>
<if
test=
"checkStatus != null "
>
and rna.check_status = #{checkStatus}
</if>
order by rna.create_time DESC
limit #{pageNo},#{pageSize}
</select>
<select
id=
"userDetail"
resultType=
"com.mmc.iuav.user.entity.RealNameAuthDO"
>
select rna.id, rna.user_account_id, rna.union_id, rna.front_id_img, rna.back_id_img, rna.id_number, rna.user_name, rna.sex, rna.nationality,
rna.birthday, rna.address, rna.issue, rna.start_date, rna.end_date, rna.is_fake_front, rna.is_fake_back, rna.check_status, rna.remark,
rna.create_time
from real_name_auth rna
where rna.user_account_id = #{userAccountId} and rna.is_deleted = 0
</select>
</mapper>
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/mapper/RoleDao.xml
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/resources/mapper/UserServiceDao.xml
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/resources/mapper/dronepilot/PilotCertificationDao.xml
0 → 100644
浏览文件 @
668a70e3
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
668a70e3
差异被折叠。
点击展开。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
668a70e3
差异被折叠。
点击展开。
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论