From 1ac555ce49a45e2c7fc015dbb16b104840788c21 Mon Sep 17 00:00:00 2001
From: chengf <2156125618@qq.com>
Date: 星期一, 18 八月 2025 11:51:42 +0800
Subject: [PATCH] 费用导入修复2025/08/15
---
service-user/src/main/java/com/java110/user/cmd/owner/OwnerCommunityCmd.java | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
diff --git a/service-user/src/main/java/com/java110/user/cmd/owner/OwnerCommunityCmd.java b/service-user/src/main/java/com/java110/user/cmd/owner/OwnerCommunityCmd.java
index ca933bf..89fd7d9 100644
--- a/service-user/src/main/java/com/java110/user/cmd/owner/OwnerCommunityCmd.java
+++ b/service-user/src/main/java/com/java110/user/cmd/owner/OwnerCommunityCmd.java
@@ -4,15 +4,13 @@
import com.java110.core.annotation.Java110Cmd;
import com.java110.core.annotation.Java110Transactional;
import com.java110.core.context.ICmdDataFlowContext;
-import com.java110.core.event.cmd.AbstractServiceCmdListener;
+import com.java110.core.event.cmd.Cmd;
import com.java110.core.event.cmd.CmdEvent;
import com.java110.core.factory.GenerateCodeFactory;
import com.java110.dto.community.CommunityDto;
import com.java110.dto.owner.OwnerAppUserDto;
import com.java110.dto.owner.OwnerDto;
-import com.java110.intf.common.ISmsInnerServiceSMO;
import com.java110.intf.community.ICommunityInnerServiceSMO;
-import com.java110.intf.store.IStoreInnerServiceSMO;
import com.java110.intf.user.*;
import com.java110.po.owner.OwnerAppUserPo;
import com.java110.utils.exception.CmdException;
@@ -20,7 +18,7 @@
import com.java110.utils.util.BeanConvertUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.ArrayList;
@@ -30,7 +28,7 @@
* 鏈嶅姟娉ㄥ唽鍔熻兘杩佺Щ
*/
@Java110Cmd(serviceCode = "owner.ownerCommunity")
-public class OwnerCommunityCmd extends AbstractServiceCmdListener {
+public class OwnerCommunityCmd extends Cmd {
private final static Logger logger = LoggerFactory.getLogger(OwnerCommunityCmd.class);
@Autowired
@@ -45,7 +43,7 @@
@Override
public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
- Assert.hasKeyAndValue(reqJson, "link", "鏈寘鍚仈绯荤數璇�");
+// Assert.hasKeyAndValue(reqJson, "link", "鏈寘鍚仈绯荤數璇�");
}
@Override
@@ -53,7 +51,12 @@
public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
OwnerDto ownerDto = new OwnerDto();
- ownerDto.setLink(reqJson.getString("link"));
+ if (reqJson.containsKey("ownerId")) {
+ ownerDto.setOwnerId(reqJson.getString("ownerId"));
+ }
+ if(reqJson.containsKey("link")){
+ ownerDto.setLink(reqJson.getString("link"));
+ }
List<OwnerDto> ownerDtos = ownerInnerServiceSMOImpl.queryOwnerMembers(ownerDto);
if (ownerDtos == null || ownerDtos.size() < 1) {
@@ -71,12 +74,18 @@
communityDto.setState("1100");
communityDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()]));
List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
+ if (communityDtos == null || communityDtos.size() < 1) {
+ cmdDataFlowContext.setResponseEntity(ResultVo.success());
+ return;
+ }
for (OwnerDto tmpOwnerDto : ownerDtos) {
for (CommunityDto tmpCommunityDto : communityDtos) {
if (!tmpCommunityDto.getCommunityId().equals(tmpOwnerDto.getCommunityId())) {
continue;
}
tmpOwnerDto.setCommunityName(tmpCommunityDto.getName());
+ tmpOwnerDto.setsCommunityTel(tmpCommunityDto.getTel());
+ tmpOwnerDto.setCommunityQrCode(tmpCommunityDto.getQrCode());
}
}
@@ -121,13 +130,14 @@
private void addOwnerAppUser(OwnerDto ownerDto, OwnerAppUserDto ownerAppUserDto) {
OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(ownerAppUserDto, OwnerAppUserPo.class);
- //鐘舵�佺被鍨嬶紝10000 瀹℃牳涓紝12000 瀹℃牳鎴愬姛锛�13000 瀹℃牳澶辫触
+ //鐘舵�佺被鍨嬶紝10000 瀹℃牳涓紝 11000 寰呰璇� ,12000 瀹℃牳鎴愬姛锛�13000 瀹℃牳澶辫触
ownerAppUserPo.setAppUserId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_appUserId));
ownerAppUserPo.setMemberId(ownerDto.getMemberId());
ownerAppUserPo.setCommunityName(ownerDto.getCommunityName());
ownerAppUserPo.setCommunityId(ownerDto.getCommunityId());
ownerAppUserPo.setAppUserName(ownerDto.getName());
ownerAppUserPo.setIdCard(ownerDto.getIdCard());
+ ownerAppUserPo.setOwnerTypeCd(ownerDto.getOwnerTypeCd());
int flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo);
if (flag < 1) {
throw new CmdException("娣诲姞鐢ㄦ埛涓氫富鍏崇郴澶辫触");
--
Gitblit v1.8.0