Просмотр исходного кода

fixed some bugs in cooperator product

maqingyang 11 месяцев назад
Родитель
Сommit
269df4e84c

+ 10 - 0
src/main/resources/mapper/CooperatorMapper.xml

@@ -44,6 +44,9 @@
         WHERE
             cooperator_info.template_id = #{template_id}
           and field_template_ref.is_deleted=0
+        and field_define.is_deleted=0
+        and cooperator_info.is_deleted=0
+        and field_template.is_deleted=0
         order by field_template_ref.create_time desc
 
 
@@ -66,6 +69,11 @@
         WHERE
             cooperator_info.cooperator_num = #{cooperatorNum}
             and field_template_ref.is_deleted=0
+            and field_define.is_deleted=0
+            and cooperator_info.is_deleted=0
+            and field_template.is_deleted=0
+
+
         order by field_template_ref.create_time desc
 
     </select>
@@ -99,6 +107,8 @@
                 LEFT JOIN model ON model.id = prd_product.model_id
         WHERE
             prd_product.cooperator_num = #{cooperatorNum}
+        and prd_product.is_deleted=0
+        and model.is_deleted=0
 
 
     </select>

+ 2 - 1
src/main/resources/mapper/CooperatorProductMapper.xml

@@ -48,9 +48,10 @@
             product_field_ref.id
         FROM
             product_field_ref
-        LEFT JOIN field_define ON product_field_ref.field_no = field_define.field_no
+        LEFT JOIN field_define ON product_field_ref.field_id = field_define.id
         WHERE product_field_ref.product_num = #{productNum}
         and product_field_ref.is_deleted = 0
+        and field_define.is_deleted=0
     </select>
 
     <insert id="Apply">