# taoke_api **Repository Path**: readls/taoke_api ## Basic Information - **Project Name**: taoke_api - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 2 - **Created**: 2018-05-14 - **Last Updated**: 2020-12-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## pm2 export SHARP_DIST_BASE_URL=http://114.215.238.243/ npm install pm2 deploy pro setup pm2 deploy pro update pm2 deploy ecosystem_data.config.js pro setup pm2 deploy ecosystem_data.config.js pro update http://localhost:1819/api/webservice/v1/schedule/single?key=123456&action=capture&method=captureNew http://localhost:1819/api/webservice/v1/tasks/auto_settle?key=taoke@1818.com ## 申请高佣 http://pub.alimama.com/myunion.htm?#!/promo/self/campaign?campaignId=60174530&shopkeeperId=110014752&userNumberId=2468996161 ## 获取定向 http://pub.alimama.com/pubauc/getCommonCampaignByItemId.json?itemId=552542260145 ## 申请定向计划 http://pub.alimama.com/pubauc/applyForCommonCampaign.json {campId:campId,keeperid:keeperid,applyreason:_this.reason,_tb_token_:_this.token} ## 查询高佣 http://pub.alimama.com/items/channel/qqhd.json?q=http://item.taobao.com/item.htm?id=553868780226&channel=qqhd&perPageSize=40 https://uland.taobao.com/coupon/edetail?pid=mm_32293866_3446435_61658419&activityId=a4493a2c99ab427fb85c4fb10e335288&itemId=552650984517&unid=D01gw6odd2ov3l7zd7h5 ## 阿里妈妈优惠券 http://pub.alimama.com/promo/item/channel/index.htm?channel=qqhd&toPage=1&dpyhq=1&perPageSize=40 http://pub.alimama.com/common/code/getAuctionCode.json?auctionid=550184424773&adzoneid=82450251&siteid=24524669&scenes=3&channel=tk_qqhd&_tb_token_=ZqeBAO6xTkq&t=1498646297168 ## 获取店铺优惠券 https://cart.taobao.com/json/GetPriceVolume.do?sellerId=854316213 POST http://www.qingtaoke.com/api/UserPlan/UserCouponList {sid: 854316213} ## sql select * from Goodses where activityId not in(select activity_id from Coupons) select sources, count(*) count from Goodses group by sources having count > 100 select 'qingtaoke', count(*) count from Goodses where sources like '%qingtaoke%' union select 'yishoudan', count(*) count from Goodses where sources like '%yishoudan%' union select 'taokezhushou', count(*) count from Goodses where sources like '%taokezhushou%' union select 'dataoke', count(*) count from Goodses where sources like '%dataoke%' union select 'taofen8', count(*) count from Goodses where sources like '%taofen8%' union select 'taoqueqiao', count(*) count from Goodses where sources like '%taoqueqiao%' union select 'tuan360', count(*) count from Goodses where sources like '%tuan360%' select tao_user, DATE_FORMAT(createTime,'%Y%m%d') as days, count(*) count, sum(feeString) as feeString, sum(totalAlipayFeeString) as totalAlipayFeeString from TaokeOrders where payStatus in ('订单付款', '订单结算') group by tao_user, DATE_FORMAT(createTime,'%Y%m%d') select tao_user, DATE_FORMAT(createTime,'%Y%m%d') as days, count(*) count, sum(feeString) as feeString, sum(totalAlipayFeeString) as totalAlipayFeeString from TaokeOrders where payStatus in ('订单付款', '订单结算') and createTime > DATE_FORMAT(NOW(),'%Y%m%d') group by tao_user, DATE_FORMAT(createTime,'%Y%m%d') select tao_user, DATE_FORMAT(created_at,'%Y%m%d') as days, count(*) count, sum(feeString) as feeString, sum(totalAlipayFeeString) as totalAlipayFeeString from TaokeOrders where payStatus in ('订单付款', '订单结算') and created_at > DATE_FORMAT(NOW(),'%Y%m%d') group by tao_user, DATE_FORMAT(created_at,'%Y%m%d') ##清空高佣申请 update Goodses set eventCampId = null, eventKeeperid = null, eventRate = null, eventFee = null; delete from EventApplies; ## 文章 自助申请高佣 http://kouss.com/privilege.html ## 优惠券 PC端优惠券:taoquan.taobao.com/coupon/unify_apply.htm?activityId=380f523302b44224a03c67af5b098de9&sellerId=1090656788 无线端优惠券:shop.m.taobao.com/shop/coupon.htm?activityId=380f523302b44224a03c67af5b098de9&sellerId=1090656788 https://market.m.taobao.com/apps/aliyx/coupon/detail.html?wh_weex=true&activity_id=e7544f4ed92c42aaa547deaea3563f1e&seller_id=2359221749 ## 淘宝Api 获取淘宝宝贝详情图片的接口 https://hws.m.taobao.com/cache/mtop.wdetail.getItemDescx/4.1/?data=%7Bitem_num_id%3A%2240545413689%22%7D&type=jsonp&dataType=jsonp https://api.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?&api=mtop.taobao.detail.getdetail&v=6.0&ttid=2013%40taobao_h5_1.0.0&data=%7B%22itemNumId%22%3A%2214574686274%22%7D 获取商品详情H5页面接口 https://acs.m.taobao.com/h5/mtop.taobao.detail.getdetail/6.0/?data=%7B%22itemNumId%22%3A%2210031645140%22%7D&qq-pf-to=pcqq.group ## 生成推广代码 http://pub.alimama.com/common/code/getAuctionCode.json?auctionid=551058404001&adzoneid=71414425&siteid=21192652&scenes=1&_tb_token_=MlqimFjbypq http://pub.alimama.com/report/getTbkPaymentDetails.json?queryType=1&toPage=1&perPageSize=20&_tb_token_=MlqimFjbypq&_input_charset=utf-8 ## 还原数据 update Goodses set couponLink = ''; update TaokeOrders set is_amount = 0, status = 'Pending', pay_amount = null, agency_amount = null; delete from UserOrders; update Users set order_count = 0, amount =0, frozen = 0; ## 更新数据 update UsersFinances uf inner join Users u on(u.id = uf.user_id) set uf.partner_id = u.partner_id where uf.partner_id is null; update UsersWithdraws uw inner join Users u on(u.id = uw.user_id) set uw.partner_id = u.partner_id where uw.partner_id is null; update TaokeOrders t inner join Users u on(t.mediumId = u.mediumId) set t.agency_amount = (t.feeString * u.agency_scale / 100), t.inviter_agency_amount = (t.feeString * u.inviter_agency_scale / 100) where t.feeString > 0 and t.agency_amount is null and t.payStatus in ('订单付款','订单结算') update TaokeOrders t inner join Users u on(t.mediumId = u.mediumId) set t.agency_id = u.id, t.inviter_agency_id = u.inviter_id where t.feeString > 0 and t.agency_id is null and t.payStatus in ('订单付款','订单结算') update Users set agency_auto_settle = 1 where partner_id = 1 and `level` in('Agency', 'Partner'); select t.id, t.agency_id, t.feeString, (t.feeString * u.order_return_scale / 100) pay_amount, (t.feeString * u.inviter_scale / 100) inviter_pay_amount from TaokeOrders t inner join Users u on(t.agency_id = u.id) where u.order_return_scale > 0 and t.created_at > '2017-10-01' and t.payStatus != '订单失效' order by id desc; select t.id, t.agency_id, t.feeString, t.pay_amount, t.inviter_pay_amount from TaokeOrders t inner join Users u on(t.agency_id = u.id) where u.order_return_scale > 0 and t.created_at > '2017-10-01' and t.payStatus != '订单失效' order by id desc; update TaokeOrders t inner join Users u on(t.agency_id = u.id) set t.pay_amount = (t.feeString * u.order_return_scale / 100), t.inviter_pay_amount = (t.feeString * u.inviter_scale / 100) where u.order_return_scale > 0 and t.created_at > '2017-10-01' and t.payStatus != '订单失效' and pay_amount is null; //更新邀请数量 update Users s left join (select inviter_id, count(*) as count from Users group by inviter_id) u on(s.id = u.inviter_id) set s.invite_count = u.count; //更新下级数量 update Users s left join (select inviter_id, count(*) as count from Users where level in('Agency', 'Partner') group by inviter_id) u on(s.id = u.inviter_id) set s.agency_count = u.count; //更新粉丝数量 update Users s left join (select agency_id, count(*) as count from Users group by agency_id) u on(s.id = u.agency_id) set s.member_count = u.count; ##微信菜单 人气购买 http://pyl.you0738.com/ 9.9包邮 http://pyl.you0738.com/#is99 2.9白菜价 http://pyl.you0738.com/#is30 京东神券 http://union-click.jd.com/jdc?e=0&p=AyIHVCtaJQMiQwpDBUoyS0IQWlALHFRHFwQAQB1AWQkFGUlSUUIXXgVWVgxfCk4PXB1AWRFaBUpfSkUQBBlMR05aZV8%2FTgFGYQNtO3JSQV8nbCRwf2hvM11XGTITN1UaWhQAEwZSE18lMhIHZVA1FDISBlUbXhQCFwBWK1sRAxYGVxpaHAAUAFErWRUyZEMXRQR9Uk1RZStrJQ%3D%3D&t=W1dCFBBFC0RSRUpADgpQTFtLWQdFQVdFEEUYQRxKWABPEgpQTEMURQRIWlBCSlkCUF5P 京东领券中心 http://union-click.jd.com/jdc?e=0&p=AyIHVCtaJQMiQwpDBUoyS0IQWlALHFRHFwQAQB1AWQkFB10cQFkRWgVKHEBZEVoFSmxAUwpeD1ZsVQU7XRIKQEtCCUZrXGASDgMTXBVhTkMoZCh8XHJwDQFfdQ4eN1QrWxQDEwVUGlwdBiI3VRtrXmwTN1UaWxUHEwdQHFglAhYGURpZFAEUAFQdXyUAEjcjXxlLXXpXCk1rJTIi&t=W1dCFBBFC0RSRUpADgpQTFtLRxMLUExDFEUEC1BMQxRFBHtQRlgQTxh7RRBpE1JEV1tXWwg%3D https://api.m.jd.com/?functionId=listProducts&client=JingFenApp&clientVersion=2.1.0&body={%22keyword%22:%224822392%22,%22sort%22:%220%22,%22pageNum%22:1,%22pageSize%22:10} ## 统计代码 http://localhost:1829/api/data/v1/settings/schedule?action=capture&method=captureNew { "button": [ { "name": "抢优惠券", "sub_button": [ { "type": "view", "name": "人气购买", "url": "http://pyl.you0738.com/" }, { "type": "view", "name": "9.9包邮 ", "url": "http://pyl.you0738.com/#is99" }, { "type": "view", "name": "2.9白菜价", "url": "http://pyl.you0738.com/#is30" }, { "type": "view", "name": "京东神券", "url": "http://union-click.jd.com/jdc?e=0&p=AyIHVCtaJQMiQwpDBUoyS0IQWlALHFRHFwQAQB1AWQkFGUlSUUIXXgVWVgxfCk4PXB1AWRFaBUpfSkUQBBlMR05aZV8%2FTgFGYQNtO3JSQV8nbCRwf2hvM11XGTITN1UaWhQAEwZSE18lMhIHZVA1FDISBlUbXhQCFwBWK1sRAxYGVxpaHAAUAFErWRUyZEMXRQR9Uk1RZStrJQ%3D%3D&t=W1dCFBBFC0RSRUpADgpQTFtLWQdFQVdFEEUYQRxKWABPEgpQTEMURQRIWlBCSlkCUF5P" }, { "type": "view", "name": "京东领券中心", "url": "http://union-click.jd.com/jdc?e=0&p=AyIHVCtaJQMiQwpDBUoyS0IQWlALHFRHFwQAQB1AWQkFB10cQFkRWgVKHEBZEVoFSmxAUwpeD1ZsVQU7XRIKQEtCCUZrXGASDgMTXBVhTkMoZCh8XHJwDQFfdQ4eN1QrWxQDEwVUGlwdBiI3VRtrXmwTN1UaWxUHEwdQHFglAhYGURpZFAEUAFQdXyUAEjcjXxlLXXpXCk1rJTIi&t=W1dCFBBFC0RSRUpADgpQTFtLRxMLUExDFEUEC1BMQxRFBHtQRlgQTxh7RRBpE1JEV1tXWwg%3D" } ] }, { "name": "双11红包", "sub_button": [ { "type": "click", "name": "每天抢3次红包", "key": "11_red_packet" }, { "type": "click", "name": "双十一天猫必抢", "key": "11_bq" }, { "type": "click", "name": "聚划算预售场", "key": "11_jhs" }, { "type": "click", "name": "母婴主会场", "key": "11_my" } ] }, { "name": "我的", "sub_button": [ { "type": "view", "name": "个人中心", "url": "http://pyl.you0738.com/user_center" }, { "type": "click", "name": "我的二维码", "key": "get_poster" }, { "type": "click", "name": "申请代理", "key": "join_us" }, { "type": "view", "name": "如何使用", "url": "http://pyl.you0738.com/how_to_use" } ] } ] } 2017天猫双11全球狂欢节-主会场(带超级红包) https://s.click.taobao.com/t?e=m%3D2%26s%3DHzbHrbhklbIcQipKwQzePCperVdZeJviK7Vc7tFgwiFRAdhuF14FMTnW5%2FVGfDaIt4hWD5k2kjMaZoW%2B9HqOvKHogHulg72ArC1UUEjZ7Xl%2FVwjwVYLPPo4nZdlWtg%2FJuH1hWG3%2BVYSM%2BhtH71aX6mcTwOW2v8hcxDSEB%2BZjnUWcl5483ftBY0TUqR3TzkyrZgwGFHYUhQkrUIYZs4Z%2BL7wjWMjjIt6TxGDczT87jOIpHVDmQY3eFw5JFciRAGqY7tdseEsHS5R%2BEby9pnrfTBWxSppy0Mvo0IKY3i88PEl337Z0JeXYddeHAiA%2BF%2F4OT7cdELNMaxdOVPhIvNgOIM3%2FLfsenHbhIYULNg46oBA%3D https://s.click.taobao.com/V1e61Zw ¥6Aqo0gIqwke¥ select * from Users where level = 'Agency' and pid is null -- select * from UsersFinances where user_id = 18306 -- select * from UsersSearchs where user_id = 18306 -- delete from UsersFinances where user_id = 18306 -- delete from UsersSearchs where user_id = 18306 select count(*) as '粉丝数', sum(amount) as '余额', sum(frozen) as '冻结' from Users where partner_id = 1001; select status, sum(amount) from userswithdraws where partner_id = 1001 group by status; select user_id, sum(amount) from userswithdraws where partner_id = 1001 group by user_id order by sum(amount) desc select count(*) count, ifnull(sum(feeString),0) as feeString, ifnull(sum(totalAlipayFeeString),0) as totalAlipayFeeString from TaokeOrders where payStatus in ('订单付款', '订单结算') and partner_id = 1001 order_return_scale agency_scale select * from Users where partner_id = 1004 and level = 'Agency' and inviter_scale = 20 select * from Users where partner_id = 1004 and level = 'Agency' and inviter_scale = 10 select * from Users where partner_id = 1004 and level = 'Agency' and inviter_scale = 0 update Users set inviter_scale = 0, order_return_scale = 35, agency_scale = 35, inviter_agency_scale = 0 where partner_id = 1004 and level = 'Agency' and inviter_scale = 0; update Users set inviter_scale = 5, order_return_scale = 30, agency_scale = 35, inviter_agency_scale = 0 where partner_id = 1004 and level = 'Agency' and inviter_scale = 10; update Users set inviter_scale = 10, order_return_scale = 30, agency_scale = 30 , inviter_agency_scale = 0 where partner_id = 1004 and level = 'Agency' and inviter_scale = 20; update Users set inviter_agency_scale = inviter_scale where partner_id = 1004 and level = 'Agency'; update Users set inviter_scale = 0 where partner_id = 1004 and level = 'Agency'; -- update Users set inviter_scale = 0, order_return_scale = 35, agency_scale = 35, inviter_agency_scale = 10 where partner_id is (select * from Users where partner_id = 1004 ) and level = 'Agency' -- update Users set inviter_scale = 0, order_return_scale = 30, agency_scale = 30, inviter_agency_scale = 10 where partner_id not is (select * from Users where partner_id = 1004 ) and level = 'Agency' http://localhost:1819/api/webservice/v1/accounts/cookies?key=taoke@1818.com&domain=alimama.com http://pyl.you0738.com/api/webservice/v1/accounts/cookies?key=taoke@1818.com&domain=alimama.com