Commit 4acbca30 by 杨林龙

完成基本开发

1 parent b6ba5223
Showing 47 changed files with 1058 additions and 143 deletions
......@@ -7,6 +7,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* @author deployer name
......@@ -19,6 +20,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
@EnableAsync
@SpringBootApplication
@ServletComponentScan
@EnableSwagger2
public class Main extends AbsOreBootStarter {
@Override
......
package com.glsx.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.basePackage("com.glsx.controller"))
.paths(PathSelectors.any())
.build()
.apiInfo(apiEndPointsInfo())
.useDefaultResponseMessages(false);
}
private ApiInfo apiEndPointsInfo() {
return new ApiInfoBuilder().title("Sys REST API")
.description("接口描述")
.contact(new Contact("Zhangln", "https://code.aliyun.com/yidingv3/kwafoo", "zhangln@zhidianfan.com"))
.license("edingyi")
.licenseUrl("http://www.edingyi.com")
.version("V1")
.build();
}
}
package com.glsx.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformAd;
import com.glsx.model.PlatformApiCall;
import com.glsx.service.AdMgrService;
import com.glsx.vo.R;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
import org.slf4j.Logger;
......@@ -11,6 +18,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api
@RestController
@RequestMapping(value = "/admgr")
public class AdMgrController {
......@@ -22,11 +32,45 @@ public class AdMgrController {
@Autowired
private AdMgrService adMgrService;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@RequestMapping(value = "/getAdMgrList", method = RequestMethod.GET)
@ResponseBody
public R getAdMgrList(Pagination pagination) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
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)
@ResponseBody
public R insertAd(PlatformAd ad) {
int num = adMgrService.insertAd(ad);
if (num == 0) {
return R.error("新增广告失败");
}
return R.ok("新增广告成功");
}
@RequestMapping(value = "/updateAd", method = RequestMethod.POST)
@ResponseBody
public R updateAd(PlatformAd ad) {
int num = adMgrService.updateAd(ad);
if (num == 0) {
return R.error("编辑广告失败");
}
return R.ok("编辑广告成功");
}
@RequestMapping(value = "/startandstop", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Object> getAdMgrList() {
LOGGER.info("获取金融产品类型和货款期限的下拉选项 start");
ResponseEntity<Object> responseEntity = new ResponseEntity<>();
return responseEntity;
public R startandstop(int id, int status) {
int num = adMgrService.startandstop(id, status);
if (num == 0) {
return R.error("修改广告投放状态失败");
}
return R.ok("修改广告投放状态成功");
}
}
package com.glsx.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformApi;
import com.glsx.model.PlatformApiCall;
import com.glsx.service.ApiCallMgrService;
import com.glsx.vo.ApiCallVo;
import com.glsx.vo.R;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
import org.slf4j.Logger;
......@@ -11,6 +19,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api
@RestController
@RequestMapping(value = "/apicallmgr")
public class ApiCallMgrController {
......@@ -22,11 +33,14 @@ public class ApiCallMgrController {
@Autowired
private ApiCallMgrService apiCallMgrService;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@RequestMapping(value = "/getApiCallMgrList", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Object> getApiCallMgrList() {
LOGGER.info("获取金融产品类型和货款期限的下拉选项 start");
ResponseEntity<Object> responseEntity = new ResponseEntity<>();
return responseEntity;
public R getApiCallMgrList(Pagination pagination, ApiCallVo apiCallVo) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
Page<PlatformApiCall> page = PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformApiCall> apiMgrList = apiCallMgrService.getApiCallMgrList(apiCallVo);
return R.ok().putPageData(page, apiMgrList);
}
}
package com.glsx.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformApi;
import com.glsx.model.PlatformCustomer;
import com.glsx.service.ApiMgrService;
import com.glsx.vo.R;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
import org.slf4j.Logger;
......@@ -11,6 +18,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api
@RestController
@RequestMapping(value = "/apimgr")
public class ApiMgrController {
......@@ -22,11 +32,24 @@ public class ApiMgrController {
@Autowired
private ApiMgrService apiMgrService;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@RequestMapping(value = "/getApiMgrList", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Object> getApiMgrList() {
LOGGER.info("获取金融产品类型和货款期限的下拉选项 start");
ResponseEntity<Object> responseEntity = new ResponseEntity<>();
return responseEntity;
public R getApiMgrList(Pagination pagination) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
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)
@ResponseBody
public R startAndStop(int id, int status) {
int num = apiMgrService.startAndStop(id, status);
if (num == 0) {
return R.error("API使用状态修改失败");
}
return R.ok("API使用状态修改成功");
}
}
package com.glsx.controller;
import com.glsx.service.AppDownloadMgrService;
import com.glsx.vo.R;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
import org.slf4j.Logger;
......@@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
@Api
@RestController
@RequestMapping(value = "/appdownloadmgr")
public class AppDownloadMgrController {
......@@ -24,9 +27,7 @@ public class AppDownloadMgrController {
@RequestMapping(value = "/list", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<Object> getAppDownloadMgrList() {
LOGGER.info("获取金融产品类型和货款期限的下拉选项 start");
ResponseEntity<Object> responseEntity = new ResponseEntity<>();
return responseEntity;
public R getAppDownloadMgrList() {
return R.ok();
}
}
package com.glsx.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformCustomer;
import com.glsx.model.PlatformUser;
import com.glsx.service.CustomerMgrService;
import com.glsx.vo.R;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
import org.slf4j.Logger;
......@@ -11,6 +18,9 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api
@RestController
@RequestMapping(value = "/customermgr")
public class CustomerMgrController {
......@@ -22,12 +32,34 @@ public class CustomerMgrController {
@Autowired
private CustomerMgrService customerMgrService;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@RequestMapping(value = "/getCustomerMgrList", method = RequestMethod.GET)
@ResponseBody
public R getCustomerMgrList(Pagination pagination) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
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)
@ResponseBody
public ResponseEntity<Object> getCustomerMgrList() {
LOGGER.info("获取金融产品类型和货款期限的下拉选项 start");
ResponseEntity<Object> responseEntity = new ResponseEntity<>();
public R reset(int id) {
int num = customerMgrService.reset(id);
if (num == 0) {
return R.error("重置密码失败");
}
return R.ok("重置的密码成功");
}
return responseEntity;
@RequestMapping(value = "/startandstop", method = RequestMethod.GET)
@ResponseBody
public R startAndStop(int id, int status) {
int num = customerMgrService.startAndStop(id, status);
if (num == 0) {
return R.error("账号状态修改失败");
}
return R.ok("账号状态修改成功");
}
}
package com.glsx.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformCustomer;
import com.glsx.model.PlatformDevice;
import com.glsx.service.DeviceMgrService;
import com.glsx.vo.DeviceVo;
import com.glsx.vo.R;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
import org.slf4j.Logger;
......@@ -11,6 +19,10 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
@Api
@RestController
@RequestMapping(value = "/devicemgr")
public class DeviceMgrController {
......@@ -22,11 +34,27 @@ public class DeviceMgrController {
@Autowired
private DeviceMgrService deviceMgrService;
@RequestMapping(value = "/list", method = RequestMethod.GET)
@RequestMapping(value = "/getDeviceMgrList", method = RequestMethod.GET)
@ResponseBody
public R getDeviceMgrList(Pagination pagination, DeviceVo deviceVo) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
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)
@ResponseBody
public ResponseEntity<Object> getDeviceMgrList() {
LOGGER.info("获取金融产品类型和货款期限的下拉选项 start");
ResponseEntity<Object> responseEntity = new ResponseEntity<>();
return responseEntity;
public R getDropDownOptions() {
HashMap<String, List<String>> hashMap = new HashMap<>();
List<String> customerNameList = deviceMgrService.getCustomerNameList();
List<String> deviceTypeList = deviceMgrService.getDeviceTypeList();
hashMap.put("customerNameList", customerNameList);
hashMap.put("deviceTypeList", deviceTypeList);
return R.ok().data(hashMap);
}
}
package com.glsx.controller;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformUser;
import com.glsx.service.*;
import com.glsx.vo.R;
import com.glsx.vo.UserVo;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.ui.ModelMap;
import com.glsx.config.SystemProperty;
import org.springframework.web.bind.annotation.RestController;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author deployer name
......@@ -15,21 +28,99 @@ import com.glsx.config.SystemProperty;
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2017
*/
@Controller
@Api
@RestController
@RequestMapping(value = "/index")
public class IndexController {
/**
* 日志
*/
private final static Logger LOGGER = LoggerFactory.getLogger(IndexController.class);
@Autowired
private CustomerMgrService customerMgrService;
@Autowired
private DeviceMgrService deviceMgrService;
@Autowired
private UserMgrService userMgrService;
@Autowired
private ApiCallMgrService apiCallMgrService;
@Autowired
private SystemProperty systemProperty;
private AppDownloadMgrService appDownloadMgrService;
@RequestMapping(value = "/getStatisticData", method = RequestMethod.GET)
@ResponseBody
@RequestMapping("home")
public String home() {
return "hello, welcome to home!" + systemProperty.getName();
public R getStatisticData() {
Map<String, Integer> hashMap = new HashMap<>();
int customerCount = customerMgrService.getCustomerCount();
int deviceCount = deviceMgrService.getDeviceCount();
int userCount = userMgrService.getUserCount();
int apiCallCount = apiCallMgrService.getApiCallCount();
hashMap.put("customerCount", customerCount);
hashMap.put("deviceCount", deviceCount);
hashMap.put("userCount", userCount);
hashMap.put("apiCallCount", apiCallCount);
return R.ok().data(hashMap);
}
@RequestMapping("index")
public String index(ModelMap map) {
map.addAttribute("name", systemProperty.getName());
return "index";
@RequestMapping(value = "/getGraphData", method = RequestMethod.GET)
@ResponseBody
public R getGraphData() {
Map<String, Map<String, Integer>> hashMap = new HashMap<>();
Map<String, Integer> deviceGraphData = deviceMgrService.getDeviceGraphData();
Map<String, Integer> apiCallGraphData = apiCallMgrService.getApiCallGraphData();
hashMap.put("deviceGraphData", deviceGraphData);
hashMap.put("apiCallGraphData", apiCallGraphData);
return R.ok().data(hashMap);
}
@RequestMapping(value = "/getPolylineData", method = RequestMethod.GET)
@ResponseBody
public R getPolylineData() {
HashMap<String, Integer> hashMap = new HashMap<>();
int customerCount = customerMgrService.getCustomerCount();
int deviceCount = deviceMgrService.getDeviceCount();
int userCount = userMgrService.getUserCount();
int apiCallCount = apiCallMgrService.getApiCallCount();
hashMap.put("customerCount", customerCount);
hashMap.put("deviceCount", deviceCount);
hashMap.put("userCount", userCount);
hashMap.put("apiCallCount", apiCallCount);
return R.ok().data(hashMap);
}
@RequestMapping(value = "/getStatisticDataForUserConsole", method = RequestMethod.GET)
@ResponseBody
public R getStatisticDataForUserConsole(String customerName) {
Map<String, Integer> hashMap = new HashMap<>();
int deviceCountAuth = deviceMgrService.getDeviceCountAuth(customerName);
int userCountAuth = userMgrService.getUserCountAuth(customerName);
int apiCallCountAuth = appDownloadMgrService.getApiCallCountAuth(customerName);
hashMap.put("deviceCount", deviceCountAuth);
hashMap.put("userCount", userCountAuth);
hashMap.put("apiCallCount", apiCallCountAuth);
return R.ok().data(hashMap);
}
}
......@@ -4,6 +4,9 @@ import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.glsx.model.PlatformUser;
import com.glsx.service.UserMgrService;
import com.glsx.vo.R;
import com.glsx.vo.UserVo;
import io.swagger.annotations.Api;
import org.oreframework.web.ui.Pagination;
import org.oreframework.web.ui.ResponseEntity;
import org.oreframework.web.ui.ResultEntity;
......@@ -17,6 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Api
@RestController
@RequestMapping(value = "/usermgr")
public class UserMgrController {
......@@ -30,35 +34,19 @@ public class UserMgrController {
@RequestMapping(value = "/getUserMgrList", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<PlatformUser> getUserMgrList(Pagination pagination) {
ResponseEntity<PlatformUser> responseEntity = new ResponseEntity<>();
public R getUserMgrList(Pagination pagination, UserVo userVo) {
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
Page<PlatformUser> page = PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformUser> datasyncAnjVerifyAccountsList = userMgrService.getUserMgrList();
List<PlatformUser> userMgrList = userMgrService.getUserMgrList(userVo);
long total = ((Page<PlatformUser>) datasyncAnjVerifyAccountsList).getTotal();
responseEntity.setData(datasyncAnjVerifyAccountsList);
responseEntity.setRecordsTotal(total);
responseEntity.setRecordsFiltered(total);
return responseEntity;
return R.ok().putPageData(page, userMgrList);
}
@RequestMapping(value = "/reset", method = RequestMethod.GET)
@RequestMapping(value = "/getDropDownOptions", method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<PlatformUser> reset(Pagination pagination) {
ResponseEntity<PlatformUser> responseEntity = new ResponseEntity<>();
//PageHelper注入分页和要分页的查询之前不能有其它查询,不然分页到第一个查询上面
PageHelper.startPage(pagination.getCurrentPage(), pagination.getPageSize(), true);
List<PlatformUser> datasyncAnjVerifyAccountsList = userMgrService.getUserMgrList();
long total = ((Page<PlatformUser>) datasyncAnjVerifyAccountsList).getTotal();
responseEntity.setData(datasyncAnjVerifyAccountsList);
responseEntity.setRecordsTotal(total);
responseEntity.setRecordsFiltered(total);
return responseEntity;
public R getDropDownOptions() {
List<String> customerNameList = userMgrService.getCustomerNameList();
return R.ok().data(customerNameList);
}
}
......@@ -34,4 +34,6 @@ public interface PlatformAdMapper {
int updateBatch(List<PlatformAd> list);
int updateBatchSelective(List<PlatformAd> list);
List<PlatformAd> getAdMgrList();
}
\ No newline at end of file
......@@ -29,6 +29,13 @@
from t_platform_ad
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getAdMgrList" resultType="com.glsx.model.PlatformAd">
select
<include refid="Base_Column_List" />
from t_platform_ad
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_ad
......
......@@ -2,9 +2,11 @@ package com.glsx.mapper;
import com.glsx.model.PlatformApiCall;
import com.glsx.vo.ApiCallVo;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* <p>Description:
......@@ -34,4 +36,10 @@ public interface PlatformApiCallMapper {
int updateBatch(List<PlatformApiCall> list);
int updateBatchSelective(List<PlatformApiCall> list);
List<PlatformApiCall> getApiCallMgrList(ApiCallVo apiCallVo);
int getApiCallCount();
Map<String, Integer> getApiCallGraphData();
}
\ No newline at end of file
......@@ -6,7 +6,9 @@
<!--@Table t_platform_api_call-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="customer_id" jdbcType="INTEGER" property="customerId" />
<result column="customer_name" jdbcType="INTEGER" property="customerName" />
<result column="api_id" jdbcType="INTEGER" property="apiId" />
<result column="api_name" jdbcType="INTEGER" property="apiName" />
<result column="call_result" jdbcType="TINYINT" property="callResult" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_by" jdbcType="INTEGER" property="createBy" />
......@@ -23,6 +25,43 @@
from t_platform_api_call
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getApiCallMgrList" resultMap="BaseResultMap">
select
a.id,
b.customer_name,
c.api_name,
a.call_result,
a.create_time,
a.create_by,
a.remark
from t_platform_api_call a
left join t_platform_customer b
on a.customer_id = b.id
left join t_platform_api c
on a.api_id = c.id
where 1=1
<if test="apiCallVo.accessStartTime != null ">
and create_time &gt;= apiCallVo.accessStartTime
</if>
<if test="apiCallVo.accessEndTime != null ">
and create_time &lt;= apiCallVo.accessEndTime
</if>
</select>
<select id="getApiCallCount" resultType="java.lang.Integer">
select count(1)
from t_platform_api_call
</select>
<select id="getApiCallGraphData" resultType="java.util.Map">
select b.api_classification ,count(a.id)
from t_platform_api_call a
left join t_platform_api b
on a.api_id = b.id
group by b.api_classification
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_api_call
......
......@@ -33,4 +33,6 @@ public interface PlatformApiMapper {
int updateBatch(List<PlatformApi> list);
int updateBatchSelective(List<PlatformApi> list);
List<PlatformApi> getApiMgrList();
}
\ No newline at end of file
......@@ -29,6 +29,13 @@
from t_platform_api
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getApiMgrList" resultType="com.glsx.model.PlatformApi">
select
<include refid="Base_Column_List" />
from t_platform_api
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_api
......
......@@ -33,4 +33,6 @@ public interface PlatformAppDownloadMapper {
int updateBatch(List<PlatformAppDownload> list);
int updateBatchSelective(List<PlatformAppDownload> list);
int getApiCallCountAuth(String customerName);
}
\ No newline at end of file
......@@ -21,6 +21,15 @@
from t_platform_app_download
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getApiCallCountAuth" resultType="java.lang.Integer">
select count(1)
from t_platform_app_download a
left join t_platform_customer b
on a.customer_id = b.id
where b.customer_name = #{customerName,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_app_download
......
......@@ -33,4 +33,10 @@ public interface PlatformCustomerMapper {
int updateBatch(List<PlatformCustomer> list);
int updateBatchSelective(List<PlatformCustomer> list);
List<PlatformCustomer> getCustomerMgrList();
List<String> getCustomerNameList();
int getCustomerCount();
}
\ No newline at end of file
......@@ -36,6 +36,24 @@
from t_platform_customer
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getCustomerMgrList" resultType="com.glsx.model.PlatformCustomer">
select
<include refid="Base_Column_List" />
from t_platform_customer
</select>
<select id="getCustomerNameList" resultType="java.lang.String">
select distinct
customer_name
from t_platform_customer
</select>
<select id="getCustomerCount" resultType="java.lang.Integer">
select count(1)
from t_platform_customer
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_customer
......
package com.glsx.mapper;
import com.glsx.model.PlatformDevice;
import com.glsx.vo.DeviceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* <p>Description:
......@@ -33,4 +36,14 @@ public interface PlatformDeviceMapper {
int updateBatch(List<PlatformDevice> list);
int updateBatchSelective(List<PlatformDevice> list);
List<PlatformDevice> getDeviceMgrList(DeviceVo deviceVo);
List<String> getDeviceTypeList();
int getDeviceCount();
Map<String, Integer> getDeviceGraphData();
int getDeviceCountAuth(@Param("customerName") String customerName);
}
\ No newline at end of file
......@@ -8,6 +8,7 @@
<result column="device_sn" jdbcType="VARCHAR" property="deviceSn" />
<result column="device_type" jdbcType="VARCHAR" property="deviceType" />
<result column="customer_id" jdbcType="INTEGER" property="customerId" />
<result column="customer_name" jdbcType="INTEGER" property="customerName" />
<result column="activat_time" jdbcType="TIMESTAMP" property="activatTime" />
<result column="status" jdbcType="TINYINT" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -28,6 +29,65 @@
from t_platform_device
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getDeviceMgrList" resultMap="BaseResultMap">
select
a.id,
a.device_sn,
a.device_type,
b.customer_name,
a.activat_time,
a.`status`,
a.create_time,
a.update_time,
a.create_by,
a.update_by,
a.remark
from t_platform_device a
left join t_platform_customer b
on a.customer_id = b.id
where 1 = 1
<if test="deviceVo.customerName != null and deviceVo.customerName != '' ">
and b.customer_name = #{deviceVo.customerName,jdbcType=VARCHAR}
</if>
<if test="deviceVo.deviceType != null and deviceVo.deviceType != '' ">
and a.device_type = #{deviceVo.deviceType,jdbcType=VARCHAR}
</if>
<if test="deviceVo.activatStartTime != null and deviceVo.activatStartTime != '' ">
and a.create_time &gt;= apiCallVo.accessStartTime
</if>
<if test="deviceVo.activatEndTime != null and deviceVo.activatEndTime != '' ">
and a.create_time &lt;= apiCallVo.accessEndTime
</if>
</select>
<select id="getDeviceTypeList" resultType="java.lang.String">
select distinct
device_type
from t_platform_device
</select>
<select id="getDeviceCount" resultType="java.lang.Integer">
select count(1)
from t_platform_device
</select>
<select id="getDeviceGraphData" resultType="java.util.Map">
select
device_type,
count(id)
from t_platform_device
group by device_type
</select>
<select id="getDeviceCountAuth" resultType="java.lang.Integer">
select count(1)
from t_platform_device a
left join t_platform_customer b
on a.customer_id = b.id
where b.customer_name = #{customerName,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_device
......
package com.glsx.mapper;
import com.glsx.model.PlatformUser;
import com.glsx.vo.UserVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -34,5 +36,9 @@ public interface PlatformUserMapper {
int updateBatchSelective(List<PlatformUser> list);
List<PlatformUser> getUserMgrList();
List<PlatformUser> getUserMgrList(UserVo userVo);
int getUserCount();
int getUserCountAuth(@Param("customerName") String customerName);
}
\ No newline at end of file
......@@ -11,6 +11,7 @@
<result column="province" jdbcType="INTEGER" property="province" />
<result column="city" jdbcType="INTEGER" property="city" />
<result column="customer_id" jdbcType="INTEGER" property="customerId" />
<result column="customer_name" jdbcType="INTEGER" property="customerName" />
<result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
<result column="app_account_id" jdbcType="INTEGER" property="appAccountId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -32,12 +33,50 @@
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getUserMgrList" resultType="com.glsx.model.PlatformUser">
<select id="getUserMgrList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
a.id,
a.nickname,
a.contact_number,
a.wechat_id,
a.province,
a.city,
b.customer_name,
a.last_login_time,
a.app_account_id,
a.create_time,
a.update_time,
a.create_by,
a.update_by,
a.remark
from t_platform_user a
left join t_platform_customer b
on a.customer_id = b.id
where 1 = 1
<if test="userVo.customerName != null and userVo.customerName != '' ">
and b.customer_name = #{userVo.customerName,jdbcType=VARCHAR}
</if>
<if test="userVo.registerStartTime != null and userVo.registerStartTime != '' ">
and a.create_time &gt;= userVo.registerStartTime
</if>
<if test="userVo.registerEndTime != null and userVo.registerEndTime != '' ">
and a.create_time &lt;= userVo.registerEndTime
</if>
</select>
<select id="getUserCount" resultType="java.lang.Integer">
select count(1)
from t_platform_user
</select>
<select id="getUserCountAuth" resultType="java.lang.Integer">
select count(1)
from t_platform_user a
left join t_platform_customer b
on a.customer_id = b.id
where b.customer_name = #{customerName,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
<!--@mbg.generated-->
delete from t_platform_user
......
......@@ -48,7 +48,7 @@ public class PlatformAd implements Serializable {
/**
* 是否上架 0 下架 1 上架
*/
private Byte status;
private Integer status;
/**
* 创建时间 添加时间
......@@ -123,11 +123,11 @@ public class PlatformAd implements Serializable {
this.interfaceUrl = interfaceUrl;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
......
......@@ -23,7 +23,7 @@ public class PlatformApi implements Serializable {
/**
* API分类 1 授权管理 2 设备管理 3 数据服务
*/
private Byte apiClassification;
private Integer apiClassification;
/**
* API名称
......@@ -33,7 +33,7 @@ public class PlatformApi implements Serializable {
/**
* 请求方式 1 GET 2 POST
*/
private Byte requestMethod;
private Integer requestMethod;
/**
* API接口
......@@ -48,7 +48,7 @@ public class PlatformApi implements Serializable {
/**
* 状态 0 停用 1 可用
*/
private Byte status;
private Integer status;
/**
* 创建时间
......@@ -83,11 +83,11 @@ public class PlatformApi implements Serializable {
this.id = id;
}
public Byte getApiClassification() {
public Integer getApiClassification() {
return apiClassification;
}
public void setApiClassification(Byte apiClassification) {
public void setApiClassification(Integer apiClassification) {
this.apiClassification = apiClassification;
}
......@@ -99,11 +99,11 @@ public class PlatformApi implements Serializable {
this.apiName = apiName;
}
public Byte getRequestMethod() {
public Integer getRequestMethod() {
return requestMethod;
}
public void setRequestMethod(Byte requestMethod) {
public void setRequestMethod(Integer requestMethod) {
this.requestMethod = requestMethod;
}
......@@ -123,11 +123,11 @@ public class PlatformApi implements Serializable {
this.description = description;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
......
......@@ -26,14 +26,24 @@ public class PlatformApiCall implements Serializable {
private Integer customerId;
/**
* 客户名称
*/
private String customerName;
/**
* 调用API id t_platform_api 的id
*/
private Integer apiId;
/**
* API名称
*/
private String apiName;
/**
* 调用结果 0 失败 1 成功
*/
private Byte callResult;
private Integer callResult;
/**
* 创建时间 访问时间
......@@ -74,11 +84,11 @@ public class PlatformApiCall implements Serializable {
this.apiId = apiId;
}
public Byte getCallResult() {
public Integer getCallResult() {
return callResult;
}
public void setCallResult(Byte callResult) {
public void setCallResult(Integer callResult) {
this.callResult = callResult;
}
......@@ -106,20 +116,34 @@ public class PlatformApiCall implements Serializable {
this.remark = remark;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getApiName() {
return apiName;
}
public void setApiName(String apiName) {
this.apiName = apiName;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", customerId=").append(customerId);
sb.append(", apiId=").append(apiId);
sb.append(", callResult=").append(callResult);
sb.append(", createTime=").append(createTime);
sb.append(", createBy=").append(createBy);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
return "PlatformApiCall{" +
"id=" + id +
", customerId=" + customerId +
", customerName='" + customerName + '\'' +
", apiId=" + apiId +
", apiName='" + apiName + '\'' +
", callResult=" + callResult +
", createTime=" + createTime +
", createBy=" + createBy +
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -63,7 +63,7 @@ public class PlatformCustomer implements Serializable {
/**
* 账号状态 0 停用 1 正常 2 待审核 3 审核未通过
*/
private Byte status;
private Integer status;
/**
* 公钥
......@@ -177,11 +177,11 @@ public class PlatformCustomer implements Serializable {
this.address = address;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
......
......@@ -36,6 +36,11 @@ public class PlatformDevice implements Serializable {
private Integer customerId;
/**
* 客户名称
*/
private String customerName;
/**
* 激活时间
*/
private Date activatTime;
......@@ -43,7 +48,7 @@ public class PlatformDevice implements Serializable {
/**
* 设备状态 0 异常 1 正常
*/
private Byte status;
private Integer status;
/**
* 创建时间
......@@ -110,11 +115,11 @@ public class PlatformDevice implements Serializable {
this.activatTime = activatTime;
}
public Byte getStatus() {
public Integer getStatus() {
return status;
}
public void setStatus(Byte status) {
public void setStatus(Integer status) {
this.status = status;
}
......@@ -158,24 +163,29 @@ public class PlatformDevice implements Serializable {
this.remark = remark;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", deviceSn=").append(deviceSn);
sb.append(", deviceType=").append(deviceType);
sb.append(", customerId=").append(customerId);
sb.append(", activatTime=").append(activatTime);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", createBy=").append(createBy);
sb.append(", updateBy=").append(updateBy);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
return "PlatformDevice{" +
"id=" + id +
", deviceSn='" + deviceSn + '\'' +
", deviceType='" + deviceType + '\'' +
", customerId=" + customerId +
", customerName='" + customerName + '\'' +
", activatTime=" + activatTime +
", status=" + status +
", createTime=" + createTime +
", updateTime=" + updateTime +
", createBy=" + createBy +
", updateBy=" + updateBy +
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
......@@ -51,6 +51,11 @@ public class PlatformUser implements Serializable {
private Integer customerId;
/**
* 客户名称
*/
private String customerName;
/**
* 最后登录时间
*/
private Date lastLoginTime;
......@@ -197,27 +202,32 @@ public class PlatformUser implements Serializable {
this.remark = remark;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", nickname=").append(nickname);
sb.append(", contactNumber=").append(contactNumber);
sb.append(", wechatId=").append(wechatId);
sb.append(", province=").append(province);
sb.append(", city=").append(city);
sb.append(", customerId=").append(customerId);
sb.append(", lastLoginTime=").append(lastLoginTime);
sb.append(", appAccountId=").append(appAccountId);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", createBy=").append(createBy);
sb.append(", updateBy=").append(updateBy);
sb.append(", remark=").append(remark);
sb.append("]");
return sb.toString();
return "PlatformUser{" +
"id=" + id +
", nickname='" + nickname + '\'' +
", contactNumber='" + contactNumber + '\'' +
", wechatId='" + wechatId + '\'' +
", province=" + province +
", city=" + city +
", customerId=" + customerId +
", customerName='" + customerName + '\'' +
", lastLoginTime=" + lastLoginTime +
", appAccountId=" + appAccountId +
", createTime=" + createTime +
", updateTime=" + updateTime +
", createBy=" + createBy +
", updateBy=" + updateBy +
", remark='" + remark + '\'' +
'}';
}
}
\ No newline at end of file
package com.glsx.service;
import com.glsx.model.PlatformAd;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public interface AdMgrService {
List<PlatformAd> getAdMgrList();
int insertAd(PlatformAd ad);
int updateAd(PlatformAd ad);
int startandstop(int id, int status);
}
package com.glsx.service;
import com.glsx.model.PlatformApiCall;
import com.glsx.vo.ApiCallVo;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public interface ApiCallMgrService {
List<PlatformApiCall> getApiCallMgrList(ApiCallVo apiCallVo);
int getApiCallCount();
Map<String, Integer> getApiCallGraphData();
}
package com.glsx.service;
import com.glsx.model.PlatformApi;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public interface ApiMgrService {
List<PlatformApi> getApiMgrList();
int startAndStop(int id, int status);
}
......@@ -4,4 +4,5 @@ import org.springframework.stereotype.Service;
@Service
public interface AppDownloadMgrService {
int getApiCallCountAuth(String customerName);
}
package com.glsx.service;
import com.glsx.model.PlatformCustomer;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public interface CustomerMgrService {
List<PlatformCustomer> getCustomerMgrList();
int reset(int id);
int startAndStop(int id, int status);
int getCustomerCount();
}
package com.glsx.service;
import com.glsx.model.PlatformDevice;
import com.glsx.vo.DeviceVo;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
@Service
public interface DeviceMgrService {
List<PlatformDevice> getDeviceMgrList(DeviceVo deviceVo);
List<String> getCustomerNameList();
List<String> getDeviceTypeList();
int getDeviceCount();
Map<String, Integer> getDeviceGraphData();
int getDeviceCountAuth(String customerName);
}
package com.glsx.service;
import com.glsx.model.PlatformUser;
import com.glsx.vo.UserVo;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -8,5 +9,13 @@ import java.util.List;
@Service
public interface UserMgrService {
List<PlatformUser> getUserMgrList();
List<PlatformUser> getUserMgrList(UserVo userVo);
List<String> getCustomerNameList();
int getUserCount();
int getUserCountAuth(String customerName);
}
package com.glsx.service.impl;
import com.glsx.mapper.PlatformAdMapper;
import com.glsx.model.PlatformAd;
import com.glsx.service.AdMgrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.util.List;
public class AdMgrServiceImpl implements AdMgrService {
/**
......@@ -15,4 +17,27 @@ public class AdMgrServiceImpl implements AdMgrService {
@Resource
private PlatformAdMapper adMapper;
@Override
public List<PlatformAd> getAdMgrList() {
return adMapper.getAdMgrList();
}
@Override
public int insertAd(PlatformAd ad) {
return adMapper.insert(ad);
}
@Override
public int updateAd(PlatformAd ad) {
return adMapper.updateByPrimaryKeySelective(ad);
}
@Override
public int startandstop(int id, int status) {
PlatformAd ad = new PlatformAd();
ad.setId(id);
ad.setStatus(status);
return adMapper.updateByPrimaryKeySelective(ad);
}
}
......@@ -2,11 +2,15 @@ package com.glsx.service.impl;
import com.glsx.mapper.PlatformApiCallMapper;
import com.glsx.mapper.PlatformApiMapper;
import com.glsx.model.PlatformApiCall;
import com.glsx.service.ApiCallMgrService;
import com.glsx.vo.ApiCallVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
public class ApiCallMgrServiceImpl implements ApiCallMgrService {
/**
......@@ -16,4 +20,19 @@ public class ApiCallMgrServiceImpl implements ApiCallMgrService {
@Resource
private PlatformApiCallMapper apiCallMapper;
@Override
public List<PlatformApiCall> getApiCallMgrList(ApiCallVo apiCallVo) {
return apiCallMapper.getApiCallMgrList(apiCallVo);
}
@Override
public int getApiCallCount() {
return apiCallMapper.getApiCallCount();
}
@Override
public Map<String, Integer> getApiCallGraphData() {
return apiCallMapper.getApiCallGraphData();
}
}
......@@ -2,11 +2,14 @@ package com.glsx.service.impl;
import com.glsx.mapper.PlatformApiMapper;
import com.glsx.mapper.PlatformAppDownloadMapper;
import com.glsx.model.PlatformApi;
import com.glsx.model.PlatformCustomer;
import com.glsx.service.ApiMgrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.util.List;
public class ApiMgrServiceImpl implements ApiMgrService {
/**
......@@ -16,4 +19,17 @@ public class ApiMgrServiceImpl implements ApiMgrService {
@Resource
private PlatformApiMapper apiMapper;
@Override
public List<PlatformApi> getApiMgrList() {
return apiMapper.getApiMgrList();
}
@Override
public int startAndStop(int id, int status) {
PlatformApi api = new PlatformApi();
api.setId(id);
api.setStatus(status);
return apiMapper.updateByPrimaryKeySelective(api);
}
}
......@@ -16,4 +16,9 @@ public class AppDownloadMgrServiceImpl implements AppDownloadMgrService {
@Resource
private PlatformAppDownloadMapper appDownloadMapper;
@Override
public int getApiCallCountAuth(String customerName) {
return appDownloadMapper.getApiCallCountAuth(customerName);
}
}
......@@ -2,11 +2,13 @@ package com.glsx.service.impl;
import com.glsx.mapper.PlatformCustomerMapper;
import com.glsx.mapper.PlatformDeviceMapper;
import com.glsx.model.PlatformCustomer;
import com.glsx.service.CustomerMgrService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.util.List;
public class CustomerMgrServiceImpl implements CustomerMgrService {
/**
......@@ -16,4 +18,30 @@ public class CustomerMgrServiceImpl implements CustomerMgrService {
@Resource
private PlatformCustomerMapper customerMapper;
@Override
public List<PlatformCustomer> getCustomerMgrList() {
return customerMapper.getCustomerMgrList();
}
@Override
public int reset(int id) {
PlatformCustomer customer = new PlatformCustomer();
customer.setId(id);
customer.setPassword("12345678");
return customerMapper.updateByPrimaryKeySelective(customer);
}
@Override
public int startAndStop(int id, int status) {
PlatformCustomer customer = new PlatformCustomer();
customer.setId(id);
customer.setStatus(status);
return customerMapper.updateByPrimaryKeySelective(customer);
}
@Override
public int getCustomerCount() {
return customerMapper.getCustomerCount();
}
}
package com.glsx.service.impl;
import com.glsx.mapper.PlatformCustomerMapper;
import com.glsx.mapper.PlatformDeviceMapper;
import com.glsx.mapper.PlatformUserMapper;
import com.glsx.model.PlatformDevice;
import com.glsx.service.DeviceMgrService;
import com.glsx.vo.DeviceVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
public class DeviceMgrServiceImpl implements DeviceMgrService {
/**
......@@ -16,4 +20,37 @@ public class DeviceMgrServiceImpl implements DeviceMgrService {
@Resource
private PlatformDeviceMapper deviceMapper;
@Resource
private PlatformCustomerMapper customerMapper;
@Override
public List<PlatformDevice> getDeviceMgrList(DeviceVo deviceVo) {
return deviceMapper.getDeviceMgrList(deviceVo);
}
@Override
public List<String> getCustomerNameList() {
return customerMapper.getCustomerNameList();
}
@Override
public List<String> getDeviceTypeList() {
return deviceMapper.getDeviceTypeList();
}
@Override
public int getDeviceCount() {
return deviceMapper.getDeviceCount();
}
@Override
public Map<String, Integer> getDeviceGraphData() {
return deviceMapper.getDeviceGraphData();
}
@Override
public int getDeviceCountAuth(String customerName) {
return deviceMapper.getDeviceCountAuth(customerName);
}
}
package com.glsx.service.impl;
import com.glsx.mapper.PlatformCustomerMapper;
import com.glsx.mapper.PlatformUserMapper;
import com.glsx.model.PlatformUser;
import com.glsx.service.UserMgrService;
import com.glsx.vo.UserVo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
......@@ -20,8 +22,26 @@ public class UserMgrServiceImpl implements UserMgrService {
@Resource
private PlatformUserMapper userMapper;
@Resource
private PlatformCustomerMapper customerMapper;
@Override
public List<PlatformUser> getUserMgrList(UserVo userVo) {
return userMapper.getUserMgrList(userVo);
}
@Override
public List<String> getCustomerNameList() {
return customerMapper.getCustomerNameList();
}
@Override
public int getUserCount() {
return userMapper.getUserCount();
}
@Override
public List<PlatformUser> getUserMgrList() {
return userMapper.getUserMgrList();
public int getUserCountAuth(String customerName) {
return userMapper.getUserCountAuth(customerName);
}
}
package com.glsx.vo;
import java.io.Serializable;
import java.util.Date;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* api调用表
*/
public class ApiCallVo implements Serializable {
/**
* 访问开始时间
*/
private Date accessStartTime;
/**
* 访问结束时间
*/
private Date accessEndTime;
public Date getAccessStartTime() {
return accessStartTime;
}
public void setAccessStartTime(Date accessStartTime) {
this.accessStartTime = accessStartTime;
}
public Date getAccessEndTime() {
return accessEndTime;
}
public void setAccessEndTime(Date accessEndTime) {
this.accessEndTime = accessEndTime;
}
}
\ No newline at end of file
package com.glsx.vo;
import java.io.Serializable;
import java.util.Date;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 设备管理表
*/
public class DeviceVo implements Serializable {
/**
* 客户名称
*/
private String customerName;
/**
* 类型
*/
private String deviceType;
/**
* 激活开始时间
*/
private Date activatStartTime;
/**
* 激活开始时间
*/
private Date activatEndTime;
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public Date getActivatStartTime() {
return activatStartTime;
}
public void setActivatStartTime(Date activatStartTime) {
this.activatStartTime = activatStartTime;
}
public Date getActivatEndTime() {
return activatEndTime;
}
public void setActivatEndTime(Date activatEndTime) {
this.activatEndTime = activatEndTime;
}
}
\ No newline at end of file
package com.glsx.vo;
import java.io.Serializable;
import java.util.Date;
/**
* <p>Description:
* <p>Project: shop
*
* @author wbh
* @date 2020-12-15
*/
/**
* 设备管理表
*/
public class UserVo implements Serializable {
/**
* 客户名称
*/
private String customerName;
/**
* 类型
*/
private String deviceType;
/**
* 激活开始时间
*/
private Date registerStartTime;
/**
* 激活开始时间
*/
private Date registerEndTime;
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public Date getRegisterStartTime() {
return registerStartTime;
}
public void setRegisterStartTime(Date registerStartTime) {
this.registerStartTime = registerStartTime;
}
public Date getRegisterEndTime() {
return registerEndTime;
}
public void setRegisterEndTime(Date registerEndTime) {
this.registerEndTime = registerEndTime;
}
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!