zhaoxianglong
8 months ago
12 changed files with 180 additions and 20 deletions
@ -1,14 +1,21 @@ |
|||
package com.zc.business.mapper; |
|||
|
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.zc.business.domain.DcDevice; |
|||
import com.zc.business.domain.DcStakeMark; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 桩号Mapper接口 |
|||
* |
|||
* @author zhaoxianglong |
|||
* @author |
|||
*/ |
|||
@Mapper |
|||
public interface DcStakeMarkMapper extends BaseMapper<DcStakeMark> { |
|||
|
|||
|
|||
boolean batchInsert(List<DcStakeMark> dcStakeMarkList); |
|||
|
|||
} |
|||
|
@ -0,0 +1,41 @@ |
|||
<?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="com.zc.business.mapper.DcStakeMarkMapper"> |
|||
|
|||
|
|||
<insert id="batchInsert" parameterType="List"> |
|||
<foreach collection ="list" item="dcStakeMark" index= "index" separator =";"> |
|||
insert into dc_stake_mark |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="dcStakeMark.stakeMark != null">stake_mark,</if> |
|||
<if test="dcStakeMark.longitude != null">longitude,</if> |
|||
<if test="dcStakeMark.latitude != null">latitude,</if> |
|||
<if test="dcStakeMark.direction != null">direction,</if> |
|||
<if test="dcStakeMark.sectionId != null">section_id,</if> |
|||
<if test="dcStakeMark.mileage != null">mileage,</if> |
|||
create_time, |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="dcStakeMark.stakeMark != null">#{dcStakeMark.stakeMark},</if> |
|||
<if test="dcStakeMark.longitude != null">#{dcStakeMark.longitude},</if> |
|||
<if test="dcStakeMark.latitude != null">#{dcStakeMark.latitude},</if> |
|||
<if test="dcStakeMark.direction != null">#{dcStakeMark.direction},</if> |
|||
<if test="dcStakeMark.sectionId != null">#{dcStakeMark.sectionId},</if> |
|||
<if test="dcStakeMark.mileage != null">#{dcStakeMark.mileage},</if> |
|||
now(), |
|||
</trim> |
|||
ON DUPLICATE KEY UPDATE |
|||
<trim suffixOverrides=","> |
|||
<if test="dcStakeMark.stakeMark != null">stake_mark = #{dcStakeMark.stakeMark},</if> |
|||
<if test="dcStakeMark.longitude != null">longitude = #{dcStakeMark.longitude},</if> |
|||
<if test="dcStakeMark.latitude != null">latitude = #{dcStakeMark.latitude},</if> |
|||
<if test="dcStakeMark.direction != null">direction = #{dcStakeMark.direction},</if> |
|||
<if test="dcStakeMark.sectionId != null">section_id = #{dcStakeMark.sectionId},</if> |
|||
<if test="dcStakeMark.mileage != null">mileage = #{dcStakeMark.mileage},</if> |
|||
update_time = now(), |
|||
</trim> |
|||
</foreach> |
|||
</insert> |
|||
</mapper> |
Loading…
Reference in new issue