Bladeren bron

准备发布。。。

stanley-king 6 jaren geleden
bovenliggende
commit
68cc636089

+ 27 - 0
crontab/control/command.php

@@ -281,4 +281,31 @@ class commandControl extends BaseCronControl
     {
         $ret = room\factory_client::instance()->create_shake(self::admin_member_id);
     }
+
+    //修改商品价格,市场价,价格,底价
+    public function init_lowest_price()
+    {
+        $mod_goods = Model('goods');
+        $path = BASE_DATA_PATH . '/mobile/lowest_price.txt';
+
+        $file = fopen($path,'r');
+        while (!feof($file))
+        {
+            $line = fgets($file);
+            $line = trim($line);
+            $datas = explode("\t",$line);
+            if(count($datas) == 3) {
+                $goods_id     = intval($datas[0]);
+                $goods_price  = intval($datas[1] * 100 + 0.5) / 100;
+                $lowest_price = intval($datas[2] * 100 + 0.5) / 100;
+
+                $result = $mod_goods->editGoods(['goods_marketprice' => $goods_price,'goods_price' => $goods_price,'goods_lowest_price' => $lowest_price],['goods_id' => $goods_id]);
+                if($result == false) {
+                    Log::record("update goods_id = {$goods_id}",Log::ERR);
+                }
+            }
+        }
+        fclose($file);
+    }
+
 }

+ 548 - 0
data/mobile/lowest_price.txt

