| | |
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.msg.MsgDeviceReadStateMapper;
|
| | | import com.yeshi.fanli.entity.bus.msg.MsgDeviceReadState;
|
| | |
| | | }
|
| | |
|
| | | @Override
|
| | | public void addUnreadDeviceMsg(String type, String device, int platform, int msgCount, String msg,Date msgTime) {
|
| | | public void addUnreadDeviceMsg(String type, String device, int platform, int msgCount, String msg, Date msgTime) {
|
| | | MsgDeviceReadState state = msgDeviceReadStateMapper.selectByDeviceAndPlatformAndType(device, platform, type);
|
| | | if (state != null) {
|
| | | MsgDeviceReadState update = new MsgDeviceReadState();
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public MsgDeviceReadState getByDeviceAndPlatformAndType(String type, String device, int platform) {
|
| | | MsgDeviceReadState state = msgDeviceReadStateMapper.selectByDeviceAndPlatformAndType(device, platform, type);
|
| | | MsgDeviceReadState state = msgDeviceReadStateMapper.selectByDeviceAndPlatformAndTypeForUpdate(device, platform,
|
| | | type);
|
| | | if (state == null) {
|
| | | state = new MsgDeviceReadState();
|
| | | state.setCreateTime(new Date());
|