| | |
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletResponse;
|
| | |
|
| | | import net.sf.json.JSONObject;
|
| | |
|
| | |
| | | import com.google.gson.Gson;
|
| | | import com.google.gson.GsonBuilder;
|
| | | import com.google.gson.reflect.TypeToken;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.customerservice.CustomerServiceCommonQuestion;
|
| | | import com.yeshi.fanli.exception.CustomerServiceCommonQuestionException;
|
| | | import com.yeshi.fanli.exception.user.CustomerServiceCommonQuestionException;
|
| | | import com.yeshi.fanli.service.AdminUserService;
|
| | | import com.yeshi.fanli.service.inter.customerservice.CustomerServiceCommonQuestionService;
|
| | | import com.yeshi.fanli.tag.PageEntity;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.annotation.RequestNoLogin;
|
| | |
|
| | | @Controller
|
| | | @RequestMapping("admin/new/api/v1/commonQuestion")
|
| | |
| | | * @param special
|
| | | * @param out
|
| | | */
|
| | | @RequestNoLogin()
|
| | | @RequestMapping(value = "save")
|
| | | public void saveAdd(String callback, long uid, CustomerServiceCommonQuestion commonQuestion,
|
| | | HttpServletResponse response, PrintWriter out) {
|
| | |
|
| | | response.setHeader("Access-Control-Allow-Origin", "*");
|
| | | response.setHeader("Access-Control-Allow-Methods", "*");
|
| | | PrintWriter out) {
|
| | |
|
| | | try {
|
| | | |
| | | AdminUser admin = adminUserService.selectByPrimaryKey(uid);
|
| | | if (admin == null) {
|
| | | out.print(JsonUtil.loadFalseResult("当前账户验证失败"));
|
| | | return;
|
| | | }
|
| | |
|
| | | commonQuestionService.save(commonQuestion);
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("添加成功"));
|