|
|
@@ -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 <= NOW() and g.valid_end_time >= NOW())) " +
|
|
|
"<if test = 'maps.goodsType != null and maps.goodsType != 0 '> " +
|
|
|
"and g.goods_type = #{maps.goodsType} " +
|