修改推广员流水编号长度过长问题

master
ELF 5 years ago
parent 6d9db68cd2
commit dc320ea811

@ -19,7 +19,7 @@ class PromoteCoinRecordService {
}
public function createRecord($params) {
$sn = date('YmdHis').strtoupper(md5(json_encode($params) . 'PromoteCoinRecord' . rand(0, 99999)));
$sn = date('YmdHis').strtoupper(substr(md5(json_encode($params) . 'PromoteCoinRecord' . rand(0, 99999)), 8, 16));
$data = [
'sn' => $sn,
'type' => $params['type'],

@ -34,7 +34,7 @@ class PromoteCoinService {
if (isset($params['sn'])) {
$sn = $params['sn'];
} else {
$sn = date('YmdHis').strtoupper(md5(json_encode($params) . 'PromoteCoin' . rand(0, 99999)));
$sn = date('YmdHis').strtoupper(substr(md5(json_encode($params) . 'PromoteCoin' . rand(0, 99999)), 8, 16));
}
$data = [];
$data['sn'] = $sn;

Loading…
Cancel
Save