Commit 74d9cf47 authored by lius's avatar lius

修改了所有的customer service为 customer support

修改了固定的租户id2,改为动态获取的方式。
parent fd31b549
package com.esv.freight.customer.module.carrier.controller;
import com.esv.freight.customer.common.response.EResponse;
import com.esv.freight.customer.module.carrier.service.CarrierCustomerServiceService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
import com.esv.freight.customer.module.carrier.service.CarrierCustomerSupportService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerSupportVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -23,11 +23,11 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/carrier")
@Validated
public class CarrierCustomerServiceController {
private CarrierCustomerServiceService serviceService;
public class CarrierCustomerSupportController {
private CarrierCustomerSupportService serviceService;
@Autowired
public CarrierCustomerServiceController(CarrierCustomerServiceService serviceService) {
public CarrierCustomerSupportController(CarrierCustomerSupportService serviceService) {
this.serviceService = serviceService;
}
......@@ -38,9 +38,9 @@ public class CarrierCustomerServiceController {
* author 刘胜
* createTime 2020/8/12 17:47
**/
@PostMapping("/customerservice")
@PostMapping("/customersupport")
public EResponse getDriverCustomer(){
CustomerServiceVO customerServiceVO =serviceService.getDriverCustomer();
return EResponse.ok(customerServiceVO);
CustomerSupportVO customerSupportVO =serviceService.getDriverCustomer();
return EResponse.ok(customerSupportVO);
}
}
package com.esv.freight.customer.module.carrier.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.esv.freight.customer.module.carrier.entity.CarrierCustomerServiceEntity;
import com.esv.freight.customer.module.carrier.entity.CarrierCustomerSupportEntity;
import org.apache.ibatis.annotations.Mapper;
/**
......@@ -14,6 +14,6 @@ import org.apache.ibatis.annotations.Mapper;
* @version: 1.0
*/
@Mapper
public interface CarrierCustomerServiceDao extends BaseMapper<CarrierCustomerServiceEntity> {
public interface CarrierCustomerSupportDao extends BaseMapper<CarrierCustomerSupportEntity> {
}
......@@ -19,8 +19,8 @@ import java.util.Date;
* @version: 1.0
*/
@Data
@TableName("driver_customer_service")
public class CarrierCustomerServiceEntity implements Serializable {
@TableName("driver_customer_support")
public class CarrierCustomerSupportEntity implements Serializable {
private static final long serialVersionUID = -5630139812015991171L;
......
package com.esv.freight.customer.module.carrier.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.esv.freight.customer.module.carrier.entity.CarrierCustomerServiceEntity;
import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
import com.esv.freight.customer.module.carrier.entity.CarrierCustomerSupportEntity;
import com.esv.freight.customer.module.goodsowner.vo.CustomerSupportVO;
/**
* @description:
......@@ -13,7 +13,7 @@ import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
* @createTime: 2020/8/12 15:16
* @version: 1.0
*/
public interface CarrierCustomerServiceService extends IService<CarrierCustomerServiceEntity> {
public interface CarrierCustomerSupportService extends IService<CarrierCustomerSupportEntity> {
/**
* description 获取司机客服电话
* param []
......@@ -21,5 +21,5 @@ public interface CarrierCustomerServiceService extends IService<CarrierCustomerS
* author 刘胜
* createTime 2020/8/12 15:19
**/
CustomerServiceVO getDriverCustomer();
CustomerSupportVO getDriverCustomer();
}
package com.esv.freight.customer.module.carrier.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.esv.freight.customer.module.carrier.dao.CarrierCustomerServiceDao;
import com.esv.freight.customer.module.carrier.entity.CarrierCustomerServiceEntity;
import com.esv.freight.customer.module.carrier.service.CarrierCustomerServiceService;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerServiceEntity;
import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
import com.esv.freight.customer.common.util.ReqUtils;
import com.esv.freight.customer.module.carrier.dao.CarrierCustomerSupportDao;
import com.esv.freight.customer.module.carrier.entity.CarrierCustomerSupportEntity;
import com.esv.freight.customer.module.carrier.service.CarrierCustomerSupportService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerSupportVO;
import jdk.nashorn.internal.parser.Token;
import org.springframework.stereotype.Service;
......@@ -18,16 +19,18 @@ import org.springframework.stereotype.Service;
* @createTime: 2020/8/12 15:23
* @version: 1.0
*/
@Service("carrierCustomerServiceService")
public class CarrierCustomerServiceServiceImpl extends ServiceImpl<CarrierCustomerServiceDao, CarrierCustomerServiceEntity> implements CarrierCustomerServiceService {
@Service("carrierCustomerSupportService")
public class CarrierCustomerSupportServiceImpl extends ServiceImpl<CarrierCustomerSupportDao, CarrierCustomerSupportEntity> implements CarrierCustomerSupportService {
@Override
public CustomerServiceVO getDriverCustomer() {
CarrierCustomerServiceEntity carrierCustomerServiceEntity=lambdaQuery()
.eq(CarrierCustomerServiceEntity::getTenantId, 2)
public CustomerSupportVO getDriverCustomer() {
String tenantId = ReqUtils.getRequestHeader("esv_tenant");
CarrierCustomerSupportEntity carrierCustomerSupportEntity =lambdaQuery()
.eq(CarrierCustomerSupportEntity::getTenantId, tenantId)
.one();
CustomerServiceVO customerServiceVO = new CustomerServiceVO();
customerServiceVO.setPhone(carrierCustomerServiceEntity.getPhone());
return customerServiceVO;
CustomerSupportVO customerSupportVO = new CustomerSupportVO();
customerSupportVO.setPhone(carrierCustomerSupportEntity.getPhone());
return customerSupportVO;
}
}
package com.esv.freight.customer.module.goodsowner.controller;
import com.esv.freight.customer.common.response.EResponse;
import com.esv.freight.customer.module.goodsowner.service.CustomerServiceService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
import com.esv.freight.customer.module.goodsowner.service.CustomerSupportService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerSupportVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
......@@ -23,11 +23,11 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("/goodsowner")
@Validated
public class GoodsOwnerCustomerServiceController {
private CustomerServiceService serviceService;
public class GoodsOwnerCustomerSupportController {
private CustomerSupportService serviceService;
@Autowired
public GoodsOwnerCustomerServiceController(CustomerServiceService serviceService) {
public GoodsOwnerCustomerSupportController(CustomerSupportService serviceService) {
this.serviceService = serviceService;
}
......@@ -38,9 +38,9 @@ public class GoodsOwnerCustomerServiceController {
* author 刘胜
* createTime 2020/8/12 17:47
**/
@PostMapping("/customerservice")
@PostMapping("/customersupport")
public EResponse getGoodsCustomer(){
CustomerServiceVO customerServiceVO =serviceService.getGoodsCustomer();
return EResponse.ok(customerServiceVO);
CustomerSupportVO customerSupportVO =serviceService.getGoodsCustomer();
return EResponse.ok(customerSupportVO);
}
}
package com.esv.freight.customer.module.goodsowner.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerServiceEntity;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerSupportEntity;
import org.apache.ibatis.annotations.Mapper;
/**
......@@ -14,6 +14,6 @@ import org.apache.ibatis.annotations.Mapper;
* @version: 1.0
*/
@Mapper
public interface CustomerServiceDao extends BaseMapper<GoodsOwnerCustomerServiceEntity> {
public interface CustomerSupportDao extends BaseMapper<GoodsOwnerCustomerSupportEntity> {
}
......@@ -19,8 +19,8 @@ import java.util.Date;
* @version: 1.0
*/
@Data
@TableName("goods_owner_customer_service")
public class GoodsOwnerCustomerServiceEntity implements Serializable {
@TableName("goods_owner_customer_support")
public class GoodsOwnerCustomerSupportEntity implements Serializable {
private static final long serialVersionUID = -823795391097137993L;
/**
......
package com.esv.freight.customer.module.goodsowner.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerServiceEntity;
import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerSupportEntity;
import com.esv.freight.customer.module.goodsowner.vo.CustomerSupportVO;
/**
* @description:
......@@ -13,7 +13,7 @@ import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
* @createTime: 2020/8/12 15:16
* @version: 1.0
*/
public interface CustomerServiceService extends IService<GoodsOwnerCustomerServiceEntity> {
public interface CustomerSupportService extends IService<GoodsOwnerCustomerSupportEntity> {
/**
* description 获取货主客服电话
* param []
......@@ -21,5 +21,5 @@ public interface CustomerServiceService extends IService<GoodsOwnerCustomerServi
* author 刘胜
* createTime 2020/8/12 15:19
**/
CustomerServiceVO getGoodsCustomer();
CustomerSupportVO getGoodsCustomer();
}
package com.esv.freight.customer.module.goodsowner.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.esv.freight.customer.module.goodsowner.dao.CustomerServiceDao;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerServiceEntity;
import com.esv.freight.customer.module.goodsowner.service.CustomerServiceService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerServiceVO;
import com.esv.freight.customer.common.util.ReqUtils;
import com.esv.freight.customer.module.goodsowner.dao.CustomerSupportDao;
import com.esv.freight.customer.module.goodsowner.entity.GoodsOwnerCustomerSupportEntity;
import com.esv.freight.customer.module.goodsowner.service.CustomerSupportService;
import com.esv.freight.customer.module.goodsowner.vo.CustomerSupportVO;
import org.springframework.stereotype.Service;
......@@ -17,16 +18,17 @@ import org.springframework.stereotype.Service;
* @createTime: 2020/8/12 15:23
* @version: 1.0
*/
@Service("goodsCustomerServiceService")
public class CustomerServiceServiceImpl extends ServiceImpl<CustomerServiceDao, GoodsOwnerCustomerServiceEntity> implements CustomerServiceService {
@Service("goodsCustomerSupportService")
public class CustomerSupportServiceImpl extends ServiceImpl<CustomerSupportDao, GoodsOwnerCustomerSupportEntity> implements CustomerSupportService {
@Override
public CustomerServiceVO getGoodsCustomer() {
GoodsOwnerCustomerServiceEntity customerServiceEntity=lambdaQuery()
.eq(GoodsOwnerCustomerServiceEntity::getTenantId, 2)
public CustomerSupportVO getGoodsCustomer() {
String tenantId = ReqUtils.getRequestHeader("esv_tenant");
GoodsOwnerCustomerSupportEntity customerServiceEntity=lambdaQuery()
.eq(GoodsOwnerCustomerSupportEntity::getTenantId, tenantId)
.one();
CustomerServiceVO customerServiceVO = new CustomerServiceVO();
customerServiceVO.setPhone(customerServiceEntity.getPhone());
return customerServiceVO;
CustomerSupportVO customerSupportVO = new CustomerSupportVO();
customerSupportVO.setPhone(customerServiceEntity.getPhone());
return customerSupportVO;
}
}
......@@ -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