| | |
| | | WHERE id = #{id} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <select id="getNewMonitorData" resultType="com.yssh.entity.SuYuanMonitorData"> |
| | | select id, format(value, 2) "value", time |
| | | from yssh_qxsh |
| | | where name = #{name} and Cast(time as signed) between ${start} and ${end} |
| | | order by time desc; |
| | | </select> |
| | | |
| | | <select id="getMonthValueDataMax" resultType="java.util.Map"> |
| | | <foreach collection="tableNames" item="tableName" separator=" UNION "> |
| | |
| | | <select id="isTableExists" resultType="java.lang.Integer"> |
| | | select count(*) from information_schema.tables where table_name = #{tableName}; |
| | | </select> |
| | | |
| | | |
| | | <select id="selectFastById" resultType="com.yssh.entity.SuYuanFast"> |
| | | select * from yssh.suyuan_fast |
| | | where su_yuan_id = #{id} and create_time = #{time} |
| | | order by id; |
| | | </select> |
| | | |
| | | <update id="createTable" parameterType="java.lang.String"> |
| | | create table ${tablename} ( |
| | | create table ${tableName} ( |
| | | `id` varchar(10) not null comment '主键', |
| | | `x` int(3) null default null, |
| | | `y` int(3) null default null, |