glj-代码提交

This commit is contained in:
管李杰 2024-08-08 16:50:46 +08:00
parent e60ee0d9f8
commit e892cf3aa3
5 changed files with 49 additions and 38 deletions

View File

@ -48,11 +48,14 @@ public class ToolController{
if(!StringUtils.isEmpty(tool.getToolName())){
queryWrapper.like("tool_name", tool.getToolName());
}
if(!StringUtils.isEmpty(tool.getMailbox())){
queryWrapper.like("mailbox", tool.getMailbox());
}
if(!StringUtils.isEmpty(tool.getLabel())){
queryWrapper.like("label", tool.getLabel());
}
if(tool.getUploader()!=null) {
queryWrapper.eq("uploader", tool.getUploader());
if(!StringUtils.isEmpty(tool.getDisasterType())){
queryWrapper.like("disaster_type", tool.getDisasterType());
}
if(!StringUtils.isEmpty(tool.getRelatedDisasterType())) {
queryWrapper.eq("related_disaster_type", tool.getRelatedDisasterType());

View File

@ -575,6 +575,7 @@
LEFT JOIN blade_user gi on gi.id = gmdr.sponsor_id
<where>
gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>
@ -585,7 +586,6 @@
from disaster_info di
<where>
di.chief_id = #{userId}
and di.respond_status > 1
</where>
</select>
@ -611,6 +611,7 @@
di.disaster_time BETWEEN #{start} AND #{end}
<if test="email != null">
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
</if>
GROUP BY date
@ -631,6 +632,7 @@
LEFT JOIN blade_user gi on gi.id = gmdr.sponsor_id
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-01')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-02') as `key`, 0 as response, count (1) as initiate
@ -642,6 +644,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-02')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-03') as `key`, 0 as response, count (1) as initiate
@ -653,6 +656,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-03')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-04') as `key`, 0 as response, count (1) as initiate
@ -664,6 +668,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-04')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-05') as `key`, 0 as response, count (1) as initiate
@ -675,6 +680,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-05')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-06') as `key`, 0 as response, count (1) as initiate
@ -686,6 +692,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-06')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-07') as `key`, 0 as response, count (1) as initiate
@ -697,6 +704,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-07')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-08') as `key`, 0 as response, count (1) as initiate
@ -708,6 +716,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-08')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-09') as `key`, 0 as response, count (1) as initiate
@ -719,6 +728,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-09')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-10') as `key`, 0 as response, count (1) as initiate
@ -730,6 +740,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-10')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-11') as `key`, 0 as response, count (1) as initiate
@ -741,6 +752,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-11')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-12') as `key`, 0 as response, count (1) as initiate
@ -752,6 +764,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-12')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
@ -876,6 +889,7 @@
LEFT JOIN blade_user gi on gi.id = gmdr.sponsor_id
<where>
gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>
@ -1433,6 +1447,7 @@
LEFT JOIN blade_user gi on gi.id = gmdr.sponsor_id
where date_format(t.disaster_time, '%Y-%m') = CONCAT(#{year}, '-01')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-02') as `key`, 0 as response, count (1) as initiate
@ -1444,6 +1459,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-02')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-03') as `key`, 0 as response, count (1) as initiate
@ -1455,6 +1471,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-03')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-04') as `key`, 0 as response, count (1) as initiate
@ -1466,6 +1483,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-04')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-05') as `key`, 0 as response, count (1) as initiate
@ -1477,6 +1495,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-05')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-06') as `key`, 0 as response, count (1) as initiate
@ -1488,6 +1507,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-06')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-07') as `key`, 0 as response, count (1) as initiate
@ -1499,6 +1519,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-07')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-08') as `key`, 0 as response, count (1) as initiate
@ -1510,6 +1531,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-08')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-09') as `key`, 0 as response, count (1) as initiate
@ -1521,6 +1543,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-09')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-10') as `key`, 0 as response, count (1) as initiate
@ -1532,6 +1555,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-10')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-11') as `key`, 0 as response, count (1) as initiate
@ -1543,6 +1567,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-11')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
SELECT CONCAT(#{year}, '-12') as `key`, 0 as response, count (1) as initiate
@ -1554,6 +1579,7 @@
, '%Y-%m') = CONCAT(#{year}
, '-12')
and gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
union ALL
@ -1677,7 +1703,8 @@
LEFT JOIN guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
<where>
gmdr.sponsor_id = #{userId}
and di.respond_status > 1
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>
@ -1687,7 +1714,8 @@
from disaster_info di
<where>
di.admin_id = #{userId}
and di.respond_status > 1
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>
@ -1698,7 +1726,8 @@
LEFT JOIN guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
<where>
gmdr.admin_id = #{userId}
and di.respond_status = 2
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>
@ -1709,7 +1738,8 @@
LEFT JOIN guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
<where>
gmdr.manager_id = #{userId}
and di.respond_status = 2
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>

