lidongdong
2023-11-13 48a703dec596b5d2c1b04b0b4f7ed0f28c1ca898
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NeedProblemInventoryMapper.xml
@@ -33,19 +33,82 @@
    <select id="getList" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO">
        SELECT
            <include refid="Base_Column_List" />
        FROM
        new_fight_need_problem_inventory
            nfpi.id,
            nfpi.title,
            nfpi.classify_id,
            canct.name as classifyName,
            nfpi.claim_num,
            nfpi.address,
            nfpi.lat,
            nfpi.lon,
            nfpi.claim_start_time,
            nfpi.claim_end_time,
            nfpi.need_start_time,
            nfpi.need_end_time,
            nfpi.linkman,
            nfpi.phone,
            nfpi.sign_in_scope,
            nfpi.sign_out_scope,
            nfpi.award,
            nfpi.content,
            nfpi.imgs_url,
            nfpi.creation_time,
            nfpi.update_time,
            nfpi.kind,
            nfpi.community_id,
            nfpi.user_id
        FROM new_fight_need_problem_inventory as nfpi
        left join com_act_neighbor_circle_topic as canct on canct.id=nfpi.classify_id
        <where>
            1=1
            <if test="kind !=null and kind != '' ">
                and kind =#{kind}
                and nfpi.kind =#{kind}
            </if>
            <if test="communityId !=null and communityId != '' ">
                and community_id =#{communityId}
                and nfpi.community_id =#{communityId}
            </if>
            <if test="userId !=null and userId != '' ">
                and user_id =#{userId}
                and nfpi.user_id =#{userId}
            </if>
        </where>
    </select>
    <select id="getMyJoinList" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO">
        SELECT
            nfpi.id,
            nfpi.title,
            nfpi.classify_id,
            canct.name as classifyName,
            nfpi.claim_num,
            nfpi.address,
            nfpi.lat,
            nfpi.lon,
            nfpi.claim_start_time,
            nfpi.claim_end_time,
            nfpi.need_start_time,
            nfpi.need_end_time,
            nfpi.linkman,
            nfpi.phone,
            nfpi.sign_in_scope,
            nfpi.sign_out_scope,
            nfpi.award,
            nfpi.content,
            nfpi.imgs_url,
            nfpi.creation_time,
            nfpi.update_time,
            nfpi.kind,
            nfpi.community_id,
            nfpi.user_id
        FROM new_fight_need_problem_inventory as nfpi
        left join com_act_neighbor_circle_topic as canct on canct.id=nfpi.classify_id
        <where>
            1=1
            <if test="kind !=null and kind != '' ">
                and nfpi.kind =#{kind}
            </if>
            <if test="userId !=null and userId != '' ">
                and nfpi.id in(SELECT task_id FROM new_fight_need_problem_claim where user_id=#{userId} )
            </if>
        </where>
    </select>
@@ -53,13 +116,36 @@
    <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemInventoryDTO">
        SELECT
            <include refid="Base_Column_List" />
        FROM
        new_fight_need_problem_inventory
            nfpi.id,
            nfpi.title,
            nfpi.classify_id,
            canct.name as classifyName,
            nfpi.claim_num,
            nfpi.address,
            nfpi.lat,
            nfpi.lon,
            nfpi.claim_start_time,
            nfpi.claim_end_time,
            nfpi.need_start_time,
            nfpi.need_end_time,
            nfpi.linkman,
            nfpi.phone,
            nfpi.sign_in_scope,
            nfpi.sign_out_scope,
            nfpi.award,
            nfpi.content,
            nfpi.imgs_url,
            nfpi.creation_time,
            nfpi.update_time,
            nfpi.kind,
            nfpi.community_id,
            nfpi.user_id
        FROM new_fight_need_problem_inventory as nfpi
        left join com_act_neighbor_circle_topic as canct on canct.id=nfpi.classify_id
        <where>
            1=1
            <if test="id !=null and id != '' ">
                and id =#{id}
                and nfpi.id =#{id}
            </if>
        </where>
    </select>