@@ -0,0 +1,548 @@
+8102	420	292.4
+8023	99	69
+5059	109	76.23
+4226	99	69.24
+4228	99	69.24
+4667	99	69.24
+698	179	125.3
+710	119	83.3
+746	225	157.5
+766	109	76.3
+820	149	104.3
+3396	380	266
+3830	8	5.6
+3831	8	5.6
+3832	8	5.6
+3833	8	5.6
+3836	8	5.6
+4538	165	115.5
+4723	149	104.3
+4852	98	68.6
+4853	98	68.6
+4943	129	90.3
+4945	100	70
+5039	95	66.5
+5349	118	82.6
+5360	148	103.6
+5361	148	103.6
+5370	98	68.6
+5384	138	96.6
+5385	138	96.6
+5394	89	62.3
+5396	89	62.3
+5408	138	96.6
+5409	98	68.6
+5410	98	68.6
+5411	98	68.6
+5412	98	68.6
+5413	98	68.6
+5423	158	110.6
+5430	98	68.6
+5432	98	68.6
+5434	98	68.6
+5435	98	68.6
+5436	98	68.6
+5437	98	68.6
+5445	118	82.6
+5450	59	41.3
+5451	59	41.3
+5778	220	154
+5826	390	273
+5850	240	168
+5851	240	168
+5852	240	168
+5855	240	168
+5856	240	168
+5860	240	168
+5861	240	168
+5862	240	168
+5892	340	238
+6599	140	98
+6600	159	111.3
+6608	8	5.6
+6609	8	5.6
+6611	8	5.6
+6612	8	5.6
+6613	8	5.6
+6615	8	5.6
+6617	8	5.6
+6668	168	117.6
+6670	168	117.6
+6671	168	117.6
+6672	168	117.6
+6755	8	5.6
+6978	108	75.6
+6985	138	96.6
+7020	98	68.6
+7090	188	131.6
+7213	138	96.6
+7306	60	42
+7405	80	56
+7688	188	131.6
+7715	89	62.3
+7866	188	131.6
+7877	108	75.6
+7878	108	75.6
+7970	70	49
+4238	29	20.3
+4240	29	20.3
+4733	209	146.3
+4855	48	33.6
+4858	48	33.6
+5046	289	202.3
+5047	289	202.3
+5353	58	40.6
+5354	58	40.6
+5372	58	40.6
+5442	28	19.6
+5730	68	47.6
+6542	29	20.3
+6544	29	20.3
+6634	48	33.6
+6736	189	132.3
+6853	162	113.4
+6902	39	27.3
+7013	12	8.4
+7109	199	139.3
+7110	199	139.3
+7865	29	20.3
+7867	48	33.6
+7868	88	61.6
+7869	38	26.6
+7870	38	26.6
+7871	38	26.6
+7872	48	33.6
+7873	38	26.6
+7874	38	26.6
+7875	38	26.6
+7876	38	26.6
+8139	39	27.3
+7218	89	62.4
+5076	29	20.34
+6140	125	87.68
+6143	125	87.68
+6145	125	87.68
+6147	125	87.68
+6397	125	87.68
+6399	125	87.68
+6402	125	87.68
+6406	125	87.68
+6407	125	87.68
+6408	125	87.68
+6409	125	87.68
+6525	125	87.68
+6602	125	87.68
+6605	125	87.68
+6954	125	87.68
+7700	125	87.68
+6693	179	125.56
+7081	179	125.56
+6392	199	139.59
+6655	89	62.43
+7920	89	62.43
+7921	89	62.43
+7922	89	62.43
+7978	89	62.43
+7979	89	62.43
+6311	130	91.19
+7264	260	182.38
+6329	150	105.22
+6330	150	105.22
+6331	150	105.22
+186	109	76.46
+6956	109	76.46
+6957	109	76.46
+7082	109	76.46
+1114	129	90.49
+4703	129	90.49
+6298	129	90.49
+6299	129	90.49
+6301	129	90.49
+6302	129	90.49
+6303	129	90.49
+6304	129	90.49
+6305	129	90.49
+7983	129	90.49
+7984	129	90.49
+7985	129	90.49
+7986	129	90.49
+7987	129	90.49
+7988	129	90.49
+7705	105	73.6549
+7706	105	73.6549
+7980	89	62.4313
+7981	89	62.4313
+6378	115	80.67
+7234	135	94.7
+7235	135	94.7
+8103	135	94.7
+6310	209	146.61
+6103	120	84.18
+6375	120	84.18
+6376	120	84.18
+5081	99	69.45
+7112	99	69.45
+7786	99	69.45
+6293	79	55.42
+6294	79	55.42
+6988	79	55.42
+7917	59	41.39
+7918	59	41.39
+7919	59	41.39
+8027	148	103.9
+8028	148	103.9
+6674	98	68.9
+8019	560	394.4
+7785	109	76.845
+6387	89	63.06
+6388	89	63.06
+6118	69	48.89
+6124	69	48.89
+6313	79	55.98
+6314	79	55.98
+6315	79	55.98
+6316	79	55.98
+6383	79	55.98
+6385	79	55.98
+8100	80	56.84
+6087	220	158.08
+6255	110	79.04
+6377	110	79.04
+6400	110	79.04
+6257	180	129.34
+6390	90	64.67
+6107	160	114.97
+6259	160	114.97
+6374	160	114.97
+6391	160	114.97
+7233	230	165.27
+6102	140	100.6
+6131	140	100.6
+6603	140	100.6
+6835	280	201.2
+6836	140	100.6
+7259	350	251.5
+7324	140	100.6
+7701	280	201.2
+6133	190	136.53
+6132	120	86.23
+7703	99	71.14
+7880	79	56.77
+7304	29	20.84
+3036	420	302.4
+3041	420	302.4
+3042	280	201.6
+3046	420	302.4
+3048	300	216
+3069	460	331.2
+3075	320	230.4
+3082	350	252
+4769	360	259.2
+4770	360	259.2
+4771	360	259.2
+4777	180	129.6
+4901	250	180
+4903	250	180
+4910	180	129.6
+4911	180	129.6
+5788	210	151.2
+5789	210	151.2
+5790	258	185.76
+5792	69	49.68
+5806	180	129.6
+6536	360	259.2
+6539	250	180
+6895	880	633.6
+7229	260	187.2
+7689	360	259.2
+8033	250	180
+8035	360	259.2
+8140	420	302.4
+4895	380	273.6
+4896	380	273.6
+4897	380	273.6
+4898	380	273.6
+5773	190	136.8
+5793	108	77.76
+5798	190	136.8
+6510	380	273.6
+6513	190	136.8
+7228	380	273.6
+7615	240	172.8
+7775	380	273.6
+8032	190	136.8
+8034	30	21.6
+8036	240	172.8
+8128	480	345.6
+190	69	49.71
+2582	69	49.71
+2586	69	49.71
+7928	69	49.71
+7929	69	49.71
+7930	69	49.71
+7931	69	49.71
+7935	69	49.71
+7936	69	49.71
+7940	69	49.71
+5487	52	37.5
+7989	106	76.46
+7990	106	76.46
+7991	106	76.4608
+7992	106	76.4608
+7993	106	76.4608
+6624	79	57
+1658	68	49.1
+6627	68	49.1
+6815	102	73.65
+6621	52	37.55
+6662	52	37.55
+8150	52	37.55
+6813	99	71.49
+5520	79	57.05
+5257	39	28.17
+5326	39	28.17
+8145	38	27.45
+5258	54.9	39.66
+608	79	57.07
+7768	37	26.73
+4740	49	35.4
+503	89	64.3
+507	89	64.3
+576	89	64.3
+4744	34.9	25.22
+5514	76	55
+2639	78	56.52
+7972	89	64.5
+6659	69	50.02
+473	66	47.85
+518	76	55.1
+4714	76	55.1
+5327	92	66.7
+5553	92	66.7
+6658	42	30.45
+7076	76	55.1
+449	52	37.7
+492	52	37.7
+1701	69	50.03
+6623	102	74
+6112	79	57.63
+6261	21	15.32
+7326	46	33.56
+1897	205	149.65
+1903	325	237.25
+1933	270	197.1
+1950	195	142.35
+4344	195	142.35
+4368	245	178.85
+5684	125	91.25
+5990	205	149.65
+5996	225	164.25
+5999	390	284.7
+6014	230	167.9
+6016	255	186.15
+6027	310	226.3
+6032	330	240.9
+6158	225	164.25
+6174	225	164.25
+6175	270	197.1
+6214	205	149.65
+6355	195	142.35
+6359	220	160.6
+6874	295	215.35
+6875	405	295.65
+7092	205	149.65
+7237	325	237.25
+7239	325	237.25
+7240	325	237.25
+7585	510	372.3
+7586	500	365
+7914	245	178.85
+7915	195	142.35
+7916	195	142.35
+1998	185	135.05
+2004	185	135.05
+2006	185	135.05
+6047	235	171.55
+6353	185	135.05
+747	229	167.3
+6622	52	38
+6111	29	21.56
+6115	120	89.22
+6372	100	74.35
+6606	80	59.48
+6149	110	81.79
+6083	39	29
+6085	39	29
+6086	39	29
+6134	39	29
+6318	39	29
+6373	39	29
+6401	39	29
+2129	89	66.1795
+4815	30	22.41
+4588	109	81.6
+271	90	67.5
+338	65	48.75
+365	140	105
+2099	99	74.25
+2101	99	74.25
+2102	89	66.75
+4545	75	56.25
+4557	105	78.75
+4775	65	48.75
+4778	90	67.5
+4786	85	63.75
+4787	85	63.75
+4808	119	89.25
+5118	140	105
+5121	140	105
+5495	98	73.5
+5496	98	73.5
+5498	98	73.5
+5780	168	126
+5975	400	300
+5976	400	300
+5977	400	300
+5978	400	300
+5981	200	150
+5988	360	270
+5989	320	240
+5993	400	300
+6004	320	240
+6006	450	337.5
+6008	450	337.5
+6009	450	337.5
+6010	450	337.5
+6021	260	195
+6030	260	195
+6033	380	285
+6060	600	450
+6066	490	367.5
+6237	280	210
+6279	240	180
+6520	470	352.5
+6521	440	330
+6732	380	285
+6752	440	330
+6780	688	516
+6781	400	300
+6841	600	450
+6842	780	585
+6878	320	240
+6998	240	180
+7009	125	93.75
+7019	198	148.5
+7282	340	255
+7283	340	255
+7285	260	195
+7303	1460	1095
+7649	450	337.5
+7655	410	307.5
+7656	450	337.5
+7899	780	585
+7909	920	690
+7910	1440	1080
+7946	340	255
+7953	150	112.5
+8040	840	630
+8042	380	285
+8043	400	300
+8141	450	337.5
+8147	688	516
+8021	470	352.8
+6271	78	58.7
+7115	620	467.2
+4483	149	112.5
+6481	79	59.75
+634	79	59.8
+5561	79	59.8
+7882	185	140.2
+7857	620	472.2
+2118	99	75.46
+8020	410	313.9
+8149	68	52.19
+6809	55	42.4
+5783	28	21.6
+4686	99	76.46
+4688	99	76.46
+4690	99	76.46
+4698	99	76.46
+4700	99	76.46
+7428	640	495
+7361	99	76.6
+7362	99	76.6
+5336	109	84.6
+4541	135	105
+2707	89	69.49
+2870	351	275
+5766	190	149.6
+6506	420	331.2
+7927	79	62.3
+8099	179	142.27
+4183	18	14.3265
+4174	17	13.5333
+4176	51	40.6
+4178	20	15.9227
+4173	61	48.5713
+7077	109	87.3
+7681	51	40.95
+7682	17	13.65
+7997	37	29.71
+7998	20	16.06
+7000	33	26.5
+7295	31	24.9
+7999	31	24.9
+6126	199	161.34
+6128	199	161.34
+7640	199	161.34
+7392	699	567.64
+5474	19	15.5
+6093	59	48.89
+6094	59	48.89
+6095	59	48.89
+6097	59	48.89
+7938	9.9	8.32
+7366	189	159.52
+7367	189	159.52
+7584	365	309.6
+8009	199	170.26
+8107	50	43.3
+8152	29.7	25.83
+5484	560	489.6
+6114	178	158.08
+7517	1	1
+7526	5	5
+7527	10	10
+7528	100	100
+7652	450	450
+7653	450	450
+7678	120	120
+7679	225	225
+8017	99	99
+8018	40	40
+8037	42	42
+8038	135	135
+8044	40	40
+8045	20	20
+8046	30	30
+8047	35	35
+8048	50	50
+8049	30	30
+8051	50	50
+8053	50	50
+8054	70	70
+8055	45	45
+8056	30	30
+8057	30	30
+8058	30	30
+8059	35	35
+8062	65	65
+8064	25	25
+8065	25	25
+8108	25	25
+8131	1	1
+8132	100	100
+8133	49	49
+8134	100	100
+8135	250	250
+8138	250	250

