Commit 92f34292 authored by wzp's avatar wzp

修改bug

parent eb0c46a1
......@@ -85,6 +85,10 @@ public class LearningContent implements Serializable {
@TableField("sortorder")
private Integer sortorder;
@ApiModelProperty("创建人类型")
@TableField("create_type")
private Integer createType;
@ApiModelProperty("创建日期")
@TableField(value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime;
......
......@@ -11,6 +11,7 @@ import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.Date;
......@@ -73,10 +74,10 @@ public class RunLog implements Serializable {
@ApiModelProperty("开始时间")
@TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date startDate;
private LocalDateTime startDate;
@ApiModelProperty("结束时间")
@TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date endDate;
private LocalDateTime endDate;
}
......@@ -6,6 +6,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDate;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
......@@ -78,12 +80,12 @@ public class TOperationLog implements Serializable {
@ApiModelProperty("开始时间")
@TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date startDate;
private LocalDateTime startDate;
@ApiModelProperty("结束时间")
@TableField(exist = false)
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
private Date endDate;
private LocalDateTime endDate;
......
......@@ -75,6 +75,12 @@ public class LearningContentController extends BaseController {
@ApiOperation(value = "添加学习内容", notes = "添加学习内容")
@MethodLog(operModule = OperModule.LEARNCONTENT, operType = OperType.ADD)
public Map<String, Object> saveLearningContent(@Validated(value = {Add.class}) LearningContent learningContent) {
TUser tUser1 = getcurUser();
if ("1".equals(tUser1.getType())){
learningContent.setCreateType(1);
}else {
learningContent.setCreateType(2);
}
final LambdaQueryWrapper<LearningContent> lambdaQueryWrapper = Wrappers.<LearningContent>lambdaQuery().eq(LearningContent::getName, learningContent.getName().trim());
final int count = this.learningContentService.count(lambdaQueryWrapper);
if (count > 0) {
......
......@@ -19,6 +19,7 @@ import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.apache.pdfbox.pdmodel.interactive.digitalsignature.PDSeedValueMDP;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -30,6 +31,7 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Map;
......@@ -171,6 +173,10 @@ public class SysLogController extends BaseController {
@GetMapping(value = "/OperationLog")
@RequiresAuthentication //@RequiresPermissions("/sysLog/OperationLog")
public Map<String, Object> OperationLog(TOperationLog operationLog) {
if (null!=operationLog.getStartDate()) {
operationLog.setStartDate(operationLog.getStartDate().toLocalDate().atTime(0, 0, 0));
operationLog.setEndDate(operationLog.getEndDate().toLocalDate().atTime(23, 59, 59));
}
try {
Page<TOperationLog> page = operationLogService.pageList(getPage(), operationLog);
return getResult(page);
......@@ -179,7 +185,6 @@ public class SysLogController extends BaseController {
}
return getFailResult();
}
/**
* 查询机顶盒日志
*/
......@@ -194,6 +199,10 @@ public class SysLogController extends BaseController {
@GetMapping(value = "/runLogList")
@RequiresAuthentication //@RequiresPermissions("/sysLog/runLogList")
public Map<String, Object> runLogList(RunLog runLog) {
if (null!=runLog.getStartDate()) {
runLog.setStartDate(runLog.getStartDate().toLocalDate().atTime(0, 0, 0));
runLog.setEndDate(runLog.getEndDate().toLocalDate().atTime(23, 59, 59));
}
try {
Page<RunLog> page = runLogService.pageList(getPage(), runLog);
return getResult(page);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment