فهرست منبع

sql 报错修复

xgb 13 ساعت پیش
والد
کامیت
1d11b61775

+ 3 - 3
fs-service/src/main/java/com/fs/company/mapper/CompanyMapper.java

@@ -82,7 +82,7 @@ public interface CompanyMapper
     @Select({"<script> " +
     @Select({"<script> " +
             "select c.*,a.api_name as voice_api_name,u.user_name " +
             "select c.*,a.api_name as voice_api_name,u.user_name " +
             "from company c left join company_voice_api a on a.api_id=c.voice_api_id left join company_user u on u.user_id=c.user_id " +
             "from company c left join company_voice_api a on a.api_id=c.voice_api_id left join company_user u on u.user_id=c.user_id " +
-            "where is_del=0 " +
+            "where c.is_del=0 " +
             "<if test = 'maps.companyId != null  '> " +
             "<if test = 'maps.companyId != null  '> " +
             "and c.company_id = #{maps.companyId}" +
             "and c.company_id = #{maps.companyId}" +
             "</if>" +
             "</if>" +
@@ -122,7 +122,7 @@ public interface CompanyMapper
             "select c.*,a.api_name as voice_api_name,u.user_name " +
             "select c.*,a.api_name as voice_api_name,u.user_name " +
             " ,(select count(1) from crm_customer cc where c.company_id= cc.company_id and date_format(cc.update_time,'%y%m%d') = date_format(now(),'%y%m%d') ) as now_day_customer_count " +
             " ,(select count(1) from crm_customer cc where c.company_id= cc.company_id and date_format(cc.update_time,'%y%m%d') = date_format(now(),'%y%m%d') ) as now_day_customer_count " +
             "from company c left join company_voice_api a on a.api_id=c.voice_api_id left join company_user u on u.user_id=c.user_id " +
             "from company c left join company_voice_api a on a.api_id=c.voice_api_id left join company_user u on u.user_id=c.user_id " +
-            "where is_del=0 " +
+            "where c.is_del=0 " +
             "<if test = 'maps.companyId != null  '> " +
             "<if test = 'maps.companyId != null  '> " +
             "and c.company_id = #{maps.companyId}" +
             "and c.company_id = #{maps.companyId}" +
             "</if>" +
             "</if>" +
@@ -227,7 +227,7 @@ public interface CompanyMapper
     @Select({"<script> " +
     @Select({"<script> " +
             "select c.*,a.api_name as voice_api_name,u.user_name " +
             "select c.*,a.api_name as voice_api_name,u.user_name " +
             "from company c left join company_voice_api a on a.api_id=c.voice_api_id left join company_user u on u.user_id=c.user_id " +
             "from company c left join company_voice_api a on a.api_id=c.voice_api_id left join company_user u on u.user_id=c.user_id " +
-            "where is_del=0 " +
+            "where c.is_del=0 " +
             "<if test = 'maps.liveShow != null  '> " +
             "<if test = 'maps.liveShow != null  '> " +
             "and c.live_show = #{maps.liveShow}" +
             "and c.live_show = #{maps.liveShow}" +
             "</if>" +
             "</if>" +

+ 3 - 9
fs-service/src/main/resources/mapper/hisStore/FsStoreProductScrmMapper.xml

@@ -483,17 +483,14 @@
         <if test='config.isStores == "1" '>
         <if test='config.isStores == "1" '>
             inner join fs_store_scrm fs on fs.store_id = fsp.store_id
             inner join fs_store_scrm fs on fs.store_id = fsp.store_id
         </if>
         </if>
-        <if test='config.isAudit == "1" '>
-            and fs.is_audit = '1'
-        </if>
         where fsp.is_del=0 and fsp.is_show=1
         where fsp.is_del=0 and fsp.is_show=1
         <if test='config.isAudit == "1" '>
         <if test='config.isAudit == "1" '>
-            and fsp.is_audit = '1'
+
         </if>
         </if>
         <if test = 'param.appId != null and param.appId != ""'>
         <if test = 'param.appId != null and param.appId != ""'>
             and ((FIND_IN_SET(#{param.appId}, fsp.app_ids) > 0))
             and ((FIND_IN_SET(#{param.appId}, fsp.app_ids) > 0))
         </if>
         </if>
-        and fsp.is_best=1 and fsp.is_display=1 order by fsp.sort desc,fsp.product_id desc
+        and fsp.is_best=1 and fsp.is_display=1  and fsp.is_audit = '1' order by fsp.sort desc,fsp.product_id desc
     </select>
     </select>
     <select id="bulkCopyFsStoreProductByIds" resultMap="FsStoreProductResult">
     <select id="bulkCopyFsStoreProductByIds" resultMap="FsStoreProductResult">
         <include refid="selectFsStoreProductVo"/>
         <include refid="selectFsStoreProductVo"/>
@@ -542,13 +539,10 @@
             inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
             inner join fs_store_scrm fs on fs.store_id = p.store_id and fs.is_audit = 1
         </if>
         </if>
         where p.is_del=0 and p.is_show=1
         where p.is_del=0 and p.is_show=1
-        <if test='config.isAudit == "1" '>
-            and p.is_audit = '1'
-        </if>
         <if test = 'param.appId != null and param.appId != ""'>
         <if test = 'param.appId != null and param.appId != ""'>
             and ((FIND_IN_SET(#{param.appId}, p.app_ids) > 0))
             and ((FIND_IN_SET(#{param.appId}, p.app_ids) > 0))
         </if>
         </if>
-        and  p.is_good=1 and p.is_display=1 order by p.sort desc
+        and  p.is_good=1 and p.is_display=1 and p.is_audit = '1' order by p.sort desc
     </select>
     </select>
 
 
     <select id="getStoreProductInProductIds" resultType="com.fs.hisStore.domain.FsStoreProductScrm">
     <select id="getStoreProductInProductIds" resultType="com.fs.hisStore.domain.FsStoreProductScrm">