Files
crawler-plugin/backend-java/src/main/resources/mapper/jd/JdGroupShopMapper.xml
T

16 lines
872 B
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.nanri.aiimage.modules.jd.mapper.JdGroupShopMapper">
<!-- 京东数据库分类店铺名单(V214,v1.7):SQL 全部落 XML(铁律 1)。
唯一键 uk_category_shop(category_id, shop_name)=同分类重名拒绝;
批量添加用 INSERT IGNORE 幂等(撞已存在的行跳过,原型 onConflictDoNothing 同语义),
其余 CRUD 走 BaseMapper + wrapper(SqlLayering 惯例,无 XML)。 -->
<insert id="insertIgnoreBatch">
INSERT IGNORE INTO biz_jd_group_shop (category_id, shop_name, created_by)
VALUES
<foreach collection="shopNames" item="name" separator=",">
(#{categoryId}, #{name}, #{createdBy})
</foreach>
</insert>
</mapper>