#----                   店铺信息
goblin_store_info.insert_by_cert=INSERT INTO goblin_store_info (store_id,uid,status,store_type,cert_type,created_by,created_at)VALUES(?,?,?,?,?,?,?) 
goblin_store_info.update_by_cert1=UPDATE goblin_store_info SET store_type=?,cert_type=?,updated_by=?,updated_at=? WHERE store_id=? 
goblin_store_info.update_by_cert2=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,status=?,store_type=?,updated_by=?,updated_at=? WHERE store_id=? 
goblin_store_info.update_by_del=UPDATE goblin_store_info SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=? 
goblin_store_info.update_by_edit=UPDATE goblin_store_info SET store_name=?,logo_pic=?,background_pic=?,introduce=?,updated_by=?,updated_at=? WHERE store_id=? 

goblin_store_certification.insert_by_cert=INSERT INTO goblin_store_certification (store_id,person_cert_type,person_name,person_cert_code,person_cert_validity,person_cert_lasting,person_cert_fpic,person_cert_bpic,person_cert_spic,province_id,province_name,city_id,city_name,county_id,county_name,bus_address,bus_name,bus_cert_code,bus_cert_validity,bus_cert_lasting,bus_cert_pic,bus_quality_pic,created_by,created_at) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) 
goblin_store_certification.update_by_cert=UPDATE goblin_store_certification SET person_cert_type=?,person_name=?,person_cert_code=?,person_cert_validity=?,person_cert_lasting=?,person_cert_fpic=?,person_cert_bpic=?,person_cert_spic=?,province_id=?,province_name=?,city_id=?,city_name=?,county_id=?,county_name=?,bus_address=?,bus_name=?,bus_cert_code=?,bus_cert_validity=?,bus_cert_lasting=?,bus_cert_pic=?,bus_quality_pic=?,updated_by=?,updated_at=? WHERE store_id=? 
goblin_store_certification.update_by_del=UPDATE goblin_store_certification SET del_flg=1,updated_by=?,updated_at=? WHERE store_id=? 
#----                   商品信息
goblin_goods.insert=INSERT INTO goblin_goods (spu_id,spu_no,name,subtitle,sell_price, price_ge,price_le,intro,details,cover_pic, video,spec_mode,store_id,cate_fid,cate_sid, cate_tid,store_cate_fid,store_cate_sid,store_cate_tid,brand_id, shelves_handle,shelves_time,spu_validity,virtual_flg,status, shelves_status,spu_appear,shelves_at,created_by,created_at, logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) 
goblin_goods.update_by_shelves=UPDATE goblin_goods SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND spu_appear='0' 
goblin_goods.update_by_del_store=UPDATE goblin_goods SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? 
goblin_goods.update_by_del=UPDATE goblin_goods SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=? 

goblin_goods_sku.insert=INSERT INTO goblin_goods_sku (sku_id,spu_id,sku_no,name,subtitle, sell_price,sku_pic,sku_isbn,stock,sku_stock, warning_stock,price,price_member,weight,buy_factor, buy_roster,buy_limit,store_id,sku_validity,virtual_flg, status,shelves_status,sku_appear,shelves_at,created_by, created_at,logistics_template)VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) 
goblin_goods_sku.update_by_shelves=UPDATE goblin_goods_sku SET shelves_status=?,shelves_at=?,updated_by=?,updated_at=? WHERE spu_id=? AND store_id=? AND sku_appear='0' 
goblin_goods_sku.update_by_del_store=UPDATE goblin_goods_sku SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE store_id=? 
goblin_goods_sku.update_by_del=UPDATE goblin_goods_sku SET del_flg=1,updated_by=?,updated_at=?,deleted_by=?,deleted_at=? WHERE spu_id=? AND store_id=? 

goblin_goods_image.insert=INSERT INTO goblin_goods_image (spu_id,url)VALUES(?,?) 
goblin_goods_tag.insert=insert into goblin_goods_tag (spu_id,tag_id,sort,tag_belong)VALUES(?,?,?,?) 
goblin_goods_service_support.insert=INSERT INTO goblin_goods_service_support (spu_id,ssid)VALUES(?,?) 

goblin_goods_spu_spec_value.insert=INSERT INTO goblin_goods_spu_spec_value (spu_id,spec_id,spec_vid)VALUES(?,?,?) 
goblin_goods_sku_spec_value.insert=INSERT INTO goblin_goods_sku_spec_value (spu_id,sku_id,spec_id,spec_vid)VALUES(?,?,?,?) 

goblin_goods_category_spec.insert=insert into goblin_goods_category_spec (cate_id, spec_id)VALUES(?,?) 

