Compare commits
No commits in common. "2d071844358689d9a637cc3396b9d0e2b6a9eb23" and "e59dbd413d3df556ff19fe7592997bc09f83b944" have entirely different histories.
2d07184435
...
e59dbd413d
|
@ -787,25 +787,13 @@ public class TAbilityApplicationController {
|
|||
@ApiImplicitParam(name = Constant.LIMIT, value = "每页显示记录数", paramType = "query", required = true, dataType = "int"),
|
||||
@ApiImplicitParam(name = Constant.ORDER_FIELD, value = "排序字段", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = Constant.ORDER, value = "排序方式,可选值(asc、desc)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "oneEnded", value = "是否完成(true, false)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "score", value = "是否已评分(true, false)", paramType = "query", dataType = "String")
|
||||
@ApiImplicitParam(name = "ended", value = "是否完成(true, false)", paramType = "query", dataType = "String"),
|
||||
@ApiImplicitParam(name = "resourceId", value = "资源id", paramType = "query", dataType = "String")
|
||||
}
|
||||
)
|
||||
public Result<PageData<Map<String, Object>>> pageForScore(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
final UserDetail user = SecurityUser.getUser();
|
||||
params.put("user_id", user == null ? null : user.getId());
|
||||
public Result<PageData<TAbilityApplicationDTO>> pageForScore(@ApiIgnore @RequestParam Map<String, Object> params) {
|
||||
PageData<TAbilityApplicationDTO> page = tAbilityApplicationService.page(params);
|
||||
List<Map<String, Object>> mapList = page.getList().stream().map(index -> {
|
||||
Map<String, Object> temp = new LinkedHashMap<>();
|
||||
temp.put("applyNumber", index.getApplyNumber());
|
||||
temp.put("approveStatus", index.getApproveStatus());
|
||||
temp.put("createDate", index.getCreateDate());
|
||||
temp.put("system", index.getSystem());
|
||||
temp.put("resourceId", index.getResourceId());
|
||||
return temp;
|
||||
}).collect(Collectors.toList());
|
||||
PageData<Map<String, Object>> pageData = new PageData<>(mapList, page.getTotal());
|
||||
return new Result<PageData<Map<String, Object>>>().ok(pageData);
|
||||
return new Result<PageData<TAbilityApplicationDTO>>().ok(page);
|
||||
}
|
||||
|
||||
}
|
|
@ -56,7 +56,7 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
|||
case "apply_flag":
|
||||
wrapper.eq(params.get("apply_flag") != null, "apply_flag", params.get("apply_flag").toString());
|
||||
break;
|
||||
case "ended": // 过滤申请单申请状态
|
||||
case "ended":
|
||||
boolean ended = Boolean.valueOf(params.get("ended").toString());
|
||||
if (ended) {
|
||||
wrapper.notExists("SELECT 1 FROM t_ability_application t1 WHERE t1.apply_flag = t_ability_application.apply_flag AND approve_status = '审核中'");
|
||||
|
@ -72,23 +72,6 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
|
|||
.or()
|
||||
.gt("expire_date", DateUtils.format(new Date(), DateUtils.DATE_TIME_PATTERN)));
|
||||
break;
|
||||
case "oneEnded": // 过滤单一申请状态
|
||||
boolean oneEnded = Boolean.valueOf(params.get("oneEnded").toString());
|
||||
if (oneEnded) {
|
||||
wrapper.ne("approve_status", "审核中");
|
||||
} else {
|
||||
wrapper.eq("approve_status", "审核中");
|
||||
}
|
||||
break;
|
||||
case "score":
|
||||
boolean score = Boolean.valueOf(params.get("score").toString());
|
||||
String sql = "SELECT 1 FROM tb_resource_score t1 WHERE t1.user_id = t_ability_application.user_id AND t1.resource_id = t_ability_application.resource_id";
|
||||
if (score) {
|
||||
wrapper.exists(sql);
|
||||
} else {
|
||||
wrapper.notExists(sql);
|
||||
}
|
||||
break;
|
||||
}
|
||||
});
|
||||
if (params.containsKey("abilityprocess_v2")) {
|
||||
|
|
Loading…
Reference in New Issue