Commit 9fb7eda9 by xiongzs

Merged from rop-merchant

[+]手机号查询商户号 [from revision 6,498]
[+]手机号查询商户号 [from revision 6,499]
[+]更改商户接口session必填 [from revision 6,500]
[+]更改商户接口session去除非必填 [from revision 6,501]
[+]查询商户集合接口增加商户层级参数 [from revision 6,502]
[+]查询商户分页接口增加商户层级参数 [from revision 6,503]
[+]查询商户分页接口 [from revision 6,508]
[+]密码查询 [from revision 6,509]
1 parent 656e54e8
...@@ -35,7 +35,7 @@ import com.rop.session.SimpleSession; ...@@ -35,7 +35,7 @@ import com.rop.session.SimpleSession;
* @description: 用户登录接口 * @description: 用户登录接口
* @date 2021/7/13 10:00 * @date 2021/7/13 10:00
*/ */
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO) @ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("用户登录") @Api("用户登录")
@Slf4j @Slf4j
public class LoginController { public class LoginController {
......
...@@ -10,6 +10,7 @@ import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest; ...@@ -10,6 +10,7 @@ import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest; import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest; import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.open.*; import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.staff.MerchantNoListByStaffPhone;
import cn.com.glsx.merchants.response.*; import cn.com.glsx.merchants.response.*;
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;
...@@ -494,4 +495,17 @@ public class OpenController { ...@@ -494,4 +495,17 @@ public class OpenController {
} }
} }
@ServiceMethod(method = "merchants.api.open.merchantNoListByStaffPhone", needInSession = NeedInSessionType.NO)
@ApiOperation("根据手机查询商户号")
public RopResponse<List<Integer>> merchantNoListByStaffPhone(MerchantNoListByStaffPhone ropRequest) {
try {
List<Integer> responses = openService.merchantNoListByStaffPhone(ropRequest.getStaffPhone());
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantBySupMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
} }
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.staff;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MerchantNoListByStaffPhone extends AbstractRopRequest {
@ApiModelProperty(value = "员工手机号", required = true)
private String staffPhone;
}
...@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -21,6 +21,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashSet;
import java.util.List; import java.util.List;
/** /**
......
...@@ -384,4 +384,11 @@ public class OpenService { ...@@ -384,4 +384,11 @@ public class OpenService {
return ConvertResponse.convertList(rpcResponse.getResult(),MerchantNoNameRopResponse.class); return ConvertResponse.convertList(rpcResponse.getResult(),MerchantNoNameRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage()); throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
} }
public List<Integer> merchantNoListByStaffPhone(String staffPhone) {
RpcResponse<List<Integer>> rpcResponse = merchantStaffRemote.merchantNoListByStaffPhone(staffPhone);
if (rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
} }
...@@ -60,4 +60,18 @@ public class StaffControllerTest extends BaseControllerTest { ...@@ -60,4 +60,18 @@ public class StaffControllerTest extends BaseControllerTest {
params.add("roleIds[0]", "342"); params.add("roleIds[0]", "342");
System.out.println(post(params)); System.out.println(post(params));
} }
@Test
public void testMerchantListPage() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(10);
params.add("v", "1.0.0");
params.add("method", "merchants.api.open.findMerchantListByPage");
params.add("merchantAccountLevel[0]", "2");
params.add("merchantAccountLevel[1]", "3");
params.add("accounttypeId[0]","6");
params.add("channelType","1");
params.add("pageSize","10");
params.add("pageNum","1");
System.out.println(post(params));
}
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!