From ccff69c44c520fb70ce7e1316a7de8cecaadafd3 Mon Sep 17 00:00:00 2001 From: 101captain <237651143@qq.com> Date: 星期三, 02 三月 2022 10:51:13 +0800 Subject: [PATCH] 三社功能修改 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActRaffleApi.java | 1 + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleMapper.xml | 4 +++- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleRecordMapper.xml | 6 ++++-- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialProjectMapper.xml | 2 +- springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/raffle/ComActRaffleVO.java | 3 +++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActRaffleApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActRaffleApi.java index f6bd6bb..da82d63 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActRaffleApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComActRaffleApi.java @@ -43,6 +43,7 @@ public R selectAll(@RequestBody CommonPage commonPage) { commonPage.setCommunityId(this.getCommunityId()); commonPage.setType(1); + commonPage.setUserId(this.getUserId()); return this.communityService.selectAllComActRaffle(commonPage); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/raffle/ComActRaffleVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/raffle/ComActRaffleVO.java index feb45ef..790702c 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/raffle/ComActRaffleVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/raffle/ComActRaffleVO.java @@ -154,4 +154,7 @@ @ApiModelProperty(value = "参与状态 0 不可参与 1 可参与") private Integer joinStatus; + + @ApiModelProperty("是否参与 0参与 1没参与") + private Integer isJoin; } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleMapper.xml index 9d0be6c..8d4d9de 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleMapper.xml @@ -23,12 +23,14 @@ </resultMap> <select id="pageList" resultType="com.panzhihua.common.model.vos.community.raffle.ComActRaffleVO"> - select t.*,t2.waitRaffleCount,t3.joinCount,t4.name as createName,t5.raffleCount,t6.prizeCount from com_act_raffle t + select t.*,t2.waitRaffleCount,t3.joinCount,t4.name as createName,t5.raffleCount,t6.prizeCount,ISNULL(t7.isJoin) as isJoin from com_act_raffle t LEFT JOIN (select count(*) waitRaffleCount,raffle_id from com_act_raffle_record where status = 1 group by raffle_id) t2 on t.id = t2.raffle_id LEFT JOIN (select count(*) as joinCount,raffle_id from com_act_raffle_record GROUP BY raffle_id) t3 on t.id = t3.raffle_id LEFT JOIN sys_user t4 on t.create_by = t4.user_id LEFT JOIN (select count(*) as raffleCount,raffle_id from com_act_raffle_record where status >0 GROUP BY raffle_id) t5 on t.id = t5.raffle_id LEFT JOIN (select sum(total) as prizeCount,raffle_id from com_act_raffle_prize GROUP BY raffle_id) t6 on t.id = t6.raffle_id + LEFT JOIN (select count(*) as isJoin,raffle_id from com_act_raffle_record <if test="commonPage.userId !=null"> where user_id = ${commonPage.userId} </if> group by raffle_id) t7 on t.id = t7.raffle_id + <where> <if test="commonPage.communityId!=null"> and t.community_id = #{commonPage.communityId} diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleRecordMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleRecordMapper.xml index 5ae967a..60257f6 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleRecordMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActRaffleRecordMapper.xml @@ -13,9 +13,11 @@ </resultMap> <select id="selectByUserId" resultType="com.panzhihua.common.model.vos.community.raffle.ComActRaffleRecordVO"> - select t.*, t1.`name`, t1.image + select t.*, t1.image, t1.name as prizeName, t2.nick_name, t2.phone, t2.`name` as username, t3.name as staffName from com_act_raffle_record t - LEFT JOIN com_act_raffle_prize t1 on t.prize_id = t1.id + left join com_act_raffle_prize t1 on t.prize_id = t1.id + left join sys_user t2 on t.user_id = t2.user_id + left join sys_user t3 on t.staff_id = t3.user_id where 1=1 <if test="userId !=null and userId !=0"> and t.user_id = #{userId} </if> and t.raffle_id = #{raffleId} </select> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialProjectMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialProjectMapper.xml index 846229e..e395762 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialProjectMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActSocialProjectMapper.xml @@ -25,7 +25,7 @@ 1=1 <if test="commonPage.paramId2==null"> <if test="commonPage.communityId !=0 and commonPage.communityId !=null"> - and t.community_id =#{commonPage.communityId} + and (t.community_id =#{commonPage.communityId} or t.responsibility_id =#{commonPage.communityId}) </if> <if test="commonPage.streetId !=0 and commonPage.streetId !=null"> and t.street_id =#{commonPage.streetId} -- Gitblit v1.7.1