yjwang hace 3 días
padre
commit
588b5b5709

+ 4 - 2
fs-service/src/main/java/com/fs/his/mapper/FsIntegralGoodsMapper.java

@@ -71,11 +71,12 @@ public interface FsIntegralGoodsMapper
      */
     public int deleteFsIntegralGoodsByGoodsIds(Long[] goodsIds);
 
-    @Select({"<script> select goods_id,bar_code, img_url, images, goods_name, ot_price, goods_type, status, integral, cash, sort, stock, limit_num, is_long_term, valid_start_time, valid_end_time, descs, create_time from fs_integral_goods" +
+    @Select({"<script> select goods_id,bar_code, img_url, images, goods_name, ot_price, goods_type, status, integral, cash, sort, stock, limit_num, is_drug, is_long_term, valid_start_time, valid_end_time, descs, create_time from fs_integral_goods" +
             "<where>  \n" +
             "            <if test=\"goodsName != null  and goodsName != ''\"> and goods_name like concat('%', #{goodsName}, '%')</if>\n" +
             "            <if test=\"goodsType != null \"> and goods_type = #{goodsType}</if>\n" +
             "            <if test=\"status != null \"> and status = #{status}</if>\n" +
+            "            <if test=\"isDrug != null \"> and is_drug = #{isDrug}</if>\n" +
             "            <if test=\"integral != null \"> and integral = #{integral}</if>\n" +
             "        </where> order by sort,goods_id desc"+
             "</script>"})
@@ -84,7 +85,8 @@ public interface FsIntegralGoodsMapper
             "select g.goods_id,g.img_url,g.images,g.goods_name,g.ot_price,g.goods_type,g.integral,g.cash,g.sort," +
             "g.is_long_term,g.valid_start_time,g.valid_end_time  from fs_integral_goods g  " +
             "where g.status=1  " +
-            "and (g.is_long_term = 0 " +
+            // is_long_term 为空时按长期有效处理(与详情接口一致,兼容历史数据)
+            "and (g.is_long_term is null or g.is_long_term = 0 " +
             "     or (g.is_long_term = 1 and g.valid_start_time &lt;= NOW() and g.valid_end_time &gt;= NOW())) " +
             "<if test = 'maps.goodsType != null and maps.goodsType != 0     '> " +
             "and g.goods_type = #{maps.goodsType}  " +

+ 3 - 0
fs-service/src/main/java/com/fs/his/vo/FsIntegralGoodsListVO.java

@@ -56,6 +56,9 @@ public class FsIntegralGoodsListVO {
     @Excel(name = "限购数量")
     private Integer limitNum;
 
+    /** 是否药品 0否 1是 */
+    private Integer isDrug;
+
     /** 是否长期有效 0是 1否 */
     private Integer isLongTerm;
 

+ 2 - 2
fs-user-app/src/main/resources/application.yml

@@ -13,5 +13,5 @@ spring:
 #    active: druid-sxjz
 #    active: druid-qdtst
 #    active: druid-yzt
-    active: dev-yjb
-#    active: druid-yjb-test #医健宝测试库
+#    active: dev-yjb
+    active: druid-yjb-test #医健宝测试库