<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="org.springblade.modules.task.mapper.TaskMapper">
|
|
<!-- 通用查询映射结果 -->
|
<resultMap id="taskResultMap" type="org.springblade.modules.task.entity.Task">
|
<id column="id" property="id"/>
|
<result column="taskname" property="taskname"/>
|
<result column="content" property="content"/>
|
<result column="type" property="type"/>
|
<result column="handlep" property="handlep"/>
|
<result column="handname" property="handname"/>
|
<result column="handletime" property="handletime"/>
|
<result column="jd" property="jd"/>
|
<result column="wd" property="wd"/>
|
<result column="coordinate" property="coordinate"/>
|
|
<result column="tid" property="tid"/>
|
<result column="address" property="address"/>
|
</resultMap>
|
|
|
<select id="selectTaskPage" resultMap="taskResultMap">
|
select id,taskname,content,type,handlep,handname,handletime,FORMAT(jd,6) as jd,FORMAT(wd,6) as wd,ST_ASTEXT(coordinate) as coordinate,address from sys_task
|
</select>
|
|
|
<!--新增-->
|
<insert id="insertTask" parameterType="org.springblade.modules.task.entity.Task">
|
INSERT INTO sys_task (taskname,content,jd,wd,coordinate,tid,address) VALUES (#{taskname},#{content},#{jd},#{wd},POINT(#{jd},#{wd}),#{tid},#{address})
|
</insert>
|
|
<update id="updatet">
|
update sys_task SET type=#{type},handlep=#{handlep},handname=#{handname},handletime=#{handletime} where id=#{id}
|
</update>
|
|
<!--日常任务列表-->
|
<select id="selectList" resultMap="taskResultMap">
|
select id,taskname,content,type,handlep,handname,handletime,jd,wd,ST_ASTEXT(coordinate) as coordinate,tid,address from sys_task where type=0
|
</select>
|
|
<select id="selectInfo" resultMap="taskResultMap">
|
select id,taskname,content,type,handlep,handname,handletime,FORMAT(jd,6) as jd,FORMAT(wd,6) as wd,tid,address from sys_task where id=#{id}
|
</select>
|
|
<!--App日常任务列表-->
|
<select id="selectLists" resultMap="taskResultMap">
|
select id,taskname,content,type,handlep,handname,handletime,jd,wd,ST_ASTEXT(coordinate) as coordinate,tid,address from sys_task where 1=1
|
<if test="handleP!=null and handleP!=''">
|
and handleP=#{handleP}
|
</if>
|
<if test="type!=null and type!=''">
|
and type=#{type}
|
</if>
|
</select>
|
</mapper>
|