diff --git a/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java new file mode 100644 index 00000000..13fc339b --- /dev/null +++ b/dl-module-repair/src/main/java/cn/iocoder/yudao/module/app/service/WechatLoginService.java @@ -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); +} diff --git a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java index c5e64611..cdd01132 100644 --- a/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java +++ b/yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/auth/AdminAuthServiceImpl.java @@ -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){ diff --git a/数据库设计/蓝安集团一体化平台.pdma.json b/数据库设计/蓝安集团一体化平台.pdma.json index 73b9ce9f..11c9a81c 100644 --- a/数据库设计/蓝安集团一体化平台.pdma.json +++ b/数据库设计/蓝安集团一体化平台.pdma.json @@ -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",