+ 1 - 0
data/model/goods.model.php

@@ -387,6 +387,7 @@ class goodsModel extends Model
      * @param int|array $goodsid_array
      * @return boolean|unknown
      */
+
     public function editGoodsById($update, $goodsid_array)
     {
         if (empty($goodsid_array)) {

+ 6 - 0
helper/schema_helper.php

@@ -75,4 +75,10 @@ class schema_helper
         $title = urlencode($title);
         return self::prefix . "/web/web?title={$title}&url={$url}";
     }
+    static public function donate_steps($title="捐赠步数") {
+        $url = BASE_SITE_URL . "/mobile/index.php?act=member_talk&op=steps_detail";
+        $url = urlencode($url);
+        $title = urlencode($title);
+        return self::prefix . "/web/web?title={$title}&url={$url}";
+    }
 }

+ 5 - 3
mobile/control/member_bonus.php

@@ -56,10 +56,12 @@ class member_bonusControl extends mbMemberControl
             $result['mine_room'] = $mine_rooms;
         }
         $result['convert_ratio'] = 100;
-
         $result['other_room'] = room_helper::page_rooms(['type' => proto_type::room_chat],'steps_count desc,room_id desc');
 
-        $result['daliy_bonus'] = $this->daliy_bonus_url();
+        $result['daliy_bonus'] = schema_helper::openurl("试试手气",$this->daliy_bonus_url());
+        $result['invite_friend'] = schema_helper::invite_page();
+        $result['shake_bonus'] = schema_helper::shake();
+        $result['donate_steps'] = schema_helper::donate_steps();
 
         return self::outsuccess($result);
     }
