linzhijie
2021-04-12 c632636e2f5b4188b430f5efc9d9f68c8dbe3d6d
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
package com.ots.project.exam.service.impl;
import com.ots.common.utils.DateUtils;
import com.ots.common.utils.StringUtils;
import com.ots.common.utils.text.Convert;
import com.ots.project.exam.domain.EntDemographyParam;
import com.ots.project.exam.mapper.EntDemographyParamMapper;
import com.ots.project.exam.service.IEntDemographyParamService;
import com.ots.project.system.user.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
 
@Service
public class EntDemographyParamServiceImpl implements IEntDemographyParamService {
    @Autowired
    private EntDemographyParamMapper entDemographyParamMapper;
    @Autowired
    private UserMapper userMapper;
    
    @Override
    public EntDemographyParam selectEntDemographyParamById(Long paramId) {
        return entDemographyParamMapper.selectEntDemographyParamById(paramId);
    }
    
    @Override
    public List<EntDemographyParam> selectEntDemographyParamList(EntDemographyParam entDemographyParam) {
        return entDemographyParamMapper.selectEntDemographyParamList(entDemographyParam);
    }
    @Override
    public List<EntDemographyParam> selectEntDemographyParamListByParamIn(String paramIds) {
        return entDemographyParamMapper.selectEntDemographyParamListByParamIn(Convert.toStrArray(paramIds));
    }
    
    @Override
    public int insertEntDemographyParam(EntDemographyParam entDemographyParam) {
        entDemographyParam.setCreateTime(DateUtils.getNowDate());
        return entDemographyParamMapper.insertEntDemographyParam(entDemographyParam);
    }
    
    @Override
    public int updateEntDemographyParam(EntDemographyParam entDemographyParam) {
        if (StringUtils.isEmpty(entDemographyParam.getIsRequired())) {
            entDemographyParam.setIsRequired("0");
        }
        entDemographyParam.setUpdateTime(DateUtils.getNowDate());
        return entDemographyParamMapper.updateEntDemographyParam(entDemographyParam);
    }
    
    @Override
    public int deleteEntDemographyParamByIds(String ids) {
        return entDemographyParamMapper.deleteEntDemographyParamByIds(Convert.toStrArray(ids));
    }
    
    public int deleteEntDemographyParamById(Long paramId) {
        return entDemographyParamMapper.deleteEntDemographyParamById(paramId);
    }
}