|
|
@ -23,7 +23,11 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.FieldConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.EpmetException; |
|
|
|
import com.epmet.commons.tools.page.PageData; |
|
|
|
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; |
|
|
|
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; |
|
|
|
import com.epmet.commons.tools.utils.ConvertUtils; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import com.epmet.constant.UserConstant; |
|
|
@ -344,6 +348,13 @@ public class RegisterRelationServiceImpl extends BaseServiceImpl<RegisterRelatio |
|
|
|
RegisterRelationEntity entity = new RegisterRelationEntity(); |
|
|
|
entity.setCustomerId(userResiInfoDTO.getCustomerId()); |
|
|
|
entity.setGridId(userResiInfoDTO.getGridId()); |
|
|
|
//表中新增字段 为其赋值
|
|
|
|
GridInfoCache gridInfo = CustomerOrgRedis.getGridInfo(userResiInfoDTO.getGridId()); |
|
|
|
if (null == gridInfo) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取网格缓存失败", "获取网格缓存失败"); |
|
|
|
} |
|
|
|
entity.setAgencyId(gridInfo.getPid()); |
|
|
|
entity.setAgencyIdPath(gridInfo.getPids()); |
|
|
|
entity.setUserId(userResiInfoDTO.getUserId()); |
|
|
|
//首次注册用户 (0表示不参与计数 1表示参与计数)
|
|
|
|
entity.setFirstRegister(NumConstant.ONE_STR); |
|
|
|