Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
990a7a39
提交
990a7a39
authored
9月 23, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
c4680ec2
96a087ba
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
120 行增加
和
43 行删除
+120
-43
UserAccountVO.java
...c/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
+4
-0
UserApplication.java
...user/src/main/java/com/mmc/iuav/user/UserApplication.java
+3
-1
UserServiceDao.java
...r/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
+2
-0
UserAccountDO.java
...src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
+8
-2
ManagerLogSchedule.java
...n/java/com/mmc/iuav/user/schedule/ManagerLogSchedule.java
+4
-2
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+13
-2
application-dev.yml
...e/cms-service-user/src/main/resources/application-dev.yml
+4
-2
application-prod.yml
.../cms-service-user/src/main/resources/application-prod.yml
+4
-2
CooperationDao.xml
...service-user/src/main/resources/mapper/CooperationDao.xml
+14
-8
RealNameAuthDao.xml
...ervice-user/src/main/resources/mapper/RealNameAuthDao.xml
+9
-3
UserServiceDao.xml
...service-user/src/main/resources/mapper/UserServiceDao.xml
+47
-16
PilotCertificationDao.xml
...ain/resources/mapper/dronepilot/PilotCertificationDao.xml
+5
-3
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+2
-1
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
浏览文件 @
990a7a39
...
...
@@ -86,6 +86,10 @@ public class UserAccountVO implements Serializable {
private
String
briefIntroduction
;
@ApiModelProperty
(
value
=
"封面背景图"
)
private
String
coverPicture
;
@ApiModelProperty
(
value
=
"地区最下级id"
,
example
=
"130100"
)
private
Integer
districtChildId
;
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/UserApplication.java
浏览文件 @
990a7a39
...
...
@@ -3,12 +3,14 @@ package com.mmc.iuav.user;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.client.RestTemplate
;
/**
* @author:zhenjie
* @Date:2023/5/15 15:35
*/
@EnableScheduling
@SpringBootApplication
public
class
UserApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
@@ -16,7 +18,7 @@ public class UserApplication {
}
@Bean
public
RestTemplate
restTemplate
(){
public
RestTemplate
restTemplate
()
{
return
new
RestTemplate
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/dao/UserServiceDao.java
浏览文件 @
990a7a39
...
...
@@ -192,5 +192,7 @@ public interface UserServiceDao {
int
selectUserAccount
(
UserMessageQO
userMessageQO
);
int
selectUserAccountNickName
(
UserAccountDO
userAccountDO
);
String
getDistrictChild
(
Integer
districtChildId
);
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/entity/UserAccountDO.java
浏览文件 @
990a7a39
...
...
@@ -11,7 +11,6 @@ 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
;
...
...
@@ -102,6 +101,12 @@ public class UserAccountDO implements Serializable {
this
.
accountStatus
=
userAccountVO
.
getAccountStatus
();
this
.
remark
=
userAccountVO
.
getRemark
();
this
.
portType
=
userAccountVO
.
getPortType
();
this
.
userImg
=
userAccountVO
.
getUserImg
();
this
.
coverPicture
=
userAccountVO
.
getCoverPicture
();
this
.
nickName
=
userAccountVO
.
getNickName
();
this
.
districtChildId
=
userAccountVO
.
getDistrictChildId
();
this
.
briefIntroduction
=
userAccountVO
.
getBriefIntroduction
();
}
public
UserAccountDO
(
BUserAccountVO
bUserAccountVO
)
{
...
...
@@ -131,6 +136,7 @@ public class UserAccountDO implements Serializable {
.
region
(
this
.
region
)
.
briefIntroduction
(
this
.
briefIntroduction
)
.
coverPicture
(
this
.
coverPicture
)
.
districtChildId
(
this
.
districtChildId
)
.
build
();
}
...
...
@@ -146,6 +152,6 @@ public class UserAccountDO implements Serializable {
public
TopInviteVO
buildTopInviteVO
()
{
return
TopInviteVO
.
builder
().
id
(
this
.
id
).
uid
(
this
.
id
+
""
).
nickName
(
this
.
nickName
).
userName
(
this
.
userName
).
phoneNum
(
this
.
phoneNum
)
.
inviteCount
(
this
.
inviteCount
).
build
();
.
inviteCount
(
this
.
inviteCount
).
userImg
(
this
.
userImg
).
build
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/schedule/ManagerLogSchedule.java
浏览文件 @
990a7a39
...
...
@@ -2,6 +2,7 @@ package com.mmc.iuav.user.schedule;
import
com.mmc.iuav.user.model.vo.data.ActiveUserCountVO
;
import
com.mmc.iuav.user.service.data.UserReportService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnProperty
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Component
;
...
...
@@ -14,6 +15,7 @@ import java.util.Calendar;
*/
@Component
@ConditionalOnProperty
(
prefix
=
"scheduling"
,
name
=
"enabled"
,
havingValue
=
"true"
)
@Slf4j
public
class
ManagerLogSchedule
{
@Resource
UserReportService
userReportService
;
...
...
@@ -21,10 +23,10 @@ public class ManagerLogSchedule {
/**
* 统计日活量
*/
@Scheduled
(
cron
=
"0 0
10
* * ?"
)
@Scheduled
(
cron
=
"0 0
8
* * ?"
)
public
void
calculateActiveUserCount
()
{
log
.
info
(
"统计日活量"
);
Integer
userActiveCount
=
userReportService
.
getUserActiveCount
();
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
add
(
Calendar
.
DAY_OF_MONTH
,
-
1
);
//记录到数据库
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
990a7a39
...
...
@@ -149,6 +149,10 @@ public class UserAccountServiceImpl implements UserAccountService {
@Override
public
ResultBody
update
(
UserAccountVO
userAccountVO
)
{
UserAccountDO
userAccountDO
=
new
UserAccountDO
(
userAccountVO
);
int
i
=
userServiceDao
.
selectUserAccountNickName
(
userAccountDO
);
if
(
i
!=
0
){
return
ResultBody
.
error
(
"昵称被占用,请重新修改"
);
}
userServiceDao
.
update
(
userAccountDO
);
mqProducer
.
sentUserInfoChangedMsg
(
userAccountVO
);
return
ResultBody
.
success
();
...
...
@@ -193,6 +197,13 @@ public class UserAccountServiceImpl implements UserAccountService {
if
(
list
==
null
)
{
return
null
;
}
for
(
UserAccountDO
userAccountDO
:
list
)
{
Integer
districtChildId
=
userAccountDO
.
getDistrictChildId
();
if
(
districtChildId
!=
null
){
String
districtChild
=
userServiceDao
.
getDistrictChild
(
districtChildId
);
userAccountDO
.
setRegion
(
districtChild
);
}
}
List
<
UserAccountSimpleDTO
>
accountSimpleDTOS
=
list
.
stream
().
map
(
UserAccountDO:
:
buildUserAccountSimpleDTO
).
collect
(
Collectors
.
toList
());
//设置用户的渠道等级
buildCooperationTagVO
(
accountSimpleDTOS
);
...
...
@@ -459,7 +470,7 @@ public class UserAccountServiceImpl implements UserAccountService {
public
ResultBody
getVerifyCode
(
Integer
userAccountId
,
String
phoneNum
)
{
Integer
count
=
userServiceDao
.
countPhoneNum
(
phoneNum
);
if
(
count
>
0
){
return
ResultBody
.
error
(
"手机号已存在"
);
return
ResultBody
.
error
(
"
80001"
,
"
手机号已存在"
);
}
// 根据手机号生成验证码
String
verifyCode
=
CodeUtil
.
getRandomNum
(
6
);
...
...
@@ -489,7 +500,7 @@ public class UserAccountServiceImpl implements UserAccountService {
}
int
count
=
userServiceDao
.
countPhoneNums
(
phoneNum
,
userAccountId
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
"手机号已存在"
);
return
ResultBody
.
error
(
"
80001"
,
"
手机号已存在"
);
}
userServiceDao
.
updateAccountPhone
(
userAccountId
,
phoneNum
);
return
ResultBody
.
success
();
...
...
csm-service/cms-service-user/src/main/resources/application-dev.yml
浏览文件 @
990a7a39
...
...
@@ -96,4 +96,6 @@ iuav:
pay
:
uri
:
http://payment-svc:8088
pms
:
uri
:
http://pms-svc:8099
\ No newline at end of file
uri
:
http://pms-svc:8099
scheduling
:
enabled
:
true
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/application-prod.yml
浏览文件 @
990a7a39
...
...
@@ -88,4 +88,6 @@ iuav:
pay
:
uri
:
http://payment-svc:8088
pms
:
uri
:
http://pms-svc:8099
\ No newline at end of file
uri
:
http://pms-svc:8099
scheduling
:
enabled
:
true
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/mapper/CooperationDao.xml
浏览文件 @
990a7a39
...
...
@@ -470,16 +470,22 @@
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 count(*)
FROM user_apply_tag ua
INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
WHERE ua.is_deleted = 0
AND ua.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}
from user_apply_tag ua
INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
where ua.is_deleted = 0
and ua.cooperation_tag_id = #{type}
and ua.apply_status = 1
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/mapper/RealNameAuthDao.xml
浏览文件 @
990a7a39
...
...
@@ -226,8 +226,13 @@
and rna.is_deleted = 0
</select>
<select
id=
"getRealNameAuthCount"
resultType=
"java.lang.Integer"
>
select count(*)
from real_name_auth
where is_deleted = 0
SELECT count(*)
FROM user_account ua
LEFT JOIN company_member cm ON cm.user_account_id = ua.id
LEFT JOIN company_info ci ON ci.id = cm.company_info_id
LEFT JOIN real_name_auth rna ON rna.user_account_id = ua.id
WHERE ua.DISABLE = 0
AND ua.port_type = 100
and rna.check_status = 1
</select>
</mapper>
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/mapper/UserServiceDao.xml
浏览文件 @
990a7a39
...
...
@@ -90,7 +90,16 @@
remark = #{remark},
</if>
<if
test=
"portType != null"
>
port_type = #{portType}
port_type = #{portType},
</if>
<if
test=
"coverPicture!='' and coverPicture!=null"
>
cover_picture=#{coverPicture},
</if>
<if
test=
"districtChildId!=null"
>
district_child_id=#{districtChildId},
</if>
<if
test=
"briefIntroduction!='' and briefIntroduction!=null"
>
brief_introduction=#{briefIntroduction}
</if>
</set>
<where>
...
...
@@ -493,9 +502,13 @@
</where>
</select>
<select
id=
"getUsableUserCount"
resultType=
"java.lang.Integer"
>
select count(*)
from user_account
where disable = 0
SELECT count(*)
FROM user_account ua
LEFT JOIN company_member cm ON cm.user_account_id = ua.id
LEFT JOIN company_info ci ON ci.id = cm.company_info_id
LEFT JOIN real_name_auth rna ON rna.user_account_id = ua.id
WHERE ua.DISABLE = 0
AND ua.port_type = 100
</select>
<select
id=
"getYesterdayAddUserCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
...
...
@@ -510,15 +523,23 @@
</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 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 count(*)
from user_account
where phone_num = #{phoneNum}
and `disable` = 0
and account_status = 1
and id = #{userAccountId}
</select>
<select
id=
"updateAccountPhone"
>
<select
id=
"updateAccountPhone"
>
update user_account
<set>
phone_num = #{phoneNum}
...
...
@@ -550,17 +571,27 @@
<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 count(*)
from user_account
where disable = 0
and nick_name = #{nickName}
and id!=#{id}
</select>
<select
id=
"selectUserAccountNickName"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.iuav.user.entity.UserAccountDO"
>
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
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>
...
...
csm-service/cms-service-user/src/main/resources/mapper/dronepilot/PilotCertificationDao.xml
浏览文件 @
990a7a39
...
...
@@ -361,8 +361,10 @@
where id = #{id}
</select>
<select
id=
"getDronePilotCount"
resultType=
"java.lang.Integer"
>
select count(*)
from pilot_certification
where audit_status = 1
SELECT count(*)
FROM pilot_certification pc
LEFT JOIN user_account ua ON pc.user_account_id = ua.id
WHERE pc.audit_status = 1
AND ua.`disable` = 0
</select>
</mapper>
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
990a7a39
...
...
@@ -37,5 +37,6 @@ data-filter:
-
/userapp/pay/feignPayUavWallet
-
/userapp/fdd/contract/notifyStamp
-
/userapp/fdd/auth/notifyECertRes
-
/userapp/user-account/interiorInfo
-
/userapp/user-account/interiorInfo
-
/userapp/user/report/getJoinStoreNumber
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
990a7a39
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag
:
1a3da0e43c06ec7fab39ac8e4cdeeaac1f142807
newTag
:
6dd626898acea6649ad018cdc47aa0c2a5ca213d
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论