yujian
2019-03-15 585a05bef033fa4b6a02b5d3afd3b305b3914abb
fanli/src/main/java/com/yeshi/fanli/controller/client/CustomerServiceController.java
@@ -9,6 +9,8 @@
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import org.yeshi.utils.JsonUtil;
import com.google.gson.Gson;
import com.yeshi.fanli.entity.AppInfo;
@@ -19,7 +21,6 @@
import com.yeshi.fanli.service.inter.customerservice.CustomerServiceCommonQuestionService;
import com.yeshi.fanli.service.inter.customerservice.CustomerServiceHistoryService;
import com.yeshi.fanli.util.StringUtil;
import org.yeshi.utils.JsonUtil;
import net.sf.json.JSONObject;
@@ -115,4 +116,35 @@
      out.print(JsonUtil.loadTrueResult(JsonUtil.getApiCommonGson().toJson(answer)));
   }
   /**
    *   用户吐槽
    * @param fileList
    * @param uid
    * @param content
    * @param out
    */
   @RequestMapping(value = "complaint")
   public void complaint(List<CommonsMultipartFile> fileList, Long uid, String content, PrintWriter out) {
      // 图片最多五张、可以为空
      if (fileList != null && fileList.size() > 5 ) {
         out.print(JsonUtil.loadFalseResult("图片最多可上传五张"));
         return;
      }
      if (content == null || content.trim().length() == 0) {
         out.print(JsonUtil.loadFalseResult("吐槽内容为空"));
         return;
      }
      try {
         out.print(JsonUtil.loadTrueResult("吐槽"));
      } catch (Exception e) {
         out.print(JsonUtil.loadFalseResult("操作失败"));
         e.printStackTrace();
      }
   }
}