@@ -122,7 +124,7 @@ class member_bonusControl extends mbMemberControl
     //福利社 每日领红包
     private function daliy_bonus_url()
     {
-        $url = rkcache('daliy_bonus_url');
+        $url = rkcache('daliy_bonus_typesn');
         if(!empty($url)) {
             return $url;
         }

+ 25 - 0
test/TestCommand.php

@@ -48,4 +48,29 @@ class TestCommand extends PHPUnit_Framework_TestCase
             }
         }
     }
+
+    public function testLowestPrice()
+    {
+        $mod_goods = Model('goods');
+        $path = BASE_DATA_PATH . '/mobile/lowest_price.txt';
+
+        $file = fopen($path,'r');
+        while (!feof($file))
+        {
+            $line = fgets($file);
+            $line = trim($line);
+            $datas = explode("\t",$line);
+            if(count($datas) == 3) {
+                $goods_id     = intval($datas[0]);
+                $goods_price  = intval($datas[1] * 100 + 0.5) / 100;
+                $lowest_price = intval($datas[2] * 100 + 0.5) / 100;
+
+                $result = $mod_goods->editGoods(['goods_marketprice' => $goods_price,'goods_price' => $goods_price,'goods_lowest_price' => $lowest_price],['goods_id' => $goods_id]);
+                if($result == false) {
+                    Log::record("update goods_id = {$goods_id}",Log::ERR);
+                }
+            }
+        }
+        fclose($file);
+    }
 }

+ 0 - 3
test/TestRoomFactory.php

@@ -180,9 +180,6 @@ class TestRoomFactory extends PHPUnit_Framework_TestCase
     public function testDownavatar()
     {
         $y = http_request('http://thirdwx.qlogo.cn/mmopen/vi_32/EgmJg53YibXlPKrz0DydiciaA1VicJI5iariaKqJgdodFFmdb38zqY1QkF5CSaXiacqfPdfMqWZwYvTDd1ialUiaVmX9BpA/132');
-
         $contents = file_get_contents('http://thirdwx.qlogo.cn/mmopen/vi_32/EgmJg53YibXlPKrz0DydiciaA1VicJI5iariaKqJgdodFFmdb38zqY1QkF5CSaXiacqfPdfMqWZwYvTDd1ialUiaVmX9BpA/132');
-
     }
-
 }