OpenController.java 24.9 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497
package cn.com.glsx.merchants.controller;

import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.model.response.MerchantSubListResponse;
import cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest;
import cn.com.glsx.merchants.request.merchant.FindBySupMerchantNoRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.service.OpenService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;

import java.util.List;

/**
 * @author zhouhaibao
 * @version 1.0
 * @description: TODO
 * @date 2021/9/17 9:41
 */
@Slf4j
@Api("对外开发接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class OpenController {

    @Autowired
    private OpenService openService;

    @ServiceMethod(method = "merchants.api.open.findMerchantDetailByMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户号查询商户详情")
    public RopResponse<MerchantRopResponse> findMerchantDetailByMerchantNo(OpenMerchantDetailRequest openMerchantRequest) {
        try {
            MerchantRopResponse merchantRopResponse = openService.findMerchantDetailByMerchantNo(openMerchantRequest);
            return RopResponse.success(merchantRopResponse);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMerchantDetailByMerchantNo__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findSuperlativeMerchant", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户号最上级工厂商户号")
    public RopResponse<Integer> findSuperlativeMerchant(OpenMerchantDetailRequest openMerchantRequest) {
        try {
            Integer superlativeMerchant = openService.findSuperlativeMerchant(openMerchantRequest);
            return RopResponse.success(superlativeMerchant);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findSuperlativeMerchant__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }


    @ServiceMethod(method = "merchants.api.open.findSuperiorList", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户查询商户上级列表")
    public RopResponse<List<MerchantRopResponse>> findSuperiorList(OpenMerchantLevelRequest openMerchantRequest) {
        try {
            List<MerchantRopResponse> superiorList = openService.findSuperiorList(openMerchantRequest);
            return RopResponse.success(superiorList);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findSuperiorList__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findMerchantList", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户名称和渠道类型查询商户列表")
    public RopResponse<List<MerchantRopResponse>> findMerchantList(OpenMerchantListRequest openMerchantRequest) {
        try {
            List<MerchantRopResponse> superiorList = openService.findMerchantList(openMerchantRequest);
            return RopResponse.success(superiorList);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findSuperiorList__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findSubordinateListByPage", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户查询商户下级列表")
    public RopResponse<Pagination<MerchantRopResponse>> findSubordinateListByPage(OpenMerchantPageRequest openMerchantRequest) {
        try {
            Pagination<MerchantRopResponse> subordinateListByPage = openService.findSubordinateListByPage(openMerchantRequest);
            return RopResponse.success(subordinateListByPage);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findSubordinateListByPage__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.checkBussinessAccount", needInSession = NeedInSessionType.NO)
    @ApiOperation("用户登录校验")
    public RopResponse<List<OpenUserResponse>> checkBussinessAccount(OpenCheckUserRequest openUserRequest) {
        try {
            List<OpenUserResponse> openUserResponse = openService.checkBussinessAccount(openUserRequest);

            return RopResponse.success(openUserResponse);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__checkBussinessAccount__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findDataPermission", needInSession = NeedInSessionType.NO)
    @ApiOperation("用户数据权限获取")
    public RopResponse<List<Integer>> findDataPermission(OpenUserDataPermissionRequest openUserRequest) {
        try {
            List<Integer> dataPermission = openService.findDataPermission(openUserRequest);
            return RopResponse.success(dataPermission);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findDataPermission__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findMenuFunPermission", needInSession = NeedInSessionType.NO)
    @ApiOperation("用户菜单权限获取")
    public RopResponse<List<AccountTypeTreeRopResponse>> findMenuFunPermission(OpenUserMenuPermissionRequest openUserRequest) {
        try {
            List<AccountTypeTreeRopResponse> menuFunPermission = openService.findMenuFunPermission(openUserRequest);
            return RopResponse.success(menuFunPermission);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMenuFunPermission__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }


    /**
     * 保存或者更新商户信息接口(对外)
     *
     * @param merchantSaveRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.saveMerchant", needInSession = NeedInSessionType.NO)
    @ApiOperation("保存或者更新商户信息接口(对外)")
    public RopResponse<String> saveMerchant(MerchantSaveOpenRequest merchantSaveRequest) {
        try {
            String merchant = openService.saveMerchant(merchantSaveRequest);
            return RopResponse.success(merchant);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__saveMerchant__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 企微关联商户
     *
     * @param relaevanceMerRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.relevanceMerchant", needInSession = NeedInSessionType.NO)
    @ApiOperation("企微关联商户")
    public RopResponse<Boolean> relevanceMerchant(RelaevanceMerRequest relaevanceMerRequest) {
        try {
            Boolean merchant = openService.relevanceMerchant(relaevanceMerRequest);
            return RopResponse.success(merchant);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__relevanceMerchant__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 保存或者更新员工接口(对外)
     *
     * @param staffSaveOpenRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.saveStaff", needInSession = NeedInSessionType.NO)
    @ApiOperation("保存或者更新员工接口(对外)")
    public RopResponse<String> saveStaff(StaffSaveOpenRequest staffSaveOpenRequest) {
        try {
            String id = openService.saveStaff(staffSaveOpenRequest);
            return RopResponse.success(id);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__saveStaff__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 同步企微员工
     *
     * @param staffSaveOpenRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.syncEntmicroStaff", needInSession = NeedInSessionType.NO)
    @ApiOperation("同步企微员工")
    public RopResponse<List<StaffResponse>> syncEntmicroStaff(SyncStaffOpenRequest staffSaveOpenRequest) {
        try {
            List<StaffResponse> merchantRopResponses = openService.syncEntmicroStaff(staffSaveOpenRequest);
            return RopResponse.success(merchantRopResponses);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__syncEntmicroStaff__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 查询最近的n家门店
     *
     * @param openProximityMerchantRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.proximityMerchantList", needInSession = NeedInSessionType.NO)
    @ApiOperation("查询最近的n家门店")
    public RopResponse<List<MerchantRopResponse>> proximityMerchantList(OpenProximityMerchantRequest openProximityMerchantRequest) {
        try {
            List<MerchantRopResponse> proximityMerchantList = openService.proximityMerchantList(openProximityMerchantRequest);
            return RopResponse.success(proximityMerchantList);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__proximityMerchantList__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 根据账户类型,层级查询商户列表
     *
     * @param merchantListOpenRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.findMerchantListByPage", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据账户类型,层级查询商户列表")
    public RopResponse<Pagination<MerchantRopResponse>> findMerchantListByPage(MerchantListOpenRequest merchantListOpenRequest) {
        try {
            Pagination<MerchantRopResponse> subordinateListByPage = openService.findMerchantListByPage(merchantListOpenRequest);
            return RopResponse.success(subordinateListByPage);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMerchantListByPage__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 根据登录号查询员工详情
     *
     * @param staffSearchOpenRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.findStaffByAccount", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据登录号查询员工详情")
    public RopResponse<StaffResponse> findStaffByAccount(StaffSearchOpenRequest staffSearchOpenRequest) {
        try {
            StaffResponse staffResponse = openService.findStaffByAccount(staffSearchOpenRequest);
            return RopResponse.success(staffResponse);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke_findStaffByAccount__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    /**
     * 商户树查询
     *
     * @param merchantTreeOpenRequest 入参
     * @return
     */
    @ServiceMethod(method = "merchants.api.open.findMerchantTreeByMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("商户树查询")
    public RopResponse<List<MerchantTreeOpenResponse>> findMerchantTreeByMerchantNo(MerchantTreeOpenRequest merchantTreeOpenRequest) {
        try {
            List<MerchantTreeOpenResponse> merchantTreeByMerchantNo = openService.findMerchantTreeByMerchantNo(merchantTreeOpenRequest);
            return RopResponse.success(merchantTreeByMerchantNo);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMerchantTreeByMerchantNo__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.checkPhone", needInSession = NeedInSessionType.NO)
    @ApiOperation("手机号校验")
    public RopResponse<List<OpenUserResponse>> checkPhone(OpenCheckPhoneRequest openCheckPhoneRequest) {
        try {
            List<OpenUserResponse> openUserResponse = openService.checkPhone(openCheckPhoneRequest);
            return RopResponse.success(openUserResponse);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__checkPhone__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findBySapCode", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据sapCode查询商户")
    public RopResponse<MerchantRopResponse> findBySapCode(OpenSapSearchRequest openSapSearchRequest) {
        try {
            MerchantRopResponse openUserResponse = openService.findBySapCode(openSapSearchRequest);
            return RopResponse.success(openUserResponse);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findBySapCode__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.userLogin", needInSession = NeedInSessionType.NO)
    @ApiOperation("用户登录")
    public RopResponse<Boolean> userLogin(UserLoginRequest userLoginRequest) {
        try {
            openService.userLogin(userLoginRequest);
            return RopResponse.success(true);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.updateMd5Password", needInSession = NeedInSessionType.NO)
    @ApiOperation("md5")
    public RopResponse<Boolean> updateMd5Password(AbstractRopRequest abstractRopRequest) {
        try {
            openService.updateMd5Password();
            return RopResponse.success(true);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findUserById", needInSession = NeedInSessionType.NO)
    @ApiOperation("查询账户")
    public RopResponse<List<OpenUserResponse>> findUserById(UserRequest userRequest) {
        try {
            return RopResponse.success(openService.findUserById(userRequest));
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.checkUniquenessAccount", needInSession = NeedInSessionType.NO)
    @ApiOperation("用户登录名校验")
    public RopResponse<OpenUserResponse> checkUniquenessAccount(OpenLoginAccountRequest openLoginAccountRequest) {
        try {
            return RopResponse.success(openService.checkUniquenessAccount(openLoginAccountRequest));
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.checkUniquenessPhone", needInSession = NeedInSessionType.NO)
    @ApiOperation("用户登录手机号校验")
    public RopResponse<OpenUserResponse> checkUniquenessPhone(OpenLoginAccountRequest openLoginAccountRequest) {
        try {
            return RopResponse.success(openService.checkUniquenessPhone(openLoginAccountRequest));
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.updatePassword", needInSession = NeedInSessionType.NO)
    @ApiOperation("密码修改")
    public RopResponse<Boolean> updatePassword(UpdatePasswordOpenRequest updatePasswordOpenRequest) {
        try {
            return RopResponse.success(openService.updatePassword(updatePasswordOpenRequest));
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.getAccountInfoByUuid", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据uuid获取账户信息")
    public RopResponse<OpenUserResponse> getAccountInfoByUuid(AccountInfoOpenRequest accountInfoOpenRequest) {
        try {
            OpenUserResponse openUserResponse = openService.getAccountInfoByUuid(accountInfoOpenRequest.getUuid());
            return RopResponse.success(openUserResponse);
        } catch (RpcServiceException e) {
            log.info("根据uuid获取账户信息异常:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findStaffListByMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户号查询员工列表")
    public RopResponse<List<StaffResponse>> findStaffListByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
        try {
            List<StaffResponse> list = openService.findStaffListByMerchantNo(staffListOpenRequest);
            return RopResponse.success(list);
        } catch (RpcServiceException e) {
            log.info("根据商户号查询员工列表异常:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findLoginInfoByMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户号获取登录信息")
    public RopResponse<OpenUserResponse> findLoginInfoByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
        try {
            OpenUserResponse openUserResponse = openService.findLoginInfoByMerchantNo(staffListOpenRequest);
            return RopResponse.success(openUserResponse);
        } catch (RpcServiceException e) {
            log.info("根据商户号查询员工列表异常:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.confirmPermissions")
    @ApiOperation("根据uuid,menuId查询是否存在该权限")
    public RopResponse<Boolean> confirmPermissionsByUuidAndMenuId(ConfirmPermissionsRequest confirmPermissionsRequest) {
        log.info("根据uuid,menuId查询是否存在该权限入参:{}", confirmPermissionsRequest);
        try {
            Boolean bl = openService.confirmPermissionsByUuidAndMenuId(confirmPermissionsRequest);
            return RopResponse.success(bl);
        } catch (RpcServiceException e) {
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }


    @ServiceMethod(method = "merchants.api.open.updateMerchantByMerchantNo")
    @ApiOperation("根据商户号修改商户信息(企微名称)")
    public RopResponse<Boolean> updateMerchantByMerchantNo(@Validated UpdateMerchantByMerchantNoRequest updateMerchantByMerchantNoReq) {
        try {
            Boolean bl = openService.updateMerchantByMerchantNo(updateMerchantByMerchantNoReq);
            return RopResponse.success(bl);
        } catch (RpcServiceException e) {
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findSubMerchantbySupMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户号查询商户下一级列表")
    public RopResponse<List<MerchantSubListResponse>> findSubMerchantbySupMerchantNo(OpenMerchantDetailRequest openMerchantDetailRequest) {
        try {
            List<MerchantSubListResponse> responses = openService.findSubMerchantbySupMerchantNo(openMerchantDetailRequest);
            return RopResponse.success(responses);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findSubMerchantbySupMerchantNo__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findJoinEntMicroStaffByMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户号查询已加入企微员工")
    public RopResponse<List<MerchantStaffResponse>> findJoinEntMicroStaffByMerchantNo(OpenFindEntMicroStaffByMerchantNoRequest request) {
        try {
            List<MerchantStaffResponse> responses = openService.findJoinEntMicroStaffByMerchantNo(request);
            return RopResponse.success(responses);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findJoinEntMicroStaffByMerchantNo__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findMerchantNoList", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据条件查询商户号集合")
    public RopResponse<List<Integer>> findMerchantNoList(MerchantNosRopRequest request) {
        try {
            List<Integer> responses = openService.findMerchantNoList(request);
            return RopResponse.success(responses);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMerchantNoList__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findMerchantNoListByMerAccTypeId", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据商户层级查询商户号集合")
    public RopResponse<List<MerchantListByConditionRopResponse>> findMerchantNoListByMerAccTypeId(MerchantListByConditionRopRequest request) {
        try {
            List<MerchantListByConditionRopResponse> responses = openService.findMerchantNoListByMerAccTypeId(request);
            return RopResponse.success(responses);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMerchantNoListByMerAccTypeId__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

    @ServiceMethod(method = "merchants.api.open.findMerchantBySupMerchantNo", needInSession = NeedInSessionType.NO)
    @ApiOperation("根据上级查询商户号集合")
    public RopResponse<List<MerchantNoNameRopResponse>> findMerchantBySupMerchantNo(FindBySupMerchantNoRopRequest ropRequest) {
        try {
            List<MerchantNoNameRopResponse> responses = openService.findMerchantBySupMerchantNo(ropRequest);
            return RopResponse.success(responses);
        } catch (RpcServiceException e) {
            log.info("=======OpenController__invoke__findMerchantBySupMerchantNo__exception:{}", e.getMessage());
            return RopResponse.error(e.getErrId(), e.getMessage());
        }
    }

}