1234567891011121314151617181920212223242526272829303132333435363738394041 |
- <?php
- declare(strict_types=0);
- defined('InShopNC') or exit('Access Invalid!');
- class thrid_refillModel extends Model
- {
- public function getProviderProduct($store_id,$goods_id,$system_code)
- {
- return $this->table('third_proprice')->where(['store_id' => $store_id,'goods_id' => $goods_id,'system_code' => $system_code])->field('*')->find();
- }
- public function getProductList($condition, $page = null, $order = '', $field = '*', $limit = '')
- {
- return $this->table('third_product')->field($field)->where($condition)->order($order)->limit($limit)->page($page)->select();
- }
- public function getMerchantPrice($mchid,$pcode)
- {
- $item = $this->table('merchant_price')
- ->field('*')
- ->where(['mchid' => $mchid, 'pcode' => $pcode])
- ->find();
- if(empty($item)) {
- return false;
- }
- $card_types = explode(',',$item['card_types']);
- if(in_array(mtopcard\ThirdRefillCard,$card_types)) {
- return ncPriceFormat($item['price']);
- } else {
- return false;
- }
- }
- public function addExt($data)
- {
- }
- }
|