12345678910111213141516171819202122232425262728293031323334 |
- <?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="com.shkpr.service.alambizplugin.dbdao.mapper.GisSurveyJobInfoMapper">
- <select id="findRefreshTimeByUid" resultType="java.time.LocalDateTime">
- select to_timestamp(refresh_time / 1000.0) AT TIME ZONE 'PRC'
- from k3_gis_survey_job_info
- where uid = #{uid,jdbcType=VARCHAR};
- </select>
- <select id="findRuleFormatByUid" resultType="com.shkpr.service.alambizplugin.commtools.norule.RuleFormatSetting">
- select
- rf->>'name' as name,
- rf->>'functions' as functions,
- (rf->>'ordering')::int2 as ordering
- from
- v_k3_gis_survey_job_info,
- jsonb_array_elements(coalesce(
- nullif(rule_format, '')::jsonb,
- '[]'::jsonb
- )) as rf
- where uid = #{uid,jdbcType=VARCHAR};
- </select>
- <update id="updateRefreshTimeActionStatusByUid">
- update k3_gis_survey_job_info
- set refresh_time = #{refreshTime,jdbcType=BIGINT},
- solve_time = #{solveTime,jdbcType=BIGINT},
- action=#{action,jdbcType=SMALLINT},
- status=#{status,jdbcType=SMALLINT}
- where uid = #{uid,jdbcType=VARCHAR}
- and status = 2
- and disused = 0;
- </update>
- </mapper>
|