* 'master' of http://221.0.232.152:9393/ability-center/share-platform:
  硬编码改为配置文件
  编译异常
  删除无用代码,清除system.out代码,去除无用import
This commit is contained in:
huangweixiong 2022-06-09 16:41:32 +08:00
commit cb67a8ee60
111 changed files with 141 additions and 5614 deletions

View File

@ -0,0 +1,22 @@
package io.renren.common.interceptor;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
@Data
@Component
@PropertySource("classpath:shangtangtask.properties")
@ConfigurationProperties(prefix = "st")
public class ShangTangTaskProperties {
private String accessKey;
private String secretKey;
private String token_url;
private String subscribe_url;
private String subscribe_callback_url;
private String template_url;
private String tasklist_url;
private String tasklistdetail_url;
}

View File

@ -1,118 +0,0 @@
package io.renren.modules.ability.controller.ai;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.ability.dto.ai.BsAbilityAiDTO;
import io.renren.modules.ability.excel.ai.BsAbilityAiExcel;
import io.renren.modules.ability.service.ai.BsAbilityAiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
@RestController
@RequestMapping("ability/bsabilityai")
@Api(tags="能力-ai算法")
public class BsAbilityAiController {
@Autowired
private BsAbilityAiService bsAbilityAiService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name ="name", value = "名称", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("ability:bsabilityai:page")
public Result<PageData<BsAbilityAiDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityAiDTO> page = bsAbilityAiService.page(params);
return new Result<PageData<BsAbilityAiDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("ability:bsabilityai:info")
public Result<BsAbilityAiDTO> get(@PathVariable("id") Long id){
BsAbilityAiDTO data = bsAbilityAiService.get(id);
return new Result<BsAbilityAiDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("ability:bsabilityai:save")
public Result save(@RequestBody BsAbilityAiDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityAiService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("ability:bsabilityai:update")
public Result update(@RequestBody BsAbilityAiDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityAiService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("ability:bsabilityai:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityAiService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("ability:bsabilityai:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityAiDTO> list = bsAbilityAiService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力-ai算法", list, BsAbilityAiExcel.class);
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.ability.controller.layer;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.ability.dto.layer.BsAbilityLayerDTO;
import io.renren.modules.ability.excel.layer.BsAbilityLayerExcel;
import io.renren.modules.ability.service.layer.BsAbilityLayerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
@RestController
@RequestMapping("ability/bsabilitylayer")
@Api(tags="能力-地理图层")
public class BsAbilityLayerController {
@Autowired
private BsAbilityLayerService bsAbilityLayerService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("ability:bsabilitylayer:page")
public Result<PageData<BsAbilityLayerDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityLayerDTO> page = bsAbilityLayerService.page(params);
return new Result<PageData<BsAbilityLayerDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("ability:bsabilitylayer:info")
public Result<BsAbilityLayerDTO> get(@PathVariable("id") Long id){
BsAbilityLayerDTO data = bsAbilityLayerService.get(id);
return new Result<BsAbilityLayerDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("ability:bsabilitylayer:save")
public Result save(@RequestBody BsAbilityLayerDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityLayerService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("ability:bsabilitylayer:update")
public Result update(@RequestBody BsAbilityLayerDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityLayerService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("ability:bsabilitylayer:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityLayerService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("ability:bsabilitylayer:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityLayerDTO> list = bsAbilityLayerService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力-地理图层", list, BsAbilityLayerExcel.class);
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.ability.controller.service;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.ability.dto.service.BsAbilityServiceDTO;
import io.renren.modules.ability.excel.BsAbilityServiceExcel;
import io.renren.modules.ability.service.service.BsAbilityServiceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力-服务
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@RestController
@RequestMapping("ability/bsabilityservice")
@Api(tags="能力-服务")
public class BsAbilityServiceController {
@Autowired
private BsAbilityServiceService bsAbilityServiceService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("ability:bsabilityservice:page")
public Result<PageData<BsAbilityServiceDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityServiceDTO> page = bsAbilityServiceService.page(params);
return new Result<PageData<BsAbilityServiceDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("ability:bsabilityservice:info")
public Result<BsAbilityServiceDTO> get(@PathVariable("id") Long id){
BsAbilityServiceDTO data = bsAbilityServiceService.get(id);
return new Result<BsAbilityServiceDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("ability:bsabilityservice:save")
public Result save(@RequestBody BsAbilityServiceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityServiceService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("ability:bsabilityservice:update")
public Result update(@RequestBody BsAbilityServiceDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityServiceService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("ability:bsabilityservice:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityServiceService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("ability:bsabilityservice:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityServiceDTO> list = bsAbilityServiceService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力-服务", list, BsAbilityServiceExcel.class);
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.ability.controller.video;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.ability.dto.video.BsAbilityVideoDTO;
import io.renren.modules.ability.excel.BsAbilityVideoExcel;
import io.renren.modules.ability.service.video.BsAbilityVideoService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力-视频监控
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@RestController
@RequestMapping("ability/bsabilityvideo")
@Api(tags="能力-视频监控")
public class BsAbilityVideoController {
@Autowired
private BsAbilityVideoService bsAbilityVideoService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("ability:bsabilityvideo:page")
public Result<PageData<BsAbilityVideoDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityVideoDTO> page = bsAbilityVideoService.page(params);
return new Result<PageData<BsAbilityVideoDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("ability:bsabilityvideo:info")
public Result<BsAbilityVideoDTO> get(@PathVariable("id") Long id){
BsAbilityVideoDTO data = bsAbilityVideoService.get(id);
return new Result<BsAbilityVideoDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("ability:bsabilityvideo:save")
public Result save(@RequestBody BsAbilityVideoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityVideoService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("ability:bsabilityvideo:update")
public Result update(@RequestBody BsAbilityVideoDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityVideoService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("ability:bsabilityvideo:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityVideoService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("ability:bsabilityvideo:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityVideoDTO> list = bsAbilityVideoService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力-视频监控", list, BsAbilityVideoExcel.class);
}
}

View File

@ -1,22 +0,0 @@
package io.renren.modules.ability.dao.ai;
import org.apache.ibatis.annotations.Param;
import io.renren.common.dao.BaseDao;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.sys.entity.SysUserEntity;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import java.util.Map;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Mapper
public interface BsAbilityAiDao extends BaseDao<BsAbilityAiEntity> {
List<BsAbilityAiEntity> getList(Map<String, Object> params);
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.ability.dao.layer;
import io.renren.common.dao.BaseDao;
import io.renren.modules.ability.entity.layer.BsAbilityLayerEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
@Mapper
public interface BsAbilityLayerDao extends BaseDao<BsAbilityLayerEntity> {
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.ability.dao.service;
import io.renren.common.dao.BaseDao;
import io.renren.modules.ability.entity.service.BsAbilityServiceEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力-服务
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@Mapper
public interface BsAbilityServiceDao extends BaseDao<BsAbilityServiceEntity> {
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.ability.dao.video;
import io.renren.common.dao.BaseDao;
import io.renren.modules.ability.entity.video.BsAbilityVideoEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力-视频监控
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@Mapper
public interface BsAbilityVideoDao extends BaseDao<BsAbilityVideoEntity> {
}

View File

@ -1,74 +0,0 @@
package io.renren.modules.ability.dto.ai;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Data
@ApiModel(value = "能力-ai算法")
public class BsAbilityAiDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "UUID")
private Long id;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "访问地址")
private String visitUrl;
@ApiModelProperty(value = "简单介绍")
private String subtext;
@ApiModelProperty(value = "介绍")
private String context;
@ApiModelProperty(value = "图片")
private String imgurl;
@ApiModelProperty(value = "分类 ab_info")
private String type;
@ApiModelProperty(value = "共享方式 0无条件开放 1-有条件开放")
private String shareType;
@ApiModelProperty(value = "评价计分")
private String goal;
@ApiModelProperty(value = "共享形式 1-源码 2-接口 3-组件")
private String shareForm;
@ApiModelProperty(value = "领域 字典")
private String field;
@ApiModelProperty(value = "场景 字典")
private String scene;
@ApiModelProperty(value = "部门ID")
private String deptId;
@ApiModelProperty(value = "上线时间")
private String onlineDate;
@ApiModelProperty(value = "说明")
private String content;
@ApiModelProperty(value = "排名")
private String rank;
@ApiModelProperty(value = "使用要求")
private String useInfo;
@ApiModelProperty(value = "富文本 入参和出参")
private String remarks;
@ApiModelProperty(value = "是否推荐 1-是 0-否")
private String isUp;
@ApiModelProperty(value = "更新时间")
private String updateDate;
@ApiModelProperty(value = "内容图片")
private String contentImg;
}

View File

@ -1,81 +0,0 @@
package io.renren.modules.ability.dto.layer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
@Data
@ApiModel(value = "能力-地理图层")
public class BsAbilityLayerDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private String id;
@ApiModelProperty(value = "服务地址")
private String visitUrl;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "服务类型")
private String serviceType;
@ApiModelProperty(value = "摘要")
private String content;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "关键字")
private String keywords;
@ApiModelProperty(value = "发布单位")
private String unit;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private Integer isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "简单介绍")
private String subtext;
@ApiModelProperty(value = "图片")
private String imgurl;
@ApiModelProperty(value = "介绍")
private String context;
@ApiModelProperty(value = "更新时间")
private String updateDate;
@ApiModelProperty(value = "目录的id字段")
private String type;
@ApiModelProperty(value = "共享方式 0无条件开放 1-有条件开放")
private String shareType;
@ApiModelProperty(value = "上线时间")
private String onlineDate;
@ApiModelProperty(value = "评价计分")
private String goal;
@ApiModelProperty(value = "共享形式 1-源码 2-接口 3-组件")
private String shareForm;
@ApiModelProperty(value = "领域 字典")
private String field;
@ApiModelProperty(value = "场景 字典")
private String scene;
@ApiModelProperty(value = "排名")
private String rank;
@ApiModelProperty(value = "部门ID")
private String deptId;
@ApiModelProperty(value = "使用要求")
private String useInfo;
@ApiModelProperty(value = "备注 入参和出参 富文本")
private String remarks;
@ApiModelProperty(value = "是否推荐 1-是 0-否")
private String isUp;
@ApiModelProperty(value = "内容图片")
private String contentImg;
}

View File

@ -1,74 +0,0 @@
package io.renren.modules.ability.dto.service;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-服务
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@Data
@ApiModel(value = "能力-服务")
public class BsAbilityServiceDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private String id;
@ApiModelProperty(value = "页面地址")
private String visitUrl;
@ApiModelProperty(value = "调用说明")
private String content;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "简单介绍")
private String subtext;
@ApiModelProperty(value = "介绍")
private String context;
@ApiModelProperty(value = "图片")
private String imgurl;
@ApiModelProperty(value = "展示图片")
private String img;
@ApiModelProperty(value = "分类 ab_info")
private String type;
@ApiModelProperty(value = "共享方式 0无条件开放 1-有条件开放")
private String shareType;
@ApiModelProperty(value = "上线时间")
private String onlineDate;
@ApiModelProperty(value = "评价计分")
private String goal;
@ApiModelProperty(value = "共享形式 1-源码 2-接口 3-组件")
private String shareForm;
@ApiModelProperty(value = "领域 字典")
private String field;
@ApiModelProperty(value = "场景 字典")
private String scene;
@ApiModelProperty(value = "排名")
private String rank;
@ApiModelProperty(value = "部门ID")
private String deptId;
@ApiModelProperty(value = "使用要求")
private String useInfo;
@ApiModelProperty(value = "富文本 备注 入参和出参")
private String remarks;
@ApiModelProperty(value = "更新时间")
private String updateDate;
@ApiModelProperty(value = "是否推荐 1-是 0-否")
private String isUp;
@ApiModelProperty(value = "内容图片")
private String contentImg;
}

View File

@ -1,80 +0,0 @@
package io.renren.modules.ability.dto.video;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-视频监控
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@Data
@ApiModel(value = "能力-视频监控")
public class BsAbilityVideoDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private String id;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "分类 ab_info")
private String type;
@ApiModelProperty(value = "部门ID")
private String deptId;
@ApiModelProperty(value = "位置")
private String location;
@ApiModelProperty(value = "经度")
private String longitude;
@ApiModelProperty(value = "纬度")
private String latitude;
@ApiModelProperty(value = "通道号")
private String roadCode;
@ApiModelProperty(value = "设备ID")
private String deviceId;
@ApiModelProperty(value = "厂家")
private String factory;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "更新时间")
private String updateDate;
@ApiModelProperty(value = "简单介绍")
private String subtext;
@ApiModelProperty(value = "介绍")
private String context;
@ApiModelProperty(value = "图片")
private String imgurl;
@ApiModelProperty(value = "共享方式 0无条件开放 1-有条件开放")
private String shareType;
@ApiModelProperty(value = "上线时间")
private String onlineDate;
@ApiModelProperty(value = "评价计分")
private BigDecimal goal;
@ApiModelProperty(value = "共享形式 1-源码 2-接口 3-组件")
private String shareForm;
@ApiModelProperty(value = "领域 字典")
private String field;
@ApiModelProperty(value = "场景 字典")
private String scene;
@ApiModelProperty(value = "排名")
private String rank;
@ApiModelProperty(value = "使用要求")
private String useInfo;
@ApiModelProperty(value = "备注 入参 出参 富文本")
private String remarks;
@ApiModelProperty(value = "是否推荐 1-是 0-否")
private String isUp;
@ApiModelProperty(value = "内容图片")
private String contentImg;
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.ability.entity.ai;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.util.Date;
import io.renren.common.entity.BaseEntity;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_ai")
public class BsAbilityAiEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
private Long id;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 名称
*/
private String name;
/**
* 版本号
*/
private String version;
/**
* 访问地址
*/
private String visitUrl;
/**
* 简单介绍
*/
private String subtext;
/**
* 介绍
*/
private String context;
/**
* 图片
*/
private String imgurl;
/**
* 分类 ab_info
*/
private String type;
/**
* 共享方式 0无条件开放 1-有条件开放
*/
private String shareType;
/**
* 评价计分
*/
private String goal;
/**
* 共享形式 1-源码 2-接口 3-组件
*/
private String shareForm;
/**
* 领域 字典
*/
private String field;
/**
* 场景 字典
*/
private String scene;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 上线时间
*/
private String onlineDate;
/**
* 说明
*/
private String content;
/**
* 排名
*/
private String rank;
/**
* 使用要求
*/
private String useInfo;
/**
* 富文本 入参和出参
*/
private String remarks;
/**
* 是否推荐 1- 0-
*/
private String isUp;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
private String contentImg;
}

View File

@ -1,141 +0,0 @@
package io.renren.modules.ability.entity.layer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_layer")
public class BsAbilityLayerEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId
private String id;
/**
* 服务地址
*/
private String visitUrl;
/**
* 名称
*/
private String name;
/**
* 服务类型
*/
private String serviceType;
/**
* 摘要
*/
private String content;
/**
* 版本号
*/
private String version;
/**
* 关键字
*/
private String keywords;
/**
* 发布单位
*/
private String unit;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private String createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 简单介绍
*/
private String subtext;
/**
* 图片
*/
private String imgurl;
/**
* 介绍
*/
private String context;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
/**
* 目录的id字段
*/
private String type;
/**
* 共享方式 0无条件开放 1-有条件开放
*/
private String shareType;
/**
* 上线时间
*/
private String onlineDate;
/**
* 评价计分
*/
private String goal;
/**
* 共享形式 1-源码 2-接口 3-组件
*/
private String shareForm;
/**
* 领域 字典
*/
private String field;
/**
* 场景 字典
*/
private String scene;
/**
* 排名
*/
private String rank;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 使用要求
*/
private String useInfo;
/**
* 备注 入参和出参 富文本
*/
private String remarks;
/**
* 是否推荐 1- 0-
*/
private String isUp;
private String contentImg;
}

View File

@ -1,128 +0,0 @@
package io.renren.modules.ability.entity.service;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-服务
*
* @since 3.0 2022-01-11
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_service")
public class BsAbilityServiceEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId
private String id;
/**
* 页面地址
*/
private String visitUrl;
/**
* 调用说明
*/
private String content;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private String createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 名称
*/
private String name;
/**
* 简单介绍
*/
private String subtext;
/**
* 介绍
*/
private String context;
/**
* 图片
*/
private String imgurl;
/**
* 展示图片
*/
private String img;
/**
* 分类 ab_info
*/
private String type;
/**
* 共享方式 0无条件开放 1-有条件开放
*/
private String shareType;
/**
* 上线时间
*/
private String onlineDate;
/**
* 评价计分
*/
private String goal;
/**
* 共享形式 1-源码 2-接口 3-组件
*/
private String shareForm;
/**
* 领域 字典
*/
private String field;
/**
* 场景 字典
*/
private String scene;
/**
* 排名
*/
private String rank;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 使用要求
*/
private String useInfo;
/**
* 富文本 备注 入参和出参
*/
private String remarks;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
/**
* 是否推荐 1- 0-
*/
private String isUp;
private String contentImg;
}

View File

@ -1,140 +0,0 @@
package io.renren.modules.ability.entity.video;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-视频监控
*
* @since 3.0 2022-01-11
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_video")
public class BsAbilityVideoEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId
private String id;
/**
* 名称
*/
private String name;
/**
* 分类 ab_info
*/
private String type;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 位置
*/
private String location;
/**
* 经度
*/
private String longitude;
/**
* 纬度
*/
private String latitude;
/**
* 通道号
*/
private String roadCode;
/**
* 设备ID
*/
private String deviceId;
/**
* 厂家
*/
private String factory;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private String createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
/**
* 简单介绍
*/
private String subtext;
/**
* 介绍
*/
private String context;
/**
* 图片
*/
private String imgurl;
/**
* 共享方式 0无条件开放 1-有条件开放
*/
private String shareType;
/**
* 上线时间
*/
private String onlineDate;
/**
* 评价计分
*/
private String goal;
/**
* 共享形式 1-源码 2-接口 3-组件
*/
private String shareForm;
/**
* 领域 字典
*/
private String field;
/**
* 场景 字典
*/
private String scene;
/**
* 排名
*/
private String rank;
/**
* 使用要求
*/
private String useInfo;
/**
* 备注 入参 出参 富文本
*/
private String remarks;
/**
* 是否推荐 1- 0-
*/
private String isUp;
private String contentImg;
}

View File

@ -1,44 +0,0 @@
package io.renren.modules.ability.excel.ai;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityAiExcel {
@ExcelProperty(value = "名称", index = 0)
private String name;
@ExcelProperty(value = "版本号", index = 1)
private String version;
@ExcelProperty(value = "简单介绍", index = 2)
private String subtext;
@ExcelProperty(value = "图片", index = 3)
private String imgurl;
@ExcelProperty(value = "共享方式 0无条件开放 1-有条件开放", index = 4)
private Integer shareType;
@ExcelProperty(value = "评价计分", index = 5)
private BigDecimal goal;
@ExcelProperty(value = "共享形式 1-源码 2-接口 3-组件", index = 6)
private Integer shareForm;
@ExcelProperty(value = "领域 字典", index = 7)
private String field;
@ExcelProperty(value = "场景 字典", index = 8)
private String scene;
@ExcelProperty(value = "部门ID", index = 9)
private String deptId;
@ExcelProperty(value = "上线时间", index = 10)
private Date onlineDate;
}

View File

@ -1,40 +0,0 @@
package io.renren.modules.ability.excel.layer;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityLayerExcel {
@ExcelProperty(value = "名称", index = 0)
private String name;
@ExcelProperty(value = "服务类型", index = 1)
private String serviceType;
@ExcelProperty(value = "版本号", index = 2)
private String version;
@ExcelProperty(value = "关键字", index = 3)
private String keywords;
@ExcelProperty(value = "发布单位", index = 4)
private String unit;
@ExcelProperty(value = "简单介绍", index = 5)
private String subtext;
@ExcelProperty(value = "图片", index = 6)
private String imgurl;
@ExcelProperty(value = "更新时间", index = 7)
private Date updateDate;
@ExcelProperty(value = "是否推荐 1-是 0-否", index = 8)
private Integer isUp;
}

View File

@ -1,37 +0,0 @@
package io.renren.modules.ability.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-服务
*
* @since 3.0 2022-01-11
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityServiceExcel {
@ExcelProperty(value = "名称", index = 0)
private String name;
@ExcelProperty(value = "简单介绍", index = 1)
private String subtext;
@ExcelProperty(value = "图片", index = 2)
private String imgurl;
@ExcelProperty(value = "展示图片", index = 3)
private String img;
@ExcelProperty(value = "分类 ab_info", index = 4)
private String type;
@ExcelProperty(value = "部门ID", index = 5)
private String deptId;
@ExcelProperty(value = "更新时间", index = 6)
private Date updateDate;
@ExcelProperty(value = "是否推荐 1-是 0-否", index = 7)
private Integer isUp;
}

View File

@ -1,43 +0,0 @@
package io.renren.modules.ability.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
/**
* 能力-视频监控
*
* @since 3.0 2022-01-11
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityVideoExcel {
@ExcelProperty(value = "名称", index = 0)
private String name;
@ExcelProperty(value = "分类 ab_info", index = 1)
private String type;
@ExcelProperty(value = "部门ID", index = 2)
private String deptId;
@ExcelProperty(value = "位置", index = 3)
private String location;
@ExcelProperty(value = "经度", index = 4)
private BigDecimal longitude;
@ExcelProperty(value = "纬度", index = 5)
private BigDecimal latitude;
@ExcelProperty(value = "通道号", index = 6)
private String roadCode;
@ExcelProperty(value = "设备ID", index = 7)
private String deviceId;
@ExcelProperty(value = "厂家", index = 8)
private String factory;
@ExcelProperty(value = "更新时间", index = 9)
private Date updateDate;
@ExcelProperty(value = "评价计分", index = 10)
private BigDecimal goal;
}

View File

@ -1,19 +0,0 @@
package io.renren.modules.ability.service.ai;
import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.modules.ability.dto.ai.BsAbilityAiDTO;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import java.util.Map;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
public interface BsAbilityAiService extends CrudService<BsAbilityAiEntity, BsAbilityAiDTO> {
PageData<BsAbilityAiEntity> searchAblilty(Map<String,Object> params);
}

View File

@ -1,65 +0,0 @@
package io.renren.modules.ability.service.ai.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.ability.dao.ai.BsAbilityAiDao;
import io.renren.modules.ability.dto.ai.BsAbilityAiDTO;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.ability.service.ai.BsAbilityAiService;
import io.renren.modules.sys.entity.SysOnlineEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* 能力-ai算法
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Service
public class BsAbilityAiServiceImpl extends CrudServiceImpl<BsAbilityAiDao, BsAbilityAiEntity, BsAbilityAiDTO> implements BsAbilityAiService {
@Override
public QueryWrapper<BsAbilityAiEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityAiEntity> wrapper = new QueryWrapper<>();
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String shareForm = (String)params.get("shareForm");
wrapper.eq(StringUtils.isNotBlank(shareForm), "share_form", shareForm);
String field = (String)params.get("field");
wrapper.eq(StringUtils.isNotBlank(field), "field", field);
String scene = (String)params.get("scene");
wrapper.eq(StringUtils.isNotBlank(scene), "scene", scene);
String deptId = (String)params.get("deptId");
wrapper.eq(StringUtils.isNotBlank(deptId), "dept_id", deptId);
return wrapper;
}
@Override
public PageData<BsAbilityAiEntity> searchAblilty(Map<String, Object> params) {
// return getPageData(list,list.size(),BsAbilityAiDTO.class);
//分页
IPage<?> page = getPage(params, "tab.id", false);
//查询
// params.put("expireDate", new Date());
List<BsAbilityAiEntity> list = baseDao.getList(params);
return new PageData<>(list, page.getTotal());
}
}

View File

@ -1,15 +0,0 @@
package io.renren.modules.ability.service.layer;
import io.renren.common.service.CrudService;
import io.renren.modules.ability.dto.layer.BsAbilityLayerDTO;
import io.renren.modules.ability.entity.layer.BsAbilityLayerEntity;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
public interface BsAbilityLayerService extends CrudService<BsAbilityLayerEntity, BsAbilityLayerDTO> {
}

View File

@ -1,40 +0,0 @@
package io.renren.modules.ability.service.layer.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.ability.dao.layer.BsAbilityLayerDao;
import io.renren.modules.ability.dto.layer.BsAbilityLayerDTO;
import io.renren.modules.ability.entity.layer.BsAbilityLayerEntity;
import io.renren.modules.ability.service.layer.BsAbilityLayerService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力-地理图层
*
* @author Mark
* @since 3.0 2022-01-11
*/
@Service
public class BsAbilityLayerServiceImpl extends CrudServiceImpl<BsAbilityLayerDao, BsAbilityLayerEntity, BsAbilityLayerDTO> implements BsAbilityLayerService {
@Override
public QueryWrapper<BsAbilityLayerEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityLayerEntity> wrapper = new QueryWrapper<>();
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String serviceType = (String)params.get("serviceType");
wrapper.eq(StringUtils.isNotBlank(serviceType), "service_type", serviceType);
String unit = (String)params.get("unit");
wrapper.eq(StringUtils.isNotBlank(unit), "unit", unit);
return wrapper;
}
}

View File

@ -1,14 +0,0 @@
package io.renren.modules.ability.service.service;
import io.renren.common.service.CrudService;
import io.renren.modules.ability.dto.service.BsAbilityServiceDTO;
import io.renren.modules.ability.entity.service.BsAbilityServiceEntity;
/**
* 能力-服务
*
* @since 3.0 2022-01-11
*/
public interface BsAbilityServiceService extends CrudService<BsAbilityServiceEntity, BsAbilityServiceDTO> {
}

View File

@ -1,37 +0,0 @@
package io.renren.modules.ability.service.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.ability.dao.service.BsAbilityServiceDao;
import io.renren.modules.ability.dto.service.BsAbilityServiceDTO;
import io.renren.modules.ability.entity.service.BsAbilityServiceEntity;
import io.renren.modules.ability.service.service.BsAbilityServiceService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力-服务
*
* @since 3.0 2022-01-11
*/
@Service
public class BsAbilityServiceServiceImpl extends CrudServiceImpl<BsAbilityServiceDao, BsAbilityServiceEntity, BsAbilityServiceDTO> implements BsAbilityServiceService {
@Override
public QueryWrapper<BsAbilityServiceEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityServiceEntity> wrapper = new QueryWrapper<>();
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String type = (String)params.get("type");
wrapper.eq(StringUtils.isNotBlank(type), "type", type);
String deptId = (String)params.get("deptId");
wrapper.eq(StringUtils.isNotBlank(deptId), "dept_id", deptId);
return wrapper;
}
}

View File

@ -1,14 +0,0 @@
package io.renren.modules.ability.service.video;
import io.renren.common.service.CrudService;
import io.renren.modules.ability.dto.video.BsAbilityVideoDTO;
import io.renren.modules.ability.entity.video.BsAbilityVideoEntity;
/**
* 能力-视频监控
*
* @since 3.0 2022-01-11
*/
public interface BsAbilityVideoService extends CrudService<BsAbilityVideoEntity, BsAbilityVideoDTO> {
}

View File

@ -1,39 +0,0 @@
package io.renren.modules.ability.service.video.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.ability.dao.video.BsAbilityVideoDao;
import io.renren.modules.ability.dto.video.BsAbilityVideoDTO;
import io.renren.modules.ability.entity.video.BsAbilityVideoEntity;
import io.renren.modules.ability.service.video.BsAbilityVideoService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力-视频监控
*
* @since 3.0 2022-01-11
*/
@Service
public class BsAbilityVideoServiceImpl extends CrudServiceImpl<BsAbilityVideoDao, BsAbilityVideoEntity, BsAbilityVideoDTO> implements BsAbilityVideoService {
@Override
public QueryWrapper<BsAbilityVideoEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityVideoEntity> wrapper = new QueryWrapper<>();
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String deptId = (String)params.get("deptId");
wrapper.eq(StringUtils.isNotBlank(deptId), "dept_id", deptId);
String factory = (String)params.get("factory");
wrapper.like(StringUtils.isNotBlank(factory), "factory", factory);
return wrapper;
}
}

View File

@ -1,147 +0,0 @@
package io.renren.modules.abilityRecord.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.abilityRecord.dto.BsAbilityRecordDTO;
import io.renren.modules.abilityRecord.entity.BsAbilityRecordEntity;
import io.renren.modules.abilityRecord.excel.BsAbilityRecordExcel;
import io.renren.modules.abilityRecord.service.BsAbilityRecordService;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import io.renren.modules.sys.dto.SysMenuDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
@RestController
@RequestMapping("bsabilityrecord")
@Api(tags="能力调用记录")
public class BsAbilityRecordController {
@Autowired
private BsAbilityRecordService bsAbilityRecordService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("能力调用记录:bsabilityrecord:page")
public Result<PageData<BsAbilityRecordDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityRecordDTO> page = bsAbilityRecordService.page(params);
return new Result<PageData<BsAbilityRecordDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("能力调用记录:bsabilityrecord:info")
public Result<BsAbilityRecordDTO> get(@PathVariable("id") Long id){
BsAbilityRecordDTO data = bsAbilityRecordService.get(id);
return new Result<BsAbilityRecordDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("能力调用记录:bsabilityrecord:save")
public Result save(@RequestBody BsAbilityRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityRecordService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("能力调用记录:bsabilityrecord:update")
public Result update(@RequestBody BsAbilityRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityRecordService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("能力调用记录:bsabilityrecord:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityRecordService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("能力调用记录:bsabilityrecord:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityRecordDTO> list = bsAbilityRecordService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力调用记录", list, BsAbilityRecordExcel.class);
}
@GetMapping("analysis")
@ApiOperation("统计分析")
@ApiImplicitParam(name = "type", value = "类型 0按部门 1按年 2按月 3按日 ", paramType = "query", dataType="int")
// @RequiresPermissions("sys:menu:list")
public Result<List<Map<String,Object>>> getAnalysis(Integer type){
List<Map<String,Object>> list = bsAbilityRecordService.getAnalysis(type);
return new Result<List<Map<String,Object>>>().ok(list);
}
@GetMapping("rank")
@ApiOperation("能力调用次数排名")
@ApiImplicitParams({
@ApiImplicitParam(name = "deptId", value = "部门ID", paramType = "query", required = false, dataType="String") ,
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType="String")
})
public Result<PageData<BsAbilityRecordEntity>> rank(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityRecordEntity> page = bsAbilityRecordService.rank(params);
return new Result<PageData<BsAbilityRecordEntity>>().ok(page);
}
}

View File

@ -1,22 +0,0 @@
package io.renren.modules.abilityRecord.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.abilityRecord.entity.BsAbilityRecordEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
@Mapper
public interface BsAbilityRecordDao extends BaseDao<BsAbilityRecordEntity> {
List<Map<String,Object>> getAnalysis(@Param("type") int type);
List<BsAbilityRecordEntity> rank(Map<String, Object> params);
}

View File

@ -1,45 +0,0 @@
package io.renren.modules.abilityRecord.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
@Data
@ApiModel(value = "能力调用记录")
public class BsAbilityRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "UUID")
private String id;
@ApiModelProperty(value = "调用部门")
private String deptId;
@ApiModelProperty(value = "调用时间-年")
private String useDateYear;
@ApiModelProperty(value = "调用时间-月")
private String useDateMonth;
@ApiModelProperty(value = "调用时间-日")
private String useDateDate;
@ApiModelProperty(value = "接口ID")
private String redId;
@ApiModelProperty(value = "能力类型 1-AI算法 2-地理 3-服务 4-视频")
private String type;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "更新时间")
private String updateDate;
}

View File

@ -1,63 +0,0 @@
package io.renren.modules.abilityRecord.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import io.renren.common.entity.BaseEntity;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_record")
public class BsAbilityRecordEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 调用部门
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 调用时间-
*/
private String useDateYear;
/**
* 调用时间-
*/
private String useDateMonth;
/**
* 调用时间-
*/
private String useDateDate;
/**
* 接口ID
*/
private String redId;
/**
* 能力类型 1-AI算法 2-地理 3-服务 4-视频
*/
private String type;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
private String name;
private Integer count;
}

View File

@ -1,44 +0,0 @@
package io.renren.modules.abilityRecord.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityRecordExcel {
@ExcelProperty(value = "UUID", index = 0)
private String id;
@ExcelProperty(value = "调用部门", index = 1)
private String deptId;
@ExcelProperty(value = "调用时间-年", index = 2)
private String useDateYear;
@ExcelProperty(value = "调用时间-月", index = 3)
private String useDateMonth;
@ExcelProperty(value = "调用时间-日", index = 4)
private String useDateDate;
@ExcelProperty(value = "接口ID", index = 5)
private String redId;
@ExcelProperty(value = "能力类型 1-AI算法 2-地理 3-服务 4-视频", index = 6)
private String type;
@ExcelProperty(value = "0-未删除 1-删除 默认0", index = 7)
private String isDelete;
@ExcelProperty(value = "创建者", index = 8)
private String creator;
@ExcelProperty(value = "创建时间", index = 9)
private String createDate;
@ExcelProperty(value = "更新者", index = 10)
private String updater;
@ExcelProperty(value = "更新时间", index = 11)
private String updateDate;
}

View File

@ -1,23 +0,0 @@
package io.renren.modules.abilityRecord.service;
import io.renren.common.page.PageData;
import io.renren.common.service.CrudService;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.abilityRecord.dto.BsAbilityRecordDTO;
import io.renren.modules.abilityRecord.entity.BsAbilityRecordEntity;
import java.util.List;
import java.util.Map;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
public interface BsAbilityRecordService extends CrudService<BsAbilityRecordEntity, BsAbilityRecordDTO> {
List<Map<String,Object>> getAnalysis(int type);
PageData<BsAbilityRecordEntity> rank(Map<String, Object> params);
}

View File

@ -1,58 +0,0 @@
package io.renren.modules.abilityRecord.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.renren.common.page.PageData;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.abilityRecord.dao.BsAbilityRecordDao;
import io.renren.modules.abilityRecord.dto.BsAbilityRecordDTO;
import io.renren.modules.abilityRecord.entity.BsAbilityRecordEntity;
import io.renren.modules.abilityRecord.service.BsAbilityRecordService;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 能力调用记录
*
* @author wxw
* @since 3.0 2022-01-12
*/
@Service
public class BsAbilityRecordServiceImpl extends CrudServiceImpl<BsAbilityRecordDao, BsAbilityRecordEntity, BsAbilityRecordDTO> implements BsAbilityRecordService {
@Override
public QueryWrapper<BsAbilityRecordEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityRecordEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
@Override
public List<Map<String, Object>> getAnalysis(int type) {
return baseDao.getAnalysis(type);
}
@Override
public PageData<BsAbilityRecordEntity> rank(Map<String, Object> params) {
//分页
IPage<?> page = getPage(params, "tab.count", false);
//查询
// params.put("expireDate", new Date());
List<BsAbilityRecordEntity> list = baseDao.rank(params);
return new PageData<>(list, page.getTotal());
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.applyRecord.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.applyRecord.dto.BsAbilityApplyRecordDTO;
import io.renren.modules.applyRecord.excel.BsAbilityApplyRecordExcel;
import io.renren.modules.applyRecord.service.BsAbilityApplyRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
@RestController
@RequestMapping("applyRecord/bsAbilityApplyRecord")
@Api(tags="能力申请记录表")
public class BsAbilityApplyRecordController {
@Autowired
private BsAbilityApplyRecordService bsAbilityApplyRecordService;
@GetMapping("page")
@ApiOperation("分页")
/*@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})*/
//@RequiresPermissions("applyrecord:bsabilityapplyrecord:page")
public Result<PageData<BsAbilityApplyRecordDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityApplyRecordDTO> page = bsAbilityApplyRecordService.page(params);
return new Result<PageData<BsAbilityApplyRecordDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("applyrecord:bsabilityapplyrecord:info")
public Result<BsAbilityApplyRecordDTO> get(@PathVariable("id") Long id){
BsAbilityApplyRecordDTO data = bsAbilityApplyRecordService.get(id);
return new Result<BsAbilityApplyRecordDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("applyrecord:bsabilityapplyrecord:save")
public Result save(@RequestBody BsAbilityApplyRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityApplyRecordService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("applyrecord:bsabilityapplyrecord:update")
public Result update(@RequestBody BsAbilityApplyRecordDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityApplyRecordService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("applyrecord:bsabilityapplyrecord:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityApplyRecordService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("applyrecord:bsabilityapplyrecord:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityApplyRecordDTO> list = bsAbilityApplyRecordService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力申请记录表 ", list, BsAbilityApplyRecordExcel.class);}
}

View File

@ -1,17 +0,0 @@
package io.renren.modules.applyRecord.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.applyRecord.entity.BsAbilityApplyRecordEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
@Mapper
public interface BsAbilityApplyRecordDao extends BaseDao<BsAbilityApplyRecordEntity> {
}

View File

@ -1,46 +0,0 @@
package io.renren.modules.applyRecord.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
@Data
@ApiModel(value = "能力申请记录表")
public class BsAbilityApplyRecordDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "UUID")
private Long id;
@ApiModelProperty(value = "申请需求")
private String supply;
@ApiModelProperty(value = "申请部门")
private String applyDept;
@ApiModelProperty(value = "申请人")
private String applyUser;
@ApiModelProperty(value = "用途")
private String userInfo;
@ApiModelProperty(value = "能力ID")
private String redId;
@ApiModelProperty(value = "对应系统")
private String sysName;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "更新时间")
private String updateDate;
}

View File

@ -1,73 +0,0 @@
package io.renren.modules.applyRecord.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_apply_record")
public class BsAbilityApplyRecordEntity {
private static final long serialVersionUID = 1L;
/**
* UUID
*/
@TableId
private Long id;
/**
* 申请需求
*/
private String supply;
/**
* 申请部门
*/
private String applyDept;
/**
* 申请人
*/
private String applyUser;
/**
* 用途
*/
private String userInfo;
/**
* 能力ID
*/
private String redId;
/**
* 对应系统
*/
private String sysName;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private String createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
}

View File

@ -1,33 +0,0 @@
package io.renren.modules.applyRecord.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityApplyRecordExcel {
@ExcelProperty(value = "申请需求", index = 0)
private String supply;
@ExcelProperty(value = "申请部门", index = 1)
private String applyDept;
@ExcelProperty(value = "申请人", index = 2)
private String applyUser;
@ExcelProperty(value = "用途", index = 3)
private String userInfo;
@ExcelProperty(value = "能力ID", index = 4)
private String redId;
@ExcelProperty(value = "对应系统", index = 5)
private String sysName;
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.applyRecord.service;
import io.renren.common.service.CrudService;
import io.renren.modules.applyRecord.dto.BsAbilityApplyRecordDTO;
import io.renren.modules.applyRecord.entity.BsAbilityApplyRecordEntity;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
public interface BsAbilityApplyRecordService extends CrudService<BsAbilityApplyRecordEntity, BsAbilityApplyRecordDTO> {
}

View File

@ -1,32 +0,0 @@
package io.renren.modules.applyRecord.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.applyRecord.dao.BsAbilityApplyRecordDao;
import io.renren.modules.applyRecord.dto.BsAbilityApplyRecordDTO;
import io.renren.modules.applyRecord.entity.BsAbilityApplyRecordEntity;
import io.renren.modules.applyRecord.service.BsAbilityApplyRecordService;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力申请记录表
*
* @author Mark
* @since 3.0 2022-01-14
*/
@Service
public class BsAbilityApplyRecordServiceImpl extends CrudServiceImpl<BsAbilityApplyRecordDao, BsAbilityApplyRecordEntity, BsAbilityApplyRecordDTO> implements BsAbilityApplyRecordService {
@Override
public QueryWrapper<BsAbilityApplyRecordEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityApplyRecordEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.bsBase.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.bsBase.dto.BsAbilityBasebuildDTO;
import io.renren.modules.bsBase.excel.BsAbilityBasebuildExcel;
import io.renren.modules.bsBase.service.BsAbilityBasebuildService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力-地理图层
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-03-23
*/
@RestController
@RequestMapping("bsBase/bsabilitybasebuild")
@Api(tags="能力-地理图层")
public class BsAbilityBasebuildController {
@Autowired
private BsAbilityBasebuildService bsAbilityBasebuildService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("bsBase:bsabilitybasebuild:page")
public Result<PageData<BsAbilityBasebuildDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityBasebuildDTO> page = bsAbilityBasebuildService.page(params);
return new Result<PageData<BsAbilityBasebuildDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("bsBase:bsabilitybasebuild:info")
public Result<BsAbilityBasebuildDTO> get(@PathVariable("id") Long id){
BsAbilityBasebuildDTO data = bsAbilityBasebuildService.get(id);
return new Result<BsAbilityBasebuildDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("bsBase:bsabilitybasebuild:save")
public Result save(@RequestBody BsAbilityBasebuildDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilityBasebuildService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("bsBase:bsabilitybasebuild:update")
public Result update(@RequestBody BsAbilityBasebuildDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilityBasebuildService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("bsBase:bsabilitybasebuild:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilityBasebuildService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("bsBase:bsabilitybasebuild:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilityBasebuildDTO> list = bsAbilityBasebuildService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力-地理图层", list, BsAbilityBasebuildExcel.class);
}
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.bsBase.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.bsBase.entity.BsAbilityBasebuildEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力-地理图层
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-03-23
*/
@Mapper
public interface BsAbilityBasebuildDao extends BaseDao<BsAbilityBasebuildEntity> {
}

View File

@ -1,79 +0,0 @@
package io.renren.modules.bsBase.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 能力-地理图层
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-03-23
*/
@Data
@ApiModel(value = "能力-地理图层")
public class BsAbilityBasebuildDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private String id;
@ApiModelProperty(value = "服务地址")
private String visitUrl;
@ApiModelProperty(value = "服务类型")
private String serviceType;
@ApiModelProperty(value = "摘要")
private String content;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "关键字")
private String keywords;
@ApiModelProperty(value = "发布单位")
private String unit;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "更新时间")
private String updateDate;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "简单介绍")
private String subtext;
@ApiModelProperty(value = "介绍")
private String context;
@ApiModelProperty(value = "图片")
private String imgurl;
@ApiModelProperty(value = "目录的id字段")
private String type;
@ApiModelProperty(value = "共享方式 0无条件开放 1-有条件开放")
private String shareType;
@ApiModelProperty(value = "上线时间")
private String onlineDate;
@ApiModelProperty(value = "评价计分")
private String goal;
@ApiModelProperty(value = "共享形式 1-源码 2-接口 3-组件")
private String shareForm;
@ApiModelProperty(value = "领域 字典")
private String field;
@ApiModelProperty(value = "场景 字典")
private String scene;
@ApiModelProperty(value = "排名")
private String rank;
@ApiModelProperty(value = "部门ID")
private String deptId;
@ApiModelProperty(value = "使用要求")
private String useInfo;
@ApiModelProperty(value = "备注 入参和出参 富文本")
private String remarks;
@ApiModelProperty(value = "是否推荐 1-是 0-否")
private String isUp;
@ApiModelProperty(value = "内容图片")
private String contentImg;
}

View File

@ -1,140 +0,0 @@
package io.renren.modules.bsBase.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_basebuild")
public class BsAbilityBasebuildEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId
private String id;
/**
* 服务地址
*/
private String visitUrl;
/**
* 服务类型
*/
private String serviceType;
/**
* 摘要
*/
private String content;
/**
* 版本号
*/
private String version;
/**
* 关键字
*/
private String keywords;
/**
* 发布单位
*/
private String unit;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private String createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
/**
* 名称
*/
private String name;
/**
* 简单介绍
*/
private String subtext;
/**
* 介绍
*/
private String context;
/**
* 图片
*/
private String imgurl;
/**
* 目录的id字段
*/
private String type;
/**
* 共享方式 0无条件开放 1-有条件开放
*/
private String shareType;
/**
* 上线时间
*/
private String onlineDate;
/**
* 评价计分
*/
private String goal;
/**
* 共享形式 1-源码 2-接口 3-组件
*/
private String shareForm;
/**
* 领域 字典
*/
private String field;
/**
* 场景 字典
*/
private String scene;
/**
* 排名
*/
private String rank;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 使用要求
*/
private String useInfo;
/**
* 备注 入参和出参 富文本
*/
private String remarks;
/**
* 是否推荐 1- 0-
*/
private String isUp;
/**
* 内容图片
*/
private String contentImg;
}

View File

@ -1,55 +0,0 @@
package io.renren.modules.bsBase.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilityBasebuildExcel {
@ExcelProperty(value = "摘要", index = 0)
private String content;
@ExcelProperty(value = "版本号", index = 1)
private String version;
@ExcelProperty(value = "关键字", index = 2)
private String keywords;
@ExcelProperty(value = "发布单位", index = 3)
private String unit;
@ExcelProperty(value = "创建者", index = 4)
private String creator;
@ExcelProperty(value = "创建时间", index = 5)
private String createDate;
@ExcelProperty(value = "名称", index = 6)
private String name;
@ExcelProperty(value = "简单介绍", index = 7)
private String subtext;
@ExcelProperty(value = "介绍", index = 8)
private String context;
@ExcelProperty(value = "图片", index = 9)
private String imgurl;
@ExcelProperty(value = "上线时间", index = 10)
private String onlineDate;
@ExcelProperty(value = "评价计分", index = 11)
private String goal;
@ExcelProperty(value = "共享形式 1-源码 2-接口 3-组件", index = 12)
private String shareForm;
@ExcelProperty(value = "领域 字典", index = 13)
private String field;
@ExcelProperty(value = "场景 字典", index = 14)
private String scene;
@ExcelProperty(value = "排名", index = 15)
private String rank;
@ExcelProperty(value = "使用要求", index = 16)
private String useInfo;
@ExcelProperty(value = "内容图片", index = 17)
private String contentImg;
}

View File

@ -1,14 +0,0 @@
package io.renren.modules.bsBase.service;
import io.renren.common.service.CrudService;
import io.renren.modules.bsBase.dto.BsAbilityBasebuildDTO;
import io.renren.modules.bsBase.entity.BsAbilityBasebuildEntity;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
public interface BsAbilityBasebuildService extends CrudService<BsAbilityBasebuildEntity, BsAbilityBasebuildDTO> {
}

View File

@ -1,33 +0,0 @@
package io.renren.modules.bsBase.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.bsBase.dao.BsAbilityBasebuildDao;
import io.renren.modules.bsBase.dto.BsAbilityBasebuildDTO;
import io.renren.modules.bsBase.entity.BsAbilityBasebuildEntity;
import io.renren.modules.bsBase.service.BsAbilityBasebuildService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
@Service
public class BsAbilityBasebuildServiceImpl extends CrudServiceImpl<BsAbilityBasebuildDao, BsAbilityBasebuildEntity, BsAbilityBasebuildDTO> implements BsAbilityBasebuildService {
@Override
public QueryWrapper<BsAbilityBasebuildEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilityBasebuildEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.bsSystem.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.bsSystem.dto.BsAbilitySystemDTO;
import io.renren.modules.bsSystem.excel.BsAbilitySystemExcel;
import io.renren.modules.bsSystem.service.BsAbilitySystemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力-地理图层
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-03-23
*/
@RestController
@RequestMapping("bsSystem/bsabilitysystem")
@Api(tags="能力-地理图层")
public class BsAbilitySystemController {
@Autowired
private BsAbilitySystemService bsAbilitySystemService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("bsSystem:bsabilitysystem:page")
public Result<PageData<BsAbilitySystemDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilitySystemDTO> page = bsAbilitySystemService.page(params);
return new Result<PageData<BsAbilitySystemDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("bsSystem:bsabilitysystem:info")
public Result<BsAbilitySystemDTO> get(@PathVariable("id") Long id){
BsAbilitySystemDTO data = bsAbilitySystemService.get(id);
return new Result<BsAbilitySystemDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("bsSystem:bsabilitysystem:save")
public Result save(@RequestBody BsAbilitySystemDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsAbilitySystemService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("bsSystem:bsabilitysystem:update")
public Result update(@RequestBody BsAbilitySystemDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsAbilitySystemService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("bsSystem:bsabilitysystem:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsAbilitySystemService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("bsSystem:bsabilitysystem:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsAbilitySystemDTO> list = bsAbilitySystemService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力-地理图层", list, BsAbilitySystemExcel.class);
}
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.bsSystem.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.bsSystem.entity.BsAbilitySystemEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力-地理图层
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-03-23
*/
@Mapper
public interface BsAbilitySystemDao extends BaseDao<BsAbilitySystemEntity> {
}

View File

@ -1,79 +0,0 @@
package io.renren.modules.bsSystem.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* 能力-地理图层
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-03-23
*/
@Data
@ApiModel(value = "能力-地理图层")
public class BsAbilitySystemDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "ID")
private String id;
@ApiModelProperty(value = "服务地址")
private String visitUrl;
@ApiModelProperty(value = "服务类型")
private String serviceType;
@ApiModelProperty(value = "摘要")
private String content;
@ApiModelProperty(value = "版本号")
private String version;
@ApiModelProperty(value = "关键字")
private String keywords;
@ApiModelProperty(value = "发布单位")
private String unit;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "更新时间")
private String updateDate;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "简单介绍")
private String subtext;
@ApiModelProperty(value = "介绍")
private String context;
@ApiModelProperty(value = "图片")
private String imgurl;
@ApiModelProperty(value = "目录的id字段")
private String type;
@ApiModelProperty(value = "共享方式 0无条件开放 1-有条件开放")
private String shareType;
@ApiModelProperty(value = "上线时间")
private String onlineDate;
@ApiModelProperty(value = "评价计分")
private String goal;
@ApiModelProperty(value = "共享形式 1-源码 2-接口 3-组件")
private String shareForm;
@ApiModelProperty(value = "领域 字典")
private String field;
@ApiModelProperty(value = "场景 字典")
private String scene;
@ApiModelProperty(value = "排名")
private String rank;
@ApiModelProperty(value = "部门ID")
private String deptId;
@ApiModelProperty(value = "使用要求")
private String useInfo;
@ApiModelProperty(value = "备注 入参和出参 富文本")
private String remarks;
@ApiModelProperty(value = "是否推荐 1-是 0-否")
private String isUp;
@ApiModelProperty(value = "内容图片")
private String contentImg;
}

View File

@ -1,140 +0,0 @@
package io.renren.modules.bsSystem.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_ability_system")
public class BsAbilitySystemEntity {
private static final long serialVersionUID = 1L;
/**
* ID
*/
@TableId
private String id;
/**
* 服务地址
*/
private String visitUrl;
/**
* 服务类型
*/
private String serviceType;
/**
* 摘要
*/
private String content;
/**
* 版本号
*/
private String version;
/**
* 关键字
*/
private String keywords;
/**
* 发布单位
*/
private String unit;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private String creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private String createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updateDate;
/**
* 名称
*/
private String name;
/**
* 简单介绍
*/
private String subtext;
/**
* 介绍
*/
private String context;
/**
* 图片
*/
private String imgurl;
/**
* 目录的id字段
*/
private String type;
/**
* 共享方式 0无条件开放 1-有条件开放
*/
private String shareType;
/**
* 上线时间
*/
private String onlineDate;
/**
* 评价计分
*/
private String goal;
/**
* 共享形式 1-源码 2-接口 3-组件
*/
private String shareForm;
/**
* 领域 字典
*/
private String field;
/**
* 场景 字典
*/
private String scene;
/**
* 排名
*/
private String rank;
/**
* 部门ID
*/
@TableField(fill = FieldFill.INSERT)
private String deptId;
/**
* 使用要求
*/
private String useInfo;
/**
* 备注 入参和出参 富文本
*/
private String remarks;
/**
* 是否推荐 1- 0-
*/
private String isUp;
/**
* 内容图片
*/
private String contentImg;
}

View File

@ -1,77 +0,0 @@
package io.renren.modules.bsSystem.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsAbilitySystemExcel {
@ExcelProperty(value = "ID", index = 0)
private String id;
@ExcelProperty(value = "服务地址", index = 1)
private String visitUrl;
@ExcelProperty(value = "服务类型", index = 2)
private String serviceType;
@ExcelProperty(value = "摘要", index = 3)
private String content;
@ExcelProperty(value = "版本号", index = 4)
private String version;
@ExcelProperty(value = "关键字", index = 5)
private String keywords;
@ExcelProperty(value = "发布单位", index = 6)
private String unit;
@ExcelProperty(value = "0-未删除 1-删除 默认0", index = 7)
private String isDelete;
@ExcelProperty(value = "创建者", index = 8)
private String creator;
@ExcelProperty(value = "创建时间", index = 9)
private String createDate;
@ExcelProperty(value = "更新者", index = 10)
private String updater;
@ExcelProperty(value = "更新时间", index = 11)
private String updateDate;
@ExcelProperty(value = "名称", index = 12)
private String name;
@ExcelProperty(value = "简单介绍", index = 13)
private String subtext;
@ExcelProperty(value = "介绍", index = 14)
private String context;
@ExcelProperty(value = "图片", index = 15)
private String imgurl;
@ExcelProperty(value = "目录的id字段", index = 16)
private String type;
@ExcelProperty(value = "共享方式 0无条件开放 1-有条件开放", index = 17)
private String shareType;
@ExcelProperty(value = "上线时间", index = 18)
private String onlineDate;
@ExcelProperty(value = "评价计分", index = 19)
private String goal;
@ExcelProperty(value = "共享形式 1-源码 2-接口 3-组件", index = 20)
private String shareForm;
@ExcelProperty(value = "领域 字典", index = 21)
private String field;
@ExcelProperty(value = "场景 字典", index = 22)
private String scene;
@ExcelProperty(value = "排名", index = 23)
private String rank;
@ExcelProperty(value = "部门ID", index = 24)
private String deptId;
@ExcelProperty(value = "使用要求", index = 25)
private String useInfo;
@ExcelProperty(value = "备注 入参和出参 富文本", index = 26)
private String remarks;
@ExcelProperty(value = "是否推荐 1-是 0-否", index = 27)
private String isUp;
@ExcelProperty(value = "内容图片", index = 28)
private String contentImg;
}

View File

@ -1,14 +0,0 @@
package io.renren.modules.bsSystem.service;
import io.renren.common.service.CrudService;
import io.renren.modules.bsSystem.dto.BsAbilitySystemDTO;
import io.renren.modules.bsSystem.entity.BsAbilitySystemEntity;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
public interface BsAbilitySystemService extends CrudService<BsAbilitySystemEntity, BsAbilitySystemDTO> {
}

View File

@ -1,33 +0,0 @@
package io.renren.modules.bsSystem.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.bsSystem.dao.BsAbilitySystemDao;
import io.renren.modules.bsSystem.dto.BsAbilitySystemDTO;
import io.renren.modules.bsSystem.entity.BsAbilitySystemEntity;
import io.renren.modules.bsSystem.service.BsAbilitySystemService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力-地理图层
*
* @since 3.0 2022-03-23
*/
@Service
public class BsAbilitySystemServiceImpl extends CrudServiceImpl<BsAbilitySystemDao, BsAbilitySystemEntity, BsAbilitySystemDTO> implements BsAbilitySystemService {
@Override
public QueryWrapper<BsAbilitySystemEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsAbilitySystemEntity> wrapper = new QueryWrapper<>();
return wrapper;
}
}

View File

@ -1,122 +0,0 @@
package io.renren.modules.catalogue.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import io.renren.modules.catalogue.excel.BsCatalogueExcel;
import io.renren.modules.catalogue.service.BsCatalogueService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力目录管理
*
* @author wxw
* @since 3.0 2022-01-11
*/
@RestController
@RequestMapping("bscatalogue/bscatalogue")
@Api(tags="能力目录管理")
public class BsCatalogueController {
@Autowired
private BsCatalogueService bsCatalogueService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = "name", value = "名称", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String"),
@ApiImplicitParam(name = "department", value = "部门", paramType = "query", dataType="String")
})
// @RequiresPermissions("catalogue:bscatalogue:page")
public Result<List<BsCatalogueDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
List<BsCatalogueDTO> page = bsCatalogueService.getAllList(params);
return new Result<List<BsCatalogueDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("catalogue:bscatalogue:info")
public Result<BsCatalogueDTO> get(@PathVariable("id") Long id){
BsCatalogueDTO data = bsCatalogueService.get(id);
return new Result<BsCatalogueDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("catalogue:bscatalogue:save")
public Result save(@RequestBody BsCatalogueDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsCatalogueService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("catalogue:bscatalogue:update")
public Result update(@RequestBody BsCatalogueDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsCatalogueService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("catalogue:bscatalogue:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
// AssertUtils.isArrayEmpty(ids, "id");
//
// bsCatalogueService.delete(ids);
BsCatalogueDTO dto = new BsCatalogueDTO();
dto.setId(ids[0]);
dto.setIsDelete(1);
bsCatalogueService.update(dto);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("catalogue:bscatalogue:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsCatalogueDTO> list = bsCatalogueService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力目录管理", list, BsCatalogueExcel.class);
}
}

View File

@ -1,25 +0,0 @@
package io.renren.modules.catalogue.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.catalogue.entity.BsCatalogueEntity;
import io.renren.modules.sys.entity.SysMenuEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
* 目录表
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@Mapper
public interface BsCatalogueDao extends BaseDao<BsCatalogueEntity> {
/**
* 查询所有菜单列表
*
*/
List<BsCatalogueEntity> getAllList(Map<String,Object> params);
}

View File

@ -1,64 +0,0 @@
package io.renren.modules.catalogue.dto;
import io.renren.modules.ability.dto.ai.BsAbilityAiDTO;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import io.renren.common.utils.TreeNode;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* 目录表
*
* @author Mark sunlightcs@gmail.com
* @since 3.0 2022-01-11
*/
@Data
@ApiModel(value = "目录表")
public class BsCatalogueDTO extends TreeNode<BsCatalogueDTO> implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
@ApiModelProperty(value = "类别区分")
private String classId;
private String code;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "上级代码 0-一级")
private Long pid;
@ApiModelProperty(value = "级别")
private String level;
@ApiModelProperty(value = "排序")
private String sort;
@ApiModelProperty(value = "删除状态 0-未删除 1-已删除")
private Integer isDelete;
@ApiModelProperty(value = "图标")
private String icon;
@ApiModelProperty(value = "部门")
private String department;
@ApiModelProperty(value = "简介")
private String remark2;
private String remark3;
private String remark4;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
@ApiModelProperty(value = "审核状态 ")
private Integer state;
@ApiModelProperty(value = "审核消失")
private String disappear;
@ApiModelProperty(value = "审核意见")
private String opinion;
@ApiModelProperty(value = "能力列表")
private List<BsAbilityAiDTO> abList;
}

View File

@ -1,92 +0,0 @@
package io.renren.modules.catalogue.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
/**
* 目录表
*
* @since 3.0 2022-01-11
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_catalogue")
public class BsCatalogueEntity {
private static final long serialVersionUID = 1L;
@TableId
private Long id;
/**
* 类别区分
*/
private String classId;
private String code;
/**
* 名称
*/
private String name;
/**
* 上级代码 0-一级
*/
private Long pid;
/**
* 级别
*/
private String level;
/**
* 排序
*/
private String sort;
/**
* 删除状态 0-未删除 1-已删除
*/
private Integer isDelete;
/**
* 图标
*/
private String icon;
/**
* 部门
*/
private String department;
/**
* 简介
*/
private String remark2;
private String remark3;
private String remark4;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private Long creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 审核状态
*/
private Integer state;
/***
* 审核消失
*/
private String disappear;
/**
* 审核意见
*/
private String opinion;
}

View File

@ -1,34 +0,0 @@
package io.renren.modules.catalogue.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.util.Date;
/**
* 目录表
*
* @since 3.0 2022-01-11
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsCatalogueExcel {
@ExcelProperty(value = "名称", index = 0)
private String name;
@ExcelProperty(value = "排序", index = 1)
private String sort;
@ExcelProperty(value = "图标", index = 2)
private String icon;
@ExcelProperty(value = "部门", index = 3)
private String department;
@ExcelProperty(value = "简介", index = 4)
private String remark2;
@ExcelProperty(value = "更新时间", index = 5)
private Date updateDate;
@ExcelProperty(value = "审核状态 ", index = 6)
private Integer state;
}

View File

@ -1,23 +0,0 @@
package io.renren.modules.catalogue.service;
import io.renren.common.service.CrudService;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import io.renren.modules.catalogue.entity.BsCatalogueEntity;
import io.renren.modules.sys.dto.SysMenuDTO;
import java.util.List;
import java.util.Map;
/**
* 目录表
*
* @since 3.0 2022-01-11
*/
public interface BsCatalogueService extends CrudService<BsCatalogueEntity, BsCatalogueDTO> {
/**
* 列表
*
*/
List<BsCatalogueDTO> getAllList(Map<String,Object> params);
}

View File

@ -1,51 +0,0 @@
package io.renren.modules.catalogue.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.constant.Constant;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.HttpContextUtils;
import io.renren.common.utils.TreeUtils;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import io.renren.modules.catalogue.dao.BsCatalogueDao;
import io.renren.modules.catalogue.entity.BsCatalogueEntity;
import io.renren.modules.catalogue.service.BsCatalogueService;
import io.renren.modules.sys.dto.SysMenuDTO;
import io.renren.modules.sys.entity.SysMenuEntity;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
/**
* 目录表
*
* @since 3.0 2022-01-11
*/
@Service
public class BsCatalogueServiceImpl extends CrudServiceImpl<BsCatalogueDao, BsCatalogueEntity, BsCatalogueDTO> implements BsCatalogueService {
@Override
public QueryWrapper<BsCatalogueEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsCatalogueEntity> wrapper = new QueryWrapper<>();
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String department = (String)params.get("department");
wrapper.eq(StringUtils.isNotBlank(department), "department", department);
return wrapper;
}
@Override
public List<BsCatalogueDTO> getAllList(Map<String,Object> params) {
List<BsCatalogueEntity> menuList = baseDao.getAllList(params);
List<BsCatalogueDTO> dtoList = ConvertUtils.sourceToTarget(menuList, BsCatalogueDTO.class);
return TreeUtils.build(dtoList, Constant.MENU_ROOT);
}
}

View File

@ -1,116 +0,0 @@
package io.renren.modules.comment.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.comment.dto.BsCommentDTO;
import io.renren.modules.comment.excel.BsCommentExcel;
import io.renren.modules.comment.service.BsCommentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
@RestController
@RequestMapping("comment/bscomment")
@Api(tags="审批记录")
public class BsCommentController {
@Autowired
private BsCommentService bsCommentService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("comment:bscomment:page")
public Result<PageData<BsCommentDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsCommentDTO> page = bsCommentService.page(params);
return new Result<PageData<BsCommentDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("comment:bscomment:info")
public Result<BsCommentDTO> get(@PathVariable("id") Long id){
BsCommentDTO data = bsCommentService.get(id);
return new Result<BsCommentDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("comment:bscomment:save")
public Result save(@RequestBody BsCommentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsCommentService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("comment:bscomment:update")
public Result update(@RequestBody BsCommentDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
bsCommentService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("comment:bscomment:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsCommentService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("comment:bscomment:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsCommentDTO> list = bsCommentService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "审批记录", list, BsCommentExcel.class);
}
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.comment.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.comment.entity.BsCommentEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
@Mapper
public interface BsCommentDao extends BaseDao<BsCommentEntity> {
}

View File

@ -1,44 +0,0 @@
package io.renren.modules.comment.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
@Data
@ApiModel(value = "审批记录")
public class BsCommentDTO implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
@ApiModelProperty(value = "审核类别")
private String type;
@ApiModelProperty(value = "审核时间")
private String time;
@ApiModelProperty(value = "审核人")
private String name;
@ApiModelProperty(value = "审核意见")
private String opinion;
@ApiModelProperty(value = "审核状态 0-待审 1-审核通过 2-驳回")
private Integer state;
@ApiModelProperty(value = "删除状态 0-未删除 1-已删除")
private Integer isDelete;
private String remark2;
@ApiModelProperty(value = "创建者")
private Long creator;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新者")
private Long updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
}

View File

@ -1,68 +0,0 @@
package io.renren.modules.comment.entity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.*;
import java.util.Date;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("bs_comment")
public class BsCommentEntity {
private static final long serialVersionUID = 1L;
@TableId
private Long id;
/**
* 审核类别
*/
private String type;
/**
* 审核时间
*/
private String time;
/**
* 审核人
*/
private String name;
/**
* 审核意见
*/
private String opinion;
/**
* 审核状态 0-待审 1-审核通过 2-驳回
*/
private Integer state;
/**
* 删除状态 0-未删除 1-已删除
*/
private Integer isDelete;
private String remark2;
/**
* 创建者
*/
@TableField(fill = FieldFill.INSERT)
private Long creator;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
private Date createDate;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Long updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
}

View File

@ -1,33 +0,0 @@
package io.renren.modules.comment.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.util.Date;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsCommentExcel {
@ExcelProperty(value = "审核类别", index = 0)
private String type;
@ExcelProperty(value = "审核时间", index = 1)
private Date time;
@ExcelProperty(value = "审核人", index = 2)
private String name;
@ExcelProperty(value = "审核意见", index = 3)
private String opinion;
@ExcelProperty(value = "审核状态 0-待审 1-审核通过 2-驳回", index = 4)
private Integer state;
@ExcelProperty(value = "删除状态 0-未删除 1-已删除", index = 5)
private Integer isDelete;
}

View File

@ -1,15 +0,0 @@
package io.renren.modules.comment.service;
import io.renren.common.service.CrudService;
import io.renren.modules.comment.dto.BsCommentDTO;
import io.renren.modules.comment.entity.BsCommentEntity;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
public interface BsCommentService extends CrudService<BsCommentEntity, BsCommentDTO> {
}

View File

@ -1,42 +0,0 @@
package io.renren.modules.comment.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.comment.dao.BsCommentDao;
import io.renren.modules.comment.dto.BsCommentDTO;
import io.renren.modules.comment.entity.BsCommentEntity;
import io.renren.modules.comment.service.BsCommentService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 审批记录
*
* @author Mark
* @since 3.0 2022-01-13
*/
@Service
public class BsCommentServiceImpl extends CrudServiceImpl<BsCommentDao, BsCommentEntity, BsCommentDTO> implements BsCommentService {
@Override
public QueryWrapper<BsCommentEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsCommentEntity> wrapper = new QueryWrapper<>();
String type = (String)params.get("type");
wrapper.like(StringUtils.isNotBlank(type), "type", type);
String time = (String)params.get("time");
wrapper.like(StringUtils.isNotBlank(time), "time", time);
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String state = (String)params.get("state");
wrapper.like(StringUtils.isNotBlank(state), "state", state);
return wrapper;
}
}

View File

@ -1,120 +0,0 @@
package io.renren.modules.demand.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.ExcelUtils;
import io.renren.common.utils.Result;
import io.renren.common.validator.AssertUtils;
import io.renren.common.validator.ValidatorUtils;
import io.renren.common.validator.group.AddGroup;
import io.renren.common.validator.group.DefaultGroup;
import io.renren.common.validator.group.UpdateGroup;
import io.renren.modules.demand.dto.BsDemandDTO;
import io.renren.modules.demand.excel.BsDemandExcel;
import io.renren.modules.demand.service.BsDemandService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
@RestController
@RequestMapping("/demand/bsdemand/")
@Api(tags="能力需求")
public class BsDemandController {
@Autowired
private BsDemandService bsDemandService;
@GetMapping("page")
@ApiOperation("分页")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType="String") ,
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType="String")
})
// @RequiresPermissions("demand:bsdemand:page")
public Result<PageData<BsDemandDTO>> page(@ApiIgnore @RequestParam Map<String, Object> params){
params.put("orderField","create_date");
params.put("order","desc");
PageData<BsDemandDTO> page = bsDemandService.page(params);
return new Result<PageData<BsDemandDTO>>().ok(page);
}
@GetMapping("{id}")
@ApiOperation("信息")
// @RequiresPermissions("demand:bsdemand:info")
public Result<BsDemandDTO> get(@PathVariable("id") Long id){
BsDemandDTO data = bsDemandService.get(id);
return new Result<BsDemandDTO>().ok(data);
}
@PostMapping
@ApiOperation("保存")
@LogOperation("保存")
// @RequiresPermissions("demand:bsdemand:save")
public Result save(@RequestBody BsDemandDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
bsDemandService.save(dto);
return new Result();
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
// @RequiresPermissions("demand:bsdemand:update")
public Result update(@RequestBody BsDemandDTO dto){
//效验数据
ValidatorUtils.validateEntity(dto,UpdateGroup.class, DefaultGroup.class);
bsDemandService.update(dto);
return new Result();
}
@DeleteMapping
@ApiOperation("删除")
@LogOperation("删除")
// @RequiresPermissions("demand:bsdemand:delete")
public Result delete(@RequestBody Long[] ids){
//效验数据
AssertUtils.isArrayEmpty(ids, "id");
bsDemandService.delete(ids);
return new Result();
}
@GetMapping("export")
@ApiOperation("导出")
@LogOperation("导出")
// @RequiresPermissions("demand:bsdemand:export")
public void export(@ApiIgnore @RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception {
List<BsDemandDTO> list = bsDemandService.list(params);
ExcelUtils.exportExcelToTarget(response, null, "能力需求", list, BsDemandExcel.class);
}
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.demand.dao;
import io.renren.common.dao.BaseDao;
import io.renren.modules.demand.entity.BsDemandEntity;
import org.apache.ibatis.annotations.Mapper;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Mapper
public interface BsDemandDao extends BaseDao<BsDemandEntity> {
}

View File

@ -1,52 +0,0 @@
package io.renren.modules.demand.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Data
@ApiModel(value = "能力需求")
public class BsDemandDTO implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty(value = "与bs_ability的ID对应")
private Long id;
@ApiModelProperty(value = "目录位置")
private String pcode;
@ApiModelProperty(value = "名称")
private String name;
@ApiModelProperty(value = "内容")
private String context;
@ApiModelProperty(value = "建议 ")
private String suggest;
@ApiModelProperty(value = "描述")
private String descripition;
@ApiModelProperty(value = "图片")
private String images;
@ApiModelProperty(value = "0-未删除 1-删除 默认0")
private String isDelete;
@ApiModelProperty(value = "创建者")
private String creator;
@ApiModelProperty(value = "创建时间")
private String createDate;
@ApiModelProperty(value = "更新者")
private String updater;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
@ApiModelProperty(value = "文件")
private String files;
@ApiModelProperty(value = "审核状态")
private String state;
@ApiModelProperty(value = "审核意见")
private String opinion;
}

View File

@ -1,74 +0,0 @@
package io.renren.modules.demand.entity;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.renren.common.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("bs_demand")
public class BsDemandEntity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 目录位置
*/
private String pcode;
/**
* 名称
*/
private String name;
/**
* 内容
*/
private String context;
/**
* 建议
*/
private String suggest;
/**
* 描述
*/
private String descripition;
/**
* 图片
*/
private String images;
/**
* 0-未删除 1-删除 默认0
*/
private String isDelete;
/**
* 更新者
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private String updater;
/**
* 更新时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
private Date updateDate;
/**
* 文件
*/
private String files;
/**
* 状态
*/
private String state;
/***
* 审核意见
*/
private String opinion;
}

