SopTaskConfigMapper.xml
2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?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="cn.com.glsx.dj.mindworkplate.mapper.SopTaskConfigMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.sop.SopTaskConfig" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="open_flag" property="openFlag" jdbcType="TINYINT" />
<result column="store_penetration_weekly" property="storePenetrationWeekly" jdbcType="DECIMAL" />
<result column="store_penetration_monthly" property="storePenetrationMonthly" jdbcType="DECIMAL" />
<result column="inspection_score" property="inspectionScore" jdbcType="DECIMAL" />
<result column="study_day" property="studyDay" jdbcType="INTEGER" />
<result column="finish_time" property="finishTime" jdbcType="INTEGER" />
<result column="punish_type" property="punishType" jdbcType="TINYINT" />
<result column="effective_type" property="effectiveType" jdbcType="TINYINT" />
<result column="effective_time" property="effectiveTime" jdbcType="TIMESTAMP" />
<result column="created_by" property="createdBy" jdbcType="VARCHAR" />
<result column="created_date" property="createdDate" jdbcType="TIMESTAMP" />
<result column="deleted_flag" property="deletedFlag" jdbcType="CHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, open_flag, store_penetration_weekly, store_penetration_monthly, inspection_score, study_day,
finish_time, punish_type, effective_type, effective_time, created_by, created_date,
deleted_flag
</sql>
<select id="getCurrentConfig" resultMap="BaseResultMap">
select * from sop_task_config
where deleted_flag = "N" and effective_time <= now()
order by effective_time desc, created_date desc limit 1
</select>
<select id="getLatestConfig" resultMap="BaseResultMap">
select * from sop_task_config
where deleted_flag = "N"
order by created_date desc limit 1
</select>
</mapper>