diff --git a/webapp/controller/InGameMallController.class.php b/webapp/controller/InGameMallController.class.php index bc87b35b..753f636e 100644 --- a/webapp/controller/InGameMallController.class.php +++ b/webapp/controller/InGameMallController.class.php @@ -216,10 +216,10 @@ class InGameMallController extends BaseAuthedController { $this->_rspErr(1, 'param goods_unnid error'); return; } - if ($chipDb['inlay_state'] == 1){ - $this->_rspErr(1, 'Unable to sell goods in use'); - return; - } +// if ($chipDb['inlay_state'] == 1){ +// $this->_rspErr(1, 'Unable to sell goods in use'); +// return; +// } $orderField = $chipDb['quality']; } break; diff --git a/webapp/models/Chip.php b/webapp/models/Chip.php index eed5c273..5f0c0cc9 100644 --- a/webapp/models/Chip.php +++ b/webapp/models/Chip.php @@ -345,9 +345,16 @@ class Chip extends BaseModel } public static function updateInlayState($chip_unnid,$status){ - self::update2($chip_unnid,array( - 'inlay_state' => $status - )); + SqlHelper::update + (myself()->_getSelfMysql(), + 't_chip', + array( + 'idx' => $chip_unnid, + ), + array( + 'inlay_state' => $status + ) + ); } diff --git a/webapp/models/ChipPage.php b/webapp/models/ChipPage.php index 3885ed33..0ddfb32b 100644 --- a/webapp/models/ChipPage.php +++ b/webapp/models/ChipPage.php @@ -118,8 +118,8 @@ class ChipPage extends BaseModel foreach ($data as &$value){ $chipDb = Chip::find($value['chip_id']); if ( !$chipDb ) { - $value['chip_id'] = 0; Chip::updateInlayState($value['chip_id'],0); + $value['chip_id'] = 0; } } self::update($row['hero_uniid'],array(