Commit b68056cd by xiongzs

Merge all from rop-merchant

1 parent 5124116c
......@@ -4,6 +4,7 @@ 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.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.*;
......@@ -454,4 +455,16 @@ public class OpenController {
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());
}
}
}
\ No newline at end of file
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author Hayreal
* @date 2022/9/21 18:15
* @Version 1.0
*/
@Data
public class MerchantNosRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "商户等级,1.工厂 2.省代 3.市代 4.门店")
private Integer merchantAccountLevel;
@ApiModelProperty(notes = "商户模式,1.集团版 2.门店版")
private Integer merchantModel;
@ApiModelProperty(notes = "渠道,1.嘀加 2.广汇")
private Integer channelId;
}
......@@ -12,6 +12,7 @@ import cn.com.glsx.merchants.remote.MerchantRemote;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import cn.com.glsx.merchants.remote.MerchantUserRemote;
import cn.com.glsx.merchants.request.file.FileSaveRequest;
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.*;
......@@ -354,4 +355,12 @@ public class OpenService {
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<Integer> findMerchantNoList(MerchantNosRopRequest request) {
MerchantNoByConditionRpcRequest remoteRequest = ConvertRequest.convertRequest(request,new MerchantNoByConditionRpcRequest());
RpcResponse<List<Integer>> rpcResponse = merchantRemote.findMerchantNoListByCondition(remoteRequest);
if (rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!