jinpengyong
2021-11-12 5fab4a685ce81fd2efa3546dc0716d223f9db09b
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
package com.moral.api.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.moral.api.entity.Organization;
import com.moral.api.mapper.OrganizationMapper;
import com.moral.api.service.OrganizationService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.moral.constant.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
/**
 * <p>
 * 组织表 服务实现类
 * </p>
 *
 * @author moral
 * @since 2021-10-12
 */
@Service
public class OrganizationServiceImpl extends ServiceImpl<OrganizationMapper, Organization> implements OrganizationService {
 
    @Autowired(required = false)
    private OrganizationMapper organizationMapper;
 
    @Override
    public Organization getOrganizationById(int id) {
        QueryWrapper<Organization> wrapper_organization = new QueryWrapper<>();
        wrapper_organization.eq("is_delete",Constants.NOT_DELETE);
        wrapper_organization.eq("id",id);
        Organization organization = organizationMapper.selectOne(wrapper_organization);
        return organization;
    }
}