接口调整

This commit is contained in:
2023-08-22 10:04:29 +08:00
parent d023906df4
commit a38f6747f1
8 changed files with 14 additions and 110 deletions

View File

@@ -1,16 +0,0 @@
package com.njcn.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.njcn.user.pojo.po.app.AppInfoSet;
/**
* <p>
* APP用户消息配置表 Mapper 接口
* </p>
*
* @author xuyang
* @since 2023-06-08
*/
public interface AppInfoSetMapper extends BaseMapper<AppInfoSet> {
}

View File

@@ -1,16 +0,0 @@
package com.njcn.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.njcn.user.pojo.po.app.AppInfoSet;
/**
* <p>
* APP用户消息配置表 服务类
* </p>
*
* @author xuyang
* @since 2023-06-08
*/
public interface IAppInfoSetService extends IService<AppInfoSet> {
}

View File

@@ -1,20 +0,0 @@
package com.njcn.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njcn.user.mapper.AppInfoSetMapper;
import com.njcn.user.pojo.po.app.AppInfoSet;
import com.njcn.user.service.IAppInfoSetService;
import org.springframework.stereotype.Service;
/**
* <p>
* APP用户消息配置表 服务实现类
* </p>
*
* @author xuyang
* @since 2023-06-08
*/
@Service
public class AppInfoSetServiceImpl extends ServiceImpl<AppInfoSetMapper, AppInfoSet> implements IAppInfoSetService {
}

View File

@@ -15,6 +15,8 @@ import com.njcn.common.pojo.constant.PatternRegex;
import com.njcn.common.pojo.exception.BusinessException;
import com.njcn.common.utils.PubUtils;
import com.njcn.common.utils.sm.Sm4Utils;
import com.njcn.cssystem.api.AppInfoSetFeignClient;
import com.njcn.cssystem.pojo.po.AppInfoSet;
import com.njcn.redis.pojo.enums.RedisKeyEnum;
import com.njcn.redis.utils.RedisUtil;
import com.njcn.user.enums.AppRoleEnum;
@@ -26,7 +28,6 @@ import com.njcn.user.pojo.constant.UserType;
import com.njcn.user.pojo.po.Role;
import com.njcn.user.pojo.po.User;
import com.njcn.user.pojo.po.UserSet;
import com.njcn.user.pojo.po.app.AppInfoSet;
import com.njcn.user.pojo.po.app.AppSendMsg;
import com.njcn.user.service.*;
import lombok.AllArgsConstructor;
@@ -58,14 +59,14 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, User> impleme
private final IAppSendMsgService appSendMsgService;
private final IAppInfoSetService appInfoSetService;
private final IUserSetService userSetService;
private final IRoleService roleService;
private final IUserRoleService userRoleService;
private final AppInfoSetFeignClient appInfoSetFeignClient;
@Override
@Transactional(rollbackFor = Exception.class)
public void setMessage(String phone, String devCode, String type) {
@@ -200,12 +201,12 @@ public class AppUserServiceImpl extends ServiceImpl<AppUserMapper, User> impleme
userRoleService.addUserRole(newUser.getId(), Collections.singletonList(role.getId()));
//消息默认配置
AppInfoSet appInfoSet = new AppInfoSet();
appInfoSet.setUserIndex(newUser.getId());
appInfoSet.setUserId(newUser.getId());
appInfoSet.setDeviceInfo(1);
appInfoSet.setEventInfo(1);
appInfoSet.setSystemInfo(1);
appInfoSet.setHarmonicInfo(1);
appInfoSetService.save(appInfoSet);
appInfoSet.setDataInfo(1);
appInfoSetFeignClient.add(appInfoSet);
//发送用户初始密码
sendPasswordMessage(phone,newUser.getId());
//删除验证码