You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

62 lines
1.6 KiB

  1. <?php
  2. /**
  3. *
  4. * ============================================================================
  5. * * 版权所有 蜘蛛出行 * *
  6. * 网站地址: http://www.zhizhuchuxing.com
  7. * ----------------------------------------------------------------------------
  8. * 这不是一个自由软件!您只能在不用于商业目的的前提下对程序代码进行修改和
  9. * 使用;不允许对程序代码以任何形式任何目的的再发布。
  10. * ============================================================================
  11. * Author By: 倪宗锋
  12. * PhpStorm SuggestService.php
  13. * Create By 2016/11/29 14:08 $
  14. */
  15. namespace WeChatUser\Service;
  16. use Util\Util\Util;
  17. use WeChatUser\Model\UserSuggest;
  18. class SuggestService
  19. {
  20. /**
  21. * Function Description:添加意见反馈
  22. * Function Name: addSuggest
  23. * @param $params array
  24. *
  25. * @return array
  26. *
  27. * @author 倪宗锋
  28. */
  29. public function addSuggest($params)
  30. {
  31. $check = $this->checkParamsForAdd($params);
  32. if ($check['flag'] == false) {
  33. return $check;
  34. }
  35. $userSuggest = new UserSuggest();//用户建议反馈表
  36. $result = $userSuggest->addSuggest($params);//添加建议反馈
  37. return $result;
  38. }
  39. /**
  40. * Function Description:参数校验
  41. * Function Name: checkParamsForAdd
  42. * @param $params array
  43. *
  44. * @return array
  45. *
  46. * @author 倪宗锋
  47. */
  48. public function checkParamsForAdd($params)
  49. {
  50. if(empty($params['content'])) {
  51. return Util::returnArrEr('建议内容不能为空!');
  52. }
  53. return Util::returnArrSu();
  54. }
  55. }