|
@@ -7,6 +7,8 @@ import com.jpsoft.smart.modules.common.dto.MessageResult;
|
|
|
import com.jpsoft.smart.modules.common.dto.Sort;
|
|
|
import com.jpsoft.smart.modules.common.utils.PojoUtils;
|
|
|
import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
@@ -27,7 +29,11 @@ public class MessageNoticeApiController {
|
|
|
|
|
|
@ApiOperation(value="获取信息")
|
|
|
@RequestMapping(value = "detail",method = RequestMethod.POST)
|
|
|
- public MessageResult<MessageNotice> detail(@PathVariable("id") String id,
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name="token",value = "令牌",required = true,paramType = "form"),
|
|
|
+ @ApiImplicitParam(name="id",value = "编号",paramType = "form")
|
|
|
+ })
|
|
|
+ public MessageResult<MessageNotice> detail(String id,
|
|
|
String token){
|
|
|
MessageResult<MessageNotice> msgResult = new MessageResult<>();
|
|
|
|
|
@@ -85,7 +91,7 @@ public class MessageNoticeApiController {
|
|
|
@ApiOperation(value="列表")
|
|
|
@RequestMapping(value = "pageListShort",method = RequestMethod.POST)
|
|
|
public MessageResult<Map> pageListShort(
|
|
|
- String title,String token,
|
|
|
+ String token,
|
|
|
@RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
@RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
@RequestAttribute String subject){
|
|
@@ -100,10 +106,6 @@ public class MessageNoticeApiController {
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("create_time","desc"));
|
|
|
|
|
|
- if (StringUtils.isNotEmpty(title)) {
|
|
|
- searchParams.put("title","%" + title + "%");
|
|
|
- }
|
|
|
-
|
|
|
Page<MessageNotice> page = messageNoticeService.pageSearchShort(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
|
|
|
msgResult.setResult(true);
|