提交 1bd13611 authored 作者: yucaiwei's avatar yucaiwei

--no commit message

上级 e6b2b777
package com.zrqx.sysuser.bg.controller.bulletin;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.Arrays;
import java.util.Date;
......@@ -11,6 +14,8 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tk.mybatis.mapper.entity.Example;
import com.zrqx.core.constant.sysuser.SysUserRequestPath;
import com.zrqx.core.enums.ResponseCodeEnum;
import com.zrqx.core.exception.BusinessValidateException;
......@@ -18,17 +23,15 @@ import com.zrqx.core.exception.ParameterValidateException;
import com.zrqx.core.form.sysuser.bg.bulletin.BulletinContentStatusForm;
import com.zrqx.core.form.sysuser.bg.bulletin.QueryBulletinContentForm;
import com.zrqx.core.form.sysuser.bg.bulletin.UpdateBulletinContentForm;
import com.zrqx.core.model.sysuser.bulletin.BulletinColumn;
import com.zrqx.core.model.sysuser.bulletin.BulletinContent;
import com.zrqx.core.util.page.PageInfo;
import com.zrqx.core.util.page.PageParam;
import com.zrqx.core.util.response.CallBack;
import com.zrqx.core.vo.sysuser.bg.bulletin.BulletinContentVO;
import com.zrqx.sysuser.bg.service.bulletin.BulletinColumnService;
import com.zrqx.sysuser.bg.service.bulletin.BulletinContentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import tk.mybatis.mapper.entity.Example;
/**
* 公告内容 Controller
*/
......@@ -38,6 +41,8 @@ import tk.mybatis.mapper.entity.Example;
public class BulletinContentController {
@Autowired
private BulletinContentService service;
@Autowired
private BulletinColumnService bulletinColumnService;
@ApiOperation(value = "新增", notes = "新增一个")
@PostMapping(value = SysUserRequestPath.SAVE)
......@@ -101,7 +106,12 @@ public class BulletinContentController {
@ApiOperation(value = "查询", notes = "根据ID查询")
@GetMapping(value = SysUserRequestPath.OID)
public CallBack<BulletinContent> getById(@PathVariable Integer oid) {
return CallBack.success(service.selectByPrimaryKey(oid));
BulletinContent bulletinContent = service.selectByPrimaryKey(oid);
BulletinColumn bc = bulletinColumnService.selectByPrimaryKey(bulletinContent.getColumnId());
if(bc != null){
bulletinContent.setColumnName(bc.getName());
}
return CallBack.success(bulletinContent);
}
@ApiOperation(value = "分页查询", notes = "分页查询")
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论