礼券编码转大写

dev
zhaocheng 5 years ago
parent 4b1e7ee6c6
commit c94aec1e44
  1. 4
      frontend/controllers/InsurerController.php

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

Loading…
Cancel
Save