ソースを参照

大中型查询修改

wucl 3 週間 前
コミット
93791dd4cc

+ 1 - 1
dao/src/main/resources/mapper/MajorMapper.xml

@@ -701,7 +701,7 @@
             and m.business_object_type = #{major.businessObjectType}
         </if>
         <if test="major!=null and major.userIds!=null and major.userIds.size!=0">
-            or
+            and
             m.client_manager_id  in
             <foreach collection="
             major.userIds" open="(" close=")" separator="," item="userId">#{userId}

+ 1 - 1
dao/src/main/resources/mapper/MajorTargetMapper.xml

@@ -93,7 +93,7 @@
     </select>
 
     <select id="getEvaluateAmountByTargetId" parameterType="java.util.List" resultType="java.math.BigDecimal">
-        select sum(evaluate_value) from major_target where evaluate_value is not null and deleted = 0 and id in (
+        select ifnull(sum(evaluate_value),0) from major_target where evaluate_value is not null and deleted = 0 and id in (
             <foreach collection="targetIds" item="item" separator="," index="index">
                 #{item}
             </foreach>