Browse Source

sql时间戳问题

v5
蟑螂恶霸 5 months ago
parent
commit
1d4fb1d390
  1. 16
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml
  2. 10
      lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

16
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnforcementRegistrationMapper.xml

@ -175,7 +175,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (law_enforcer_id = #{dataScopeId} or user_id = #{dataScopeId} or law_enforcer_id = #{dataScopeId} or FIND_IN_SET(#{dataScopeId}, law_enforcer_id_two)) and (law_enforcer_id = #{dataScopeId} or user_id = #{dataScopeId} or law_enforcer_id = #{dataScopeId} or FIND_IN_SET(#{dataScopeId}, law_enforcer_id_two))
</if> </if>
</where> </where>
order by enforcement_time desc order by enforcement_time desc, id DESC
<if test="params.pageNum != null and params.pageSize != null"><!-- 开始时间检索 --> <if test="params.pageNum != null and params.pageSize != null"><!-- 开始时间检索 -->
LIMIT #{params.pageNum}, #{params.pageSize} LIMIT #{params.pageNum}, #{params.pageSize}
</if> </if>
@ -276,7 +276,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and (law_enforcer_id = #{dataScopeId} or user_id = #{dataScopeId} or law_enforcer_id = #{dataScopeId} or FIND_IN_SET(#{dataScopeId}, law_enforcer_id_two)) and (law_enforcer_id = #{dataScopeId} or user_id = #{dataScopeId} or law_enforcer_id = #{dataScopeId} or FIND_IN_SET(#{dataScopeId}, law_enforcer_id_two))
</if> </if>
</where> </where>
order by enforcement_time desc order by enforcement_time desc, id DESC
</select> </select>
<select id="selectEnforcementRegistrationListNew" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> <select id="selectEnforcementRegistrationListNew" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">
@ -363,7 +363,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope} ${params.dataScope}
</if> </if>
</where> </where>
GROUP BY enterprise_number order by enforcement_time desc) t GROUP BY enterprise_number order by enforcement_time desc, id DESC) t
<where> <where>
<if test="numLeft != null and numLeft != ''"> <if test="numLeft != null and numLeft != ''">
and t.num &gt;= #{numLeft} and t.num &gt;= #{numLeft}
@ -449,7 +449,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!-- ${params.dataScope}--> <!-- ${params.dataScope}-->
<!-- </if>--> <!-- </if>-->
</where> </where>
order by enforcement_time desc order by enforcement_time desc, id DESC
</select> </select>
@ -524,7 +524,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
${params.dataScope} ${params.dataScope}
</if> </if>
</where> </where>
order by enforcement_time desc order by enforcement_time desc, id DESC
</select> </select>
<select id="selectEnforcementRegistrationAndAddressList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult"> <select id="selectEnforcementRegistrationAndAddressList" parameterType="EnforcementRegistration" resultMap="EnforcementRegistrationResult">
@ -687,7 +687,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if> </if>
</where> </where>
GROUP BY IFNULL(union_no, RAND()) GROUP BY IFNULL(union_no, RAND())
order by enforcement_time desc order by enforcement_time desc, id DESC
</select> </select>
@ -1279,7 +1279,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unionNo != null and unionNo !=''"> and union_no = #{unionNo}</if> <if test="unionNo != null and unionNo !=''"> and union_no = #{unionNo}</if>
and union_no is not null and union_no is not null
</where> </where>
order by enforcement_time desc order by enforcement_time desc, id DESC
</select> </select>
<select id="outTimeByUnion" parameterType="EnforcementRegistration" resultType="int"> <select id="outTimeByUnion" parameterType="EnforcementRegistration" resultType="int">
@ -1293,7 +1293,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="unionNo != null and unionNo !=''"> and union_no = #{unionNo}</if> <if test="unionNo != null and unionNo !=''"> and union_no = #{unionNo}</if>
and union_no is not null and union_no is not null
</where> </where>
order by enforcement_time desc order by enforcement_time desc, id DESC
</select> </select>
<update id="updateRegToUnionFlag" parameterType="EnforcementRegistration"> <update id="updateRegToUnionFlag" parameterType="EnforcementRegistration">

10
lib/EmergencyService/zdxtLawEnforcementCodeService/src/main/resources/mapper/EnterpriseInformationMapper.xml

@ -29,9 +29,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="qrCodeUrl" column="qr_code_url" /> <result property="qrCodeUrl" column="qr_code_url" />
</resultMap> </resultMap>
<sql id="selectEnterpriseInformationColumns">
id, enterprise_name, enterprise_number, enterprise_type, company_org_type, enterprise_address, legal_person, registered_capital, establishment_time,
operating_term, business_scope, create_time, create_by, user_id, dept_id, is_unsubscribe, is_delete, salt, enterprise_tel, industry, operating_term_end
</sql>
<sql id="selectEnterpriseInformationVo"> <sql id="selectEnterpriseInformationVo">
select id, enterprise_name, enterprise_number, enterprise_type, company_org_type, enterprise_address, legal_person, registered_capital, establishment_time, select <include refid="selectEnterpriseInformationColumns"/> from enterprise_information
operating_term, business_scope, create_time, create_by, user_id, dept_id,is_unsubscribe ,is_delete,salt,enterprise_tel,industry,operating_term_end from enterprise_information
</sql> </sql>
<select id="selectEnterpriseInformationList" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult"> <select id="selectEnterpriseInformationList" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult">
@ -107,7 +111,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectEnterpriseInformationAndQrInfo" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult"> <select id="selectEnterpriseInformationAndQrInfo" parameterType="EnterpriseInformation" resultMap="EnterpriseInformationResult">
SELECT SELECT
ei.*,gh.qr_code_url <include refid="selectEnterpriseInformationColumns"/>, gh.qr_code_url
FROM FROM
enterprise_information ei enterprise_information ei
LEFT JOIN ( LEFT JOIN (

Loading…
Cancel
Save