UserErpService.java 1.34 KB
package com.huaheng.pc.system.user.service;

import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.temporal.ChronoUnit;
import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import com.huaheng.pc.system.user.domain.UserErp;
import com.huaheng.pc.system.user.mapper.UserErpMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.huaheng.common.utils.StringUtils;
import com.huaheng.framework.aspectj.lang.annotation.Ds;
import com.huaheng.framework.aspectj.lang.constant.DataSourceName;
import com.huaheng.pc.config.address.domain.Address;


@Service
public class UserErpService extends ServiceImpl<UserErpMapper, UserErp>{


    /**
     * 查找erp数据库的供应商数据
     * @return
     */
    @Ds(name= DataSourceName.SLAVE)
   public List<UserErp> findUserErpData(){
        QueryWrapper<UserErp> queryWrapper = new QueryWrapper<>();
        queryWrapper.select("  usercode,username,sitecode,sitename");
        queryWrapper.orderByAsc("sitecode");
        List<UserErp> lists = this.list(queryWrapper);
        return lists;
   }



}