Commit d0d6bc39 by 梅存智

小程序首页日历显示

parent db98d26b
......@@ -365,4 +365,13 @@ public interface TrainingProjectMapper extends BaseMapper<TrainingProject> {
* @return
*/
List<ActivityTypeVo> selectActivityType(@Param("companyId") Long companyId, @Param("siteId") Long siteId);
/**
* 获取可见范围项目ID
* @param siteId
* @param orgId
* @param accountId
* @return
*/
List<Long> getVisiables(@Param("siteId") Long siteId, @Param("orgId") Long orgId, @Param("accountId") Long accountId);
}
......@@ -916,4 +916,14 @@
where a.company_id = #{companyId} AND a.site_id = #{siteId} AND a.deleted = 0
ORDER BY a.create_time,a.id
</select>
<select id="getVisiables" resultType="java.lang.Long">
SELECT biz_id
FROM tp_authorization_range
WHERE site_id=#{siteId} AND relation_id=#{orgId} AND type=1 AND deleted = 0
union
SELECT biz_id
FROM tp_authorization_range
WHERE site_id=#{siteId} AND relation_id=#{accountId} AND type=2 AND deleted = 0
</select>
</mapper>
......@@ -1501,8 +1501,10 @@ public class TrainingProjectServiceImpl extends ServiceImpl<TrainingProjectMappe
RequestContext context = ContextHolder.get();
TrainingActivityVO item = new TrainingActivityVO();
//目前只需要统计一天,调用以前的方法就行
List<TrainingProjectVo> trainingProjectVos = trainingProjectMapper.apiPageListCount(null, null, context.getSiteId(), null, bizType);
//根据活动的可见范围显示日历
//获取可见范围
List<Long> visiableTpIds = trainingProjectMapper.getVisiables(context.getSiteId(), context.getOrgId(), context.getAccountId());
List<TrainingProjectVo> trainingProjectVos = trainingProjectMapper.apiPageListCount(visiableTpIds, null, context.getSiteId(), null, bizType);
if(!CollectionUtils.isEmpty(trainingProjectVos)){
List<String> list = new ArrayList<String>(1);
trainingProjectVos.stream().forEach(trainingProjectVo -> {
......
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