View File

@ -1,33 +0,0 @@
package io.renren.modules.demand.excel;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import lombok.Data;
import java.util.Date;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Data
@ContentRowHeight(20)
@HeadRowHeight(20)
@ColumnWidth(25)
public class BsDemandExcel {
@ExcelProperty(value = "目录位置", index = 0)
private String pcode;
@ExcelProperty(value = "名称", index = 1)
private String name;
@ExcelProperty(value = "内容", index = 2)
private String context;
@ExcelProperty(value = "建议 ", index = 3)
private String suggest;
@ExcelProperty(value = "描述", index = 4)
private String descripition;
@ExcelProperty(value = "图片", index = 5)
private String images;
}

View File

@ -1,15 +0,0 @@
package io.renren.modules.demand.service;
import io.renren.common.service.CrudService;
import io.renren.modules.demand.dto.BsDemandDTO;
import io.renren.modules.demand.entity.BsDemandEntity;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
public interface BsDemandService extends CrudService<BsDemandEntity, BsDemandDTO> {
}

View File

@ -1,44 +0,0 @@
package io.renren.modules.demand.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.common.constant.Constant;
import io.renren.modules.demand.dao.BsDemandDao;
import io.renren.modules.demand.dto.BsDemandDTO;
import io.renren.modules.demand.entity.BsDemandEntity;
import io.renren.modules.demand.service.BsDemandService;
import io.renren.modules.security.user.SecurityUser;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import java.util.Map;
/**
* 能力需求
*
* @author wxw
* @since 3.0 2022-01-11
*/
@Service
public class BsDemandServiceImpl extends CrudServiceImpl<BsDemandDao, BsDemandEntity, BsDemandDTO> implements BsDemandService {
@Override
public QueryWrapper<BsDemandEntity> getWrapper(Map<String, Object> params){
QueryWrapper<BsDemandEntity> wrapper = new QueryWrapper<>();
String pcode = (String)params.get("pcode");
wrapper.eq(StringUtils.isNotBlank(pcode), "pcode", pcode);
String name = (String)params.get("name");
wrapper.like(StringUtils.isNotBlank(name), "name", name);
String context = (String)params.get("context");
wrapper.like(StringUtils.isNotBlank(context), "context", context);
String suggest = (String)params.get("suggest");
wrapper.like(StringUtils.isNotBlank(suggest), "suggest", suggest);
String descripition = (String)params.get("descripition");
wrapper.like(StringUtils.isNotBlank(descripition), "descripition", descripition);
return wrapper;
}
}

