修改tool
This commit is contained in:
parent
fda7574e46
commit
e6b194859f
|
@ -83,5 +83,7 @@ public class Tool implements Serializable {
|
|||
|
||||
@TableField(exist = false)
|
||||
private static final long serialVersionUID = 1L;
|
||||
@TableField(exist = false)
|
||||
private String checked;
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import org.springframework.cloud.client.SpringCloudApplication;
|
|||
@SpringCloudApplication
|
||||
public class VoRdmApplication {
|
||||
public static void main(String[] args) {
|
||||
BladeApplication.run(CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
|
||||
BladeApplication.run("yyhouc-"+CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
|
||||
// BladeApplication.run("zqq-" + CommonConstant.KN_VORDM_MODULE_NAME, VoRdmApplication.class, args);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -249,10 +249,7 @@ public class DisasterInfoController {
|
|||
return R.data(callForHelp);
|
||||
}
|
||||
@PostMapping("review")
|
||||
public R<Boolean> review( String id){
|
||||
DisasterInfo disasterInfo = new DisasterInfo();
|
||||
disasterInfo.setId(Long.valueOf(id));
|
||||
disasterInfo.setRespondStatus(2);
|
||||
public R<Boolean> review( @RequestBody DisasterInfo disasterInfo){
|
||||
Boolean flag=disasterInfoService.updateById(disasterInfo);
|
||||
return R.data(flag);
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import io.swagger.annotations.ApiImplicitParams;
|
|||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springblade.core.mp.support.Condition;
|
||||
import org.springblade.core.tool.api.R;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
@ -18,6 +19,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
import com.kening.vordm.entity.Tool;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
@RestController
|
||||
@AllArgsConstructor
|
||||
|
@ -32,7 +34,18 @@ public class ToolController{
|
|||
})
|
||||
@GetMapping("/list")
|
||||
public R<IPage<Tool>> list(Tool tool, Query query) {
|
||||
IPage<Tool> pages = toolService.page(Condition.getPage(query), Condition.getQueryWrapper(tool));
|
||||
QueryWrapper<Tool> queryWrapper = new QueryWrapper<>();
|
||||
if(!StringUtils.isEmpty(tool.getToolName())){
|
||||
queryWrapper.like("tool_name", tool.getToolName());
|
||||
}
|
||||
String checkd = tool.getChecked();
|
||||
if(checkd != null && checkd.equals("1")){
|
||||
queryWrapper.isNull("review_time");
|
||||
}else{
|
||||
queryWrapper.isNotNull("review_time");
|
||||
}
|
||||
queryWrapper.orderByDesc("create_time");
|
||||
IPage<Tool> pages = toolService.page(Condition.getPage(query),queryWrapper);
|
||||
return R.data(pages);
|
||||
}
|
||||
@ApiOperationSupport(order = 2)
|
||||
|
@ -67,5 +80,12 @@ public class ToolController{
|
|||
public R submit(@ApiParam(value = "Tool对象", required = true) @RequestBody Tool tool) {
|
||||
return R.status(toolService.saveOrUpdate(tool));
|
||||
}
|
||||
@ApiOperationSupport(order = 7 )
|
||||
@ApiOperation(value = "审核", notes = "传入Tool")
|
||||
@PostMapping("/review")
|
||||
public R review (@ApiParam(value = "Tool对象", required = true) @RequestBody Tool tool) {
|
||||
tool.setReviewTime(new Date());
|
||||
return R.status(toolService.saveOrUpdate(tool));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -137,21 +137,11 @@
|
|||
guest_info u on u.id = ud.sponsor_id JOIN
|
||||
disaster_info d on d.id = ud.disaster_id
|
||||
<where>
|
||||
d.respond_status = #{callForHelpVo.respondStatus}
|
||||
<if test="callForHelpVo.disasterType != null and callForHelpVo.disasterType != ''">
|
||||
d.disaster_type = #{callForHelpVo.disasterType}
|
||||
<if test="callForHelpVo.respondStatus == 0 or callForHelpVo.respondStatus == '0'" >
|
||||
d.respond_status = 1 or d.respond_status = 0
|
||||
</if>
|
||||
<if test="callForHelpVo.disasterCountry != null and callForHelpVo.disasterCountry != ''">
|
||||
and d.disaster_country = #{callForHelpVo.disasterCountry}
|
||||
</if>
|
||||
<if test="callForHelpVo.disasterTime != null and callForHelpVo.disasterTime != ''">
|
||||
and d.disaster_time = #{callForHelpVo.disasterTime}
|
||||
</if>
|
||||
<if test="callForHelpVo.disasterKeyword != null and callForHelpVo.disasterKeyword != ''">
|
||||
and d.disaster_keyword = #{callForHelpVo.disasterKeyword}
|
||||
</if>
|
||||
<if test="callForHelpVo.uploadTime != null and callForHelpVo.uploadTime != ''">
|
||||
and d.upload_time = #{callForHelpVo.uploadTime}
|
||||
<if test="callForHelpVo.respondStatus != 0 and callForHelpVo.respondStatus != '0'" >
|
||||
d.respond_status = 2
|
||||
</if>
|
||||
</where>
|
||||
order by d.upload_time desc
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.kening.vordm.mapper.DisasterInfoVoMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="com.kening.vordm.vo.DisasterInfoVo">
|
||||
<result property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="disasterType" column="disaster_type" jdbcType="VARCHAR"/>
|
||||
<result property="disasterKeyword" column="disaster_keyword" jdbcType="VARCHAR"/>
|
||||
<result property="disasterTime" column="disaster_time" jdbcType="DATE"/>
|
||||
<result property="uploadTime" column="upload_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="geometry" column="geometry" jdbcType="VARCHAR"/>
|
||||
<result property="disasterLevel" column="disaster_level" jdbcType="VARCHAR"/>
|
||||
<result property="disasterCountry" column="disaster_country" jdbcType="VARCHAR"/>
|
||||
<result property="respondStatus" column="respond_status" jdbcType="SMALLINT"/>
|
||||
<result property="visitCount" column="visit_count" jdbcType="INTEGER"/>
|
||||
<result property="downloadCount" column="download_count" jdbcType="INTEGER"/>
|
||||
<result property="spiderType" column="spider_type" jdbcType="INTEGER"/>
|
||||
<result property="tempendTime" column="tempend_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="tempStartTime" column="temp_start_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="vordmId" column="vordm_id" jdbcType="VARCHAR"/>
|
||||
<result property="respondTime" column="respond_time" jdbcType="TIMESTAMP"/>
|
||||
<result property="sponsorOrganization" column="sponsor_organization" jdbcType="VARCHAR"/>
|
||||
<result property="disasterImg" column="disaster_img" jdbcType="VARCHAR"/>
|
||||
<result property="dictValue" column="dict_value" jdbcType="VARCHAR"/>
|
||||
<result property="size" column="size" jdbcType="DECIMAL"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,disaster_type,disaster_keyword,
|
||||
disaster_time,upload_time,geometry,
|
||||
disaster_level,disaster_country,respond_status,
|
||||
visit_count,download_count,spider_type,
|
||||
tempend_time,temp_start_time,create_time,
|
||||
vordm_id,respond_time,sponsor_organization,
|
||||
disaster_img,dict_value,size
|
||||
</sql>
|
||||
</mapper>
|
Loading…
Reference in New Issue