| | |
| | | "su.`name` handler_name,\n" + |
| | | "p.`status`,\n" + |
| | | "p.`detail`,\n" + |
| | | "p.`photo_path_list`,\n" + |
| | | "p.create_at,\n" + |
| | | "p.examine_at \n" + |
| | | "FROM\n" + |
| | | "com_act_easy_photo p\n" + |
| | | "JOIN sys_user u ON p.sponsor_id = u.user_id \n" + |
| | | "<if test='comActEasyPhotoVO.userId != null and comActEasyPhotoVO.userId != 0'>" + |
| | | "AND u.`user_id` = #{comActEasyPhotoVO.userId} \n" + |
| | | " </if> " + |
| | | "left join com_act_easy_photo_user pu ON p.id = pu.easy_photo_id \n" + |
| | | "<if test='comActEasyPhotoVO.sponsorName != null and comActEasyPhotoVO.sponsorName.trim() != ""'>" + |
| | | "AND u.`name` = #{comActEasyPhotoVO.sponsorName} \n" + |
| | |
| | | "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != ""'>" + |
| | | "AND su.`name` = #{comActEasyPhotoVO.handlerName} \n" + |
| | | " </if> " + |
| | | " where p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | "<where>"+ |
| | | "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" + |
| | | " and p.community_id=#{comActEasyPhotoVO.communityId} " + |
| | | " </if> " + |
| | | "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != ""'>" + |
| | | "AND p.happen_addr = #{comActEasyPhotoVO.happenAddr} \n" + |
| | | " </if> " + |
| | |
| | | "<if test='comActEasyPhotoVO.sponsorId != null and comActEasyPhotoVO.sponsorId != 0'>" + |
| | | "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId} \n" + |
| | | " </if> " + |
| | | "</where>"+ |
| | | " group by p.id "+ |
| | | "</script>") |
| | | IPage<ComActEasyPhotoVO> pageEasyPhoto(Page page, @Param("comActEasyPhotoVO") ComActEasyPhotoVO comActEasyPhotoVO); |
| | | @Select("SELECT \n" + |
| | | "p.id,\n" + |
| | | "p.create_at,\n" + |
| | | "u.`name`,\n" + |
| | | "u.`name` sponsorName,\n" + |
| | | "u.`image_url`,\n" + |
| | | "u.phone,\n" + |
| | | "p.detail,\n" + |
| | |
| | | "su.`name`,\n" + |
| | | "p.handle_result,\n" + |
| | | "p.photo_path_list,\n" + |
| | | "count(pu.id)giveThumbsUpNum,\n" + |
| | | "p.handle_photo_list\n" + |
| | | "FROM\n" + |
| | | "com_act_easy_photo p\n" + |
| | | "JOIN sys_user u on p.sponsor_id=u.user_id\n" + |
| | | "LEFT JOIN sys_user su on p.handler_id=su.user_id\n" + |
| | | "LEFT JOIN com_act_easy_photo_user pu on p.id=pu.easy_photo_id\n" + |
| | | "WHERE p.id=#{id}") |
| | | ComActEasyPhotoVO detailEasyPhoto(Long id); |
| | | } |