goods_fcode.model.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * 商品F码模型
  4. *
  5. */
  6. defined('InShopNC') or exit('Access Invalid!');
  7. class goods_fcodeModel extends Model {
  8. public function __construct(){
  9. parent::__construct('goods_fcode');
  10. }
  11. /**
  12. * 插入数据
  13. *
  14. * @param unknown $insert
  15. * @return boolean
  16. */
  17. public function addGoodsFCodeAll($insert) {
  18. return $this->insertAll($insert);
  19. }
  20. /**
  21. * 取得F码列表
  22. *
  23. * @param array $condition
  24. * @param string $order
  25. */
  26. public function getGoodsFCodeList($condition, $order = 'fc_state asc,fc_id asc') {
  27. return $this->where($condition)->order($order)->select();
  28. }
  29. /**
  30. * 删除F码
  31. */
  32. public function delGoodsFCode($condition) {
  33. return $this->where($condition)->delete();
  34. }
  35. /**
  36. * 取得F码
  37. */
  38. public function getGoodsFCode($condition) {
  39. return $this->where($condition)->find();
  40. }
  41. /**
  42. * 更新F码
  43. */
  44. public function editGoodsFCode($data, $condition) {
  45. return $this->where($condition)->update($data);
  46. }
  47. }