...
|
...
|
@@ -352,6 +352,7 @@ class Add extends Api |
|
|
public function BatteryCenter()
|
|
|
{
|
|
|
$UserId = $this->IsToken($this->request->header());
|
|
|
$Params=$this->request->param();
|
|
|
$mobile = Db::name('user')->where('id', $UserId)->value('mobile');
|
|
|
$StorID = Db::name('stor')->where('mobile', $mobile)->value('id');
|
|
|
if (empty($StorID)) {
|
...
|
...
|
@@ -363,6 +364,7 @@ class Add extends Api |
|
|
->where('c.stor_id', $StorID)
|
|
|
->where('c.status', 1)
|
|
|
->join('battery_code b', 'b.BatteryCode=c.battery_code')
|
|
|
->where('b.battery_type_id',$Params['battery_type_id'])
|
|
|
->field('c.id,c.battery_code,b.Mac,c.battery')
|
|
|
->select();
|
|
|
$this->success('成功', $BatteryCenter);
|
...
|
...
|
|