admin
2020-07-04 64bd2204be459b47e008b79073a143684140ff24
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;
@@ -127,7 +128,7 @@
    * @param out
    */
   @RequestMapping(value = "saveModify")
   public void saveModify(String callback, AppPageNotification appPageNotification, PrintWriter out) {
   public void saveModify(AdminAcceptData acceptData,String callback, AppPageNotification appPageNotification, PrintWriter out) {
      try {
         if (appPageNotification.getId() == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
@@ -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);
               }
@@ -315,7 +316,7 @@
    * @param out
    */
   @RequestMapping(value = "switchShutOff")
   public void switchShutOff(String callback, Long id,  PrintWriter out) {
   public void switchShutOff(AdminAcceptData acceptData,String callback, Long id,  PrintWriter out) {
      try {
         if (id == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
@@ -366,7 +367,7 @@
    * @param out
    */
   @RequestMapping(value = "switchState")
   public void switchState(String callback, Long id, PrintWriter out) {
   public void switchState(AdminAcceptData acceptData,String callback, Long id, PrintWriter out) {
      try {
         if (id == null) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("ID不能为空"));
@@ -404,7 +405,7 @@
    * @param out
    */
   //@RequestMapping(value = "delete")
   public void delete(String callback, String idArray, PrintWriter out) {
   public void delete(AdminAcceptData acceptData,String callback, String idArray, PrintWriter out) {
      try {
         if (StringUtil.isNullOrEmpty(idArray)) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("请选择操作的数据"));
@@ -428,14 +429,12 @@
         e.printStackTrace();
      }
   }
   /**
    * 设置版本
    *
    *  设置版本
    * @param callback
    * @param id
    * @param moveType
    * @param sex
    * @param versions
    * @param out
    */
   @RequestMapping(value = "setVersions")