commit
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
+4
-5
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user