Commit 0af6975c authored by tangwei's avatar tangwei

修改接口

parent f9b60f8b
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import com.yeejoin.amos.boot.module.jcs.api.dto.AlertCalledDto;
import com.yeejoin.amos.boot.module.jcs.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.jcs.api.entity.Firefighters;
import com.yeejoin.amos.boot.module.jcs.api.mapper.AlertCalledMapper;
import com.yeejoin.amos.boot.module.jcs.api.service.IAlertCalledService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.typroject.tyboot.core.rdbms.service.BaseService;
......@@ -16,4 +22,33 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
@Service
public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCalled,AlertCalledMapper> implements IAlertCalledService {
@Autowired
RedisUtils redisUtils;
@Autowired
AlertCalledMapper alertCalledMapper;
/*
* 根据id 修改警情
* type:警情相关 操作类型 0警情续报 1非警情确认 2 警情结案
* */
@Override
public boolean updateAlertCalled(Long id, String code,String name) {
// TODO Auto-generated method stub
switch (code) {
case "314":
alertCalledMapper.update(null, new UpdateWrapper<AlertCalled>().eq("sequence_nbr", id)
.set("alert_status", 1).set("alert_stage", "").set("alarm_type", name).set("alarm_type_code", code) );
break;
case "315":
break;
default:
break;
}
//删除缓存
redisUtils.del(RedisKey.ALERTCALLED_ID+id);
return false;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment