mitao
2025-05-20 179c4d64313c9b7572778da4aaaf6c6584fe457d
springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/resources/mapper/NeedProblemUnitTaskMapper.xml
@@ -38,17 +38,28 @@
            nput.task_id,
            nput.user_id as unitUserId,
            nput.unit_id,
            npi.status,
            canct.name as classifyName,
            nput.creation_time,
            nput.update_time
        FROM
            new_fight_need_problem_unit_task as nput
        LEFT JOIN new_fight_need_problem_inventory AS npi ON npi.id=nput.task_id
        left join com_act_neighbor_circle_topic as canct on canct.id=npi.classify_id
        <where>
            1=1
            <if test="unitId !=null and unitId != '' ">
                and nput.unit_id =#{unitId}
            </if>
            <if test="kind !=null and kind != '' ">
                and npi.kind =#{kind}
            </if>
            <if test="status !=null and status != '' ">
                and npi.status =#{status}
            </if>
        </where>
        GROUP BY nput.id
        order by nput.creation_time desc
    </select>
    <select id="getDetails" resultType="com.panzhihua.common.model.dtos.partybuilding.NeedProblemUnitTaskDTO">
@@ -77,10 +88,13 @@
            nput.task_id,
            nput.user_id as unitUserId,
            nput.unit_id,
            npi.status,
            canct.name as classifyName,
            nput.creation_time,
            nput.update_time
        FROM new_fight_need_problem_unit_task as nput
        LEFT JOIN new_fight_need_problem_inventory AS npi ON npi.task_id=nput.id
        left join com_act_neighbor_circle_topic as canct on canct.id=npi.classify_id
        <where>
            1=1
            <if test="id !=null and id != '' ">
@@ -149,5 +163,20 @@
    </delete>
    <select id="isGet" resultType="Integer" >
        select count(id) from new_fight_need_problem_unit_task
        where
            1=1
            <if test="taskId != null and taskId != '' ">
               and task_id=#{taskId}
            </if>
            <if test=" unitId != null and unitId != '' ">
                and unit_id=#{unitId}
            </if>
    </select>
</mapper>