dbmsv4 init...3
This commit is contained in:
parent
be378d99ef
commit
72e4a0566c
@ -10,7 +10,7 @@ class CouponDTO extends CommonDTO
|
|||||||
public ?int $user_uid = null;
|
public ?int $user_uid = null;
|
||||||
public ?int $clientinfo_uid = null;
|
public ?int $clientinfo_uid = null;
|
||||||
public ?string $title = null;
|
public ?string $title = null;
|
||||||
public ?int $cnt = null;
|
public ?int $amount = null;
|
||||||
public ?string $status = null;
|
public ?string $status = null;
|
||||||
public ?string $content = null;
|
public ?string $content = null;
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -21,8 +21,8 @@ class CouponEntity extends WalletEntity
|
|||||||
{
|
{
|
||||||
return $this->attributes['content'] ?? null;
|
return $this->attributes['content'] ?? null;
|
||||||
}
|
}
|
||||||
public function getCnt(): int
|
public function getAmount(): int
|
||||||
{
|
{
|
||||||
return $this->attributes['cnt'] ?? 0;
|
return $this->attributes['amount'] ?? 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class CouponForm extends WalletForm
|
|||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case "clientinfo_uid":
|
case "clientinfo_uid":
|
||||||
case "cnt":
|
case "amount":
|
||||||
$rule = "required|numeric";
|
$rule = "required|numeric";
|
||||||
break;
|
break;
|
||||||
case "title":
|
case "title":
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class CouponHelper extends WalletHelper
|
|||||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'cnt':
|
case 'amount':
|
||||||
$value = number_format($value) . "개";
|
$value = number_format($value) . "개";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -11,7 +11,7 @@ class PointHelper extends WalletHelper
|
|||||||
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
|
||||||
{
|
{
|
||||||
switch ($field) {
|
switch ($field) {
|
||||||
case 'cnt':
|
case 'amount':
|
||||||
$value = number_format($value) . "점";
|
$value = number_format($value) . "점";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@ -5,7 +5,7 @@ return [
|
|||||||
'clientinfo_uid' => "고객명",
|
'clientinfo_uid' => "고객명",
|
||||||
'title' => "제목",
|
'title' => "제목",
|
||||||
'content' => "내용",
|
'content' => "내용",
|
||||||
'cnt' => "갯수",
|
'amount' => "갯수",
|
||||||
'status' => "추가/사용",
|
'status' => "추가/사용",
|
||||||
'updated_at' => "수정일",
|
'updated_at' => "수정일",
|
||||||
'created_at' => "작성일",
|
'created_at' => "작성일",
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class CouponModel extends WalletModel
|
|||||||
"clientinfo_uid",
|
"clientinfo_uid",
|
||||||
"title",
|
"title",
|
||||||
"content",
|
"content",
|
||||||
"cnt",
|
"amount",
|
||||||
"status",
|
"status",
|
||||||
"updated_at"
|
"updated_at"
|
||||||
];
|
];
|
||||||
|
|||||||
@ -18,7 +18,7 @@ class PointModel extends WalletModel
|
|||||||
"clientinfo_uid",
|
"clientinfo_uid",
|
||||||
"title",
|
"title",
|
||||||
"content",
|
"content",
|
||||||
"cnt",
|
"amount",
|
||||||
"status",
|
"status",
|
||||||
"updated_at"
|
"updated_at"
|
||||||
];
|
];
|
||||||
|
|||||||
@ -65,7 +65,7 @@ class CouponService extends WalletService
|
|||||||
$fields = [
|
$fields = [
|
||||||
"clientinfo_uid",
|
"clientinfo_uid",
|
||||||
"title",
|
"title",
|
||||||
"cnt",
|
"amount",
|
||||||
"status",
|
"status",
|
||||||
"content",
|
"content",
|
||||||
];
|
];
|
||||||
@ -90,7 +90,7 @@ class CouponService extends WalletService
|
|||||||
$fields = [
|
$fields = [
|
||||||
"clientinfo_uid",
|
"clientinfo_uid",
|
||||||
"title",
|
"title",
|
||||||
"cnt",
|
"amount",
|
||||||
"status",
|
"status",
|
||||||
'created_at'
|
'created_at'
|
||||||
];
|
];
|
||||||
@ -125,11 +125,11 @@ class CouponService extends WalletService
|
|||||||
//입금,쿠폰 충전 처리
|
//입금,쿠폰 충전 처리
|
||||||
protected function deposit_process(ClientEntity $clientEntity, array $formDatas): array
|
protected function deposit_process(ClientEntity $clientEntity, array $formDatas): array
|
||||||
{
|
{
|
||||||
if (!array_key_exists('cnt', $formDatas)) {
|
if (!array_key_exists('amount', $formDatas)) {
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 쿠폰수가 정의되지 않았습니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 쿠폰수가 정의되지 않았습니다.");
|
||||||
}
|
}
|
||||||
//최종처리
|
//최종처리
|
||||||
$formDatas['balance'] = $clientEntity->getCouponBalance() + $formDatas['cnt'];
|
$formDatas['balance'] = $clientEntity->getCouponBalance() + $formDatas['amount'];
|
||||||
if ($formDatas['balance'] < 0) {
|
if ($formDatas['balance'] < 0) {
|
||||||
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 쿠폰수가 0보다 작은 값이 정의 되었습니다.");
|
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 쿠폰수가 0보다 작은 값이 정의 되었습니다.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
use App\Entities\Customer\Wallet\CouponEntity;
|
||||||
<div class="rounded border border-gray p-2 mt-3">
|
<div class="rounded border border-gray p-2 mt-3">
|
||||||
<div style="font-size:15px">미지급 1회성정보</div>
|
<div style="font-size:15px">미지급 1회성정보</div>
|
||||||
<table class="table table-bordered table-hover table-striped">
|
<table class="table table-bordered table-hover table-striped">
|
||||||
@ -5,7 +6,7 @@
|
|||||||
<th style="width: 10px"></th>
|
<th style="width: 10px"></th>
|
||||||
<th style="width: 250px">서비스</th>
|
<th style="width: 250px">서비스</th>
|
||||||
<th>항목</th>
|
<th>항목</th>
|
||||||
<th style="width: 120px">결제금액</th>
|
<th style="width: 120px">결제금액/수량</th>
|
||||||
<th style="width: 100px">청구방식</th>
|
<th style="width: 100px">청구방식</th>
|
||||||
<th style="width: 100px">지불방법</th>
|
<th style="width: 100px">지불방법</th>
|
||||||
<th style="width: 170px">등록일</th>
|
<th style="width: 170px">등록일</th>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user