fix: 修正缓存

dev
huangfeng 5 months ago
parent 06825576fe
commit 991d413545

@ -42,6 +42,8 @@ public class TerminalChannelMapperListModel implements Serializable {
@ApiModelProperty(value = "别名", example = "alias") @ApiModelProperty(value = "别名", example = "alias")
private String alias; private String alias;
private Integer type;
@ApiModelProperty(value = "通道编号", example = "123456") @ApiModelProperty(value = "通道编号", example = "123456")
private Integer channelid; private Integer channelid;

@ -15,6 +15,7 @@
<id column="id" jdbcType="INTEGER" property="id" /> <id column="id" jdbcType="INTEGER" property="id" />
<result column="termid" jdbcType="INTEGER" property="termid" /> <result column="termid" jdbcType="INTEGER" property="termid" />
<result column="alias" jdbcType="VARCHAR" property="alias" /> <result column="alias" jdbcType="VARCHAR" property="alias" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="channel_id" jdbcType="INTEGER" property="channelid" /> <result column="channel_id" jdbcType="INTEGER" property="channelid" />
<result column="channel_name" jdbcType="VARCHAR" property="channelname" /> <result column="channel_name" jdbcType="VARCHAR" property="channelname" />
<result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth" /> <result column="max_resolution_width" jdbcType="INTEGER" property="maxResolutionWidth" />
@ -348,6 +349,7 @@
x.id as id, x.id as id,
x.term_id as termid, x.term_id as termid,
x.alias as alias, x.alias as alias,
x.type as type,
x.channel_id as channel_id, x.channel_id as channel_id,
y.channel_name as channel_name, y.channel_name as channel_name,
y.max_resolution_width as max_resolution_width, y.max_resolution_width as max_resolution_width,

@ -253,7 +253,7 @@ public class TerminalExtServiceImpl implements TerminalExtService {
} }
@Override @Override
@CacheEvict(cacheNames = {"permissionfull", "permissionover", "fulltree", "cacheTerminalMap"}, allEntries = true) @CacheEvict(cacheNames = {"permissionfull", "permissionover", "fulltree", "cacheTerminalMap", "termAndchannelMap"}, allEntries = true)
public void importTerminal(UploadModel model) { public void importTerminal(UploadModel model) {
Lines line = newCacheService.getLine(model.getLineId()); Lines line = newCacheService.getLine(model.getLineId());
if (line == null) { if (line == null) {

@ -251,7 +251,7 @@ public class TerminalServiceImpl implements TerminalService {
* @return * @return
*/ */
@Override @Override
@CacheEvict(cacheNames = {"permissionfull", "permissionover", "fulltree", "cacheTerminalMap"}, allEntries = true) @CacheEvict(cacheNames = {"permissionfull", "permissionover", "fulltree", "cacheTerminalMap", "termAndchannelMap"}, allEntries = true)
public ServiceBody<String> addTerminal(TerminalVo vo) { public ServiceBody<String> addTerminal(TerminalVo vo) {
String cmdId = vo.getCmdid(); String cmdId = vo.getCmdid();
Terminals terminals = new Terminals(); Terminals terminals = new Terminals();
@ -270,7 +270,7 @@ public class TerminalServiceImpl implements TerminalService {
if (CollectionUtil.isNotEmpty(channelId)) { if (CollectionUtil.isNotEmpty(channelId)) {
List<TerminalChannelMapper> list = new ArrayList<>(); List<TerminalChannelMapper> list = new ArrayList<>();
for (TerminalVo.ChannelItem item : channelId) { for (TerminalVo.ChannelItem item : channelId) {
if (item.getType() == null){ if (item.getType() == null) {
item.setType(0); item.setType(0);
} }
TerminalChannelMapper record = new TerminalChannelMapper(); TerminalChannelMapper record = new TerminalChannelMapper();
@ -300,7 +300,7 @@ public class TerminalServiceImpl implements TerminalService {
* @return * @return
*/ */
@Override @Override
@CacheEvict(cacheNames = {"fulltree", "cacheTerminalMap"}, allEntries = true) @CacheEvict(cacheNames = {"fulltree", "cacheTerminalMap", "termAndchannelMap"}, allEntries = true)
public ServiceBody<String> updateTerminal(UpdateTerminalVo vo) { public ServiceBody<String> updateTerminal(UpdateTerminalVo vo) {
Integer termid = vo.getId(); Integer termid = vo.getId();
List<UpdateTerminalVo.Item> channelId = vo.getList(); List<UpdateTerminalVo.Item> channelId = vo.getList();
@ -315,7 +315,7 @@ public class TerminalServiceImpl implements TerminalService {
if (CollectionUtil.isNotEmpty(channelId)) { if (CollectionUtil.isNotEmpty(channelId)) {
List<TerminalChannelMapper> list = new ArrayList<>(); List<TerminalChannelMapper> list = new ArrayList<>();
for (UpdateTerminalVo.Item item : channelId) { for (UpdateTerminalVo.Item item : channelId) {
if (item.getType() == null){ if (item.getType() == null) {
item.setType(0); item.setType(0);
} }
TerminalChannelMapper record = new TerminalChannelMapper(); TerminalChannelMapper record = new TerminalChannelMapper();

Loading…
Cancel
Save