Commit f5264226 authored by lius's avatar lius

修改了所有的customer service 为 customer support

parent 7d89e4d0
......@@ -45,8 +45,8 @@ public class AuthFilter implements Filter {
"/app/ownerBackend/account/stop",
"/app/driverBackend/password/reset",
"/app/esvActuator/health/diskSpace",
"/app/driverBackend/carrier/customerservice",
"/app/goodsowner/customerservice"
"/app/driverBackend/carrier/customersupport",
"/app/goodsowner/customersupport"
};
@Autowired
......
......@@ -14,19 +14,19 @@ import org.springframework.web.bind.annotation.PostMapping;
* @version: 1.0
*/
@FeignClient(value = "freight-customer-service")
public interface CustomerServiceInterface {
public interface CustomerSupportInterface {
/**
* 获取货主客服电话
* author 刘胜
* createTime 2020/8/12 14:15
**/
@PostMapping(value = "/customer/goodsowner/customerservice")
@PostMapping(value = "/customer/goodsowner/customersupport")
JSONObject ownerCustomer();
/**
* 获取司机客服电话
* author 刘胜
* createTime 2020/8/12 14:17
**/
@PostMapping(value = "/customer/carrier/customerservice")
@PostMapping(value = "/customer/carrier/customersupport")
JSONObject driverCustomer();
}
package com.esv.freight.app.module.customerservice.controller;
package com.esv.freight.app.module.customersupport.controller;
import com.alibaba.fastjson.JSONObject;
import com.esv.freight.app.common.component.TokenComponent;
import com.esv.freight.app.common.response.EResponse;
import com.esv.freight.app.feign.CustomerServiceInterface;
import com.esv.freight.app.module.customerservice.vo.CustomerServiceVO;
import com.esv.freight.app.feign.CustomerSupportInterface;
import com.esv.freight.app.module.customersupport.vo.CustomerSupportVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -25,15 +24,13 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/driverBackend/carrier")
@Slf4j
@Validated
public class DriverCustomerServiceController {
public class DriverCustomerSupportController {
private CustomerServiceInterface customerServiceInterface;
private TokenComponent tokenComponent;
private CustomerSupportInterface customerSupportInterface;
@Autowired
public DriverCustomerServiceController(CustomerServiceInterface customerServiceInterface, TokenComponent tokenComponent) {
this.customerServiceInterface = customerServiceInterface;
this.tokenComponent = tokenComponent;
public DriverCustomerSupportController(CustomerSupportInterface customerSupportInterface) {
this.customerSupportInterface = customerSupportInterface;;
}
/**
......@@ -43,15 +40,15 @@ public class DriverCustomerServiceController {
* author 刘胜
* createTime 2020/8/12 14:50
**/
@PostMapping("/customerservice")
@PostMapping("/customersupport")
public EResponse driverCustomer(){
JSONObject result =customerServiceInterface.driverCustomer();
JSONObject result = customerSupportInterface.driverCustomer();
if(result.getInteger("code") != 200) {
return EResponse.error(result.getInteger("code"), result.getString("message"));
}
CustomerServiceVO customerServiceVO = new CustomerServiceVO();
CustomerSupportVO customerSupportVO = new CustomerSupportVO();
JSONObject data = result.getJSONObject("data");
customerServiceVO.setPhone(data.getString("phone"));
return EResponse.ok(customerServiceVO);
customerSupportVO.setPhone(data.getString("phone"));
return EResponse.ok(customerSupportVO);
}
}
package com.esv.freight.app.module.customerservice.controller;
package com.esv.freight.app.module.customersupport.controller;
import com.alibaba.fastjson.JSONObject;
import com.esv.freight.app.common.component.TokenComponent;
import com.esv.freight.app.common.response.EResponse;
import com.esv.freight.app.feign.CustomerServiceInterface;
import com.esv.freight.app.module.customerservice.vo.CustomerServiceVO;
import com.esv.freight.app.feign.CustomerSupportInterface;
import com.esv.freight.app.module.customersupport.vo.CustomerSupportVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -25,13 +24,13 @@ import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/goodsowner")
@Slf4j
@Validated
public class OwnerCustomerServiceController {
public class OwnerCustomerSupportController {
private CustomerServiceInterface customerServiceInterface;
private CustomerSupportInterface customerSupportInterface;
@Autowired
public OwnerCustomerServiceController(CustomerServiceInterface customerServiceInterface) {
this.customerServiceInterface = customerServiceInterface;
public OwnerCustomerSupportController(CustomerSupportInterface customerSupportInterface) {
this.customerSupportInterface = customerSupportInterface;
}
/**
......@@ -41,17 +40,17 @@ public class OwnerCustomerServiceController {
* author 刘胜
* createTime 2020/8/12 14:35
**/
@PostMapping("/customerservice")
@PostMapping("/customersupport")
public EResponse ownerCustomer(){
JSONObject result =customerServiceInterface.ownerCustomer();
JSONObject result = customerSupportInterface.ownerCustomer();
if(result.getInteger("code") != 200) {
return EResponse.error(result.getInteger("code"), result.getString("message"));
}
CustomerServiceVO customerServiceVO = new CustomerServiceVO();
CustomerSupportVO customerSupportVO = new CustomerSupportVO();
JSONObject data = result.getJSONObject("data");
customerServiceVO.setPhone(data.getString("phone"));
return EResponse.ok(customerServiceVO);
customerSupportVO.setPhone(data.getString("phone"));
return EResponse.ok(customerSupportVO);
}
}
package com.esv.freight.app.module.customerservice.vo;
package com.esv.freight.app.module.customersupport.vo;
import lombok.Data;
......@@ -12,7 +12,7 @@ import lombok.Data;
* @version: 1.0
*/
@Data
public class CustomerServiceVO {
public class CustomerSupportVO {
/**
* 客服电话
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment