java110
2023-03-30 72b30f7b2ee7fa04db2920ed037a65ec5e70be2a
service-user/src/main/java/com/java110/user/cmd/owner/DeleteOwnerCmd.java
@@ -5,8 +5,9 @@
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.doc.annotation.*;
import com.java110.dto.RoomDto;
import com.java110.dto.owner.OwnerAppUserDto;
import com.java110.dto.owner.OwnerCarDto;
@@ -27,8 +28,37 @@
import java.util.List;
@Java110CmdDoc(title = "删除业主",
        description = "第三方系统,比如招商系统删除业主信息",
        httpMethod = "post",
        url = "http://{ip}:{port}/app/owner.deleteOwner",
        resource = "userDoc",
        author = "吴学文",
        serviceCode = "owner.deleteOwner",
        seq = 11
)
@Java110ParamsDoc(params = {
        @Java110ParamDoc(name = "communityId", length = 30, remark = "小区ID"),
        @Java110ParamDoc(name = "memberId", length = 30, remark = "业主ID"),
})
@Java110ResponseDoc(
        params = {
                @Java110ParamDoc(name = "code", type = "int", length = 11, defaultValue = "0", remark = "返回编号,0 成功 其他失败"),
                @Java110ParamDoc(name = "msg", type = "String", length = 250, defaultValue = "成功", remark = "描述"),
        }
)
@Java110ExampleDoc(
        reqBody="{\n" +
                "\t\"memberId\": 123123123,\n" +
                "\t\"communityId\": \"2022121921870161\"\n" +
                "}",
        resBody="{\"code\":0,\"msg\":\"成功\"}"
)
@Java110Cmd(serviceCode = "owner.deleteOwner")
public class DeleteOwnerCmd extends AbstractServiceCmdListener {
public class DeleteOwnerCmd extends Cmd {
    @Autowired
    private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
@@ -103,7 +133,7 @@
        if (flag < 1) {
            throw new CmdException("删除失败");
        }
        if (reqJson.containsKey("ownerTypeCd") && !StringUtil.isEmpty(reqJson.getString("ownerTypeCd")) && reqJson.getString("ownerTypeCd").equals("1001")) {
        if (OwnerDto.OWNER_TYPE_CD_OWNER.equals(reqJson.getString("ownerTypeCd"))) {
            OwnerAppUserDto ownerAppUserDto = new OwnerAppUserDto();
            ownerAppUserDto.setMemberId(reqJson.getString("ownerId"));
            //查询app用户表
@@ -111,7 +141,7 @@
            if (ownerAppUserDtos != null && ownerAppUserDtos.size() > 0) {
                for (OwnerAppUserDto ownerAppUser : ownerAppUserDtos) {
                    OwnerAppUserPo ownerAppUserPo = BeanConvertUtil.covertBean(ownerAppUser, OwnerAppUserPo.class);
                    flag = ownerAppUserV1InnerServiceSMOImpl.saveOwnerAppUser(ownerAppUserPo);
                    flag = ownerAppUserV1InnerServiceSMOImpl.deleteOwnerAppUser(ownerAppUserPo);
                    if (flag < 1) {
                        throw new CmdException("删除失败");
                    }