admin
2020-07-04 9d35ba657fa5e3add766405d76e3ff8c4dcd4ad4
fanli/src/main/java/com/yeshi/fanli/controller/admin/AppPageNotificationAdminController.java
@@ -9,6 +9,7 @@
import javax.annotation.Resource;
import com.yeshi.fanli.entity.accept.AdminAcceptData;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.yeshi.utils.JsonUtil;
@@ -51,7 +52,7 @@
    * @param out
    */
//   @RequestMapping(value = "saveAdd")
   public void saveAdd(String callback, AppPageNotification appPageNotification, PrintWriter out) {
   public void saveAdd(AdminAcceptData acceptData, String callback, AppPageNotification appPageNotification, PrintWriter out) {
      try {
         String content = appPageNotification.getContent();
         if (StringUtil.isNullOrEmpty(content) ) {
@@ -61,7 +62,7 @@
         
         AppPageNotificationTypeEnum type = appPageNotification.getType();
         if (type != null) {
            AppPageNotification old = appPageNotificationService.getAppPageNotificationByType(type.name());
            AppPageNotification old = appPageNotificationService.getAppPageNotificationByType(type.name(),acceptData.getSystem());
            if (old != null) {
               JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("已存在此类型"));
               return;
@@ -208,7 +209,7 @@
    * @param out
    */
   @RequestMapping(value = "query")
   public void query(String callback, Integer pageIndex, Integer pageSize, String key,
   public void query(AdminAcceptData acceptData, String callback, Integer pageIndex, Integer pageSize, String key,
          Integer show, Integer canClose,String version, String platform,  PrintWriter out) {
      if (pageIndex == null || pageIndex < 1) {
@@ -219,7 +220,7 @@
      try {
         List<AppPageNotification> list = appPageNotificationService.listQuery((pageIndex - 1) * pageSize, 
               pageSize, key, show, canClose);
               pageSize, key, show, canClose,acceptData.getSystem());
         if (list == null || list.size() == 0) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("暂无数据"));
@@ -246,7 +247,7 @@
            }
         }
         
         long count = appPageNotificationService.countQuery(key, show, canClose);
         long count = appPageNotificationService.countQuery(key, show, canClose,acceptData.getSystem());
         
         List<AppVersionInfo> versionList = null;
         if (!StringUtil.isNullOrEmpty(version) || !StringUtil.isNullOrEmpty(platform)) {
@@ -256,7 +257,7 @@
               if (appVersion != null)
                  versionList.add(appVersion);
            } else {
               List<AppVersionInfo> appVersionList = appVersionService.getAppVersionInfoListByPlatform(platform);
               List<AppVersionInfo> appVersionList = appVersionService.getAppVersionInfoListByPlatform(platform,acceptData.getSystem());
               if (appVersionList != null) {
                  versionList.addAll(appVersionList);
               }
@@ -428,14 +429,12 @@
         e.printStackTrace();
      }
   }
   /**
    * 设置版本
    *
    *  设置版本
    * @param callback
    * @param id
    * @param moveType
    * @param sex
    * @param versions
    * @param out
    */
   @RequestMapping(value = "setVersions")