Browse Source

新增事件默认状态 0

develop
王兴琳 10 months ago
parent
commit
261bac39f7
  1. 7
      ruoyi-common/src/test/java/OkhttpTest.java
  2. 1
      zc-business/src/main/java/com/zc/business/domain/DcEvent.java
  3. 2
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java
  4. 1
      zc-business/src/main/resources/mapper/business/DcEventMapper.xml

7
ruoyi-common/src/test/java/OkhttpTest.java

@ -1,3 +1,4 @@
import com.ruoyi.common.utils.uuid.IdUtils;
import com.zc.common.core.httpclient.OkHttp;
import com.zc.common.core.httpclient.exception.HttpException;
import com.zc.common.core.httpclient.request.RequestParams;
@ -172,4 +173,10 @@ public class OkhttpTest {
}); // 请求方法
}
@Test
public void aaa(){
String uuid = IdUtils.fastSimpleUUID();
System.out.println(uuid.length());
System.out.println(uuid);
}
}

1
zc-business/src/main/java/com/zc/business/domain/DcEvent.java

@ -29,6 +29,7 @@ import com.ruoyi.common.core.domain.BaseEntity;
@NoArgsConstructor
public class DcEvent extends BaseEntity {
private static final long serialVersionUID = 1L;
private static final long event_state = 0L;
/**
* 事件编号
*/

2
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

@ -1,5 +1,6 @@
package com.zc.business.service.impl;
import java.awt.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -105,6 +106,7 @@ private DcEventAbnormalWeatherMapper dcEventAbnormalWeatherMapper;
//设置事件Id UUID无下划线格式32
String uuid = IdUtils.fastSimpleUUID();
dcEvent.setId(uuid);
dcEvent.setEventState(0L);
//获取部门信息
dcEvent.setDeptId(SecurityUtils.getDeptId());
dcEvent.setCreateTime(DateUtils.getNowDate());

1
zc-business/src/main/resources/mapper/business/DcEventMapper.xml

@ -581,7 +581,6 @@
<if test="eventState != null "> and event_state = #{eventState}</if>
<if test="startTime != null "> and start_time BETWEEN #{startTime} and #{endTime} </if>
</where>
</select>
<select id="selectCount" resultMap="countMap" resultType="map">

Loading…
Cancel
Save