dbmsv4 init...3

This commit is contained in:
최준흠 2025-12-15 16:35:31 +09:00
parent be378d99ef
commit 72e4a0566c
12 changed files with 37 additions and 36 deletions

View File

@ -10,7 +10,7 @@ class CouponDTO extends CommonDTO
public ?int $user_uid = null;
public ?int $clientinfo_uid = null;
public ?string $title = null;
public ?int $cnt = null;
public ?int $amount = null;
public ?string $status = 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

View File

@ -21,8 +21,8 @@ class CouponEntity extends WalletEntity
{
return $this->attributes['content'] ?? null;
}
public function getCnt(): int
public function getAmount(): int
{
return $this->attributes['cnt'] ?? 0;
return $this->attributes['amount'] ?? 0;
}
}

View File

@ -12,7 +12,7 @@ class CouponForm extends WalletForm
{
switch ($field) {
case "clientinfo_uid":
case "cnt":
case "amount":
$rule = "required|numeric";
break;
case "title":

View File

@ -11,7 +11,7 @@ class CouponHelper extends WalletHelper
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
{
switch ($field) {
case 'cnt':
case 'amount':
$value = number_format($value) . "";
break;
default:

View File

@ -11,7 +11,7 @@ class PointHelper extends WalletHelper
public function getFieldView(string $field, mixed $value, array $viewDatas, array $extras = []): string|null
{
switch ($field) {
case 'cnt':
case 'amount':
$value = number_format($value) . "";
break;
default:

View File

@ -5,7 +5,7 @@ return [
'clientinfo_uid' => "고객명",
'title' => "제목",
'content' => "내용",
'cnt' => "갯수",
'amount' => "갯수",
'status' => "추가/사용",
'updated_at' => "수정일",
'created_at' => "작성일",

View File

@ -18,7 +18,7 @@ class CouponModel extends WalletModel
"clientinfo_uid",
"title",
"content",
"cnt",
"amount",
"status",
"updated_at"
];

View File

@ -18,7 +18,7 @@ class PointModel extends WalletModel
"clientinfo_uid",
"title",
"content",
"cnt",
"amount",
"status",
"updated_at"
];

View File

@ -65,7 +65,7 @@ class CouponService extends WalletService
$fields = [
"clientinfo_uid",
"title",
"cnt",
"amount",
"status",
"content",
];
@ -90,7 +90,7 @@ class CouponService extends WalletService
$fields = [
"clientinfo_uid",
"title",
"cnt",
"amount",
"status",
'created_at'
];
@ -125,11 +125,11 @@ class CouponService extends WalletService
//입금,쿠폰 충전 처리
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__ . "에서 오류발생: 쿠폰수가 정의되지 않았습니다.");
}
//최종처리
$formDatas['balance'] = $clientEntity->getCouponBalance() + $formDatas['cnt'];
$formDatas['balance'] = $clientEntity->getCouponBalance() + $formDatas['amount'];
if ($formDatas['balance'] < 0) {
throw new RuntimeException(static::class . '->' . __FUNCTION__ . "에서 오류발생: 쿠폰수가 0보다 작은 값이 정의 되었습니다.");
}

View File

@ -1,3 +1,4 @@
use App\Entities\Customer\Wallet\CouponEntity;
<div class="rounded border border-gray p-2 mt-3">
<div style="font-size:15px">미지급 1회성정보</div>
<table class="table table-bordered table-hover table-striped">
@ -5,7 +6,7 @@
<th style="width: 10px"></th>
<th style="width: 250px">서비스</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: 170px">등록일</th>