소스 검색

sql修改

Aslee 4 년 전
부모
커밋
aa1b10b45f
1개의 변경된 파일6개의 추가작업 그리고 5개의 파일을 삭제
  1. 6 5
      src/main/resources/mapper/ProductMapper.xml

+ 6 - 5
src/main/resources/mapper/ProductMapper.xml

@@ -26,11 +26,11 @@
 
 			p.brandID as brandId,
 			br.name as brandName,
-			p.tinyTypeID as tinyTypeId,
+			t.tinyTypeID as tinyTypeId,
 			t.name as tinyTypeText,
-			t.smallTypeID as smallTypeId,
+			s.smallTypeID as smallTypeId,
 			s.name as smallTypeText,
-			s.bigTypeID as bigTypeId,
+			b.bigTypeID as bigTypeId,
 			b.name as bigTypeText,
 
 			p.shopID as shopId,
@@ -45,9 +45,10 @@
 		left join productdetailinfo d on p.productID=d.productID
 		left join cm_brand as br on p.brandID = br.id
 
+        left join bigtype as b on p.bigTypeID = b.bigTypeID
+        left join smalltype as s on p.smallTypeID = s.smallTypeID
         left join tinytype as t on p.tinyTypeID = t.tinyTypeID
-        left join smalltype as s on t.smallTypeID = s.smallTypeID
-        left join bigtype as b on s.bigTypeID = b.bigTypeID
+
 
         left join shop as sh on p.shopID = sh.shopID
         left join town as tn on sh.townId = tn.townID