|
|
@@ -61,14 +61,7 @@ class CustomClass extends BaseClass
|
|
|
public static function createSeatSn($mainId)
|
|
|
{
|
|
|
$max = Custom::find(['mainId' => $mainId])->max('seatSn');
|
|
|
- echo $max;die;
|
|
|
- $info = self::getByCondition(['mainId' => $mainId], true, 'seatSn DESC');
|
|
|
- $new = 1;
|
|
|
- if (!empty($info)) {
|
|
|
- $old = $info->seatSn;
|
|
|
- $new = bcadd($old, 1);
|
|
|
- echo $info->id.' '.$old.' '.$new;die;
|
|
|
- }
|
|
|
+ $new = bcadd($max, 1);
|
|
|
return $new;
|
|
|
}
|
|
|
|