|  |  |  | @ -6,7 +6,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="orderIdFk" jdbcType="VARCHAR" property="orderIdFk"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="productId" jdbcType="VARCHAR" property="productId"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="code" jdbcType="VARCHAR" property="code"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="status" jdbcType="BOOLEAN" property="status"/> | 
			
		
	
		
			
				
					|  |  |  |  |         <result column="status" jdbcType="INTEGER" property="status"/> | 
			
		
	
		
			
				
					|  |  |  |  |     </resultMap> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <sql id="Base_Column_List"> | 
			
		
	
	
		
			
				
					|  |  |  | @ -35,7 +35,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         insert into inv_count_codes (orderIdFk, productId, code, | 
			
		
	
		
			
				
					|  |  |  |  |                                      `status`) | 
			
		
	
		
			
				
					|  |  |  |  |         values (#{orderIdFk,jdbcType=VARCHAR}, #{productId,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{status,jdbcType=BOOLEAN}) | 
			
		
	
		
			
				
					|  |  |  |  |                 #{status,jdbcType=INTEGER}) | 
			
		
	
		
			
				
					|  |  |  |  |     </insert> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <insert id="insertSelective" keyColumn="id" keyProperty="id" | 
			
		
	
	
		
			
				
					|  |  |  | @ -66,7 +66,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 #{code,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="status != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 #{status,jdbcType=BOOLEAN}, | 
			
		
	
		
			
				
					|  |  |  |  |                 #{status,jdbcType=INTEGER}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </trim> | 
			
		
	
		
			
				
					|  |  |  |  |     </insert> | 
			
		
	
	
		
			
				
					|  |  |  | @ -84,7 +84,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |                 code = #{code,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |             <if test="status != null"> | 
			
		
	
		
			
				
					|  |  |  |  |                 `status` = #{status,jdbcType=BOOLEAN}, | 
			
		
	
		
			
				
					|  |  |  |  |                 `status` = #{status,jdbcType=INTEGER}, | 
			
		
	
		
			
				
					|  |  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |  |         </set> | 
			
		
	
		
			
				
					|  |  |  |  |         where id = #{id,jdbcType=INTEGER} | 
			
		
	
	
		
			
				
					|  |  |  | @ -95,7 +95,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         set orderIdFk = #{orderIdFk,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             productId = #{productId,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             code      = #{code,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |             `status`  = #{status,jdbcType=BOOLEAN} | 
			
		
	
		
			
				
					|  |  |  |  |             `status`  = #{status,jdbcType=INTEGER} | 
			
		
	
		
			
				
					|  |  |  |  |         where id = #{id,jdbcType=INTEGER} | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -119,7 +119,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |             </trim> | 
			
		
	
		
			
				
					|  |  |  |  |             <trim prefix="`status` = case" suffix="end,"> | 
			
		
	
		
			
				
					|  |  |  |  |                 <foreach collection="list" index="index" item="item"> | 
			
		
	
		
			
				
					|  |  |  |  |                     when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=BOOLEAN} | 
			
		
	
		
			
				
					|  |  |  |  |                     when id = #{item.id,jdbcType=INTEGER} then #{item.status,jdbcType=INTEGER} | 
			
		
	
		
			
				
					|  |  |  |  |                 </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |             </trim> | 
			
		
	
		
			
				
					|  |  |  |  |         </trim> | 
			
		
	
	
		
			
				
					|  |  |  | @ -135,7 +135,7 @@ | 
			
		
	
		
			
				
					|  |  |  |  |         values | 
			
		
	
		
			
				
					|  |  |  |  |         <foreach collection="list" item="item" separator=","> | 
			
		
	
		
			
				
					|  |  |  |  |             (#{item.orderIdFk,jdbcType=VARCHAR}, #{item.productId,jdbcType=VARCHAR}, #{item.code,jdbcType=VARCHAR}, | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.status,jdbcType=BOOLEAN}) | 
			
		
	
		
			
				
					|  |  |  |  |              #{item.status,jdbcType=INTEGER}) | 
			
		
	
		
			
				
					|  |  |  |  |         </foreach> | 
			
		
	
		
			
				
					|  |  |  |  |     </insert> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
	
		
			
				
					|  |  |  | @ -163,14 +163,34 @@ | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="countByOrderIdFk" resultType="java.lang.Long"> | 
			
		
	
		
			
				
					|  |  |  |  |         select count(*) from inv_count_codes where orderIdFk = #{orderIdFk} | 
			
		
	
		
			
				
					|  |  |  |  |         select count(*) | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_count_codes | 
			
		
	
		
			
				
					|  |  |  |  |         where orderIdFk = #{orderIdFk} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="countByOrderId" resultType="java.lang.Long"> | 
			
		
	
		
			
				
					|  |  |  |  |         select count(*) from inv_count_codes where orderIdFk = #{orderIdFk} | 
			
		
	
		
			
				
					|  |  |  |  |         select count(*) | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_count_codes | 
			
		
	
		
			
				
					|  |  |  |  |         where orderIdFk = #{orderIdFk} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectCountByCodeAndOrderId" resultType="java.lang.Long"> | 
			
		
	
		
			
				
					|  |  |  |  |         select count(*) from inv_count_codes where orderIdFk = #{orderIdFk} and code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |         select count(*) | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_count_codes | 
			
		
	
		
			
				
					|  |  |  |  |         where orderIdFk = #{orderIdFk} | 
			
		
	
		
			
				
					|  |  |  |  |           and code = #{code} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <update id="resetCountFiledValue"> | 
			
		
	
		
			
				
					|  |  |  |  |         update inv_count_codes | 
			
		
	
		
			
				
					|  |  |  |  |         set status = null | 
			
		
	
		
			
				
					|  |  |  |  |         where orderIdFk = #{orderId} | 
			
		
	
		
			
				
					|  |  |  |  |     </update> | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |     <select id="selectByOrderIdAndProductId" resultMap="BaseResultMap"> | 
			
		
	
		
			
				
					|  |  |  |  |         select * | 
			
		
	
		
			
				
					|  |  |  |  |         from inv_count_codes | 
			
		
	
		
			
				
					|  |  |  |  |         where orderIdFk = #{orderIdFk} | 
			
		
	
		
			
				
					|  |  |  |  |           and productId = #{productId} | 
			
		
	
		
			
				
					|  |  |  |  |     </select> | 
			
		
	
		
			
				
					|  |  |  |  | </mapper> |