初始提交
This commit is contained in:
@ -0,0 +1,25 @@
|
||||
package com.mosty.rzzx;
|
||||
|
||||
import com.mosty.common.base.timeconsume.EnableTimeConsume;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
@EnableTimeConsume
|
||||
//@ComponentScan("com.mosty")
|
||||
@EnableFeignClients(basePackages = "com.mosty.base.feign.service")
|
||||
@MapperScan("com.mosty.rzzx.mapper")
|
||||
@EnableScheduling
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
public class MostyRzzxApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
SpringApplication.run(MostyRzzxApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.mosty.rzzx.config;
|
||||
|
||||
import feign.RequestInterceptor;
|
||||
import feign.RequestTemplate;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@Configuration
|
||||
public class FeignConfig implements RequestInterceptor {
|
||||
|
||||
@Override
|
||||
public void apply(RequestTemplate requestTemplate) {
|
||||
ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attr != null) {
|
||||
HttpServletRequest request = attr.getRequest();
|
||||
// 添加token
|
||||
requestTemplate.header("Authorization", request.getHeader("Authorization"));
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.mosty.rzzx.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 全局配置
|
||||
* @author kevin
|
||||
* @date 2022/5/25 1:56 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Data
|
||||
@Configuration
|
||||
@ConfigurationProperties("exclude.path-patterns")
|
||||
public class GlobalYmlConfig {
|
||||
|
||||
/**
|
||||
* swagger 静态文件的放行列表
|
||||
*/
|
||||
private List<String> swagger;
|
||||
|
||||
}
|
120
mosty-rzzx/src/main/java/com/mosty/rzzx/config/WebMvcConfig.java
Normal file
120
mosty-rzzx/src/main/java/com/mosty/rzzx/config/WebMvcConfig.java
Normal file
@ -0,0 +1,120 @@
|
||||
package com.mosty.rzzx.config;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.core.JsonGenerator;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
|
||||
import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer;
|
||||
import com.mosty.common.token.SysUserInterceptor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.InitializingBean;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.converter.HttpMessageConverter;
|
||||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
|
||||
import org.springframework.web.servlet.config.annotation.*;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 单体服务拦截器
|
||||
* @author kevin
|
||||
* @date 2022/3/21 11:17 PM
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Configuration
|
||||
@Slf4j
|
||||
public class WebMvcConfig implements WebMvcConfigurer, InitializingBean {
|
||||
|
||||
private static final String DEFAULT_TIME_FORMAT = "HH:mm:ss";
|
||||
private static final String DEFAULT_DATE_FORMAT = "yyyy-MM-dd";
|
||||
private static final String DEFAULT_DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
@Value("${server.servlet.context-path:/}")
|
||||
private String contextPath;
|
||||
|
||||
@Autowired
|
||||
private GlobalYmlConfig globalYmlConfig;
|
||||
|
||||
@Override
|
||||
public void extendMessageConverters(List<HttpMessageConverter<?>> converters) {
|
||||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
|
||||
ObjectMapper objectMapper = converter.getObjectMapper();
|
||||
// 生成JSON时,将所有Long转换成String
|
||||
SimpleModule simpleModule = new SimpleModule();
|
||||
//日期格式化
|
||||
simpleModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_TIME_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern(DEFAULT_DATE_FORMAT)));
|
||||
simpleModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern(DEFAULT_TIME_FORMAT)));
|
||||
objectMapper.registerModule(simpleModule);
|
||||
// 时间格式化
|
||||
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
objectMapper.configure(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN, true);
|
||||
objectMapper.configure(JsonGenerator.Feature.IGNORE_UNKNOWN, true);
|
||||
objectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
|
||||
objectMapper.disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS);
|
||||
// 设置格式化内容
|
||||
converter.setObjectMapper(objectMapper);
|
||||
converters.add(0, converter);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
log.info("当前服务的 contextPath={}", contextPath);
|
||||
log.info("当前服务的 swaggerExcludePathPatterns={}", JSON.toJSONString(globalYmlConfig.getSwagger()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
|
||||
configurer.defaultContentType(MediaType.APPLICATION_JSON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(userInfoInterceptor()).addPathPatterns("/**")
|
||||
.excludePathPatterns(globalYmlConfig.getSwagger());
|
||||
log.info("初始化WebMvcConfig 监控拦截器SysUserInterceptor");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
if (!registry.hasMappingForPattern("/template/**")) {
|
||||
registry.addResourceHandler("/template/**").addResourceLocations("classpath:/template/");
|
||||
}
|
||||
registry.addResourceHandler("swagger-ui.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("docs.html")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
registry.addResourceHandler("/webjars/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||||
WebMvcConfigurer.super.addResourceHandlers(registry);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public SysUserInterceptor userInfoInterceptor() {
|
||||
log.info("初始化WebMvcConfig 拦截器SysUserInterceptor");
|
||||
return new SysUserInterceptor();
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.mosty.rzzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzXtfkInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzXtfk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzHjQueryDto;
|
||||
import com.mosty.base.model.query.rzzx.TbRzXtfkQueryDto;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.rzzx.service.RzzxStatisticsService;
|
||||
import com.mosty.rzzx.service.TbRzXtfkService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/4
|
||||
* 系统反馈日志接口
|
||||
**/
|
||||
@Api(tags = "日志中心统计接口--原magic接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/yjsj")
|
||||
public class RzzxStatisticsController {
|
||||
|
||||
private final RzzxStatisticsService rzzxStatisticsService;
|
||||
|
||||
@ApiOperation("列表查询")
|
||||
@JwtSysUser
|
||||
@GetMapping("/lbcx")
|
||||
public ResponseResult<IPage<Map<String, Object>>> lbcx(TbRzHjQueryDto dto) {
|
||||
return ResponseResult.success(this.rzzxStatisticsService.lbcx(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("各部门反馈统计(市级权限)")
|
||||
@JwtSysUser
|
||||
@GetMapping("/tjfx/sjfktj")
|
||||
public ResponseResult<List<Map<String, Object>>> sjfktj() {
|
||||
return ResponseResult.success(this.rzzxStatisticsService.sjfktj());
|
||||
}
|
||||
|
||||
@ApiOperation("各部门反馈统计(县级权限)")
|
||||
@JwtSysUser
|
||||
@GetMapping("/tjfx/xjfktj")
|
||||
public ResponseResult<List<Map<String, Object>>> xjfktj() {
|
||||
return ResponseResult.success(this.rzzxStatisticsService.xjfktj());
|
||||
}
|
||||
|
||||
@ApiOperation("各类反馈统计")
|
||||
@JwtSysUser
|
||||
@GetMapping("/tjfx/glfktj")
|
||||
public ResponseResult<List<Map<String, Object>>> glfktj() {
|
||||
return ResponseResult.success(this.rzzxStatisticsService.glfktj());
|
||||
}
|
||||
|
||||
@ApiOperation("各系统反馈统计")
|
||||
@JwtSysUser
|
||||
@GetMapping("/tjfx/gxtfktj")
|
||||
public ResponseResult<List<Map<String, Object>>> gxtfktj() {
|
||||
return ResponseResult.success(this.rzzxStatisticsService.gxtfktj());
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.mosty.rzzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.common.base.domain.BaseController;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzDyjkInsertDto;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzDyjkUpdateDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzDyjk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzDyjkQueryDto;
|
||||
import com.mosty.rzzx.service.TbRzDyjkService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 接口调用日志接口
|
||||
**/
|
||||
@Api(tags = "日志中心-接口调用日志接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbRzDyjk")
|
||||
public class TbRzDyjkController extends BaseController {
|
||||
|
||||
private final TbRzDyjkService tbRzDyjkService;
|
||||
|
||||
@ApiOperation("接口调用日志接口新增")
|
||||
@JwtSysUser
|
||||
@Log(title = "接口调用日志接口新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping("add")
|
||||
public ResponseResult<Integer> insertEntity(@RequestBody TbRzDyjkInsertDto dto) {
|
||||
return ResponseResult.success(this.tbRzDyjkService.insertEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("接口调用日志接口修改-补充调用结束时间")
|
||||
@JwtSysUser
|
||||
@Log(title = "接口调用日志接口修改-补充调用结束时间", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("update")
|
||||
public ResponseResult<Integer> updateEntity(@RequestBody TbRzDyjkUpdateDto dto) {
|
||||
return ResponseResult.success(this.tbRzDyjkService.updateEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("接口调用日志详情")
|
||||
@JwtSysUser
|
||||
@GetMapping("getInfo/{id}")
|
||||
public ResponseResult<TbRzDyjk> getInfo(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbRzDyjkService.getInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询接口")
|
||||
@JwtSysUser
|
||||
@GetMapping("getList")
|
||||
public ResponseResult<IPage<TbRzDyjk>> getList(TbRzDyjkQueryDto dto) {
|
||||
return ResponseResult.success(this.tbRzDyjkService.getList(dto));
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.mosty.rzzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzHjInsertDto;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzHjUpdateDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzHj;
|
||||
import com.mosty.base.model.query.rzzx.TbRzHjQueryDto;
|
||||
import com.mosty.rzzx.service.TbRzHjService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 呼叫日志接口
|
||||
**/
|
||||
@Api(tags = "日志中心-呼叫日志接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbRzHj")
|
||||
public class TbRzHjController {
|
||||
|
||||
private final TbRzHjService tbRzHjService;
|
||||
|
||||
@ApiOperation("呼叫日志接口新增")
|
||||
@JwtSysUser
|
||||
@Log(title = "呼叫日志接口新增", businessType = BusinessType.INSERT)
|
||||
@PostMapping("add")
|
||||
public ResponseResult<Integer> insertEntity(@RequestBody TbRzHjInsertDto dto) {
|
||||
return ResponseResult.success(this.tbRzHjService.insertEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("呼叫日志接口修改-修改结束时间")
|
||||
@JwtSysUser
|
||||
@Log(title = "呼叫日志接口修改-修改结束时间", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("update")
|
||||
public ResponseResult<Integer> updateEntity(@RequestBody TbRzHjUpdateDto dto) {
|
||||
return ResponseResult.success(this.tbRzHjService.updateEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("查询呼叫详情接口")
|
||||
@JwtSysUser
|
||||
@GetMapping("getInfo/{id}")
|
||||
public ResponseResult<TbRzHj> getInfo(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbRzHjService.getInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation("查询分页列表")
|
||||
@JwtSysUser
|
||||
@GetMapping("getList")
|
||||
public ResponseResult<IPage<TbRzHj>> getList(TbRzHjQueryDto dto) {
|
||||
return ResponseResult.success(this.tbRzHjService.getList(dto));
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.mosty.rzzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzSpbfInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzSpbf;
|
||||
import com.mosty.base.model.query.rzzx.TbRzSpbfQueryDto;
|
||||
import com.mosty.rzzx.service.TbRzSpbfService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/12
|
||||
* 视频播放日志接口
|
||||
**/
|
||||
@Api(tags = "视频巡逻方案-摄像头接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbSpxlSpxlfaSxt")
|
||||
public class TbRzSpbfController {
|
||||
|
||||
private final TbRzSpbfService tbRzSpbfService;
|
||||
|
||||
@ApiOperation("视频开始播放")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频开始播放", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public ResponseResult<Integer> insertEntity(@RequestBody TbRzSpbfInsertDto dto) {
|
||||
return ResponseResult.success(this.tbRzSpbfService.insertEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("视频结束播放")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频结束播放", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("{id}")
|
||||
public ResponseResult<Integer> updateEntity(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbRzSpbfService.updateEntity(id));
|
||||
}
|
||||
|
||||
@ApiOperation("视频播放日志分页查询")
|
||||
@JwtSysUser
|
||||
@Log(title = "视频结束播放", businessType = BusinessType.UPDATE)
|
||||
@GetMapping
|
||||
public ResponseResult<IPage<TbRzSpbf>> getPageList(TbRzSpbfQueryDto dto) {
|
||||
return ResponseResult.success(this.tbRzSpbfService.getPageList(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("查询视频日志详情信息")
|
||||
@JwtSysUser
|
||||
@GetMapping("{id}")
|
||||
public ResponseResult<TbRzSpbf> getInfo(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbRzSpbfService.getInfo(id));
|
||||
}
|
||||
@ApiOperation("来源id修改-视频结束播放")
|
||||
@JwtSysUser
|
||||
@Log(title = "来源id修改-视频结束播放", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("updateLyId")
|
||||
public ResponseResult<Boolean> updateLyId(@RequestBody String lyId) {
|
||||
return ResponseResult.success(this.tbRzSpbfService.updateLyId(lyId));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.mosty.rzzx.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.entity.log.BusinessType;
|
||||
import com.mosty.common.base.entity.log.Log;
|
||||
import com.mosty.common.token.JwtSysUser;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzXtfkInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzXtfk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzXtfkQueryDto;
|
||||
import com.mosty.rzzx.service.TbRzXtfkService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/4
|
||||
* 系统反馈日志接口
|
||||
**/
|
||||
@Api(tags = "日志中心-系统反馈日志接口")
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/tbRzXtfk")
|
||||
public class TbRzXtfkController {
|
||||
|
||||
private final TbRzXtfkService tbRzXtfkService;
|
||||
|
||||
@ApiOperation("新增系统反馈日志")
|
||||
@PostMapping("addEntity")
|
||||
@JwtSysUser
|
||||
@Log(title = "新增系统反馈日志", businessType = BusinessType.INSERT)
|
||||
public ResponseResult<Integer> insertEntity(@RequestBody TbRzXtfkInsertDto dto) {
|
||||
return ResponseResult.success(this.tbRzXtfkService.insertEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("修改系统反馈日志")
|
||||
@JwtSysUser
|
||||
@Log(title = "修改系统反馈日志", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("updateById")
|
||||
public ResponseResult<Boolean> updateById(@RequestBody TbRzXtfkInsertDto dto) {
|
||||
return ResponseResult.success(this.tbRzXtfkService.updateEntity(dto));
|
||||
}
|
||||
|
||||
@ApiOperation("删除系统反馈日志")
|
||||
@JwtSysUser
|
||||
@DeleteMapping("delEntity")
|
||||
@Log(title = "删除系统反馈日志", businessType = BusinessType.DELETE)
|
||||
public ResponseResult<Integer> delEntity(String id) {
|
||||
this.tbRzXtfkService.deleteEntity(id);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("查询系统反馈日志详情接口")
|
||||
@JwtSysUser
|
||||
@GetMapping("getInfo/{id}")
|
||||
public ResponseResult<TbRzXtfk> getInfo(@PathVariable("id") String id) {
|
||||
return ResponseResult.success(this.tbRzXtfkService.getInfo(id));
|
||||
}
|
||||
|
||||
@ApiOperation("查询系统反馈日志分页列表")
|
||||
@JwtSysUser
|
||||
@GetMapping("getList")
|
||||
public ResponseResult<IPage<TbRzXtfk>> getList(TbRzXtfkQueryDto dto) {
|
||||
return ResponseResult.success(this.tbRzXtfkService.getList(dto));
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.mosty.rzzx.mapper;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Mapper
|
||||
public interface RzzxStatisticsMapper {
|
||||
|
||||
@ApiOperation("各部门反馈统计(市级权限)")
|
||||
List<Map<String, Object>> sjfktj(@Param("ssbmdm") String ssbmdm);
|
||||
|
||||
@ApiOperation("各部门反馈统计(县级权限)")
|
||||
List<Map<String, Object>> xjfktj(@Param("ssbmdm") String ssbmdm);
|
||||
|
||||
@ApiOperation("各类反馈统计")
|
||||
List<Map<String, Object>> glfktj(@Param("ssbmdm") String ssbmdm);
|
||||
|
||||
@ApiOperation("各系统反馈统计")
|
||||
List<Map<String, Object>> gxtfktj(@Param("ssbmdm") String ssbmdm);
|
||||
|
||||
@ApiOperation("列表查询数量")
|
||||
int lbcxCount(Map<String, Object> map);
|
||||
|
||||
@ApiOperation("列表查询")
|
||||
List<Map<String, Object>> lbcxList(Map<String, Object> map);
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.rzzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzDyjk;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 接口调用日志--Mapper
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbRzDyjkMapper extends BaseMapper<TbRzDyjk> {
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.mosty.rzzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzHj;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbRzHjMapper extends BaseMapper<TbRzHj> {
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.mosty.rzzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzSpbf;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/12
|
||||
* 视屏播放日志mapper
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbRzSpbfMapper extends BaseMapper<TbRzSpbf> {
|
||||
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.mosty.rzzx.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzXtfk;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/4
|
||||
**/
|
||||
@Mapper
|
||||
public interface TbRzXtfkMapper extends BaseMapper<TbRzXtfk> {
|
||||
|
||||
Integer updateEntity(String id);
|
||||
|
||||
}
|
@ -0,0 +1,118 @@
|
||||
package com.mosty.rzzx.mybatisplus;
|
||||
|
||||
import cn.hutool.http.HttpStatus;
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import com.mosty.common.base.util.IpUtil;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import org.apache.ibatis.reflection.MetaObject;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* MybatisPlus注入处理器
|
||||
*
|
||||
* @author Lhh
|
||||
* @date 2021/4/25
|
||||
*/
|
||||
public class CreateAndUpdateMetaObjectHandler implements MetaObjectHandler {
|
||||
|
||||
@Override
|
||||
public void insertFill(MetaObject metaObject) {
|
||||
try {
|
||||
UserInfo userInfo = UserInfoManager.getUser();
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtCjip")) {
|
||||
if (metaObject.getValue("xtCjip") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjip", String.class, IpUtil.getIpAddress());
|
||||
}
|
||||
}
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtSjzt")) {
|
||||
if (metaObject.getValue("xtSjzt") == null) {
|
||||
this.strictInsertFill(metaObject, "xtSjzt", String.class, "1");
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtScbz")) {
|
||||
if (metaObject.getValue("xtScbz") == null) {
|
||||
this.strictInsertFill(metaObject, "xtScbz", String.class, "0");
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjsj")) {
|
||||
if (metaObject.getValue("xtCjsj") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjsj", Timestamp.class, new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
if (metaObject.hasGetter("xtCjrId")) {
|
||||
if (metaObject.getValue("xtCjrId") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjrId", String.class, String.valueOf(userInfo.userId));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjr")) {
|
||||
if (metaObject.getValue("xtCjr") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjr", String.class, String.valueOf(userInfo.userName));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjbmdm")) {
|
||||
if (metaObject.getValue("xtCjbmdm") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjbmdm", String.class, String.valueOf(userInfo.getDeptCode()));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtCjbmmc")) {
|
||||
if (metaObject.getValue("xtCjbmmc") == null) {
|
||||
this.strictInsertFill(metaObject, "xtCjbmmc", String.class, userInfo.getDeptName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("自动注入异常 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateFill(MetaObject metaObject) {
|
||||
try {
|
||||
UserInfo userInfo = UserInfoManager.getUser();
|
||||
//根据属性名字设置要填充的值
|
||||
if (metaObject.hasGetter("xtZhgxrid")) {
|
||||
if (metaObject.getValue("xtZhgxrid") == null) {
|
||||
this.strictInsertFill(metaObject, "xtZhgxrid", String.class, IpUtil.getIpAddress());
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxsj")) {
|
||||
if (metaObject.getValue("xtZhgxsj") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxsj", Timestamp.class, new Timestamp(System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(userInfo)) {
|
||||
if (metaObject.hasGetter("xtZhgxrid")) {
|
||||
if (metaObject.getValue("xtZhgxrid") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxrid", String.class, String.valueOf(userInfo.userId));
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxr")) {
|
||||
if (metaObject.getValue("xtZhgxr") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxr", String.class, userInfo.userName);
|
||||
}
|
||||
}
|
||||
|
||||
if (metaObject.hasGetter("xtZhgxbmdm")) {
|
||||
if (metaObject.getValue("xtZhgxbmdm") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxbmdm", String.class, userInfo.getDeptCode());
|
||||
}
|
||||
}
|
||||
if (metaObject.hasGetter("xtZhgxbm")) {
|
||||
if (metaObject.getValue("xtZhgxbm") == null) {
|
||||
this.strictUpdateFill(metaObject, "xtZhgxbm", String.class, userInfo.getDeptName());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
throw new BusinessException("自动注入异常 => " + e.getMessage(), HttpStatus.HTTP_UNAUTHORIZED);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.mosty.rzzx.mybatisplus;
|
||||
|
||||
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* mybatis-plus配置类
|
||||
*
|
||||
* @author Lhh
|
||||
*/
|
||||
@EnableTransactionManagement(proxyTargetClass = true)
|
||||
@Configuration
|
||||
@MapperScan("com.mosty.wqzx.mapper")
|
||||
public class MybatisPlusConfig {
|
||||
|
||||
/**
|
||||
* 元对象字段填充控制器
|
||||
* https://baomidou.com/guide/auto-fill-metainfo.html
|
||||
*/
|
||||
@Bean
|
||||
public MetaObjectHandler metaObjectHandler() {
|
||||
return new CreateAndUpdateMetaObjectHandler();
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package com.mosty.rzzx.remote;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.mosty.base.model.dto.base.GetSsbmDto;
|
||||
import com.mosty.base.model.dto.base.SysDeptDTO;
|
||||
import com.mosty.base.feign.service.MostyBaseFeignService;
|
||||
import com.mosty.common.base.domain.ResponseResult;
|
||||
import com.mosty.common.base.exception.BusinessException;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 调用部门信息远程适配层
|
||||
* @author kevin
|
||||
* @date 2022/7/6 10:37 上午
|
||||
* @since 1.0.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class TbBaseAdaptRemoteService {
|
||||
|
||||
private final MostyBaseFeignService mostyBaseFeignService;
|
||||
|
||||
// 获取权限查询条件
|
||||
public String getSsbm(String ssbmdm, String isChild) {
|
||||
GetSsbmDto dto = new GetSsbmDto(ssbmdm, isChild);
|
||||
ResponseResult<String> responseResult = mostyBaseFeignService.getSsbm(dto);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("获取权限查询条件异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
throw new BusinessException("获取权限查询条件异常");
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
// 根据部门编码查询部门信息
|
||||
public SysDeptDTO getDeptByOrgCode(String orgCode) {
|
||||
if (StringUtils.isBlank(orgCode)) {
|
||||
return null;
|
||||
}
|
||||
ResponseResult<SysDeptDTO> responseResult = mostyBaseFeignService.getDeptByOrgCode(orgCode);
|
||||
if (responseResult == null || !responseResult.isSuccess()) {
|
||||
log.error("调用部门编码查询部门信息异常 responseResult = {}", JSON.toJSONString(responseResult));
|
||||
return null;
|
||||
}
|
||||
return responseResult.getData();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.mosty.rzzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.query.rzzx.TbRzHjQueryDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface RzzxStatisticsService {
|
||||
|
||||
@ApiOperation("各部门反馈统计(市级权限)")
|
||||
List<Map<String,Object>> sjfktj();
|
||||
|
||||
@ApiOperation("各部门反馈统计(县级权限)")
|
||||
List<Map<String,Object>> xjfktj();
|
||||
|
||||
@ApiOperation("各类反馈统计")
|
||||
List<Map<String,Object>> glfktj();
|
||||
|
||||
@ApiOperation("各系统反馈统计")
|
||||
List<Map<String,Object>> gxtfktj();
|
||||
|
||||
@ApiOperation("列表查询")
|
||||
IPage<Map<String,Object>> lbcx(TbRzHjQueryDto dto);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.mosty.rzzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzDyjkInsertDto;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzDyjkUpdateDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzDyjk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzDyjkQueryDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 接口调用日志--服务类
|
||||
**/
|
||||
public interface TbRzDyjkService {
|
||||
|
||||
@ApiOperation("接口调用日志接口新增")
|
||||
int insertEntity(TbRzDyjkInsertDto dto);
|
||||
|
||||
@ApiOperation("接口调用日志接口修改-补充调用结束时间")
|
||||
int updateEntity(TbRzDyjkUpdateDto dto);
|
||||
|
||||
@ApiOperation("接口调用日志详情")
|
||||
TbRzDyjk getInfo(String id);
|
||||
|
||||
@ApiOperation("分页查询接口")
|
||||
IPage<TbRzDyjk> getList(TbRzDyjkQueryDto dto);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.mosty.rzzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzHjInsertDto;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzHjUpdateDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzHj;
|
||||
import com.mosty.base.model.query.rzzx.TbRzHjQueryDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 呼叫日志接口--实现类
|
||||
**/
|
||||
public interface TbRzHjService {
|
||||
|
||||
@ApiOperation("呼叫日志新增")
|
||||
int insertEntity(TbRzHjInsertDto dto);
|
||||
|
||||
@ApiOperation("呼叫日志接口修改-修改结束时间")
|
||||
int updateEntity(TbRzHjUpdateDto dto);
|
||||
|
||||
@ApiOperation("查询呼叫详情接口")
|
||||
TbRzHj getInfo(String id);
|
||||
|
||||
@ApiOperation("分页查询接口")
|
||||
IPage<TbRzHj> getList(TbRzHjQueryDto dto);
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.mosty.rzzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzSpbfInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzSpbf;
|
||||
import com.mosty.base.model.query.rzzx.TbRzSpbfQueryDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/12
|
||||
* 视频播放日志服务类
|
||||
**/
|
||||
public interface TbRzSpbfService {
|
||||
|
||||
@ApiOperation("视频播放日志新增")
|
||||
int insertEntity(TbRzSpbfInsertDto dto);
|
||||
|
||||
@ApiOperation("视频结束播放")
|
||||
int updateEntity(String id);
|
||||
|
||||
@ApiOperation("视频播放日志查询")
|
||||
IPage<TbRzSpbf> getPageList(TbRzSpbfQueryDto dto);
|
||||
|
||||
@ApiOperation("查询视频日志详情信息")
|
||||
TbRzSpbf getInfo(String id);
|
||||
|
||||
Boolean updateLyId(String lyId);
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package com.mosty.rzzx.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzXtfkInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzXtfk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzXtfkQueryDto;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/4
|
||||
**/
|
||||
public interface TbRzXtfkService {
|
||||
|
||||
@ApiOperation("新增系统反馈日志")
|
||||
int insertEntity(TbRzXtfkInsertDto dto);
|
||||
|
||||
@ApiOperation("查询系统反馈日志详情接口")
|
||||
TbRzXtfk getInfo(String id);
|
||||
|
||||
@ApiOperation("查询系统反馈日志分页列表")
|
||||
IPage<TbRzXtfk> getList(TbRzXtfkQueryDto dto);
|
||||
|
||||
@ApiOperation("更新系统反馈日志")
|
||||
Boolean updateEntity(TbRzXtfkInsertDto dto);
|
||||
|
||||
@ApiOperation("删除系统反馈日志")
|
||||
void deleteEntity(String id);
|
||||
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.mosty.rzzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.mosty.base.model.query.rzzx.TbRzHjQueryDto;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.rzzx.mapper.RzzxStatisticsMapper;
|
||||
import com.mosty.rzzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.rzzx.service.RzzxStatisticsService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class RzzxStatisticsServiceImpl implements RzzxStatisticsService {
|
||||
|
||||
private final RzzxStatisticsMapper rzzxStatisticsMapper;
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
@Override
|
||||
public List<Map<String, Object>> sjfktj() {
|
||||
// Map<String, Object> map = new HashMap<>();
|
||||
String ssbmdm = this.tbBaseAdaptRemoteService.getSsbm(null, null);
|
||||
// map.put("useSql", PermissionsUtil.createSql("", UserInfoManager.get()));
|
||||
return this.rzzxStatisticsMapper.sjfktj(ssbmdm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> xjfktj() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// map.put("useSql", PermissionsUtil.createSql("", UserInfoManager.get()));
|
||||
String ssbmdm = this.tbBaseAdaptRemoteService.getSsbm(null, null);
|
||||
return this.rzzxStatisticsMapper.xjfktj(ssbmdm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> glfktj() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String ssbmdm = this.tbBaseAdaptRemoteService.getSsbm(null, null);
|
||||
// map.put("useSql", PermissionsUtil.createSql("", UserInfoManager.get()));
|
||||
return this.rzzxStatisticsMapper.glfktj(ssbmdm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> gxtfktj() {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
// map.put("useSql", PermissionsUtil.createSql("", UserInfoManager.get()));
|
||||
String ssbmdm = this.tbBaseAdaptRemoteService.getSsbm(null, null);
|
||||
return this.rzzxStatisticsMapper.gxtfktj(ssbmdm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<Map<String, Object>> lbcx(TbRzHjQueryDto dto) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
map.put("pageIndex", (dto.getPageNum() - 1) * dto.getPageSize());
|
||||
map.put("pageSize", dto.getPageSize());
|
||||
// map.put("useSql", PermissionsUtil.createSql("", UserInfoManager.get()));
|
||||
String ssbmdm = this.tbBaseAdaptRemoteService.getSsbm(null, null);
|
||||
map.put("ssbmdm",ssbmdm);
|
||||
int count = this.rzzxStatisticsMapper.lbcxCount(map);
|
||||
List<Map<String, Object>> list = this.rzzxStatisticsMapper.lbcxList(map);
|
||||
IPage<Map<String, Object>> page = new Page<>(dto.getPageNum(), dto.getPageSize());
|
||||
page.setTotal(count);
|
||||
page.setRecords(list);
|
||||
return page;
|
||||
}
|
||||
}
|
@ -0,0 +1,94 @@
|
||||
package com.mosty.rzzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzDyjkInsertDto;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzDyjkUpdateDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzDyjk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzDyjkQueryDto;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.rzzx.mapper.TbRzDyjkMapper;
|
||||
import com.mosty.rzzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.rzzx.service.TbRzDyjkService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 接口调用日志--服务--实现类
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbRzDyjkServiceImpl extends ServiceImpl<TbRzDyjkMapper, TbRzDyjk>
|
||||
implements TbRzDyjkService {
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
|
||||
@Override
|
||||
public int insertEntity(TbRzDyjkInsertDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbRzDyjk item = new TbRzDyjk();
|
||||
BeanUtils.copyProperties(dto, item);
|
||||
item.setXtSjly("1");
|
||||
item.setCzrid(String.valueOf(user.getUserId()));
|
||||
item.setCzrsfzh(user.getIdEntityCard());
|
||||
item.setCzrxm(user.getUserName());
|
||||
item.setSsbm(user.getDeptName());
|
||||
item.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
item.setSsbmdm(user.getDeptCode());
|
||||
item.setSsxgaj(user.getFxjDeptName());
|
||||
item.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
item.setSsxgajdm(user.getFxjDeptCode());
|
||||
item.setSssgaj(user.getDszDeptName());
|
||||
item.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
item.setSssgajdm(user.getDszDeptCode());
|
||||
item.setDysj(new Date());
|
||||
return this.baseMapper.insert(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateEntity(TbRzDyjkUpdateDto dto) {
|
||||
TbRzDyjk item = this.baseMapper.selectById(dto.getId());
|
||||
if (item != null) {
|
||||
item.setJkfh(dto.getJkfh());
|
||||
item.setSfcg(dto.getSfcg());
|
||||
Date endDate = new Date();
|
||||
item.setFhsj(endDate);
|
||||
Integer time = (int) (endDate.getTime() - item.getDysj().getTime()) / 1000;
|
||||
item.setHs(time);
|
||||
return this.baseMapper.updateById(item);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbRzDyjk getInfo(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbRzDyjk> getList(TbRzDyjkQueryDto dto) {
|
||||
QueryWrapper<TbRzDyjk> qw = new QueryWrapper<>();
|
||||
// UserInfo userInfo = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, userInfo);
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
return this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.lambda()
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), TbRzDyjk::getSsbmdm, dto.getSsbmdm())
|
||||
.like(StringUtils.isNotBlank(dto.getCzrxm()), TbRzDyjk::getCzrxm, dto.getCzrxm())
|
||||
.eq(StringUtils.isNotBlank(dto.getSfcg()), TbRzDyjk::getSfcg, dto.getSfcg())
|
||||
.like(StringUtils.isNotBlank(dto.getJkxt()), TbRzDyjk::getJkxt, dto.getJkxt())
|
||||
.ge(StringUtils.isNotBlank(dto.getStartTime()), TbRzDyjk::getDysj, dto.getStartTime())
|
||||
.le(StringUtils.isNotBlank(dto.getEndTime()), TbRzDyjk::getDysj, dto.getEndTime())
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package com.mosty.rzzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzHjInsertDto;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzHjUpdateDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzHj;
|
||||
import com.mosty.base.model.query.rzzx.TbRzHjQueryDto;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.rzzx.mapper.TbRzHjMapper;
|
||||
import com.mosty.rzzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.rzzx.service.TbRzHjService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/18
|
||||
* 呼叫接口日志实现类
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbRzHjServiceImpl extends ServiceImpl<TbRzHjMapper, TbRzHj> implements TbRzHjService {
|
||||
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
@Override
|
||||
public int insertEntity(TbRzHjInsertDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbRzHj hj = new TbRzHj();
|
||||
BeanUtils.copyProperties(dto, hj);
|
||||
hj.setFjrId(String.valueOf(user.getUserId()));
|
||||
hj.setFjrSfzh(user.getIdEntityCard());
|
||||
hj.setFjrXm(user.getUserName());
|
||||
hj.setKssj(new Date());
|
||||
hj.setSsbm(user.getDeptName());
|
||||
hj.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
hj.setSsbmdm(user.getDeptCode());
|
||||
hj.setSsxgaj(user.getFxjDeptName());
|
||||
hj.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
hj.setSsxgajdm(user.getFxjDeptCode());
|
||||
hj.setSssgaj(user.getDszDeptName());
|
||||
hj.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
hj.setSssgajdm(user.getDszDeptCode());
|
||||
return this.baseMapper.insert(hj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateEntity(TbRzHjUpdateDto dto) {
|
||||
TbRzHj hj = this.baseMapper.selectById(dto.getId());
|
||||
if (hj != null) {
|
||||
hj.setSfcg(dto.getSfcg());
|
||||
hj.setJssj(new Date());
|
||||
return this.baseMapper.updateById(hj);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbRzHj getInfo(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbRzHj> getList(TbRzHjQueryDto dto) {
|
||||
QueryWrapper<TbRzHj> qw = new QueryWrapper<>();
|
||||
// UserInfo userInfo = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, userInfo);
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
return this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.lambda()
|
||||
.like(StringUtils.isNotBlank(dto.getFjrXm()), TbRzHj::getFjrXm, dto.getFjrXm())
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), TbRzHj::getSsbmdm, dto.getSsbmdm())
|
||||
.eq(StringUtils.isNotBlank(dto.getSfcg()), TbRzHj::getSfcg, dto.getSfcg())
|
||||
.like(StringUtils.isNotBlank(dto.getHjhm()), TbRzHj::getHjhm, dto.getHjhm())
|
||||
.ge(StringUtils.isNotBlank(dto.getStartTime()), TbRzHj::getKssj, dto.getStartTime())
|
||||
.le(StringUtils.isNotBlank(dto.getEndTime()), TbRzHj::getKssj, dto.getEndTime())
|
||||
);
|
||||
}
|
||||
}
|
@ -0,0 +1,105 @@
|
||||
package com.mosty.rzzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.common.base.util.IpUtil;
|
||||
import com.mosty.common.base.util.StringUtils;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzSpbfInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzSpbf;
|
||||
import com.mosty.base.model.query.rzzx.TbRzSpbfQueryDto;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.rzzx.mapper.TbRzSpbfMapper;
|
||||
import com.mosty.rzzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.rzzx.service.TbRzSpbfService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/7/12
|
||||
* 视频播放日志服务-实现类
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbRzSpbfServiceImpl extends ServiceImpl<TbRzSpbfMapper, TbRzSpbf>
|
||||
implements TbRzSpbfService {
|
||||
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
|
||||
@Override
|
||||
public int insertEntity(TbRzSpbfInsertDto dto) {
|
||||
UserInfo user = UserInfoManager.get();
|
||||
TbRzSpbf bf = new TbRzSpbf();
|
||||
BeanUtils.copyProperties(dto, bf);
|
||||
bf.setCzip(IpUtil.getIpAddress());
|
||||
bf.setCzrid(String.valueOf(user.getUserId()));
|
||||
bf.setCzrxm(user.getUserName());
|
||||
bf.setCzrsfzh(user.getIdEntityCard());
|
||||
bf.setSsbm(user.getDeptName());
|
||||
bf.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
bf.setSsbmdm(user.getDeptCode());
|
||||
bf.setSsxgaj(user.getFxjDeptName());
|
||||
bf.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
bf.setSsxgajdm(user.getFxjDeptCode());
|
||||
bf.setSssgaj(user.getDszDeptName());
|
||||
bf.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
bf.setSssgajdm(user.getDszDeptCode());
|
||||
bf.setKssj(new Date());
|
||||
bf.setXtSjly("1");
|
||||
return this.baseMapper.insert(bf);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateEntity(String id) {
|
||||
TbRzSpbf item = this.baseMapper.selectById(id);
|
||||
item.setJssj(new Date());
|
||||
return this.baseMapper.updateById(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbRzSpbf> getPageList(TbRzSpbfQueryDto dto) {
|
||||
QueryWrapper<TbRzSpbf> qw = new QueryWrapper<>();
|
||||
// UserInfo userInfo = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, userInfo);
|
||||
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
|
||||
return this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.ge(StringUtils.isNotBlank(dto.getKssj()), "date_format(kssj,'%Y-%m-%d %H:%i:%s')", dto.getKssj())
|
||||
.le(StringUtils.isNotBlank(dto.getJssj()), "date_format(kssj,'%Y-%m-%d %H:%i:%s')", dto.getJssj())
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), "ssbmdm", dto.getSsbmdm())
|
||||
.and(StringUtils.isNotBlank(dto.getKeyword()),
|
||||
wq -> wq.like("sxtid", dto.getKeyword()).or().like("sxtmc", dto.getKeyword())
|
||||
)
|
||||
.orderByDesc("xt_cjsj")
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbRzSpbf getInfo(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateLyId(String lyId) {
|
||||
List<TbRzSpbf> ly_id = baseMapper.selectList(new QueryWrapper<TbRzSpbf>().eq(org.apache.commons.lang3.StringUtils.isNotBlank(lyId), "lyid", lyId)
|
||||
.isNotNull("jssj")
|
||||
);
|
||||
if(!(ly_id !=null && ly_id.size()>0)){
|
||||
TbRzSpbf tbRzSpbf = new TbRzSpbf();
|
||||
tbRzSpbf.setJssj(new Date());
|
||||
tbRzSpbf.setLyid(lyId);
|
||||
baseMapper.update(tbRzSpbf, new QueryWrapper<TbRzSpbf>().eq(org.apache.commons.lang3.StringUtils.isNotBlank(lyId), "lyid", lyId));
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.mosty.rzzx.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.mosty.base.model.dto.rzzx.TbRzXtfkInsertDto;
|
||||
import com.mosty.base.model.entity.rzzx.TbRzXtfk;
|
||||
import com.mosty.base.model.query.rzzx.TbRzXtfkQueryDto;
|
||||
import com.mosty.base.utils.UUIDGenerator;
|
||||
import com.mosty.common.token.UserInfo;
|
||||
import com.mosty.common.token.UserInfoManager;
|
||||
import com.mosty.common.util.PermissionsUtil;
|
||||
import com.mosty.rzzx.mapper.TbRzXtfkMapper;
|
||||
import com.mosty.rzzx.remote.TbBaseAdaptRemoteService;
|
||||
import com.mosty.rzzx.service.TbRzXtfkService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author dw
|
||||
* @since 2022/8/4
|
||||
**/
|
||||
@AllArgsConstructor
|
||||
@Service
|
||||
public class TbRzXtfkServiceImpl extends ServiceImpl<TbRzXtfkMapper, TbRzXtfk>
|
||||
implements TbRzXtfkService {
|
||||
private final TbBaseAdaptRemoteService tbBaseAdaptRemoteService;
|
||||
|
||||
@Override
|
||||
public int insertEntity(TbRzXtfkInsertDto dto) {
|
||||
TbRzXtfk fk = new TbRzXtfk();
|
||||
BeanUtils.copyProperties(dto, fk);
|
||||
fk.setFksj(new Date());
|
||||
fk.setId(UUIDGenerator.getUUID());
|
||||
UserInfo user = UserInfoManager.get();
|
||||
if (user != null) {
|
||||
fk.setFkrid(String.valueOf(user.getUserId()));
|
||||
fk.setFkrsfzh(user.getIdEntityCard());
|
||||
fk.setFkrxm(user.getUserName());
|
||||
fk.setSsbm(user.getDeptName());
|
||||
fk.setSsbmid(String.valueOf(user.getDeptId()));
|
||||
fk.setSsbmdm(user.getDeptCode());
|
||||
fk.setSsxgaj(user.getFxjDeptName());
|
||||
fk.setSsxgajid(String.valueOf(user.getFxjDeptId()));
|
||||
fk.setSsxgajdm(user.getFxjDeptCode());
|
||||
fk.setSssgaj(user.getDszDeptName());
|
||||
fk.setSssgajid(String.valueOf(user.getDszDeptId()));
|
||||
fk.setSssgajdm(user.getDszDeptCode());
|
||||
fk.setXtSjly("2");
|
||||
}
|
||||
return this.baseMapper.insert(fk);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TbRzXtfk getInfo(String id) {
|
||||
return this.baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IPage<TbRzXtfk> getList(TbRzXtfkQueryDto dto) {
|
||||
// UserInfo user = UserInfoManager.get();
|
||||
// PermissionsUtil.queryWrapperUtil(qw, user);
|
||||
|
||||
dto.setSsbmdm(this.tbBaseAdaptRemoteService.getSsbm(dto.getSsbmdm(), null));
|
||||
QueryWrapper<TbRzXtfk> qw = new QueryWrapper<>();
|
||||
return this.baseMapper.selectPage(
|
||||
new Page<>(dto.getPageNum(), dto.getPageSize()),
|
||||
qw.lambda()
|
||||
.eq(StringUtils.isNotBlank(dto.getFklx()), TbRzXtfk::getFklx, dto.getFklx())
|
||||
.like(StringUtils.isNotBlank(dto.getFkxt()), TbRzXtfk::getFkxt, dto.getFkxt())
|
||||
.likeRight(StringUtils.isNotBlank(dto.getSsbmdm()), TbRzXtfk::getSsbmdm, dto.getSsbmdm())
|
||||
.like(StringUtils.isNotBlank(dto.getFknr()), TbRzXtfk::getFknr, dto.getFknr())
|
||||
.like(StringUtils.isNotBlank(dto.getFkrxm()), TbRzXtfk::getFkrxm, dto.getFkrxm())
|
||||
.eq(StringUtils.isNotBlank(dto.getSsbmdm()), TbRzXtfk::getSsbmdm, dto.getSsbmdm())
|
||||
.ge(StringUtils.isNotBlank(dto.getStartTime()), TbRzXtfk::getFksj, dto.getStartTime())
|
||||
.le(StringUtils.isNotBlank(dto.getEndTime()), TbRzXtfk::getFksj, dto.getEndTime())
|
||||
.eq(TbRzXtfk::getXtScbz, "0").orderByDesc(TbRzXtfk::getXtCjsj)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updateEntity(TbRzXtfkInsertDto dto) {
|
||||
TbRzXtfk fk = new TbRzXtfk();
|
||||
BeanUtils.copyProperties(dto, fk);
|
||||
UserInfo user = UserInfoManager.get();
|
||||
System.err.println(user);
|
||||
fk.setXtZhgxsj(new Timestamp(System.currentTimeMillis()));
|
||||
this.baseMapper.updateById(fk);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteEntity(String id) {
|
||||
this.baseMapper.updateEntity(id);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user