whycxzp
2022-10-17 04d13e3a41ef798e07c25c1d3ad2002270a9cb76
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);
    }
}