ChannelSellPlatformService.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: hp
  5. * Date: 2017/12/2
  6. * Time: 15:56
  7. */
  8. namespace App\Modules\Channel\Services;
  9. use App\Modules\Channel\Models\ChannelSellPlatforms;
  10. use DB;
  11. class ChannelSellPlatformService
  12. {
  13. /**
  14. * 根据id获取
  15. * @param $id id
  16. * @return mixed
  17. */
  18. static function getById($id)
  19. {
  20. return ChannelSellPlatforms::getById($id);
  21. }
  22. /**
  23. * 根据名称获取
  24. * @param $name 名称
  25. * @return mixed
  26. */
  27. static function getByName($name)
  28. {
  29. return ChannelSellPlatforms::getByName($name);
  30. }
  31. /**
  32. * 根据code获取
  33. * @param $name 名称
  34. * @return mixed
  35. */
  36. static function getByCode($code)
  37. {
  38. return ChannelSellPlatforms::getByCode($code);
  39. }
  40. /**
  41. * 添加记录
  42. * @param $data
  43. * @return mixed
  44. */
  45. static function addInfo($data)
  46. {
  47. return ChannelSellPlatforms::addInfo($data);
  48. }
  49. /**
  50. * 通过id更新
  51. * @param $id
  52. * @param $params
  53. * @return mixed
  54. */
  55. static function updateById($id, $params)
  56. {
  57. return ChannelSellPlatforms::updateById($id, $params);
  58. }
  59. static function getList(){
  60. return ChannelSellPlatforms::getList();
  61. }
  62. }