View File

@ -47,6 +47,7 @@
LEFT JOIN blade_user gi on gi.id = gmdr.sponsor_id
<where>
gi.email = #{email}
and gmdr.status > 0
and gmdr.status != 2
</where>
</select>
@ -82,17 +83,15 @@
<select id="getByUserStatisticsOneNew" resultType="java.lang.Integer">
select count(di.id)
FROM guest_manage_disaster_ref di
LEFT JOIN guest_manage_disaster_ref gmdr on gmdr.disaster_id = di.id
LEFT JOIN blade_user gi on gi.id = gmdr.sponsor_id
<where>
gi.email = #{email}
and gmdr.status != 2
di.sponsor_id = #{userId}
and di.status != 2
</where>
</select>
<select id="getByUserStatisticsThreeNew" resultType="java.lang.Integer">
select count(ed.id)
FROM entity_data ed
FROM entity_data_all ed
<where>
ed.uploader_id = #{userId}
</where>

View File

@ -21,6 +21,7 @@
<result property="showName" column="show_name" jdbcType="VARCHAR"/>
<result property="mailbox" column="mailbox" jdbcType="VARCHAR"/>
<result property="paperLink" column="paper_link" jdbcType="VARCHAR"/>
<result property="disasterType" column="disaster_type" jdbcType="VARCHAR"/>
<result property="toolVisits" column="tool_visits" jdbcType="INTEGER"/>
<result property="paperVisits" column="paper_visits" jdbcType="INTEGER"/>
</resultMap>
@ -30,7 +31,7 @@
Introduction,link,detail,
create_time,upload_id,manager_id,
review_time,type,voluntary_flag,
uploader,show_name,mailbox,paper_link,tool_visits,paper_visits
uploader,show_name,mailbox,paper_link,tool_visits,paper_visits,disaster_type
</sql>
<select id="toolRanking" resultType="com.kening.vordm.entity.Tool">

View File

@ -129,19 +129,13 @@ public class NewsServiceImpl extends ServiceImpl<NewsMapper, News>
String time = ExcelCellUtil.strHandle(row.get(1));
String contentNew = ExcelCellUtil.strHandle( row.get(2));
String contentNew = ExcelCellUtil.strHandle(row.get(2));
String userName = ExcelCellUtil.strHandle(row.get(3));
String favorite_count = ExcelCellUtil.strHandle(row.get(4));
String reply_count = ExcelCellUtil.strHandle(row.get(5));
String visit_count = ExcelCellUtil.strHandle(row.get(6));
String retweet_count = ExcelCellUtil.strHandle(row.get(7));
String geo = ExcelCellUtil.strHandle(row.get(8));
String coordinates = ExcelCellUtil.strHandle(row.get(9));
String place = ExcelCellUtil.strHandle(row.get(10));
String contributors = ExcelCellUtil.strHandle(row.get(11));
String topic = ExcelCellUtil.strHandle(row.get(12));
SocialMedia socialMedia = new SocialMedia();
socialMedia.setCreateTime(new Date());
socialMedia.setDisasterId(disasterId);
@ -150,7 +144,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsMapper, News>
} else if (typeData == 3) {
socialMedia.setType(1);
}
if (link!=null) {
if (link != null) {
socialMedia.setLink(link);
}
if (time != null) {
@ -179,23 +173,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsMapper, News>
if (retweet_count != null) {
socialMedia.setRetweetCount(Integer.parseInt(retweet_count));
}
if (geo != null) {
socialMedia.setGeo(geo);
}
if (coordinates != null) {
socialMedia.setCoordinates(coordinates);
}
if (place != null) {
socialMedia.setPlace(place);
}
if (contributors != null) {
socialMedia.setContributors(contributors);
}
if (topic != null) {
}
socialMedia.setTopic(topic);
socialMedia.setStatus(0);
socialMedia.setStatus(1);
socialMediaMapper.insert(socialMedia);
}
}