Quellcode durchsuchen

疫情上报 信息

jz.kai vor 5 Jahren
Ursprung
Commit
4bb4c47c09

+ 3 - 3
common/src/main/java/com/jpsoft/smart/modules/base/entity/MessageNotice.java

@@ -59,9 +59,9 @@ public class MessageNotice {
 	/**
 	 *创建时间
 	 */
-    	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm")
-	@JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone ="GMT+8")
-	    @ApiModelProperty(value = "创建时间")
+    @DateTimeFormat(pattern="yyyy-MM-dd")
+	@JsonFormat(pattern = "yyyy-MM-dd",timezone ="GMT+8")
+	@ApiModelProperty(value = "创建时间")
 	private Date createTime;
 	/**
 	 *更新人

+ 1 - 1
common/src/main/resources/mapper/base/MessageNotice.xml

@@ -106,7 +106,7 @@ id_,title_,content_,sender_id,recipient_id,status_,del_flag,create_by,create_tim
 	</select>
 	<select id="searchShort" parameterType="hashmap" resultMap="MessageNoticeMap">
 		<![CDATA[
-			select id_,title_ from base_message_notice
+			select id_,title_,create_time from base_message_notice
 		]]>
 		<where>
 			and del_flag = false

+ 1 - 0
web/src/main/java/com/jpsoft/smart/modules/base/controller/PersonInfoController.java

@@ -928,6 +928,7 @@ public class PersonInfoController {
             cellTitle8.setCellValue("位置4");
             HSSFCell cellTitle9 = rowTitle.createCell(8);
             cellTitle9.setCellValue("位置5");
+            sheet.setColumnWidth(0, 3766);
 //            HSSFCell cellTitle10 = rowTitle.createCell(9);
 //            cellTitle10.setCellValue("人脸开关");
 //            HSSFCell cellTitle11 = rowTitle.createCell(10);

+ 8 - 6
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/MessageNoticeApiController.java

@@ -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);

+ 4 - 1
web/src/main/java/com/jpsoft/smart/modules/mobile/controller/MessageReportApiController.java

@@ -27,13 +27,16 @@ public class MessageReportApiController {
 
     @ApiOperation(value="添加信息")
     @RequestMapping(value = "add",method = RequestMethod.POST)
-    public MessageResult<MessageReport> add(@RequestBody MessageReport messageReport,
+    public MessageResult<MessageReport> add(String content,
                                             String token,
                                             @RequestAttribute String subject){
         MessageResult<MessageReport> msgResult = new MessageResult<>();
 
         try {
+            MessageReport messageReport = new MessageReport();
+
             messageReport.setId(UUID.randomUUID().toString());
+            messageReport.setContent(content);
             messageReport.setDelFlag(false);
             messageReport.setCreateBy(subject);
             messageReport.setCreateTime(new Date());