| | |
| | | `create_by`, |
| | | `create_time`, |
| | | `update_by`, |
| | | `update_time` |
| | | `update_time`, |
| | | `year` |
| | | FROM |
| | | `item` |
| | | where del_flag = 1 |
| | | <if test="companyId!=null"> |
| | | and company_id = #{companyId} |
| | | </if> |
| | | <if test="year != null and year != ''"> |
| | | and year = #{year} |
| | | </if> |
| | | |
| | | </select> |
| | | <select id="selectItemListAll" resultType="com.gkhy.exam.system.domain.Item"> |
| | | SELECT |
| | |
| | | i.`create_by`, |
| | | i.`create_time`, |
| | | i.`update_by`, |
| | | i.`update_time` |
| | | i.`update_time`, |
| | | i.`year` |
| | | FROM |
| | | `item` i |
| | | LEFT JOIN item_user iu ON i.id = iu.item_id |
| | |
| | | <if test="userId!=null"> |
| | | and iu.user_id = #{userId} |
| | | </if> |
| | | <if test="year != null and year != ''"> |
| | | and i.year = #{year} |
| | | </if> |
| | | GROUP BY |
| | | i.id |
| | | |