对比-条款对比结果-编辑

This commit is contained in:
wangzhijiang
2024-02-29 15:12:07 +08:00
parent ddf45aadcf
commit ac4e7f2cfc
6 changed files with 86 additions and 70 deletions
@@ -98,10 +98,11 @@ public class RedisConfig extends CachingConfigurerSupport {
*/ */
@Bean @Bean
public RedisMessageListenerContainer redisContainer(RedisConnectionFactory redisConnectionFactory, RedisReceiver redisReceiver, MessageListenerAdapter commonListenerAdapter) { public RedisMessageListenerContainer redisContainer(RedisConnectionFactory redisConnectionFactory, RedisReceiver redisReceiver, MessageListenerAdapter commonListenerAdapter) {
RedisMessageListenerContainer container = new RedisMessageListenerContainer(); // RedisMessageListenerContainer container = new RedisMessageListenerContainer();
container.setConnectionFactory(redisConnectionFactory); // container.setConnectionFactory(redisConnectionFactory);
container.addMessageListener(commonListenerAdapter, new ChannelTopic(GlobalConstants.REDIS_TOPIC_NAME)); // container.addMessageListener(commonListenerAdapter, new ChannelTopic(GlobalConstants.REDIS_TOPIC_NAME));
return container; // return container;
return null;
} }
@@ -16,10 +16,8 @@ import io.swagger.annotations.ApiParam;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@@ -55,5 +53,12 @@ public class SarItemsStandCompareHisEOController extends JeroController<SarItems
return Result.OK(pageList); return Result.OK(pageList);
} }
@AutoLog(value = "条款对比结果-编辑")
@ApiOperation(value="条款对比结果-编辑", notes="条款对比结果-编辑")
@PostMapping(value = "/edit")
public Result<?> edit(@Validated @RequestBody SarItemsCompareHisEO sarFileCompareItem) {
sarItemsCompareHisEOService.editById(sarFileCompareItem);
return Result.OK("编辑成功!");
}
} }
@@ -10,4 +10,6 @@ public interface ISarItemsCompareHisEOService extends IService<SarItemsCompareHi
void insertSelective(SarItemsCompareHisEO sarItemsCompareHisEO); void insertSelective(SarItemsCompareHisEO sarItemsCompareHisEO);
void deleteByStandHisId(String id); void deleteByStandHisId(String id);
void editById(SarItemsCompareHisEO sarFileCompareItem);
} }
@@ -11,6 +11,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
@Service @Service
@Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class) @Transactional(value = "transactionManager", readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
public class SarItemsCompareHisEOServiceImpl extends ServiceImpl<SarItemsCompareHisEOMapper, SarItemsCompareHisEO> implements ISarItemsCompareHisEOService { public class SarItemsCompareHisEOServiceImpl extends ServiceImpl<SarItemsCompareHisEOMapper, SarItemsCompareHisEO> implements ISarItemsCompareHisEOService {
@@ -29,4 +31,10 @@ public class SarItemsCompareHisEOServiceImpl extends ServiceImpl<SarItemsCompare
public void deleteByStandHisId(String id) { public void deleteByStandHisId(String id) {
this.sarItemsCompareHisEOMapper.deleteByStandHisId(id); this.sarItemsCompareHisEOMapper.deleteByStandHisId(id);
} }
@Override
public void editById(SarItemsCompareHisEO sarFileCompareItem) {
sarFileCompareItem.setModifyTime(new Date());
this.saveOrUpdate(sarFileCompareItem);
}
} }
@@ -58,11 +58,11 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <!-- <dependency>-->
<groupId>com.jero.boot</groupId> <!-- <groupId>com.jero.boot</groupId>-->
<artifactId>laws-modules-docking</artifactId> <!-- <artifactId>laws-modules-docking</artifactId>-->
<version>2.5.1</version> <!-- <version>2.5.1</version>-->
</dependency> <!-- </dependency>-->
<dependency> <dependency>
<groupId>p6spy</groupId> <groupId>p6spy</groupId>
<artifactId>p6spy</artifactId> <artifactId>p6spy</artifactId>
@@ -112,4 +112,4 @@
</plugins> </plugins>
</build> </build>
</project> </project>
@@ -39,31 +39,31 @@ spring:
enable: true enable: true
required: true required: true
## quartz定时任务,采用数据库方式 ## quartz定时任务,采用数据库方式
quartz: # quartz:
job-store-type: jdbc # job-store-type: jdbc
initialize-schema: embedded # initialize-schema: embedded
#定时任务启动开关,true-开 false-关 # #定时任务启动开关,true-开 false-关
auto-startup: true # auto-startup: true
#启动时更新己存在的Job # #启动时更新己存在的Job
overwrite-existing-jobs: true # overwrite-existing-jobs: true
properties: # properties:
org: # org:
quartz: # quartz:
scheduler: # scheduler:
instanceName: MyScheduler # instanceName: MyScheduler
instanceId: AUTO # instanceId: AUTO
jobStore: # jobStore:
class: org.quartz.impl.jdbcjobstore.JobStoreTX # class: org.quartz.impl.jdbcjobstore.JobStoreTX
driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate # driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate
tablePrefix: QRTZ_ # tablePrefix: QRTZ_
isClustered: true # isClustered: true
misfireThreshold: 60000 # misfireThreshold: 60000
clusterCheckinInterval: 10000 # clusterCheckinInterval: 10000
threadPool: # threadPool:
class: org.quartz.simpl.SimpleThreadPool # class: org.quartz.simpl.SimpleThreadPool
threadCount: 10 # threadCount: 10
threadPriority: 5 # threadPriority: 5
threadsInheritContextClassLoaderOfInitializingThread: true # threadsInheritContextClassLoaderOfInitializingThread: true
#json 时间戳统一转换 #json 时间戳统一转换
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
@@ -178,40 +178,40 @@ spring:
# max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。 # max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
# min-idle: 0 #最小等待连接中的数量,设 0 为没有限制 # min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
# shutdown-timeout: 100ms # shutdown-timeout: 100ms
redis: # redis:
database: 11 # database: 11
host: 121.36.69.172 # host: 121.36.69.172
#host: localhost # #host: localhost
lettuce: # lettuce:
pool: # pool:
max-active: 8 #最大连接数据库连接数,设 0 为没有限制 # max-active: 8 #最大连接数据库连接数,设 0 为没有限制
max-idle: 8 #最大等待连接中的数量,设 0 为没有限制 # max-idle: 8 #最大等待连接中的数量,设 0 为没有限制
max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。 # max-wait: -1ms #最大建立连接等待时间。如果超过此时间将接到异常。设为-1表示无限制。
min-idle: 0 #最小等待连接中的数量,设 0 为没有限制 # min-idle: 0 #最小等待连接中的数量,设 0 为没有限制
shutdown-timeout: 100ms # shutdown-timeout: 100ms
password: hzwlsoft.com # password: hzwlsoft.com
port: 4780 # port: 4780
# port: 6379 # port: 6379
#rabbitmq 配置 #rabbitmq 配置
rabbitmq: # rabbitmq:
host: 121.36.69.172 # host: 121.36.69.172
username: admin # username: admin
password: hzwlsoft.com # password: hzwlsoft.com
port: 5672 # port: 5672
publisher-confirm-type: correlated # publisher-confirm-type: correlated
publisher-returns: true # publisher-returns: true
virtual-host: / # virtual-host: /
listener: # listener:
simple: # simple:
acknowledge-mode: manual # acknowledge-mode: manual
#消费者的最小数量 # #消费者的最小数量
concurrency: 1 # concurrency: 1
#消费者的最大数量 # #消费者的最大数量
max-concurrency: 1 # max-concurrency: 1
#是否支持重试 # #是否支持重试
retry: # retry:
enabled: true # enabled: true
#mybatis plus 设置 #mybatis plus 设置
mybatis-plus: mybatis-plus:
mapper-locations: classpath*:com/jero/**/xml/*Mapper.xml mapper-locations: classpath*:com/jero/**/xml/*Mapper.xml