Browse Source

xuanpin库

zhaoxian 3 years ago
parent
commit
70fe95e127

+ 2 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/material/mapper/xml/ProductMaterialMapper.xml

@@ -149,7 +149,9 @@
         and product_id = #{productId}
           and trade_name = #{tradeName}
           and start_month >= #{startMonth}
+        <if test="endMonth!=null">
           and end_month &lt;= #{endMonth}
+        </if>
         ORDER BY t1.create_time desc
     </select>
 

+ 2 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/material/service/impl/ProductMaterialServiceImpl.java

@@ -80,6 +80,8 @@ public class ProductMaterialServiceImpl extends ServiceImpl<ProductMaterialMappe
                 String[] sp = endMonth.split("-");
                 String lastDayStr = "-" + DateUtils.getDaysOfMonth(Integer.valueOf(sp[0]), Integer.valueOf(sp[1]));
                 productMaterial.setEndDate(endMonth.concat(lastDayStr));
+            }else{
+                productMaterial.setEndMonth(DateUtils.date2Str());
             }
         }
         Long total = baseMapper.videoListTotal(productMaterial);