56 changed files with 890 additions and 84 deletions
@ -0,0 +1,78 @@ |
|||
package com.yxt.oms.apiadmin.aggregation; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.biz.func.systemlog.*; |
|||
import com.yxt.oms.feign.portal.systemlog.SystemLogFeign; |
|||
import io.swagger.annotations.Api; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import javax.annotation.Resource; |
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.systemlog.SystemLogRest <br/> |
|||
* Description: 系统日志表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "系统日志表") |
|||
@RestController |
|||
@RequestMapping("apiadmin/systemlog") |
|||
public class SystemLogRest implements SystemLogFeign { |
|||
|
|||
@Resource |
|||
private SystemLogService systemLogService; |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<SystemLogVo>> listPage(@RequestBody PagerQuery<SystemLogQuery> pq){ |
|||
return systemLogService.listPageVo(pq); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<SystemLogVo>> listAll(@RequestBody SystemLogQuery query){ |
|||
return systemLogService.listAllVo(query); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<SystemLogVo>> list(){ |
|||
return systemLogService.listVo(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(SystemLogDto dto){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
systemLogService.saveOrUpdateDto(dto); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean update(SystemLogDto dto,String sid){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
systemLogService.updateBySid(dto.toMap(),sid); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean del(String ids){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
systemLogService.delByIds(ids); |
|||
return rb.success(); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<SystemLogVo> fetch(String id){ |
|||
return systemLogService.fetchByIdVo(id); |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.oms.biz.func.systemlog; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.yxt.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLog.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLog <br/> |
|||
* Description: 系统日志表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "系统日志表", description = "系统日志表") |
|||
@TableName("system_log") |
|||
@Data |
|||
public class SystemLog extends BaseEntity { |
|||
private static final long serialVersionUID = 1L; |
|||
@ApiModelProperty("事件名称或类别") |
|||
private String eventName; |
|||
|
|||
@ApiModelProperty("事件内容") |
|||
private String eventContent; |
|||
|
|||
@ApiModelProperty("事件url") |
|||
private String eventUrl; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("用户名") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty("用户iP") |
|||
private String userIp; |
|||
} |
@ -0,0 +1,46 @@ |
|||
package com.yxt.oms.biz.func.systemlog; |
|||
|
|||
|
|||
import com.yxt.common.core.dto.Dto; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Builder; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogDto.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogDto <br/> |
|||
* Description: 系统日志表 数据传输对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Builder |
|||
@ApiModel(value = "系统日志表 数据传输对象", description = "系统日志表 数据传输对象") |
|||
@Data |
|||
public class SystemLogDto implements Dto { |
|||
|
|||
|
|||
@ApiModelProperty("事件名称或类别") |
|||
private String eventName; |
|||
|
|||
@ApiModelProperty("事件内容") |
|||
private String eventContent; |
|||
|
|||
@ApiModelProperty("事件url") |
|||
private String eventUrl; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("用户名") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty("用户iP") |
|||
private String userIp; |
|||
} |
@ -0,0 +1,38 @@ |
|||
package com.yxt.oms.biz.func.systemlog; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper; |
|||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.baomidou.mybatisplus.core.toolkit.Constants; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
import org.apache.ibatis.annotations.Select; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogMapper.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.systemlog.SystemLogMapper <br/> |
|||
* Description: 系统日志表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Mapper |
|||
public interface SystemLogMapper extends BaseMapper<SystemLog> { |
|||
|
|||
//@Update("update system_log set name=#{msg} where id=#{id}")
|
|||
//IPage<SystemLogVo> voPage(IPage<SystemLog> page, @Param(Constants.WRAPPER) QueryWrapper<SystemLog> qw);
|
|||
|
|||
IPage<SystemLogVo> selectPageVo(IPage<SystemLog> page, @Param(Constants.WRAPPER) Wrapper<SystemLog> qw); |
|||
|
|||
List<SystemLogVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<SystemLog> qw); |
|||
|
|||
@Select("select * from system_log") |
|||
List<SystemLogVo> selectListVo(); |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?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="com.yxt.oms.biz.func.systemlog.SystemLogMapper"> |
|||
<!-- <where> ${ew.sqlSegment} </where>--> |
|||
<!-- ${ew.customSqlSegment} --> |
|||
<select id="selectPageVo" resultType="com.yxt.oms.biz.func.systemlog.SystemLogVo"> |
|||
SELECT * FROM system_log <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
|
|||
<select id="selectListAllVo" resultType="com.yxt.oms.biz.func.systemlog.SystemLogVo"> |
|||
SELECT * FROM system_log <where> ${ew.sqlSegment} </where> |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,44 @@ |
|||
package com.yxt.oms.biz.func.systemlog; |
|||
|
|||
|
|||
import com.yxt.common.core.query.Query; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogQuery.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogQuery <br/> |
|||
* Description: 系统日志表 查询条件. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "系统日志表 查询条件", description = "系统日志表 查询条件") |
|||
@Data |
|||
public class SystemLogQuery implements Query { |
|||
|
|||
|
|||
@ApiModelProperty("事件名称或类别") |
|||
private String eventName; |
|||
|
|||
@ApiModelProperty("事件内容") |
|||
private String eventContent; |
|||
|
|||
@ApiModelProperty("事件url") |
|||
private String eventUrl; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("用户名") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty("用户iP") |
|||
private String userIp; |
|||
} |
@ -0,0 +1,59 @@ |
|||
package com.yxt.oms.biz.func.systemlog; |
|||
|
|||
import com.yxt.common.base.service.MybatisBaseService; |
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.feign.portal.systemlog.SystemLogFeign; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogService.java <br/> |
|||
* Class: com.yxt.anrui.portal.biz.systemlog.SystemLogService <br/> |
|||
* Description: 系统日志表 业务逻辑. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Service |
|||
public class SystemLogService extends MybatisBaseService<SystemLogMapper, SystemLog> { |
|||
@Autowired |
|||
SystemLogFeign systemLogFeign; |
|||
public ResultBean<PagerVo<SystemLogVo>> listPage(PagerQuery<SystemLogQuery> pq) { |
|||
return systemLogFeign.listPage(pq); |
|||
} |
|||
public ResultBean<List<SystemLogVo>> listAll(SystemLogQuery query) { |
|||
return systemLogFeign.list(); |
|||
} |
|||
|
|||
|
|||
public ResultBean<PagerVo<SystemLogVo>> listPageVo(PagerQuery<SystemLogQuery> pq) { |
|||
|
|||
return systemLogFeign.listPage(pq); |
|||
} |
|||
|
|||
public ResultBean<List<SystemLogVo>> listAllVo(SystemLogQuery query) { |
|||
return systemLogFeign.listAll(query); |
|||
} |
|||
|
|||
public ResultBean<List<SystemLogVo>> listVo() { |
|||
return systemLogFeign.list(); |
|||
} |
|||
|
|||
public void saveOrUpdateDto(SystemLogDto dto){ |
|||
systemLogFeign.save(dto); |
|||
} |
|||
|
|||
public ResultBean<SystemLogVo> fetchByIdVo(String id){ |
|||
return systemLogFeign.fetch(id); |
|||
} |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.yxt.oms.biz.func.systemlog; |
|||
|
|||
|
|||
import com.yxt.common.core.vo.Vo; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogVo.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogVo <br/> |
|||
* Description: 系统日志表 视图数据对象. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@ApiModel(value = "系统日志表 视图数据对象", description = "系统日志表 视图数据对象") |
|||
@Data |
|||
public class SystemLogVo implements Vo { |
|||
|
|||
|
|||
@ApiModelProperty("事件名称或类别") |
|||
private String eventName; |
|||
|
|||
@ApiModelProperty("事件内容") |
|||
private String eventContent; |
|||
|
|||
@ApiModelProperty("事件url") |
|||
private String eventUrl; |
|||
|
|||
@ApiModelProperty("用户sid") |
|||
private String userSid; |
|||
|
|||
@ApiModelProperty("用户名") |
|||
private String userName; |
|||
|
|||
@ApiModelProperty("用户iP") |
|||
private String userIp; |
|||
} |
@ -0,0 +1,68 @@ |
|||
package com.yxt.oms.feign.portal.systemlog; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.biz.func.systemlog.SystemLogDto; |
|||
import com.yxt.oms.biz.func.systemlog.SystemLogQuery; |
|||
import com.yxt.oms.biz.func.systemlog.SystemLogVo; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.GetMapping; |
|||
import org.springframework.web.bind.annotation.PathVariable; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogFeign.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogFeign <br/> |
|||
* Description: 系统日志表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Api(tags = "系统日志表") |
|||
@FeignClient( |
|||
contextId = "ss-common-portal-SystemLog", |
|||
name = "ss-common-portal", |
|||
path = "/apiadmin/systemlog", |
|||
fallback = SystemLogFeignFallback.class) |
|||
public interface SystemLogFeign { |
|||
|
|||
@ApiOperation("根据条件分页查询数据的列表") |
|||
@PostMapping("/listPage") |
|||
public ResultBean<PagerVo<SystemLogVo>> listPage(@RequestBody PagerQuery<SystemLogQuery> pq); |
|||
|
|||
@ApiOperation("根据条件查询所有数据列表") |
|||
@PostMapping("/listAll") |
|||
public ResultBean<List<SystemLogVo>> listAll(@RequestBody SystemLogQuery query); |
|||
|
|||
@ApiOperation("所有数据列表") |
|||
@GetMapping("/list") |
|||
public ResultBean<List<SystemLogVo>> list(); |
|||
|
|||
@ApiOperation("新增保存") |
|||
@PostMapping("/save") |
|||
public ResultBean save(@RequestBody SystemLogDto dto); |
|||
|
|||
@ApiOperation("修改保存") |
|||
@PostMapping("/update/{sid}") |
|||
public ResultBean update(@RequestBody SystemLogDto dto,@PathVariable("sid") String sid); |
|||
|
|||
@ApiOperation("删除记录") |
|||
@GetMapping("/del/{ids}") |
|||
public ResultBean del(@PathVariable("ids") String ids); |
|||
|
|||
@ApiOperation("获取一条记录") |
|||
@GetMapping("/fetch/{id}") |
|||
public ResultBean<SystemLogVo> fetch(@PathVariable("id") String id); |
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.yxt.oms.feign.portal.systemlog; |
|||
|
|||
import com.yxt.common.core.query.PagerQuery; |
|||
import com.yxt.common.core.result.ResultBean; |
|||
import com.yxt.common.core.vo.PagerVo; |
|||
import com.yxt.oms.biz.func.systemlog.SystemLogDto; |
|||
import com.yxt.oms.biz.func.systemlog.SystemLogQuery; |
|||
import com.yxt.oms.biz.func.systemlog.SystemLogVo; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* Project: anrui_portal(门户建设) <br/> |
|||
* File: SystemLogFeignFallback.java <br/> |
|||
* Class: com.yxt.anrui.portal.api.systemlog.SystemLogFeignFallback <br/> |
|||
* Description: 系统日志表. <br/> |
|||
* Copyright: Copyright (c) 2011 <br/> |
|||
* Company: https://gitee.com/liuzp315 <br/>
|
|||
* Makedate: 2021-08-03 00:24:30 <br/> |
|||
* |
|||
* @author liupopo |
|||
* @version 1.0 |
|||
* @since 1.0 |
|||
*/ |
|||
@Component |
|||
public class SystemLogFeignFallback implements SystemLogFeign { |
|||
|
|||
@Override |
|||
public ResultBean<PagerVo<SystemLogVo>> listPage(PagerQuery<SystemLogQuery> pq){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return rb.setMsg("接口anrui_portal/systemlog/listPage无法访问"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<SystemLogVo>> listAll(SystemLogQuery query){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return rb.setMsg("接口anrui_portal/systemlog/listAll无法访问"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<List<SystemLogVo>> list(){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return rb.setMsg("接口anrui_portal/systemlog/list无法访问"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean save(SystemLogDto dto){ |
|||
return ResultBean.fireFail().setMsg("接口anrui_portal/systemlog/save无法访问"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean update(SystemLogDto dto, String sid){ |
|||
return ResultBean.fireFail().setMsg("接口anrui_portal/systemlog/update无法访问"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean del(String ids){ |
|||
return ResultBean.fireFail().setMsg("接口anrui_portal/systemlog/del无法访问"); |
|||
} |
|||
|
|||
@Override |
|||
public ResultBean<SystemLogVo> fetch(String id){ |
|||
ResultBean rb = ResultBean.fireFail(); |
|||
return rb.setMsg("接口anrui_portal/systemlog/fetch无法访问"); |
|||
} |
|||
} |
Loading…
Reference in new issue