Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
1ec6d2c9
提交
1ec6d2c9
authored
9月 20, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
b5c68d74
736d2569
显示空白字符变更
内嵌
并排
正在显示
49 个修改的文件
包含
1029 行增加
和
49 行删除
+1029
-49
LoginSuccessDTO.java
...ain/java/com/mmc/iuav/user/model/dto/LoginSuccessDTO.java
+1
-0
UserAccountSimpleDTO.java
...ava/com/mmc/iuav/user/model/dto/UserAccountSimpleDTO.java
+7
-0
ProductReportDTO.java
...va/com/mmc/iuav/user/model/dto/data/ProductReportDTO.java
+39
-0
UserReportDTO.java
.../java/com/mmc/iuav/user/model/dto/data/UserReportDTO.java
+29
-0
UserMessageQO.java
...c/main/java/com/mmc/iuav/user/model/qo/UserMessageQO.java
+45
-0
UserAccountVO.java
...c/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
+12
-0
ActiveUserCountVO.java
...va/com/mmc/iuav/user/model/vo/data/ActiveUserCountVO.java
+21
-0
pom.xml
csm-service/cms-service-user/pom.xml
+6
-0
AuthHandler.java
...ser/src/main/java/com/mmc/iuav/user/auth/AuthHandler.java
+1
-1
PreventDuplication.java
...ain/java/com/mmc/iuav/user/config/PreventDuplication.java
+15
-0
PreventDuplicationAspect.java
...va/com/mmc/iuav/user/config/PreventDuplicationAspect.java
+97
-0
UserAccountController.java
...a/com/mmc/iuav/user/controller/UserAccountController.java
+36
-0
UserReportController.java
...m/mmc/iuav/user/controller/data/UserReportController.java
+42
-0
ContractController.java
.../com/mmc/iuav/user/controller/fdd/ContractController.java
+3
-2
PayWalletController.java
.../mmc/iuav/user/controller/wallet/PayWalletController.java
+1
-1
CooperationDao.java
...r/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
+4
-0
RealNameAuthDao.java
.../src/main/java/com/mmc/iuav/user/dao/RealNameAuthDao.java
+2
-0
UserServiceDao.java
...r/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
+23
-0
UserReportDao.java
...c/main/java/com/mmc/iuav/user/dao/data/UserReportDao.java
+13
-0
PilotCertificationDao.java
...m/mmc/iuav/user/dao/dronepilot/PilotCertificationDao.java
+2
-0
UserFddAuthDao.java
...c/main/java/com/mmc/iuav/user/dao/fdd/UserFddAuthDao.java
+4
-0
UserAccountDO.java
...src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
+19
-1
ActiveUserCountDO.java
...java/com/mmc/iuav/user/entity/data/ActiveUserCountDO.java
+31
-0
ManagerLogSchedule.java
...n/java/com/mmc/iuav/user/schedule/ManagerLogSchedule.java
+38
-0
UserAccountService.java
...in/java/com/mmc/iuav/user/service/UserAccountService.java
+7
-0
WxService.java
...er/src/main/java/com/mmc/iuav/user/service/WxService.java
+3
-0
UserReportService.java
...ava/com/mmc/iuav/user/service/data/UserReportService.java
+23
-0
UserReportServiceImpl.java
...mc/iuav/user/service/data/impl/UserReportServiceImpl.java
+95
-0
ContractService.java
...n/java/com/mmc/iuav/user/service/fdd/ContractService.java
+1
-1
ContractServiceImpl.java
...m/mmc/iuav/user/service/fdd/impl/ContractServiceImpl.java
+25
-2
SealManageServiceImpl.java
...mmc/iuav/user/service/fdd/impl/SealManageServiceImpl.java
+2
-2
UserFddAuthServiceImpl.java
...mc/iuav/user/service/fdd/impl/UserFddAuthServiceImpl.java
+15
-6
BackUserAccountServiceImpl.java
...mc/iuav/user/service/impl/BackUserAccountServiceImpl.java
+10
-0
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+69
-0
WxServiceImpl.java
...in/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
+22
-0
PayWalletServiceImpl.java
...c/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
+4
-0
SmsUtil.java
...ce-user/src/main/java/com/mmc/iuav/user/util/SmsUtil.java
+12
-0
application-dev.yml
...e/cms-service-user/src/main/resources/application-dev.yml
+1
-1
application-local.yml
...cms-service-user/src/main/resources/application-local.yml
+3
-2
application-prod.yml
.../cms-service-user/src/main/resources/application-prod.yml
+4
-4
CompanyDao.xml
...cms-service-user/src/main/resources/mapper/CompanyDao.xml
+2
-2
CooperationDao.xml
...service-user/src/main/resources/mapper/CooperationDao.xml
+20
-3
RealNameAuthDao.xml
...ervice-user/src/main/resources/mapper/RealNameAuthDao.xml
+102
-18
UserServiceDao.xml
...service-user/src/main/resources/mapper/UserServiceDao.xml
+87
-2
UserReportDao.xml
...ice-user/src/main/resources/mapper/data/UserReportDao.xml
+6
-0
PilotCertificationDao.xml
...ain/resources/mapper/dronepilot/PilotCertificationDao.xml
+5
-0
UserFddAuthDao.xml
...ice-user/src/main/resources/mapper/fdd/UserFddAuthDao.xml
+18
-0
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+1
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/LoginSuccessDTO.java
浏览文件 @
1ec6d2c9
...
...
@@ -20,6 +20,7 @@ import java.io.Serializable;
public
class
LoginSuccessDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1200834589953161925L
;
private
String
token
;
private
String
openId
;
private
Integer
userAccountId
;
private
String
accountNo
;
private
Integer
portType
;
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/UserAccountSimpleDTO.java
浏览文件 @
1ec6d2c9
...
...
@@ -8,6 +8,7 @@ import lombok.Data;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
...
...
@@ -54,4 +55,10 @@ public class UserAccountSimpleDTO implements Serializable {
private
String
tagName
;
@ApiModelProperty
(
value
=
"用户合作标签"
)
private
List
<
CooperationTagVO
>
cooperationTagVOS
;
@ApiModelProperty
(
value
=
"个人简介"
)
private
String
briefIntroduction
;
@ApiModelProperty
(
value
=
"封面背景图"
)
private
String
coverPicture
;
@ApiModelProperty
(
value
=
"地区"
)
private
String
region
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/data/ProductReportDTO.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
data
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author LW
* @date 2023/9/16 14:15
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
ProductReportDTO
{
@ApiModelProperty
(
value
=
"入驻商家总数"
)
private
Integer
joinStoreCount
;
@ApiModelProperty
(
value
=
"品牌商"
)
private
Integer
brandStore
;
@ApiModelProperty
(
value
=
"维修商"
)
private
Integer
repairStore
;
@ApiModelProperty
(
value
=
"培训机构"
)
private
Integer
trainingInstitution
;
@ApiModelProperty
(
value
=
"租赁商"
)
private
Integer
leaseStore
;
@ApiModelProperty
(
value
=
"服务商"
)
private
Integer
serviceStore
;
@ApiModelProperty
(
value
=
"销售商品"
)
private
Integer
saleProduct
;
@ApiModelProperty
(
value
=
"出租商品"
)
private
Integer
leaseProduct
;
@ApiModelProperty
(
value
=
"服务商品"
)
private
Integer
serviceProduct
;
@ApiModelProperty
(
value
=
"在线课程"
)
private
Integer
onlineCourse
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/data/UserReportDTO.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
model
.
dto
.
data
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author LW
* @date 2023/9/16 14:15
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
UserReportDTO
{
@ApiModelProperty
(
value
=
"用户数量"
)
private
Integer
userCount
;
@ApiModelProperty
(
value
=
"实名认证数量"
)
private
Integer
realNameCount
;
@ApiModelProperty
(
value
=
"飞手认证数量"
)
private
Integer
dronePilotCount
;
@ApiModelProperty
(
value
=
"昨日新增用户数量"
)
private
Integer
yesterdayAddUserCount
;
@ApiModelProperty
(
value
=
"昨日活跃用户数量"
)
private
Integer
yesterdayActiveUserCount
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/qo/UserMessageQO.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
model
.
qo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.math.BigDecimal
;
/**
* @Author small
* @Date 2023/9/14 20:03
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public
class
UserMessageQO
{
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"微信头像"
,
example
=
"http://"
)
private
String
userImg
;
@ApiModelProperty
(
value
=
"封面图片"
,
example
=
"http://"
)
private
String
coverPicture
;
@ApiModelProperty
(
value
=
"微信昵称"
,
example
=
"小红花"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"地区最下级id"
,
example
=
"130100"
)
private
String
districtChildId
;
@ApiModelProperty
(
value
=
"个人简介"
,
example
=
"航拍多年"
)
private
String
briefIntroduction
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
浏览文件 @
1ec6d2c9
...
...
@@ -10,6 +10,7 @@ import lombok.NoArgsConstructor;
import
javax.validation.constraints.Email
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
...
...
@@ -32,6 +33,8 @@ public class UserAccountVO implements Serializable {
private
String
uid
;
@ApiModelProperty
(
value
=
"手机号"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"openId"
)
private
String
openId
;
@ApiModelProperty
(
value
=
"用户名称"
)
private
String
userName
;
@ApiModelProperty
(
value
=
"用户昵称"
)
...
...
@@ -77,4 +80,13 @@ public class UserAccountVO implements Serializable {
private
Integer
xzAuthStatus
;
@ApiModelProperty
(
value
=
"是否关注公众号"
)
private
Integer
subStatus
;
@ApiModelProperty
(
value
=
"地区"
)
private
String
region
;
@ApiModelProperty
(
value
=
"个人简介"
)
private
String
briefIntroduction
;
@ApiModelProperty
(
value
=
"封面背景图"
)
private
String
coverPicture
;
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/data/ActiveUserCountVO.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
.
data
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @author:lw Date:2023/9/16
* time:11:02
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ActiveUserCountVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7301019973858223718L
;
private
Integer
activeUserCount
;
private
Date
activeDate
;
}
csm-service/cms-service-user/pom.xml
浏览文件 @
1ec6d2c9
...
...
@@ -35,6 +35,12 @@
<artifactId>
spring-boot-starter-actuator
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<!-- mybatis驱动&Druid数据源-start -->
<dependency>
<groupId>
com.alibaba
</groupId>
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/auth/AuthHandler.java
浏览文件 @
1ec6d2c9
...
...
@@ -42,7 +42,7 @@ public class AuthHandler {
map
.
put
(
JwtConstant
.
USER_ACCOUNT_ID
,
userAccountVO
.
getId
());
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
()
+
""
)
LoginSuccessDTO
loginSuccessDTO
=
LoginSuccessDTO
.
builder
().
token
(
token
).
openId
(
userAccountVO
.
getOpenId
()).
userAccountId
(
userAccountVO
.
getId
()).
uid
(
userAccountVO
.
getId
()
+
""
)
.
userName
(
userAccountVO
.
getUserName
()).
nickName
(
userAccountVO
.
getNickName
()).
phoneNum
(
userAccountVO
.
getPhoneNum
()).
portType
(
UserTypeEnums
.
APP
.
getType
()).
build
();
stringRedisTemplate
.
opsForValue
().
set
(
token
,
JSONObject
.
toJSONString
(
loginSuccessDTO
),
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/config/PreventDuplication.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
config
;
import
java.lang.annotation.*
;
/**
* @author 23214
*/
@Target
(
ElementType
.
METHOD
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
public
@interface
PreventDuplication
{
String
value
()
default
"value"
;
long
expireSeconds
()
default
10
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/config/PreventDuplicationAspect.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
config
;
import
cn.hutool.core.lang.Assert
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.response.ResultBody
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
import
org.springframework.data.redis.core.script.DigestUtils
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Method
;
import
java.util.Objects
;
import
java.util.concurrent.TimeUnit
;
/**
* @author 23214
*/
@Aspect
@Component
@Slf4j
public
class
PreventDuplicationAspect
{
@Autowired
private
RedisTemplate
redisTemplate
;
@Pointcut
(
"@annotation(com.mmc.iuav.user.config.PreventDuplication)"
)
public
void
preventDuplication
()
{
}
// 使用@Around注解定义一个环绕通知,拦截带有@PreventDuplication注解的方法
@Around
(
"preventDuplication()"
)
public
Object
before
(
ProceedingJoinPoint
joinPoint
)
{
// 获取当前请求的属性
ServletRequestAttributes
attributes
=
(
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
();
// 获取当前请求
HttpServletRequest
request
=
attributes
.
getRequest
();
// 确保请求不为空
Assert
.
notNull
(
request
,
"request cannot be null."
);
// 获取被拦截方法的签名,并转换为Method对象
Method
method
=
((
MethodSignature
)
joinPoint
.
getSignature
()).
getMethod
();
// 获取被拦截方法上的@PreventDuplication注解
PreventDuplication
annotation
=
method
.
getAnnotation
(
PreventDuplication
.
class
);
// 从请求头中获取token
String
token
=
request
.
getHeader
(
"token"
);
// 构造Redis的键,由前缀、token和方法签名组成
String
redisKey
=
"prevent_duplication_prefix"
.
concat
(
token
).
concat
(
getMethodSign
(
method
,
joinPoint
.
getArgs
()));
// 构造Redis的值,由键、注解的值和一个固定字符串组成
String
redisValue
=
redisKey
.
concat
(
annotation
.
value
()).
concat
(
"submit duplication"
);
// 检查Redis中是否已经存在该键
if
(!
redisTemplate
.
hasKey
(
redisKey
))
{
// 如果不存在,则将键值对存入Redis,并设置过期时间
redisTemplate
.
opsForValue
().
set
(
redisKey
,
redisValue
,
annotation
.
expireSeconds
(),
TimeUnit
.
SECONDS
);
try
{
// 执行被拦截的方法
return
joinPoint
.
proceed
();
}
catch
(
Throwable
throwable
)
{
// 如果执行过程中发生异常,则从Redis中删除该键值对,并抛出异常
redisTemplate
.
delete
(
redisKey
);
return
ResultBody
.
error
(
throwable
.
getMessage
());
}
}
else
{
// 如果已经存在,则返回错误信息,防止重复提交
return
ResultBody
.
error
(
"请勿重复提交"
);
}
}
// 定义一个私有方法,用于获取方法的签名,包括方法名和参数列表
private
String
getMethodSign
(
Method
method
,
Object
...
args
)
{
StringBuilder
sb
=
new
StringBuilder
(
method
.
toString
());
for
(
Object
arg
:
args
)
{
sb
.
append
(
toString
(
arg
));
}
return
DigestUtils
.
sha1DigestAsHex
(
sb
.
toString
());
}
// 定义一个私有方法,用于将参数转换为字符串
private
String
toString
(
Object
arg
)
{
if
(
Objects
.
isNull
(
arg
))
{
return
"null"
;
}
if
(
arg
instanceof
Number
)
{
return
arg
.
toString
();
}
return
JSONObject
.
toJSONString
(
arg
);
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/UserAccountController.java
浏览文件 @
1ec6d2c9
...
...
@@ -5,6 +5,7 @@ import com.mmc.iuav.group.Update;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.UserAccountSimpleDTO
;
import
com.mmc.iuav.user.model.qo.UserAccountQO
;
import
com.mmc.iuav.user.model.qo.UserMessageQO
;
import
com.mmc.iuav.user.model.qo.UserRcdQO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
com.mmc.iuav.user.service.UserAccountService
;
...
...
@@ -143,4 +144,39 @@ public class UserAccountController extends BaseController {
return
userAccountService
.
getUserAccountByPhoneNum
(
phoneNum
);
}
@ApiOperation
(
value
=
"获取修改手机获取验证码"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"getVerifyCode"
)
public
ResultBody
getVerifyCode
(
@RequestParam
(
value
=
"userAccountId"
)
Integer
userAccountId
,
@RequestParam
(
value
=
"phoneNum"
)
String
phoneNum
)
{
return
userAccountService
.
getVerifyCode
(
userAccountId
,
phoneNum
);
}
@ApiOperation
(
value
=
"修改用户手机号"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@GetMapping
(
"updatePhoneNum"
)
public
ResultBody
updatePhoneNum
(
@RequestParam
(
value
=
"userAccountId"
)
Integer
userAccountId
,
@RequestParam
(
value
=
"verifyCode"
)
String
verifyCode
)
{
return
userAccountService
.
updatePhoneNum
(
userAccountId
,
verifyCode
);
}
@ApiOperation
(
value
=
"new_修改用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"/appUpdateUser"
)
public
ResultBody
appUpdateUser
(
@RequestBody
UserMessageQO
userMessageQO
){
return
userAccountService
.
appUpdateUser
(
userMessageQO
);
}
@ApiOperation
(
value
=
"内部使用获取用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountVO
.
class
)})
@GetMapping
(
"interiorInfo"
)
public
ResultBody
<
UserAccountVO
>
interiorInfo
(
HttpServletRequest
request
,
Integer
userAccountId
)
{
return
ResultBody
.
success
(
userAccountService
.
getUserAccountById
(
userAccountId
));
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/data/UserReportController.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
controller
.
data
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.data.ProductReportDTO
;
import
com.mmc.iuav.user.model.dto.data.UserReportDTO
;
import
com.mmc.iuav.user.service.data.UserReportService
;
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
springfox.documentation.annotations.ApiIgnore
;
/**
* @Author LW
* @date 2023/9/16 11:25
* 概要:
*/
@Api
(
tags
=
"云享飞发数据看板"
)
@RequestMapping
(
"/user/report"
)
@RestController
public
class
UserReportController
{
@Autowired
private
UserReportService
userReportService
;
@ApiOperation
(
value
=
"获取用户报表数据"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserReportDTO
.
class
)})
@GetMapping
(
"/getUserReportData"
)
public
ResultBody
<
UserReportDTO
>
getUserReportData
(
@ApiParam
(
value
=
"(预留字段暂时不传值)根据时间查询(暂未实现)"
)
@RequestParam
(
required
=
false
)
String
date
)
{
return
userReportService
.
getUserReportData
(
date
);
}
@ApiOperation
(
value
=
"获取入驻商家数量"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ProductReportDTO
.
class
)})
@GetMapping
(
"/getJoinStoreNumber"
)
@ApiIgnore
public
ProductReportDTO
getJoinStoreNumber
()
{
return
userReportService
.
getJoinStoreNumber
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/fdd/ContractController.java
浏览文件 @
1ec6d2c9
...
...
@@ -54,8 +54,9 @@ public class ContractController extends BaseController {
@GetMapping
(
"/stamp"
)
public
ResultBody
stamp
(
@ApiParam
(
value
=
"合同编号"
)
@RequestParam
(
value
=
"contractId"
)
String
contractId
,
@ApiParam
(
value
=
"小程序页面跳转地址"
)
@RequestParam
(
value
=
"pages"
,
required
=
false
)
String
pages
,
HttpServletRequest
request
,
@ApiParam
(
value
=
"端口:0小程序 1后台"
)
@RequestParam
(
value
=
"port"
)
Integer
port
)
{
return
contractService
.
stamp
(
contractId
,
this
.
getUserLoginInfoFromRedis
(
request
),
pages
,
port
);
HttpServletRequest
request
,
@ApiParam
(
value
=
"端口:0小程序 1后台"
)
@RequestParam
(
value
=
"port"
)
Integer
port
,
@ApiParam
(
value
=
"认证类型"
)
@RequestParam
(
value
=
"customerId"
,
required
=
false
)
String
customerId
)
{
return
contractService
.
stamp
(
contractId
,
this
.
getUserLoginInfoFromRedis
(
request
),
pages
,
port
,
customerId
);
}
@ApiOperation
(
value
=
"异步处理手动签署信息"
)
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/wallet/PayWalletController.java
浏览文件 @
1ec6d2c9
...
...
@@ -41,7 +41,7 @@ public class PayWalletController extends BaseController {
@GetMapping
(
"getPayWalletInfo"
)
public
ResultBody
<
PayWalletDTO
>
getPayWalletInfo
(
@ApiParam
(
value
=
"用户userAccountId"
,
required
=
true
)
@RequestParam
Integer
userAccountId
)
{
return
ResultBody
.
success
(
payWalletService
.
getPayWalletInfo
(
userAccountId
)
);
return
payWalletService
.
getPayWalletInfo
(
userAccountId
);
}
@ApiOperation
(
value
=
"feign-云享金充值增加金额"
)
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
浏览文件 @
1ec6d2c9
...
...
@@ -141,4 +141,8 @@ public interface CooperationDao {
int
countListCompanyInfoByCoopId
(
Integer
coopId
);
List
<
CompanyInfoDO
>
listCompanyInfoByCoopId
(
Integer
coopId
,
Double
lon
,
Double
lat
,
Integer
pageNo
,
Integer
pageSize
);
int
getJoinStoreCount
();
int
getStoreCountByType
(
int
type
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/RealNameAuthDao.java
浏览文件 @
1ec6d2c9
...
...
@@ -33,4 +33,6 @@ public interface RealNameAuthDao {
RealNameAuthDO
userDetail
(
Integer
userAccountId
);
void
updateRealNameAuthRemark
(
Integer
id
,
String
remark
);
int
getRealNameAuthCount
();
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
浏览文件 @
1ec6d2c9
...
...
@@ -2,8 +2,10 @@ package com.mmc.iuav.user.dao;
import
com.mmc.iuav.user.entity.UserAccountDO
;
import
com.mmc.iuav.user.entity.UserRcdDO
;
import
com.mmc.iuav.user.entity.data.ActiveUserCountDO
;
import
com.mmc.iuav.user.entity.fdd.UserFddDO
;
import
com.mmc.iuav.user.model.qo.UserAccountQO
;
import
com.mmc.iuav.user.model.qo.UserMessageQO
;
import
com.mmc.iuav.user.model.qo.UserRcdQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -170,4 +172,25 @@ public interface UserServiceDao {
UserAccountDO
getUserAccountInfoByOpenId
(
String
openid
);
List
<
UserFddDO
>
listUserFddInfo
(
@Param
(
value
=
"unionId"
)
String
unionId
,
@Param
(
value
=
"openid"
)
String
openid
);
int
getUsableUserCount
();
int
getYesterdayAddUserCount
();
void
insertActiveUserCount
(
ActiveUserCountDO
activeUserCountDO
);
ActiveUserCountDO
getActiveUserCountByDayNum
();
Integer
countPhoneNum
(
String
phoneNum
);
int
countPhoneNums
(
String
phoneNum
,
Integer
userAccountId
);
void
updateAccountPhone
(
Integer
userAccountId
,
String
phoneNum
);
void
appUpdateUser
(
UserMessageQO
userMessageQO
);
int
selectUserAccount
(
UserMessageQO
userMessageQO
);
String
getDistrictChild
(
Integer
districtChildId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/data/UserReportDao.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
dao
.
data
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @Author LW
* @date 2023/9/16 11:25
* 概要:
*/
@Mapper
public
interface
UserReportDao
{
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/dronepilot/PilotCertificationDao.java
浏览文件 @
1ec6d2c9
...
...
@@ -63,4 +63,6 @@ public interface PilotCertificationDao {
int
selectFirstApprove
(
Integer
id
);
int
getDronePilotCount
();
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/fdd/UserFddAuthDao.java
浏览文件 @
1ec6d2c9
...
...
@@ -23,6 +23,10 @@ public interface UserFddAuthDao {
UserFddDO
getAppUserFddInfo
(
String
unionId
);
void
updatePersonCertStatus
(
String
customerId
,
String
status
);
UserFddDO
getAppUserFddInfoByCustomerId
(
String
customerId
);
// void insertAppUserFdd(UserFddDO appUserFddDO1);
//
// AppEVerifyInfoDO getCompanyVerifyUrl(String customerId);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
浏览文件 @
1ec6d2c9
...
...
@@ -4,12 +4,14 @@ import com.mmc.iuav.user.model.dto.UserAccountSimpleDTO;
import
com.mmc.iuav.user.model.vo.BUserAccountVO
;
import
com.mmc.iuav.user.model.vo.TopInviteVO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.util.CollectionUtils
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -79,6 +81,16 @@ public class UserAccountDO implements Serializable {
private
Integer
totalPoints
;
@ApiModelProperty
(
value
=
"地区"
)
private
String
region
;
@ApiModelProperty
(
value
=
"个人简介"
)
private
String
briefIntroduction
;
@ApiModelProperty
(
value
=
"封面背景图"
)
private
String
coverPicture
;
@ApiModelProperty
(
value
=
"地区id"
)
private
Integer
districtChildId
;
public
UserAccountDO
(
UserAccountVO
userAccountVO
)
{
this
.
id
=
userAccountVO
.
getId
();
this
.
phoneNum
=
userAccountVO
.
getPhoneNum
();
...
...
@@ -105,7 +117,7 @@ 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
)
return
UserAccountVO
.
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
).
remark
(
this
.
remark
).
portType
(
this
.
portType
).
createTime
(
this
.
createTime
)
.
companyAuthStatus
(
this
.
companyName
==
null
?
0
:
1
).
companyName
(
this
.
companyName
)
.
inviteCount
(
this
.
inviteCount
)
...
...
@@ -116,6 +128,9 @@ public class UserAccountDO implements Serializable {
.
xzAuthStatus
(
this
.
xzAuthStatus
)
.
auditStatus
(
this
.
auditStatus
)
.
totalPoints
(
this
.
totalPoints
)
.
region
(
this
.
region
)
.
briefIntroduction
(
this
.
briefIntroduction
)
.
coverPicture
(
this
.
coverPicture
)
.
build
();
}
...
...
@@ -123,6 +138,9 @@ public class UserAccountDO implements Serializable {
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
.
companyName
==
null
?
0
:
1
).
companyName
(
this
.
companyName
)
.
region
(
this
.
region
)
.
briefIntroduction
(
this
.
briefIntroduction
)
.
coverPicture
(
this
.
coverPicture
)
.
build
();
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/data/ActiveUserCountDO.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
entity
.
data
;
import
com.mmc.iuav.user.model.vo.data.ActiveUserCountVO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* author:zhenjie
* Date:2022/2/14
* time:10:16
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
ActiveUserCountDO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
6791205305246052945L
;
private
Integer
id
;
private
Integer
dayNum
;
private
Integer
activeUserCount
;
private
Date
activeDate
;
private
Date
createTime
;
public
ActiveUserCountDO
(
ActiveUserCountVO
param
)
{
this
.
activeDate
=
param
.
getActiveDate
();
this
.
activeUserCount
=
param
.
getActiveUserCount
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/schedule/ManagerLogSchedule.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
schedule
;
import
com.mmc.iuav.user.model.vo.data.ActiveUserCountVO
;
import
com.mmc.iuav.user.service.data.UserReportService
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Calendar
;
/**
* @author lw
*/
@Component
@ConditionalOnProperty
(
prefix
=
"scheduling"
,
name
=
"enabled"
,
havingValue
=
"true"
)
public
class
ManagerLogSchedule
{
@Resource
UserReportService
userReportService
;
/**
* 统计日活量
*/
@Scheduled
(
cron
=
"0 0 10 * * ?"
)
public
void
calculateActiveUserCount
()
{
Integer
userActiveCount
=
userReportService
.
getUserActiveCount
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
//记录到数据库
ActiveUserCountVO
yxfActiveUserCountVO
=
new
ActiveUserCountVO
();
yxfActiveUserCountVO
.
setActiveDate
(
calendar
.
getTime
());
yxfActiveUserCountVO
.
setActiveUserCount
(
userActiveCount
);
userReportService
.
insertActiveUserCount
(
yxfActiveUserCountVO
);
}
}
\ No newline at end of file
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/UserAccountService.java
浏览文件 @
1ec6d2c9
...
...
@@ -5,6 +5,7 @@ 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.UserMessageQO
;
import
com.mmc.iuav.user.model.qo.UserRcdQO
;
import
com.mmc.iuav.user.model.vo.UserAccountVO
;
...
...
@@ -161,4 +162,10 @@ public interface UserAccountService {
* @return
*/
ResultBody
getUserAccountByPhoneNum
(
String
phoneNum
);
ResultBody
getVerifyCode
(
Integer
userAccountId
,
String
phoneNum
);
ResultBody
updatePhoneNum
(
Integer
userAccountId
,
String
verifyCode
);
ResultBody
appUpdateUser
(
UserMessageQO
userMessageQO
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/WxService.java
浏览文件 @
1ec6d2c9
...
...
@@ -108,4 +108,7 @@ public interface WxService {
ResultBody
moveSubUserToTest
();
ResultBody
moveSubUserUnionIdToTest
();
ResultBody
getUserPortrait
();
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/data/UserReportService.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
service
.
data
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.dto.data.ProductReportDTO
;
import
com.mmc.iuav.user.model.dto.data.UserReportDTO
;
import
com.mmc.iuav.user.model.vo.data.ActiveUserCountVO
;
/**
* @Author LW
* @date 2023/9/16 11:25
* 概要:
*/
public
interface
UserReportService
{
ResultBody
<
UserReportDTO
>
getUserReportData
(
String
date
);
Integer
getUserActiveCount
();
void
insertActiveUserCount
(
ActiveUserCountVO
param
);
ProductReportDTO
getJoinStoreNumber
();
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/data/impl/UserReportServiceImpl.java
0 → 100644
浏览文件 @
1ec6d2c9
package
com
.
mmc
.
iuav
.
user
.
service
.
data
.
impl
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.dao.CooperationDao
;
import
com.mmc.iuav.user.dao.RealNameAuthDao
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.dronepilot.PilotCertificationDao
;
import
com.mmc.iuav.user.entity.data.ActiveUserCountDO
;
import
com.mmc.iuav.user.model.dto.data.ProductReportDTO
;
import
com.mmc.iuav.user.model.dto.data.UserReportDTO
;
import
com.mmc.iuav.user.model.vo.data.ActiveUserCountVO
;
import
com.mmc.iuav.user.service.WxService
;
import
com.mmc.iuav.user.service.data.UserReportService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
/**
* @Author LW
* @date 2023/9/16 13:24
* 概要:
*/
@Service
public
class
UserReportServiceImpl
implements
UserReportService
{
@Resource
private
UserServiceDao
userServiceDao
;
@Resource
private
RealNameAuthDao
realNameAuthDao
;
@Resource
private
PilotCertificationDao
pilotCertificationDao
;
@Resource
private
WxService
wxService
;
@Resource
private
CooperationDao
cooperationDao
;
@Override
public
ResultBody
<
UserReportDTO
>
getUserReportData
(
String
date
)
{
UserReportDTO
userReportDTO
=
new
UserReportDTO
();
// 获取可用用户总数
int
userCount
=
userServiceDao
.
getUsableUserCount
();
userReportDTO
.
setUserCount
(
userCount
);
// 获取实名认证用户数量
int
realNameCount
=
realNameAuthDao
.
getRealNameAuthCount
();
userReportDTO
.
setRealNameCount
(
realNameCount
);
// 获取飞手认证用户数量
int
dronePilotCount
=
pilotCertificationDao
.
getDronePilotCount
();
userReportDTO
.
setDronePilotCount
(
dronePilotCount
);
// 获取昨日新增用户数
int
yesterdayUserCount
=
userServiceDao
.
getYesterdayAddUserCount
();
userReportDTO
.
setYesterdayAddUserCount
(
yesterdayUserCount
);
// 获取昨日活跃用户数
ActiveUserCountDO
activeUserCountByDayNum
=
userServiceDao
.
getActiveUserCountByDayNum
();
userReportDTO
.
setYesterdayActiveUserCount
(
activeUserCountByDayNum
.
getActiveUserCount
());
return
ResultBody
.
success
(
userReportDTO
);
}
@Override
public
Integer
getUserActiveCount
()
{
ResultBody
resultBody
=
wxService
.
getUserPortrait
();
if
(
resultBody
!=
null
&&
resultBody
.
getCode
().
equals
(
"200"
))
{
JSONObject
result
=
JSONObject
.
parseObject
(
resultBody
.
getResult
().
toString
());
JSONArray
jsonArray
=
JSONArray
.
parseArray
(
result
.
get
(
"list"
).
toString
());
JSONObject
object
=
(
JSONObject
)
jsonArray
.
get
(
0
);
return
(
Integer
)
object
.
get
(
"visit_uv"
);
}
return
0
;
}
@Override
public
void
insertActiveUserCount
(
ActiveUserCountVO
param
)
{
ActiveUserCountDO
activeUserCountDO
=
new
ActiveUserCountDO
(
param
);
userServiceDao
.
insertActiveUserCount
(
activeUserCountDO
);
}
@Override
public
ProductReportDTO
getJoinStoreNumber
()
{
ProductReportDTO
productReportDTO
=
new
ProductReportDTO
();
// 获取入驻商家数量
int
joinStoreCount
=
cooperationDao
.
getJoinStoreCount
();
productReportDTO
.
setJoinStoreCount
(
joinStoreCount
);
// 获取品牌商入驻数量
productReportDTO
.
setBrandStore
(
cooperationDao
.
getStoreCountByType
(
1
));
// 获取维修商数量
productReportDTO
.
setRepairStore
(
cooperationDao
.
getStoreCountByType
(
10
));
// 获取培训机构数量
productReportDTO
.
setTrainingInstitution
(
cooperationDao
.
getStoreCountByType
(
4
));
// 获取租赁商数量
productReportDTO
.
setLeaseStore
(
cooperationDao
.
getStoreCountByType
(
3
));
// 获取服务商数量
productReportDTO
.
setServiceStore
(
cooperationDao
.
getStoreCountByType
(
5
));
return
productReportDTO
;
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/fdd/ContractService.java
浏览文件 @
1ec6d2c9
...
...
@@ -27,7 +27,7 @@ public interface ContractService {
ResultBody
downloadContract
(
String
contractId
);
ResultBody
stamp
(
String
contractId
,
LoginSuccessDTO
loginSuccessDTO
,
String
pages
,
Integer
port
);
ResultBody
stamp
(
String
contractId
,
LoginSuccessDTO
loginSuccessDTO
,
String
pages
,
Integer
port
,
String
customerId
);
/**
* 异步回调
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/fdd/impl/ContractServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -9,7 +9,9 @@ import com.mmc.iuav.response.ResultBody;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.constant.fdd.FddConnectConstant
;
import
com.mmc.iuav.user.constant.fdd.FddConstant
;
import
com.mmc.iuav.user.dao.UserServiceDao
;
import
com.mmc.iuav.user.dao.fdd.ContractDao
;
import
com.mmc.iuav.user.dao.fdd.UserFddAuthDao
;
import
com.mmc.iuav.user.entity.fdd.ContractInfoDO
;
import
com.mmc.iuav.user.entity.fdd.UserFddDO
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
...
...
@@ -18,6 +20,7 @@ import com.mmc.iuav.user.model.fdd.vo.ContractVO;
import
com.mmc.iuav.user.mq.MqProducer
;
import
com.mmc.iuav.user.service.fdd.ContractService
;
import
com.mmc.iuav.user.service.fdd.SealManageService
;
import
com.mmc.iuav.user.service.fdd.UserFddAuthService
;
import
com.mmc.iuav.user.util.TDateUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
...
...
@@ -43,6 +46,12 @@ public class ContractServiceImpl implements ContractService {
SealManageService
sealManageService
;
@Resource
private
MqProducer
mqProducer
;
@Resource
UserFddAuthService
userFddAuthService
;
@Resource
UserServiceDao
userServiceDao
;
@Resource
UserFddAuthDao
userFddAuthDao
;
/**
* 上传合同
...
...
@@ -120,12 +129,26 @@ public class ContractServiceImpl implements ContractService {
@Override
public
ResultBody
stamp
(
String
contractId
,
LoginSuccessDTO
loginSuccessDTO
,
String
pages
,
Integer
port
)
{
public
ResultBody
stamp
(
String
contractId
,
LoginSuccessDTO
loginSuccessDTO
,
String
pages
,
Integer
port
,
String
customerId
)
{
UserFddDO
userFddDO
;
if
(
port
.
equals
(
0
))
{
// 根据客户id获取认证信息
userFddDO
=
userFddAuthDao
.
getAppUserFddInfoByCustomerId
(
customerId
);
if
(
null
==
userFddDO
)
{
return
ResultBody
.
error
(
ResultEnum
.
BUSINESS_LICENSE_CHECK_ERROR
);
}
boolean
isPersonVerified
=
userFddDO
.
getAccountType
().
equals
(
1
)
&&
userFddDO
.
getPersonVerifyStatus
().
equals
(
2
);
boolean
isEntVerified
=
userFddDO
.
getAccountType
().
equals
(
2
)
&&
userFddDO
.
getEntVerifyStatus
().
equals
(
4
);
if
(!
isPersonVerified
&&
!
isEntVerified
)
{
return
ResultBody
.
error
(
ResultEnum
.
BUSINESS_LICENSE_CHECK_NOT_PASS
);
}
}
else
{
ResultBody
resultBody
=
sealManageService
.
checkAuthStatus
(
port
,
loginSuccessDTO
);
if
(!
resultBody
.
getCode
().
equals
(
"200"
))
{
return
resultBody
;
}
UserFddDO
userFddDO
=
(
UserFddDO
)
resultBody
.
getResult
();
userFddDO
=
(
UserFddDO
)
resultBody
.
getResult
();
}
// 获取合同信息
ContractInfoDO
contractInfo
=
contractDao
.
contractInfoByOrderNo
(
null
,
contractId
);
FddBaseClient
baseClient
=
new
FddBaseClient
(
FddConnectConstant
.
APP_ID
,
FddConnectConstant
.
APP_KEY
,
FddConnectConstant
.
VERSION
,
FddConnectConstant
.
HOST
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/fdd/impl/SealManageServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -157,8 +157,8 @@ public class SealManageServiceImpl implements SealManageService {
Integer
personVerifyStatus
=
userFddInfo
.
getPersonVerifyStatus
();
Integer
entVerifyStatus
=
userFddInfo
.
getEntVerifyStatus
();
boolean
isPersonVerified
=
!
accountType
.
equals
(
1
)
&&
personVerifyStatus
.
equals
(
2
);
boolean
isEntVerified
=
!
accountType
.
equals
(
2
)
&&
entVerifyStatus
.
equals
(
4
);
boolean
isPersonVerified
=
accountType
.
equals
(
1
)
&&
!
personVerifyStatus
.
equals
(
2
);
boolean
isEntVerified
=
accountType
.
equals
(
2
)
&&
!
entVerifyStatus
.
equals
(
4
);
if
(
isPersonVerified
||
isEntVerified
)
{
uid
=
userFddAuthService
.
replaceUnableString
(
userInfo
.
getOpenId
());
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/fdd/impl/UserFddAuthServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -200,9 +200,13 @@ public class UserFddAuthServiceImpl implements UserFddAuthService {
return
ResultBody
.
error
(
ResultEnum
.
NOT_FOUND
);
}
//修改认证状态
if
(
authenticationType
.
equals
(
"2"
))
{
userFddAuthDao
.
updateCompanyCertStatus
(
customerId
,
status
);
}
else
{
userFddAuthDao
.
updatePersonCertStatus
(
customerId
,
status
);
}
//通过需要申请证书
if
((
authenticationType
.
equals
(
"2"
)
&&
status
.
equals
(
"4"
))
||
(
authenticationType
.
equals
(
"1"
)
&&
status
.
equals
(
"2"
)))
{
if
((
"2"
.
equals
(
authenticationType
)
&&
status
.
equals
(
"4"
))
||
(
authenticationType
.
equals
(
"1"
)
&&
status
.
equals
(
"2"
)))
{
fddService
.
getApplyCert
(
verifyInfoDO
.
getCustomerId
(),
verifyInfoDO
.
getTransactionNo
());
}
return
ResultBody
.
success
();
...
...
@@ -220,16 +224,21 @@ public class UserFddAuthServiceImpl implements UserFddAuthService {
if
(
userFddInfo
==
null
)
{
uId
=
userFddAuthService
.
replaceUnableString
(
userInfo
.
getOpenId
());
}
else
{
if
(
flag
.
equals
(
1
))
{
Integer
accountType
=
userFddInfo
.
getAccountType
();
Integer
personVerifyStatus
=
userFddInfo
.
getPersonVerifyStatus
();
Integer
entVerifyStatus
=
userFddInfo
.
getEntVerifyStatus
();
boolean
isPersonVerified
=
accountType
.
equals
(
1
)
&&
!
personVerifyStatus
.
equals
(
2
);
boolean
isEntVerified
=
accountType
.
equals
(
2
)
&&
!
entVerifyStatus
.
equals
(
4
);
if
(
isPersonVerified
||
isEntVerified
)
{
if
(
isPersonVerified
)
{
uId
=
userFddAuthService
.
replaceUnableString
(
userInfo
.
getOpenId
());
}
}
else
{
Integer
accountType
=
userFddInfo
.
getAccountType
();
Integer
entVerifyStatus
=
userFddInfo
.
getEntVerifyStatus
();
boolean
isEntVerified
=
accountType
.
equals
(
1
)
&&
!
entVerifyStatus
.
equals
(
4
);
if
(
isEntVerified
)
{
uId
=
userFddAuthService
.
replaceUnableString
(
userInfo
.
getOpenId
());
}
}
}
}
else
{
uId
=
loginSuccessDTO
.
getUserAccountId
().
toString
();
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/BackUserAccountServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -26,6 +26,7 @@ import org.apache.commons.lang3.RandomStringUtils;
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.security.NoSuchAlgorithmException
;
import
java.util.List
;
...
...
@@ -205,6 +206,15 @@ public class BackUserAccountServiceImpl implements BackUserAccountService {
return
null
;
}
List
<
BackUserAccountVO
>
accountSimpleDTOS
=
list
.
stream
().
map
(
BackUserAccountDO:
:
buildBackUserAccountVO
).
collect
(
Collectors
.
toList
());
List
<
CompanyInfoVO
>
companyInfoVOS
=
companyService
.
listCompanyInfoByBUIds
(
bUserAccountQO
.
getUserIds
());
if
(!
CollectionUtils
.
isEmpty
(
companyInfoVOS
))
{
Map
<
Integer
,
CompanyInfoVO
>
userCom
=
companyInfoVOS
.
stream
().
collect
(
Collectors
.
toMap
(
CompanyInfoVO:
:
getBackUserAccountId
,
v
->
v
,
(
v1
,
v2
)
->
v2
));
for
(
BackUserAccountVO
accountSimpleDTO
:
accountSimpleDTOS
)
{
if
(
userCom
.
containsKey
(
accountSimpleDTO
.
getId
()))
{
accountSimpleDTO
.
setCompanyName
(
userCom
.
get
(
accountSimpleDTO
.
getId
()).
getCompanyName
());
}
}
}
return
accountSimpleDTOS
;
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -17,6 +17,7 @@ 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.UserMessageQO
;
import
com.mmc.iuav.user.model.qo.UserRcdQO
;
import
com.mmc.iuav.user.model.vo.CompanyAuthVO
;
import
com.mmc.iuav.user.model.vo.CooperationTagVO
;
...
...
@@ -28,16 +29,21 @@ 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
com.mmc.iuav.user.util.SmsUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.messaging.simp.annotation.SendToUser
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.CollectionUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
/**
...
...
@@ -81,6 +87,9 @@ public class UserAccountServiceImpl implements UserAccountService {
@Autowired
private
UserSubInfoDao
userSubInfoDao
;
@Autowired
private
StringRedisTemplate
stringRedisTemplate
;
@Override
public
UserAccountVO
getUserAccountInfoByUnionId
(
String
unionId
)
{
...
...
@@ -102,6 +111,8 @@ public class UserAccountServiceImpl implements UserAccountService {
if
(
userAccountDO
==
null
)
{
return
null
;
}
String
districtChild
=
userServiceDao
.
getDistrictChild
(
userAccountDO
.
getDistrictChildId
());
userAccountDO
.
setRegion
(
districtChild
);
UserAccountVO
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
ResultBody
<
RealNameAuthDTO
>
nameAuthDTOResultBody
=
realNameAuthService
.
userDetail
(
userAccountId
);
RealNameAuthDTO
realNameAuthDTO
=
nameAuthDTOResultBody
.
getResult
();
...
...
@@ -149,6 +160,8 @@ public class UserAccountServiceImpl implements UserAccountService {
if
(
userAccountDO
==
null
)
{
return
null
;
}
String
districtChild
=
userServiceDao
.
getDistrictChild
(
userAccountDO
.
getDistrictChildId
());
userAccountDO
.
setRegion
(
districtChild
);
UserAccountSimpleDTO
userAccountSimpleDTO
=
userAccountDO
.
buildUserAccountSimpleDTO
();
CompanyAuthVO
companyAuthVO
=
companyAuthService
.
getCompanyAuthByUId
(
userAccountId
);
if
(
companyAuthVO
!=
null
)
{
...
...
@@ -161,6 +174,10 @@ public class UserAccountServiceImpl implements UserAccountService {
List
<
CooperationTagVO
>
cooperationTags
=
cooperationTagDOS
.
stream
().
map
(
CooperationTagDO:
:
buildCooperationTagVO
).
collect
(
Collectors
.
toList
());
userAccountSimpleDTO
.
setCooperationTagVOS
(
cooperationTags
);
}
ResultBody
<
RealNameAuthDTO
>
userDetail
=
realNameAuthService
.
userDetail
(
userAccountId
);
if
(
userDetail
.
getCode
().
equals
(
ResultEnum
.
SUCCESS
.
getResultCode
())
&&
userDetail
.
getResult
()
!=
null
)
{
userAccountSimpleDTO
.
setUserName
(
userDetail
.
getResult
().
getUserName
());
}
return
userAccountSimpleDTO
;
}
...
...
@@ -438,4 +455,56 @@ public class UserAccountServiceImpl implements UserAccountService {
return
ResultBody
.
success
();
}
@Override
public
ResultBody
getVerifyCode
(
Integer
userAccountId
,
String
phoneNum
)
{
Integer
count
=
userServiceDao
.
countPhoneNum
(
phoneNum
);
if
(
count
>
0
){
return
ResultBody
.
error
(
"手机号已存在"
);
}
// 根据手机号生成验证码
String
verifyCode
=
CodeUtil
.
getRandomNum
(
6
);
// 保存到redis中
Map
<
String
,
String
>
redisData
=
new
HashMap
<>();
redisData
.
put
(
"userAccountId"
,
userAccountId
+
""
);
redisData
.
put
(
"phoneNum"
,
phoneNum
);
redisData
.
put
(
"verifyCode"
,
verifyCode
);
stringRedisTemplate
.
opsForHash
().
putAll
(
verifyCode
+
userAccountId
,
redisData
);
stringRedisTemplate
.
expire
(
verifyCode
+
userAccountId
,
60
,
TimeUnit
.
SECONDS
);
// 发送给用户
SmsUtil
.
verifyCode
(
verifyCode
,
phoneNum
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
updatePhoneNum
(
Integer
userAccountId
,
String
verifyCode
)
{
Map
<
Object
,
Object
>
redisData
=
stringRedisTemplate
.
opsForHash
().
entries
(
verifyCode
+
userAccountId
);
if
(
redisData
.
isEmpty
())
{
return
ResultBody
.
error
(
"验证码错误,请重新输入"
);
}
String
code
=
redisData
.
get
(
"verifyCode"
).
toString
();
String
phoneNum
=
redisData
.
get
(
"phoneNum"
).
toString
();
// 验证码错误则修改失败,并提醒
if
(!
code
.
equals
(
verifyCode
))
{
return
ResultBody
.
error
(
"验证码错误,请重新输入"
);
}
int
count
=
userServiceDao
.
countPhoneNums
(
phoneNum
,
userAccountId
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
"手机号已存在"
);
}
userServiceDao
.
updateAccountPhone
(
userAccountId
,
phoneNum
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
appUpdateUser
(
UserMessageQO
userMessageQO
)
{
int
i
=
userServiceDao
.
selectUserAccount
(
userMessageQO
);
if
(
i
!=
0
){
return
ResultBody
.
error
(
"昵称被占用,请重新修改"
);
}
else
{
userServiceDao
.
appUpdateUser
(
userMessageQO
);
}
return
ResultBody
.
success
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -8,12 +8,14 @@ import com.mmc.iuav.response.ResultBody;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.constant.UserSystemConstant
;
import
com.mmc.iuav.user.constant.WxConstant
;
import
com.mmc.iuav.user.controller.wx.HttpsOpenUtil
;
import
com.mmc.iuav.user.dao.UserSubInfoDao
;
import
com.mmc.iuav.user.entity.UserSubInfoDO
;
import
com.mmc.iuav.user.model.vo.AppletMsgVO
;
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.TDateUtil
;
import
com.mmc.iuav.user.util.WxApiUtil
;
import
com.mmc.iuav.user.util.XmlToMapUtil
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -400,4 +402,24 @@ public class WxServiceImpl implements WxService {
return
ResultBody
.
success
();
}
@Override
public
ResultBody
getUserPortrait
()
{
try
{
String
accessToken
=
this
.
getStableAccessToken
();
com
.
alibaba
.
fastjson
.
JSONObject
param
=
new
com
.
alibaba
.
fastjson
.
JSONObject
();
String
date
=
TDateUtil
.
getYesterdayDateByType
(
"yyyyMMdd"
);
param
.
put
(
"begin_date"
,
date
);
// param.put("env_version", UserSystemConstant.AppletEnv);
param
.
put
(
"end_date"
,
date
);
param
.
put
(
"access_token"
,
accessToken
);
String
url
=
"https://api.weixin.qq.com/datacube/getweanalysisappiddailyvisittrend?access_token="
+
accessToken
;
String
res
=
HttpsOpenUtil
.
httpSendPost
(
url
,
param
.
toJSONString
());
log
.
info
(
"getUserPortrait: "
+
JSONObject
.
toJSONString
(
res
));
return
ResultBody
.
success
(
res
);
}
catch
(
Exception
e
)
{
return
ResultBody
.
error
(
e
.
getMessage
());
}
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/wallet/impl/PayWalletServiceImpl.java
浏览文件 @
1ec6d2c9
...
...
@@ -605,6 +605,7 @@ public class PayWalletServiceImpl implements PayWalletService {
payLogDO
.
setUserAccountId
(
payUavWalletVO
.
getUserAccountId
());
payLogDO
.
setPayNo
(
payNo
);
payLogDO
.
setOperateUser
(
payUavWalletVO
.
getUserAccountId
());
payLogDO
.
setRemark
(
payUavWalletVO
.
getRemark
());
// 创建用户钱包
PayWalletDO
payWalletDO
=
new
PayWalletDO
();
...
...
@@ -683,6 +684,9 @@ public class PayWalletServiceImpl implements PayWalletService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResultBody
handleConfirmReceipt
(
PayUavWalletVO
payUavWalletVO
,
PayWalletDO
userWalletInfo
,
PayLogDO
payLogDO
,
PayWalletDO
payWalletDO
)
{
payLogDO
.
setPayMethod
(
payUavWalletVO
.
getOrderStatus
());
payLogDO
.
setCashAmtPaid
(
payUavWalletVO
.
getCashAmount
());
payLogDO
.
setSalaryAmtPaid
(
payUavWalletVO
.
getSalaryAmount
());
// 确认收货,解冻用户钱包信息
payWalletDO
.
setSalaryFreeze
(
userWalletInfo
.
getSalaryFreeze
().
subtract
(
payUavWalletVO
.
getSalaryAmount
()));
payWalletDO
.
setCashFreeze
(
userWalletInfo
.
getCashFreeze
().
subtract
(
payUavWalletVO
.
getCashAmount
()));
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/util/SmsUtil.java
浏览文件 @
1ec6d2c9
...
...
@@ -25,6 +25,8 @@ public class SmsUtil {
private
static
String
COOPERATION_TEMPLATE_PASS_CODE_3
=
"SMS_462620535"
;
private
static
String
COOPERATION_TEMPLATE_PASS_CODE_4
=
"SMS_462605558"
;
private
static
String
COOPERATION_TEMPLATE_PASS_CODE_5
=
"SMS_462575668"
;
//短信验证码模板
private
static
String
VERIFYCODE
=
"SMS_211825548"
;
/**
* 加盟审核未通过
...
...
@@ -63,4 +65,14 @@ public class SmsUtil {
}
return
new
Gson
().
toJson
(
response
.
body
);
}
/**
* 短信验证码
* @param verifyCode
* @param phone
* @return
*/
public
static
String
verifyCode
(
String
verifyCode
,
String
phone
){
return
send
(
VERIFYCODE
,
"{\"code\":\""
+
verifyCode
+
"\"}"
,
phone
);
}
}
csm-service/cms-service-user/src/main/resources/application-dev.yml
浏览文件 @
1ec6d2c9
...
...
@@ -89,7 +89,7 @@ fdd:
appid
:
407664
appkey
:
q146q3Cjmi7Y6BVl8jtZK9pH
version
:
2
host
:
https://testapi
.fadada.com:8443
/api/
host
:
https://testapi
06.fadada.com
/api/
mmc-url
:
https://test.iuav.shop/userapp/
iuav
:
...
...
csm-service/cms-service-user/src/main/resources/application-local.yml
浏览文件 @
1ec6d2c9
...
...
@@ -10,8 +10,9 @@ spring:
type
:
com.alibaba.druid.pool.DruidDataSource
redis
:
database
:
1
host
:
127.0.0.1
host
:
r-wz9ke310fs684hacn1pd.redis.rds.aliyuncs.com
port
:
6379
password
:
MMC@2022&REDIS
#rabbitMQ
rabbitmq
:
host
:
amqp-cn-zvp2ozhnj001.cn-shenzhen.amqp-0.net.mq.amqp.aliyuncs.com
...
...
@@ -52,7 +53,7 @@ fdd:
appid
:
407664
appkey
:
q146q3Cjmi7Y6BVl8jtZK9pH
version
:
2
host
:
https://testapi
.fadada.com:8443
/api/
host
:
https://testapi
06.fadada.com
/api/
mmc-url
:
https://test.iuav.shop/userapp/
iuav
:
...
...
csm-service/cms-service-user/src/main/resources/application-prod.yml
浏览文件 @
1ec6d2c9
...
...
@@ -78,11 +78,11 @@ third-party:
withdrawNotify
:
https://www.iuav.shop/userapp/xz/xzWithdrawNotify
fdd
:
appid
:
40766
4
appkey
:
q146q3Cjmi7Y6BVl8jtZK9pH
appid
:
50262
4
appkey
:
mDWdQ0jnx0iEJuJkLdKJsc0l
version
:
2
host
:
https://te
stapi.fadada.com:8443/api
/
mmc-url
:
https://
test
.iuav.shop/userapp/
host
:
https://te
xtapi.fadada.com/api2
/
mmc-url
:
https://
www
.iuav.shop/userapp/
iuav
:
pay
:
...
...
csm-service/cms-service-user/src/main/resources/mapper/CompanyDao.xml
浏览文件 @
1ec6d2c9
...
...
@@ -166,8 +166,8 @@
<select
id=
"listCompanyInfoByUID"
resultType=
"com.mmc.iuav.user.entity.CompanyInfoDO"
>
SELECT ci.id, ci.company_type, ci.company_name, ci.full_name, ci.province, ci.city, ci.district, ci.address,
ci.company_user_name,
c
i.phone_num, ci.remark, ci.create_time, cbu.back_user_account_id,ci.content, ci.score, ci.back_img
ci.company_user_name,
ci.phone_num, ci.remark, ci.create_time, ci.content, ci.score, ci.back_img,
c
bu.back_user_account_id
FROM company_info ci INNER JOIN company_back_user cbu ON ci.id = cbu.company_info_id
WHERE 1 = 1
<if
test=
"backUserIds != null"
>
...
...
csm-service/cms-service-user/src/main/resources/mapper/CooperationDao.xml
浏览文件 @
1ec6d2c9
...
...
@@ -440,7 +440,9 @@
INNER JOIN company_member cm ON cm.user_account_id = uat.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
WHERE ct.id = #{coopId}
and uat.is_deleted = 0 and uat.apply_status = 1 and ci.is_deleted = 0
and uat.is_deleted = 0
and uat.apply_status = 1
and ci.is_deleted = 0
</select>
<select
id=
"listCompanyInfoByCoopId"
resultType=
"com.mmc.iuav.user.entity.CompanyInfoDO"
>
...
...
@@ -454,15 +456,30 @@
ci.brand_name,
ci.brand_logo,
cbu.back_user_account_id,
round(st_distance_sphere(point(ci.lon, ci.lat),
point(#{lon}, #{lat}))/
1000, 2) AS distance
round(st_distance_sphere(point(ci.lon, ci.lat),
point(#{lon}, #{lat})) /
1000, 2) AS distance
FROM user_apply_tag uat
INNER JOIN cooperation_tag ct ON uat.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = uat.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
INNER JOIN company_back_user cbu ON cbu.company_info_id = ci.id
WHERE ct.id = #{coopId}
and uat.is_deleted = 0 and uat.apply_status = 1 and ci.is_deleted = 0
and uat.is_deleted = 0
and uat.apply_status = 1
and ci.is_deleted = 0
ORDER BY distance ASC
LIMIT #{pageNo}, #{pageSize}
</select>
<select
id=
"getJoinStoreCount"
resultType=
"java.lang.Integer"
>
select count(*)
from user_apply_tag
where is_deleted = 0
and apply_status = 1
</select>
<select
id=
"getStoreCountByType"
resultType=
"java.lang.Integer"
>
select count(*)
from user_apply_tag
where is_deleted = 0
and apply_status = 1
and cooperation_tag_id = #{type}
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/mapper/RealNameAuthDao.xml
浏览文件 @
1ec6d2c9
...
...
@@ -6,10 +6,12 @@
<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,
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},
values (#{userAccountId}, #{unionId}, #{frontIdImg}, #{backIdImg}, #{idNumber}, #{userName}, #{sex},
#{nationality},
#{birthday}, #{address}, #{issue},
#{startDate}, #{endDate}, #{fakeFront}, #{fakeBack}, #{checkStatus}, #{remark}, NOW())
</insert>
...
...
@@ -70,41 +72,100 @@
</update>
<update
id=
"updateRealNameAuthRemark"
>
update real_name_auth set remark = #{remark} where id = #{id}
update real_name_auth
set remark = #{remark}
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 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,
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
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,
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
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
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
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,
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
where rna.id = #{id}
and rna.is_deleted = 0
</select>
<select
id=
"countListRealNameAuth"
resultType=
"java.lang.Integer"
>
...
...
@@ -141,10 +202,32 @@
</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,
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
where rna.user_account_id = #{userAccountId}
and rna.is_deleted = 0
</select>
<select
id=
"getRealNameAuthCount"
resultType=
"java.lang.Integer"
>
select count(*)
from real_name_auth
where is_deleted = 0
</select>
</mapper>
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/mapper/UserServiceDao.xml
浏览文件 @
1ec6d2c9
...
...
@@ -47,6 +47,11 @@
insert into user_rcd (user_account_id, rcd_user_id, create_time)
values (#{userAccountId}, #{rcdUserId}, NOW());
</insert>
<insert
id=
"insertActiveUserCount"
>
insert into active_user_count
(active_user_count, active_date, create_time)
values (#{activeUserCount}, #{activeDate}, NOW())
</insert>
<update
id=
"update"
parameterType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
update user_account
...
...
@@ -140,7 +145,10 @@
ua.create_time,
ua.update_time,
pc.audit_status,
up.total_points
up.total_points,
ua.brief_introduction,
ua.cover_picture,
ua.district_child_id
FROM user_account ua
LEFT JOIN pilot_certification pc ON pc.user_account_id = ua.id
LEFT JOIN user_points up ON up.user_account_id = ua.id
...
...
@@ -165,7 +173,12 @@
parameterType=
"com.mmc.iuav.user.model.qo.UserAccountQO"
>
select ua.id, ua.phone_num, rna.user_name, ua.nick_name, ua.user_img, ua.open_id,
ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus
ua.port_type, ua.disable, ua.create_time, ua.update_time, ca.auth_status as companyAuthStatus,
ua.latitude,
ua.longitude,
ua.region,
ua.brief_introduction,
ua.cover_picture
from user_account ua left join company_auth ca on ua.id = ca.user_account_id left join real_name_auth rna on
ua.id = rna.user_account_id
where ua.disable = 0
...
...
@@ -479,5 +492,77 @@
</if>
</where>
</select>
<select
id=
"getUsableUserCount"
resultType=
"java.lang.Integer"
>
select count(*)
from user_account
where disable = 0
</select>
<select
id=
"getYesterdayAddUserCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM user_account
WHERE DATE (create_time) = CURDATE() - INTERVAL 1 DAY;
</select>
<select
id=
"getActiveUserCountByDayNum"
resultType=
"com.mmc.iuav.user.entity.data.ActiveUserCountDO"
>
SELECT 1 AS day_num,
COALESCE(SUM(auc.active_user_count), 0) AS active_user_count
FROM active_user_count auc
WHERE (TO_DAYS(NOW()) - TO_DAYS(auc.active_date)) = 1
</select>
<select
id=
"countPhoneNum"
resultType=
"java.lang.Integer"
>
select count(*) from user_account where phone_num = #{phoneNum} and `disable`=0 and account_status=1
</select>
<select
id=
"countPhoneNums"
resultType=
"java.lang.Integer"
>
select count(*) from user_account where phone_num = #{phoneNum}
and `disable`=0 and account_status=1 and id=#{userAccountId}
</select>
<select
id=
"updateAccountPhone"
>
update user_account
<set>
phone_num = #{phoneNum}
</set>
where id = #{userAccountId}
</select>
<update
id=
"appUpdateUser"
parameterType=
"com.mmc.iuav.user.model.qo.UserMessageQO"
>
update user_account
<set>
<if
test=
"userImg!='' and userImg!=null "
>
user_img=#{userImg},
</if>
<if
test=
"coverPicture!='' and coverPicture!=null"
>
cover_picture=#{coverPicture},
</if>
<if
test=
"nickName!='' and nickName!=null "
>
nick_name=#{nickName},
</if>
<if
test=
"districtChildId!=null"
>
district_child_id=#{districtChildId},
</if>
<if
test=
"briefIntroduction!='' and briefIntroduction!=null"
>
brief_introduction=#{briefIntroduction},
</if>
</set>
where id=#{id}
</update>
<select
id=
"selectUserAccount"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.iuav.user.model.qo.UserMessageQO"
>
select count(*) from user_account where disable=0 and nick_name=#{nickName} and id!=#{id}
</select>
<select
id=
"getDistrictChild"
resultType=
"java.lang.String"
>
SELECT
concat( p1.`name`, p2.`name` ) AS region
FROM
sys_district p1,
sys_district p2
WHERE
p2.LEVEL != 3
AND p1.id = p2.pid
AND p2.id = #{districtChildId}
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/mapper/data/UserReportDao.xml
0 → 100644
浏览文件 @
1ec6d2c9
<?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.data.UserReportDao"
></mapper>
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/mapper/dronepilot/PilotCertificationDao.xml
浏览文件 @
1ec6d2c9
...
...
@@ -360,4 +360,9 @@
from pilot_certification
where id = #{id}
</select>
<select
id=
"getDronePilotCount"
resultType=
"java.lang.Integer"
>
select count(*)
from pilot_certification
where audit_status = 1
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/mapper/fdd/UserFddAuthDao.xml
浏览文件 @
1ec6d2c9
...
...
@@ -31,6 +31,11 @@
set ent_verify_status = #{status}
where customer_id = #{customerId}
</update>
<update
id=
"updatePersonCertStatus"
>
update user_fdd
set person_verify_status = #{status}
where customer_id = #{customerId}
</update>
<select
id=
"checkRegisterFdd"
resultType=
"com.mmc.iuav.user.entity.fdd.UserFddDO"
>
select id,
union_id,
...
...
@@ -62,5 +67,17 @@
from user_fdd
where union_id = #{unionId}
</select>
<select
id=
"getAppUserFddInfoByCustomerId"
resultType=
"com.mmc.iuav.user.entity.fdd.UserFddDO"
>
select id,
customer_id,
union_id,
person_verify_status,
ent_verify_status,
account_type,
create_time,
update_time
from user_fdd
where customer_id = #{customerId}
</select>
</mapper>
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
1ec6d2c9
...
...
@@ -37,4 +37,5 @@ data-filter:
-
/userapp/pay/feignPayUavWallet
-
/userapp/fdd/contract/notifyStamp
-
/userapp/fdd/auth/notifyECertRes
-
/userapp/user-account/interiorInfo
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
1ec6d2c9
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag
:
a9be43318a9913f15ec9657f2d026666e62514e0
newTag
:
1a3da0e43c06ec7fab39ac8e4cdeeaac1f142807
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论