| | |
| | |
|
| | | 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;
|
| | |
| | | * @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) ) {
|
| | |
| | |
|
| | | 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;
|
| | |
| | | * @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不能为空"));
|
| | |
| | | * @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) {
|
| | |
| | |
|
| | | 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("暂无数据"));
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | 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)) {
|
| | |
| | | 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);
|
| | | }
|
| | |
| | | * @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不能为空"));
|
| | |
| | | * @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不能为空"));
|
| | |
| | | * @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("请选择操作的数据"));
|
| | |
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | |
| | |
|
| | | /**
|
| | | * 设置版本
|
| | | * |
| | | * 设置版本
|
| | | * @param callback
|
| | | * @param id
|
| | | * @param moveType
|
| | | * @param sex
|
| | | * @param versions
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "setVersions")
|