shoppingmallv2 init...
This commit is contained in:
parent
51095d5c20
commit
d00efaa713
@ -124,8 +124,9 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au
|
|||||||
$routes->group('order', static function ($routes) {
|
$routes->group('order', static function ($routes) {
|
||||||
$routes->get('', 'OrderController::index');
|
$routes->get('', 'OrderController::index');
|
||||||
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
$routes->get('view/(:uuid)', 'OrderController::view/$1');
|
||||||
$routes->post('batchjob', 'OrderController::batchjob`');
|
|
||||||
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
|
$routes->get('delete/(:uuid)', 'OrderController::delete/$1', ['filter' => 'authFilter:master']);
|
||||||
|
$routes->get('toggle/(:uuid)/(:hash)', 'OrderController::toggle/$1/$2');
|
||||||
|
$routes->post('batchjob', 'OrderController::batchjob`');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
|
$routes->group('front', ['namespace' => 'App\Controllers\Front'], function ($routes) {
|
||||||
|
|||||||
@ -13,5 +13,5 @@ return [
|
|||||||
'updated_at' => "수정일",
|
'updated_at' => "수정일",
|
||||||
'created_at' => "작성일"
|
'created_at' => "작성일"
|
||||||
],
|
],
|
||||||
"STATUS" => ["use" => "결제", "unuse" => "주문취소", "confirm" => "주문완료",]
|
"STATUS" => ["use" => "주문신청", "unuse" => "주문취소", "confirm" => "주문완료",]
|
||||||
];
|
];
|
||||||
|
|||||||
@ -63,7 +63,10 @@ abstract class BaseModel extends Model
|
|||||||
return $this->primaryKey;
|
return $this->primaryKey;
|
||||||
}
|
}
|
||||||
abstract public function getTitleField(): string;
|
abstract public function getTitleField(): string;
|
||||||
abstract public function getEntity($conditions): BaseEntity;
|
public function getEntity($conditions): BaseEntity
|
||||||
|
{
|
||||||
|
return $this->where($conditions)->first() ?: throw new \Exception(__FUNCTION__ . "에서 {$this->getClassName()}의 해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
||||||
|
}
|
||||||
final public function getEntitys(array $conditions = array()): array
|
final public function getEntitys(array $conditions = array()): array
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->findAll();
|
return $this->where($conditions)->findAll();
|
||||||
|
|||||||
@ -50,7 +50,7 @@ class BoardConfigModel extends BaseModel
|
|||||||
}
|
}
|
||||||
public function getEntity($conditions): BoardConfigEntity
|
public function getEntity($conditions): BoardConfigEntity
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->first() ?: throw new \Exception("해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
return parent::getEntity($conditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function changeFormData(string $action, string $field, array $formDatas, $entity)
|
protected function changeFormData(string $action, string $field, array $formDatas, $entity)
|
||||||
|
|||||||
@ -42,7 +42,7 @@ class CategoryModel extends BaseHierarchyModel
|
|||||||
|
|
||||||
public function getEntity($conditions): CategoryEntity
|
public function getEntity($conditions): CategoryEntity
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->first() ?: throw new \Exception("해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
return parent::getEntity($conditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getOptions(array $conditions = array(), $options = array()): array
|
public function getOptions(array $conditions = array(), $options = array()): array
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class OrderModel extends BaseModel
|
|||||||
}
|
}
|
||||||
public function getEntity($conditions): OrderEntity
|
public function getEntity($conditions): OrderEntity
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->first() ?: throw new \Exception("해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
return parent::getEntity($conditions);
|
||||||
}
|
}
|
||||||
public function create(array $formDatas): OrderEntity
|
public function create(array $formDatas): OrderEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -84,7 +84,7 @@ class ProductModel extends BaseModel
|
|||||||
|
|
||||||
public function getEntity($conditions): ProductEntity
|
public function getEntity($conditions): ProductEntity
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->first() ?: throw new \Exception("해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
return parent::getEntity($conditions);
|
||||||
}
|
}
|
||||||
public function create(array $formDatas): ProductEntity
|
public function create(array $formDatas): ProductEntity
|
||||||
{
|
{
|
||||||
|
|||||||
@ -53,7 +53,7 @@ class UserModel extends BaseModel
|
|||||||
}
|
}
|
||||||
public function getEntity($conditions): UserEntity
|
public function getEntity($conditions): UserEntity
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->first() ?: throw new \Exception("해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
return parent::getEntity($conditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function changeFormData(string $action, string $field, array $formDatas, $entity)
|
protected function changeFormData(string $action, string $field, array $formDatas, $entity)
|
||||||
|
|||||||
@ -49,7 +49,7 @@ class UserSNSModel extends BaseModel
|
|||||||
}
|
}
|
||||||
public function getEntity($conditions): UserSNSEntity
|
public function getEntity($conditions): UserSNSEntity
|
||||||
{
|
{
|
||||||
return $this->where($conditions)->first() ?: throw new \Exception("해당 데이터가 없습니다.\n" . var_export($conditions, true));
|
return parent::getEntity($conditions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function create(array $formDatas): UserSNSEntity
|
public function create(array $formDatas): UserSNSEntity
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<td nowrap><?= getFieldIndex_Row_OrderHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
<td nowrap><?= getFieldIndex_Row_OrderHelper_Admin($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<td>
|
<td>
|
||||||
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor(current_url() . '/delete/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
|
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('cart/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
|
|||||||
@ -25,9 +25,7 @@
|
|||||||
<td nowrap><?= getFieldView_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
<td nowrap><?= getFieldView_OrderHelper($field, $entity, $fieldFilters, $fieldFormOptions) ?></td>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
<td>
|
<td>
|
||||||
<?php if ($entity->getStatus() == DEFAULTS['STATUS']) : ?>
|
<?= $entity->getStatus() == DEFAULTS['STATUS'] ? anchor('cart/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) : "" ?>
|
||||||
<?= anchor('cart/cancelCart/' . $entity->getPrimaryKey(), ICONS['DELETE'], ["class" => "btn btn-sm btn-danger btn-circle", "target" => "_self"]) ?>
|
|
||||||
<?php endif; ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php $i++; ?>
|
<?php $i++; ?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user