当前位置:网站首页>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" => '',边栏推荐
- 关于企业中台规划和 IT 架构微服务转型
- JS find the next adjacent element of the number in the array
- bean的生命周期核心步骤总结
- linux下清理系统缓存并释放内存
- 【快应用】Win7系统使用华为IDE无法运行和调试项目
- How to realize the applet in its own app to realize continuous live broadcast
- Go语言自学系列 | go语言数据类型
- PriorityQueue的用法和底层实现原理
- Leetcode-128 最长连续序列
- Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
猜你喜欢

Lumiprobe 双功能交联剂丨Sulfo-Cyanine5 双-NHS 酯

Halcon图片标定,使得后续图片处理过后变成与模板图片一样

Force buckle day33

ACM mm 2022 video understanding challenge video classification track champion autox team technology sharing

实现一个Prometheus exporter

Technology implementation and Architecture Practice

Lumiprobe 生物分子定量丨QuDye 蛋白定量试剂盒

Solution: you can ping others, but others can't ping me

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

Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
随机推荐
[Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
Basic knowledge and commands of disk
What if the reliability coefficient is low? How to calculate the reliability coefficient?
6款红黄黑榜摄像头评测:谁最安全?谁画质好?从此让你不再踩雷
PriorityQueue的用法和底层实现原理
Mysql database of easyclick
Go语言自学系列 | go语言数据类型
洞态在某互联⽹⾦融科技企业的最佳落地实践
实例讲解将Graph Explorer搬上JupyterLab
Leetcode-83 delete duplicate elements in the sorting linked list
R language ggplot2 visualization: visualize the line graph and add customized Y-axis label information to the line graph using the labels function
Lumiprobe biomolecular quantification - qudye Protein Quantification Kit
R language uses follow up of epidisplay package Plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses n.of The lines parameter specifies the num
如何使用物联网低代码平台进行个人设置?
GameFramework食用指南
11、用户、组和权限(1)
Lefse analysis
R语言ggplot2可视化:gganimate包transition_time函数创建动态散点图动画(gif)、shadow_wake函数配置动画的渐变效果(gradual falloff)拖尾效应
A wonderful time to buy and sell stocks
Memo - about C # generating barcode