23 changed files with 511 additions and 248 deletions
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/22 9:59 |
|||
*/ |
|||
@Data |
|||
public class LatestCustomerResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
/** |
|||
* 客户名称 |
|||
*/ |
|||
private String customerName; |
|||
/** |
|||
* 客户顶级名称 |
|||
*/ |
|||
private String agencyId; |
|||
/** |
|||
* 工作人员头像 |
|||
*/ |
|||
private String staffHeadPhoto; |
|||
} |
@ -0,0 +1,25 @@ |
|||
package com.epmet.feign; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.CustomerDTO; |
|||
import com.epmet.feign.fallback.OperCrmFeignClientFallBack; |
|||
import org.springframework.cloud.openfeign.FeignClient; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/22 10:41 |
|||
*/ |
|||
@FeignClient(name = ServiceConstant.OPER_CRM_SERVER, fallback = OperCrmFeignClientFallBack.class) |
|||
public interface OperCrmFeignClient { |
|||
/** |
|||
* 获取客户信息 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@PostMapping("/oper/crm/customer/getcostomerInfo") |
|||
Result<CustomerDTO> getCustomerInfo(@RequestBody CustomerDTO dto); |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.feign.fallback; |
|||
|
|||
import com.epmet.commons.tools.constant.ServiceConstant; |
|||
import com.epmet.commons.tools.utils.ModuleUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.CustomerDTO; |
|||
import com.epmet.feign.OperCrmFeignClient; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/4/22 10:43 |
|||
*/ |
|||
@Component |
|||
public class OperCrmFeignClientFallBack implements OperCrmFeignClient { |
|||
@Override |
|||
public Result<CustomerDTO> getCustomerInfo(CustomerDTO dto) { |
|||
return ModuleUtils.feignConError(ServiceConstant.OPER_CRM_SERVER, "getCustomerInfo", dto); |
|||
} |
|||
} |
Loading…
Reference in new issue