<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPEmapperPUBLIC"-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mappernamespace="com.sunxiansheng.practice.server.dao.PracticeDao"><selectid="selectById"resultType="com.sunxiansheng.practice.server.entity.po.PracticePO">
select set_id as setId, time_use as timeUse, submit_time as submitTime, correct_rate as correctRate
from practice_info
where id = #{id}
and is_deleted = 0
</select><insertid="insert"><selectKeyresultType="java.lang.Long"keyProperty="id"order="AFTER">
SELECT LAST_INSERT_ID()
</selectKey>
INSERT INTO practice_info(set_id, complete_status, time_use, submit_time, correct_rate, is_deleted,
created_by, created_time)
values (#{setId,jdbcType=BIGINT},
#{completeStatus,jdbcType=INTEGER},
#{timeUse,jdbcType=VARCHAR},
#{submitTime,jdbcType=TIMESTAMP},
#{correctRate,jdbcType=VARCHAR},
#{isDeleted,jdbcType=INTEGER},
#{createdBy,jdbcType=VARCHAR},
#{createdTime,jdbcType=TIMESTAMP})
</insert><updateid="update">
update practice_info
<set><iftest="submitTime != null">
submit_time = #{submitTime},
</if><iftest="timeUse != null">
time_use = #{timeUse},
</if><iftest="completeStatus != null">
complete_status = #{completeStatus},
</if><iftest="correctRate != null">
correct_rate = #{correctRate},
</if></set>
where id = #{id,jdbcType=BIGINT}
</update></mapper>
2.PracticeDetailDao.xml
<?xml version="1.0" encoding="UTF-8" ?><!DOCTYPEmapperPUBLIC"-//mybatis.org//DTD Mapper 3.0//EN""http://mybatis.org/dtd/mybatis-3-mapper.dtd"><mappernamespace="com.sunxiansheng.practice.server.dao.PracticeDetailDao"><selectid="selectDetail"resultType="com.sunxiansheng.practice.server.entity.po.PracticeDetailPO">
select id,
subject_id as subjectId,
subject_type as subjectType,
answer_status as answerStatus,
answer_content as answerContent
from practice_detail
where is_deleted = 0
and practice_id = #{practiceId}
and subject_id = #{subjectId}
and created_by = #{loginId}
</select></mapper>
A.Chmax Rush!(枚举)
题意:
有一个长度为 N N N的整数序列 S S S。最初, S S S的所有元素都是 0 0 0。
同时给你两个长度为 Q Q Q的整数序列: P ( P 1 , P 2 , … , P Q ) P(P_1,P_2,\dots,P_Q) P(P1,P2,…,PQ…
引入第三方组件时,下载了组件还是报ts错误Could not find a declaration file for module 解决办法 1. 下载这个插件的ts库(有的没有ts库就用下面这种方式) 2. 在src下创建一个shims-vue.d.ts文件(简单直接,我用的这种…