Merge branch 'feature/admin' into preview

master
Diyu0904 2025-02-13 10:38:49 +08:00
commit b4ae47cf28
4 changed files with 23 additions and 4 deletions

View File

@ -46,7 +46,7 @@ public class WorkFlowController extends BaseController {
*/
@ApiOperation(value = "设置工作流的置顶状态")
@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);
return AjaxResult.success();

View File

@ -262,8 +262,11 @@ public class SysUserController extends BaseController
* @return
*/
@GetMapping("/selectUserById")
public AjaxResult selectUserById(){
SysUser sysUser = userService.selectUserInfoById(SecurityUtils.getUserId());
public AjaxResult selectUserById(@RequestParam Long id){
if (id == null){
id = SecurityUtils.getUserId();
}
SysUser sysUser = userService.selectUserInfoById(id);
return success(sysUser);
}

View File

@ -169,4 +169,11 @@ public class WorkFlow {
@TableField(exist = false)
private List<String> typeList;
/**
* 0 1
*/
@ApiModelProperty(value = "是否关注 0关注 1未关注")
@TableField(exist = false)
private Integer isAttention;
}

View File

@ -17,6 +17,7 @@ import com.mcwl.common.core.page.TableDataInfo;
import com.mcwl.common.utils.SecurityUtils;
import com.mcwl.common.utils.StringUtils;
import com.mcwl.common.utils.baidu.BaiduCensor;
import com.mcwl.resource.domain.SysUserAttention;
import com.mcwl.resource.domain.WorkFlow;
import com.mcwl.resource.domain.WorkFlowVersion;
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.vo.PageVo;
import com.mcwl.resource.domain.vo.WorkFlowVo;
import com.mcwl.resource.mapper.SysUserAttentionMapper;
import com.mcwl.resource.mapper.WorkFlowMapper;
import com.mcwl.resource.mapper.WorkFlowVersionMapper;
import com.mcwl.resource.service.ToActivityService;
@ -61,6 +63,9 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
@Autowired
private ToActivityService toActivityService;
@Autowired
private SysUserAttentionMapper sysUserAttentionMapper;
@Autowired
private ISysUserService sysUserService;
@ -383,7 +388,11 @@ public class WorkFlowServiceImpl extends ServiceImpl<WorkFlowMapper, WorkFlow> i
}
workFlow.setTypeList(strings);
}
workFlow.setIsAttention(0);
SysUserAttention sysUserAttention = sysUserAttentionMapper.selectAttention(SecurityUtils.getUserId(), workFlow.getUserId());
if (sysUserAttention == null){
workFlow.setIsAttention(1);
}
return AjaxResult.success(workFlow);
}