| | |
| | | package com.yeshi.fanli.controller.client;
|
| | |
|
| | | import java.io.IOException;
|
| | | import java.io.PrintWriter;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
| | | 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;
|
| | |
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.customerservice.CustomerServiceCommonQuestion;
|
| | | import com.yeshi.fanli.entity.customerservice.CustomerServiceHistory;
|
| | | import com.yeshi.fanli.exception.user.UserComplaintException;
|
| | | import com.yeshi.fanli.service.inter.customerservice.CustomerServiceCommonQuestionService;
|
| | | import com.yeshi.fanli.service.inter.customerservice.CustomerServiceHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserComplaintService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import org.yeshi.utils.JsonUtil;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | |
|
| | | @Resource
|
| | | private CustomerServiceHistoryService customerServiceHistoryService;
|
| | | |
| | | @Resource
|
| | | private UserComplaintService userComplaintService;
|
| | | |
| | |
|
| | | /**
|
| | | * 预设标题的关键字列表
|
| | |
| | | out.print(JsonUtil.loadTrueResult(JsonUtil.getApiCommonGson().toJson(answer)));
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 用户吐槽记录添加
|
| | | * @param fileList
|
| | | * @param uid
|
| | | * @param content
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "complaint")
|
| | | public void complaint(AcceptData acceptData, List<CommonsMultipartFile> fileList, String content, Long uid, PrintWriter out) {
|
| | | try {
|
| | | userComplaintService.addUserComplaint(fileList, uid, content);
|
| | | out.print(JsonUtil.loadTrueResult("保存成功"));
|
| | | } catch (UserComplaintException e) {
|
| | | out.print(JsonUtil.loadFalseResult(e.getMsg()));
|
| | | e.printStackTrace();
|
| | | } catch (IOException e) {
|
| | | out.print(JsonUtil.loadFalseResult("图片上传失败失败"));
|
| | | e.printStackTrace();
|
| | | } catch (Exception e) {
|
| | | out.print(JsonUtil.loadFalseResult("保存失败"));
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|