create_by,
		create_time,
		update_by,
		update_time,
			id,
			act_name,
			act_code,
			act_type,
			act_begin_time,
			act_end_time,
			act_status,
			shop_ids,
			act_remark,
			act_max,
			act_img,
			act_content,
			company_id
	
	
	
	
		#{item.createBy},
		now(),
		#{item.updateBy},
		now(),
			#{item.id},
			#{item.actName},
			#{item.actCode},
			#{item.actType},
			#{item.actBeginTime},
			#{item.actEndTime},
			#{item.actStatus},
			#{item.shopIds},
			#{item.actRemark},
			#{item.actMax},
			#{item.actImg},
			#{item.actContent},
			#{item.companyId}
	
	
	
	
		 
		 
			
				and id  = #{record.id} 
			
			 
				 and company_id  = #{record.companyId}
			 
			
				and act_name  like  CONCAT(CONCAT('%',#{record.actName}),'%')
			
			
				and act_type  = #{record.actType} 
			
			
				and DATE_FORMAT(act_begin_time,'%Y-%m-%d %H:%i:%s')  >= DATE_FORMAT(#{record.beginTime} ,'%Y-%m-%d %H:%i:%s')
			
			
				and DATE_FORMAT(#{record.endTime} ,'%Y-%m-%d %H:%i:%s') >= DATE_FORMAT(act_end_time,'%Y-%m-%d %H:%i:%s')
			
			
				and create_by  = #{record.createBy} 
			
			
				and act_status  = #{record.actStatus} 
			
			
				and find_in_set(#{record.shopIds}, shop_ids)
			
			
				and act_remark  = #{record.actRemark} 
			
			
				and act_max  = #{record.actMax} 
			
		
		 
	
	
	
	
		INSERT INTO shop_activities (
			 
		)
	VALUES (
		 
	)
	
	
	
	
	
	
		INSERT INTO shop_activities (
			
		)
	VALUES 
	(
			
	)
	
	
	
	
	
	
	
	
		UPDATE shop_activities
		
			
					act_name = #{actName},
						
			
					act_type = #{actType},
						
			
					act_begin_time = #{actBeginTime},
						
			
					act_end_time = #{actEndTime},
						
			
					create_by = #{createBy},
						
			
					act_status = #{actStatus},
						
			
					shop_ids = #{shopIds},
						
			
					act_remark = #{actRemark},
						
			
					act_max = #{actMax},
						
		
		WHERE id=#{id} 
	 
	
	
	
	
		UPDATE shop_activities
		
			
				act_name  = #{record.actName},
			
			
				act_code  = #{record.actCode},
			
			
				act_content  = #{record.actContent},
			
			
				act_type  = #{record.actType}, 
			
			
				act_begin_time  = #{record.actBeginTime}, 
			
			
				act_end_time  = #{record.actEndTime}, 
			
			
				create_by  = #{record.createBy}, 
			
			
				act_status  = #{record.actStatus}, 
			
			
				shop_ids  = #{record.shopIds}, 
			
			
				act_remark  = #{record.actRemark}, 
			
			
				act_max  = #{record.actMax}, 
			
		
		WHERE id=#{record.id} 
	
	
	
	
		delete from shop_activities where  id in
		
			#{item}
		
	
		
	
	
		DELETE FROM shop_activities
		where  id=#{id} 
	
	
	
	
		DELETE FROM shop_activities
		
		
		
	
	
	
	
	
	
	
	
	
	
		
	
	
	
		
	
	
	
	
	
	
	
	
		
			update shop_activities set act_status=#{status}
			where id=#{item.id}