Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
1a3da0e4
提交
1a3da0e4
authored
9月 19, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug修复
上级
462af5e7
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
105 行增加
和
8 行删除
+105
-8
ProductReportDTO.java
...va/com/mmc/iuav/user/model/dto/data/ProductReportDTO.java
+39
-0
UserReportController.java
...m/mmc/iuav/user/controller/data/UserReportController.java
+10
-0
CooperationDao.java
...r/src/main/java/com/mmc/iuav/user/dao/CooperationDao.java
+4
-0
UserReportService.java
...ava/com/mmc/iuav/user/service/data/UserReportService.java
+4
-0
UserReportServiceImpl.java
...mc/iuav/user/service/data/impl/UserReportServiceImpl.java
+24
-1
CooperationDao.xml
...service-user/src/main/resources/mapper/CooperationDao.xml
+24
-7
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/dto/data/ProductReportDTO.java
0 → 100644
浏览文件 @
1a3da0e4
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
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/data/UserReportController.java
浏览文件 @
1a3da0e4
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.*
;
...
...
@@ -9,6 +10,7 @@ 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
...
...
@@ -29,4 +31,12 @@ public class UserReportController {
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/dao/CooperationDao.java
浏览文件 @
1a3da0e4
...
...
@@ -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/service/data/UserReportService.java
浏览文件 @
1a3da0e4
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
;
...
...
@@ -16,4 +17,7 @@ public interface UserReportService {
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
浏览文件 @
1a3da0e4
...
...
@@ -3,10 +3,12 @@ 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
;
...
...
@@ -29,7 +31,9 @@ public class UserReportServiceImpl implements UserReportService {
@Resource
private
PilotCertificationDao
pilotCertificationDao
;
@Resource
WxService
wxService
;
private
WxService
wxService
;
@Resource
private
CooperationDao
cooperationDao
;
@Override
public
ResultBody
<
UserReportDTO
>
getUserReportData
(
String
date
)
{
...
...
@@ -69,4 +73,23 @@ public class UserReportServiceImpl implements UserReportService {
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/resources/mapper/CooperationDao.xml
浏览文件 @
1a3da0e4
...
...
@@ -436,11 +436,13 @@
<select
id=
"countListCompanyInfoByCoopId"
resultType=
"java.lang.Integer"
>
SELECT count(*)
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 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
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
ORDER BY distance ASC
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>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论