From 01f857e6aaf9169a6ccd7c5a45d06a9e470ceaf9 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期四, 19 六月 2025 16:53:50 +0800
Subject: [PATCH] 111
---
server/src/main/java/com/doumee/api/business/InformationController.java | 9 +++
server/src/main/java/com/doumee/api/common/PublicCloudController.java | 8 +-
server/src/main/java/com/doumee/dao/vo/FootDataVO.java | 8 ++
server/src/main/java/com/doumee/dao/business/model/Information.java | 12 ++-
server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java | 42 ++++++++-----
server/src/main/java/com/doumee/dao/business/model/Carousel.java | 10 +--
server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java | 43 +++++++++----
server/src/main/java/com/doumee/api/system/SystemController.java | 8 +-
server/src/main/java/com/doumee/service/business/InformationService.java | 2
server/src/main/java/com/doumee/api/business/CarouselController.java | 6 +-
server/src/main/java/com/doumee/dao/dto/FootDataDTO.java | 5 +
11 files changed, 97 insertions(+), 56 deletions(-)
diff --git a/server/src/main/java/com/doumee/api/business/CarouselController.java b/server/src/main/java/com/doumee/api/business/CarouselController.java
index 9971d0d..6a8b602 100644
--- a/server/src/main/java/com/doumee/api/business/CarouselController.java
+++ b/server/src/main/java/com/doumee/api/business/CarouselController.java
@@ -108,9 +108,9 @@
return ApiResponse.success(carouselService.getFoodDataVO());
}
- @ApiOperation("鑾峰彇foot閰嶇疆")
- @PostMapping("/updFoodDataVO")
- public ApiResponse<FootDataVO> updFoodDataVO(@RequestBody FootDataDTO footDataDTO) {
+ @ApiOperation("鏇存柊foot閰嶇疆")
+ @PostMapping("/updFoodData")
+ public ApiResponse<FootDataVO> updFoodData(@RequestBody FootDataDTO footDataDTO) {
carouselService.updFoodDataVO(footDataDTO);
return ApiResponse.success(null);
}
diff --git a/server/src/main/java/com/doumee/api/business/InformationController.java b/server/src/main/java/com/doumee/api/business/InformationController.java
index c149bd0..b646390 100644
--- a/server/src/main/java/com/doumee/api/business/InformationController.java
+++ b/server/src/main/java/com/doumee/api/business/InformationController.java
@@ -6,6 +6,7 @@
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
+import com.doumee.dao.business.model.Carousel;
import com.doumee.dao.business.model.Information;
import com.doumee.service.business.InformationService;
import io.swagger.annotations.Api;
@@ -84,4 +85,12 @@
}
+ @ApiOperation("淇敼鐘舵��")
+ @PostMapping("/updateStatus")
+ @RequiresPermissions("business:information:update")
+ public ApiResponse updateStatus(@RequestBody Information information) {
+ informationService.updateStatus(information);
+ return ApiResponse.success(null);
+ }
+
}
diff --git a/server/src/main/java/com/doumee/api/common/PublicCloudController.java b/server/src/main/java/com/doumee/api/common/PublicCloudController.java
index 149d369..6a8ff19 100644
--- a/server/src/main/java/com/doumee/api/common/PublicCloudController.java
+++ b/server/src/main/java/com/doumee/api/common/PublicCloudController.java
@@ -59,15 +59,15 @@
@ApiImplicitParam(name = "file", value = "鏂囦欢澶�", required = true, paramType = "query", dataType = "String", dataTypeClass = String.class),
})
@PostMapping(value = "/uploadLocal", headers = "content-type=multipart/form-data")
- public void uploadLocal(String folder, HttpServletRequest request, HttpServletResponse response) throws Exception {
+ public void uploadLocal(HttpServletRequest request, HttpServletResponse response) throws Exception {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
- uploadFileLocal(multipartRequest, folder+ "/", response,
+ uploadFileLocal(multipartRequest, response,
systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.IMG_DIR).getCode() ,
systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode());
}
- public void uploadFileLocal(HttpServletRequest request, String folder, HttpServletResponse response, String rootPath,String dir) throws Exception {
+ public void uploadFileLocal(HttpServletRequest request, HttpServletResponse response, String rootPath,String dir) throws Exception {
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=UTF-8");
CommonsMultipartResolver multipartResovler = new CommonsMultipartResolver();
@@ -90,7 +90,7 @@
return;
}
String nowDate = DateUtil.getNowShortDate();
- folder += nowDate + "/";
+ String folder = nowDate + "/";
String strDirPath = rootPath + folder;
File dirPath = new File(strDirPath);
if (!dirPath.exists()) {
diff --git a/server/src/main/java/com/doumee/api/system/SystemController.java b/server/src/main/java/com/doumee/api/system/SystemController.java
index 3e798b8..366e4bf 100644
--- a/server/src/main/java/com/doumee/api/system/SystemController.java
+++ b/server/src/main/java/com/doumee/api/system/SystemController.java
@@ -41,8 +41,8 @@
@PreventRepeat(limit = 10, lockTime = 10000)
@ApiOperation("鐧诲綍")
- @EncryptionReq
- @EncryptionResp
+// @EncryptionReq
+// @EncryptionResp
@PostMapping("/login")
public ApiResponse<String> login (@Validated @RequestBody LoginDTO dto, HttpServletRequest request) {
return ApiResponse.success(systemLoginService.loginByPassword(dto, request));
@@ -58,8 +58,8 @@
@Trace(withRequestParameters = false)
@ApiOperation("淇敼褰撳墠鐢ㄦ埛瀵嗙爜")
- @EncryptionReq
- @EncryptionResp
+// @EncryptionReq
+// @EncryptionResp
@PostMapping("/updatePwd")
public ApiResponse updatePwd (@Validated @RequestBody UpdatePwdDto dto) {
dto.setUserId(this.getLoginUser().getId());
diff --git a/server/src/main/java/com/doumee/dao/business/model/Carousel.java b/server/src/main/java/com/doumee/dao/business/model/Carousel.java
index 11ec518..45cd9c1 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Carousel.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Carousel.java
@@ -32,7 +32,6 @@
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
@ExcelColumn(name="鍒涘缓鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
@@ -41,7 +40,6 @@
@ApiModelProperty(value = "鏇存柊鏃堕棿")
@ExcelColumn(name="鏇存柊鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
@@ -58,7 +56,7 @@
@ApiModelProperty(value = "鎻忚堪")
@ExcelColumn(name="鎻忚堪")
- private String describe;
+ private String detail;
@ApiModelProperty(value = "鍥剧墖鍦板潃")
@ExcelColumn(name="鍥剧墖鍦板潃")
@@ -72,13 +70,13 @@
@ExcelColumn(name="绫诲瀷锛�0=棣栭〉杞挱锛�")
private Integer type;
- @ApiModelProperty(value = "璺宠浆绫诲瀷锛�0=鏃狅紱1=澶栭摼锛�2=瀵屾枃鏈紱3=鍐呴儴鍦板潃", example = "1")
- @ExcelColumn(name="璺宠浆绫诲瀷锛�0=鏃狅紱1=澶栭摼锛�2=瀵屾枃鏈紱3=鍐呴儴鍦板潃")
+ @ApiModelProperty(value = "璺宠浆绫诲瀷锛�0=澶栭摼锛�1=瀵屾枃鏈紱", example = "1")
+ @ExcelColumn(name="璺宠浆绫诲瀷锛�0=鏃狅紱1=澶栭摼锛�")
private Integer jumpType;
@ApiModelProperty(value = "璺宠浆鍦板潃")
@ExcelColumn(name="璺宠浆鍦板潃")
- private String contnet;
+ private String content;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
@ExcelColumn(name="鎺掑簭鐮�")
diff --git a/server/src/main/java/com/doumee/dao/business/model/Information.java b/server/src/main/java/com/doumee/dao/business/model/Information.java
index 113c39d..eb4a68b 100644
--- a/server/src/main/java/com/doumee/dao/business/model/Information.java
+++ b/server/src/main/java/com/doumee/dao/business/model/Information.java
@@ -32,7 +32,6 @@
@ApiModelProperty(value = "鍒涘缓鏃堕棿")
@ExcelColumn(name="鍒涘缓鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd")
private Date createDate;
@ApiModelProperty(value = "鏇存柊浜虹紪鐮�", example = "1")
@@ -41,7 +40,6 @@
@ApiModelProperty(value = "鏇存柊鏃堕棿")
@ExcelColumn(name="鏇存柊鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd")
private Date editDate;
@ApiModelProperty(value = "鏄惁鍒犻櫎0鍚� 1鏄�", example = "1")
@@ -58,11 +56,11 @@
@ApiModelProperty(value = "鎻忚堪")
@ExcelColumn(name="鎻忚堪")
- private String describe;
+ private String detail;
@ApiModelProperty(value = "鍐呭")
@ExcelColumn(name="鍐呭")
- private String contnet;
+ private String content;
@ApiModelProperty(value = "灏侀潰鍥剧墖鍦板潃")
@ExcelColumn(name="灏侀潰鍥剧墖鍦板潃")
@@ -70,13 +68,17 @@
@ApiModelProperty(value = "鍙戝竷鏃堕棿")
@ExcelColumn(name="鍙戝竷鏃堕棿")
- @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date releaseDate;
@ApiModelProperty(value = "鎺掑簭鐮�", example = "1")
@ExcelColumn(name="鎺掑簭鐮�")
private Integer sortnum;
+
+ @ApiModelProperty(value = "鐘舵�� 0姝e父 1绂佺敤", example = "1")
+ @ExcelColumn(name="鐘舵�� 0姝e父 1绂佺敤")
+ private Integer status;
+
@ApiModelProperty(value = "灏侀潰鍥剧墖鍦板潃")
@TableField(exist = false)
private String fullImgurl;
diff --git a/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java b/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java
index ed14cf8..d878523 100644
--- a/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java
+++ b/server/src/main/java/com/doumee/dao/dto/FootDataDTO.java
@@ -1,5 +1,6 @@
package com.doumee.dao.dto;
+import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -31,10 +32,10 @@
private String address;
@ApiModelProperty(value = "瑙e喅鏂规锛圼{\"name\":\"瑙e喅鏂规涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"瑙e喅鏂规浜孿",\"address\":\"璺宠浆鍦板潃浜孿"}]锛�")
- private String solveScheme;
+ private JSONArray solveScheme;
@ApiModelProperty(value = "鏅烘収绯荤粺锛圼{\"name\":\"鏅烘収绯荤粺涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"鏅烘収绯荤粺浜孿",\"address\":\"璺宠浆鍦板潃浜孿"}]锛�")
- private String wisdomSystem;
+ private JSONArray wisdomSystem;
}
diff --git a/server/src/main/java/com/doumee/dao/vo/FootDataVO.java b/server/src/main/java/com/doumee/dao/vo/FootDataVO.java
index 6a060dc..1f74746 100644
--- a/server/src/main/java/com/doumee/dao/vo/FootDataVO.java
+++ b/server/src/main/java/com/doumee/dao/vo/FootDataVO.java
@@ -1,5 +1,6 @@
package com.doumee.dao.vo;
+import com.alibaba.fastjson.JSONArray;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -17,6 +18,9 @@
@ApiModelProperty(value = "foot浜岀淮鐮�")
private String footImgUrl;
+ @ApiModelProperty(value = "foot浜岀淮鐮佸叏璺緞")
+ private String footFullImgUrl;
+
@ApiModelProperty(value = "foot鏂囨")
private String footWords;
@@ -33,10 +37,10 @@
private String address;
@ApiModelProperty(value = "瑙e喅鏂规锛圼{\"name\":\"瑙e喅鏂规涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"瑙e喅鏂规浜孿",\"address\":\"璺宠浆鍦板潃浜孿"}]锛�")
- private String solveScheme;
+ private JSONArray solveScheme;
@ApiModelProperty(value = "鏅烘収绯荤粺锛圼{\"name\":\"鏅烘収绯荤粺涓�\",\"address\":\"璺宠浆鍦板潃涓�\"},{\"name\":\"鏅烘収绯荤粺浜孿",\"address\":\"璺宠浆鍦板潃浜孿"}]锛�")
- private String wisdomSystem;
+ private JSONArray wisdomSystem;
}
diff --git a/server/src/main/java/com/doumee/service/business/InformationService.java b/server/src/main/java/com/doumee/service/business/InformationService.java
index 0225176..c1027bd 100644
--- a/server/src/main/java/com/doumee/service/business/InformationService.java
+++ b/server/src/main/java/com/doumee/service/business/InformationService.java
@@ -94,4 +94,6 @@
* @return long
*/
long count(Information information);
+
+ void updateStatus(Information information);
}
diff --git a/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java b/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java
index 7cc0fc1..e8d5199 100644
--- a/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java
+++ b/server/src/main/java/com/doumee/service/business/impl/CarouselServiceImpl.java
@@ -1,5 +1,7 @@
package com.doumee.service.business.impl;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
import com.doumee.biz.system.SystemDictDataBiz;
import com.doumee.core.constants.Constants;
import com.doumee.core.constants.ResponseStatus;
@@ -51,14 +53,14 @@
public Integer create(Carousel carousel) {
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(Objects.isNull(carousel)
- || Objects.isNull(carousel.getType())
- || Objects.isNull(carousel.getImgurl())
+// || Objects.isNull(carousel.getImgurl())
|| Objects.isNull(carousel.getJumpType())
- || Objects.isNull(carousel.getSortnum())
- || (!Constants.equalsInteger(carousel.getJumpType(),Constants.ZERO) && StringUtils.isEmpty(carousel.getContnet()))
+// || Objects.isNull(carousel.getSortnum())
+ || StringUtils.isEmpty(carousel.getTitle())
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
+ carousel.setType(Constants.ZERO);
carousel.setIsdeleted(Constants.ZERO);
carousel.setStatus(Constants.ZERO);
carousel.setCreateDate(new Date());
@@ -92,11 +94,9 @@
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(Objects.isNull(carousel)
|| Objects.isNull(carousel.getId())
- || Objects.isNull(carousel.getType())
|| Objects.isNull(carousel.getImgurl())
|| Objects.isNull(carousel.getJumpType())
|| Objects.isNull(carousel.getSortnum())
- || (!Constants.equalsInteger(carousel.getJumpType(),Constants.ZERO) && StringUtils.isEmpty(carousel.getContnet()))
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
@@ -188,12 +188,14 @@
.eq(pageWrap.getModel().getId() != null, Carousel::getId, pageWrap.getModel().getId())
.eq(pageWrap.getModel().getRemark() != null, Carousel::getRemark, pageWrap.getModel().getRemark())
.like(pageWrap.getModel().getTitle() != null, Carousel::getTitle, pageWrap.getModel().getTitle())
- .like(pageWrap.getModel().getDescribe() != null, Carousel::getDescribe, pageWrap.getModel().getDescribe())
+ .like(pageWrap.getModel().getDetail() != null, Carousel::getDetail, pageWrap.getModel().getDetail())
.eq(pageWrap.getModel().getType() != null, Carousel::getType, pageWrap.getModel().getType())
.eq(pageWrap.getModel().getJumpType() != null, Carousel::getJumpType, pageWrap.getModel().getJumpType())
- .eq(pageWrap.getModel().getContnet() != null, Carousel::getContnet, pageWrap.getModel().getContnet())
+ .like(pageWrap.getModel().getContent() != null, Carousel::getContent, pageWrap.getModel().getContent())
.eq(pageWrap.getModel().getSortnum() != null, Carousel::getSortnum, pageWrap.getModel().getSortnum())
.eq(pageWrap.getModel().getStatus() != null, Carousel::getStatus, pageWrap.getModel().getStatus())
+ .orderByDesc(Carousel::getSortnum)
+
;
for(PageWrap.SortData sortData: pageWrap.getSorts()) {
if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) {
@@ -222,12 +224,20 @@
public FootDataVO getFoodDataVO(){
FootDataVO footDataVO = new FootDataVO();
footDataVO.setFootWords(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_WORDS).getCode());
- footDataVO.setFootImgUrl(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode() + systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_IMGURL).getCode());
+ footDataVO.setFootImgUrl(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_IMGURL).getCode());
+ footDataVO.setFootFullImgUrl(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode() +
+ systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FOOT_IMGURL).getCode());
footDataVO.setAddress(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.ADDRESS).getCode());
- footDataVO.setLinkMobile(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.LINK_PHONE).getCode());
+ footDataVO.setLinkPhone(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.LINK_PHONE).getCode());
footDataVO.setLinkMobile(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.LINK_MOBILE).getCode());
- footDataVO.setSolveScheme(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SOLVE_SCHEME).getCode());
- footDataVO.setWisdomSystem(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.WISDOM_SYSTEM).getCode());
+ SystemDictData solveScheme = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SOLVE_SCHEME);
+ if(Objects.nonNull(solveScheme) & org.apache.commons.lang3.StringUtils.isNotBlank(solveScheme.getCode())){
+ footDataVO.setSolveScheme(JSONArray.parseArray(solveScheme.getCode()));
+ }
+ SystemDictData wisdomSystem = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.WISDOM_SYSTEM);
+ if(Objects.nonNull(wisdomSystem) & org.apache.commons.lang3.StringUtils.isNotBlank(wisdomSystem.getCode())){
+ footDataVO.setWisdomSystem(JSONArray.parseArray(wisdomSystem.getCode()));
+ }
footDataVO.setServerTime(systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.SERVER_TIME).getCode());
return footDataVO;
}
@@ -275,14 +285,14 @@
}
SystemDictData solveScheme = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.SOLVE_SCHEME);
- if (Objects.nonNull(solveScheme)) {
- solveScheme.setCode(footDataDTO.getSolveScheme());
+ if (Objects.nonNull(solveScheme)&&Objects.nonNull(footDataDTO.getSolveScheme())) {
+ solveScheme.setCode(footDataDTO.getSolveScheme().toString());
systemDictDataBiz.updateById(solveScheme);
}
SystemDictData wisdomSystem = systemDictDataBiz.queryByCode(Constants.SYSTEM, Constants.WISDOM_SYSTEM);
- if (Objects.nonNull(wisdomSystem)) {
- wisdomSystem.setCode(footDataDTO.getWisdomSystem());
+ if (Objects.nonNull(wisdomSystem)&&Objects.nonNull(footDataDTO.getWisdomSystem())) {
+ wisdomSystem.setCode(footDataDTO.getWisdomSystem().toString());
systemDictDataBiz.updateById(wisdomSystem);
}
}
diff --git a/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java b/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java
index 225d9f6..2a36d54 100644
--- a/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java
+++ b/server/src/main/java/com/doumee/service/business/impl/InformationServiceImpl.java
@@ -44,12 +44,12 @@
public Integer create(Information information) {
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(Objects.isNull(information)
- || Objects.isNull(information.getSortnum())
- || Objects.isNull(information.getReleaseDate())
+// || Objects.isNull(information.getSortnum())
+// || Objects.isNull(information.getReleaseDate())
|| StringUtils.isEmpty(information.getTitle())
- || StringUtils.isEmpty(information.getContnet())
- || StringUtils.isEmpty(information.getDescribe())
- || StringUtils.isEmpty(information.getImgurl())
+// || StringUtils.isEmpty(information.getContent())
+// || StringUtils.isEmpty(information.getDetail())
+// || StringUtils.isEmpty(information.getImgurl())
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
@@ -84,12 +84,12 @@
LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
if(Objects.isNull(information)
|| Objects.isNull(information.getId())
- || Objects.isNull(information.getSortnum())
- || Objects.isNull(information.getReleaseDate())
+// || Objects.isNull(information.getSortnum())
+// || Objects.isNull(information.getReleaseDate())
|| StringUtils.isEmpty(information.getTitle())
- || StringUtils.isEmpty(information.getContnet())
- || StringUtils.isEmpty(information.getDescribe())
- || StringUtils.isEmpty(information.getImgurl())
+// || StringUtils.isEmpty(information.getContent())
+// || StringUtils.isEmpty(information.getDetail())
+// || StringUtils.isEmpty(information.getImgurl())
){
throw new BusinessException(ResponseStatus.BAD_REQUEST);
}
@@ -140,9 +140,9 @@
.eq(Information::getIsdeleted,Constants.ZERO)
.eq(pageWrap.getModel().getId() != null, Information::getId, pageWrap.getModel().getId())
.eq(pageWrap.getModel().getRemark() != null, Information::getRemark, pageWrap.getModel().getRemark())
- .eq(pageWrap.getModel().getTitle() != null, Information::getTitle, pageWrap.getModel().getTitle())
- .eq(pageWrap.getModel().getDescribe() != null, Information::getDescribe, pageWrap.getModel().getDescribe())
- .eq(pageWrap.getModel().getContnet() != null, Information::getContnet, pageWrap.getModel().getContnet())
+ .like(pageWrap.getModel().getTitle() != null, Information::getTitle, pageWrap.getModel().getTitle())
+ .like(pageWrap.getModel().getDetail() != null, Information::getDetail, pageWrap.getModel().getDetail())
+ .like(pageWrap.getModel().getContent() != null, Information::getContent, pageWrap.getModel().getContent())
.ge(pageWrap.getModel().getReleaseDate() != null, Information::getReleaseDate, Utils.Date.getStart(pageWrap.getModel().getReleaseDate()))
.le(pageWrap.getModel().getReleaseDate() != null, Information::getReleaseDate, Utils.Date.getEnd(pageWrap.getModel().getReleaseDate()))
;
@@ -156,7 +156,7 @@
IPage<Information> iPage = informationMapper.selectPage(page, queryWrapper);
String fileDir = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.FILE_DIR).getCode();
for (Information information:iPage.getRecords()) {
- if(Objects.isNull(information)&& org.apache.commons.lang3.StringUtils.isNotBlank(information.getImgurl())){
+ if(!Objects.isNull(information)&& org.apache.commons.lang3.StringUtils.isNotBlank(information.getImgurl())){
information.setFullImgurl(fileDir + information.getImgurl());
}
}
@@ -168,4 +168,19 @@
QueryWrapper<Information> wrapper = new QueryWrapper<>(information);
return informationMapper.selectCount(wrapper);
}
+
+
+
+ @Override
+ public void updateStatus(Information information){
+ if(Objects.isNull(information)
+ || Objects.isNull(information.getStatus())
+ || Objects.isNull(information.getId())
+ || !(Constants.equalsInteger(information.getStatus(),Constants.ZERO)
+ || Constants.equalsInteger(information.getStatus(),Constants.ONE))
+ ){
+ throw new BusinessException(ResponseStatus.DATA_EMPTY);
+ }
+ informationMapper.update(new UpdateWrapper<Information>().lambda().set(Information::getStatus,information.getStatus()).eq(Information::getId,information.getId()));
+ }
}
--
Gitblit v1.9.3