Merge branch 'yyhouc'
# Conflicts: # kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/DisasterInfoController.java
This commit is contained in:
commit
4d0aeb8bc6
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -325,10 +325,7 @@ public class DisasterInfoController {
|
|||
|
||||
|
||||
@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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -149,21 +149,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
|
||||
|
|
Loading…
Reference in New Issue