whyclxw
3 天以前 29aed8c1fde9c1fc6d248ba8028914e038442306
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.whyc.mapper.ProductApprovingMapper;
import com.whyc.pojo.ProductApproving;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
@Service
public class ProductApprovingService {
 
    @Resource
    private ProductApprovingMapper mapper;
 
    public void insert(ProductApproving productApproving) {
        mapper.insert(productApproving);
    }
 
    public ProductApproving getByMainId(Integer mainId) {
        QueryWrapper<ProductApproving> query = Wrappers.query();
        query.eq("main_id",mainId).last(" limit 1");
        return mapper.selectOne(query);
    }
}