|
@@ -114,6 +114,7 @@ class CardBatchService
|
|
$cardBatchModel = new CardBatch();
|
|
$cardBatchModel = new CardBatch();
|
|
$model = $cardBatchModel::find($params['card_batch_id']);
|
|
$model = $cardBatchModel::find($params['card_batch_id']);
|
|
$model->card_batch_name = $params['card_batch_name'];
|
|
$model->card_batch_name = $params['card_batch_name'];
|
|
|
|
+ $model->card_batch_remark = $params['card_batch_remark'] ?? "";
|
|
$params['card_batch_status'] = $model->card_batch_status = $params['card_batch_status']; // 批次状态
|
|
$params['card_batch_status'] = $model->card_batch_status = $params['card_batch_status']; // 批次状态
|
|
if ($params['validtimes_status'] == 0) {
|
|
if ($params['validtimes_status'] == 0) {
|
|
$model->card_batch_validtimes = 0; // 卡批次有效期 0=永久 天
|
|
$model->card_batch_validtimes = 0; // 卡批次有效期 0=永久 天
|
|
@@ -127,7 +128,7 @@ class CardBatchService
|
|
$model->card_batch_validtimes = bcsub($model->card_batch_validtimes, $params['card_batch_validtimes']); // 卡批次有效期 0=永久 天
|
|
$model->card_batch_validtimes = bcsub($model->card_batch_validtimes, $params['card_batch_validtimes']); // 卡批次有效期 0=永久 天
|
|
}
|
|
}
|
|
if ($model->save()) {
|
|
if ($model->save()) {
|
|
- // 修改卡批次下面的卡信息
|
|
|
|
|
|
+ // 修改卡批次下面的卡信息
|
|
// CardService::saveCardByCardBatchId($params['card_batch_id'], $params);
|
|
// CardService::saveCardByCardBatchId($params['card_batch_id'], $params);
|
|
// 修改卡批次下面的卡信息
|
|
// 修改卡批次下面的卡信息
|
|
$model = new Card();
|
|
$model = new Card();
|
|
@@ -284,6 +285,12 @@ class CardBatchService
|
|
$card_status_total = array_column($card_status_total, null, 'join_card_batch_id');
|
|
$card_status_total = array_column($card_status_total, null, 'join_card_batch_id');
|
|
foreach ($rows as $key => &$value) {
|
|
foreach ($rows as $key => &$value) {
|
|
$value['card_batch_status_value'] = $cardBatchModel::CARD_BATCH_STATUS[$value['card_batch_status']];
|
|
$value['card_batch_status_value'] = $cardBatchModel::CARD_BATCH_STATUS[$value['card_batch_status']];
|
|
|
|
+ if ($value['card_batch_validtimes'] == 0) {
|
|
|
|
+ $value['card_batch_validtimes_value'] = "永久";
|
|
|
|
+ } else {
|
|
|
|
+ $value['card_batch_validtimes_value'] = $value['card_batch_validtimes'];
|
|
|
|
+ }
|
|
|
|
+
|
|
!empty($value['card_batch_json']) && $value['card_batch_json'] = json_decode($value['card_batch_json'], true);
|
|
!empty($value['card_batch_json']) && $value['card_batch_json'] = json_decode($value['card_batch_json'], true);
|
|
!empty($value['card_batch_extend_json']) && $value['card_batch_extend_json'] = json_decode($value['card_batch_extend_json'], true);
|
|
!empty($value['card_batch_extend_json']) && $value['card_batch_extend_json'] = json_decode($value['card_batch_extend_json'], true);
|
|
// 合并储值卡面值以及状态数量
|
|
// 合并储值卡面值以及状态数量
|