wuxw
2024-03-22 33f61efc7eab6c6d28a3eae15909c6860e8a3d40
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
@@ -71,9 +69,9 @@
        communityDto.setState("1100");
        communityDto.setCommunityIds(communityIds.toArray(new String[communityIds.size()]));
        List<CommunityDto> communityDtos = communityInnerServiceSMOImpl.queryCommunitys(communityDto);
        if(communityDtos == null || communityDtos.size()<1){
        if (communityDtos == null || communityDtos.size() < 1) {
            cmdDataFlowContext.setResponseEntity(ResultVo.success());
            return ;
            return;
        }
        for (OwnerDto tmpOwnerDto : ownerDtos) {
            for (CommunityDto tmpCommunityDto : communityDtos) {
@@ -81,6 +79,8 @@
                    continue;
                }
                tmpOwnerDto.setCommunityName(tmpCommunityDto.getName());
                tmpOwnerDto.setsCommunityTel(tmpCommunityDto.getTel());
                tmpOwnerDto.setCommunityQrCode(tmpCommunityDto.getQrCode());
            }
        }
@@ -132,6 +132,7 @@
        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("添加用户业主关系失败");