whycxzp
2022-08-25 e8200d6698814ecdf28a319804000b999e63d882
src/main/java/com/whyc/service/ProductHistoryService.java
@@ -48,4 +48,11 @@
                .eq("custom_code",customCode).eq("enabled",anotherStatus);
        mapper.update(null,update);
    }
    public ProductHistory getEnabledByParentCodeAndCustomCode(String parentCode, String customCode) {
        QueryWrapper<ProductHistory> query = Wrappers.query();
        query.eq("parent_code",parentCode).eq("custom_code",customCode).eq("enabled",1)
                .last(" limit 1");
        return mapper.selectOne(query);
    }
}