goblin_goods_spec.insert=INSERT INTO goblin_goods_spec (spec_id,spec_name,created_by,created_at)VALUES(?,?,?,?) 
goblin_goods_spec_value.insert=INSERT INTO goblin_goods_spec_value (spec_id,spec_vid,spec_vname,created_by,created_at)VALUES(?,?,?,?,?) 
#----                   商铺活动
goblin.store.market.insert=INSERT INTO goblin_store_marketing (`store_market_id`,`name`,`type`,`status`,`store_id`,`start_time`,`end_time`,`del_flag`,`is_pre`,`pre_time`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?)
goblin.store.market.status=UPDATE goblin_store_marketing SET status=? , del_flag=? WHERE store_market_id =? and store_id =?
goblin.store.market.update=UPDATE goblin_store_marketing SET name=?,type=?,status=?,store_id=?,describes=?,start_time=?,end_time=?,del_flag=?,is_pre=?,pre_time=?,updated_at=? WHERE store_market_id =? and store_id =?
goblin.store.market.insertRelation=INSERT INTO goblin_store_market_purchasing (`purchase_id`,`store_market_id`,`spu_id`,`sku_id`,`store_id`,`price_marketing`,`stock_marketing`,`buy_factor`,`buy_roster`,`buy_limit`,`del_flag`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
goblin.store.market.updateRelation=UPDATE goblin_store_market_purchasing SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE store_market_id =? and store_id =?
goblin.store.market.delSpuRelation=UPDATE goblin_store_market_purchasing SET del_flag = ?,updated_at = ? WHERE store_market_id =? and store_id =? and spu_id=?
#----                   平台活动
goblin.self.market.insertRelation=INSERT INTO goblin_marketing_zhengzai (`zhengzai_id`,`self_market_id`,`spu_id`,`sku_id`,`store_id`,`price_marketing`,`stock_marketing`,`buy_factor`,`buy_roster`,`buy_limit`,`del_flag`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)
goblin.self.market.updateRelation=UPDATE goblin_marketing_zhengzai SET price_marketing=? ,stock_marketing=? , buy_factor=?,buy_roster=?,buy_limit=?,updated_at=? WHERE self_market_id =? and store_id =?
goblin.self.market.delSpuRelation=UPDATE goblin_marketing_zhengzai SET del_flag = ?,updated_at = ? WHERE self_market_id =? and store_id =? and spu_id=?
#----                   订单创建&支付
goblin.order.create.order_insert=INSERT INTO goblin_store_order (`master_order_code`,`order_id`,`store_id`,`store_name`,`order_code`,`user_id`,`user_name`,`user_mobile`,`price_total`,`price_actual`,`price_refund`,`price_express`,`price_coupon`,`price_voucher`,`status`,`ucoupon_id`,`pay_type`,`device_from`,`source`,`version`,`is_member`,`order_type`,`write_off_code`,`pay_countdown_minute`,`ip_address`,`pay_code`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin.order.create.attr_insert=INSERT INTO goblin_order_attr (`order_attr_id`,`order_id`,`express_contacts`,`express_address`,`express_address_detail`,`express_phone`,`express_type`,`created_at`) VALUES (?,?,?,?,?,?,?,?)
goblin.order.create.sku_insert=INSERT INTO goblin_order_sku (`order_sku_id`,`order_id`,`spu_id`,`spu_name`,`sku_id`,`num`,`sku_price`,`sku_price_actual`,`sku_name`,`sku_no`,`sku_image`,`sku_specs`,`price_voucher`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)
goblin_order.pay.order=UPDATE goblin_store_order SET payment_type = ? ,payment_id=?,pay_code = ? ,pay_time = ?,write_off_code = ? ,status = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.pay.sku=UPDATE goblin_order_sku SET status = ? ,updated_at = ?  WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#----                   再次支付
goblin_order.pay.again=UPDATE goblin_store_order SET pay_type = ? ,device_from = ? ,pay_code = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#----                   订单绑定[正在下单]
goblin_order.zhengzai.bind=UPDATE goblin_store_order SET uid = ? ,updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#----                   商铺订单操作
goblin_order.store.cancel=UPDATE goblin_store_order SET status = ? ,cancel_time = ? , cancel_reason = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.address=UPDATE goblin_order_attr SET express_contacts = ? ,express_address_detail = ? , express_phone = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderPrice=UPDATE goblin_store_order SET price_modify = ? ,price_voucher = ? , price_actual = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.orderSkuPrice=UPDATE goblin_order_sku SET price_modify = ? ,price_voucher = ? , sku_price_actual = ? , updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.log = INSERT INTO goblin_order_operation_log (`order_log_id`,`order_id`,`type`,`remark`,`operation_name`,`created_at`) VALUES(?,?,?,?,?,?)
goblin_order.store.refundLog = INSERT INTO goblin_back_order_log (`back_order_log_id`,`back_order_id`,`operation_type`,`message`,`operation_name`,`status`,`created_at`) VALUES(?,?,?,?,?,?,?)
goblin_order.store.orderExpressPrice=UPDATE goblin_store_order SET price_total =? , price_modify = ? ,price_voucher = ? , price_actual = ? ,price_express = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.backOrder=INSERT INTO goblin_back_order (`back_order_id`,`back_code`,`order_id`,`order_code`,`store_id`,`user_id`,`sku_id_nums`,`type`,`reason`,`describes`,`real_back_price`,`status`,`created_at`) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,)
goblin_order.store.refundPrice=UPDATE goblin_store_order SET price_refund = ? ,status = ? , updated_at = ? WHERE order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.refundSkuPrice=UPDATE goblin_order_sku SET price_refund = ? ,status = ? ,  updated_at = ? WHERE order_sku_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
goblin_order.store.refundBackOrder=UPDATE goblin_back_order SET status = ? , updated_at = ? WHERE back_order_id = ? and (updated_at <= ? or created_at = ? or updated_at is null)
#----  购物车操作
goblin_shop.cart.delete = UPDATE goblin_shopping_cart set del_tag=? where  user_id=? and sku_id=?
goblin_shop.cart.insert = insert into goblin_shopping_cart (car_id, user_id, store_id,spu_id, sku_id, `number`,marketing_id, del_tag, `comment`) values (?,?,?,?,?,?,?,?,?)
goblin_shop.cart.update = update goblin_shopping_cart set `number` = ? where car_id=? and user_id=? and del_tag=0