当前位置:网站首页>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" => '',
边栏推荐
- bean的生命周期核心步骤总结
- Basic knowledge and commands of disk
- 如何使用物联网低代码平台进行个人设置?
- 每周推薦短視頻:警惕“現象”與“問題”相互混淆
- R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息
- 2020, the regular expression for mobile phone verification of the latest mobile phone number is continuously updated
- Lumiprobe biomolecular quantification - qudye Protein Quantification Kit
- Halcon image calibration enables subsequent image processing to become the same as the template image
- ES6数组方法find()、findIndex()的总结「建议收藏」
- [Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
猜你喜欢
ACM mm 2022 video understanding challenge video classification track champion autox team technology sharing
透过华为军团看科技之变(六):智慧公路
Facebook聊单,SaleSmartly有妙招!
Principal component calculation weight
Leetcode-128 longest continuous sequence
如何使用物联网低代码平台进行个人设置?
3、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》在本地铸造 NFT
LiveData postValue会“丢”数据
How to manage 1000 anchors by one person?
Using OpenSSL encryption to rebound shell traffic
随机推荐
数据库基础:select基本查询语句
Leetcode-141 circular linked list
R语言使用epiDisplay包的tableStack函数制作统计汇总表格(基于目标变量分组的描述性统计、假设检验等)、不设置by参数则计算数据框指定数据列范围的基础描述性统计信息
Halcon image calibration enables subsequent image processing to become the same as the template image
Leetcode-83 delete duplicate elements in the sorting linked list
Implementation of converting PCM file to WAV
Leetcode-21 combines two ordered linked lists
如何运营好技术相关的自媒体?
How does factor analysis calculate weights?
Improve yolov5 with gsconv+slim neck to maximize performance!
Qt中的QFile读写文件操作
R语言epiDisplay包ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)、write.csv函数保存csv
信度系数低怎么办?信度系数具体怎么算?
透过华为军团看科技之变(六):智慧公路
R language uses the transmute function of dplyr package to calculate the moving window mean value of the specified data column in dataframe data, and uses ggplot2 package to visualize the line graph b
Leetcode203 移除链表元素
11、用户、组和权限(1)
Case study on comprehensive competitiveness of principal components
如何使用物联网低代码平台进行个人设置?
Image acquisition and playback of coaxpress high speed camera based on pxie interface