# Conflicts:
#	数据库设计/蓝安集团一体化平台.pdma.json
This commit is contained in:
PQZ 2024-10-09 19:07:07 +08:00
commit 483199f042
3 changed files with 42 additions and 3 deletions

View File

@ -0,0 +1,20 @@
package cn.iocoder.yudao.module.app.service;
import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
/**
* @author vinjor-m
* @description 维修模块微信登录逻辑
**/
public interface WechatLoginService {
/**
* 维修系统-微信授权登录-未注册自动注册
* @author vinjor-M
* @date 15:14 2024/10/9
* @param decryptResult TODO
* @param openId TODO
* @param inviteId TODO
* @return cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO
**/
AdminUserDO wechatLogin(String decryptResult,String openId,String inviteId);
}

View File

@ -432,12 +432,13 @@ public class AdminAuthServiceImpl implements AdminAuthService {
//如果查不到则新增查到了则更新
UserSaveReqVO user = new UserSaveReqVO();
if (wxUser == null) {
// 新增
// 直接新注册一个账号
user.setUsername(phoneNumber);
user.setNickname(phoneNumber);
user.setMobile(phoneNumber);
user.setPassword(passwordEncoder.encode("123456"));
user.setRepairOpenId(openId);
//TODO 客户后期没有租户ID
user.setTenantId(180L);
if (null!=inviteId){
//绑定上级
@ -453,7 +454,6 @@ public class AdminAuthServiceImpl implements AdminAuthService {
}else {
//更新
user.setId(wxUser.getId());
user.setNickname(phoneNumber);
user.setRepairOpenId(openId);
if (ObjectUtil.isEmpty(user.getInviteId())){
if (null!=inviteId){

View File

@ -24096,6 +24096,24 @@
"uiHint": "642D2E0A-8846-4549-BE56-8C0473F26EDE",
"baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64"
},
{
"defKey": "cus_can_read",
"defName": "配件清单客户是否可见",
"comment": "",
"type": "",
"len": "",
"scale": "",
"primaryKey": false,
"notNull": false,
"autoIncrement": false,
"defaultValue": "",
"hideInGraph": false,
"refDict": "FA7F294D-D46F-470F-B159-8730EB858893",
"baseType": "FC9790A7-36B8-4A48-8F9A-BC1042BCFE64",
"extProps": {},
"domain": "6F7C1C5C-D159-41E6-BF9D-54DEEFA79AFF",
"id": "116FC04F-0B4C-4599-80B8-D27093B67B14"
},
{
"defKey": "tenant_id",
"defName": "租户号",
@ -24352,7 +24370,8 @@
"type": "P",
"sysProps": {
"nameTemplate": "{defKey}[{defName}]"
}
},
"notes": {}
},
{
"id": "341FA654-5D25-48C9-B558-C0C0CF2C7877",