| | |
| | | select user_id,IFNULL(`name`,nick_name) as `name`,`type`,is_volunteer,is_partymember from sys_user where user_id = #{userId} |
| | | </select> |
| | | |
| | | <select id="pageMicroWishAdmin" resultType="com.panzhihua.common.model.vos.community.ComActMicroWishVO"> |
| | | SELECT |
| | | w.id, |
| | | u.`name` sponsor_name, |
| | | u.nick_name userNickName, |
| | | u.image_url , |
| | | w.sponsor_phone, |
| | | w.wish_name, |
| | | w.`status`, |
| | | w.`feedback_at`, |
| | | w.`examine_at`, |
| | | w.`distribution_at`, |
| | | w.`evaluate_at`, |
| | | w.`photo_path_list`, |
| | | count(wu.id)star_num, |
| | | w.`detail`, |
| | | w.form, |
| | | w.reject_reason, |
| | | su1.`name` responsible_name, |
| | | w.score, |
| | | w.img_width, |
| | | w.finish_at, |
| | | w.aim_num, |
| | | w.img_height, |
| | | w.handle_id, |
| | | w.create_at |
| | | FROM |
| | | com_act_micro_wish w |
| | | left join com_act_micro_wish_user wu on w.id=wu.micro_wish_id |
| | | left JOIN sys_user u ON w.sponsor_id = u.user_id |
| | | LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_id |
| | | <where> |
| | | <if test='comActMicroWishVO.communityId != null and comActMicroWishVO.communityId != 0'> |
| | | and w.community_id=#{comActMicroWishVO.communityId} |
| | | </if> |
| | | <if test='comActMicroWishVO.createBegin != null '> |
| | | AND w.create_at BETWEEN #{comActMicroWishVO.createBegin} |
| | | AND #{comActMicroWishVO.createEnd} |
| | | </if> |
| | | <if test='comActMicroWishVO.sponsorPhone != null and comActMicroWishVO.sponsorPhone != ""'> |
| | | AND u.`phone` like concat(#{comActMicroWishVO.sponsorPhone},'%') |
| | | </if> |
| | | <if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName != ""'> |
| | | AND u.`name` like concat(#{comActMicroWishVO.sponsorName},'%') |
| | | </if> |
| | | <if test='comActMicroWishVO.responsibleName != null and comActMicroWishVO.responsibleName != ""'> |
| | | AND su1.`name` like concat(#{comActMicroWishVO.responsibleName},'%') |
| | | </if> |
| | | <if test='comActMicroWishVO.status != null'> |
| | | AND w.`status` = #{comActMicroWishVO.status} |
| | | </if> |
| | | </where> |
| | | ORDER BY w.create_at desc |
| | | </select> |
| | | |
| | | </mapper> |