KdniaoModel.class.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * lionfish 商城系统
  4. *
  5. * ==========================================================================
  6. * @link http://www.liofis.com/
  7. * @copyright Copyright (c) 2015 liofis.com.
  8. * @license http://www.liofis.com/license.html License
  9. * ==========================================================================
  10. *
  11. * @author fld
  12. *
  13. */
  14. namespace Seller\Model;
  15. class KdniaoModel{
  16. public function update($data)
  17. {
  18. $ins_data = array();
  19. $ins_data['express_name'] = $data['express_name'];
  20. $ins_data['express_code'] = $data['express_code'];
  21. $ins_data['customer_name'] = $data['customer_name'];
  22. $ins_data['customer_pwd'] = $data['customer_pwd'];
  23. $ins_data['month_code'] = $data['month_code'];
  24. $ins_data['send_site'] = $data['send_site'];
  25. $ins_data['send_staff'] = $data['send_staff'];
  26. $ins_data['template_size'] = $data['template_size'];
  27. $ins_data['is_send_message'] = $data['is_send_message'];
  28. $ins_data['is_send_goods'] = $data['is_send_goods'];
  29. $ins_data['sender_company'] = $data['sender_company'];
  30. $ins_data['sender_name'] = $data['sender_name'];
  31. $ins_data['sender_tel'] = $data['sender_tel'];
  32. $ins_data['sender_mobile'] = $data['sender_mobile'];
  33. $ins_data['sender_postcode'] = $data['sender_postcode'];
  34. $ins_data['sender_address'] = $data['sender_address'];
  35. $ins_data['sender_province_name'] = $data['sender_province_name'];
  36. $ins_data['sender_city_name'] = $data['sender_city_name'];
  37. $ins_data['sender_area_name'] = $data['sender_area_name'];
  38. $id = $data['id'];
  39. if( !empty($id) && $id > 0 )
  40. {
  41. M('lionfish_comshop_kdniao_list')->where( array('id' => $id) )->save( $ins_data );
  42. }else{
  43. $ins_data['addtime'] = time();
  44. M('lionfish_comshop_kdniao_list')->add($ins_data);
  45. }
  46. }
  47. }
  48. ?>