Quellcode durchsuchen

feat:合并代码冲突

caoliqin vor 3 Wochen
Ursprung
Commit
0d1a86c4a2

+ 1 - 88
fs-common/src/main/java/com/fs/common/core/redis/RedisCache.java

@@ -9,32 +9,17 @@ import org.springframework.data.redis.core.RedisTemplate;
 import org.springframework.data.redis.core.ValueOperations;
 import org.springframework.stereotype.Component;
 
-import java.util.*;
-import java.util.concurrent.TimeUnit;
-
 /**
  * spring redis 工具类
  *
 
  **/
+@SuppressWarnings(value = { "unchecked", "rawtypes" })
 @Component
 public class RedisCache
 {
     @Autowired
     public RedisTemplate redisTemplate;
-    /**
-     * 递增 key 对应的数值
-     *
-     * @param key 缓存键
-     * @param delta 增量
-     * @return 递增后的值
-     */
-    public Long increment(final String key, final long delta) {
-        return redisTemplate.opsForValue().increment(key, delta);
-    }
-    public Long incrementCacheValue(final String key, final long delta) {
-        return redisTemplate.opsForValue().increment(key, delta);
-    }
 
     /**
      * 缓存基本的对象,Integer、String、实体类等
@@ -85,18 +70,6 @@ public class RedisCache
         return redisTemplate.expire(key, timeout, unit);
     }
 
-    /**
-     * 当 key 不存在时设置值
-     *
-     * @param key   缓存键
-     * @param value 缓存值
-     * @param timeout 过期时间
-     * @param unit 时间单位
-     * @return true: 设置成功,false: key 已存在
-     */
-    public boolean setIfAbsent(final String key, final Object value, long timeout, TimeUnit unit) {
-        return Boolean.TRUE.equals(redisTemplate.opsForValue().setIfAbsent(key, value, timeout, unit));
-    }
     /**
      * 获得缓存的基本对象。
      *
@@ -143,46 +116,6 @@ public class RedisCache
         return count == null ? 0 : count;
     }
 
-
-    /**
-     * 添加List消息数据
-     *
-     * @param key 缓存的键值
-     * @param dataList 待缓存的List消息数据
-     * @return 缓存的对象
-     */
-    public <T> long setVoiceList(final String key, final List<T> dataList)
-    {
-        Long count = redisTemplate.opsForList().rightPushAll(key, dataList);
-        return count == null ? 0 : count;
-    }
-
-    /**
-     * 添加List消息数据的key
-     *
-     * @param key 缓存的键值
-     * @param value 待缓存的值
-     * @return 缓存的对象
-     */
-    public <T> void setVoice(final String key, final T value)
-    {
-        redisTemplate.opsForList().rightPush(key, value);
-    }
-
-    /**
-     * 获得list对象的value
-     *
-     * @param key 缓存的键值
-     * @return 缓存键值对应的数据
-     */
-    public <T> T getVoiceAllList(final String key)
-    {
-        return (T) redisTemplate.opsForList().range(key,0,-1);
-    }
-
-
-
-
     /**
      * 获得缓存的list对象
      *
@@ -295,25 +228,6 @@ public class RedisCache
         return redisTemplate.keys(pattern);
     }
 
-    /**
-     * 将对象添加到 Redis 的 Set 集合中
-     *
-     * @param key   Redis Key
-     * @param value 要添加的对象(例如 userId)
-     */
-    public void setSetCacheObject(String key, Object value) {
-        redisTemplate.opsForSet().add(key, value);
-    }
-
-    /**
-     * 从 Redis 的 Set 集合中移除指定的对象
-     *
-     * @param key   Redis Key
-     * @param value 要移除的对象(例如 userId)
-     */
-    public void removeSetCacheObject(String key, Object value) {
-        redisTemplate.opsForSet().remove(key, value);
-    }
 
     public Boolean setIfAbsent(String key, String value, long timeout, TimeUnit unit) {
         return redisTemplate.opsForValue().setIfAbsent(key, value, timeout, unit);
@@ -339,7 +253,6 @@ public class RedisCache
         return redisTemplate.opsForValue().increment(key, delta);
     }
 
-
     /**
      * 获取字符串值
      *

+ 0 - 62
fs-common/src/main/java/com/fs/common/utils/DateUtils.java

@@ -270,68 +270,6 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
         return endOfDay.format(OUTPUT_FORMATTER);
     }
 
-    /**
-     * 检查两个时间是否跨天
-     * @param startTime 开始时间
-     * @param finishTime 结束时间
-     * @return true表示跨天,false表示未跨天
-     */
-    public static boolean isCrossDay(LocalDateTime startTime, LocalDateTime finishTime) {
-        if (startTime == null || finishTime == null) {
-            throw new IllegalArgumentException("时间参数不能为空");
-        }
-
-        // 如果结束时间早于开始时间,说明参数有误
-        if (finishTime.isBefore(startTime)) {
-            throw new IllegalArgumentException("结束时间不能早于开始时间");
-        }
-
-        LocalDate startDate = startTime.toLocalDate();
-        LocalDate finishDate = finishTime.toLocalDate();
-
-        // 比较日期部分是否相等
-        return !startDate.isEqual(finishDate);
-    }
-
-    /**
-     * 返回时间最近步长 向下(向前)取整
-     * @param startTime 开始时间
-     * @param step 步长
-     * @return 开始时间最近步长
-     */
-    public static LocalDateTime getLiveOrderStartTime(LocalDateTime startTime, int step) {
-
-        // 将startTime按照最近30分钟来取值 比如17:35 就改为17:30
-        int minute = startTime.getMinute();
-        int truncatedMinute = (minute / step) * step;
-        startTime = startTime.withMinute(truncatedMinute).withSecond(0).withNano(0);
-        return startTime;
-    }
-
-    /**
-     * 根据开始时间、结束时间和步长拆分时间
-     *
-     * @param startTime 开始时间
-     * @param endTime 结束时间
-     * @param unit 时间单位 (ChronoUnit.HOURS, ChronoUnit.DAYS等)
-     * @param step 步长
-     * @return 时间点列表
-     */
-    public static LinkedList<LocalDateTime> splitTimeByStep(LocalDateTime startTime,
-                                                            LocalDateTime endTime,
-                                                            ChronoUnit unit,
-                                                            int step) {
-        LinkedList<LocalDateTime> timeSlots = new LinkedList<>();
-        LocalDateTime currentTime = startTime;
-
-        while (!currentTime.isAfter(endTime)) {
-            timeSlots.add(currentTime);
-            currentTime = currentTime.plus(step, unit);
-        }
-
-        return timeSlots;
-    }
-
     // 返回昨天或明天的日期字符串(格式:yyyy-MM-dd)
     public static String addDateDays(int days) {
         Calendar cal = Calendar.getInstance();

+ 1 - 1
fs-service/src/main/java/com/fs/course/param/FsCourseWatchLogListParam.java

@@ -116,7 +116,7 @@ public class FsCourseWatchLogListParam implements Serializable {
     private List<Long> deptIds;
     private String ids;
 
-    private List<Long> periodIds;
+//    private List<Long> periodIds;
 
     private Integer pageNum;
     private Integer pageSize;

+ 0 - 2
fs-service/src/main/java/com/fs/his/service/IFsUserService.java

@@ -229,8 +229,6 @@ public interface IFsUserService
 
     R removeUser(Long id);
 
-    void increaseIntegral(List<Long> userIds, Long scoreAmount);
-
     List<FsUserVO> selectFsUserVOListByProjectNew(FsUser fsUser);
 
     void increaseIntegral(List<Long> longs, Long integral);

+ 0 - 1
fs-service/src/main/java/com/fs/his/service/impl/FsStoreOrderServiceImpl.java

@@ -877,7 +877,6 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService {
             order.setPrescribeId(prescribeId);
         }
         // 九州,目前刷单不生成处方单
-        Long prescribeId = 0L;
         if(CloudHostUtils.hasCloudHostName("九州在线")){
             log.info("跳过生成处方单,处方单id:{}", prescribeId);
         } else {

+ 2 - 8
fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java

@@ -1348,9 +1348,10 @@ public class FsUserServiceImpl implements IFsUserService {
     public List<FsUser> selectFsUserListByJointUserNameKey(String userNameKey) {
         return fsUserMapper.selectFsUserListByJointUserNameKey(userNameKey);
     }
+
     @Override
     public void increaseIntegral(List<Long> userIds, Long scoreAmount) {
-        fsUserMapper.increaseIntegral(userIds, scoreAmount);
+        fsUserMapper.incrIntegral(userIds, scoreAmount);
     }
 
 
@@ -1561,13 +1562,6 @@ public class FsUserServiceImpl implements IFsUserService {
         return R.ok();
     }
 
-
-
-    @Override
-    public void increaseIntegral(List<Long> userIds, Long scoreAmount) {
-        fsUserMapper.incrIntegral(userIds, scoreAmount);
-    }
-
     @Override
     public HisFsUserVO getHisUserIntegralWithLogs(FsUser fsUser) {
 //        try (CloseableHttpClient httpClient = HttpClients.createDefault()) {

+ 0 - 13
fs-service/src/main/java/com/fs/live/vo/LiveOrderVo.java

@@ -1,13 +0,0 @@
-package com.fs.live.vo;
-
-import lombok.Data;
-
-import java.util.Date;
-
-@Data
-public class LiveOrderVo {
-    private String timeOptions;
-    private String timeGranularity;
-    private String liveId;
-    private Date createTime;
-}