Browse Source

resi_event修改is_party类型为tinyint(1)

dev_shibei_match
yinzuomei 4 years ago
parent
commit
6c040539f9
  1. 2
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java
  2. 9
      epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java
  3. 2
      epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.16__create_resievent_tables.sql

2
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/entity/ResiEventEntity.java

@ -66,7 +66,7 @@ public class ResiEventEntity extends BaseEpmetEntity {
/** /**
* 1党员0不是党员默认0 * 1党员0不是党员默认0
*/ */
private String isParty; private Boolean isParty;
/** /**
* 事件内容 * 事件内容

9
epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java

@ -35,6 +35,7 @@ import com.epmet.dao.ResiEventDao;
import com.epmet.dto.form.*; import com.epmet.dto.form.*;
import com.epmet.dto.result.*; import com.epmet.dto.result.*;
import com.epmet.entity.ResiEventEntity; import com.epmet.entity.ResiEventEntity;
import com.epmet.feign.EpmetUserOpenFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.ResiEventService; import com.epmet.service.ResiEventService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -66,6 +67,8 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
private String imgSyncScanMethod; private String imgSyncScanMethod;
@Autowired @Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient; private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private EpmetUserOpenFeignClient epmetUserOpenFeignClient;
/** /**
@ -136,7 +139,11 @@ public class ResiEventServiceImpl extends BaseServiceImpl<ResiEventDao, ResiEven
resiEventEntity.setPids(gridInfoRes.getData().getPids()); resiEventEntity.setPids(gridInfoRes.getData().getPids());
resiEventEntity.setReportUserId(formDTO.getUserId()); resiEventEntity.setReportUserId(formDTO.getUserId());
//todo //todo
resiEventEntity.setIsParty("?????"); Result<Boolean> partyRes=epmetUserOpenFeignClient.selectIsPartyMemberByUserId(formDTO.getUserId());
if(!partyRes.success()||null==partyRes.getData()){
throw new RenException("查询用户是否是党员异常");
}
resiEventEntity.setIsParty(partyRes.getData());
resiEventEntity.setStatus(EventConstant.EVENT_STATUS_PROCESSING); resiEventEntity.setStatus(EventConstant.EVENT_STATUS_PROCESSING);
resiEventEntity.setShiftProject(false); resiEventEntity.setShiftProject(false);
resiEventEntity.setProjectId(StrConstant.EPMETY_STR); resiEventEntity.setProjectId(StrConstant.EPMETY_STR);

2
epmet-module/gov-project/gov-project-server/src/main/resources/db/migration/V0.0.16__create_resievent_tables.sql

@ -5,7 +5,7 @@ CREATE TABLE `resi_event` (
`AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端用户所在网格的所属组织', `AGENCY_ID` varchar(64) NOT NULL COMMENT '居民端用户所在网格的所属组织',
`PIDS` varchar(64) NOT NULL COMMENT '居民端用户所在网格的所有上级组织,包含AGENCY_ID', `PIDS` varchar(64) NOT NULL COMMENT '居民端用户所在网格的所有上级组织,包含AGENCY_ID',
`REPORT_USER_ID` varchar(64) NOT NULL COMMENT '报事的人', `REPORT_USER_ID` varchar(64) NOT NULL COMMENT '报事的人',
`IS_PARTY` varchar(1) NOT NULL DEFAULT '0' COMMENT '1:党员;0:不是党员;默认0', `IS_PARTY` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1:党员;0:不是党员;默认0',
`EVENT_CONTENT` varchar(1024) NOT NULL COMMENT '事件内容', `EVENT_CONTENT` varchar(1024) NOT NULL COMMENT '事件内容',
`LATITUDE` varchar(32) DEFAULT NULL COMMENT '纬度', `LATITUDE` varchar(32) DEFAULT NULL COMMENT '纬度',
`LONGITUDE` varchar(32) DEFAULT NULL COMMENT '经度', `LONGITUDE` varchar(32) DEFAULT NULL COMMENT '经度',

Loading…
Cancel
Save