1
935090232@qq.com
2021-01-29 bf48bb112bf8d5b1564eb5ac6e4809909f24887a
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
package com.matrix.system.app.mapper;
 
import com.matrix.system.app.vo.StoreInOutListVo;
import com.matrix.system.app.vo.StoreListVo;
import com.matrix.system.hive.bean.ShoppingGoods;
import com.matrix.system.hive.bean.SysStoreInfo;
import com.matrix.system.hive.pojo.StoreInOutRecordVO;
 
import javax.annotation.Generated;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
 
@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2021-01-26T20:08:11+0800",
    comments = "version: 1.3.0.Final, compiler: javac, environment: Java 1.8.0_181 (Oracle Corporation)"
)
public class SysStoreInfoMapperImpl extends SysStoreInfoMapper {
 
    @Override
    public StoreListVo entityToStoreVo(SysStoreInfo sysStoreInfo) {
        if ( sysStoreInfo == null ) {
            return null;
        }
 
        StoreListVo storeListVo = new StoreListVo();
 
        storeListVo.setImg( sysStoreInfoGoodsImg( sysStoreInfo ) );
        storeListVo.setGoodsCode( sysStoreInfoGoodsCode( sysStoreInfo ) );
        storeListVo.setGoodsName( sysStoreInfoGoodsName( sysStoreInfo ) );
        storeListVo.setAlarmNum( sysStoreInfoGoodsAlarmNum( sysStoreInfo ) );
        if ( sysStoreInfo.getStoreTotal() != null ) {
            storeListVo.setStoreTotal( sysStoreInfo.getStoreTotal().intValue() );
        }
 
        return storeListVo;
    }
 
    @Override
    public List<StoreListVo> entitiesToStoreVos(List<SysStoreInfo> list) {
        if ( list == null ) {
            return null;
        }
 
        List<StoreListVo> list1 = new ArrayList<StoreListVo>( list.size() );
        for ( SysStoreInfo sysStoreInfo : list ) {
            list1.add( entityToStoreVo( sysStoreInfo ) );
        }
 
        return list1;
    }
 
    @Override
    public StoreInOutListVo recordVoToInOutListVo(StoreInOutRecordVO recordVO) {
        if ( recordVO == null ) {
            return null;
        }
 
        StoreInOutListVo storeInOutListVo = new StoreInOutListVo();
 
        storeInOutListVo.setContent( recordVO.getOrderType() );
        storeInOutListVo.setOrderNo( recordVO.getOrderNo() );
        if ( recordVO.getAmount() != null ) {
            storeInOutListVo.setAmount( BigDecimal.valueOf( recordVO.getAmount() ) );
        }
        storeInOutListVo.setCreateTime( recordVO.getCreateTime() );
 
        return storeInOutListVo;
    }
 
    @Override
    public List<StoreInOutListVo> recordVosToInOutListVos(List<StoreInOutRecordVO> list) {
        if ( list == null ) {
            return null;
        }
 
        List<StoreInOutListVo> list1 = new ArrayList<StoreInOutListVo>( list.size() );
        for ( StoreInOutRecordVO storeInOutRecordVO : list ) {
            list1.add( recordVoToInOutListVo( storeInOutRecordVO ) );
        }
 
        return list1;
    }
 
    private String sysStoreInfoGoodsImg(SysStoreInfo sysStoreInfo) {
        if ( sysStoreInfo == null ) {
            return null;
        }
        ShoppingGoods goods = sysStoreInfo.getGoods();
        if ( goods == null ) {
            return null;
        }
        String img = goods.getImg();
        if ( img == null ) {
            return null;
        }
        return img;
    }
 
    private String sysStoreInfoGoodsCode(SysStoreInfo sysStoreInfo) {
        if ( sysStoreInfo == null ) {
            return null;
        }
        ShoppingGoods goods = sysStoreInfo.getGoods();
        if ( goods == null ) {
            return null;
        }
        String code = goods.getCode();
        if ( code == null ) {
            return null;
        }
        return code;
    }
 
    private String sysStoreInfoGoodsName(SysStoreInfo sysStoreInfo) {
        if ( sysStoreInfo == null ) {
            return null;
        }
        ShoppingGoods goods = sysStoreInfo.getGoods();
        if ( goods == null ) {
            return null;
        }
        String name = goods.getName();
        if ( name == null ) {
            return null;
        }
        return name;
    }
 
    private Integer sysStoreInfoGoodsAlarmNum(SysStoreInfo sysStoreInfo) {
        if ( sysStoreInfo == null ) {
            return null;
        }
        ShoppingGoods goods = sysStoreInfo.getGoods();
        if ( goods == null ) {
            return null;
        }
        Integer alarmNum = goods.getAlarmNum();
        if ( alarmNum == null ) {
            return null;
        }
        return alarmNum;
    }
}