|
@@ -8,6 +8,7 @@ import com.fdkankan.manage.exception.BusinessException;
|
|
|
import com.fdkankan.common.response.ResultData;
|
|
|
import com.fdkankan.manage.entity.Case;
|
|
|
import com.fdkankan.manage.service.ICaseService;
|
|
|
+import com.fdkankan.manage.util.Dateutils;
|
|
|
import com.fdkankan.manage.vo.request.CaseAddParam;
|
|
|
import com.fdkankan.manage.vo.request.CaseParam;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
@@ -15,6 +16,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import java.util.Date;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 前端控制器
|
|
@@ -67,6 +70,11 @@ public class CaseController {
|
|
|
LambdaUpdateWrapper<Case> wrapper = new LambdaUpdateWrapper<>();
|
|
|
wrapper.eq(Case::getId,id);
|
|
|
wrapper.set(Case::getIsPublic,isPublic);
|
|
|
+ if(isPublic == 1){
|
|
|
+ wrapper.set(Case::getPublicTime, Dateutils.getDate(new Date()));
|
|
|
+ }else {
|
|
|
+ wrapper.set(Case::getPublicTime,null);
|
|
|
+ }
|
|
|
caseService.update(wrapper);
|
|
|
return ResultData.ok();
|
|
|
}
|