This commit is contained in:
zhaokaiyao@91isoft.com
2021-12-15 17:50:25 +08:00
parent 0fafe93d39
commit f00f5b9021
3 changed files with 10 additions and 6 deletions
@@ -58,7 +58,7 @@ public class FileMaterialController extends BaseController<FileMaterial> {
@DeleteMapping
@ApiOperation("删除文件资料组")
public ResponseMessage deleteMaterial(String id){
List<String> idList = Arrays.asList(id.split(id));
List<String> idList = Arrays.asList(id.split(","));
boolean b = iFileMaterialService.removeByIds(idList);
return Result.success(b);
@@ -6,6 +6,7 @@ import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.Tag;
@@ -58,4 +59,8 @@ public class FileMaterial extends BaseEntity {
@ApiModelProperty(value = "置顶")
@TableField("is_top")
private Integer isTop;
@ApiModelProperty(value = "删除标志")
@TableLogic(value = "0",delval = "1")
private String delFlag;
}
@@ -36,7 +36,7 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
if (queryPage.getDataType()!=null){
queryWrapper.eq("data_type",queryPage.getDataTitle());
queryWrapper.eq("data_type",queryPage.getDataType());
}
if (queryPage.getDataTitle()!=null){
@@ -48,9 +48,8 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
String strDateFormat = "yyyy-MM-dd HH:mm:ss";
SimpleDateFormat sdf = new SimpleDateFormat(strDateFormat);
queryWrapper.between("data_upload_time",
sdf.format(queryPage.getStartDataUploadTime()),
sdf.format(queryPage.getEndDataUploadTime()));
queryWrapper.between("data_upload_time", queryPage.getStartDataUploadTime(),
queryPage.getEndDataUploadTime());
}
return this.page(new Page<>(queryPage.getPage(),queryPage.getPageSize()),queryWrapper);
@@ -60,7 +59,7 @@ public class FileMaterialServiceImpl extends ServiceImpl<FileMaterialDao, FileMa
public List<String> getFileMaterialType() {
QueryWrapper<FileMaterial> queryWrapper = new QueryWrapper<>();
queryWrapper.select("data_type");
queryWrapper.select("DISTINCT data_type");
return this.listObjs(queryWrapper, item -> item.toString());
}