|
|
@@ -5,12 +5,32 @@ namespace console\controllers;
|
|
|
use biz\item\classes\PtItemClass;
|
|
|
use biz\product\classes\ProductClass;
|
|
|
use biz\product\models\Product;
|
|
|
+use bizGhs\item\models\Item;
|
|
|
use yii\console\Controller;
|
|
|
use Yii;
|
|
|
|
|
|
class ProductController extends Controller
|
|
|
{
|
|
|
|
|
|
+ public function actionSkMore()
|
|
|
+ {
|
|
|
+ $query = new \yii\db\Query();
|
|
|
+ $query->from(Item::tableName());
|
|
|
+ $query->where(['id>' => 0]);
|
|
|
+ foreach ($query->batch() as $batchItem) {
|
|
|
+ foreach ($batchItem as $item) {
|
|
|
+ $addPrice = $item['addPrice'] ?? 0;
|
|
|
+ $id = $item['id'] ?? 0;
|
|
|
+ $skAddPrice = $item['skAddPrice'] ?? 0;
|
|
|
+ if ($skAddPrice > $addPrice) {
|
|
|
+ echo bcsub($skAddPrice, $addPrice, 2) . "\n";
|
|
|
+ } else {
|
|
|
+ echo "散客加价小于花店加价 {$id}\n";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//更新纯彩花艺的价格 ./yii product/update-price ssh 20211020
|
|
|
public function actionUpdatePrice()
|
|
|
{
|