mirror of
https://gitee.com/sdyunze/iotlink.git
synced 2026-10-31 02:01:46 +08:00
2.0.0慢sql优化
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -172,4 +172,4 @@
|
||||
</insert>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -554,4 +554,4 @@
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND a.packet_id = b.packet_id
|
||||
AND a.ord_no = c.ord_no
|
||||
<if test="NotExpired == 1">
|
||||
AND DATE_FORMAT( a.end_time, "%Y-%m-%d %H:%i:%S") > DATE_FORMAT(now(), "%Y-%m-%d %H:%i:%S")
|
||||
AND a.end_time > now()
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY start_time
|
||||
@@ -94,7 +94,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND b.package_id = #{package_id}
|
||||
AND b.dept_id = #{agent_id}
|
||||
<if test="NotExpired == 1">
|
||||
AND DATE_FORMAT( a.end_time, "%Y-%m-%d %H:%i:%S") > DATE_FORMAT(now(), "%Y-%m-%d %H:%i:%S")
|
||||
AND a.end_time > now()
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY start_time
|
||||
@@ -589,4 +589,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -138,4 +138,4 @@
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<mapper namespace="com.yunze.cn.mapper.YzCardPacketMapper">
|
||||
|
||||
|
||||
<sql id="selwhere" >
|
||||
<sql id="selwhere">
|
||||
<where>
|
||||
1=1
|
||||
<if test="packetValue!=null and packetValue!=''">
|
||||
@@ -15,131 +15,130 @@
|
||||
</if>
|
||||
</if>
|
||||
<if test="wechat_pay != null and wechat_pay != '' and wechat_pay.size>0">
|
||||
and a.wechat_pay in
|
||||
and a.wechat_pay in
|
||||
<foreach item="wechat_pay" collection="wechat_pay" index="wechat_pay" open="(" separator="," close=")">
|
||||
#{wechat_pay}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="balance_pay != null and balance_pay != '' and balance_pay.size>0">
|
||||
and a.balance_pay in
|
||||
<foreach item="balance_pay" collection="balance_pay" index="balance_pay" open="(" separator="," close=")">
|
||||
and a.balance_pay in
|
||||
<foreach item="balance_pay" collection="balance_pay" index="balance_pay" open="(" separator=","
|
||||
close=")">
|
||||
#{balance_pay}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="is_month != null and is_month != '' and is_month.size>0">
|
||||
and a.is_month in
|
||||
and a.is_month in
|
||||
<foreach item="is_month" collection="is_month" index="is_month" open="(" separator="," close=")">
|
||||
#{is_month}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="in_stock != null and in_stock != '' and in_stock.size>0">
|
||||
and a.in_stock in
|
||||
and a.in_stock in
|
||||
<foreach item="in_stock" collection="in_stock" index="in_stock" open="(" separator="," close=")">
|
||||
#{in_stock}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="packet_valid_type != null and packet_valid_type != '' and packet_valid_type.size>0">
|
||||
and a.packet_valid_type in
|
||||
<foreach item="packet_valid_type" collection="packet_valid_type" index="packet_valid_type" open="(" separator="," close=")">
|
||||
and a.packet_valid_type in
|
||||
<foreach item="packet_valid_type" collection="packet_valid_type" index="packet_valid_type" open="("
|
||||
separator="," close=")">
|
||||
#{packet_valid_type}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="dept_id != null and dept_id != '' and dept_id.size>0">
|
||||
and a.dept_id in
|
||||
and a.dept_id in
|
||||
<foreach item="dept_id" collection="dept_id" index="dept_id" open="(" separator="," close=")">
|
||||
#{dept_id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="package_id != null and package_id != '' and package_id.size>0">
|
||||
and a.package_id in
|
||||
and a.package_id in
|
||||
<foreach item="package_id" collection="package_id" index="package_id" open="(" separator="," close=")">
|
||||
#{package_id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="agent_id != null and agent_id != '' and agent_id.size>0">
|
||||
and a.dept_id in
|
||||
and a.dept_id in
|
||||
<foreach item="agent_id" collection="agent_id" index="agent_id" open="(" separator="," close=")">
|
||||
#{agent_id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="id!=null and id != '' ">
|
||||
and a.id = #{id}
|
||||
and a.id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
${dataScope}
|
||||
</sql>
|
||||
|
||||
<select id="selMap" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
<select id="selMap" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.base_packet_type,
|
||||
a.packet_type,
|
||||
a.is_profit,
|
||||
a.show_profit,
|
||||
a.wechat_pay,
|
||||
a.balance_pay,
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.base_packet_type,
|
||||
a.packet_type,
|
||||
a.is_profit,
|
||||
a.show_profit,
|
||||
a.wechat_pay,
|
||||
a.balance_pay,
|
||||
DATE_FORMAT( a.create_time, "%Y-%m-%d %H:%i:%S" ) AS create_time,
|
||||
a.error_flow,
|
||||
a.error_so,
|
||||
a.packet_valid_time,
|
||||
a.packet_cost,
|
||||
a.is_month,
|
||||
a.date_limit,
|
||||
a.deduction,
|
||||
a.in_stock,
|
||||
a.packet_valid_type,
|
||||
a.dept_id,
|
||||
a.user_id,
|
||||
a.packet_valid_name
|
||||
a.error_flow,
|
||||
a.error_so,
|
||||
a.packet_valid_time,
|
||||
a.packet_cost,
|
||||
a.is_month,
|
||||
a.date_limit,
|
||||
a.deduction,
|
||||
a.in_stock,
|
||||
a.packet_valid_type,
|
||||
a.dept_id,
|
||||
a.user_id,
|
||||
a.packet_valid_name
|
||||
FROM
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
<include refid="selwhere"/>
|
||||
GROUP BY a.id
|
||||
LIMIT #{StarRow},#{PageSize}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--查询资费计划信息-->
|
||||
<select id="FindList" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
<select id="FindList" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.base_packet_type,
|
||||
a.packet_type,
|
||||
a.is_profit,
|
||||
a.show_profit,
|
||||
a.wechat_pay,
|
||||
a.balance_pay,
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.base_packet_type,
|
||||
a.packet_type,
|
||||
a.is_profit,
|
||||
a.show_profit,
|
||||
a.wechat_pay,
|
||||
a.balance_pay,
|
||||
DATE_FORMAT( a.create_time, "%Y-%m-%d %H:%i:%S" ) AS create_time,
|
||||
a.error_flow,
|
||||
a.error_so,
|
||||
a.packet_valid_time,
|
||||
a.packet_cost,
|
||||
a.is_month,
|
||||
a.date_limit,
|
||||
a.deduction,
|
||||
a.in_stock,
|
||||
a.packet_valid_type,
|
||||
a.dept_id,
|
||||
a.user_id,
|
||||
a.packet_valid_name
|
||||
a.error_flow,
|
||||
a.error_so,
|
||||
a.packet_valid_time,
|
||||
a.packet_cost,
|
||||
a.is_month,
|
||||
a.date_limit,
|
||||
a.deduction,
|
||||
a.in_stock,
|
||||
a.packet_valid_type,
|
||||
a.dept_id,
|
||||
a.user_id,
|
||||
a.packet_valid_name
|
||||
FROM
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
@@ -150,168 +149,162 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selMapCount" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
<select id="selMapCount" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
SELECT
|
||||
a.id
|
||||
a.id
|
||||
FROM
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
<include refid="selwhere"/>
|
||||
GROUP BY a.id
|
||||
</select>
|
||||
|
||||
|
||||
<!--获取资费组id-->
|
||||
<select id="getPackage_id" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
<select id="getPackage_id" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
SELECT
|
||||
a.package_id
|
||||
a.package_id
|
||||
FROM
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
<include refid="selwhere"/>
|
||||
GROUP BY a.id
|
||||
</select>
|
||||
|
||||
|
||||
<!--查询 packet_id 是否存在-->
|
||||
<select id="isExist" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
||||
<select id="isExist" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
COUNT(*)
|
||||
FROM
|
||||
yz_card_packet
|
||||
yz_card_packet
|
||||
<where>
|
||||
packet_id = #{packet_id}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="add" parameterType="java.util.HashMap">
|
||||
INSERT INTO
|
||||
yz_card_packet
|
||||
INSERT INTO
|
||||
yz_card_packet
|
||||
(
|
||||
package_id,
|
||||
packet_id,
|
||||
packet_name,
|
||||
packet_wx_name,
|
||||
packet_price,
|
||||
packet_flow,
|
||||
base_packet_type,
|
||||
packet_type,
|
||||
is_profit,
|
||||
show_profit,
|
||||
wechat_pay,
|
||||
balance_pay,
|
||||
create_time,
|
||||
error_flow,
|
||||
error_so,
|
||||
packet_valid_time,
|
||||
packet_cost,
|
||||
is_month,
|
||||
date_limit,
|
||||
deduction,
|
||||
in_stock,
|
||||
packet_valid_type,
|
||||
dept_id,
|
||||
user_id,
|
||||
packet_valid_name
|
||||
package_id,
|
||||
packet_id,
|
||||
packet_name,
|
||||
packet_wx_name,
|
||||
packet_price,
|
||||
packet_flow,
|
||||
base_packet_type,
|
||||
packet_type,
|
||||
is_profit,
|
||||
show_profit,
|
||||
wechat_pay,
|
||||
balance_pay,
|
||||
create_time,
|
||||
error_flow,
|
||||
error_so,
|
||||
packet_valid_time,
|
||||
packet_cost,
|
||||
is_month,
|
||||
date_limit,
|
||||
deduction,
|
||||
in_stock,
|
||||
packet_valid_type,
|
||||
dept_id,
|
||||
user_id,
|
||||
packet_valid_name
|
||||
)value (
|
||||
#{package_id},
|
||||
#{packet_id},
|
||||
#{packet_name},
|
||||
#{packet_wx_name},
|
||||
#{packet_price},
|
||||
#{packet_flow},
|
||||
<if test="base_packet_type != null and base_packet_type != ''">
|
||||
#{base_packet_type},
|
||||
</if>
|
||||
<if test="base_packet_type == null ">
|
||||
0,
|
||||
</if>
|
||||
<if test="packet_type != null and packet_type != ''">
|
||||
#{packet_type},
|
||||
</if>
|
||||
<if test="packet_type == null ">
|
||||
0,
|
||||
</if>
|
||||
<if test="is_profit != null and is_profit != ''">
|
||||
#{is_profit},
|
||||
</if>
|
||||
<if test="is_profit == null ">
|
||||
0,
|
||||
</if>
|
||||
<if test="show_profit != null and show_profit != ''">
|
||||
#{show_profit},
|
||||
</if>
|
||||
<if test="show_profit == null ">
|
||||
0,
|
||||
</if>
|
||||
#{wechat_pay},
|
||||
#{balance_pay},
|
||||
now(),
|
||||
#{error_flow},
|
||||
#{error_so},
|
||||
#{packet_valid_time},
|
||||
#{packet_cost},
|
||||
#{is_month},
|
||||
<if test="date_limit != null and date_limit != ''">
|
||||
#{date_limit},
|
||||
</if>
|
||||
<if test="date_limit == null ">
|
||||
'',
|
||||
</if>
|
||||
#{deduction},
|
||||
#{in_stock},
|
||||
#{packet_valid_type},
|
||||
'100',
|
||||
'1',
|
||||
#{packet_valid_name}
|
||||
#{package_id},
|
||||
#{packet_id},
|
||||
#{packet_name},
|
||||
#{packet_wx_name},
|
||||
#{packet_price},
|
||||
#{packet_flow},
|
||||
<if test="base_packet_type != null and base_packet_type != ''">
|
||||
#{base_packet_type},
|
||||
</if>
|
||||
<if test="base_packet_type == null ">
|
||||
0,
|
||||
</if>
|
||||
<if test="packet_type != null and packet_type != ''">
|
||||
#{packet_type},
|
||||
</if>
|
||||
<if test="packet_type == null ">
|
||||
0,
|
||||
</if>
|
||||
<if test="is_profit != null and is_profit != ''">
|
||||
#{is_profit},
|
||||
</if>
|
||||
<if test="is_profit == null ">
|
||||
0,
|
||||
</if>
|
||||
<if test="show_profit != null and show_profit != ''">
|
||||
#{show_profit},
|
||||
</if>
|
||||
<if test="show_profit == null ">
|
||||
0,
|
||||
</if>
|
||||
#{wechat_pay},
|
||||
#{balance_pay},
|
||||
now(),
|
||||
#{error_flow},
|
||||
#{error_so},
|
||||
#{packet_valid_time},
|
||||
#{packet_cost},
|
||||
#{is_month},
|
||||
<if test="date_limit != null and date_limit != ''">
|
||||
#{date_limit},
|
||||
</if>
|
||||
<if test="date_limit == null ">
|
||||
'',
|
||||
</if>
|
||||
#{deduction},
|
||||
#{in_stock},
|
||||
#{packet_valid_type},
|
||||
'100',
|
||||
'1',
|
||||
#{packet_valid_name}
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
<!--查询 package_id 是否存在-->
|
||||
<select id="find" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
<select id="find" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.base_packet_type,
|
||||
a.packet_type,
|
||||
a.is_profit,
|
||||
a.show_profit,
|
||||
a.wechat_pay,
|
||||
a.balance_pay,
|
||||
a.create_time,
|
||||
a.error_flow,
|
||||
a.error_so,
|
||||
a.packet_valid_time,
|
||||
a.packet_cost,
|
||||
a.is_month,
|
||||
a.date_limit,
|
||||
a.deduction,
|
||||
a.in_stock,
|
||||
a.packet_valid_type,
|
||||
a.packet_valid_name
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.base_packet_type,
|
||||
a.packet_type,
|
||||
a.is_profit,
|
||||
a.show_profit,
|
||||
a.wechat_pay,
|
||||
a.balance_pay,
|
||||
a.create_time,
|
||||
a.error_flow,
|
||||
a.error_so,
|
||||
a.packet_valid_time,
|
||||
a.packet_cost,
|
||||
a.is_month,
|
||||
a.date_limit,
|
||||
a.deduction,
|
||||
a.in_stock,
|
||||
a.packet_valid_type,
|
||||
a.packet_valid_name
|
||||
FROM
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
LEFT JOIN sys_user u ON a.user_id = u.user_id
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
LEFT JOIN sys_user u ON a.user_id = u.user_id
|
||||
<include refid="selwhere"/>
|
||||
GROUP BY a.id
|
||||
</select>
|
||||
@@ -320,7 +313,7 @@
|
||||
<!--修改 资费计划信息-->
|
||||
<update id="update" parameterType="java.util.HashMap">
|
||||
UPDATE
|
||||
yz_card_packet
|
||||
yz_card_packet
|
||||
<set>
|
||||
package_id = #{package_id},
|
||||
packet_id = #{packet_id},
|
||||
@@ -351,53 +344,52 @@
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<!--查询 平台资费计划 划分信息 -->
|
||||
<select id="findPacket" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
<select id="findPacket" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.error_so,
|
||||
a.error_flow,
|
||||
a.packet_cost,
|
||||
a.error_so as set_error_so,
|
||||
a.packet_price as set_packet_price,
|
||||
a.packet_price as set_packet_cost
|
||||
a.id,
|
||||
a.package_id,
|
||||
a.packet_id,
|
||||
a.packet_name,
|
||||
a.packet_wx_name,
|
||||
a.packet_price,
|
||||
a.packet_flow,
|
||||
a.error_so,
|
||||
a.error_flow,
|
||||
a.packet_cost,
|
||||
a.error_so as set_error_so,
|
||||
a.packet_price as set_packet_price,
|
||||
a.packet_price as set_packet_cost
|
||||
FROM
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
LEFT JOIN sys_user u ON a.user_id = u.user_id
|
||||
yz_card_packet a
|
||||
LEFT JOIN sys_dept d ON a.dept_id = d.dept_id
|
||||
LEFT JOIN sys_user_role ur ON a.user_id = ur.user_id
|
||||
LEFT JOIN sys_role r ON r.role_id = ur.role_id
|
||||
LEFT JOIN sys_user u ON a.user_id = u.user_id
|
||||
<include refid="selwhere"/>
|
||||
GROUP BY a.id
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 微信充值 获取资费计划列表-->
|
||||
<select id="findWebRecharge" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
<select id="findWebRecharge" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
packet_id,
|
||||
package_id,
|
||||
packet_wx_name,
|
||||
packet_price,
|
||||
packet_flow,
|
||||
base_packet_type,
|
||||
packet_type,
|
||||
wechat_pay,
|
||||
balance_pay,
|
||||
packet_valid_name,
|
||||
packet_valid_time,
|
||||
date_limit,
|
||||
dept_id,
|
||||
packet_valid_type
|
||||
packet_id,
|
||||
package_id,
|
||||
packet_wx_name,
|
||||
packet_price,
|
||||
packet_flow,
|
||||
base_packet_type,
|
||||
packet_type,
|
||||
wechat_pay,
|
||||
balance_pay,
|
||||
packet_valid_name,
|
||||
packet_valid_time,
|
||||
date_limit,
|
||||
dept_id,
|
||||
packet_valid_type
|
||||
FROM
|
||||
yz_card_packet
|
||||
yz_card_packet
|
||||
<where>
|
||||
in_stock = 1
|
||||
AND packet_valid_type != '4'
|
||||
@@ -413,12 +405,12 @@
|
||||
</select>
|
||||
|
||||
<!--查询 是否已充值过 仅一次充值自资费计划类型 -->
|
||||
<select id="findWebOnlyOnce" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
<select id="findWebOnlyOnce" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
SELECT
|
||||
a.packet_id
|
||||
a.packet_id
|
||||
FROM
|
||||
yz_card_packet a,
|
||||
yz_order b
|
||||
yz_card_packet a,
|
||||
yz_order b
|
||||
<where>
|
||||
a.packet_id = b.packet_id
|
||||
and a.packet_type = '2'
|
||||
@@ -433,10 +425,10 @@
|
||||
|
||||
|
||||
<!-- 微信充值 获取资费计划 支付类型-->
|
||||
<select id="findPayType" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
<select id="findPayType" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
wechat_pay,
|
||||
balance_pay
|
||||
wechat_pay,
|
||||
balance_pay
|
||||
FROM
|
||||
yz_card_packet
|
||||
<where>
|
||||
@@ -446,5 +438,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yunze.cn.mapper.YzExecutionTaskMapper">
|
||||
|
||||
<sql id="selwhere" >
|
||||
<sql id="selwhere">
|
||||
<where>
|
||||
<if test="value!=null and value!='' ">
|
||||
<if test="type==1">
|
||||
@@ -22,7 +22,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="taskType!=null and taskType!='' ">
|
||||
AND type = #{taskType}
|
||||
AND type = #{taskType}
|
||||
</if>
|
||||
</where>
|
||||
</sql>
|
||||
@@ -31,7 +31,7 @@
|
||||
<!-- 查询 -->
|
||||
<select id="sel_Map" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
id,
|
||||
id,
|
||||
DATE_FORMAT(
|
||||
create_time,
|
||||
'%Y-%m-%d %H:%i:%S'
|
||||
@@ -48,14 +48,14 @@
|
||||
end_time,
|
||||
'%Y-%m-%d %H:%i:%S'
|
||||
) AS end_time,
|
||||
task_name,
|
||||
url,
|
||||
auth,
|
||||
agent_id,
|
||||
type
|
||||
task_name,
|
||||
url,
|
||||
auth,
|
||||
agent_id,
|
||||
type
|
||||
FROM
|
||||
yz_execution_task
|
||||
<include refid="selwhere"/>
|
||||
yz_execution_task
|
||||
<include refid="selwhere"/>
|
||||
ORDER BY
|
||||
<if test="ORDER_BY_type==null or ORDER_BY_type==1">
|
||||
create_time
|
||||
@@ -79,55 +79,49 @@
|
||||
<!-- 查询 总数-->
|
||||
<select id="sel_Map_Count" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
COUNT(*)
|
||||
FROM
|
||||
yz_execution_task
|
||||
yz_execution_task
|
||||
<include refid="selwhere"/>
|
||||
</select>
|
||||
|
||||
<!--新增任务-->
|
||||
<insert id="add" parameterType="java.util.HashMap" useGeneratedKeys="true" keyProperty="id" >
|
||||
INSERT INTO
|
||||
yz_execution_task
|
||||
(
|
||||
create_time,
|
||||
update_time,
|
||||
start_time,
|
||||
task_name,
|
||||
url,
|
||||
auth,
|
||||
agent_id,
|
||||
type
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
now(),
|
||||
now(),
|
||||
now(),
|
||||
#{task_name},
|
||||
#{url},
|
||||
#{auth},
|
||||
#{agent_id},
|
||||
#{type}
|
||||
)
|
||||
<insert id="add" parameterType="java.util.HashMap" useGeneratedKeys="true" keyProperty="id">
|
||||
INSERT INTO yz_execution_task
|
||||
(create_time,
|
||||
update_time,
|
||||
start_time,
|
||||
task_name,
|
||||
url,
|
||||
auth,
|
||||
agent_id,
|
||||
type)
|
||||
VALUES (now(),
|
||||
now(),
|
||||
now(),
|
||||
#{task_name},
|
||||
#{url},
|
||||
#{auth},
|
||||
#{agent_id},
|
||||
#{type})
|
||||
</insert>
|
||||
|
||||
|
||||
<!-- 修改任务结束时间 -->
|
||||
<update id="set_end_time" parameterType="java.util.HashMap">
|
||||
<update id="set_end_time" parameterType="java.util.HashMap">
|
||||
update
|
||||
yz_execution_task
|
||||
<set>
|
||||
end_time = now(),
|
||||
update_time = now()
|
||||
</set>
|
||||
yz_execution_task
|
||||
<set>
|
||||
end_time = now(),
|
||||
update_time = now()
|
||||
</set>
|
||||
<where>
|
||||
id = #{id}
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<!-- 修改 地址 -->
|
||||
<update id="upd" parameterType="java.util.HashMap">
|
||||
<update id="upd" parameterType="java.util.HashMap">
|
||||
update
|
||||
yz_execution_task
|
||||
<set>
|
||||
@@ -140,5 +134,4 @@
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -67,10 +67,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time, "%Y-%m-%d %H:%i:%S" )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( add_package_time, "%Y-%m-%d %H:%i:%S" )
|
||||
add_package_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -392,7 +392,7 @@
|
||||
<where>
|
||||
status = 1
|
||||
and del_flag = 0
|
||||
and DATE_FORMAT( create_time, "%Y-%m-%d" ) BETWEEN #{staTime} AND #{endTime}
|
||||
and create_time BETWEEN #{staTime} AND #{endTime}
|
||||
and
|
||||
<if test="type==1 ">
|
||||
is_dd_exCount
|
||||
|
||||
+60
-66
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yunze.cn.mapper.YzPassagewayPollingMapper">
|
||||
|
||||
<sql id="selwhere" >
|
||||
<sql id="selwhere">
|
||||
<where>
|
||||
|
||||
|
||||
@@ -11,57 +11,51 @@
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
|
||||
<insert id="add" parameterType="java.util.HashMap">
|
||||
INSERT INTO
|
||||
yz_passageway_polling
|
||||
(
|
||||
cd_id,
|
||||
create_date,
|
||||
cd_count,
|
||||
cd_current,
|
||||
polling_id,
|
||||
upd_date,
|
||||
polling_type
|
||||
)value (
|
||||
#{cd_id},
|
||||
now(),
|
||||
#{cd_count},
|
||||
#{cd_current},
|
||||
#{polling_id},
|
||||
now(),
|
||||
#{polling_type}
|
||||
)
|
||||
INSERT INTO yz_passageway_polling
|
||||
(cd_id,
|
||||
create_date,
|
||||
cd_count,
|
||||
cd_current,
|
||||
polling_id,
|
||||
upd_date,
|
||||
polling_type) value ( #{cd_id},
|
||||
now(),
|
||||
#{cd_count},
|
||||
#{cd_current},
|
||||
#{polling_id},
|
||||
now(),
|
||||
#{polling_type}
|
||||
)
|
||||
|
||||
</insert>
|
||||
|
||||
<!-- 查询 轮询数据 -->
|
||||
<select id="find_route" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
id,
|
||||
cd_id,
|
||||
create_date,
|
||||
upd_date,
|
||||
cd_count,
|
||||
cd_current,
|
||||
polling_id,
|
||||
syn_date,
|
||||
polling_type
|
||||
FROM
|
||||
yz_passageway_polling
|
||||
<where>
|
||||
cd_id = #{cd_id}
|
||||
</where>
|
||||
SELECT
|
||||
id,
|
||||
cd_id,
|
||||
create_date,
|
||||
upd_date,
|
||||
cd_count,
|
||||
cd_current,
|
||||
polling_id,
|
||||
syn_date,
|
||||
polling_type
|
||||
FROM
|
||||
yz_passageway_polling
|
||||
<where>
|
||||
cd_id = #{cd_id}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 查询 -->
|
||||
<select id="sel_Map" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
id,
|
||||
cd_id,
|
||||
reateTime,
|
||||
id,
|
||||
cd_id,
|
||||
reateTime,
|
||||
DATE_FORMAT(
|
||||
create_date,
|
||||
'%Y-%m-%d %H:%i:%S'
|
||||
@@ -70,47 +64,47 @@
|
||||
upd_date,
|
||||
'%Y-%m-%d %H:%i:%S'
|
||||
) AS upd_date,
|
||||
cd_count,
|
||||
cd_current,
|
||||
polling_id,
|
||||
cd_count,
|
||||
cd_current,
|
||||
polling_id,
|
||||
DATE_FORMAT(
|
||||
syn_date,
|
||||
'%Y-%m-%d %H:%i:%S'
|
||||
) AS syn_date,
|
||||
polling_type
|
||||
polling_type
|
||||
FROM
|
||||
yz_passageway_polling
|
||||
yz_passageway_polling
|
||||
<include refid="selwhere"/>
|
||||
|
||||
ORDER BY
|
||||
<if test="ORDER_BY_type==null or ORDER_BY_type==1">
|
||||
create_date
|
||||
</if>
|
||||
<if test="ORDER_BY_type==2">
|
||||
polling_id
|
||||
</if>
|
||||
<if test="ORDER_BY_rule==null or ORDER_BY_rule==1">
|
||||
ASC
|
||||
</if>
|
||||
<if test="ORDER_BY_rule==2">
|
||||
DESC
|
||||
</if>
|
||||
ORDER BY
|
||||
<if test="ORDER_BY_type==null or ORDER_BY_type==1">
|
||||
create_date
|
||||
</if>
|
||||
<if test="ORDER_BY_type==2">
|
||||
polling_id
|
||||
</if>
|
||||
<if test="ORDER_BY_rule==null or ORDER_BY_rule==1">
|
||||
ASC
|
||||
</if>
|
||||
<if test="ORDER_BY_rule==2">
|
||||
DESC
|
||||
</if>
|
||||
LIMIT #{StarRow},#{PageSize}
|
||||
</select>
|
||||
|
||||
<!-- 查询 总数-->
|
||||
<select id="sel_Map_Count" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
||||
SELECT
|
||||
COUNT(*)
|
||||
COUNT(*)
|
||||
FROM
|
||||
yz_passageway_polling
|
||||
yz_passageway_polling
|
||||
<include refid="selwhere"/>
|
||||
</select>
|
||||
|
||||
<!-- 修改 轮询数量 -->
|
||||
<update id="update_cd_current" parameterType="java.util.HashMap">
|
||||
UPDATE
|
||||
yz_passageway_polling
|
||||
yz_passageway_polling
|
||||
<set>
|
||||
syn_date = now(),
|
||||
upd_date = now(),
|
||||
@@ -123,12 +117,12 @@
|
||||
|
||||
|
||||
<!-- 查询 一天内 正在执行的轮询任务 -->
|
||||
<select id="find_execute" resultType="java.util.HashMap">
|
||||
<select id="find_execute" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
polling_id,
|
||||
cd_current
|
||||
polling_id,
|
||||
cd_current
|
||||
FROM
|
||||
yz_passageway_polling
|
||||
yz_passageway_polling
|
||||
<where>
|
||||
cd_count > cd_current
|
||||
AND datediff( NOW(), create_date ) <![CDATA[ <= ]]> 2
|
||||
@@ -136,4 +130,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -32,7 +32,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND u.phonenumber like CONCAT( #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="staTime != '' and endTime != '' and staTime!=null and endTime!=null">
|
||||
AND DATE_FORMAT( u.create_time, '%Y-%m-%d' ) BETWEEN #{staTime} AND #{endTime}
|
||||
AND u.create_time BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
<!-- 数据范围过滤 -->
|
||||
@@ -106,4 +106,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND u.phonenumber like CONCAT( #{phonenumber}, '%')
|
||||
</if>
|
||||
<if test="staTime != '' and endTime != '' and staTime!=null and endTime!=null">
|
||||
AND DATE_FORMAT( u.create_time, '%Y-%m-%d' ) BETWEEN #{staTime} AND #{endTime}
|
||||
u.create_time BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
<!-- 数据范围过滤 -->
|
||||
@@ -133,4 +133,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -214,4 +214,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -627,4 +627,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -45,7 +45,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND a.packet_id = b.packet_id
|
||||
AND a.ord_no = c.ord_no
|
||||
<if test="NotExpired == 1">
|
||||
AND DATE_FORMAT( a.end_time, "%Y-%m-%d %H:%i:%S") > DATE_FORMAT(now(), "%Y-%m-%d %H:%i:%S")
|
||||
AND a.end_time > now()
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY start_time
|
||||
@@ -96,7 +96,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND b.package_id = #{package_id}
|
||||
AND b.dept_id = #{agent_id}
|
||||
<if test="NotExpired == 1">
|
||||
AND DATE_FORMAT( a.end_time, "%Y-%m-%d %H:%i:%S") > DATE_FORMAT(now(), "%Y-%m-%d %H:%i:%S")
|
||||
AND a.end_time > now()
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY start_time
|
||||
@@ -508,16 +508,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time )
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( start_time , '%Y-%m-%d' )
|
||||
start_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( end_time , '%Y-%m-%d' )
|
||||
end_time
|
||||
</if>
|
||||
<if test="timetype == 3">
|
||||
DATE_FORMAT( validate_time , '%Y-%m-%d' )
|
||||
validate_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -744,7 +744,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
yz_card_info b
|
||||
LEFT JOIN yz_card_flow a ON b.iccid = a.iccid
|
||||
WHERE
|
||||
DATE_FORMAT( a.start_time, "%Y-%m" ) = DATE_FORMAT( now(), "%Y-%m" )
|
||||
a.start_time = now()
|
||||
GROUP BY
|
||||
a.packet_id,
|
||||
b.dept_id
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
iccid,test_period_last_time,silent_period_last_time
|
||||
)values
|
||||
<foreach item="card_arrs" collection="card_arrs" index="index" separator="," >
|
||||
(#{card_arrs.iccid}, DATE_FORMAT(#{card_arrs.test_period_last_time}, "%Y-%m-%d"),DATE_FORMAT(#{card_arrs.silent_period_last_time}, "%Y-%m-%d"))
|
||||
(#{card_arrs.iccid}, #{card_arrs.test_period_last_time},#{card_arrs.silent_period_last_time})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
|
||||
@@ -35,28 +35,28 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( open_date, '%Y-%m-%d' )
|
||||
open_date
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( activate_date, '%Y-%m-%d' )
|
||||
activate_date
|
||||
</if>
|
||||
<if test="timetype == 3">
|
||||
DATE_FORMAT( batch_date, '%Y-%m-%d' )
|
||||
batch_date
|
||||
</if>
|
||||
<if test="timetype == 4">
|
||||
DATE_FORMAT( deliver_date, '%Y-%m-%d' )
|
||||
deliver_date
|
||||
</if>
|
||||
<if test="timetype == 5">
|
||||
DATE_FORMAT( due_expire_time, '%Y-%m-%d' )
|
||||
due_expire_time
|
||||
</if>
|
||||
<if test="timetype == 6">
|
||||
DATE_FORMAT( create_date, '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 7">
|
||||
DATE_FORMAT( flowTime, '%Y-%m-%d' )
|
||||
flowTime
|
||||
</if>
|
||||
<if test="timetype == 8">
|
||||
DATE_FORMAT( stateTime, '%Y-%m-%d' )
|
||||
stateTime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -156,7 +156,7 @@
|
||||
yz_card_info
|
||||
<where>
|
||||
channel_id = #{channel_id}
|
||||
AND DATE_FORMAT( flowTime, "%Y-%m-%d %H:%i:%S" ) <![CDATA[ < ]]> #{srTime}
|
||||
AND flowTime <![CDATA[ < ]]> #{srTime}
|
||||
<if test="status_ShowId!=null">
|
||||
and status_ShowId = #{status_ShowId}
|
||||
</if>
|
||||
@@ -1926,9 +1926,9 @@
|
||||
<if test="agent_id!=null ">agent_id = #{agent_id},</if>
|
||||
<if test="channel_id!=null ">channel_id = #{channel_id},</if>
|
||||
<if test="is_pool!=null ">is_pool = #{is_pool},</if>
|
||||
<if test="batch_date!=null ">batch_date = DATE_FORMAT(#{batch_date}, "%Y-%m-%d"),</if>
|
||||
<if test="batch_date!=null ">batch_date = #{batch_date},</if>
|
||||
<if test="remind_ratio!=null ">remind_ratio = #{remind_ratio},</if>
|
||||
<if test="deliver_date!=null ">deliver_date = DATE_FORMAT(#{deliver_date}, "%Y-%m-%d"),</if>
|
||||
<if test="deliver_date!=null ">deliver_date = #{deliver_date},</if>
|
||||
<if test="customize_grouping!=null ">customize_grouping = #{customize_grouping},</if>
|
||||
<if test="remarks!=null ">remarks = #{remarks},</if>
|
||||
<if test="connection_status!=null ">connection_status = #{connection_status},</if>
|
||||
@@ -2259,7 +2259,7 @@
|
||||
yz_card_info
|
||||
<where>
|
||||
channel_id = #{channel_id}
|
||||
AND DATE_FORMAT( stateTime, "%Y-%m-%d %H:%i:%S" ) <![CDATA[ < ]]> #{srTime}
|
||||
AND stateTime <![CDATA[ < ]]> #{srTime}
|
||||
</where>
|
||||
order by stateTime asc
|
||||
</select>
|
||||
|
||||
@@ -255,4 +255,4 @@
|
||||
</where>
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -585,4 +585,4 @@
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime != null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( modified_time , '%Y-%m-%d' )
|
||||
modified_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -48,4 +48,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -30,10 +30,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( a.create_time , '%Y-%m-%d' )
|
||||
a.create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( a.cc_time , '%Y-%m-%d' )
|
||||
a.cc_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -72,4 +72,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( a.create_time , '%Y-%m-%d' )
|
||||
a.create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
@@ -30,13 +30,13 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( start_time , '%Y-%m-%d' )
|
||||
start_time
|
||||
</if>
|
||||
<if test="timetype == 3">
|
||||
DATE_FORMAT( end_time, '%Y-%m-%d' )
|
||||
end_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -179,4 +179,4 @@
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( update_time , '%Y-%m-%d' )
|
||||
update_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -179,7 +179,7 @@
|
||||
FROM
|
||||
yz_card_flow_his
|
||||
<where>
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' ) <![CDATA[ < ]]> #{create_time}
|
||||
create_time <![CDATA[ < ]]> #{create_time}
|
||||
</where>
|
||||
LIMIT 1000
|
||||
</select>
|
||||
@@ -215,4 +215,4 @@
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( createTime , '%Y-%m-%d' )
|
||||
createTime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -33,7 +33,7 @@
|
||||
#{IccidArr}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
|
||||
</where>
|
||||
</sql>
|
||||
|
||||
@@ -80,4 +80,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -96,10 +96,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( a.create_time, "%Y-%m-%d %H:%i:%S" )
|
||||
a.create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( a.add_package_time, "%Y-%m-%d %H:%i:%S" )
|
||||
a.add_package_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -949,7 +949,7 @@
|
||||
<where>
|
||||
status = 1
|
||||
and del_flag = 0
|
||||
and DATE_FORMAT( create_time, "%Y-%m-%d" ) BETWEEN #{staTime} AND #{endTime}
|
||||
and create_time BETWEEN #{staTime} AND #{endTime}
|
||||
and
|
||||
<if test="type==1 ">
|
||||
is_dd_exCount
|
||||
|
||||
@@ -152,4 +152,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -54,4 +54,4 @@
|
||||
<include refid="selwhere"></include>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
@@ -46,7 +46,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
AND u.status = #{status}
|
||||
</if>
|
||||
<if test="staTime != '' and endTime != '' and staTime!=null and endTime!=null">
|
||||
AND DATE_FORMAT( u.create_time, '%Y-%m-%d' ) BETWEEN #{staTime} AND #{endTime}
|
||||
AND u.create_time BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId}, ancestors) ))
|
||||
<!-- 数据范围过滤 -->
|
||||
@@ -153,7 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
FROM
|
||||
sys_logininfor
|
||||
WHERE
|
||||
DATE_FORMAT( login_time, '%Y-%m' ) = DATE_FORMAT( now(), '%Y-%m' )
|
||||
login_time =now()
|
||||
GROUP BY
|
||||
ipaddr
|
||||
</select>
|
||||
@@ -274,4 +274,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -101,7 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -198,4 +198,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -135,4 +135,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -65,7 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -102,4 +102,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -249,4 +249,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+2
-2
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -173,4 +173,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -23,10 +23,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( update_time , '%Y-%m-%d' )
|
||||
update_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
+11
-11
@@ -18,13 +18,13 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( a.create_time , '%Y-%m-%d %H:%i:%S' )
|
||||
a.create_time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( a.review_time , '%Y-%m-%d %H:%i:%S' )
|
||||
a.review_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( a.update_time , '%Y-%m-%d %H:%i:%S' )
|
||||
a.update_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -52,15 +52,15 @@
|
||||
select
|
||||
a.id,
|
||||
a.dept_id,
|
||||
DATE_FORMAT(a.create_time,'%Y-%m-%d ') as create_time,
|
||||
a.create_time as create_time,
|
||||
a.status,
|
||||
a.info,
|
||||
a.annotation,
|
||||
a.feedback,
|
||||
a.user_id,
|
||||
DATE_FORMAT(a.update_time,'%Y-%m-%d ') as update_time,
|
||||
a.update_time as update_time,
|
||||
a.is_send,
|
||||
DATE_FORMAT(a.review_time,'%Y-%m-%d %H:%i:%S') as review_time,
|
||||
a.review_time as review_time,
|
||||
a.card_sumCount,
|
||||
a.amount
|
||||
from
|
||||
@@ -141,18 +141,18 @@
|
||||
select
|
||||
a.id,
|
||||
a.dept_id,
|
||||
DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') as create_time,
|
||||
a.create_time as create_time,
|
||||
a.status,
|
||||
a.info,
|
||||
a.user_id,
|
||||
<if test="is_Internal==true">
|
||||
a.annotation,
|
||||
a.feedback,
|
||||
DATE_FORMAT(a.update_time,'%Y-%m-%d ') as update_time,
|
||||
a.update_time as update_time,
|
||||
a.is_send,
|
||||
b.nick_name,
|
||||
</if>
|
||||
DATE_FORMAT(a.review_time,'%Y-%m-%d %H:%i:%S') as review_time,
|
||||
a.review_time as review_time,
|
||||
a.card_sumCount,
|
||||
a.amount
|
||||
from
|
||||
@@ -177,7 +177,7 @@
|
||||
a.id,
|
||||
a.dept_id,
|
||||
b.dept_name,
|
||||
DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') as create_time,
|
||||
a.create_time as create_time,
|
||||
a.status,
|
||||
a.info,
|
||||
a.card_sumCount,
|
||||
@@ -197,7 +197,7 @@
|
||||
select
|
||||
a.id,
|
||||
a.dept_id,
|
||||
DATE_FORMAT(a.create_time,'%Y-%m-%d %H:%i:%S') as create_time,
|
||||
a.create_time as create_time,
|
||||
a.status,
|
||||
a.card_sumCount,
|
||||
a.amount
|
||||
|
||||
+2
-2
@@ -21,10 +21,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d %H:%i:%S' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d %H:%i:%S' )
|
||||
upd_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
+4
-4
@@ -23,16 +23,16 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d %H:%i:%S' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( effectiveDate , '%Y-%m-%d %H:%i:%S' )
|
||||
effectiveDate
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( expiriedDate , '%Y-%m-%d %H:%i:%S' )
|
||||
expiriedDate
|
||||
</if>
|
||||
<if test="timetype == 3">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d %H:%i:%S' )
|
||||
upd_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d %H:%i:%S' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d %H:%i:%S' )
|
||||
upd_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
@@ -117,4 +117,4 @@
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+1
-1
@@ -107,4 +107,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+1
-1
@@ -164,4 +164,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@
|
||||
|
||||
<!-- 查询今日注册商品数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(BAN_ID, 13,4)) from CWGL_Billing_Application where substring(BAN_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(BAN_ID, 13,4)) from CWGL_Billing_Application where substring(BAN_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
<!-- 查询开票申请信息 -->
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@
|
||||
<select id="find_CDIDS" parameterType="java.util.HashMap" resultType="java.util.HashMap">
|
||||
SELECT
|
||||
Dids_ID,
|
||||
DATE_FORMAT(Dids_Time,'%Y-%m-%d') AS Dids_Time,
|
||||
Dids_Time AS Dids_Time,
|
||||
Dids_FatName,
|
||||
Dids_Amount,
|
||||
Dids_Remarks
|
||||
|
||||
@@ -33,10 +33,10 @@
|
||||
<if test="Dids_Time != null and Dids_Time != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="Dids_Time == 1">
|
||||
DATE_FORMAT( Dids_Time , '%Y-%m-%d' )
|
||||
Dids_Time
|
||||
</if>
|
||||
<if test="Dids_Time == 2">
|
||||
DATE_FORMAT( c_time , '%Y-%m-%d' )
|
||||
c_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -243,7 +243,7 @@
|
||||
<if test="c_time != null and c_time != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="c_time == 1">
|
||||
DATE_FORMAT( c_time , '%Y-%m-%d %H:%i:%S' )
|
||||
c_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -334,7 +334,7 @@
|
||||
<if test="c_time != null and c_time != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="c_time == 1">
|
||||
DATE_FORMAT(c_time , '%Y-%m-%d %H:%i:%S' )
|
||||
c_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -386,7 +386,7 @@
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(Dio_ID, 13, 4))
|
||||
from CWGL_Deposit_Info
|
||||
where substring(Dio_ID, 5, 8) = DATE_FORMAT(NOW(), '%Y%m%d')
|
||||
where substring(Dio_ID, 5, 8) = NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@
|
||||
|
||||
<!-- 查询今日注册商品数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(Ird_ID, 13,4)) from CWGL_Invoice_Record where substring(Ird_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(Ird_ID, 13,4)) from CWGL_Invoice_Record where substring(Ird_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(Fat_ID, 13,4)) from yz_cwgl_firm_account where substring(Fat_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(Fat_ID, 13,4)) from yz_cwgl_firm_account where substring(Fat_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(EDY_ID, 13,4)) from FHGL_Express_Delivery where substring(EDY_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(EDY_ID, 13,4)) from FHGL_Express_Delivery where substring(EDY_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+4
-4
@@ -26,10 +26,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( EIY_Ship_Time , '%Y-%m-%d' )
|
||||
EIY_Ship_Time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( EIY_Time , '%Y-%m-%d' )
|
||||
EIY_Time
|
||||
</if>
|
||||
BETWEEN #{staTime} and #{endTime}
|
||||
</if>
|
||||
@@ -173,7 +173,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(EIY_ID, 13,4)) from FHGL_Express_Inquiry where substring(EIY_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(EIY_ID, 13,4)) from FHGL_Express_Inquiry where substring(EIY_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
<!-- 修改快递查询详情发货方式数据 -->
|
||||
@@ -245,7 +245,7 @@
|
||||
FHGL_Express_Inquiry
|
||||
<where>
|
||||
<if test="S_time!=null and E_time!=null">
|
||||
AND DATE_FORMAT(EIY_Ship_Time,'%Y-%m-%d') BETWEEN #{S_time} and #{E_time}
|
||||
AND EIY_Ship_Time BETWEEN #{S_time} and #{E_time}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
+3
-3
@@ -23,10 +23,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( ODY_Estimated_Time, '%Y-%m-%d' )
|
||||
ODY_Estimated_Time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( Time, '%Y-%m-%d' )
|
||||
Time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -81,7 +81,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(ODY_ID, 13,4)) from FHGL_Order_Delivery where substring(ODY_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(ODY_ID, 13,4)) from FHGL_Order_Delivery where substring(ODY_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
<!-- 新增 订单合同发货信息 -->
|
||||
|
||||
+4
-4
@@ -98,10 +98,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( SAN_Time, '%Y-%m-%d' )
|
||||
SAN_Time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( SAN_upd_Time, '%Y-%m-%d' )
|
||||
SAN_upd_Time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(SAN_ID, 13,4)) from FHGL_Shipping_Application where substring(SAN_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(SAN_ID, 13,4)) from FHGL_Shipping_Application where substring(SAN_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
<!-- 查询发货申请 信息 -->
|
||||
@@ -277,7 +277,7 @@
|
||||
FROM
|
||||
fhgl_shipping_application
|
||||
WHERE
|
||||
DATE_FORMAT( SAN_Time,"%Y-%m-%d") BETWEEN #{sta_time} AND #{end_time}
|
||||
SAN_Time BETWEEN #{sta_time} AND #{end_time}
|
||||
AND Outbound_status = '1'
|
||||
ORDER BY
|
||||
SAN_Time ASC
|
||||
|
||||
+7
-7
@@ -29,26 +29,26 @@
|
||||
<!--<if test="timetype != null and timetype != '' and timetype!= '999'
|
||||
and staTime != null and staTime != ''
|
||||
and endTime != null and endTime != ''">
|
||||
and DATE_FORMAT(#{timetype},'%Y-%m-%d %H:%i:%S') between #{staTime} and #{endTime}
|
||||
and #{timetype} between #{staTime} and #{endTime}
|
||||
</if>-->
|
||||
|
||||
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( activate_date , '%Y-%m-%d' )
|
||||
activate_date
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( open_date , '%Y-%m-%d' )
|
||||
open_date
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 3">
|
||||
DATE_FORMAT( update_date , '%Y-%m-%d' )
|
||||
update_date
|
||||
</if>
|
||||
<if test="timetype == 4">
|
||||
DATE_FORMAT( syn_Time , '%Y-%m-%d' )
|
||||
syn_Time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -94,4 +94,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d' )
|
||||
upd_date
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( syn_date , '%Y-%m-%d' )
|
||||
syn_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -70,7 +70,7 @@
|
||||
<delete id="del" parameterType="java.util.HashMap">
|
||||
delete from yz_passageway_polling
|
||||
<where>
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' ) <![CDATA[ < ]]> #{delTime}
|
||||
create_date <![CDATA[ < ]]> #{delTime}
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
|
||||
+3
-3
@@ -159,7 +159,7 @@
|
||||
is_notice = #{is_notice}
|
||||
</if>
|
||||
<if test="isToDay!=null and isToDay==1">
|
||||
and DATE_FORMAT( upd_date, '%Y-%m-%d' ) = CURDATE()
|
||||
and upd_date = CURDATE()
|
||||
</if>
|
||||
<if test="cd_code != null and cd_code != ''">
|
||||
and cd_code =#{cd_code}
|
||||
@@ -167,10 +167,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d' )
|
||||
upd_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
+5
-5
@@ -152,7 +152,7 @@
|
||||
is_notice = #{is_notice}
|
||||
</if>
|
||||
<if test="isToDay!=null and isToDay==1">
|
||||
and DATE_FORMAT( upd_date, '%Y-%m-%d' ) = CURDATE()
|
||||
and upd_date = CURDATE()
|
||||
</if>
|
||||
<if test="cd_code != null and cd_code != ''">
|
||||
and cd_code =#{cd_code}
|
||||
@@ -160,10 +160,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d' )
|
||||
upd_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -208,7 +208,7 @@
|
||||
and is_notice = #{is_notice}
|
||||
</if>
|
||||
<if test="isToDay!=null and isToDay==1">
|
||||
and DATE_FORMAT( upd_date, '%Y-%m-%d' ) = CURDATE()
|
||||
and upd_date = CURDATE()
|
||||
</if>
|
||||
<if test="codeOnArr!=null and codeOnArr != '' and codeOnArr.size>0">
|
||||
and codeOn
|
||||
@@ -237,7 +237,7 @@
|
||||
<delete id="delTime" parameterType="java.util.HashMap">
|
||||
delete from yz_card_polling_error
|
||||
where
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' ) <![CDATA[ < ]]> #{delTime}
|
||||
create_date <![CDATA[ < ]]> #{delTime}
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
from
|
||||
yz_syn_card_info
|
||||
<where>
|
||||
DATE_FORMAT( update_date, '%Y-%m-%d' ) BETWEEN #{staTime} AND #{endTime}
|
||||
update_date BETWEEN #{staTime} AND #{endTime}
|
||||
and channel_id = #{channel_id}
|
||||
and LENGTH(trim(iccid )) <![CDATA[ < ]]> 1
|
||||
</where>
|
||||
@@ -205,7 +205,7 @@
|
||||
<where>
|
||||
channel_id = #{channel_id}
|
||||
<if test="staTime!=null and endTime!=null">
|
||||
and DATE_FORMAT( update_date, '%Y-%m-%d' ) BETWEEN #{staTime} AND #{endTime}
|
||||
and update_date BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
and LENGTH(trim(iccid )) <![CDATA[ > ]]> 1
|
||||
<if test="inconsistent_iccid!=null">
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@
|
||||
from
|
||||
yz_agent_asset_details
|
||||
<where>
|
||||
DATE_FORMAT( record_date , '%Y-%m-%d' ) = #{record_date}
|
||||
record_date = #{record_date}
|
||||
and dept_id = #{dept_id}
|
||||
</where>
|
||||
order by update_date desc
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
from
|
||||
yz_asset_details
|
||||
<where>
|
||||
DATE_FORMAT( record_date , '%Y-%m-%d' ) = #{record_date}
|
||||
record_date = #{record_date}
|
||||
and dept_id = #{dept_id}
|
||||
</where>
|
||||
order by update_date desc
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
AND id = #{id}
|
||||
</when>
|
||||
<otherwise>
|
||||
DATE_FORMAT( record_date , '%Y-%m-%d' ) = #{record_date}
|
||||
record_date = #{record_date}
|
||||
and dept_id = #{dept_id}
|
||||
</otherwise>
|
||||
</choose>
|
||||
@@ -60,11 +60,11 @@
|
||||
id
|
||||
from yz_indexpage
|
||||
<where>
|
||||
DATE_FORMAT( record_date , '%Y-%m-%d' ) = #{record_date}
|
||||
record_date = #{record_date}
|
||||
and dept_id = #{dept_id}
|
||||
and
|
||||
<![CDATA[
|
||||
(round((UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(DATE_FORMAT(update_date,'%Y-%m-%d %H:%i:%S')))/60) <= #{Xminute} )=1
|
||||
(round((UNIX_TIMESTAMP(now())-UNIX_TIMESTAMP(update_date))/60) <= #{Xminute} )=1
|
||||
]]>
|
||||
</where>
|
||||
order by update_date desc
|
||||
@@ -91,7 +91,7 @@
|
||||
id
|
||||
from yz_indexpage
|
||||
<where>
|
||||
DATE_FORMAT( record_date , '%Y-%m-%d' ) = #{record_date}
|
||||
record_date = #{record_date}
|
||||
and dept_id = #{dept_id}
|
||||
</where>
|
||||
order by update_date desc
|
||||
@@ -175,7 +175,7 @@
|
||||
|
||||
<!-- 获取指定月份内生成过首页数据的企业id -->
|
||||
<select id="findToExist" parameterType="java.util.HashMap" resultType="java.lang.String">
|
||||
SELECT dept_id FROM yz_indexpage WHERE DATE_FORMAT( record_date , '%Y-%m' ) = #{yyyyMM} GROUP BY dept_id
|
||||
SELECT dept_id FROM yz_indexpage WHERE record_date = #{yyyyMM} GROUP BY dept_id
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -27,10 +27,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_date , '%Y-%m-%d' )
|
||||
create_date
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( upd_date , '%Y-%m-%d' )
|
||||
upd_date
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -80,4 +80,4 @@
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
+1
-1
@@ -147,7 +147,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(Cy_ID, 12,4)) from yz_ckgl_commodity where substring(Cy_ID, 4,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(Cy_ID, 12,4)) from yz_ckgl_commodity where substring(Cy_ID, 4,8)=NOW()
|
||||
</select>
|
||||
|
||||
<update id="upd" parameterType="java.util.HashMap">
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@
|
||||
<if test="COT_Time != null and COT_Time != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="COT_Time == 1">
|
||||
DATE_FORMAT( COT_Time , '%Y-%m-%d %H:%i:%S' )
|
||||
COT_Time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<!-- 获取id -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(COT_ID, 13,4)) from yz_ckgl_commodity_output where substring(COT_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(COT_ID, 13,4)) from yz_ckgl_commodity_output where substring(COT_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -137,7 +137,7 @@
|
||||
|
||||
<!-- 查询今日注册商品数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(CSK_CyID, 13,4)) from yz_ckgl_commodity_stock where substring(CSK_CyID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(CSK_CyID, 13,4)) from yz_ckgl_commodity_stock where substring(CSK_CyID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@
|
||||
<if test="CSE_Time != null and CSE_Time != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="CSE_Time == 1">
|
||||
DATE_FORMAT( CSE_Time , '%Y-%m-%d %H:%i:%S' )
|
||||
CSE_Time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(CSE_ID, 13,4)) from yz_ckgl_commodity_storage where substring(CSE_ID, 5,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(CSE_ID, 13,4)) from yz_ckgl_commodity_storage where substring(CSE_ID, 5,8)=NOW()
|
||||
</select>
|
||||
|
||||
<!--查询出库总数-->
|
||||
|
||||
+12
-12
@@ -249,10 +249,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( enteringwarehousetime , '%Y-%m-%d' )
|
||||
enteringwarehousetime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -454,10 +454,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( a.create_time , '%Y-%m-%d' )
|
||||
a.create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( a.enteringwarehousetime , '%Y-%m-%d' )
|
||||
a.enteringwarehousetime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -596,10 +596,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( enteringwarehousetime , '%Y-%m-%d' )
|
||||
enteringwarehousetime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -733,10 +733,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( enteringwarehousetime , '%Y-%m-%d' )
|
||||
enteringwarehousetime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -808,10 +808,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( a.create_time , '%Y-%m-%d' )
|
||||
a.create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( enteringwarehousetime , '%Y-%m-%d' )
|
||||
enteringwarehousetime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -840,10 +840,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
AND
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( enteringwarehousetime , '%Y-%m-%d' )
|
||||
enteringwarehousetime
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
+4
-4
@@ -31,13 +31,13 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( c_time, '%Y-%m-%d' )
|
||||
c_time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( create_time, '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 2">
|
||||
DATE_FORMAT( modified_time, '%Y-%m-%d' )
|
||||
modified_time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
<!-- 查询今日注册数量 -->
|
||||
<select id="sel_data_count" resultType="java.lang.Integer">
|
||||
SELECT MAX(substring(code, 12,4)) from yz_xsgl_contract where substring(code, 4,8)=DATE_FORMAT(NOW() ,'%Y%m%d')
|
||||
SELECT MAX(substring(code, 12,4)) from yz_xsgl_contract where substring(code, 4,8)=NOW()
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( CCG_Time, '%Y-%m-%d' )
|
||||
CCG_Time
|
||||
</if>
|
||||
BETWEEN #{staTime} AND #{endTime}
|
||||
</if>
|
||||
|
||||
+2
-2
@@ -59,10 +59,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( b.create_time , '%Y-%m-%d' )
|
||||
b.create_time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( b.modified_time , '%Y-%m-%d' )
|
||||
b.modified_time
|
||||
</if>
|
||||
BETWEEN #{staTime} and #{endTime}
|
||||
</if>
|
||||
|
||||
+2
-2
@@ -23,10 +23,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( create_time , '%Y-%m-%d' )
|
||||
create_time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( modified_time , '%Y-%m-%d' )
|
||||
modified_time
|
||||
</if>
|
||||
BETWEEN #{staTime} and #{endTime}
|
||||
</if>
|
||||
|
||||
+2
-2
@@ -86,10 +86,10 @@
|
||||
<if test="timetype != null and timetype != '' and staTime!=null and endTime!=null">
|
||||
and
|
||||
<if test="timetype == 0">
|
||||
DATE_FORMAT( b.create_time , '%Y-%m-%d' )
|
||||
b.create_time
|
||||
</if>
|
||||
<if test="timetype == 1">
|
||||
DATE_FORMAT( b.modified_time , '%Y-%m-%d' )
|
||||
b.modified_time
|
||||
</if>
|
||||
BETWEEN #{staTime} and #{endTime}
|
||||
</if>
|
||||
|
||||
@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="beUsableLineOfCredit" column="be_usable_line_of_credit" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectDeptVo">
|
||||
select d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.phone, d.email, d.status, d.del_flag, d.create_by, d.create_time,d.dname,
|
||||
d.deposit_amount,d.line_of_credit,d.profit_amount,d.used_line_of_credit,d.be_usable_line_of_credit
|
||||
@@ -98,34 +98,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
order by d.parent_id, d.order_num
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
<include refid="selectDeptVo"/>
|
||||
where dept_id = #{deptId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkDeptExistUser" parameterType="Long" resultType="int">
|
||||
select count(1) from sys_user where dept_id = #{deptId} and del_flag = '0'
|
||||
</select>
|
||||
|
||||
|
||||
<select id="hasChildByDeptId" parameterType="Long" resultType="int">
|
||||
select count(1) from sys_dept
|
||||
where del_flag = '0' and parent_id = #{deptId} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
|
||||
select * from sys_dept where find_in_set(#{deptId}, ancestors)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
|
||||
select count(*) from sys_dept where status = 0 and del_flag = '0' and find_in_set(#{deptId}, ancestors)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="checkDeptNameUnique" resultMap="SysDeptResult">
|
||||
<include refid="selectDeptVo"/>
|
||||
where dept_name=#{deptName} and parent_id = #{parentId} limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertDept" parameterType="SysDept">
|
||||
insert into sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
@@ -160,7 +160,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
|
||||
|
||||
<update id="updateDept" parameterType="SysDept">
|
||||
update sys_dept
|
||||
<set>
|
||||
@@ -178,7 +178,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</set>
|
||||
where dept_id = #{deptId}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateDeptChildren" parameterType="java.util.List">
|
||||
update sys_dept set ancestors =
|
||||
<foreach collection="depts" item="item" index="index"
|
||||
@@ -191,7 +191,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
#{item.deptId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateDeptStatus" parameterType="SysDept">
|
||||
update sys_dept
|
||||
<set>
|
||||
@@ -201,7 +201,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</set>
|
||||
where find_in_set(#{deptId}, ancestors)
|
||||
</update>
|
||||
|
||||
|
||||
<delete id="deleteDeptById" parameterType="Long">
|
||||
update sys_dept set del_flag = '2' where dept_id = #{deptId}
|
||||
</delete>
|
||||
@@ -211,4 +211,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
select dept_id,dname as 'dept_name' from sys_dept
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user