UserErpService.java
1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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;
}
}