| | |
| | | |
| | | <insert id="add" keyColumn="id" useGeneratedKeys="true" parameterType="com.mindskip.xzs.domain.SelfPractice"> |
| | | INSERT INTO |
| | | t_self_practice(user_id, remark, subjects, practice_type, create_time, update_time, deleted) |
| | | t_self_practice(user_id, remark, subjects, practice_type, create_time, update_time, question_type, deleted, practice_mode) |
| | | VALUE |
| | | (#{userId}, #{remark}, #{subjects}, #{practiceType}, #{createTime}, #{updateTime}, #{deleted}) |
| | | (#{userId}, #{remark}, #{subjects}, #{practiceType}, #{createTime}, #{updateTime}, #{questionType}, #{deleted}, #{practiceMode}) |
| | | </insert> |
| | | |
| | | <select id="page" resultType="com.mindskip.xzs.domain.vo.SelfPracticeVO"> |
| | |
| | | subjects as subjectString, |
| | | practice_type as practiceType, |
| | | create_time createTime, |
| | | update_time as updateTime |
| | | update_time as updateTime, |
| | | question_type as questionType, |
| | | practice_mode as practiceMode |
| | | FROM |
| | | t_self_practice |
| | | <where> |
| | |
| | | </if> |
| | | AND deleted = 0 |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | <update id="remove"> |
| | |
| | | id IN <foreach collection="ids" open="(" separator="," close=")" item="id">#{id}</foreach> |
| | | </update> |
| | | |
| | | <select id="selectById" resultType="com.mindskip.xzs.domain.SelfPractice"> |
| | | SELECT |
| | | id, |
| | | user_id as userId, |
| | | remark, |
| | | subjects as subjects, |
| | | practice_type as practiceType, |
| | | create_time createTime, |
| | | update_time as updateTime, |
| | | question_type as questionType, |
| | | practice_mode as practiceMode |
| | | FROM |
| | | t_self_practice |
| | | WHERE |
| | | id = #{id} |
| | | </select> |
| | | |
| | | <update id="setQuestionIds"> |
| | | UPDATE t_self_practice SET question_ids = #{questionIds} WHERE id = #{id} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |