no message
This commit is contained in:
parent
7c7c2ee195
commit
a4c4df7df8
@ -23,8 +23,8 @@ final class ProductController extends BaseController
|
|||||||
public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
|
public function index(ServerRequest $request, Response $response, array $args): ResponseInterface
|
||||||
{
|
{
|
||||||
//tomd($config["appName"], 1);
|
//tomd($config["appName"], 1);
|
||||||
$aProduct = Product::where("status" , 1)->where("stock", "!=", 0)->orderBy("order_group")->orderBy("class_time")->get()->toArray();
|
$aProduct = Product::where("status" , 1)->where("stock", "!=", 0)->orderBy("class_time")->orderBy("order_group")->get()->toArray();
|
||||||
|
// tomd($aProduct, 1);
|
||||||
$aProductNew = [];
|
$aProductNew = [];
|
||||||
$aProductMenu = [];
|
$aProductMenu = [];
|
||||||
foreach ($aProduct as $aProductRow) {
|
foreach ($aProduct as $aProductRow) {
|
||||||
@ -53,7 +53,7 @@ final class ProductController extends BaseController
|
|||||||
$aProductRow["time_group_str"] = "年付";
|
$aProductRow["time_group_str"] = "年付";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($aProductRow["stock"] != -1) {
|
if ($aProductRow["stock"] != -1) { // 限购
|
||||||
$shengyu = $aProductRow["stock"] - $aProductRow["sale_count"];
|
$shengyu = $aProductRow["stock"] - $aProductRow["sale_count"];
|
||||||
$shengyu = max(0, $shengyu);
|
$shengyu = max(0, $shengyu);
|
||||||
$shengyuRate = ($shengyu / $aProductRow["stock"]) * 100;
|
$shengyuRate = ($shengyu / $aProductRow["stock"]) * 100;
|
||||||
@ -64,7 +64,7 @@ final class ProductController extends BaseController
|
|||||||
$aProductNew[$aProductRow["name"]]["is_huodong"] = true; // 限购=活动,没问题
|
$aProductNew[$aProductRow["name"]]["is_huodong"] = true; // 限购=活动,没问题
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($aProductRow["end_time"] > time()) {
|
if ($aProductRow["end_time"] > time()) { //限期
|
||||||
$iTimeNow = time();
|
$iTimeNow = time();
|
||||||
// $iTimeNow = "1754741243";
|
// $iTimeNow = "1754741243";
|
||||||
$iShengyuTime = $aProductRow["end_time"] - $iTimeNow;
|
$iShengyuTime = $aProductRow["end_time"] - $iTimeNow;
|
||||||
@ -82,7 +82,7 @@ final class ProductController extends BaseController
|
|||||||
$aProductNew[$aProductRow["name"]]["data"][] = $aProductRow;
|
$aProductNew[$aProductRow["name"]]["data"][] = $aProductRow;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
// tomd($aProductNew, 1);
|
||||||
// $this->user->vipRate = VipMap::rateByLevel($this->user->vip_level);
|
// $this->user->vipRate = VipMap::rateByLevel($this->user->vip_level);
|
||||||
|
|
||||||
// $this->user->vipInfo = VipMap::infoByLevel($this->user->vip_level);
|
// $this->user->vipInfo = VipMap::infoByLevel($this->user->vip_level);
|
||||||
|
|||||||
@ -836,7 +836,7 @@ final class Cron
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
$invoice = (new Invoice())->where('order_id', $oOrder->id)->first();
|
$invoice = (new Invoice())->where('order_id', $oOrder->id)->first();
|
||||||
//var_dump($invoice);
|
var_dump($invoice);
|
||||||
if ($invoice === null) {
|
if ($invoice === null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user