golang-yitisheng-server/Task5.md

35 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

```
select
sm.school_code,
sc.school_name,
sm.major_code,
sm.major_name,
sm.major_type,
sm.major_type_child,
sm.plan_num,
sm.main_subjects,
sm.limitation,
sm.chinese_score_limitation,
sm.english_score_limitation,
sm.cultural_score_limitation,
sm.professional_score_limitation,
sm.enrollment_code,
sm.tuition,
sm.detail,
sm.category,
sm.batch,
sm.rules_enroll_probability as rulesEnrollProbability,
sm.probability_operator as probabilityOperator,
sm.private_rules_enroll_probability as privateRulesEnrollProbability,
sm.private_probability_operator as privateProbabilityOperator,
sm.rules_enroll_probability_sx,
sm.kslx,
sm.state
FROM yitisheng.yx_school_major sm
LEFT JOIN (SELECT school_id,school_name,school_code FROM yitisheng.yx_school_child group by school_code) sc ON sc.school_code = sm.school_code
LEFT JOIN yitisheng.yx_school s ON s.id = sc.school_id
where 1=1 and sm.state >0
and sm.major_type = '音乐类' and sm.category = '文科' and major_type_child in ('音乐教育') and sm.main_subjects = '器乐'
```
请你参考这个查询SQL帮我在#yx_school_major_mapper.go中实现这个查询Where后条件是传递过去的。
这个返回结果封装成DTO。