| | |
| | | package com.panzhihua.service_dangjian.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO; |
| | | import com.panzhihua.common.model.vos.partybuilding.PartyCommitteeVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbDynDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | | import org.apache.ibatis.annotations.Update; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.partybuilding.west.PartyBuildingComPbDynVO; |
| | | import com.panzhihua.service_dangjian.model.dos.ComPbDynDO; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | |
| | | **/ |
| | | @Mapper |
| | | public interface ComPbDynDAO extends BaseMapper<ComPbDynDO> { |
| | | // @Select("<script> " + |
| | | // " <where>" + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // "<if test='nameCn != null and nameCn.trim() != ""'>" + |
| | | // " </if> " + |
| | | // " </where>" + |
| | | // "</script>") |
| | | |
| | | IPage<PartyBuildingComPbDynVO> pageYnamic(Page page, |
| | | @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | |
| | | |
| | | @Select("<script> " + |
| | | "SELECT\n" + |
| | | "d.id,\n" + |
| | | "d.title,\n" + |
| | | "COUNT( u.id ) readingVolume,\n" + |
| | | "d.`status`,\n" + |
| | | "d.publish_at,\n" + |
| | | "d.create_at \n" + |
| | | "FROM\n" + |
| | | "com_pb_dyn d\n" + |
| | | "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id \n" + |
| | | "where d.type=#{type} \n" + |
| | | "<if test='communityId != null and communityId.trim() != ""'>" + |
| | | "d.community_id = #{communityId} \n" + |
| | | " </if> " + |
| | | "<if test='title != null and title.trim() != ""'>" + |
| | | "d.title = #{title} \n" + |
| | | " </if> " + |
| | | "<if test='status != null and status.trim() != ""'>" + |
| | | "AND d.`status` = #{status} \n" + |
| | | " </if> " + |
| | | "<if test='publishAtBegin != null and publishAtBegin.trim() != ""'>" + |
| | | "AND d.publish_at BETWEEN #{publishAtBegin} \n" + |
| | | "AND #{publishAtEnd} \n" + |
| | | " </if> " + |
| | | "GROUP BY\n" + |
| | | "d.id\n" + |
| | | "ORDER BY d.create_at desc"+ |
| | | "</script>") |
| | | IPage<PartyCommitteeVO> pageYnamic(Page page, @Param("partyBuildingComPbDynVO") PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | |
| | | IPage<com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO> pageYnamics(Page page, |
| | | @Param("partyBuildingComPbDynVO") com.panzhihua.common.model.vos.partybuilding.PartyBuildingComPbDynVO partyBuildingComPbDynVO); |
| | | |
| | | |
| | | |
| | | |
| | | @Update("update com_pb_dyn set `status`=2 WHERE `status`=1 and TIMESTAMPDIFF(MINUTE,SYSDATE(),publish_at)<=0") |
| | | int timedTaskPartyBuildingStatus(); |
| | | |
| | | @Select("<script> " + "SELECT\n" + " distinct COUNT( u.id ) readingVolume,\n" |
| | | + " d.community_id, d.content, d.cover, d.cover_mode, d.create_at, d.create_by, d.dyn_type, d.id, d.publish_at, d.status, d.title, d.type,d.policy_type, \n" |
| | | + " act.name as createByName,d.jump_type,d.jump_url " + "FROM\n" |
| | | + "com_pb_dyn d LEFT JOIN com_act act ON d.community_id = act.community_id \n" |
| | | + "LEFT JOIN com_pb_dyn_user u ON d.id = u.dyn_id " + "where d.id = #{id} " + " group by d.id " + "</script>") |
| | | PartyBuildingComPbDynVO selectVoById(@Param("id") Long id); |
| | | } |