@@ -6,7 +6,6 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
-import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -126,13 +125,13 @@ public class MaterialInfo implements Serializable {
* createTime
*/
@ApiModelProperty(value = "createTime")
- @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
- private Object createTime;
+ // @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
+ private Date createTime;
/**
* updateTime
@ApiModelProperty(value = "updateTime")
private Date updateTime;
//判断是否为头条有效素材0否_1是
@@ -114,7 +114,6 @@
<if test="projectId !=null and projectId != ''">
and matInfo.project_id = #{projectId}
</if>
-
<if test="status!=null">
and matInfo.status = #{status}
@@ -133,10 +132,10 @@
#{item}
</foreach>
- <if test="startDate!=null">
+ <if test="startDate!= null and startDate != '' ">
and matInfo.create_time >= #{startDate}
- <if test="endDate!=null">
+ <if test="endDate != null and endDate != '' ">
and matInfo.create_time <= #{endDate}
order by matInfo.create_time desc
@@ -782,6 +782,15 @@ public class MaterialInfoServiceImpl extends ServiceImpl<MaterialInfoMapper, Mat
ascription = "true";
}
+ if (!Check.isNull(startDate)) {
+ startDate = startDate + " 00:00:01";
+ }
+
+ if (!Check.isNull(endDate)) {
+ endDate = endDate + " 23:59:59";
List<MaterialInfo> dailyList = materialInfoMapper.getListByParams(tagCode, type, status, productId, materialName, code, startDate, endDate, userId, projectId, ascription, clipId, shotId, planId);
List<MaterialInfo> setList = new ArrayList<>();
PageInfo<MaterialInfo> pageInfo = new PageInfo<>(dailyList);