Model_fullordertt.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
  2. class Model_fullordertt extends Lin_Model
  3. {
  4. function __construct(){
  5. parent::__construct();
  6. $this->load->database();
  7. $this->table = 'fullordertt';
  8. $this->load_table('fullordertt');
  9. }
  10. /** 通过API查找 */
  11. public function get_api($api)
  12. {
  13. return $this->find("api = '$api'");
  14. }
  15. public function get_number($number)
  16. {
  17. return $this->find("number = '$number'");
  18. }
  19. public function get_orderinfo($orderinfo)
  20. {
  21. return $this->find("orderinfo = '$orderinfo'");
  22. }
  23. public function get_waybill($waybill)
  24. {
  25. return $this->find("waybill = '$waybill'");
  26. }
  27. public function get_rpaypal($rpaypal)
  28. {
  29. return $this->find("rpaypal = '$rpaypal'");
  30. }
  31. public function get_paypal($paypal)
  32. {
  33. return $this->find("paypal = '$paypal'");
  34. }
  35. public function get_time($time)
  36. {
  37. $dt = 3600;
  38. return date('Y-m-d H:i:s',$time+$dt);
  39. }
  40. public function getCateOne(){
  41. return [
  42. '1'=>'常规订单',
  43. '2'=>'直播订单',
  44. '3'=>'样品订单',
  45. '4'=>'售后订单',
  46. '5'=>'网红订单',
  47. ];
  48. }
  49. public function getCateTwo(){
  50. return [
  51. '1'=>[],
  52. '2'=>[
  53. '1'=>'工厂直播间',
  54. '2'=>'公司直播间',
  55. '3'=>'郑州直播间',
  56. ],
  57. '3'=>[
  58. '1'=>'0元样品',
  59. '2'=>'自费样品',
  60. ],
  61. '4'=>[
  62. '1'=>'无退货订单',
  63. '2'=>'有退货订单'
  64. ],
  65. '5'=>[]
  66. ];
  67. }
  68. } //end class