1. Increase
public int Insert (port port);
2. By deleting
public int deletem (String ID);
3. Change
public int update (port port);
1. Increase
<insert id= "Insert" parametertype= "Com.cn.eport.pojo.Port" resulttype= "integer">
INSERT into Bas_port (
Id
COUNTRY_ID,
REGION_ID,
NAME,
Is_lock,
Add_by,
Add_time,
Update_by,
Update_time
)
VALUES
(
#{id},#{country_id},#{region_id},#{name},#{is_lock},#{add_by},#{add_time},#{update_by},#{update_time})
</insert>
2. By deleting
<delete id= "Deletem" resulttype="integer" >
DELETE
From
Pro_mainfest
WHERE
id = #{id}
</delete>
3. Change
<update id= "Update" parametertype= "Com.cn.eport.pojo.Port" resulttype= "integer" >
UPDATE Bas_port
SET id = #{id},country_id=#{country_id},
region_id = #{region_id},name=#{name},is_lock=#{is_lock},
add_by = #{add_by},add_time=#{add_time},update_by=#{update_by},update_by=#{update_by}
WHERE
id = #{id}
</update>
4.mysql Database Paging Query
Limit x, y x start rows y Total row number set meaning (x, x+y)
MySQL mapper additions and deletions in the search and change