|
@@ -3022,6 +3022,17 @@ class OrderController extends BaseController
|
|
|
if (empty($date) || !preg_match('/^\d{4}-\d{2}-\d{2}$/', $date)) {
|
|
if (empty($date) || !preg_match('/^\d{4}-\d{2}-\d{2}$/', $date)) {
|
|
|
util::fail('请选择日期');
|
|
util::fail('请选择日期');
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ $mainId = $this->mainId;
|
|
|
|
|
+ //超管或者约定的人可以修改日期
|
|
|
|
|
+ if (getenv('YII_ENV') == 'production') {
|
|
|
|
|
+ if (in_array($mainId, [23390])) {
|
|
|
|
|
+ if (!in_array($this->adminId, [24586, 23960, 24043])) {
|
|
|
|
|
+ util::fail('你不能修改哦');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
$connection = Yii::$app->db;
|
|
$connection = Yii::$app->db;
|
|
|
$transaction = $connection->beginTransaction();
|
|
$transaction = $connection->beginTransaction();
|
|
|
try {
|
|
try {
|