build/classes/edu/jmi/mapper/TopicMapper.xml
(开头部分) 2KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="edu.jmi.dao.TopicDao">
<resultMap id="BaseResultMap" type="edu.jmi.model.Topic">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="tname" jdbcType="VARCHAR" property="tname" />
<result column="fname" jdbcType="VARCHAR" property="fname" />
<result column="company" jdbcType="VARCHAR" property="company" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="charger" jdbcType="VARCHAR" property="charger" />
<result column="info" jdbcType="VARCHAR" property="info" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="createTime" jdbcType="VARCHAR" property="createTime" />
</resultMap>
<select id="selectAll" parameterType="edu.jmi.model.Topic" resultMap="BaseResultMap">
select * from topic
order by id asc
</select>
<select id="findByTname" parameterType="edu.jmi.model.Topic" resultMap="BaseResultMap">
select * from topic
<where>
<if test="tname!=null and tname!=''">
AND tname LIKE CONCAT(CONCAT('%',#{tname},'%'))
</if>
</where>
ORDER BY id
</select>
<select id="findById" parameterType="edu.jmi.model.Topic" resultMap="BaseResultMap">
select * from topic where id=#{id}
</select>
<insert id="insert" parameterType="edu.jmi.model.Topic" >
insert into topic (tname,fname,company,type,charger,info,url,createTime)
values (#{tname,jdbcType=VARCHAR},#{fname,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR},#{charger,jdbcType=VARCHAR}, #{info,jdbcType=VARCHAR},#{url,jdbcType=VARCHAR},
#{createTime,jdbcType=VARCHAR})
</insert>
<update id="update" parameterType="edu.jmi.model.Topic">
update Topic set
tname = #{record.tname,jdbcType=VARCHAR},
<!-- fname = #{record.fname,jdbcType=VARCHAR}, -->
company = #{record.company,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
charger = #{record.charger,jdbcType=VARCHAR},
info = #{record.info,jdbcType=VARCHAR},
<!-- url = #{record.url,jdbcType=VARCHAR}, -->
createTime = #{record.createTime,jdbcType=VARCHAR}
where id=#{id}
</update>
<delete id="delete" parameterType="java.lang.Integer">
delete from topic
后面还有 5 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。