GisSurveyJobInfoMapper.xml 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="com.shkpr.service.alambizplugin.dbdao.mapper.GisSurveyJobInfoMapper">
  4. <select id="findRefreshTimeByUid" resultType="java.time.LocalDateTime">
  5. select to_timestamp(refresh_time / 1000.0) AT TIME ZONE 'PRC'
  6. from k3_gis_survey_job_info
  7. where uid = #{uid,jdbcType=VARCHAR};
  8. </select>
  9. <select id="findRuleFormatByUid" resultType="com.shkpr.service.alambizplugin.commtools.norule.RuleFormatSetting">
  10. select
  11. rf->>'name' as name,
  12. rf->>'functions' as functions,
  13. (rf->>'ordering')::int2 as ordering
  14. from
  15. v_k3_gis_survey_job_info,
  16. jsonb_array_elements(coalesce(
  17. nullif(rule_format, '')::jsonb,
  18. '[]'::jsonb
  19. )) as rf
  20. where uid = #{uid,jdbcType=VARCHAR};
  21. </select>
  22. <update id="updateRefreshTimeActionStatusByUid">
  23. update k3_gis_survey_job_info
  24. set refresh_time = #{refreshTime,jdbcType=BIGINT},
  25. solve_time = #{solveTime,jdbcType=BIGINT},
  26. action=#{action,jdbcType=SMALLINT},
  27. status=#{status,jdbcType=SMALLINT}
  28. where uid = #{uid,jdbcType=VARCHAR}
  29. and status = 2
  30. and disused = 0;
  31. </update>
  32. </mapper>