| | |
| | | package com.yeshi.fanli.controller.client;
|
| | |
|
| | | import java.io.PrintWriter;
|
| | | import java.lang.reflect.InvocationTargetException;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.Properties;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | import com.google.gson.GsonBuilder;
|
| | | import com.yeshi.fanli.entity.accept.AcceptData;
|
| | | import com.yeshi.fanli.entity.push.DeviceActive;
|
| | | import com.yeshi.fanli.entity.system.BusinessSystem;
|
| | | import com.yeshi.fanli.entity.system.CustomerContent;
|
| | | import com.yeshi.fanli.entity.system.System;
|
| | | import com.yeshi.fanli.entity.system.SystemClientParams;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.config.CustomerContentService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemClientParamsService;
|
| | | import com.yeshi.fanli.service.inter.config.SystemService;
|
| | | import com.yeshi.fanli.service.inter.push.DeviceActiveService;
|
| | | import com.yeshi.fanli.service.inter.push.IOSPushService;
|
| | | import com.yeshi.fanli.util.ThreadUtil;
|
| | |
| | | public class SystemClientController {
|
| | |
|
| | | @Resource
|
| | | private SystemService systemService;
|
| | | private BusinessSystemService businessSystemService;
|
| | |
|
| | | @Resource
|
| | | private SystemClientParamsService systemClientParamsService;
|
| | |
| | |
|
| | | @Resource
|
| | | private DeviceActiveService deviceActiveService;
|
| | | |
| | | @Resource
|
| | | private CustomerContentService customerContentService;
|
| | |
|
| | | @RequestMapping("getsystemclientparams")
|
| | | public void getSystemClientParams(AcceptData acceptData, PrintWriter out) {
|
| | | System system = systemService.getSystemCache(acceptData.getPlatform(), acceptData.getPackages());
|
| | | BusinessSystem system = businessSystemService.getBusinessSystemCache(acceptData.getPlatform(), acceptData.getPackages());
|
| | | if (system == null) {
|
| | | out.print("系统不存在");
|
| | | return;
|
| | |
| | | // 老版本weex(1.5.1之前的)
|
| | | ssp.setValue("http://ec-1255749512.file.myqcloud.com/resource/weex/flq_index_v2.js");
|
| | | } else if ("ios".equalsIgnoreCase(acceptData.getPlatform())
|
| | | && Integer.parseInt(acceptData.getVersion()) < 44)
|
| | | && Integer.parseInt(acceptData.getVersion()) < 44&&system.getId().longValue()!=5L)
|
| | | ssp.setValue("http://ec-1255749512.file.myqcloud.com/resource/weex/flq_index_v2.js");
|
| | | }
|
| | | list.add(ssp);
|
| | |
| | | @RequestMapping("contactCustomerService")
|
| | | public void contactCustomerService(AcceptData acceptData, PrintWriter out) {
|
| | | String title = "联系客服";
|
| | | List<CustomerContent> contentList = systemClientParamsService.contactCustomerService(title);
|
| | | List<CustomerContent> contentList = customerContentService.contactCustomerService(title);
|
| | | JSONObject data = new JSONObject();
|
| | | data.put("contentList", JsonUtil.getSimpleGsonWithDate().toJson(contentList));
|
| | | out.print(JsonUtil.loadTrueResult(data));
|