p.`prod_id`, p.`shop_id`, p.`prod_name`, p.`pic`, p.`price`, p.`ori_price`, p.`brief`, p.`imgs`, p.`category_id`, p.`total_stocks`, p.status p.prod_id, p.pic, p.prod_name, p.price, p.brief, p.shop_id, p.status update tz_prod set total_stocks = total_stocks - #{prod.totalStocks} ,version = version + 1 where prod_id = #{prod.prodId} and #{prod.totalStocks} <= total_stocks update tz_prod set total_stocks = total_stocks + #{changeStocks} where prod_id = #{prodId} UPDATE tz_prod p SET p.`activity_id` = #{groupActivityId},p.`prod_type`=1 WHERE p.`prod_id` IN #{prodId} UPDATE tz_prod p SET p.`activity_id` = NULL,p.`prod_type`=0 WHERE p.`prod_id` =#{prodId} UPDATE tz_prod p SET p.`activity_id` = NULL,p.`prod_type`=0 WHERE p.`activity_id` =#{groupActivityId} update tz_prod p set p.status = 3,p.update_time=now() where p.prod_id = #{prodId} update tz_prod p set p.status = 0,p.update_time=now() where p.prod_id = #{prodId} update tz_prod p set p.status = 2,p.update_time=now() where p.prod_id = #{prodId} update tz_prod p set p.sold_num = p.sold_num + #{orderItem.prodCount},p.update_time=now() where p.prod_id = #{orderItem.prodId} UPDATE tz_prod p SET p.`status` = 0 WHERE p.`shop_id` = #{shopId} AND p.`status` = 1 UPDATE tz_prod SET shop_category_id=#{product.shopCategoryId}, pic=#{product.pic}, video=#{product.video}, content=#{product.content}, delivery_mode=#{product.deliveryMode},price=#{product.price}, prod_name=#{product.prodName}, brief=#{product.brief}, imgs=#{product.imgs}, total_stocks=#{product.totalStocks}, update_time=#{product.updateTime},ori_price=#{product.oriPrice}, delivery_template_id=#{product.deliveryTemplateId}, category_id=#{product.categoryId}, status=#{product.status},brand_id=#{product.brandId} WHERE prod_id=#{product.prodId} UPDATE tz_prod SET `status` = 0 WHERE `category_id` = #{categoryId}