当前位置:网站首页>Taiaisu M source code construction, peak store app premium consignment source code sharing
Taiaisu M source code construction, peak store app premium consignment source code sharing
2022-07-01 18:54:00 【InfoQ】
try {
Db::startTrans();
$order_blind_box_ids = [];
foreach($blind_box_items as $blind_box_item) {
$product = Mage")->find();
$blind_box_product = ModelBlindBoxProduct::with(["tag" => function ($query) {
$query->bind(["tag_img" => "image"]);
}])->where(["blind_box_id" => $blind_box_item->blind_box_id, "product_id" => $blind_box_item->product_id])->find();
$product->tag_image = $blind_box_product->tag_img;
$order_code = date("YmdHis") . substr($user_id . rand(1000000, 9999999), 0, 8);
$order_blind_box = ModelOrderBlindBox::create([
"get_order_id" => 0,
"user_id" => $user_id,
"order_code" => $order_code,
"blind_box_item_id" => $blind_box_item->id,
"product_id" => $product->product_id,
"product_name" => $product->name,
"product_image" => $product->image,
"product_price" => $product->price,
"blind_box_price" => $blind_box->price,
"user_money" => 0,
"bonus_amount" => 0,
"pay_money" => $blind_box->price,
"payment_type" => '',
"order_state" => 99,
"address" => '',
"shipping_state" => 0,
"shipping_time" => 0,
"retrieve_time" => 0,
"retrieve_amount" => 0,
"regret_number" => 0
]);
$order_blind_box_ids[] = $order_blind_box->id;
if (!$order_blind_box->isEmpty()) {
$payment_code = date("YmdHis") . substr($user_id . rand(1000000, 9999999), 0, 8);
$payment_note = " Buy blind boxes ";
ModelPaymentLog::create([
"payment_code" => $payment_code,
"user_id" => $user_id,
"order_blind_box_id"=> $order_blind_box->id,
"blind_box_item_id" => $blind_box_item->id,
"blind_box_price" => $price,
"bonus_id" => $bonus_id,
"bonus_amount" => $bonus_amount,
"pay_money" => $blind_box->price,
"note" => $payment_note,
"transaction_id" => '',边栏推荐
猜你喜欢

Force buckle day33

Livedata postvalue will "lose" data

How does factor analysis calculate weights?

关于企业中台规划和 IT 架构微服务转型

Lumiprobe非荧光炔烃丨EU(5-乙炔基尿苷)

用WPF写一款开源方便、快捷的数据库文档查询、生成工具

研究了11种实时聊天软件,我发现都具备这些功能…

AI training speed breaks Moore's law; Song shuran's team won the RSS 2022 Best Paper Award

Lumiprobe lumizol RNA extraction reagent solution

How to manage 1000 anchors by one person?
随机推荐
《Go题库·16》读写锁底层是怎么实现的
Go语言自学系列 | go语言数据类型
Must see, time series analysis
洞态在某互联⽹⾦融科技企业的最佳落地实践
Create your own NFT collections and publish a Web3 application to show them (Introduction)
如何在自有APP内实现小程序实现连麦直播
Unity learning fourth week
12种数据量纲化处理方式
ES6数组去重的三个简单办法
Three.js学习-相机Camera的基本操作(了解向)
app发版后的缓存问题
2020, the regular expression for mobile phone verification of the latest mobile phone number is continuously updated
A wonderful time to buy and sell stocks
磁盘的基本知识和基本命令
LiveData postValue会“丢”数据
Lumiprobe 双功能交联剂丨Sulfo-Cyanine5 双-NHS 酯
11、用户、组和权限(1)
Halcon image calibration enables subsequent image processing to become the same as the template image
Evaluation of 6 red, yellow and black list cameras: who is the safest? Who has good picture quality? From now on, let you no longer step on thunder
如何运营好技术相关的自媒体?