Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gogirl-miniapp-backend
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
huluobin
gogirl-miniapp-backend
Commits
f9b830ba
Commit
f9b830ba
authored
Jul 20, 2020
by
huluobin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
478ed0da
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
45 deletions
+45
-45
StoreClassesTechnicianMapper.xml
...n/resources/mapper/store/StoreClassesTechnicianMapper.xml
+45
-45
No files found.
src/main/resources/mapper/store/StoreClassesTechnicianMapper.xml
View file @
f9b830ba
...
@@ -131,34 +131,34 @@
...
@@ -131,34 +131,34 @@
date_format(days, '%Y-%m-%d') = #{days}
date_format(days, '%Y-%m-%d') = #{days}
</select>
</select>
<!-- <select id="listClassesTechnician" resultMap="classesTechnicianMap">-->
<!-- <select id="listClassesTechnician" resultMap="classesTechnicianMap">-->
<!-- SELECT-->
<!-- SELECT-->
<!-- <include refid="storeClassesTechnicianSql"/>,-->
<!-- <include refid="storeClassesTechnicianSql"/>,-->
<!-- <include refid="storeClassesSql"/>,-->
<!-- <include refid="storeClassesSql"/>,-->
<!-- <include refid="storeTechnicianSql"/>,-->
<!-- <include refid="storeTechnicianSql"/>,-->
<!-- <include refid="scheduleServeSql"/>-->
<!-- <include refid="scheduleServeSql"/>-->
<!-- FROM store_classes_technician ct-->
<!-- FROM store_classes_technician ct-->
<!-- LEFT JOIN store_classes cls ON cls.id = ct.classes-->
<!-- LEFT JOIN store_classes cls ON cls.id = ct.classes-->
<!-- LEFT JOIN store_technician tech ON tech.id = ct.user_id-->
<!-- LEFT JOIN store_technician tech ON tech.id = ct.user_id-->
<!-- LEFT JOIN (-->
<!-- LEFT JOIN (-->
<!-- SELECT t4.*-->
<!-- SELECT t4.*-->
<!-- FROM scheduled_serve t4-->
<!-- FROM scheduled_serve t4-->
<!-- inner JOIN scheduled_manage t5 ON t4.sch_id = t5.id-->
<!-- inner JOIN scheduled_manage t5 ON t4.sch_id = t5.id-->
<!-- AND t5.STATUS != 3-->
<!-- AND t5.STATUS != 3-->
<!-- AND t5.STATUS != 4-->
<!-- AND t5.STATUS != 4-->
<!-- AND t5.STATUS != 5-->
<!-- AND t5.STATUS != 5-->
<!-- AND t5.STATUS != 2-->
<!-- AND t5.STATUS != 2-->
<!-- and t4.status !=3-->
<!-- and t4.status !=3-->
<!-- WHERE t4.start_time LIKE concat(#{days},'%')-->
<!-- WHERE t4.start_time LIKE concat(#{days},'%')-->
<!-- <if test="scheduleId != null">-->
<!-- <if test="scheduleId != null">-->
<!-- and t5.id != #{scheduleId}-->
<!-- and t5.id != #{scheduleId}-->
<!-- </if>) ss ON ct.user_id = ss.technician_id-->
<!-- </if>) ss ON ct.user_id = ss.technician_id-->
<!-- left join recent_deducted_complaint_score t6 on t6.technician_id = tech.id-->
<!-- left join recent_deducted_complaint_score t6 on t6.technician_id = tech.id-->
<!-- WHERE ct.days = #{days}-->
<!-- WHERE ct.days = #{days}-->
<!-- AND tech.user_id IN (SELECT user_id FROM staff_store_authority WHERE store_id = #{departmentId})-->
<!-- AND tech.user_id IN (SELECT user_id FROM staff_store_authority WHERE store_id = #{departmentId})-->
<!-- AND cls.department_id = #{departmentId}-->
<!-- AND cls.department_id = #{departmentId}-->
<!-- and tech.`status`=1-->
<!-- and tech.`status`=1-->
<!-- </select>-->
<!-- </select>-->
<select
id=
"listClassesTechnician"
resultMap=
"classesTechnicianMap"
>
<select
id=
"listClassesTechnician"
resultMap=
"classesTechnicianMap"
>
select
select
...
@@ -167,27 +167,27 @@
...
@@ -167,27 +167,27 @@
<include
refid=
"storeTechnicianSql"
/>
,
<include
refid=
"storeTechnicianSql"
/>
,
<include
refid=
"scheduleServeSql"
/>
<include
refid=
"scheduleServeSql"
/>
from store_classes_technician ct
from store_classes_technician ct
left join store_classes cls on cls.id = ct.classes
left join store_classes cls on cls.id = ct.classes
left join store_technician tech on tech.id = ct.user_id
left join store_technician tech on tech.id = ct.user_id
left join (
left join (
select t4.*
select t4.*
from scheduled_serve t4
from scheduled_serve t4
inner join scheduled_manage t5 on t4.sch_id = t5.id
inner join scheduled_manage t5 on t4.sch_id = t5.id
and t5.`status` != 3
and t5.`status` != 3
and t5.`status` != 4
and t5.`status` != 4
and t5.`status` != 5
and t5.`status` != 5
and t5.`status` != 2
and t5.`status` != 2
and t4.`status` != 3
and t4.`status` != 3
where t4.start_time like concat(#{days},'%')
where t4.start_time like concat(#{days},'%')
<if
test=
"scheduleId != null"
>
<if
test=
"scheduleId != null"
>
and t5.id != #{scheduleId}
and t5.id != #{scheduleId}
</if>
</if>
) ss on ct.user_id = ss.technician_id
) ss on ct.user_id = ss.technician_id
left join recent_deducted_complaint_score t6 on t6.technician_id = tech.id
left join recent_deducted_complaint_score t6 on t6.technician_id = tech.id
where ct.days = #{days}
where ct.days = #{days}
and tech.user_id in (select user_id from staff_store_authority where store_id = #{departmentId})
and tech.user_id in (select user_id from staff_store_authority where store_id = #{departmentId})
and cls.department_id = #{departmentId}
and cls.department_id = #{departmentId}
and tech.`status` = 1
and tech.`status` = 1
order by t6.score
order by t6.score
</select>
</select>
...
@@ -228,7 +228,7 @@
...
@@ -228,7 +228,7 @@
FROM store_classes_technician t1
FROM store_classes_technician t1
LEFT JOIN store_classes t2 ON t1.classes = t2.id
LEFT JOIN store_classes t2 ON t1.classes = t2.id
WHERE (t1.days = #{day} AND t2.department_id = #{departmentId})
WHERE (t1.days = #{day} AND t2.department_id = #{departmentId})
OR (t1.classes = 0 AND t1.days = #{day})
</select>
</select>
<update
id=
"updateClassesTechnician"
parameterType=
"com.gogirl.domain.store.store.StoreClassesTechnician"
>
<update
id=
"updateClassesTechnician"
parameterType=
"com.gogirl.domain.store.store.StoreClassesTechnician"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment