新增接口

This commit is contained in:
LiuY 2023-10-11 09:57:32 +08:00
parent 683ff67711
commit 45bae40260
4 changed files with 38 additions and 4 deletions

View File

@ -33,6 +33,20 @@ public class NoticeConfigAppController extends DefaultBaseController {
@Autowired
private INoticeConfigService noticeConfigService;
@ApiOperation(value = "菜单显示的栏目配置列表", notes = "菜单显示的栏目配置列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
})
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
@GetMapping("listswitchview")
public List<NoticeConfigDTO> listSwitchView(@RequestHeader("token") String token) {
Map<String, Object> params = requestParams();
return noticeConfigService.listSwitchView(params);
}
@ApiOperation(value = "新增通知公告配置", notes = "新增通知公告配置接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header")
@ -92,6 +106,7 @@ public class NoticeConfigAppController extends DefaultBaseController {
return noticeConfigService.list(params);
}
@ApiOperation(value = "通知公告配置分页列表", notes = "通知公告配置分页列表接口")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", paramType = "header"),
@ -117,4 +132,4 @@ public class NoticeConfigAppController extends DefaultBaseController {
return new SuccessResultData<>(noticeConfigService.count(params));
}
}
}

View File

@ -19,6 +19,14 @@ import java.util.Map;
**/
public interface INoticeConfigService {
/**
* 菜单显示的新闻栏目
* @param params
* @return
*/
List<NoticeConfigDTO> listSwitchView(Map<String, Object> params);
void updateMenu(String noticeConfigId, String parentMenuId,String managerMenuId, String viewMenuId, String checkMenuId);
NoticeConfigMenuDTO getMenu(String noticeConfigId);
@ -189,4 +197,4 @@ public interface INoticeConfigService {
*/
Integer count(Map<String, Object> params);
}
}

View File

@ -45,6 +45,14 @@ public class NoticeConfigServiceImpl extends DefaultBaseService implements INoti
@Autowired
private IMenuBaseService iMenuBaseService;
public List<NoticeConfigDTO> listSwitchView(Map<String, Object> params){
params.put("configSwitch","1");
return this.list(params);
}
@Override
public void save(NoticeConfigVO noticeConfigVO) {
saveReturnId(noticeConfigVO);
@ -320,4 +328,4 @@ public class NoticeConfigServiceImpl extends DefaultBaseService implements INoti
return count == null ? 0 : count;
}
}
}

View File

@ -396,6 +396,9 @@
#{noticeConfigIds[${index}]}
</foreach>
</if>
<if test="configSwitch != null and configSwitch != ''">
AND t1.config_switch = #{configSwitch}
</if>
ORDER BY t1.config_order
</select>
@ -503,4 +506,4 @@
t1.is_delete = 0
</select>
</mapper>
</mapper>