Merge branch 'feature/admin' into preview
commit
b4ae47cf28
|
@ -46,7 +46,7 @@ public class WorkFlowController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "设置工作流的置顶状态")
|
@ApiOperation(value = "设置工作流的置顶状态")
|
||||||
@GetMapping("/{id}/top")
|
@GetMapping("/{id}/top")
|
||||||
public AjaxResult setworkFlowTop(@PathVariable Long id, @RequestParam boolean isTop) {
|
public AjaxResult setWorkFlowTop(@PathVariable Long id, @RequestParam boolean isTop) {
|
||||||
|
|
||||||
workFlowService.setworkFlowTop(id, isTop);
|
workFlowService.setworkFlowTop(id, isTop);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
|
|
|
@ -262,8 +262,11 @@ public class SysUserController extends BaseController
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/selectUserById")
|
@GetMapping("/selectUserById")
|
||||||
public AjaxResult selectUserById(){
|
public AjaxResult selectUserById(@RequestParam Long id){
|
||||||
SysUser sysUser = userService.selectUserInfoById(SecurityUtils.getUserId());
|
if (id == null){
|
||||||
|
id = SecurityUtils.getUserId();
|
||||||
|
}
|
||||||
|
SysUser sysUser = userService.selectUserInfoById(id);
|
||||||
return success(sysUser);
|
return success(sysUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,4 +169,11 @@ public class WorkFlow {
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<String> typeList;
|
private List<String> typeList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否关注 0关注 1未关注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否关注 0关注 1未关注")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Integer isAttention;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@ import com.mcwl.common.core.page.TableDataInfo;
|
||||||
import com.mcwl.common.utils.SecurityUtils;
|
import com.mcwl.common.utils.SecurityUtils;
|
||||||
import com.mcwl.common.utils.StringUtils;
|
import com.mcwl.common.utils.StringUtils;
|
||||||
import com.mcwl.common.utils.baidu.BaiduCensor;
|
import com.mcwl.common.utils.baidu.BaiduCensor;
|
||||||
|
import com.mcwl.resource.domain.SysUserAttention;
|
||||||
import com.mcwl.resource.domain.WorkFlow;
|
import com.mcwl.resource.domain.WorkFlow;
|
||||||
import com.mcwl.resource.domain.WorkFlowVersion;
|
import com.mcwl.resource.domain.WorkFlowVersion;
|
||||||
import com.mcwl.resource.domain.dto.AddRequestWorkFlow;
|
import com.mcwl.resource.domain.dto.AddRequestWorkFlow;
|
||||||
|
@ -24,6 +25,7 @@ import com.mcwl.resource.domain.dto.ModelImagePageRes;
|
||||||
import com.mcwl.resource.domain.request.RequestWorkFlow;
|
import com.mcwl.resource.domain.request.RequestWorkFlow;
|
||||||
import com.mcwl.resource.domain.vo.PageVo;
|
import com.mcwl.resource.domain.vo.PageVo;
|
||||||
import com.mcwl.resource.domain.vo.WorkFlowVo;
|
import com.mcwl.resource.domain.vo.WorkFlowVo;
|
||||||
|
import com.mcwl.resource.mapper.SysUserAttentionMapper;
|
||||||
import com.mcwl.resource.mapper.WorkFlowMapper;
|
import com.mcwl.resource.mapper.WorkFlowMapper;
|
||||||
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
|
||||||
import com.mcwl.resource.service.ToActivityService;
|
import com.mcwl.resource.service.ToActivityService;
|
||||||
|
@ -61,6 +63,9 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
@Autowired
|
@Autowired
|
||||||
private ToActivityService toActivityService;
|
private ToActivityService toActivityService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private SysUserAttentionMapper sysUserAttentionMapper;
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService sysUserService;
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
|
@ -383,7 +388,11 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
|
||||||
}
|
}
|
||||||
workFlow.setTypeList(strings);
|
workFlow.setTypeList(strings);
|
||||||
}
|
}
|
||||||
|
workFlow.setIsAttention(0);
|
||||||
|
SysUserAttention sysUserAttention = sysUserAttentionMapper.selectAttention(SecurityUtils.getUserId(), workFlow.getUserId());
|
||||||
|
if (sysUserAttention == null){
|
||||||
|
workFlow.setIsAttention(1);
|
||||||
|
}
|
||||||
return AjaxResult.success(workFlow);
|
return AjaxResult.success(workFlow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue