parent
513e4cded9
commit
778d7638e7
@ -0,0 +1,27 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Author: CRMEB Team <admin@crmeb.com> |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
|
||||||
|
namespace app\common\dao\store\order; |
||||||
|
|
||||||
|
use app\common\dao\BaseDao; |
||||||
|
use app\common\model\store\order\StoreOrderReceipt; |
||||||
|
use app\common\model\store\StoreOrderHot; |
||||||
|
use app\common\model\user\User; |
||||||
|
|
||||||
|
class StoreOrderHotDao extends BaseDao |
||||||
|
{ |
||||||
|
protected function getModel(): string |
||||||
|
{ |
||||||
|
return StoreOrderHot::class; |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,61 @@ |
|||||||
|
<?php |
||||||
|
|
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Author: CRMEB Team <admin@crmeb.com> |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
|
||||||
|
|
||||||
|
namespace app\common\model\store; |
||||||
|
|
||||||
|
|
||||||
|
use app\common\model\BaseModel; |
||||||
|
use app\common\model\store\order\StoreOrder; |
||||||
|
use app\common\model\store\product\Product; |
||||||
|
use app\common\model\store\product\Spu; |
||||||
|
use app\common\model\user\User; |
||||||
|
|
||||||
|
class StoreOrderHot extends BaseModel |
||||||
|
{ |
||||||
|
|
||||||
|
public static function tablePk(): ?string |
||||||
|
{ |
||||||
|
return 'id'; |
||||||
|
} |
||||||
|
|
||||||
|
public static function tableName(): string |
||||||
|
{ |
||||||
|
return 'store_order_hot'; |
||||||
|
} |
||||||
|
|
||||||
|
public function orderInfo() |
||||||
|
{ |
||||||
|
return $this->hasOne(StoreOrder::class, 'order_id', 'order_id'); |
||||||
|
} |
||||||
|
|
||||||
|
public function user() |
||||||
|
{ |
||||||
|
return $this->hasOne(User::class,'uid','uid'); |
||||||
|
} |
||||||
|
|
||||||
|
public function product() |
||||||
|
{ |
||||||
|
return $this->hasOne(Product::class,'product_id','product_id'); |
||||||
|
} |
||||||
|
|
||||||
|
public function spu() |
||||||
|
{ |
||||||
|
return $this->hasOne(Spu::class,'product_id','product_id'); |
||||||
|
} |
||||||
|
|
||||||
|
public function searchUidAttr($query ,$value) |
||||||
|
{ |
||||||
|
$query->where('uid',$value); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,39 @@ |
|||||||
|
<?php |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Copyright (c) 2016~2022 https://www.crmeb.com All rights reserved. |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
// | Author: CRMEB Team <admin@crmeb.com> |
||||||
|
// +---------------------------------------------------------------------- |
||||||
|
|
||||||
|
|
||||||
|
namespace app\common\repositories\store\order; |
||||||
|
|
||||||
|
|
||||||
|
use app\common\dao\store\order\StoreOrderHotDao; |
||||||
|
use app\common\repositories\BaseRepository; |
||||||
|
|
||||||
|
/** |
||||||
|
* @mixin StoreOrderHotDao |
||||||
|
*/ |
||||||
|
class StoreOrderHotRepository extends BaseRepository |
||||||
|
{ |
||||||
|
|
||||||
|
/** |
||||||
|
* @var StoreOrderHotDao |
||||||
|
*/ |
||||||
|
protected $dao; |
||||||
|
|
||||||
|
public function __construct(StoreOrderHotDao $storeOrderHotDao) |
||||||
|
{ |
||||||
|
$this->dao = $storeOrderHotDao; |
||||||
|
} |
||||||
|
|
||||||
|
public function create($data){ |
||||||
|
$this->dao->create($data); |
||||||
|
} |
||||||
|
|
||||||
|
} |
@ -0,0 +1,32 @@ |
|||||||
|
<?php |
||||||
|
/** |
||||||
|
* CustomizePaySuccess.php |
||||||
|
* 文件描述 |
||||||
|
* Created on 2024/3/13 23:02 |
||||||
|
* Created by zhangkaixiang |
||||||
|
*/ |
||||||
|
|
||||||
|
namespace crmeb\listens\pay; |
||||||
|
|
||||||
|
|
||||||
|
use app\common\repositories\user\UserAssetsLogRepository; |
||||||
|
use crmeb\interfaces\ListenerInterface; |
||||||
|
use think\facade\Log; |
||||||
|
|
||||||
|
class CustomizeTake implements ListenerInterface |
||||||
|
{ |
||||||
|
|
||||||
|
// {"order":{"order_id":33,"main_id":0,"group_order_id":32,"order_sn":"wxo1710768193328392661","uid":3,"spread_uid":0,"top_uid":1,"district_id":3378,"real_name":"\u5f20\u51ef\u7fd4","user_phone":"18362705640","user_address":"\u6c5f\u82cf\u5357\u4eac\u5e02\u6816\u971e\u533a\u5c27\u5316\u8857\u9053\u4e1c\u57ce\u4e16\u5bb6(\u5357\u4eac\u5e02\u6816\u971e\u533a\u5c27\u8fb0\u8def3\u53f7)24\u680b501","cart_id":"77","total_num":1,"total_price":"100.00","total_postage":"0.00","pay_price":"100.00","pay_postage":"0.00","is_selfbuy":0,"extension_one":"0.00","extension_two":"1.20","commission_rate":"30.0000","integral":0,"integral_price":"0.00","give_integral":100,"coupon_id":"","coupon_price":"0.00","platform_coupon_price":"0.00","svip_discount":"0.00","order_type":0,"paid":1,"pay_time":"2024-03-18 21:23:13","pay_type":0,"create_time":"2024-03-18 21:23:13","status":2,"delivery_type":"1","is_virtual":0,"delivery_name":"\u97f5\u8fbe\u5feb\u9012","delivery_id":"ewrwe","mark":"","remark":"","admin_mark":null,"verify_code":null,"verify_time":"2024-03-19 14:43:24","verify_service_id":null,"transaction_id":null,"activity_type":0,"order_extend":null,"mer_id":6,"reconciliation_id":0,"cost":"0.00","is_del":0,"is_system_del":0,"verify_status":0,"presellOrder":null}} |
||||||
|
public function handle($data): void |
||||||
|
{ |
||||||
|
Log::info('收货' . json_encode($data)); |
||||||
|
|
||||||
|
if(isset($data['order']) and $data['order']){ |
||||||
|
/** |
||||||
|
* @var UserAssetsLogRepository $repository |
||||||
|
*/ |
||||||
|
$repository = app()->make(UserAssetsLogRepository::class); |
||||||
|
$repository->userTakeEvent($data['order']); |
||||||
|
} |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue