wuxw
2019-09-20 8cea4e1842d0e1c8b9dad41f68e90ff297dd9183
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
package com.java110.store.smo.impl;
 
import com.java110.common.util.BeanConvertUtil;
import com.java110.core.base.smo.BaseServiceSMO;
import com.java110.core.smo.store.IStoreInnerServiceSMO;
import com.java110.dto.OwnerCarDto;
import com.java110.dto.PageDto;
import com.java110.dto.UserDto;
import com.java110.dto.store.StoreDto;
import com.java110.store.dao.IStoreServiceDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
 
import java.util.List;
 
/**
 * @ClassName StoreInnerServiceSMOImpl 商户内部实现类
 * @Description TODO
 * @Author wuxw
 * @Date 2019/9/20 15:17
 * @Version 1.0
 * add by wuxw 2019/9/20
 **/
@Service("StoreInnerServiceSMOImpl")
public class StoreInnerServiceSMOImpl  extends BaseServiceSMO implements IStoreInnerServiceSMO {
 
    @Autowired
    private IStoreServiceDao storeServiceDaoImpl;
 
    @Override
    public List<StoreDto> getStores(StoreDto storeDto) {
        //校验是否传了 分页信息
 
        int page = storeDto.getPage();
 
        if (page != PageDto.DEFAULT_PAGE) {
            storeDto.setPage((page - 1) * storeDto.getRow());
            storeDto.setRow(page * storeDto.getRow());
        }
 
        List<StoreDto> storeDtos = BeanConvertUtil.covertBeanList(storeServiceDaoImpl.getStores(BeanConvertUtil.beanCovertMap(storeDto)), StoreDto.class);
 
        if (storeDtos == null || storeDtos.size() == 0) {
            return storeDtos;
        }
 
      /*  String[] userIds = getUserIds(ownerCars);
        //根据 userId 查询用户信息
        List<UserDto> users = userInnerServiceSMOImpl.getUserInfo(userIds);
 
        for (OwnerCarDto ownerCar : ownerCars) {
            refreshOwnerCar(ownerCar, users);
        }*/
        return storeDtos;
    }
 
 
    public IStoreServiceDao getStoreServiceDaoImpl() {
        return storeServiceDaoImpl;
    }
 
    public void setStoreServiceDaoImpl(IStoreServiceDao storeServiceDaoImpl) {
        this.storeServiceDaoImpl = storeServiceDaoImpl;
    }
}