parent
d36d5672a6
commit
7fb34049a3
|
@ -65,7 +65,7 @@ public class RedisCache {
|
|||
* @return true=设置成功;false=设置失败
|
||||
*/
|
||||
public boolean expire (final String key, final long timeout, final TimeUnit unit) {
|
||||
return redisTemplate.expire(key, timeout, unit);
|
||||
return Boolean.TRUE.equals(redisTemplate.expire(key, timeout, unit));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -156,9 +156,8 @@ public class RedisCache {
|
|||
*/
|
||||
public <T> BoundSetOperations<String, T> setCacheSet (final String key, final Set<T> dataSet) {
|
||||
BoundSetOperations<String, T> setOperation = redisTemplate.boundSetOps(key);
|
||||
Iterator<T> it = dataSet.iterator();
|
||||
while (it.hasNext()) {
|
||||
setOperation.add(it.next());
|
||||
for (T t : dataSet) {
|
||||
setOperation.add(t);
|
||||
}
|
||||
return setOperation;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package ${packageName}.domain;
|
|||
#foreach ($import in $importList)
|
||||
import ${import};
|
||||
#end
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
@ -56,16 +57,15 @@ public class ${ClassName} extends ${Entity} {
|
|||
#else
|
||||
@Excel(name = "${comment}")
|
||||
#end
|
||||
#end
|
||||
#if($column.javaField == $pkColumn.javaField)
|
||||
@TableId(value = "${pkColumn.javaField}",type = IdType.AUTO)
|
||||
#end
|
||||
private $column.javaType $column.javaField;
|
||||
|
||||
#end
|
||||
#end
|
||||
#if($table.sub)
|
||||
/** $table.subTable.functionName信息 */
|
||||
private List<${subClassName}> ${subclassName}List;
|
||||
|
||||
#end
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -31,7 +31,7 @@ public class BookInfo extends BaseEntity {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(type = IdType.AUTO)
|
||||
@TableId(value = "id",type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
|
|
Loading…
Reference in New Issue