Commit b81df074 authored by 刘基明's avatar 刘基明

Merge branch 'v2.3.1' into 'dev'

V2.3.1

See merge request !64
parents 5733cebf 69fca593
...@@ -29,5 +29,9 @@ public interface ThemeMapper extends BaseMapper<ThemeEntity> { ...@@ -29,5 +29,9 @@ public interface ThemeMapper extends BaseMapper<ThemeEntity> {
Integer countByTopicIdAndCreateTimeAfter(@Param("topicId")String topicId,@Param("minCreateTime")LocalDateTime minCreateTime); Integer countByTopicIdAndCreateTimeAfter(@Param("topicId")String topicId,@Param("minCreateTime")LocalDateTime minCreateTime);
List<ThemeEntity> queryRecentdaysOrHasTopic(@Param("deleteTag")Integer deleteTag,@Param("minCreateTime")LocalDateTime minCreateTime,@Param("notTopicId")String notTopicId);
} }
package com.tanpu.community.feign.wxcp;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboDetailVO;
import com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboListResp;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@FeignClient(value = "service-wxcp", url = "${tanpu.wxcp.svc:}", contextId = "wxcp", fallbackFactory = FeignbackForWxcp.class, path = "/wxcp")
//@FeignClient(value = "service-product", contextId = "product", fallbackFactory = FeignBackClientForProducts.class, url = "http://127.0.0.1:8194/product")
public interface FeignClientForWxcp {
@PostMapping("/wx/kf/sendMessage/{agentId}/{corpId}")
@ApiOperation("发送微信客服消息")
CommonResp sendMessage(@PathVariable("agentId") Long agentId,
@PathVariable("corpId") String corpId,
@RequestBody String requestBody);
}
package com.tanpu.community.feign.wxcp;
import com.tanpu.common.api.CommonResp;
import com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboDetailVO;
import com.tanpu.community.api.beans.vo.feign.zhibo.ZhiboListResp;
import com.tanpu.community.feign.zhibo.FeignClientForZhibo;
import feign.hystrix.FallbackFactory;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.List;
@Slf4j
@Component
public class FeignbackForWxcp implements FallbackFactory<FeignClientForWxcp> {
@Override
public FeignClientForWxcp create(Throwable throwable) {
return new FeignClientForWxcp() {
@Override
public CommonResp sendMessage(Long agentId, String corpId, String requestBody) {
log.error("请求信息", throwable);
log.error("FeignClientForWxcp.sendMessage-agentId:{}, corpId:{}, request:{}", agentId, corpId, requestBody);
return CommonResp.error();
}
};
}
}
...@@ -477,10 +477,7 @@ public class ThemeManager { ...@@ -477,10 +477,7 @@ public class ThemeManager {
}); });
firstThemeTime = themeService.queryByThemeIdIgnoreDelete(excludeIds.get(0)).getCreateTime(); firstThemeTime = themeService.queryByThemeIdIgnoreDelete(excludeIds.get(0)).getCreateTime();
} }
} }
Integer pageStart = (req.page.pageNumber - 1) * req.page.pageSize; Integer pageStart = (req.page.pageNumber - 1) * req.page.pageSize;
Integer pageSize = req.page.pageSize; Integer pageSize = req.page.pageSize;
......
...@@ -110,11 +110,11 @@ public class TopicManager { ...@@ -110,11 +110,11 @@ public class TopicManager {
themeService.queryCommentForTopic(topicFollowQos, userId); themeService.queryCommentForTopic(topicFollowQos, userId);
// 排序 // 排序
topicFollowQos.stream().filter(o -> o.checkTopicName(keyword)).sorted(Comparator.comparing(TopicFollowQo::getSpecialPermission, Comparator.reverseOrder()). List<TopicFollowQo> res = topicFollowQos.stream().filter(o -> o.checkTopicName(keyword)).sorted(Comparator.comparing(TopicFollowQo::getSpecialPermission, Comparator.reverseOrder()).
thenComparing(TopicFollowQo::getLastThemeTime, Comparator.nullsFirst(String::compareTo).reversed())) thenComparing(TopicFollowQo::getLastThemeTime, Comparator.nullsFirst(String::compareTo).reversed()))
.collect(Collectors.toList()); .collect(Collectors.toList());
return topicFollowQos; return res;
} }
/** /**
......
...@@ -21,11 +21,7 @@ import org.springframework.stereotype.Service; ...@@ -21,11 +21,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.tanpu.community.api.constants.RedisKeyConstant.*; import static com.tanpu.community.api.constants.RedisKeyConstant.*;
...@@ -72,10 +68,21 @@ public class CommentService { ...@@ -72,10 +68,21 @@ public class CommentService {
//统计主题集合的评论量 //统计主题集合的评论量
public Integer getCommentCountByThemeId(String themeId) { public Integer getCommentCountByThemeId(String themeId) {
return commentMapper.selectList((new LambdaQueryWrapper<CommentEntity>() return commentMapper.selectCount((new LambdaQueryWrapper<CommentEntity>()
.eq(CommentEntity::getThemeId, themeId)) .eq(CommentEntity::getThemeId, themeId))
.eq(CommentEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED)) .eq(CommentEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED));
.size(); }
public Integer getCommentCountByThemeIds(List<String> themeIds) {
return commentMapper.selectCount((new LambdaQueryWrapper<CommentEntity>()
.in(CommentEntity::getThemeId, themeIds))
.eq(CommentEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED));
}
public Integer getCommentCountByThemeIds(List<String> themeIds, Date startDate, Date endDate) {
return commentMapper.selectCount((new LambdaQueryWrapper<CommentEntity>()
.in(CommentEntity::getThemeId, themeIds))
.gt(CommentEntity::getCreateTime, startDate)
.lt(CommentEntity::getCreateTime, endDate)
.eq(CommentEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED));
} }
......
package com.tanpu.community.service; package com.tanpu.community.service;
import com.tanpu.common.api.CommonResp; import com.tanpu.common.api.CommonResp;
import com.tanpu.common.exception.BizException;
import com.tanpu.community.api.beans.resp.CoursePackageSimpleResp; import com.tanpu.community.api.beans.resp.CoursePackageSimpleResp;
import com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp; import com.tanpu.community.api.beans.vo.feign.activity.OfflineActivitySimpleResp;
import com.tanpu.community.api.beans.vo.feign.course.CourseSimpleResp; import com.tanpu.community.api.beans.vo.feign.course.CourseSimpleResp;
...@@ -26,6 +25,7 @@ import org.springframework.stereotype.Service; ...@@ -26,6 +25,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.function.Function; import java.util.function.Function;
...@@ -65,9 +65,9 @@ public class FeignService { ...@@ -65,9 +65,9 @@ public class FeignService {
public UserInfoResp getUserInfoById(String userId) { public UserInfoResp getUserInfoById(String userId) {
List<UserInfoResp> userList = getUserList(Arrays.asList(userId)); List<UserInfoResp> userList = getUserList(Collections.singletonList(userId));
if (CollectionUtils.isEmpty(userList)) { if (CollectionUtils.isEmpty(userList)) {
throw new BizException("内部接口调用失败"); return null;
} }
return userList.get(0); return userList.get(0);
} }
......
...@@ -27,8 +27,6 @@ import java.util.List; ...@@ -27,8 +27,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.tanpu.community.api.constants.RedisKeyConstant.CACHE_FEIGN_USER_INFO;
@Service @Service
public class RankService { public class RankService {
...@@ -97,7 +95,7 @@ public class RankService { ...@@ -97,7 +95,7 @@ public class RankService {
LocalDateTime start = LocalDateTime.now(); LocalDateTime start = LocalDateTime.now();
//7天内所有主题进行热度值排序 //7天内所有主题进行热度值排序
List<ThemeEntity> themeEntities = themeService.queryRecentdays(60); List<ThemeEntity> themeEntities = themeService.queryRecentdaysOrHasTopic(60);
if (CollectionUtils.isEmpty(themeEntities)) { if (CollectionUtils.isEmpty(themeEntities)) {
return; return;
} }
...@@ -119,8 +117,7 @@ public class RankService { ...@@ -119,8 +117,7 @@ public class RankService {
theme.setViewCount(visitCountMap.getOrDefault(themeId, 0)); theme.setViewCount(visitCountMap.getOrDefault(themeId, 0));
//查询用户质量 //查询用户质量
String authorId = theme.getAuthorId(); String authorId = theme.getAuthorId();
UserInfoResp authorInfo = redisCache.getObject(StringUtils.joinWith("_", CACHE_FEIGN_USER_INFO, authorId), UserInfoResp authorInfo = feignService.getUserInfoById(authorId);
60, () -> feignService.getUserInfoById(authorId), UserInfoResp.class);
if (authorInfo == null || authorInfo.getLevelGrade() == null) { if (authorInfo == null || authorInfo.getLevelGrade() == null) {
theme.setUserWeight(0.0); theme.setUserWeight(0.0);
} else { } else {
......
...@@ -28,13 +28,7 @@ import org.springframework.stereotype.Service; ...@@ -28,13 +28,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Arrays; import java.util.*;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Service @Service
...@@ -68,13 +62,9 @@ public class ThemeService { ...@@ -68,13 +62,9 @@ public class ThemeService {
} }
//n天内发表的所有主题 //n天内发表的所有主题
public List<ThemeEntity> queryRecentdays(Integer days) { public List<ThemeEntity> queryRecentdaysOrHasTopic(Integer days) {
LambdaQueryWrapper<ThemeEntity> queryWrapper = new LambdaQueryWrapper<ThemeEntity>()
.eq(ThemeEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode())
.gt(ThemeEntity::getCreateTime, TimeUtils.getDaysBefore(days))
.orderByDesc(ThemeEntity::getId);
return themeMapper.selectList(queryWrapper); return themeMapper.queryRecentdaysOrHasTopic(DeleteTagEnum.NOT_DELETED.getCode(), TimeUtils.getDaysBefore(days), "");
} }
//最新的n条主题 //最新的n条主题
...@@ -207,6 +197,16 @@ public class ThemeService { ...@@ -207,6 +197,16 @@ public class ThemeService {
return themeMapper.selectList(queryWrapper).stream().map(ThemeEntity::getThemeId).collect(Collectors.toList()); return themeMapper.selectList(queryWrapper).stream().map(ThemeEntity::getThemeId).collect(Collectors.toList());
} }
public List<String> queryThemeIdsByTopic(String topidId, Date startDate, Date endDate) {
if (StringUtils.isEmpty(topidId)) {
return Collections.emptyList();
}
LambdaQueryWrapper<ThemeEntity> queryWrapper = new LambdaQueryWrapper<ThemeEntity>()
.eq(ThemeEntity::getTopicId, topidId).gt(ThemeEntity::getCreateTime, startDate).lt(ThemeEntity::getCreateTime, endDate);
queryWrapper.select(ThemeEntity::getThemeId);
return themeMapper.selectList(queryWrapper).stream().map(ThemeEntity::getThemeId).collect(Collectors.toList());
}
/** /**
* 根据作者查询主题分页列表 * 根据作者查询主题分页列表
* *
...@@ -362,7 +362,7 @@ public class ThemeService { ...@@ -362,7 +362,7 @@ public class ThemeService {
private String getUserName(String authorId) { private String getUserName(String authorId) {
UserInfoResp userInfoById = feignService.getUserInfoById(authorId); UserInfoResp userInfoById = feignService.getUserInfoById(authorId);
if (StringUtils.isNotBlank(userInfoById.getNickName())){ if (StringUtils.isNotBlank(userInfoById.getNickName())) {
return userInfoById.getNickName(); return userInfoById.getNickName();
} }
return "理财师"; return "理财师";
......
...@@ -34,12 +34,7 @@ import org.springframework.stereotype.Service; ...@@ -34,12 +34,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.ArrayList; import java.util.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -48,10 +43,10 @@ import java.util.stream.Collectors; ...@@ -48,10 +43,10 @@ import java.util.stream.Collectors;
public class TopicService { public class TopicService {
@Resource @Resource
TopicFollowRelMapper topicFollowRelMapper; private TopicFollowRelMapper topicFollowRelMapper;
@Resource @Resource
TopicMapper topicMapper; private TopicMapper topicMapper;
@Resource @Resource
private TopicManagerMapper topicManagerMapper; private TopicManagerMapper topicManagerMapper;
...@@ -76,6 +71,13 @@ public class TopicService { ...@@ -76,6 +71,13 @@ public class TopicService {
return retList; return retList;
} }
public List<TopicEntity> queryTopicNeedReport() {
// 是否同步动态至管理员企业微信 0:否 1:是
return topicMapper.selectList(new LambdaQueryWrapper<TopicEntity>()
.eq(TopicEntity::getSyncCorpWechat, 1)
.eq(TopicEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode()));
}
public TopicEntity queryOnlineTopicById(String topicId) { public TopicEntity queryOnlineTopicById(String topicId) {
return topicMapper.selectOne(new LambdaQueryWrapper<TopicEntity>() return topicMapper.selectOne(new LambdaQueryWrapper<TopicEntity>()
...@@ -98,6 +100,10 @@ public class TopicService { ...@@ -98,6 +100,10 @@ public class TopicService {
return topicMapper.selectList(new LambdaQueryWrapper<TopicEntity>().in(TopicEntity::getTopicId, topicIds)); return topicMapper.selectList(new LambdaQueryWrapper<TopicEntity>().in(TopicEntity::getTopicId, topicIds));
} }
/**
* CRUD Topic_Follow
*/
public List<TopicFollowQo> queryFollowTopic(String keyword, String userId) { public List<TopicFollowQo> queryFollowTopic(String keyword, String userId) {
// 用户的关注列表(包括专属) // 用户的关注列表(包括专属)
List<String> followTopicIds = topicFollowRelMapper.selectTopicIdByUserId(userId); List<String> followTopicIds = topicFollowRelMapper.selectTopicIdByUserId(userId);
...@@ -108,7 +114,21 @@ public class TopicService { ...@@ -108,7 +114,21 @@ public class TopicService {
List<TopicEntity> topicEntities = topicMapper.selectAllByTopicIdIn(followTopicIds); List<TopicEntity> topicEntities = topicMapper.selectAllByTopicIdIn(followTopicIds);
List<TopicFollowQo> topicFollowQos = ConvertUtil.topicEntityToFollowQos(topicEntities); List<TopicFollowQo> topicFollowQos = ConvertUtil.topicEntityToFollowQos(topicEntities);
return topicFollowQos; return topicFollowQos;
}
// 根据关注事件 count
public Integer countTotalFollow(String topicId) {
return topicFollowRelMapper.selectCount(new LambdaQueryWrapper<TopicFollowRelEntity>()
.eq(TopicFollowRelEntity::getTopicId, topicId)
.eq(TopicFollowRelEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode()));
}
public Integer countFollowByIdAndTime(String topicId, Date startDate, Date endDate) {
return topicFollowRelMapper.selectCount(new LambdaQueryWrapper<TopicFollowRelEntity>()
.eq(TopicFollowRelEntity::getTopicId, topicId)
.gt(TopicFollowRelEntity::getFollowTime, startDate)
.lt(TopicFollowRelEntity::getFollowTime, endDate)
.eq(TopicFollowRelEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode()));
} }
...@@ -267,6 +287,10 @@ public class TopicService { ...@@ -267,6 +287,10 @@ public class TopicService {
} }
} }
public List<TopicManagerEntity> getManagersByTopic(String topicId) {
return topicManagerMapper.selectList(new LambdaQueryWrapper<TopicManagerEntity>().eq(TopicManagerEntity::getTopicId, topicId));
}
public Set<String> getManagerId(String topicId) { public Set<String> getManagerId(String topicId) {
if (StringUtils.isBlank(topicId)) { if (StringUtils.isBlank(topicId)) {
return new HashSet<>(); return new HashSet<>();
......
package com.tanpu.community.service.quartz;
import com.alibaba.fastjson.JSON;
import com.tanpu.common.util.DateUtils;
import com.tanpu.community.api.beans.vo.feign.user.UserInfoVo;
import com.tanpu.community.dao.entity.community.TopicEntity;
import com.tanpu.community.dao.entity.community.TopicManagerEntity;
import com.tanpu.community.feign.fatools.FeignClientForFatools;
import com.tanpu.community.feign.wxcp.FeignClientForWxcp;
import com.tanpu.community.manager.TopicManager;
import com.tanpu.community.service.CommentService;
import com.tanpu.community.service.ThemeService;
import com.tanpu.community.service.TopicService;
import com.tanpu.community.service.VisitLogService;
import lombok.extern.log4j.Log4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.util.*;
@Service
public class TopicReportService {
@Value("${wxcp.topicreport.agentId}")
private Long agentId;
@Value("${wxcp.topicreport.corpId}")
private String corpId;
@Autowired
private TopicService topicService;
@Autowired
private ThemeService themeService;
@Autowired
private CommentService commentService;
@Autowired
private VisitLogService visitLogService;
@Autowired
private FeignClientForWxcp feignClientForWxcp;
@Autowired
private FeignClientForFatools feignClientForFatools;
// 每个工作日早上09:30汇报
public static String content_report_topic_weekday = "话题(%s) 当前总成员: %s, 当前总阅读: %s, 当前总讨论: %s, 昨日新增成员: %s, 昨日新增讨论";
public void reportTopicWeekday() {
List<TopicEntity> topics = topicService.queryTopicNeedReport();
for (TopicEntity topic : topics) {
// 当前总成员
Integer totalFollowNum = topicService.countTotalFollow(topic.getTopicId());
// 阅读量
Integer totalVisitNum = visitLogService.queryTopicDetailVisit(topic.getTopicId());
// 讨论量 包括主题数量和评论数量 不算长文
List<String> totalThemeIds = themeService.queryThemeIdsByTopic(topic.getTopicId());
Integer totalCommentNum = commentService.getCommentCountByThemeIds(totalThemeIds);
Integer totalDiscussNum = totalCommentNum + totalThemeIds.size();
Date endDate = DateUtils.getDayStartTime(new Date());
Date startDate = DateUtils.getAfterDay(endDate, -1);
// 昨日新增成员
Integer newFollowNum = topicService.countFollowByIdAndTime(topic.getTopicId(), startDate, endDate);
// 昨日新增讨论
List<String> newThemeIds = themeService.queryThemeIdsByTopic(topic.getTopicId(), startDate, endDate);
Integer newCommentNum = commentService.getCommentCountByThemeIds(totalThemeIds, startDate, endDate);
Integer newDiscussNum = newThemeIds.size() + newCommentNum;
String content = String.format(content_report_topic_weekday, topic.getTopicTitle(), totalFollowNum, totalVisitNum, totalDiscussNum, newFollowNum, newDiscussNum);
List<String> wxcpIds = getTopicManagerWxcpIds(topic.getTopicId());
sendReportMessage(content, wxcpIds);
}
}
// 每周六早上09:00汇报
public static String content_report_topic_saturday = "话题(%s) 当前总成员: %s, 当前总阅读: %s, 当前总讨论: %s, 截至本周五新增成员: %s, 昨日新增讨论";
public void reportTopicSaturday() {
List<TopicEntity> topics = topicService.queryTopicNeedReport();
for (TopicEntity topic : topics) {
// 当前总成员
Integer totalFollowNum = topicService.countTotalFollow(topic.getTopicId());
// 阅读量
Integer totalVisitNum = visitLogService.queryTopicDetailVisit(topic.getTopicId());
// 讨论量 包括主题数量和评论数量 不算长文
List<String> totalThemeIds = themeService.queryThemeIdsByTopic(topic.getTopicId());
Integer totalCommentNum = commentService.getCommentCountByThemeIds(totalThemeIds);
Integer totalDiscussNum = totalCommentNum + totalThemeIds.size();
Date today = DateUtils.getDayStartTime(new Date());
Date endDate = DateUtils.getAfterDay(today, -1);
Date startDate = DateUtils.getAfterDay(endDate, -5);
// 昨日新增成员
Integer newFollowNum = topicService.countFollowByIdAndTime(topic.getTopicId(), startDate, endDate);
// 昨日新增讨论
List<String> newThemeIds = themeService.queryThemeIdsByTopic(topic.getTopicId(), startDate, endDate);
Integer newCommentNum = commentService.getCommentCountByThemeIds(totalThemeIds, startDate, endDate);
Integer newDiscussNum = newThemeIds.size() + newCommentNum;
String content = String.format(content_report_topic_saturday, topic.getTopicTitle(), totalFollowNum, totalVisitNum, totalDiscussNum, newFollowNum, newDiscussNum);
List<String> wxcpIds = getTopicManagerWxcpIds(topic.getTopicId());
sendReportMessage(content, wxcpIds);
}
}
public void sendReportMessage(String content, List<String> wxcpIds) {
Map<String, Object> parmMap = new HashMap<>();
parmMap.put("type", "text");
parmMap.put("content", content);
parmMap.put("list", wxcpIds);
feignClientForWxcp.sendMessage(agentId, corpId, JSON.toJSONString(parmMap));
}
public List<String> getTopicManagerWxcpIds(String topicId) {
List<String> retList = new ArrayList<>();
List<TopicManagerEntity> managers = topicService.getManagersByTopic(topicId);
for (TopicManagerEntity mgr : managers) {
UserInfoVo user = feignClientForFatools.getUserInfoById(mgr.getUserId());
if (user != null && user.getUiTelphone() != null) {
// todo 应该用企业微信 这里暂时用手机号代替
retList.add(user.getUiTelphone());
}
}
return retList;
}
}
...@@ -54,4 +54,14 @@ ...@@ -54,4 +54,14 @@
where topic_id = #{topicId} where topic_id = #{topicId}
and create_time <![CDATA[>]]> #{minCreateTime} and create_time <![CDATA[>]]> #{minCreateTime}
</select> </select>
<!--auto generated by MybatisCodeHelper on 2022-02-22-->
<select id="queryRecentdaysOrHasTopic" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from theme
where delete_tag=#{deleteTag}
and ( create_time <![CDATA[>]]> #{minCreateTime}
or topic_id <![CDATA[<>]]> #{notTopicId})
</select>
</mapper> </mapper>
...@@ -34,6 +34,6 @@ ...@@ -34,6 +34,6 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from visit_log from visit_log
where visitor_id=#{visitorId} and ref_id=#{refId} where visitor_id=#{visitorId} and ref_id=#{refId}
order by update_time limit 1 order by update_time desc limit 1
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment