SopInstNodeMapper.xml 2.23 KB
<?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.process.modules.mapper.SopInstNodeMapper">
	<resultMap id="BaseResultMap" type="cn.com.glsx.process.modules.entity.SopInstNode">
		<!-- WARNING - @mbg.generated -->
		<id column="inst_node_id" jdbcType="INTEGER" property="instNodeId" />
		<result column="inst_id" jdbcType="VARCHAR" property="instId" />
		<result column="node_id" jdbcType="INTEGER" property="nodeId" />
		<result column="node_name" jdbcType="VARCHAR" property="nodeName" />
		<result column="node_type" jdbcType="VARCHAR" property="nodeType" />
		<result column="node_label" jdbcType="VARCHAR" property="nodeLabel" />
		<result column="node_key" jdbcType="VARCHAR" property="nodeKey" />
		<result column="node_show" jdbcType="VARCHAR" property="nodeShow" />
		<result column="node_param" jdbcType="VARCHAR" property="nodeParam" />
		<result column="node_content" jdbcType="VARCHAR" property="nodeContent" />
		<result column="node_visible" jdbcType="TINYINT" property="nodeVisible" />
		<result column="node_skip" jdbcType="TINYINT" property="nodeSkip" />
		<result column="node_cron" jdbcType="VARCHAR" property="nodeCron" />
		<result column="node_expire_cron" jdbcType="VARCHAR" property="nodeExpireCron" />
		<result column="node_status" jdbcType="INTEGER" property="nodeStatus" />
		<result column="daily_limit" jdbcType="INTEGER" property="dailyLimit" />
		<result column="daily_count" jdbcType="INTEGER" property="dailyCount" />
		<result column="daily_expire" jdbcType="TIMESTAMP" property="dailyExpire" />
	</resultMap>

	<sql id="Base_Column_List">
		<!-- WARNING - @mbg.generated -->
		inst_node_id, inst_id, node_id, node_name, node_type, node_label, node_key, node_show,
		node_param, node_content, node_visible, node_skip, node_cron, node_expire_cron, node_status, daily_limit, daily_count, daily_expire
	</sql>

	<select id="findByInstId" resultMap="BaseResultMap" parameterType="java.lang.String">
		SELECT
		node_id, node_name,node_type
		FROM sop_inst_node WHERE inst_id=#{instId}
	</select>
	
	<update id="resetInstNodeDailyCount">
		update sop_inst_node set daily_count=0 where inst_id=#{instId}
	</update>

</mapper>