当前位置:网站首页>太爱速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" => '',边栏推荐
- lefse分析
- Leetcode203 移除链表元素
- Vidéos courtes recommandées chaque semaine: méfiez - vous de la confusion entre « phénomène » et « problème »
- Blue Bridge Cup real problem: word analysis
- 华为云专家详解GaussDB(for MySQL)新特性
- Leetcode-128 最长连续序列
- js找出数字在数组中下一个相邻的元素
- [Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
- Three. JS learning - basic operation of camera (learn from)
- Lumiprobe non fluorescent alkyne EU (5-ethynyluridine)
猜你喜欢

如何在自有APP内实现小程序实现连麦直播

1、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》什么是NFT

Unity learning fourth week

Image acquisition and playback of coaxpress high speed camera based on pxie interface

GAMES202作业0-环境搭建过程&解决遇到的问题

LeetCode-21合并两个有序链表

1380. Lucky number in matrix / 1672 Total assets of the richest customers

Technology implementation and Architecture Practice

How to manage 1000 anchors by one person?

Lumiprobe Lumizol RNA 提取试剂解决方案
随机推荐
数据仓库(四)之ETL开发
Three. JS learning - basic operation of camera (learn from)
Mysql database of easyclick
Livedata postvalue will "lose" data
A database editing gadget that can edit SQLite database. SQLite database replaces fields. SQL replaces all values of a field in the database
磁盘的基本知识和基本命令
Thread forced join, thread forced join application scenarios
LeetCode-21合并两个有序链表
Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
How to find customers for investment attraction in industrial parks
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
每周推荐短视频:警惕“现象”与“问题”相互混淆
Halcon image calibration enables subsequent image processing to become the same as the template image
Blue Bridge Cup real topic: the shortest circuit
Leetcode-160 intersecting linked list
Basic knowledge and commands of disk
如何运营好技术相关的自媒体?
ACM MM 2022视频理解挑战赛视频分类赛道冠军AutoX团队技术分享
R语言使用epiDisplay包的dotplot函数通过点图的形式可视化不同区间数据点的频率、使用pch参数自定义指定点图数据点的形状
LiveData postValue会“丢”数据