Commit 4b9fca96 authored by 刘凡's avatar 刘凡

新增:气瓶标签入库mapper

parent 4761ff3d
......@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderTags;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 气瓶标签信息 Mapper 接口
*
......@@ -13,4 +15,6 @@ import org.apache.ibatis.annotations.Param;
public interface CylinderTagsMapper extends BaseMapper<CylinderTags> {
Double queryIntegirtyByAppId(@Param("appId") String appId);
void saveOrUpdateBatch(@Param("list") List<CylinderTags> cylinderTagsList);
}
......@@ -8,4 +8,44 @@
</select>
<insert id="saveOrUpdateBatch" parameterType="com.yeejoin.amos.boot.module.cylinder.flc.api.entity.CylinderTags">
INSERT INTO tz_cylinder_tags"(
sequence_nbr,
sequence_code,
qrcode,
electronic_label_code,
rec_date,
rec_user_id,
sync_date,
sync_state,
app_id,
integrity,
gas_cylinder_stamp)
VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.sequenceNbr},
#{item.sequenceCode},
#{item.qrCode},
#{item.electronicLabelCode},
#{item.recDate},
#{item.recUserId},
#{item.syncDate},
#{item.syncState},
#{item.appId},
#{item.integrity},
#{item.gasCylinderStamp})
</foreach>
on conflict (sequence_code) do update set
"qrcode" = EXCLUDED."qrcode",
"electronic_label_code" = EXCLUDED."electronic_label_code",
"rec_date" = EXCLUDED."rec_date",
"rec_user_id" = EXCLUDED."rec_user_id",
"sync_date" = EXCLUDED."sync_date",
"sync_state" = EXCLUDED."sync_state",
"app_id" = EXCLUDED."app_id",
"integrity" = EXCLUDED."integrity",
"security_adm_phone" = EXCLUDED."security_adm_phone",
"gas_cylinder_stamp" = EXCLUDED."gas_cylinder_stamp"
</insert>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment