zxl
2025-12-22 cc4a3ff932b1e768914a4aff0eeaa866d08f9b91
business/src/main/resources/mapper/WorkStationScheduleMapper.xml
@@ -7,8 +7,8 @@
        <result column="user_id" property="userId" />
        <result column="content" property="content" />
        <result column="status" property="status" />
        <result column="gmtCreate" property="gmtcreate" />
        <result column="gmtUpdate" property="gmtupdate" />
        <result column="gmt_create" property="gmtCreate" />
        <result column="gmt_update" property="gmtUpdate" />
    </resultMap>
@@ -32,8 +32,8 @@
            TWSS.user_id,
            TWSS.content,
            TWSS.status,
            TWSS.gmtCreate,
            TWSS.gmtUpdate,
            TWSS.gmt_create,
            TWSS.gmt_update,
            TWSS.id
        FROM
            t_work_station_schedule TWSS
@@ -41,4 +41,24 @@
            TWSS.deleted = 0
    </select>
    <select id="groupByProjectAndDate" resultType="com.ycl.domain.vo.WorkStationScheduleVO">
        SELECT
        TWSS.id,
        TWSS.user_id,
        TWSS.content,
        TWSS.status,
        TWSS.project_id,
        TWSS.completed_time,
        TPI.project_name
        FROM t_work_station_schedule TWSS
        LEFT JOIN t_project_info TPI on TWSS.project_id = TPI.id
        WHERE TWSS.deleted = 0
        AND TWSS.user_id = #{userId}
        AND TWSS.completed_time BETWEEN #{startTime} AND #{endTime}
        <if test="projectId != null">
            AND TWSS.project_id = #{projectId}
        </if>;
    </select>
</mapper>