|
|
@@ -747,7 +747,7 @@ class UserThirdRepository extends BaseRepository
|
|
747
|
747
|
/**
|
|
748
|
748
|
* 添加预估积分记录
|
|
749
|
749
|
*/
|
|
750
|
|
- public function yuguJifen($price,$user_id,$order_sn,$type_shop)
|
|
|
750
|
+ public function yuguJifen($order_id,$price,$user_id,$order_sn,$type_shop)
|
|
751
|
751
|
{
|
|
752
|
752
|
if (empty($user_id)) {
|
|
753
|
753
|
Db::name('log')->insert(['data' => "type_shop:{$type_shop}, $order_sn, $order_sn, 赠送积分, 不存在用户ID"]);
|
|
|
@@ -757,7 +757,7 @@ class UserThirdRepository extends BaseRepository
|
|
757
|
757
|
$user_sign_score_list = Db::name('user_sign_score')
|
|
758
|
758
|
->where('uid', $user_id)
|
|
759
|
759
|
->where('order_type', $type_shop)
|
|
760
|
|
- ->where('order_id', $order_sn)
|
|
|
760
|
+ ->where('order_id', $order_id)
|
|
761
|
761
|
->find();
|
|
762
|
762
|
if (!empty($user_sign_score_list)) {
|
|
763
|
763
|
Db::name('log')->insert(['data' => "type_shop:{$type_shop}, $order_sn, $order_sn, 赠送积分, 订单已存在积分发放记录"]);
|
|
|
@@ -805,7 +805,7 @@ class UserThirdRepository extends BaseRepository
|
|
805
|
805
|
"addtime" => time(),
|
|
806
|
806
|
"status" => -1,
|
|
807
|
807
|
"order_type" => $type_shop,
|
|
808
|
|
- "order_id" => $order_sn,
|
|
|
808
|
+ "order_id" => $order_id,
|
|
809
|
809
|
"mark" => "购买{$make}商品赠送积分",
|
|
810
|
810
|
"surplus" => $surplus,
|
|
811
|
811
|
"pm" => 1,
|
|
|
@@ -823,7 +823,7 @@ class UserThirdRepository extends BaseRepository
|
|
823
|
823
|
"addtime" =>time(),
|
|
824
|
824
|
"status" =>-1,
|
|
825
|
825
|
"order_type" =>$type_shop,
|
|
826
|
|
- "order_id" =>$order_sn,
|
|
|
826
|
+ "order_id" =>$order_id,
|
|
827
|
827
|
"mark" =>"购买{$make}商品赠送贡献值",
|
|
828
|
828
|
"desc" =>'',
|
|
829
|
829
|
"surplus" =>$surplusgongxian+$gxzongwei,
|
|
|
@@ -839,7 +839,7 @@ class UserThirdRepository extends BaseRepository
|
|
839
|
839
|
"addtime" =>time(),
|
|
840
|
840
|
"status" =>-1,
|
|
841
|
841
|
"order_type" =>$type_shop,
|
|
842
|
|
- "order_id" =>$order_sn,
|
|
|
842
|
+ "order_id" =>$order_id,
|
|
843
|
843
|
"mark" =>"购买{$make}商品获得的PV",
|
|
844
|
844
|
];
|
|
845
|
845
|
Db::name("user_pv_log")->insert($pv_data);//添加pv记录
|
|
|
@@ -854,7 +854,7 @@ class UserThirdRepository extends BaseRepository
|
|
854
|
854
|
"addtime" =>time(),
|
|
855
|
855
|
"status" =>-1,
|
|
856
|
856
|
"order_type" =>$type_shop,
|
|
857
|
|
- "order_id" =>$order_sn,
|
|
|
857
|
+ "order_id" =>$order_id,
|
|
858
|
858
|
"mark" =>"购买{$make}商品赠送红包",
|
|
859
|
859
|
"desc" =>'',
|
|
860
|
860
|
"surplus" =>$hongbao,
|
|
|
@@ -884,7 +884,7 @@ class UserThirdRepository extends BaseRepository
|
|
884
|
884
|
"addtime" => time(),
|
|
885
|
885
|
"status" => -1,
|
|
886
|
886
|
"order_type" => $type_shop,
|
|
887
|
|
- "order_id" => $order_sn,
|
|
|
887
|
+ "order_id" => $order_id,
|
|
888
|
888
|
"mark" => "推广{$make}商品赠送积分",
|
|
889
|
889
|
"surplus" => $sprerdUser['score'] + $tuiguanyongjin,
|
|
890
|
890
|
"pm" => 1,
|
|
|
@@ -904,7 +904,7 @@ class UserThirdRepository extends BaseRepository
|
|
904
|
904
|
"addtime" =>time(),
|
|
905
|
905
|
"status" =>-1,
|
|
906
|
906
|
"order_type" =>$type_shop,
|
|
907
|
|
- "order_id" =>$order_sn,
|
|
|
907
|
+ "order_id" =>$order_id,
|
|
908
|
908
|
"mark" =>"推广{$make}商品赠送贡献值",
|
|
909
|
909
|
"desc" =>'',
|
|
910
|
910
|
"surplus" => $sprerdUser['contribute'] + $gongxian,
|