View File

@ -33,7 +33,6 @@ public class DevelopmentGuideController {
try {
developmentGuideService.getDevelopmentFile(request, response);
} catch (Exception e) {
System.err.println(e.getMessage());
e.printStackTrace();
new Result<>().error(500, "文件获取失败!");
}

View File

@ -28,7 +28,7 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
@Override
public void getDevelopmentFile(HttpServletRequest request, HttpServletResponse response) throws Exception {
logger.info("----------------------------------开始上传开发指南--------------------------------------------------");
String type = request.getParameter("type").toString();
String type = request.getParameter("type");
Long resourceId = Long.parseLong(request.getParameter("resourceId"));
logger.info("读取文件类型及能力ID" + type + ";" + resourceId);
String url = devModelFilePath + File.separator + type + File.separator + resourceId + ".md";
@ -62,8 +62,8 @@ public class DevelopmentGuideServiceImpl implements DevelopmentGuideService {
@Override
public void uploadDevelopmentFile(MultipartFile uploadFile, HttpServletRequest request) throws Exception{
logger.info("----------------------------------开始上传开发指南--------------------------------------------------");
String type = request.getParameter("type").toString();
String fileName = request.getParameter("fileName").toString();
String type = request.getParameter("type");
String fileName = request.getParameter("fileName");
logger.info("读取文件类型及文件名:" + type + ";" + fileName);
File folder = new File(devModelFilePath + File.separator + type + File.separator + fileName);
File path = new File(devModelFilePath + File.separator + type + File.separator);

View File

@ -222,7 +222,6 @@ public class GeneratorServiceImpl implements GeneratorService {
String path = GenUtils.getTemplateContent(template.getPath(), dataModel) + File.separator +
GenUtils.getTemplateContent(template.getFileName(), dataModel);
FileUtil.writeUtf8String(content, path);
System.out.println(path);
}
}

View File

@ -1,94 +0,0 @@
package io.renren.modules.front.controller;
import io.renren.common.annotation.LogOperation;
import io.renren.common.constant.Constant;
import io.renren.common.page.PageData;
import io.renren.common.utils.Result;
import io.renren.modules.ability.dto.ai.BsAbilityAiDTO;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.ability.service.ai.BsAbilityAiService;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import io.renren.modules.catalogue.service.BsCatalogueService;
import io.renren.modules.front.service.IndexService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.List;
import java.util.Map;
/**
* 首页数据展示
*
* @author Mark sunlightcs@gmail.com
*/
@RestController
@RequestMapping("/front/")
@Api(tags="首页接口")
public class IndexController {
@Autowired
private IndexService service;
@Autowired
private BsAbilityAiService bsAbilityAiService;
@Autowired
private BsCatalogueService bsCatalogueService;
@GetMapping("getAbilityCounts")
@ApiOperation("统计能力")
@LogOperation("统计能力")
// @ApiImplicitParam(name = "type", value = "目录ID ", paramType = "query", dataType="int")
public Result<List<BsCatalogueDTO>> getAbilityCounts(Integer type){
return service.getAbilityList(type);
}
@GetMapping("searchAblilty")
@ApiOperation("查询能力")
@LogOperation("查询能力")
@ApiImplicitParams({
@ApiImplicitParam(name = Constant.PAGE, value = "当前页码从1开始", paramType = "query", required = true, dataType="int") ,
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query",required = true, dataType="int"),
@ApiImplicitParam(name = "name", value = "名称", paramType = "query",required = false, dataType="String"),
@ApiImplicitParam(name = "shareType", value = "共享形式", paramType = "query",required = false, dataType="String"),
@ApiImplicitParam(name = "goal", value = "评价", paramType = "query",required = false, dataType="String"),
@ApiImplicitParam(name = "shareForm", value = "共享方式", paramType = "query",required = false, dataType="String"),
@ApiImplicitParam(name = "scene", value = "业务场景", paramType = "query",required = false, dataType="String"),
@ApiImplicitParam(name = "type", value = "类别", paramType = "query",required = false, dataType="String"),
@ApiImplicitParam(name = "field", value = "领域", paramType = "query",required = false, dataType="String")
})
public Result<PageData<BsAbilityAiEntity>> searchAblilty(@ApiIgnore @RequestParam Map<String, Object> params){
PageData<BsAbilityAiEntity> page = bsAbilityAiService.searchAblilty(params);
return new Result<PageData<BsAbilityAiEntity>>().ok(page);
}
@GetMapping("getAbilityCate")
@ApiOperation("能力目录")
@LogOperation("能力目录")
public Result<List<BsCatalogueDTO>> getAbilityCate() {
List<BsCatalogueDTO> page = bsCatalogueService.getAllList(null);
return new Result<List<BsCatalogueDTO>>().ok(page);
}
@GetMapping("getAbilityById/{id}")
@ApiOperation("能力详情")
@LogOperation("能力详情")
// @RequiresPermissions("ability:bsabilityai:info")
public Result<BsAbilityAiDTO> getAbilityById(@PathVariable("id") Long id){
BsAbilityAiDTO data = bsAbilityAiService.get(id);
return new Result<BsAbilityAiDTO>().ok(data);
}
}

View File

@ -1,16 +0,0 @@
package io.renren.modules.front.service;
import io.renren.common.utils.Result;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import java.util.List;
import java.util.Map;
/**
* 我的通知
*
*/
public interface IndexService {
Result<List<BsCatalogueDTO>> getAbilityList(Integer type);
}

View File

@ -1,54 +0,0 @@
package io.renren.modules.front.service.impl;
import io.renren.common.utils.ConvertUtils;
import io.renren.common.utils.Result;
import io.renren.modules.ability.dao.ai.BsAbilityAiDao;
import io.renren.modules.ability.dto.ai.BsAbilityAiDTO;
import io.renren.modules.ability.entity.ai.BsAbilityAiEntity;
import io.renren.modules.catalogue.dao.BsCatalogueDao;
import io.renren.modules.catalogue.dto.BsCatalogueDTO;
import io.renren.modules.catalogue.entity.BsCatalogueEntity;
import io.renren.modules.front.service.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 我的通知
*
*/
@Service
public class IndexServiceImpl implements IndexService {
@Autowired
BsCatalogueDao bsCatalogueDao;
@Autowired
BsAbilityAiDao bsAbilityAiDao;
@Override
public Result<List<BsCatalogueDTO>> getAbilityList(Integer type) {
//统计各分类数量
List<BsCatalogueEntity> menuList = bsCatalogueDao.getAllList(null);
List<BsCatalogueDTO> data = ConvertUtils.sourceToTarget(menuList, BsCatalogueDTO.class);
//根据type类型值 查询列表
List<BsAbilityAiEntity> abList = bsAbilityAiDao.getList(null);
Map<String, List<BsAbilityAiEntity>> dataMap = abList.stream().collect(Collectors.groupingBy(BsAbilityAiEntity::getType));
for (BsCatalogueDTO dto:data) {
List<BsAbilityAiEntity> enList = dataMap.get(dto.getId()+"");
List<BsAbilityAiDTO> list = ConvertUtils.sourceToTarget(enList, BsAbilityAiDTO.class);
dto.setAbList(list);
}
Result<List<BsCatalogueDTO>> result = new Result<List<BsCatalogueDTO>>();
result.setData(data);
return result;
}
}

View File

@ -48,7 +48,6 @@ public class SJZTController {
@PostMapping("upStream")
@ApiOperation("案件上报,调用接口上报,暂时未测试")
public Result upStream(@ApiParam(value="data,直接以json字符串的形式传递",required = true) @RequestBody String data){
System.out.println("案件上报,调用接口上报");
return sjztService.upStream(JSONObject.parseObject(data));
}
}

View File

@ -38,7 +38,6 @@ import java.time.format.DateTimeFormatter;
import java.util.*;
import java.util.concurrent.CompletableFuture;
@Service
@Log4j2
public class MonitorService {
@ -75,12 +74,9 @@ public class MonitorService {
@Value("iOgQotfgfyLvhj6WgfDTpq7F")
private String key;
// final private String userName = "chengshiyunnao";
// final private String password = "QDyjj@2021";
final private String userName = "ynszdz";
final private String password = "Admin@123";
final private String monitorDomain = "http://10.132.191.3:8314";
private static final String userName = "ynszdz";
private static final String password = "Admin@123";
private static final String monitorDomain = "http://10.132.191.3:8314";
private String token;
@ -241,8 +237,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -284,8 +278,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -327,8 +319,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -370,8 +360,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -413,8 +401,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -456,8 +442,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -499,8 +483,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -542,8 +524,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -587,8 +567,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -632,8 +610,6 @@ public class MonitorService {
ChannelPicture picture = new ChannelPicture();
picture.setChannelCode(channelCode);
picture.setPicUrl(picUrl);
/*picture.setInsertTime(new Date());
channelPictureMapper.insert(picture);*/
if (channelCode == null) {
channelPictureMapper.insert(picture);
} else {
@ -699,8 +675,6 @@ public class MonitorService {
} else {
cameraScenicMapper.updateById(cameraScenic);
}
}
} catch (Exception e) {
@ -761,33 +735,18 @@ public class MonitorService {
public String fileCode(String code) throws IOException {
String url = monitorDomain + "/videoService/realmonitor/uri?scheme=HLS&channelId=" + code;
HttpHeaders headers = new HttpHeaders();
headers.add("X-Subject-Token", token);
System.out.println(token);
ResponseEntity<HashMap> forEntity = restTemplate.exchange(url, HttpMethod.GET, new HttpEntity(headers), HashMap.class);
HashMap body = forEntity.getBody();
String file = (String) body.get("url");
return file;
}
static public List cameras = new LinkedList<Map>();
public void videoService(String parentId, String path) throws IOException, InterruptedException {
public void videoService(String parentId, String path) throws InterruptedException {
String url = monitorDomain + "/videoService/devicesManager/deviceTree?nodeType=1&typeCode=01;0;ALL;ALL&id=" + parentId;
HttpHeaders headers = new HttpHeaders();
headers.add("X-Subject-Token", token);
ResponseEntity<List> forEntity = null;
for (int i = 0; i < 10; i++) {
try {
@ -799,40 +758,25 @@ public class MonitorService {
Thread.sleep(5 * 1000);
}
}
if (forEntity == null) return;
List<Map> results = forEntity.getBody();
// log.debug("response {}", JSONObject.toJSONString(results));
String sep = "->";
for (Map result : results) {
Boolean isParent = (Boolean) result.get("isParent");
if (isParent) {
CameraOrganization cameraOrganization = JSONObject.parseObject(JSONObject.toJSONString(result), CameraOrganization.class);
cameraOrgenMapper.insert(cameraOrganization);
videoService((String) result.get("id"), path + sep + result.get("name"));
} else {
if (result.get("channelId") != null) {
} else if (result.get("channelId") != null) {
CameraChannel cameraChannel = JSONObject.parseObject(JSONObject.toJSONString(result), CameraChannel.class);
String id = (String) result.get("orgCode");
if (path != null && path.startsWith(sep)) {
path = path.substring(sep.length());
}
cameraChannel.setNodeName(path);
cameraChannel.setParentId(id);
cameraChannelMapper.insert(cameraChannel);
}
}
}
}
@ -883,17 +827,8 @@ public class MonitorService {
list.addAll(results);
}
}
// List<CameraCheck> list1 = JSONObject.parseArray(JSONObject.toJSONString(jsonArray),CameraCheck.class);
// Map<String, CameraCheck> collect = list.stream().collect(Collectors.groupingBy(
// CameraCheck::getChannelCode,
// Collectors.collectingAndThen(
// Collectors.reducing((c1, c2) -> c1.getCheckTime().compareTo(c2.getCheckTime()) > 0 ? c1 : c2), Optional::get)
// )
// );
//
//通过set对channel_code去重
Set<String> set = new HashSet<>();
for (Map m : list) {
set.add(m.get("channelCode").toString());
}
@ -911,13 +846,10 @@ public class MonitorService {
//道路统计数据与排名调用公开接口
public List<Map> roadData() {
String url = "http://outerdata.novaecs.com/api/qingdaoData/roadData?groupId={groupId}&timeType={timeType}&dt={dt}";
Map<String, Object> map = new HashMap<>();
map.put("dt", this.dateTimeStr());
map.put("groupId", 1);
map.put("timeType", "");
ResponseEntity<JSONObject> responseEntity;
List<Map> list = new ArrayList<>();
try {
@ -944,14 +876,12 @@ public class MonitorService {
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Basic dGVzdF9jbGllbnQ6ZTk4OWQ0NmZkYmMxYzM3NmMxOWE0M2FhZjg1MjI3YTQ=");
headers.add("Content-Type", "application/x-www-form-urlencoded");
MultiValueMap map = new LinkedMultiValueMap();
map.add("username", "dlwr");
map.add("password", "C61026E841A2F96E17564AB7333D92E8");//dlwr123!,需要MD5加密
map.add("scope", "read");
map.add("grant_type", "password");
map.add("vc", "NO");
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(map, headers);
ResponseEntity<JSONObject> responseEntity;
try {
@ -974,25 +904,17 @@ public class MonitorService {
String token = this.qidiToken();
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token);
Map<String, Object> map = new HashMap<>();
JSONObject search = new JSONObject();
search.put("opt", "LIKE");
search.put("key", "UPLOADTIME");
search.put("val", this.dateStr());
// search.put("opt","EQ");
// search.put("key","SPEED");
// search.put("val","0");
map.put("json", search);
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000022_2?search=[{json}]";
HttpEntity<Map> httpEntity = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity;
try {
responseEntity = restTemplate.exchange(url, HttpMethod.GET, httpEntity, JSONObject.class, map);
JSONObject jsonObject = responseEntity.getBody();
JSONArray jsonArray = jsonObject.getJSONArray("list");
log.info("[resCatalogApplyZTYS] 返回数据的数量:{}", jsonArray.size());
@ -1015,9 +937,6 @@ public class MonitorService {
search.put("opt", "LIKE");
search.put("key", "updatetime");
search.put("val", this.dateStr());
// search.put("opt","EQ");
// search.put("key","SIMKH");
// search.put("val","13302959786");
map.put("json", search);
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(null, headers);
@ -1036,7 +955,6 @@ public class MonitorService {
//工地信息
public List<Map> resCatalogApplyGDYS() {
String token = this.qidiToken();
//String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000025_1?search=[{json}]";
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_ZTYS_307013600000000025_1";
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token);
@ -1046,15 +964,11 @@ public class MonitorService {
search.put("opt", "LIKE");
search.put("key", "updatetime");
search.put("val", this.dateStr());
// search.put("opt","EQ");
// search.put("key","SSDQ");
// search.put("val","西海岸新区");
map.put("json", search);
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity;
try {
//responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class,map);
responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class);
JSONObject jsonObject = responseEntity.getBody();
JSONArray jsonArray = jsonObject.getJSONArray("list");
@ -1068,16 +982,11 @@ public class MonitorService {
//环卫车辆数据1基础
public List<Map> resCatalogApplyHJWSBase() {
String token = this.qidiToken();
//String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000365_1?search=[{json}]";
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000365_1";
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token);
Map<String, Object> map = new HashMap<>();
JSONObject search = new JSONObject();
// search.put("opt","LIKE");
// search.put("key","updatetime");
// search.put("val",this.dateStr());
search.put("opt", "EQ");
search.put("key", "SSQY");
search.put("val", "胶州市");
@ -1086,7 +995,6 @@ public class MonitorService {
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity;
try {
//responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class,map);
responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class);
JSONObject jsonObject = responseEntity.getBody();
JSONArray jsonArray = jsonObject.getJSONArray("list");
@ -1101,22 +1009,17 @@ public class MonitorService {
public List<Map> resCatalogApplyHJWSZY() {
String token = this.qidiToken();
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000363_1";
//String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000363_1?search=[{json}]";
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token);
Map<String, Object> map = new HashMap<>();
JSONObject search = new JSONObject();
// search.put("opt","LIKE");
// search.put("key","ZYRQ");
// search.put("val",this.dateStr());
map.put("json", search);
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity;
try {
responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class, map);
//responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class,map);
JSONObject jsonObject = responseEntity.getBody();
JSONArray jsonArray = jsonObject.getJSONArray("list");
return JSONObject.parseArray(JSONObject.toJSONString(jsonArray), Map.class);
@ -1126,20 +1029,18 @@ public class MonitorService {
}
}
public List<Map> resCatalogApplyHJWSZY(String updatetime) throws Exception {
public List<Map> resCatalogApplyHJWSZY(String updatetime) {
String token = this.qidiToken();
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000363_1?search=[{json}]";
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token);
List<Map> maps = new ArrayList<>();
List<Map> maps;
Map<String, Object> map = new HashMap<>();
JSONObject search = new JSONObject();
search.put("opt", "GT");
search.put("key", "updatetime");
search.put("val", updatetime);
map.put("json", search);
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity;
responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class, map);
@ -1154,24 +1055,11 @@ public class MonitorService {
public List<Map> resCatalogApplyHJWSRoad() {
String token = this.qidiToken();
String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000370_2";
//String url = "http://120.221.95.13:9090/catalog/resCatalogApply/getData/UC_QUERY_HJWS_307013400000000370_2?search=[{json}]";
HttpHeaders headers = new HttpHeaders();
headers.add("Authorization", "Bearer " + token);
Map<String, Object> map = new HashMap<>();
// JSONObject search = new JSONObject();
// search.put("opt","LIKE");
// search.put("key","updatetime");
// search.put("val",this.dateStr());
// search.put("opt","EQ");
// search.put("key","QDLKDLMC");
// search.put("val","宜昌路");
// map.put("json",search);
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<>(null, headers);
ResponseEntity<JSONObject> responseEntity;
try {
//responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class,map);
responseEntity = restTemplate.exchange(url, HttpMethod.GET, request, JSONObject.class);
JSONObject jsonObject = responseEntity.getBody();
JSONArray jsonArray = jsonObject.getJSONArray("list");

View File

@ -55,11 +55,8 @@ public class PassengerFlowService {
* @param
* @return List
*/
//{"APIKEY":"202204141052331249fcc8-046","ParamJson":{"data":"{\"appId\":\"apitest\",\"mac\":\"f51093001255129b88deba6c5045ee26\",\"timeStamp\":\"20220510152759\",\"hourId\":\"2022051013\",\"timeId\":\"202205101300\"}"}}
public List<Map> passengerFlow(){
//JSONObject map = new JSONObject();
Map<String,Object> map = new HashMap<>();
//MultiValueMap<String,Object> map = new LinkedMultiValueMap<>();
DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
LocalDateTime dateNow = LocalDateTime.now();
@ -70,30 +67,23 @@ public class PassengerFlowService {
map.put("APIKEY",APIKEY);
JSONObject jsonObject = new JSONObject();
jsonObject.put("appId",appId);
//安全认证 MD5(appId+-+timeStamp+-+ appSecret)
String code = appId+"-"+timeStamp+"-"+ appSecret;
String md5Str = DigestUtils.md5DigestAsHex(code.getBytes(StandardCharsets.UTF_8));
jsonObject.put("mac",md5Str);
jsonObject.put("timeStamp",timeStamp);
jsonObject.put("hourId",tt[1]);
jsonObject.put("timeId",tt[0]);
//jsonObject.put("apiType","***");
JSONObject para = new JSONObject();
para.put("data",JSONObject.toJSONString(jsonObject));
map.put("ParamJson",para);
System.out.println("multimap->"+map.toString());
log.info("[passengerFlow] ->",map.toString());
ResponseEntity<String> responseEntity;
List<Map> list = new ArrayList<>();
try{
responseEntity = restTemplate.postForEntity(url,map,String.class);
//System.out.println(responseEntity.getStatusCodeValue());
if(responseEntity.getStatusCodeValue() == 200){
String result = responseEntity.getBody();
//System.out.println("passengerFlow ->"+result);
JSONObject jsonResult = JSONObject.parseObject(result);
System.out.println(jsonResult.keySet().toString());
if(jsonResult.getIntValue("code") == 0){
JSONArray jsonArray = jsonResult.getJSONArray("result");
list = JSONObject.parseArray(JSONObject.toJSONString(jsonArray),Map.class);
@ -106,8 +96,8 @@ public class PassengerFlowService {
}
//从表中获取最新的实时客流
public List<PassengerFlow> listPassengerFlow(String timeId){
List<PassengerFlow> lists = new ArrayList<>();
long longTimeId = Long.valueOf(timeId);
List<PassengerFlow> lists;
long longTimeId = Long.parseLong(timeId);
if(longTimeId == 1970000000){
PassengerFlow passengerFlow = passengerFlowMapper.getByMaxId();
timeId = passengerFlow.getTimeId();
@ -132,13 +122,11 @@ public class PassengerFlowService {
//提供的接口能查到当前时间2个小时之前的数据每隔15分钟一次我们只取整点从早8点到晚8点的整点数据
//10:31 到晚上1031每小时的31分执行一次
public void passengerFlowSchedule(){
//JSONObject map = new JSONObject();
Map<String,Object> map = new HashMap<>();
//MultiValueMap<String,Object> map = new LinkedMultiValueMap<>();
DateTimeFormatter dateTimeFormatter1 = DateTimeFormatter.ofPattern("yyyyMMddHHmmss");
LocalDateTime dateNow = LocalDateTime.now();
String timeStamp = dateNow.format(dateTimeFormatter1);//yyyyMMddHHmmss
String timeStamp = dateNow.format(dateTimeFormatter1);
String[] tt = this.minusMinutesStr(dateNow,120);
String url = "http://15.72.158.72:8081/getway/api/Proxy/HandleByKey/1249fcc8-0466-4897-87b4-d2111a9baf4f";
@ -152,22 +140,16 @@ public class PassengerFlowService {
jsonObject.put("timeStamp",timeStamp);
jsonObject.put("hourId",tt[1]);
jsonObject.put("timeId",tt[0]);
//jsonObject.put("apiType","***");
JSONObject para = new JSONObject();
para.put("data",JSONObject.toJSONString(jsonObject));
map.put("ParamJson",para);
System.out.println("multimap->"+map.toString());
ResponseEntity<String> responseEntity;
List<Map> list = new ArrayList<>();
List<Map> list;
try{
responseEntity = restTemplate.postForEntity(url,map,String.class);
//System.out.println(responseEntity.getStatusCodeValue());
if(responseEntity.getStatusCodeValue() == 200){
String result = responseEntity.getBody();
//System.out.println("passengerFlow ->"+result);
JSONObject jsonResult = JSONObject.parseObject(result);
System.out.println(jsonResult.keySet().toString());
if(jsonResult.getIntValue("code") == 0){
JSONArray jsonArray = jsonResult.getJSONArray("result");
list = JSONObject.parseArray(JSONObject.toJSONString(jsonArray),Map.class);
@ -233,9 +215,7 @@ public class PassengerFlowService {
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm");
DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyyMMddHH");
String time1 = minus.format(dateTimeFormatter);
System.out.println(time1);
String mm = time1.substring(time1.length() -2,time1.length());
System.out.println(mm);
if(0 < Integer.parseInt(mm) &&Integer.parseInt(mm)>=30){
t1 = time1.substring(0,time1.length() -2)+"00";
}else if(Integer.parseInt(mm)<30){
@ -246,7 +226,6 @@ public class PassengerFlowService {
}
t2 = t1.substring(0,t1.length()-2);
System.out.println("t1->"+t1+"...t2->"+t2);
return new String[]{t1,t2};
}
@ -255,29 +234,15 @@ public class PassengerFlowService {
String t1,t2;//t1 yyyyMMddHHmm t2 yyyyMMddHH
LocalDateTime minus = datetime.minus(125, ChronoUnit.MINUTES);
DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyyMMddHHmm");
DateTimeFormatter dateTimeFormatter2 = DateTimeFormatter.ofPattern("yyyyMMddHH");
String time1 = minus.format(dateTimeFormatter);
System.out.println(time1);
String mm = time1.substring(time1.length() -2,time1.length());
System.out.println(mm);
Integer i = Integer.parseInt(mm)/15;
if(i == 0){
t1 = time1.substring(0,time1.length() -2)+"00";
}else{
t1 = time1.substring(0,time1.length() -2)+String.valueOf(15*i);
}
// if(0 < Integer.parseInt(mm) &&Integer.parseInt(mm)<=30){
// t1 = time1.substring(0,time1.length() -2)+"00";
// }else if(Integer.parseInt(mm) > 30){
// LocalDateTime lastHour = LocalDateTime.parse(time1,dateTimeFormatter).plus(1,ChronoUnit.HOURS);
// t1 = lastHour.format(dateTimeFormatter2)+"30";
// }else{
// t1 = time1;
// }
t2 = t1.substring(0,t1.length()-2);
System.out.println("t1->"+t1+"...t2->"+t2);
return new String[]{t1,t2};
}
}

View File

@ -155,8 +155,6 @@ public class SJZTService {
log.info("[SJZTService-batchSave] exception:{}", e.getMessage());
}
} while(roundCount <=count);
System.out.println(mapList.size());
IdentifierGenerator identifierGenerator=new DefaultIdentifierGenerator();
mapList.forEach(m-> m.put("id",identifierGenerator.nextId(new Object())));//给id赋值

View File

@ -82,7 +82,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
*/
@Override
public Long countUserResourceApply(Long userId, Long resourceId) {
return null;
return baseDao.countUserResourceApply(userId, resourceId);
}

View File

@ -1,19 +1,4 @@
/**
* Copyright 2018 人人开源 https://www.renren.io
* <p>
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* <p>
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* <p>
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/package io.renren.modules.security.password;
package io.renren.modules.security.password;
/**
* 密码工具类
@ -43,13 +28,4 @@ public class PasswordUtils {
return passwordEncoder.matches(str, password);
}
public static void main(String[] args) {
String str = "admin";
String password = encode(str);
System.out.println(password);
System.out.println(matches(str, password));
}
}

View File

@ -91,44 +91,5 @@ public class ShangTangController {
});
});
});
// for (int i = 0; i < tamplateList.orElse(new JSONArray()).size(); i++) {
// Map<String, Object> key = (Map<String, Object>) tamplateList.get().get(i);
// String eventType = (String) key.get("eventType");
// String eventCnName = (String) key.get("eventCnName");
// JSONObject taskListBody = shangTangService.tasklist(eventType);
// if (taskListBody.size() > 0) {
// JSONObject taskdatajobj = taskListBody.getJSONObject("data");
// if (taskdatajobj != null) {
// JSONArray taskdatajobjJSONArray = taskdatajobj.getJSONArray("dataList");
// if (taskdatajobjJSONArray != null) {
// for (int j = 0; j < taskdatajobjJSONArray.size(); j++) {
// Map<String, Object> key1 = (Map<String, Object>) taskdatajobjJSONArray.get(j);
//
// String taskSerial = (String) key1.get("taskSerial");
// Integer taskStatus = (Integer) key1.get("taskStatus");
//
// JSONObject taskDetailObj = shangTangService.tasklistDetail(taskSerial);
// JSONObject taskDetail = taskDetailObj.getJSONObject("data");
//
// TaskListControllerEntity taskListobj = new TaskListControllerEntity();
//
// if (taskDetail != null) {
// String taskName = taskDetail.getString("taskName");
// taskListobj.setTaskName(taskName);
// } else {
// taskListobj.setTaskName("任务停止");
// }
//
// taskListobj.setTaskSerial(taskSerial);
// taskListobj.setTaskStatus(taskStatus);
//
// taskListobj.setEventType(eventType);
// taskListobj.setEventCnName(eventCnName);
// taskListControllerDao.insert(taskListobj);
// }
// }
// }
// }
// }
}
}

View File

@ -1,7 +1,9 @@
package io.renren.modules.taskList.service;
import com.alibaba.fastjson.JSONObject;
import io.renren.common.interceptor.ShangTangTaskProperties;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.*;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;
@ -17,11 +19,13 @@ public class ShangTangService {
@Resource
private RestTemplate restTemplate;
@Autowired
private ShangTangTaskProperties shangTangTaskProperties;
//1.登录
//2.获取token
public String shangtangToken() {
String url = "http://10.132.191.54:10270/whale-open-api/tenant/token";
String url = shangTangTaskProperties.getToken_url();
Map<String, Object> map = new HashMap<>();
map.put("accessKey", "a1ddCV7z7Jhv0SBGx5O3hblO");
@ -43,7 +47,7 @@ public class ShangTangService {
//订阅任务下发接口
public JSONObject subscribe() {
String token = this.shangtangToken();
String url = "https://10.132.191.54:10270/whale-open-api/subscribe";
String url = shangTangTaskProperties.getSubscribe_url();
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
@ -52,7 +56,7 @@ public class ShangTangService {
headers.add("tid", "default");
Map<String, Object> map = new HashMap<>();
map.put("callBackUrl", "https://15.2.23.163:7010/STapi/project/receive");
map.put("callBackUrl", shangTangTaskProperties.getSubscribe_callback_url());
// map.put("certPubKey","");
map.put("subscribeType", 3);
// map.put("taskId","serial");
@ -73,7 +77,7 @@ public class ShangTangService {
//事件模板分页查询接口
public JSONObject template() {
String token = this.shangtangToken();
String url = "http://10.132.191.54:10270/whale-open-api/scenario/event/template?pageNum=1&pageSize=1000";
String url = shangTangTaskProperties.getTemplate_url();
HttpHeaders headers = new HttpHeaders();
headers.add("token", token);
@ -94,14 +98,14 @@ public class ShangTangService {
//场景任务列表查询接口
public JSONObject tasklist(String eventType) {
String token = this.shangtangToken();
String url = "http://10.132.191.54:10270/whale-open-api/scenario/event-task/list";
String url = shangTangTaskProperties.getTasklist_url();
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
headers.add("token", token);
headers.add("tid", "default");
//需要传的参数
// 需要传的参数
// "eventType": "${appletId}-${eventType}", // 事件唯一标识
// "pageNum": "integer (int32)",
// "pageSize": "integer (int32)",
@ -129,7 +133,7 @@ public class ShangTangService {
//场景任务详情查询接口
public JSONObject tasklistDetail(String taskSerial) {
String token = this.shangtangToken();
String url = "http://10.132.191.54:10270/whale-open-api/scenario/event-task/" + taskSerial;
String url = shangTangTaskProperties.getTasklistdetail_url() + taskSerial;
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);

View File

@ -0,0 +1,80 @@
package io.renren.modules.taskList.task;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import io.renren.modules.job.task.ITask;
import io.renren.modules.taskList.dao.TaskListControllerDao;
import io.renren.modules.taskList.entity.TaskListControllerEntity;
import io.renren.modules.taskList.service.ShangTangService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Map;
import java.util.Optional;
/**
* 商汤 场景任务列表插入
*/
@Component("insertTaskListJob")
public class InsertTaskListJob implements ITask {
private static Logger logger = LoggerFactory.getLogger(InsertTaskListJob.class);
@Autowired
private ShangTangService shangTangService;
@Autowired
private TaskListControllerDao taskListControllerDao;
/**
* 执行定时任务接口
*
* @param params 参数多参数使用JSON数据
*/
@Override
public void run(String params) {
logger.info("insertTaskList!");
taskListControllerDao.deleteAll();
Optional<JSONObject> jobj = Optional.ofNullable(shangTangService.template());
Optional<JSONObject> datajobj = Optional.ofNullable(jobj.orElse(new JSONObject()).getJSONObject("data"));
Optional<JSONArray> tamplateList = Optional.ofNullable(datajobj.orElse(new JSONObject()).getJSONArray("dataList"));
tamplateList.orElse(new JSONArray()).parallelStream().forEach(index -> {
Map<String, Object> key = (Map<String, Object>) index;
String eventType = (String) key.get("eventType");
String eventCnName = (String) key.get("eventCnName");
JSONObject taskListBody = shangTangService.tasklist(eventType);
if (taskListBody.isEmpty()) {
return;
}
Optional<JSONObject> taskdatajobj = Optional.ofNullable(taskListBody.getJSONObject("data"));
taskdatajobj.ifPresent(task -> {
Optional<JSONArray> taskdatajobjJSONArray = Optional.ofNullable(task.getJSONArray("dataList"));
taskdatajobjJSONArray.orElse(new JSONArray()).stream().forEach(index_ -> {
Map<String, Object> key1 = (Map<String, Object>) index_;
String taskSerial = (String) key1.get("taskSerial");
Integer taskStatus = (Integer) key1.get("taskStatus");
Optional<JSONObject> taskDetailObj = Optional.ofNullable(shangTangService.tasklistDetail(taskSerial));
JSONObject taskDetail = taskDetailObj.orElse(new JSONObject()).getJSONObject("data");
TaskListControllerEntity taskListobj = new TaskListControllerEntity();
if (taskDetail != null) {
String taskName = taskDetail.getString("taskName");
taskListobj.setTaskName(taskName);
} else {
taskListobj.setTaskName("任务停止");
}
taskListobj.setTaskSerial(taskSerial);
taskListobj.setTaskStatus(taskStatus);
taskListobj.setEventType(eventType);
taskListobj.setEventCnName(eventCnName);
taskListControllerDao.insert(taskListobj);
});
});
});
}
}

View File

@ -37,8 +37,6 @@ public class ShangTangWarningController {
content.append(new String(b, 0, lens));
}
String strcont = content.toString();// 内容
System.out.println(strcont);
JSONObject jsonObject = JSONObject.parseObject(strcont);
WarningListControllerEntity event = new WarningListControllerEntity();

View File

@ -1,272 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.ability.dao.ai.BsAbilityAiDao">
<resultMap type="io.renren.modules.ability.entity.ai.BsAbilityAiEntity" id="bsAbilityAiMap">
<result property="id" column="id"/>
<result property="isDelete" column="is_delete"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="name" column="name"/>
<result property="version" column="version"/>
<result property="visitUrl" column="visit_url"/>
<result property="subtext" column="subtext"/>
<result property="context" column="context"/>
<result property="imgurl" column="imgurl"/>
<result property="type" column="type"/>
<result property="shareType" column="share_type"/>
<result property="goal" column="goal"/>
<result property="shareForm" column="share_form"/>
<result property="field" column="field"/>
<result property="scene" column="scene"/>
<result property="deptId" column="dept_id"/>
<result property="onlineDate" column="online_date"/>
<result property="content" column="content"/>
<result property="rank" column="rank"/>
<result property="useInfo" column="use_info"/>
<result property="remarks" column="remarks"/>
<result property="isUp" column="is_up"/>
<result property="updateDate" column="update_date"/>
<result property="contentImg" column="content_img"/>
</resultMap>
<select id="getList" resultType="io.renren.modules.ability.entity.ai.BsAbilityAiEntity">
SELECT
tab.*
FROM
(
SELECT
b1.id,
b1.NAME,
b1.subtext,
b1.context,
b1.imgurl,
b1.type,
b1.dept_id,
b1.share_type,
b1.online_date,
b1.goal,
b1.share_form,
b1.field,
b1.scene,
b1.rank,
b1.create_date,
b1.visit_url,
b1.content,
b1.content_img,
1 AS "kind"
FROM
bs_ability_ai b1
WHERE
b1.is_delete = 0 UNION
SELECT
b2.id,
b2.NAME,
b2.subtext,
b2.context,
b2.imgurl,
b2.type,
b2.dept_id,
b2.share_type,
b2.online_date,
b2.goal,
b2.share_form,
b2.field,
b2.scene,
b2.rank,
b2.create_date,
b2.visit_url,
b2.content,
b2.content_img,
3 AS "kind"
FROM
bs_ability_layer b2
WHERE
b2.is_delete = 0 UNION
SELECT
b3.id,
b3.NAME,
b3.subtext,
b3.context,
b3.imgurl,
b3.type,
b3.dept_id,
b3.share_type,
b3.online_date,
b3.goal,
b3.share_form,
b3.field,
b3.scene,
b3.rank,
b3.create_date,
b3.visit_url,
b3.content,
b3.content_img,
2 AS "kind"
FROM
bs_ability_service b3
WHERE
b3.is_delete = 0 UNION
SELECT
b4.id,
b4.NAME,
b4.dept_id,
b4.subtext,
b4.context,
b4.type,
b4.imgurl,
b4.share_type,
b4.online_date,
b4.goal,
b4.share_form,
b4.field,
b4.scene,
b4.rank,
b4.create_date,
"" AS visit_url,
"" AS content,
b4.content_img,
4 AS "kind"
FROM
bs_ability_video b4
WHERE
b4.is_delete = 0 UNION
SELECT
b5.id,
b5.NAME,
b5.subtext,
b5.context,
b5.imgurl,
b5.type,
b5.dept_id,
b5.share_type,
b5.online_date,
b5.goal,
b5.share_form,
b5.field,
b5.scene,
b5.rank,
b5.create_date,
b5.visit_url,
b5.content,
b5.content_img,
5 AS "kind"
FROM
bs_ability_basebuild b5
WHERE
b5.is_delete = 0 UNION
SELECT
b6.id,
b6.NAME,
b6.subtext,
b6.context,
b6.imgurl,
b6.type,
b6.dept_id,
b6.share_type,
b6.online_date,
b6.goal,
b6.share_form,
b6.field,
b6.scene,
b6.rank,
b6.create_date,
b6.visit_url,
b6.content,
b6.content_img,
6 AS "kind"
FROM
bs_ability_system b6
WHERE
b6.is_delete = 0
) tab
WHERE
1 =1
<if test="name != null and name.trim() != ''">
and tab.name like CONCAT("%",#{name},"%")
</if>
<if test="type != null and type.trim() != ''">
and tab.type = #{type}
</if>
<if test="shareType != null and shareType.trim() != ''">
and tab.share_type = #{shareType}
</if>
<if test="goal != null and goal.trim() != ''">
<![CDATA[ and (tab.goal >= #{goal} and tab.goal < #{goal}+1 )]]>
</if>
<if test="field != null and field.trim() != ''">
and tab.field = #{field}
</if>
<if test="shareForm != null and shareForm.trim() != ''">
and tab.share_form = #{shareForm}
</if>
<if test="scene != null and scene.trim() != ''">
and tab.scene = #{scene}
</if>
order by tab.create_date desc
</select>
<insert id="insertSelective">
insert into bs_ability_ai
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="isDelete != null">is_delete,</if>
<if test="updater != null">updater,</if>
<if test="name != null">name,</if>
<if test="version != null">version,</if>
<if test="visitUrl != null">visit_url,</if>
<if test="subtext != null">subtext,</if>
<if test="context != null">context,</if>
<if test="imgurl != null">imgurl,</if>
<if test="type != null">type,</if>
<if test="shareType != null">share_type,</if>
<if test="goal != null">goal,</if>
<if test="shareForm != null">share_form,</if>
<if test="field != null">field,</if>
<if test="scene != null">scene,</if>
<if test="deptId != null">dept_id,</if>
<if test="onlineDate != null">online_date,</if>
<if test="content != null">content,</if>
<if test="rank != null">rank,</if>
<if test="useInfo != null">use_info,</if>
<if test="remarks != null">remarks,</if>
<if test="isUp != null">is_up,</if>
<if test="updateDate != null">update_date,</if>
<if test="contentImg != null">content_img,</if>
<if test="id != null">id,</if>
<if test="creator != null">creator,</if>
<if test="createDate != null">create_date,</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">#{id,jdbcType=NUMERIC},</if>
<if test="isDelete != null">#{isDelete,jdbcType=VARCHAR},</if>
<if test="updater != null">#{updater,jdbcType=VARCHAR},</if>
<if test="name != null">#{name,jdbcType=VARCHAR},</if>
<if test="version != null">#{version,jdbcType=VARCHAR},</if>
<if test="visitUrl != null">#{visitUrl,jdbcType=VARCHAR},</if>
<if test="subtext != null">#{subtext,jdbcType=VARCHAR},</if>
<if test="context != null">#{context,jdbcType=VARCHAR},</if>
<if test="imgurl != null">#{imgurl,jdbcType=VARCHAR},</if>
<if test="type != null">#{type,jdbcType=VARCHAR},</if>
<if test="shareType != null">#{shareType,jdbcType=VARCHAR},</if>
<if test="goal != null">#{goal,jdbcType=VARCHAR},</if>
<if test="shareForm != null">#{shareForm,jdbcType=VARCHAR},</if>
<if test="field != null">#{field,jdbcType=VARCHAR},</if>
<if test="scene != null">#{scene,jdbcType=VARCHAR},</if>
<if test="deptId != null">#{deptId,jdbcType=VARCHAR},</if>
<if test="onlineDate != null">#{onlineDate,jdbcType=VARCHAR},</if>
<if test="content != null">#{content,jdbcType=VARCHAR},</if>
<if test="rank != null">#{rank,jdbcType=VARCHAR},</if>
<if test="useInfo != null">#{useInfo,jdbcType=VARCHAR},</if>
<if test="remarks != null">#{remarks,jdbcType=VARCHAR},</if>
<if test="isUp != null">#{isUp,jdbcType=VARCHAR},</if>
<if test="updateDate != null">#{updateDate,jdbcType=VARCHAR},</if>
<if test="contentImg != null">#{contentImg,jdbcType=VARCHAR},</if>
<if test="id != null">#{id,jdbcType=NUMERIC},</if>
<if test="creator != null">#{creator,jdbcType=NUMERIC},</if>
<if test="createDate != null">#{createDate,jdbcType=TIMESTAMP},</if>
</trim>
</insert>
</mapper>

View File

@ -1,22 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.ability.dao.layer.BsAbilityLayerDao">
<resultMap type="io.renren.modules.ability.entity.layer.BsAbilityLayerEntity" id="bsAbilityLayerMap">
<result property="id" column="id"/>
<result property="visitUrl" column="visit_url"/>
<result property="type" column="type"/>
<result property="context" column="context"/>
<result property="version" column="version"/>
<result property="keywords" column="keywords"/>
<result property="unit" column="unit"/>
<result property="isDelete" column="is_delete"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
<result property="contentImg" column="content_img"/>
</resultMap>
</mapper>

View File

@ -1,35 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.ability.dao.service.BsAbilityServiceDao">
<resultMap type="io.renren.modules.ability.entity.service.BsAbilityServiceEntity" id="bsAbilityServiceMap">
<result property="id" column="id"/>
<result property="visitUrl" column="visit_url"/>
<result property="content" column="content"/>
<result property="isDelete" column="is_delete"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="name" column="name"/>
<result property="subtext" column="subtext"/>
<result property="context" column="context"/>
<result property="imgurl" column="imgurl"/>
<result property="img" column="img"/>
<result property="type" column="type"/>
<result property="shareType" column="share_type"/>
<result property="onlineDate" column="online_date"/>
<result property="goal" column="goal"/>
<result property="shareForm" column="share_form"/>
<result property="field" column="field"/>
<result property="scene" column="scene"/>
<result property="rank" column="rank"/>
<result property="deptId" column="dept_id"/>
<result property="useInfo" column="use_info"/>
<result property="remarks" column="remarks"/>
<result property="updateDate" column="update_date"/>
<result property="isUp" column="is_up"/>
<result property="contentImg" column="content_img"/>
</resultMap>
</mapper>

View File

@ -1,38 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.ability.dao.video.BsAbilityVideoDao">
<resultMap type="io.renren.modules.ability.entity.video.BsAbilityVideoEntity" id="bsAbilityVideoMap">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="type" column="type"/>
<result property="deptId" column="dept_id"/>
<result property="location" column="location"/>
<result property="longitude" column="longitude"/>
<result property="latitude" column="latitude"/>
<result property="roadCode" column="road_code"/>
<result property="deviceId" column="device_id"/>
<result property="factory" column="factory"/>
<result property="isDelete" column="is_delete"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
<result property="subtext" column="subtext"/>
<result property="context" column="context"/>
<result property="imgurl" column="imgurl"/>
<result property="shareType" column="share_type"/>
<result property="onlineDate" column="online_date"/>
<result property="goal" column="goal"/>
<result property="shareForm" column="share_form"/>
<result property="field" column="field"/>
<result property="scene" column="scene"/>
<result property="rank" column="rank"/>
<result property="useInfo" column="use_info"/>
<result property="remarks" column="remarks"/>
<result property="isUp" column="is_up"/>
<result property="contentImg" column="content_img"/>
</resultMap>
</mapper>

View File

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.abilityRecord.dao.BsAbilityRecordDao">
<resultMap type="io.renren.modules.abilityRecord.entity.BsAbilityRecordEntity" id="bsAbilityRecordMap">
<result property="id" column="id"/>
<result property="deptId" column="dept_id"/>
<result property="useDateYear" column="use_date_year"/>
<result property="useDateMonth" column="use_date_month"/>
<result property="useDateDate" column="use_date_date"/>
<result property="redId" column="red_id"/>
<result property="type" column="type"/>
<result property="isDelete" column="is_delete"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
<resultMap id="getMapResult" type="HashMap">
</resultMap>
<select id="getAnalysis" resultMap="getMapResult">
select
<if test=" type == 0 ">
dept_id as name,
</if>
<if test=" type == 1 ">
use_date_year as name,
</if>
<if test=" type == 2 ">
use_date_month as name,
</if>
<if test=" type == 3 ">
use_date_date as name,
</if>
count(1) as count
from bs_ability_record
GROUP BY
<if test=" type == 0 ">
dept_id
</if>
<if test=" type == 1 ">
use_date_year
</if>
<if test=" type == 2 ">
use_date_month
</if>
<if test=" type == 3 ">
use_date_date
</if>
ORDER BY count(1) desc
</select>
<select id="rank" resultType="io.renren.modules.abilityRecord.entity.BsAbilityRecordEntity">
select tab.* from (select a.name,count(1) as count
from bs_ability_record r left join bs_ability_ai a on r.red_id = a.id
where r.is_delete = 0
<if test="deptId != null and deptId.trim() != ''">
and r.dept_id = #{deptId}
</if>
<if test="startTime != null and startTime.trim() != ''">
and r.use_date_date >= #{startTime}
</if>
<if test="endTime != null and endTime.trim() != ''">
and #{endTime} >= r.use_date_date
</if>
GROUP BY a.name ) tab ORDER BY tab.count desc
</select>
</mapper>

View File

@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="io.renren.modules.applyRecord.dao.BsAbilityApplyRecordDao">
<resultMap type="io.renren.modules.applyRecord.entity.BsAbilityApplyRecordEntity" id="bsAbilityApplyRecordMap">
<result property="id" column="id"/>
<result property="supply" column="supply"/>
<result property="applyDept" column="apply_dept"/>
<result property="applyUser" column="apply_user"/>
<result property="userInfo" column="user_info"/>
<result property="redId" column="red_id"/>
<result property="sysName" column="sys_name"/>
<result property="isDelete" column="is_delete"/>
<result property="creator" column="creator"/>
<result property="createDate" column="create_date"/>
<result property="updater" column="updater"/>
<result property="updateDate" column="update_date"/>
</resultMap>
</mapper>

Some files were not shown because too many files have changed in this diff Show More