Compare commits
No commits in common. "0a2d105eb1651abade6d793d2154469d9f036eb6" and "491e3d9e6e28d92106d15d9c8d36cadf27059b8c" have entirely different histories.
0a2d105eb1
...
491e3d9e6e
@ -1,47 +0,0 @@
|
||||
package cn.iocoder.yudao.module.app.customer.admin;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.conf.entity.BaseType;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
import cn.iocoder.yudao.module.custom.service.CustomerMainService;
|
||||
import cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
/**
|
||||
* 客户管理API
|
||||
* @author PQZ
|
||||
* @date 18:17 2024/9/24
|
||||
**/
|
||||
@RestController
|
||||
@RequestMapping("/userClient/customer")
|
||||
public class CustomerMainApi {
|
||||
|
||||
@Resource
|
||||
private CustomerMainService customerMainService;
|
||||
|
||||
/**
|
||||
* 查询当前登录客户信息
|
||||
* @author PQZ
|
||||
* @date 17:24 2024/9/24
|
||||
* @return cn.iocoder.yudao.framework.common.pojo.CommonResult<cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO>
|
||||
**/
|
||||
@GetMapping("/getUserCustomer")
|
||||
@Operation(summary = "获取当前登录用户的客户信息")
|
||||
public CommonResult<CustomerMainRespVO> getUserCustomer() {
|
||||
return success(customerMainService.getUserCustomer());
|
||||
}
|
||||
|
||||
}
|
||||
@ -50,16 +50,6 @@ public interface CustomerMainService extends IService<CustomerMain> {
|
||||
**/
|
||||
CustomerMainRespVO getCustomerById(String id);
|
||||
|
||||
/**
|
||||
* 获取当前登录用户的客户信息
|
||||
* @author PQZ
|
||||
* @date 17:27 2024/9/24
|
||||
* @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO
|
||||
**/
|
||||
CustomerMainRespVO getUserCustomer();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 根据经办人所属企业查询经办人信息
|
||||
*
|
||||
|
||||
@ -6,8 +6,6 @@ import cn.iocoder.yudao.framework.common.exception.ServiceException;
|
||||
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.security.core.LoginUser;
|
||||
import cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerCar;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerItem;
|
||||
import cn.iocoder.yudao.module.custom.entity.CustomerMain;
|
||||
@ -192,22 +190,6 @@ public class CustomerMainServiceImpl extends ServiceImpl<CustomerMainMapper, Cus
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录用户的客户信息
|
||||
*
|
||||
* @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO
|
||||
* @author PQZ
|
||||
* @date 17:27 2024/9/24
|
||||
**/
|
||||
@Override
|
||||
public CustomerMainRespVO getUserCustomer() {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
LambdaQueryWrapper<CustomerMain> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(CustomerMain::getUserId,loginUser.getId()).eq(BaseDO::getDeleted,'0');
|
||||
CustomerMain customerMain = getOne(lambdaQueryWrapper);
|
||||
return getCustomerById(customerMain.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据经办人所属企业查询经办人信息
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user