diff --git a/pqs-common/common-redis/src/main/java/com/njcn/redis/pojo/enums/AppRedisKey.java b/pqs-common/common-redis/src/main/java/com/njcn/redis/pojo/enums/AppRedisKey.java index 715f249db..e4d04397d 100644 --- a/pqs-common/common-redis/src/main/java/com/njcn/redis/pojo/enums/AppRedisKey.java +++ b/pqs-common/common-redis/src/main/java/com/njcn/redis/pojo/enums/AppRedisKey.java @@ -13,7 +13,7 @@ public interface AppRedisKey { /** * 设备模板前缀 */ - String MODEL = "MODEL"; + String MODEL = "MODEL:"; /** @@ -39,7 +39,7 @@ public interface AppRedisKey { /** * 监测点位置数据 */ - String LINE_POSITION = "LINEPOSITION"; + String LINE_POSITION = "LINEPOSITION:"; /** * rocketMQ消费key diff --git a/pqs-gateway/src/main/resources/bootstrap-sjzx.yml b/pqs-gateway/src/main/resources/bootstrap-sjzx.yml index 441af6c47..741462103 100644 --- a/pqs-gateway/src/main/resources/bootstrap-sjzx.yml +++ b/pqs-gateway/src/main/resources/bootstrap-sjzx.yml @@ -249,6 +249,7 @@ whitelist: - /harmonic-boot/comAccess/getComAccessData - /harmonic-boot/harmonic/getHistoryResult - /event-boot/transient/getTransientAnalyseWave + - /cs-system-boot/appVersion/getLastData # - /** #开始 # - /advance-boot/** diff --git a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/AppUserServiceImpl.java b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/AppUserServiceImpl.java index 8636e4378..4653f9205 100644 --- a/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/AppUserServiceImpl.java +++ b/pqs-user/user-boot/src/main/java/com/njcn/user/service/impl/AppUserServiceImpl.java @@ -25,7 +25,6 @@ import lombok.AllArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -106,37 +105,30 @@ public class AppUserServiceImpl extends ServiceImpl impleme throw new BusinessException(UserResponseEnum.DEV_CODE_WRONG); } judgeCode(phone, code); - String password = null; - //先根据手机号查询是否已被注册 - User user = this.lambdaQuery().eq(User::getPhone,phone).ne(User::getState,0).one(); - if (!Objects.isNull(user)){ - throw new BusinessException(UserResponseEnum.REGISTER_PHONE_REPEAT); - } else { - //新增用户配置表 - UserSet userSet = userSetService.addAppUserSet(); - //新增用户表 - User newUser = cloneUserBoToUser(phone,devCode,userSet); - //新增用户角色关系表 - Role role = roleService.getRoleByCode(AppRoleEnum.TOURIST.getCode()); - userRoleService.addUserRole(newUser.getId(), Collections.singletonList(role.getId())); - //消息默认配置 - AppInfoSet appInfoSet = new AppInfoSet(); - appInfoSet.setUserId(newUser.getId()); - appInfoSet.setHarmonicInfo(1); - appInfoSet.setEventInfo(1); - appInfoSet.setRunInfo(1); - appInfoSet.setAlarmInfo(1); - appInfoSet.setIticFunction(0); - appInfoSet.setF47Function(0); - appInfoSetService.save(appInfoSet); - //发送用户初始密码 - password = redisUtil.getStringByKey(newUser.getId()); - String content = SmsUtil.getLianTongMessageTemplate("3", password); - smsSendService.sendSmsWithRetry(phone,content,"verify_code"); - redisUtil.delete(newUser.getId()); - //删除验证码 - deleteCode(phone); - } + //新增用户配置表 + UserSet userSet = userSetService.addAppUserSet(); + //新增用户表 + User newUser = cloneUserBoToUser(phone,devCode,userSet); + //新增用户角色关系表 + Role role = roleService.getRoleByCode(AppRoleEnum.TOURIST.getCode()); + userRoleService.addUserRole(newUser.getId(), Collections.singletonList(role.getId())); + //消息默认配置 + AppInfoSet appInfoSet = new AppInfoSet(); + appInfoSet.setUserId(newUser.getId()); + appInfoSet.setHarmonicInfo(1); + appInfoSet.setEventInfo(1); + appInfoSet.setRunInfo(1); + appInfoSet.setAlarmInfo(1); + appInfoSet.setIticFunction(0); + appInfoSet.setF47Function(0); + appInfoSetService.save(appInfoSet); + //发送用户初始密码 + String password = redisUtil.getStringByKey(newUser.getId()); + String content = SmsUtil.getLianTongMessageTemplate("3", password); + smsSendService.sendSmsWithRetry(phone,content,"verify_code"); + redisUtil.delete(newUser.getId()); + //删除验证码 + deleteCode(phone); } @Override