CustomerServiceImpl.java
1.01 KB
package com.huaheng.pc.config.customer.service;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.IService;
import com.huaheng.common.utils.security.ShiroUtils;
import com.huaheng.pc.config.customer.domain.Customer;
import com.huaheng.pc.config.customer.mapper.CustomerMapper;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
import java.util.Map;
@Service("CustomerService")
public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer> implements IService<Customer> {
public List<Map<String, Object>> getCode(){
LambdaQueryWrapper<Customer> lambda = Wrappers.lambdaQuery();
lambda.select(Customer::getCode, Customer::getId, Customer::getName)
.eq(Customer::getWarehouseCode, ShiroUtils.getWarehouseCode());
return this.listMaps(lambda);
}
}