diff --git a/web-infrastructure/src/main/resources/mapper/TrainingUserMapper.xml b/web-infrastructure/src/main/resources/mapper/TrainingUserMapper.xml index 46b1e1a..e13adf1 100644 --- a/web-infrastructure/src/main/resources/mapper/TrainingUserMapper.xml +++ b/web-infrastructure/src/main/resources/mapper/TrainingUserMapper.xml @@ -87,13 +87,15 @@ u.org_id, u.env, u.open_id, - tu.phone, - case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag + tu.phone +-- case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag from user u left join training_user tu on tu.phone = u.username and tu.delete_enum = 'FALSE' and u.delete_enum = 'FALSE' + and tu.start_time < now() + and tu.end_time > now() and u.id != u.corpinfo_id @@ -170,13 +172,15 @@ u.org_id, u.env, u.open_id, - tu.phone, - case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag + tu.phone +-- case when tu.start_time < now() and tu.end_time > now() then 1 else 0 end stateFlag from user u left join training_user tu on tu.phone = u.username and tu.delete_enum = 'FALSE' and u.delete_enum = 'FALSE' + and tu.start_time < now() + and tu.end_time > now() and u.id != u.corpinfo_id