whycxzp
2023-03-13 fcdb42dcfda2adccfd8cf42e16c2d6fa73732f1d
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
package com.whyc.service;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.whyc.mapper.ProductLockLogMapper;
import com.whyc.pojo.ProductLockLog;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
import java.util.List;
 
@Service
public class ProductLockLogService {
 
    @Resource
    private ProductLockLogMapper mapper;
 
    public void insert(ProductLockLog lockLog) {
        mapper.insert(lockLog);
    }
 
    public List<ProductLockLog> getListByParentCodeAndCustomCode(String parentCode, String customCode) {
        QueryWrapper<ProductLockLog> query = Wrappers.query();
        query.eq("parent_code",parentCode).eq("custom_code",customCode).orderByDesc("id");
        return mapper.selectList(query);
    }
}