当前位置:网站首页>太爱速M源码搭建,巅峰小店APP溢价寄卖源码分享
太爱速M源码搭建,巅峰小店APP溢价寄卖源码分享
2022-07-01 18:38: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 = "购买盲盒";
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" => '',
边栏推荐
- Thread forced join, thread forced join application scenarios
- 2、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》启动并运行您的本地环境
- Find all missing numbers in the array
- 12 data dimensioning processing methods
- Image acquisition and playback of coaxpress high speed camera based on pxie interface
- golang 错误处理
- 每周推薦短視頻:警惕“現象”與“問題”相互混淆
- How does factor analysis calculate weights?
- A database editing gadget that can edit SQLite database. SQLite database replaces fields. SQL replaces all values of a field in the database
- Leetcode-128 最长连续序列
猜你喜欢
Sum of three numbers
每周推薦短視頻:警惕“現象”與“問題”相互混淆
Vidéos courtes recommandées chaque semaine: méfiez - vous de la confusion entre « phénomène » et « problème »
Lumiprobe lumizol RNA extraction reagent solution
Halcon image calibration enables subsequent image processing to become the same as the template image
Leetcode-128 最长连续序列
研究了11种实时聊天软件,我发现都具备这些功能…
为什么独立站卖家都开始做社交媒体营销?原来客户转化率能提高这么多!
Salesmartly has some tricks for Facebook chat!
隐私沙盒终于要来了
随机推荐
Leetcode-21 combines two ordered linked lists
R language ggplot2 visualization: visualize the line graph and add customized Y-axis label information to the line graph using the labels function
js找出数字在数组中下一个相邻的元素
主成分之综合竞争力案例分析
Leetcode-141 circular linked list
Memo - about C # generating barcode for goods
信度系数低怎么办?信度系数具体怎么算?
Salesmartly has some tricks for Facebook chat!
What if the reliability coefficient is low? How to calculate the reliability coefficient?
R语言使用epiDisplay包的tableStack函数制作统计汇总表格(基于目标变量分组的描述性统计、假设检验等)、不设置by参数则计算数据框指定数据列范围的基础描述性统计信息
How to find the optimal learning rate
12种数据量纲化处理方式
隐私沙盒终于要来了
[Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
ES6数组方法find()、findIndex()的总结「建议收藏」
Facebook聊单,SaleSmartly有妙招!
搭建一個通用監控告警平臺,架構上需要有哪些設計
Li Kou daily question - Day 32 -589 N × Preorder traversal of tree
Introduction to easyclick database
Search 2D matrix 2