Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
88abc79a
提交
88abc79a
authored
7月 31, 2023
作者:
张小凤
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PilotCertification(add)
上级
026f1ce8
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
19 个修改的文件
包含
712 行增加
和
13 行删除
+712
-13
PilotCertificationLogDTO.java
...v/user/model/dto/dronepilot/PilotCertificationLogDTO.java
+47
-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
+8
-1
PilotRemarkQO.java
.../com/mmc/iuav/user/model/qo/dronepilot/PilotRemarkQO.java
+29
-0
ResultEnum.java
...-util/src/main/java/com/mmc/iuav/response/ResultEnum.java
+4
-1
PilotCertificationController.java
...r/controller/dronepilot/PilotCertificationController.java
+52
-1
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
PilotCertificationDao.java
...m/mmc/iuav/user/dao/dronepilot/PilotCertificationDao.java
+13
-0
UserAccountDO.java
...src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
+4
-0
PilotCertificationLogDO.java
.../iuav/user/entity/dronepilot/PilotCertificationLogDO.java
+36
-0
PilotCertificationService.java
...av/user/service/dronepilot/PilotCertificationService.java
+15
-0
PilotCertificationServiceImpl.java
...ervice/dronepilot/impl/PilotCertificationServiceImpl.java
+0
-0
PilotCertificationDao.xml
...ain/resources/mapper/dronepilot/PilotCertificationDao.xml
+111
-10
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+2
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/dronepilot/PilotCertificationLogDTO.java
0 → 100644
浏览文件 @
88abc79a
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/dronepilot/PilotAuditStatusQO.java
0 → 100644
浏览文件 @
88abc79a
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
浏览文件 @
88abc79a
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
浏览文件 @
88abc79a
...
...
@@ -24,7 +24,7 @@ import java.io.Serializable;
public
class
PilotCertificationQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
3729786590325257669L
;
@ApiModelProperty
(
value
=
"飞手认证id"
,
required
=
false
)
@ApiModelProperty
(
value
=
"飞手认证id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"地区编码"
,
required
=
false
)
...
...
@@ -37,6 +37,13 @@ public class PilotCertificationQO implements Serializable {
@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
)
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/dronepilot/PilotRemarkQO.java
0 → 100644
浏览文件 @
88abc79a
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-util/src/main/java/com/mmc/iuav/response/ResultEnum.java
浏览文件 @
88abc79a
...
...
@@ -74,7 +74,10 @@ public enum ResultEnum implements BaseErrorInfoInterface {
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"
,
"不能变更其他人申请的飞手执照及电子认证"
);
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/src/main/java/com/mmc/iuav/user/controller/dronepilot/PilotCertificationController.java
浏览文件 @
88abc79a
...
...
@@ -8,7 +8,11 @@ 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.*
;
...
...
@@ -56,11 +60,58 @@ public class PilotCertificationController extends BaseController {
@ApiOperation
(
value
=
"小程序——列表————飞手执照及能力认证"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
PilotCertificationDTO
.
class
)})
@PostMapping
(
"/
detail
Pilot"
)
@PostMapping
(
"/
list
Pilot"
)
public
ResultBody
<
PilotCertificationDTO
>
pilotList
(
HttpServletRequest
request
,
@Validated
(
value
=
{
Page
.
class
})
@ApiParam
(
value
=
"飞手查询"
,
required
=
true
)
@RequestBody
PilotCertificationQO
param
)
{
return
ResultBody
.
success
(
certificationService
.
pilotList
(
param
,
this
.
getUserLoginInfoFromRedis
(
request
)));
}
@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
浏览文件 @
88abc79a
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
浏览文件 @
88abc79a
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
浏览文件 @
88abc79a
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
浏览文件 @
88abc79a
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
浏览文件 @
88abc79a
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/dronepilot/PilotCertificationDao.java
浏览文件 @
88abc79a
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
;
...
...
@@ -38,4 +42,13 @@ public interface PilotCertificationDao {
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/UserAccountDO.java
浏览文件 @
88abc79a
...
...
@@ -63,6 +63,10 @@ public class UserAccountDO implements Serializable {
* 用户加盟标签
*/
private
List
<
CooperationTagDO
>
cooperationTagDOS
;
/**
* 审核用户
*/
private
String
operatorUserName
;
public
UserAccountDO
(
UserAccountVO
userAccountVO
)
{
this
.
id
=
userAccountVO
.
getId
();
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/dronepilot/PilotCertificationLogDO.java
浏览文件 @
88abc79a
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
;
...
...
@@ -30,12 +32,46 @@ public class PilotCertificationLogDO {
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
.
operatorUserAccount
)
.
createTime
(
this
.
createTime
)
.
updateTime
(
this
.
updateTime
)
.
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/dronepilot/PilotCertificationService.java
浏览文件 @
88abc79a
...
...
@@ -4,7 +4,11 @@ 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
;
/**
...
...
@@ -22,4 +26,15 @@ public interface PilotCertificationService {
PageResult
pilotList
(
PilotCertificationQO
param
,
LoginSuccessDTO
userLoginInfoFromRedis
);
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
浏览文件 @
88abc79a
差异被折叠。
点击展开。
csm-service/cms-service-user/src/main/resources/mapper/dronepilot/PilotCertificationDao.xml
浏览文件 @
88abc79a
...
...
@@ -72,9 +72,10 @@
</insert>
<insert
id=
"insertPilotLog"
parameterType=
"com.mmc.iuav.user.entity.dronepilot.PilotCertificationLogDO"
>
insert into pilot_certification_log(certification_date, user_account_id, certification_message, create_time,
insert into pilot_certification_log(certification_date, user_account_id, operator_user_id,
certification_message, create_time,
update_time)
values (NOW(), #{userAccountId}, #{certificationMessage}, NOW(), NOW())
values (NOW(), #{userAccountId}, #{
operatorUserId}, #{
certificationMessage}, NOW(), NOW())
</insert>
<select
id=
"selectPilotCertification"
resultType=
"java.lang.Integer"
>
...
...
@@ -132,7 +133,8 @@
</select>
<select
id=
"pilotList"
resultMap=
"pilotList"
>
SELECT pc.id,
SELECT
pc.id,
pc.license_type,
pc.license_number,
pc.license_url,
...
...
@@ -149,17 +151,116 @@
pc.update_time,
rna.user_name,
rna.birthday,
rna.sex
FROM pilot_certification pc
rna.sex ,
ua.phone_num
FROM
pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
where 1=1
left join user_account ua on pc.user_account_id=ua.id
WHERE
1 =1
<if
test=
" areaNumber != null and areaNumber != '' "
>
and (pc.license_number =#{areaNumber})
and pc.area_number =#{areaNumber}
</if>
<if
test=
" id != null "
>
and pc.id =#{id}
</if>
<if
test=
" licenseType != null and licenseType != '' "
>
and (pc.license_type =#{licenseType})
and pc.license_type =#{licenseType}
</if>
<if
test=
" auditStatus != null and auditStatus != '' "
>
and pc.audit_status =#{auditStatus}
</if>
<if
test=
"accountNumber != null and accountNumber != '' "
>
and ( pc.user_account_id like concat('%',#{accountNumber},'%')
or rna.user_name like concat('%',#{accountNumber},'%')
or ua.phone_num like concat('%',#{accountNumber},'%'))
</if>
order by pc.update_time desc, pc.create_time desc
</select>
<select
id=
"detailPilot"
resultMap=
"pilotList"
>
SELECT pc.id,
pc.license_type,
pc.license_number,
pc.license_url,
pc.area_number,
pc.years_of_working,
pc.ability_url,
pc.individual_resume,
pc.audit_status,
pc.user_account_id,
pc.time_of_application,
pc.remark,
pc.resident_city,
pc.create_time,
pc.update_time,
rna.user_name,
rna.birthday,
rna.sex
FROM pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
where pc.id = #{id}
</select>
<update
id=
"updateRemark"
parameterType=
"com.mmc.iuav.user.model.qo.dronepilot.PilotRemarkQO"
>
UPDATE pilot_certification
<set>
remark = #{remark},
update_time=NOW()
</set>
where id = #{id}
</update>
<update
id=
"updateAuditStatus"
parameterType=
"com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO"
>
UPDATE pilot_certification
<set>
audit_status = #{auditStatus},
reason=#{reason},
operator_user_id=#{operatorUserId},
update_time=NOW()
</set>
where id = #{id}
</update>
<select
id=
"selectUserAccountId"
resultType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
SELECT pc.user_account_id,
ua.union_id,
ua.open_id,
bua.user_name AS operatorUserName,
rna.user_name
FROM pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
LEFT JOIN user_account ua ON ua.id = pc.user_account_id
LEFT JOIN back_user_account bua ON bua.id = pc.operator_user_id
WHERE pc.id = #{id}
</select>
<select
id=
"backPilotLogList"
resultType=
"com.mmc.iuav.user.entity.dronepilot.PilotCertificationLogDO"
>
SELECT
pcl.id,
pcl.certification_date AS certificationDate,
pcl.user_account_id AS userAccountId,
pcl.certification_message AS certificationMessage,
pcl.operator_user_id AS operatorUserId,
pcl.create_time AS createTime,
pcl.update_time AS updateTime,
rna.user_name AS userName,
ua.phone_num AS phoneNum,
nua.account_no AS operatorUserAccount,
nua.user_name AS operatorUserName
FROM
pilot_certification_log pcl
INNER JOIN user_account ua ON pcl.user_account_id = ua.id
INNER JOIN real_name_auth rna ON rna.user_account_id = ua.id
LEFT JOIN back_user_account nua ON nua.id = pcl.operator_user_id
where 1=1
<if
test=
"accountNumber != null and accountNumber != '' "
>
and ( pcl.user_account_id like concat('%',#{accountNumber},'%')
or rna.user_name like concat('%',#{accountNumber},'%')
or ua.phone_num like concat('%',#{accountNumber},'%'))
</if>
order by update_time desc, create_time desc
limit #{pageNo},#{pageSize}
order by pcl.create_time desc
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
88abc79a
...
...
@@ -24,3 +24,5 @@ data-filter:
-
/userapp/cooperation/service/bitmap
-
/userapp/cooperation/appBrandList
-
/userapp/cooperation/appBrandMessage
-
/userapp/pilot/listPilot
-
/userapp/pilot/detailPilot
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论