You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
6.1 KiB
106 lines
6.1 KiB
|
2 years ago
|
<?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="cc.hiver.mall.purchaseocr.mapper.PurchaseOcrPictureMapper">
|
||
|
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.purchaseocr.entity.PurchaseOcrPicture">
|
||
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
||
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||
|
|
<result column="create_by_name" jdbcType="VARCHAR" property="createByName" />
|
||
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||
|
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" />
|
||
|
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||
|
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||
|
|
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
|
||
|
|
<result column="ocr_picture" jdbcType="VARCHAR" property="ocrPicture" />
|
||
|
|
<result column="ocr_picture_order" jdbcType="INTEGER" property="ocrPictureOrder" />
|
||
|
|
<result column="ocr_status" jdbcType="INTEGER" property="ocrstatus" />
|
||
|
|
<result column="ocr_msg" jdbcType="VARCHAR" property="ocrMsg" />
|
||
|
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" />
|
||
|
|
<result column="shop_name" jdbcType="VARCHAR" property="shopName" />
|
||
|
|
</resultMap>
|
||
|
|
<sql id="Example_Where_Clause">
|
||
|
|
<where>
|
||
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
||
|
|
<if test="criteria.valid">
|
||
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||
|
|
<foreach collection="criteria.criteria" item="criterion">
|
||
|
|
<choose>
|
||
|
|
<when test="criterion.noValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.singleValue">
|
||
|
|
and ${criterion.condition} #{criterion.value}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.betweenValue">
|
||
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.listValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||
|
|
separator=",">
|
||
|
|
#{listItem}
|
||
|
|
</foreach>
|
||
|
|
</when>
|
||
|
|
</choose>
|
||
|
|
</foreach>
|
||
|
|
</trim>
|
||
|
|
</if>
|
||
|
|
</foreach>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
<sql id="Update_By_Example_Where_Clause">
|
||
|
|
<where>
|
||
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
||
|
|
<if test="criteria.valid">
|
||
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
||
|
|
<foreach collection="criteria.criteria" item="criterion">
|
||
|
|
<choose>
|
||
|
|
<when test="criterion.noValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.singleValue">
|
||
|
|
and ${criterion.condition} #{criterion.value}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.betweenValue">
|
||
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
||
|
|
</when>
|
||
|
|
<when test="criterion.listValue">
|
||
|
|
and ${criterion.condition}
|
||
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="("
|
||
|
|
separator=",">
|
||
|
|
#{listItem}
|
||
|
|
</foreach>
|
||
|
|
</when>
|
||
|
|
</choose>
|
||
|
|
</foreach>
|
||
|
|
</trim>
|
||
|
|
</if>
|
||
|
|
</foreach>
|
||
|
|
</where>
|
||
|
|
</sql>
|
||
|
|
<sql id="Base_Column_List">
|
||
|
|
id, create_by, create_by_name, create_time, del_flag, update_by, update_time, order_id, ocr_picture,
|
||
|
|
ocr_picture_order, ocr_status, ocr_msg, shop_id, shop_name
|
||
|
|
|
||
|
|
</sql>
|
||
|
|
|
||
|
|
<insert id="batchSave" parameterType="java.util.List">
|
||
|
|
insert into t_purchase_ocr_picture (id, create_by, create_by_name, create_time, del_flag, update_by, update_time, order_id, ocr_picture,
|
||
|
|
ocr_picture_order, ocr_status, ocr_msg, shop_id, shop_name) values
|
||
|
|
<foreach item="purchaseOcrPicture" collection="purchaseOcrPictureList" index="index" separator=",">
|
||
|
|
(#{purchaseOcrPicture.id,jdbcType=VARCHAR},#{purchaseOcrPicture.createBy,jdbcType=VARCHAR},
|
||
|
|
#{purchaseOcrPicture.createByName,jdbcType=VARCHAR},#{purchaseOcrPicture.createTime,jdbcType=TIMESTAMP},
|
||
|
|
#{purchaseOcrPicture.delFlag,jdbcType=INTEGER},#{purchaseOcrPicture.updateBy,jdbcType=VARCHAR},
|
||
|
|
#{purchaseOcrPicture.updateTime,jdbcType=TIMESTAMP},#{purchaseOcrPicture.orderId,jdbcType=VARCHAR},
|
||
|
|
#{purchaseOcrPicture.ocrPicture,jdbcType=VARCHAR},#{purchaseOcrPicture.ocrPictureOrder,jdbcType=INTEGER},
|
||
|
|
#{purchaseOcrPicture.ocrStatus,jdbcType=INTEGER},#{purchaseOcrPicture.ocrMsg,jdbcType=VARCHAR},
|
||
|
|
#{purchaseOcrPicture.shopId,jdbcType=VARCHAR},#{purchaseOcrPicture.shopName,jdbcType=VARCHAR})
|
||
|
|
</foreach>
|
||
|
|
|
||
|
|
</insert>
|
||
|
|
|
||
|
|
<update id="batchUpdate">
|
||
|
|
<foreach collection="purchaseOcrPictureList" item="item" separator=";" open="" close="">
|
||
|
|
UPDATE t_purchase_ocr_picture SET ocr_msg = #{item.ocrMsg} , ocr_status = #{item.ocrStatus} WHERE id = #{item.id}
|
||
|
|
</foreach>
|
||
|
|
</update>
|
||
|
|
</mapper>
|