|
|
|
@ -37,6 +37,18 @@ |
|
|
|
|
</select> |
|
|
|
|
<select id="selectAgriculturalProductList" |
|
|
|
|
resultType="com.cjy.traceability.module.traceability.controller.admin.agriculturalproduct.vo.AgriculturalProductRespVO"> |
|
|
|
|
SELECT id,product_name AS productName FROM traceability_agricultural_product WHERE deleted = 0 AND product_status = 1 |
|
|
|
|
SELECT |
|
|
|
|
t1.id, |
|
|
|
|
t1.product_name AS productName, |
|
|
|
|
t1.product_pic as productPic, |
|
|
|
|
t2.species_name as speciesName, |
|
|
|
|
t3.variety_name as varietyName |
|
|
|
|
FROM |
|
|
|
|
traceability_agricultural_product t1 |
|
|
|
|
LEFT JOIN traceability_species t2 on t1.product_breed=t2.id |
|
|
|
|
LEFT JOIN traceability_variety t3 on t1.product_variety=t3.id |
|
|
|
|
WHERE |
|
|
|
|
t1.deleted = 0 |
|
|
|
|
AND t1.product_status = 1 |
|
|
|
|
</select> |
|
|
|
|
</mapper> |