|
|
|
@ -3557,7 +3557,6 @@ class InsurerController extends BaseController |
|
|
|
|
//礼券 |
|
|
|
|
if ($gift_info && $gift_info->type_id == 2) { |
|
|
|
|
$pinyin_arr = explode(' ', $gift_info->pinyin_name); |
|
|
|
|
// dd($pinyin_arr); |
|
|
|
|
$liquan_str = 'ch'; |
|
|
|
|
//获取礼券拼音首字母 |
|
|
|
|
foreach ($pinyin_arr as $first) { |
|
|
|
@ -3575,13 +3574,12 @@ class InsurerController extends BaseController |
|
|
|
|
if ($gift_use) { |
|
|
|
|
$liquan_str .= sprintf("%04d", $gift_use->gift_shuzi + 1); |
|
|
|
|
$new_gift_use->gift_shuzi = $gift_use->gift_shuzi + 1; |
|
|
|
|
$new_gift_use->code = $liquan_str; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
$liquan_str .= sprintf("%04d", 1); |
|
|
|
|
$new_gift_use->gift_shuzi = 1; |
|
|
|
|
$new_gift_use->code = strtoupper($liquan_str); |
|
|
|
|
} |
|
|
|
|
$new_gift_use->code = strtoupper($liquan_str); |
|
|
|
|
$new_gift_use->op_id = $this->my->id; |
|
|
|
|
$new_gift_use->type_id = $v; //礼券ID |
|
|
|
|
$new_gift_use->input_date = date('Y-m-d H:i:s'); |
|
|
|
|