Commit bc5e5db3 by zhouhb

[+]代码新增

1 parent a051138f
...@@ -7,10 +7,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest; ...@@ -7,10 +7,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantRequest; import cn.com.glsx.merchants.request.merchant.OpenMerchantRequest;
import cn.com.glsx.merchants.request.open.*; import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.user.OpenUserRequest; import cn.com.glsx.merchants.request.user.OpenUserRequest;
import cn.com.glsx.merchants.response.AccountTypeTreeRopResponse; import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.response.MerchantRopResponse;
import cn.com.glsx.merchants.response.OpenUserResponse;
import cn.com.glsx.merchants.response.StaffResponse;
import cn.com.glsx.merchants.service.OpenService; import cn.com.glsx.merchants.service.OpenService;
import cn.com.glsx.merchants.util.Pagination; import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType; import com.rop.annotation.NeedInSessionType;
...@@ -259,4 +256,22 @@ public class OpenController { ...@@ -259,4 +256,22 @@ public class OpenController {
return RopResponse.error(e.getErrId(), e.getMessage()); return RopResponse.error(e.getErrId(), e.getMessage());
} }
} }
/**
* 商户树查询
*
* @param merchantTreeOpenRequest 入参
* @return
*/
@ServiceMethod(method = "cn.com.glsx.merchants.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());
}
}
} }
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public class MerchantTreeOpenRequest extends DefaultRequest {
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
}
...@@ -26,9 +26,9 @@ public class OpenCheckUserRequest extends DefaultRequest { ...@@ -26,9 +26,9 @@ public class OpenCheckUserRequest extends DefaultRequest {
private String loginPassword; private String loginPassword;
/** /**
* 渠道编码 * 渠道类型
*/ */
@ApiModelProperty(notes = "渠道编码") @ApiModelProperty(notes = "渠道类型")
private String channelCode; private String channelType;
} }
package cn.com.glsx.merchants.response;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public class MerchantTreeOpenResponse implements Serializable {
private Integer id;
private String label;
private Integer merchantAccountLevel;
private String entmicroName;
private List<MerchantTreeOpenResponse> children;
}
...@@ -78,6 +78,9 @@ public class OpenUserResponse { ...@@ -78,6 +78,9 @@ public class OpenUserResponse {
@ApiModelProperty(name = "merchantNo", notes = "商户号") @ApiModelProperty(name = "merchantNo", notes = "商户号")
private Integer merchantNo; private Integer merchantNo;
@ApiModelProperty(name = "openId", notes = "openId")
private String openId;
@ApiModelProperty(notes = "手机号") @ApiModelProperty(notes = "手机号")
private String phone; private String phone;
} }
...@@ -6,10 +6,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException; ...@@ -6,10 +6,7 @@ import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest; import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse; import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.*; import cn.com.glsx.merchants.model.request.*;
import cn.com.glsx.merchants.model.response.AccountTypeTreeResponse; import cn.com.glsx.merchants.model.response.*;
import cn.com.glsx.merchants.model.response.MerchantResponse;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.model.response.MerchantUserResponse;
import cn.com.glsx.merchants.remote.MerchantRemote; import cn.com.glsx.merchants.remote.MerchantRemote;
import cn.com.glsx.merchants.remote.MerchantStaffRemote; import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import cn.com.glsx.merchants.remote.MerchantUserRemote; import cn.com.glsx.merchants.remote.MerchantUserRemote;
...@@ -20,10 +17,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantRequest; ...@@ -20,10 +17,7 @@ import cn.com.glsx.merchants.request.merchant.OpenMerchantRequest;
import cn.com.glsx.merchants.request.open.*; import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.open.MerchantListOpenRequest; import cn.com.glsx.merchants.request.open.MerchantListOpenRequest;
import cn.com.glsx.merchants.request.user.OpenUserRequest; import cn.com.glsx.merchants.request.user.OpenUserRequest;
import cn.com.glsx.merchants.response.AccountTypeTreeRopResponse; import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.response.MerchantRopResponse;
import cn.com.glsx.merchants.response.OpenUserResponse;
import cn.com.glsx.merchants.response.StaffResponse;
import cn.com.glsx.merchants.util.Pagination; import cn.com.glsx.merchants.util.Pagination;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
...@@ -174,4 +168,12 @@ public class OpenService { ...@@ -174,4 +168,12 @@ public class OpenService {
} }
throw new RpcServiceException(staffByAccount.getException().getErrId(), staffByAccount.getMessage()); throw new RpcServiceException(staffByAccount.getException().getErrId(), staffByAccount.getMessage());
} }
public List<MerchantTreeOpenResponse> findMerchantTreeByMerchantNo(MerchantTreeOpenRequest merchantTreeOpenRequest) {
RpcResponse<List<MerchantTreeResponse>> merchantTreeByMerchantNoRemote = merchantRemote.findMerchantTreeByMerchantNoRemote(merchantTreeOpenRequest.getMerchantId());
if (merchantTreeByMerchantNoRemote.isSuccess()) {
return ConvertResponse.convertList(merchantTreeByMerchantNoRemote.getResult(), MerchantTreeOpenResponse.class);
}
throw new RpcServiceException(merchantTreeByMerchantNoRemote.getException().getErrId(), merchantTreeByMerchantNoRemote.getMessage());
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!