Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
cad9dee4
Commit
cad9dee4
authored
May 20, 2021
by
jiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
/tBoardStatistic/getInteractionFrequencyPageList 获取互动频次统计信息
修改以上接口 加上区域条件
parent
1988c6e7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
86 additions
and
3 deletions
+86
-3
TBoardStatisticMapper.java
...java/cn/chnmuseum/party/mapper/TBoardStatisticMapper.java
+3
-0
TBoardStatisticService.java
...va/cn/chnmuseum/party/service/TBoardStatisticService.java
+11
-1
TBoardStatisticServiceImpl.java
...museum/party/service/impl/TBoardStatisticServiceImpl.java
+7
-0
TBoardStatisticController.java
...useum/party/web/controller/TBoardStatisticController.java
+4
-2
TBoardStatisticMapper.xml
src/main/resources/mapper/TBoardStatisticMapper.xml
+61
-0
No files found.
src/main/java/cn/chnmuseum/party/mapper/TBoardStatisticMapper.java
View file @
cad9dee4
...
@@ -69,5 +69,8 @@ public interface TBoardStatisticMapper extends BaseMapper<TBoardStatistic> {
...
@@ -69,5 +69,8 @@ public interface TBoardStatisticMapper extends BaseMapper<TBoardStatistic> {
List
<
Map
>
getInteractionFrequency
(
Page
page
,
@Param
(
"frequencyDate"
)
String
frequencyDate
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
Map
>
getInteractionFrequency
(
Page
page
,
@Param
(
"frequencyDate"
)
String
frequencyDate
,
@Param
(
"orgCode"
)
String
orgCode
);
List
<
Map
>
getInteractionFrequency1
(
@Param
(
"page"
)
Page
page
,
@Param
(
"frequencyDate"
)
String
frequencyDate
,
@Param
(
"orgCode"
)
String
orgCode
,
@Param
(
"areaIds"
)
List
<
String
>
areaIds
);
List
<
TBoardPlayTrend
>
getBoardPageList
(
Page
<
TBoardPlayTrend
>
page
,
TBoardPlayTrend
trend
);
List
<
TBoardPlayTrend
>
getBoardPageList
(
Page
<
TBoardPlayTrend
>
page
,
TBoardPlayTrend
trend
);
}
}
src/main/java/cn/chnmuseum/party/service/TBoardStatisticService.java
View file @
cad9dee4
...
@@ -4,7 +4,6 @@ import cn.chnmuseum.party.model.*;
...
@@ -4,7 +4,6 @@ import cn.chnmuseum.party.model.*;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.bytedeco.opencv.presets.opencv_core
;
import
java.util.List
;
import
java.util.List
;
...
@@ -72,6 +71,17 @@ public interface TBoardStatisticService extends IService<TBoardStatistic> {
...
@@ -72,6 +71,17 @@ public interface TBoardStatisticService extends IService<TBoardStatistic> {
*/
*/
Page
getInteractionFrequency
(
Page
page
,
String
frequencyDate
,
String
orgCode
);
Page
getInteractionFrequency
(
Page
page
,
String
frequencyDate
,
String
orgCode
);
/**
* 复制的方法,用于加上区域
*
* @param page
* @param frequencyDate
* @param orgCode
* @param areaIds
* @return
*/
Page
getInteractionFrequency
(
Page
page
,
String
frequencyDate
,
String
orgCode
,
List
<
String
>
areaIds
);
List
getBoardProvincePlayTotalList
(
String
organId
,
String
orgCode
);
List
getBoardProvincePlayTotalList
(
String
organId
,
String
orgCode
);
Page
<
TBoardPlayTrend
>
getBoardPageList
(
Page
<
TBoardPlayTrend
>
page
,
TBoardPlayTrend
trend
);
Page
<
TBoardPlayTrend
>
getBoardPageList
(
Page
<
TBoardPlayTrend
>
page
,
TBoardPlayTrend
trend
);
...
...
src/main/java/cn/chnmuseum/party/service/impl/TBoardStatisticServiceImpl.java
View file @
cad9dee4
...
@@ -139,6 +139,13 @@ public class TBoardStatisticServiceImpl extends ServiceImpl<TBoardStatisticMappe
...
@@ -139,6 +139,13 @@ public class TBoardStatisticServiceImpl extends ServiceImpl<TBoardStatisticMappe
return
page
;
return
page
;
}
}
@Override
public
Page
getInteractionFrequency
(
Page
page
,
String
frequencyDate
,
String
orgCode
,
List
<
String
>
areaIds
)
{
page
.
setRecords
(
boardStatisticMapper
.
getInteractionFrequency1
(
page
,
frequencyDate
,
orgCode
,
areaIds
));
return
page
;
}
@Override
@Override
public
List
getBoardProvincePlayTotalList
(
String
organId
,
String
orgCode
)
{
public
List
getBoardProvincePlayTotalList
(
String
organId
,
String
orgCode
)
{
// 获取省份信息
// 获取省份信息
...
...
src/main/java/cn/chnmuseum/party/web/controller/TBoardStatisticController.java
View file @
cad9dee4
...
@@ -310,7 +310,7 @@ public class TBoardStatisticController extends BaseController {
...
@@ -310,7 +310,7 @@ public class TBoardStatisticController extends BaseController {
@PostMapping
(
"/getInteractionFrequencyPageList"
)
@PostMapping
(
"/getInteractionFrequencyPageList"
)
// @RequiresAuthentication //@RequiresPermissions("t:board:statistic:districtPage")
// @RequiresAuthentication //@RequiresPermissions("t:board:statistic:districtPage")
@ApiOperation
(
value
=
"获取互动频次统计信息"
,
notes
=
"获取互动频次统计信息"
)
@ApiOperation
(
value
=
"获取互动频次统计信息"
,
notes
=
"获取互动频次统计信息"
)
public
Map
<
String
,
Object
>
getInteractionFrequencyPageList
(
String
frequencyDate
)
{
public
Map
<
String
,
Object
>
getInteractionFrequencyPageList
(
String
frequencyDate
,
String
areaCode
)
{
String
orgCode
=
null
;
String
orgCode
=
null
;
try
{
try
{
TUser
user
=
getcurUser
();
TUser
user
=
getcurUser
();
...
@@ -323,8 +323,10 @@ public class TBoardStatisticController extends BaseController {
...
@@ -323,8 +323,10 @@ public class TBoardStatisticController extends BaseController {
if
(
StringUtils
.
isEmpty
(
frequencyDate
))
{
if
(
StringUtils
.
isEmpty
(
frequencyDate
))
{
frequencyDate
=
DateUtil
.
getCurrentDate
(
"yyyyMM"
);
frequencyDate
=
DateUtil
.
getCurrentDate
(
"yyyyMM"
);
}
}
//加上区域条件
List
<
String
>
areaIds
=
findAllAreaIdByParentCode
(
areaCode
);
Page
page
=
this
.
tBoardStatisticService
.
getInteractionFrequency
(
getPage
(),
frequencyDate
,
orgCode
);
Page
page
=
this
.
tBoardStatisticService
.
getInteractionFrequency
(
getPage
(),
frequencyDate
,
orgCode
,
areaIds
);
//
//
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
List
organList
=
new
ArrayList
<>();
List
organList
=
new
ArrayList
<>();
...
...
src/main/resources/mapper/TBoardStatisticMapper.xml
View file @
cad9dee4
...
@@ -311,4 +311,65 @@
...
@@ -311,4 +311,65 @@
</select>
</select>
<select
id=
"getInteractionFrequency1"
resultType=
"java.util.Map"
>
<if
test=
"frequencyDate != null and frequencyDate.length() == 4"
>
SELECT o.name organName,count(i.organ_id) frequencyCnt
from t_interaction i
left join t_organ o on i.organ_id = o.id
<where>
DATE_FORMAT(i.create_time,'%Y') = ${frequencyDate}
<if
test=
"orgCode != null"
>
and o.code LIKE concat(#{orgCode}, '%')
</if>
<if
test=
"areaIds !=null and areaIds.size() > 0"
>
AND o.area_id IN
<foreach
collection=
"areaIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
</foreach>
</if>
</where>
group by i.organ_id
order by count(i.organ_id) desc
</if>
<if
test=
"frequencyDate != null and frequencyDate.length() == 6"
>
SELECT o.name organName,count(i.organ_id) frequencyCnt
from t_interaction i
left join t_organ o on i.organ_id = o.id
<where>
DATE_FORMAT(i.create_time,'%Y%m') = ${frequencyDate}
<if
test=
"orgCode != null"
>
and o.code LIKE concat(#{orgCode}, '%')
</if>
<if
test=
"areaIds !=null and areaIds.size() > 0"
>
AND o.area_id IN
<foreach
collection=
"areaIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
</foreach>
</if>
</where>
group by i.organ_id
order by count(i.organ_id) desc
</if>
<if
test=
"frequencyDate != null and frequencyDate.length() == 8"
>
SELECT o.name organName,count(i.organ_id) frequencyCnt
from t_interaction i
left join t_organ o on i.organ_id = o.id
<where>
DATE_FORMAT(i.create_time,'%Y%m%d') = ${frequencyDate}
<if
test=
"orgCode != null"
>
and o.code LIKE concat(#{orgCode}, '%')
</if>
<if
test=
"areaIds !=null and areaIds.size() > 0"
>
AND o.area_id IN
<foreach
collection=
"areaIds"
separator=
","
open=
"("
close=
")"
item=
"item"
>
#{item}
</foreach>
</if>
</where>
group by i.organ_id
order by count(i.organ_id) desc
</if>
</select>
</mapper>
</mapper>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment