From 9ec0a61f90ac2464eebc643bfe2d93ac9ba6e569 Mon Sep 17 00:00:00 2001
From: cgf <2156125618@qq.com>
Date: 星期六, 23 八月 2025 10:59:18 +0800
Subject: [PATCH] 折扣已完成现有需求2025/08/09
---
service-user/src/main/java/com/java110/user/cmd/user/UserLoginCmd.java | 56 +++++++++++++++++++++++++++++++++++---------------------
1 files changed, 35 insertions(+), 21 deletions(-)
diff --git a/service-user/src/main/java/com/java110/user/cmd/user/UserLoginCmd.java b/service-user/src/main/java/com/java110/user/cmd/user/UserLoginCmd.java
index 4011a89..35a724a 100644
--- a/service-user/src/main/java/com/java110/user/cmd/user/UserLoginCmd.java
+++ b/service-user/src/main/java/com/java110/user/cmd/user/UserLoginCmd.java
@@ -11,6 +11,7 @@
import com.java110.dto.app.AppDto;
import com.java110.dto.community.CommunityDto;
import com.java110.dto.msg.SmsDto;
+import com.java110.dto.owner.OwnerAppUserDto;
import com.java110.dto.owner.OwnerDto;
import com.java110.dto.user.UserAttrDto;
import com.java110.dto.user.UserDto;
@@ -29,6 +30,7 @@
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.CollectionUtils;
import java.util.HashMap;
import java.util.List;
@@ -154,6 +156,14 @@
tmpUserDto.setPassword("");
tmpUserDto.setToken(token);
tmpUserDto.setKey(newKey);
+ //鏌ヨ璁よ瘉鍏崇郴
+ OwnerAppUserDto dto = new OwnerAppUserDto();
+ dto.setUserId(userDtos.get(0).getUserId());
+ dto.setLink(userDtos.get(0).getTel());
+ List<OwnerAppUserDto> dtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(dto);
+ if(!CollectionUtils.isEmpty(dtos)){
+ tmpUserDto.setAuditState(dtos.get(0).getState());
+ }
context.setResponseEntity(ResultVo.createResponseEntity(tmpUserDto));
} catch (Exception e) {
logger.error("鐧诲綍寮傚父锛�", e);
@@ -215,30 +225,34 @@
if (flag < 1) {
throw new CmdException("娉ㄥ唽澶辫触");
}
-
- OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo();
- //鐘舵�佺被鍨嬶紝10000 瀹℃牳涓紝12000 瀹℃牳鎴愬姛锛�13000 瀹℃牳澶辫触
- ownerAppUserPo.setState("12000");
- ownerAppUserPo.setAppTypeCd("10010");
- ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId));
- ownerAppUserPo.setMemberId(ownerDtos.get(0).getMemberId());
- ownerAppUserPo.setCommunityName(tmpCommunityDto.getName());
- ownerAppUserPo.setCommunityId(ownerDtos.get(0).getCommunityId());
- ownerAppUserPo.setAppUserName(ownerDtos.get(0).getName());
- ownerAppUserPo.setIdCard(ownerDtos.get(0).getIdCard());
- ownerAppUserPo.setAppType("WECHAT");
- ownerAppUserPo.setLink(ownerDtos.get(0).getLink());
- ownerAppUserPo.setUserId(userPo.getUserId());
- ownerAppUserPo.setOpenId("-1");
-
- flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo);
- if (flag < 1) {
- throw new CmdException("娣诲姞鐢ㄦ埛涓氫富鍏崇郴澶辫触");
- }
-
UserDto userDto = new UserDto();
userDto.setUserId(userPo.getUserId());
List<UserDto> userDtos = userInnerServiceSMOImpl.getUsers(userDto);
+ //鐢╱serId鍜屾墜鏈哄彿鏌ヨ缁戝畾鍏崇郴锛屾病鏈夊垯鏂板
+ OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto();
+ ownerAppUserDto.setLink(userPo.getTel());
+ ownerAppUserDto.setUserId(userPo.getUserId());
+ List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserV1InnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto);
+ if(CollectionUtils.isEmpty(ownerAppUserDtos)){
+ OwnerAppUserPo ownerAppUserPo = new OwnerAppUserPo();
+ //鐘舵�佺被鍨嬶紝10000 瀹℃牳涓紝 11000 寰呰璇� ,12000 瀹℃牳鎴愬姛锛�13000 瀹℃牳澶辫触
+ ownerAppUserPo.setState(OwnerAppUserDto.STATE_NOT_AUDIT);
+ ownerAppUserPo.setAppTypeCd("10010");
+ ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId));
+ ownerAppUserPo.setMemberId(ownerDtos.get(0).getMemberId());
+ ownerAppUserPo.setCommunityName(tmpCommunityDto.getName());
+ ownerAppUserPo.setCommunityId(ownerDtos.get(0).getCommunityId());
+ ownerAppUserPo.setAppUserName(ownerDtos.get(0).getName());
+ ownerAppUserPo.setIdCard(ownerDtos.get(0).getIdCard());
+ ownerAppUserPo.setAppType("WECHAT");
+ ownerAppUserPo.setLink(ownerDtos.get(0).getLink());
+ ownerAppUserPo.setUserId(userPo.getUserId());
+ ownerAppUserPo.setOpenId("-1");
+ flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo);
+ if (flag < 1) {
+ throw new CmdException("娣诲姞鐢ㄦ埛涓氫富鍏崇郴澶辫触");
+ }
+ }
return userDtos;
}
--
Gitblit v1.8.0