Commit c9736f7f by 杨林龙

完成基本开发

1 parent 4482576a
...@@ -3,7 +3,7 @@ package com.glsx.controller; ...@@ -3,7 +3,7 @@ package com.glsx.controller;
import cn.com.glsx.openplatform.model.PlatformAd; import cn.com.glsx.openplatform.model.PlatformAd;
import cn.com.glsx.openplatform.service.AdMgrService; import cn.com.glsx.openplatform.service.AdMgrService;
import cn.com.glsx.openplatform.vo.R; import cn.com.glsx.openplatform.vo.R;
import com.github.pagehelper.Page; import cn.hutool.db.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.oreframework.web.ui.Pagination; import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -30,13 +30,8 @@ public class AdMgrController { ...@@ -30,13 +30,8 @@ public class AdMgrController {
@RequestMapping(value = "/getAdMgrList", method = RequestMethod.GET) @RequestMapping(value = "/getAdMgrList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public R getAdMgrList(Pagination pagination) { public R getAdMgrList(Page page) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 return adMgrService.getAdMgrList(page);
Page<PlatformAd> page = PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformAd> adMgrList = adMgrService.getAdMgrList();
return R.ok().putPageData(page, adMgrList);
} }
@RequestMapping(value = "/insertAd", method = RequestMethod.POST) @RequestMapping(value = "/insertAd", method = RequestMethod.POST)
......
...@@ -4,7 +4,7 @@ import cn.com.glsx.openplatform.model.PlatformApiCall; ...@@ -4,7 +4,7 @@ import cn.com.glsx.openplatform.model.PlatformApiCall;
import cn.com.glsx.openplatform.service.ApiCallMgrService; import cn.com.glsx.openplatform.service.ApiCallMgrService;
import cn.com.glsx.openplatform.vo.ApiCallVo; import cn.com.glsx.openplatform.vo.ApiCallVo;
import cn.com.glsx.openplatform.vo.R; import cn.com.glsx.openplatform.vo.R;
import com.github.pagehelper.Page; import cn.hutool.db.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.oreframework.web.ui.Pagination; import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger; import org.slf4j.Logger;
...@@ -31,12 +31,7 @@ public class ApiCallMgrController { ...@@ -31,12 +31,7 @@ public class ApiCallMgrController {
@RequestMapping(value = "/getApiCallMgrList", method = RequestMethod.GET) @RequestMapping(value = "/getApiCallMgrList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public R getApiCallMgrList(Pagination pagination, ApiCallVo apiCallVo) { public R getApiCallMgrList(Page page, ApiCallVo apiCallVo) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 return apiCallMgrService.getApiCallMgrList(page,apiCallVo);
Page<PlatformApiCall> page = PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformApiCall> apiMgrList = apiCallMgrService.getApiCallMgrList(apiCallVo);
return R.ok().putPageData(page, apiMgrList);
} }
} }
...@@ -3,9 +3,8 @@ package com.glsx.controller; ...@@ -3,9 +3,8 @@ package com.glsx.controller;
import cn.com.glsx.openplatform.model.PlatformApi; import cn.com.glsx.openplatform.model.PlatformApi;
import cn.com.glsx.openplatform.service.ApiMgrService; import cn.com.glsx.openplatform.service.ApiMgrService;
import cn.com.glsx.openplatform.vo.R; import cn.com.glsx.openplatform.vo.R;
import com.github.pagehelper.Page; import cn.hutool.db.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -30,13 +29,8 @@ public class ApiMgrController { ...@@ -30,13 +29,8 @@ public class ApiMgrController {
@RequestMapping(value = "/getApiMgrList", method = RequestMethod.GET) @RequestMapping(value = "/getApiMgrList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public R getApiMgrList(Pagination pagination) { public R getApiMgrList(Page page) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 return apiMgrService.getApiMgrList(page);
Page<PlatformApi> page = PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformApi> apiMgrList = apiMgrService.getApiMgrList();
return R.ok().putPageData(page, apiMgrList);
} }
@RequestMapping(value = "/startandstop", method = RequestMethod.GET) @RequestMapping(value = "/startandstop", method = RequestMethod.GET)
......
...@@ -3,9 +3,8 @@ package com.glsx.controller; ...@@ -3,9 +3,8 @@ package com.glsx.controller;
import cn.com.glsx.openplatform.model.PlatformCustomer; import cn.com.glsx.openplatform.model.PlatformCustomer;
import cn.com.glsx.openplatform.service.CustomerMgrService; import cn.com.glsx.openplatform.service.CustomerMgrService;
import cn.com.glsx.openplatform.vo.R; import cn.com.glsx.openplatform.vo.R;
import com.github.pagehelper.Page; import cn.hutool.db.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -30,13 +29,8 @@ public class CustomerMgrController { ...@@ -30,13 +29,8 @@ public class CustomerMgrController {
@RequestMapping(value = "/getCustomerMgrList", method = RequestMethod.GET) @RequestMapping(value = "/getCustomerMgrList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public R getCustomerMgrList(Pagination pagination) { public R getCustomerMgrList(Page page) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 return customerMgrService.getCustomerMgrList(page);
Page<PlatformCustomer> page = PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformCustomer> customerMgrList = customerMgrService.getCustomerMgrList();
return R.ok().putPageData(page, customerMgrList);
} }
@RequestMapping(value = "/reset", method = RequestMethod.GET) @RequestMapping(value = "/reset", method = RequestMethod.GET)
......
...@@ -3,13 +3,11 @@ package com.glsx.controller; ...@@ -3,13 +3,11 @@ package com.glsx.controller;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import cn.com.glsx.openplatform.model.PlatformDevice;
import cn.com.glsx.openplatform.service.DeviceMgrService; import cn.com.glsx.openplatform.service.DeviceMgrService;
import cn.com.glsx.openplatform.vo.DeviceVo; import cn.com.glsx.openplatform.vo.DeviceVo;
import cn.com.glsx.openplatform.vo.R; import cn.com.glsx.openplatform.vo.R;
import com.github.pagehelper.Page; import cn.hutool.db.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -32,14 +30,8 @@ public class DeviceMgrController { ...@@ -32,14 +30,8 @@ public class DeviceMgrController {
@RequestMapping(value = "/getDeviceMgrList", method = RequestMethod.GET) @RequestMapping(value = "/getDeviceMgrList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public R getDeviceMgrList(Pagination pagination, DeviceVo deviceVo) { public R getDeviceMgrList(Page page, DeviceVo deviceVo) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 return deviceMgrService.getDeviceMgrList(page,deviceVo);
Page<PlatformDevice> page = PageHelper.startPage(pagination.getCurrentPage(),
pagination.getPageSize(), true);
List<PlatformDevice> deviceMgrList = deviceMgrService.getDeviceMgrList(deviceVo);
return R.ok().putPageData(page, deviceMgrList);
} }
@RequestMapping(value = "/getDropDownOptions", method = RequestMethod.GET) @RequestMapping(value = "/getDropDownOptions", method = RequestMethod.GET)
......
...@@ -6,9 +6,8 @@ import cn.com.glsx.openplatform.model.PlatformUser; ...@@ -6,9 +6,8 @@ import cn.com.glsx.openplatform.model.PlatformUser;
import cn.com.glsx.openplatform.service.UserMgrService; import cn.com.glsx.openplatform.service.UserMgrService;
import cn.com.glsx.openplatform.vo.R; import cn.com.glsx.openplatform.vo.R;
import cn.com.glsx.openplatform.vo.UserVo; import cn.com.glsx.openplatform.vo.UserVo;
import com.github.pagehelper.Page; import cn.hutool.db.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -31,14 +30,8 @@ public class UserMgrController { ...@@ -31,14 +30,8 @@ public class UserMgrController {
@RequestMapping(value = "/getUserMgrList", method = RequestMethod.GET) @RequestMapping(value = "/getUserMgrList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public R getUserMgrList(Pagination pagination, UserVo userVo) { public R getUserMgrList(Page page, UserVo userVo) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面 return userMgrService.getUserMgrList(page, userVo);
Page<PlatformUser> page = PageHelper.startPage(pagination.getCurrentPage(),
pagination.getPageSize(), true);
List<PlatformUser> userMgrList = userMgrService.getUserMgrList(userVo);
return R.ok().putPageData(page, userMgrList);
} }
@RequestMapping(value = "/getDropDownOptions", method = RequestMethod.GET) @RequestMapping(value = "/getDropDownOptions", method = RequestMethod.GET)
......
...@@ -26,7 +26,7 @@ public class CORSFilter implements Filter { ...@@ -26,7 +26,7 @@ public class CORSFilter implements Filter {
LOGGER.info("当前访问来源是:{}", httpServletRequest.getHeader("Content-Type")); LOGGER.info("当前访问来源是:{}", httpServletRequest.getHeader("Content-Type"));
// 从列表中获取,可以将数据放入缓存 // 从列表中获取,可以将数据放入缓存
// String corsOriginList = PropertyConfigurer.getString("cors.origin.list.urls"); // String corsOriginList = PropertyConfigurer.getString("cors.origin.list.urls");
String corsOriginList = "http://192.168.2.68:8081/"; String corsOriginList = "http://192.168.2.68:8081/ http://192.168.2.106:8081/";
LOGGER.info("配置的来源:{}", corsOriginList); LOGGER.info("配置的来源:{}", corsOriginList);
if (StringUtils.isNotBlank(curOrigin) && corsOriginList.contains(curOrigin)) { if (StringUtils.isNotBlank(curOrigin) && corsOriginList.contains(curOrigin)) {
httpServletResponse.setHeader("Access-Control-Allow-Origin", curOrigin); httpServletResponse.setHeader("Access-Control-Allow-Origin", curOrigin);
......
...@@ -7,8 +7,8 @@ server.servlet.application-display-name=open-platform-admin ...@@ -7,8 +7,8 @@ server.servlet.application-display-name=open-platform-admin
logging.config=classpath:logback.xml logging.config=classpath:logback.xml
logging.path=/data/java_log/jetty/open-platform-admin/open-platform-admin.log logging.path=/data/java_log/jetty/open-platform-admin/open-platform-admin.log
#logging.level.com.glsx=DEBUG logging.level.com.glsx=DEBUG
logging.level.com.glsx=INFO #logging.level.com.glsx=INFO
ore.starter.class-name=Main ore.starter.class-name=Main
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!