...
|
...
|
@@ -125,9 +125,12 @@ public class RedisCache { |
|
|
*/
|
|
|
public int getSortIdBySingleCent(int activityId) {
|
|
|
log.info("getSortIdBySingleCent with activityId is {}", activityId);
|
|
|
|
|
|
if(!redisTemplate.hasKey(RedisKeyBuilder.newInstance().appendFixed(SORT_ID_KEY).appendVar(activityId) )){
|
|
|
initMaxSortEx(activityId);
|
|
|
try {
|
|
|
if(!redisTemplate.hasKey(RedisKeyBuilder.newInstance().appendFixed(SORT_ID_KEY).appendVar(activityId) )){
|
|
|
initMaxSortEx(activityId);
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
log.error("getSortIdBySingleCent find wrong. activityId = " + activityId, e);
|
|
|
}
|
|
|
Long id = redisTemplate.getStringRedisTemplate().opsForValue().increment(SORT_ID_KEY + activityId, 1); //该活动的排序号加一
|
|
|
|
...
|
...
|
|