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 org.jeecg.modules.dnc.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.lettuce.core.dynamic.annotation.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.dnc.entity.ProductMix;
 
public interface ProductMixMapper extends BaseMapper<ProductMix> {
    @Select("SELECT * FROM nc_product_mix WHERE id = #{productId} AND tree_type = 1")
    ProductMix findByProductId(@Param("productId") String productId);
 
    @Select("SELECT * FROM nc_product_mix WHERE id = #{componentId} AND tree_type = 2")
    ProductMix findByComponentId(@Param("componentId") String componentId);
 
    @Select("SELECT * FROM nc_product_mix WHERE id = #{partsId} AND tree_type = 3")
    ProductMix findByPartsId(@Param("partsId") String partsId);
 
    @Select("SELECT * FROM nc_product_mix WHERE id = #{operationId} AND tree_type = 4")
    ProductMix findByOperationId(@Param("operationId") String operationId);
 
    @Select("SELECT * FROM nc_product_mix WHERE id = #{processId} AND tree_type = 5")
    ProductMix findByProcessId(@Param("operationId") String processId);
 
    @Select("SELECT * FROM nc_product_mix WHERE id = #{worksiteId} AND tree_type = 6")
    ProductMix findByWorksiteId(@Param("operationId") String worksiteId);
 
}