Commit 74d9cf47 authored by lius's avatar lius

修改了所有的customer service为 customer support

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