whycxzp
2023-06-21 b3537d8e3684b942d2bfee53773d8dbc521331e9
src/main/java/com/whyc/service/ProductLockLogService.java
@@ -1,10 +1,13 @@
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 {
@@ -15,4 +18,10 @@
    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);
    }
}