正在显示
6 个修改的文件
包含
268 行增加
和
37 行删除
@@ -105,7 +105,12 @@ | @@ -105,7 +105,12 @@ | ||
105 | <artifactId>hutool-all</artifactId> | 105 | <artifactId>hutool-all</artifactId> |
106 | <version>4.0.12</version> | 106 | <version>4.0.12</version> |
107 | </dependency> | 107 | </dependency> |
108 | - | 108 | + <!-- excel导出--> |
109 | + <dependency> | ||
110 | + <groupId>org.apache.poi</groupId> | ||
111 | + <artifactId>poi-ooxml</artifactId> | ||
112 | + <version>4.1.0</version> | ||
113 | + </dependency> | ||
109 | <dependency> | 114 | <dependency> |
110 | <groupId>org.projectlombok</groupId> | 115 | <groupId>org.projectlombok</groupId> |
111 | <artifactId>lombok</artifactId> | 116 | <artifactId>lombok</artifactId> |
1 | package com.sunyo.wlpt.cgonms.provide.controller; | 1 | package com.sunyo.wlpt.cgonms.provide.controller; |
2 | 2 | ||
3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
4 | +import com.alibaba.fastjson.serializer.SerializerFeature; | ||
4 | import com.google.common.collect.Lists; | 5 | import com.google.common.collect.Lists; |
5 | 6 | ||
6 | import com.sunyo.wlpt.cgonms.provide.domain.*; | 7 | import com.sunyo.wlpt.cgonms.provide.domain.*; |
@@ -16,6 +17,7 @@ import lombok.extern.slf4j.Slf4j; | @@ -16,6 +17,7 @@ import lombok.extern.slf4j.Slf4j; | ||
16 | import org.springframework.beans.propertyeditors.CustomDateEditor; | 17 | import org.springframework.beans.propertyeditors.CustomDateEditor; |
17 | import org.springframework.web.bind.WebDataBinder; | 18 | import org.springframework.web.bind.WebDataBinder; |
18 | import org.springframework.web.bind.annotation.*; | 19 | import org.springframework.web.bind.annotation.*; |
20 | + | ||
19 | import java.io.IOException; | 21 | import java.io.IOException; |
20 | 22 | ||
21 | import javax.annotation.Resource; | 23 | import javax.annotation.Resource; |
@@ -96,10 +98,10 @@ public class NmsController { | @@ -96,10 +98,10 @@ public class NmsController { | ||
96 | * 2.每個可以返回給前端的消息通過websocket發送回去 | 98 | * 2.每個可以返回給前端的消息通過websocket發送回去 |
97 | */ | 99 | */ |
98 | String sid = request.getHeader("Authorization"); | 100 | String sid = request.getHeader("Authorization"); |
99 | - log.info("token的值:"+sid); | 101 | + log.info("token的值:" + sid); |
100 | final String startTime = sdf.format(new Date()); | 102 | final String startTime = sdf.format(new Date()); |
101 | System.out.println("开始时间:" + startTime); | 103 | System.out.println("开始时间:" + startTime); |
102 | - sendMsgByWebsocket("开始时间:" + startTime,sid); | 104 | + sendMsgByWebsocket("开始时间:" + startTime, sid); |
103 | System.out.println("出港数据,开始获取"); | 105 | System.out.println("出港数据,开始获取"); |
104 | ResultJson resultJson = new ResultJson(); | 106 | ResultJson resultJson = new ResultJson(); |
105 | 107 | ||
@@ -123,13 +125,18 @@ public class NmsController { | @@ -123,13 +125,18 @@ public class NmsController { | ||
123 | log.trace("获取开始{},剩余数量:{}", startTime, resultList.size()); | 125 | log.trace("获取开始{},剩余数量:{}", startTime, resultList.size()); |
124 | int i; | 126 | int i; |
125 | for (i = 0; i < THREAD_ACCOUNT; i++) { | 127 | for (i = 0; i < THREAD_ACCOUNT; i++) { |
126 | - ResultExitData result = threadJob(resultList.get(i + index), latch, threadPool); | 128 | + ResultExitData result = new ResultExitData(); |
129 | + result = threadJob(resultList.get(i + index), latch, threadPool); | ||
127 | resultList.set(i, result); | 130 | resultList.set(i, result); |
128 | - int temp=i+index; | ||
129 | - String resultJs=JSON.toJSONString(new ResultWs(sid,"获取数据,第"+temp+"条",result)); | ||
130 | - sendMsgByWebsocket(resultJs,sid); | 131 | + |
132 | + int temp = i + index; | ||
133 | + ResultWs resultWs = new ResultWs(); | ||
134 | + resultWs = new ResultWs(sid, "获取数据,第" + temp + "条", result); | ||
135 | + String resultJs = JSON.toJSONString(resultWs, SerializerFeature.DisableCircularReferenceDetect); | ||
136 | + | ||
137 | + sendMsgByWebsocket(resultJs, sid); | ||
131 | } | 138 | } |
132 | - index = index + i; | 139 | + index = index + i + 1; |
133 | //完成一次,就等待。每次减1,为0的时候往下执行 | 140 | //完成一次,就等待。每次减1,为0的时候往下执行 |
134 | latch.await(); | 141 | latch.await(); |
135 | } | 142 | } |
@@ -139,10 +146,15 @@ public class NmsController { | @@ -139,10 +146,15 @@ public class NmsController { | ||
139 | log.trace("获取开始{},剩余数量:{}", startTime, resultList.size()); | 146 | log.trace("获取开始{},剩余数量:{}", startTime, resultList.size()); |
140 | int i; | 147 | int i; |
141 | for (i = 0; i < resultList.size() - index; i++) { | 148 | for (i = 0; i < resultList.size() - index; i++) { |
142 | - ResultExitData result = threadJob(resultList.get(i + index), latch, threadPool); | ||
143 | - int temp=i+index; | ||
144 | - String resultJs=JSON.toJSONString(new ResultWs(sid,"获取数据,第"+temp+"条",result)); | ||
145 | - sendMsgByWebsocket(resultJs,sid); | 149 | + ResultExitData result = new ResultExitData(); |
150 | + result = threadJob(resultList.get(i + index), latch, threadPool); | ||
151 | + | ||
152 | + int temp = i + index; | ||
153 | + ResultWs resultWs = new ResultWs(); | ||
154 | + resultWs = new ResultWs(sid, "获取数据,第" + temp + "条", result); | ||
155 | + | ||
156 | + String resultJs = JSON.toJSONString(resultWs, SerializerFeature.DisableCircularReferenceDetect); | ||
157 | + sendMsgByWebsocket(resultJs, sid); | ||
146 | } | 158 | } |
147 | index = index + i; | 159 | index = index + i; |
148 | //完成一次,就等待。每次减1,为0的时候往下执行 | 160 | //完成一次,就等待。每次减1,为0的时候往下执行 |
@@ -155,10 +167,15 @@ public class NmsController { | @@ -155,10 +167,15 @@ public class NmsController { | ||
155 | CountDownLatch latch = new CountDownLatch(resultList.size()); | 167 | CountDownLatch latch = new CountDownLatch(resultList.size()); |
156 | log.trace("获取开始{},剩余数量:{}", startTime, resultList.size()); | 168 | log.trace("获取开始{},剩余数量:{}", startTime, resultList.size()); |
157 | for (int i = 0; i < resultList.size(); i++) { | 169 | for (int i = 0; i < resultList.size(); i++) { |
158 | - ResultExitData result = threadJob(resultList.get(i), latch, threadPool); | 170 | + ResultExitData result = new ResultExitData(); |
171 | + result = threadJob(resultList.get(i), latch, threadPool); | ||
172 | + | ||
159 | resultList.set(i, result); | 173 | resultList.set(i, result); |
160 | - String resultJs=JSON.toJSONString(new ResultWs(sid,"获取数据,第"+i+"条",result)); | ||
161 | - sendMsgByWebsocket(resultJs,sid); | 174 | + ResultWs resultWs = new ResultWs(); |
175 | + resultWs = new ResultWs(sid, "获取数据,第" + i + "条", result); | ||
176 | + String resultJs = JSON.toJSONString(resultWs, SerializerFeature.DisableCircularReferenceDetect); | ||
177 | + | ||
178 | + sendMsgByWebsocket(resultJs, sid); | ||
162 | } | 179 | } |
163 | //完成一次,就等待。等所有的全部完成,再一起返回 | 180 | //完成一次,就等待。等所有的全部完成,再一起返回 |
164 | latch.await(); | 181 | latch.await(); |
@@ -174,10 +191,13 @@ public class NmsController { | @@ -174,10 +191,13 @@ public class NmsController { | ||
174 | final String endTime = sdf.format(new Date()); | 191 | final String endTime = sdf.format(new Date()); |
175 | 192 | ||
176 | System.out.println("结束时间:" + endTime); | 193 | System.out.println("结束时间:" + endTime); |
177 | - sendMsgByWebsocket("出港信息,获取完毕,结束时间:" + endTime,sid); | 194 | + String resultJs = JSON.toJSONString(new ResultWs(sid, "获取数据,完毕", resultList)); |
195 | + sendMsgByWebsocket(resultJs, sid); | ||
196 | + sendMsgByWebsocket("出港信息,获取完毕,结束时间:" + endTime, sid); | ||
178 | 197 | ||
179 | resultJson.setCode("200"); | 198 | resultJson.setCode("200"); |
180 | resultJson.setData(resultList); | 199 | resultJson.setData(resultList); |
200 | + | ||
181 | return resultJson; | 201 | return resultJson; |
182 | } | 202 | } |
183 | 203 | ||
@@ -193,7 +213,7 @@ public class NmsController { | @@ -193,7 +213,7 @@ public class NmsController { | ||
193 | Runnable run = new Runnable() { | 213 | Runnable run = new Runnable() { |
194 | @Override | 214 | @Override |
195 | public void run() { | 215 | public void run() { |
196 | - | 216 | + try { |
197 | //设置航班 | 217 | //设置航班 |
198 | result.setSegment(result.getOriginatingStation() + " — " + result.getDestinationStation()); | 218 | result.setSegment(result.getOriginatingStation() + " — " + result.getDestinationStation()); |
199 | 219 | ||
@@ -281,16 +301,20 @@ public class NmsController { | @@ -281,16 +301,20 @@ public class NmsController { | ||
281 | // if (result.getWaybillNoMaster() != null && result.getWaybillNoMaster() != "") { } | 301 | // if (result.getWaybillNoMaster() != null && result.getWaybillNoMaster() != "") { } |
282 | ResultExitData asmInfo = new ResultExitData(); | 302 | ResultExitData asmInfo = new ResultExitData(); |
283 | asmInfo = getCgoAsmFeign.getInfo(result.getWaybillNoMaster()); | 303 | asmInfo = getCgoAsmFeign.getInfo(result.getWaybillNoMaster()); |
284 | - //设置代理人全称 | ||
285 | - result.setFullName(asmInfo.getFullName()); | ||
286 | - //设置货主类型 | ||
287 | - result.setTheShipperType(asmInfo.getTheShipperType()); | 304 | + //设置结算代理人 |
305 | + result.setCountName(asmInfo.getCountName()); | ||
306 | + //设置订舱代理人 | ||
307 | + result.setOrderName(asmInfo.getOrderName()); | ||
288 | //设置品名 | 308 | //设置品名 |
289 | result.setSdCargoName(asmInfo.getSdCargoName()); | 309 | result.setSdCargoName(asmInfo.getSdCargoName()); |
290 | //设置二级类名称 | 310 | //设置二级类名称 |
291 | result.setTwoTypeName(asmInfo.getTwoTypeName()); | 311 | result.setTwoTypeName(asmInfo.getTwoTypeName()); |
292 | //设置一级类名称 | 312 | //设置一级类名称 |
293 | result.setTypeName(asmInfo.getTypeName()); | 313 | result.setTypeName(asmInfo.getTypeName()); |
314 | + } catch (Exception e) { | ||
315 | + latch.countDown(); | ||
316 | + e.printStackTrace(); | ||
317 | + } | ||
294 | latch.countDown(); | 318 | latch.countDown(); |
295 | } | 319 | } |
296 | }; | 320 | }; |
@@ -305,9 +329,9 @@ public class NmsController { | @@ -305,9 +329,9 @@ public class NmsController { | ||
305 | binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); | 329 | binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true)); |
306 | } | 330 | } |
307 | 331 | ||
308 | - private void sendMsgByWebsocket(String msg,String sid){ | 332 | + private void sendMsgByWebsocket(String msg, String sid) { |
309 | try { | 333 | try { |
310 | - WebSocketServer.sendInfo(msg,sid); | 334 | + WebSocketServer.sendInfo(msg, sid); |
311 | } catch (IOException e) { | 335 | } catch (IOException e) { |
312 | e.printStackTrace(); | 336 | e.printStackTrace(); |
313 | 337 |
@@ -97,19 +97,29 @@ public class ResultExitData implements Serializable { | @@ -97,19 +97,29 @@ public class ResultExitData implements Serializable { | ||
97 | private String areaDescChn; | 97 | private String areaDescChn; |
98 | 98 | ||
99 | /** | 99 | /** |
100 | - * 代理人服务 | ||
101 | - * 16.代理人全称 | 100 | + * 16.订仓代理人 |
102 | */ | 101 | */ |
103 | - private String fullName; | 102 | + private String orderName; |
104 | 103 | ||
105 | /** | 104 | /** |
106 | - * 代理人服务 | ||
107 | - * 17.货主类型 | ||
108 | - * 111 = 发货代理 | ||
109 | - * 222 = 订舱代理 | ||
110 | - * 333 = 操作代理/结算代理 | 105 | + * 17.结算代理人 |
111 | */ | 106 | */ |
112 | - private String theShipperType; | 107 | + private String countName; |
108 | + | ||
109 | +// /** | ||
110 | +// * 代理人服务 | ||
111 | +// * 16.代理人全称 | ||
112 | +// */ | ||
113 | +// private String fullName; | ||
114 | +// | ||
115 | +// /** | ||
116 | +// * 代理人服务 | ||
117 | +// * 17.货主类型 | ||
118 | +// * 111 = 发货代理 | ||
119 | +// * 222 = 订舱代理 | ||
120 | +// * 333 = 操作代理/结算代理 | ||
121 | +// */ | ||
122 | +// private String theShipperType; | ||
113 | 123 | ||
114 | /** | 124 | /** |
115 | * 代理人服务 | 125 | * 代理人服务 |
@@ -179,4 +189,6 @@ public class ResultExitData implements Serializable { | @@ -179,4 +189,6 @@ public class ResultExitData implements Serializable { | ||
179 | * 28.体积 | 189 | * 28.体积 |
180 | */ | 190 | */ |
181 | private BigDecimal volumeMeasure; | 191 | private BigDecimal volumeMeasure; |
192 | + | ||
193 | + | ||
182 | } | 194 | } |
1 | +package com.sunyo.wlpt.cgonms.provide.domain; | ||
2 | + | ||
3 | +import lombok.Data; | ||
4 | + | ||
5 | +import java.io.Serializable; | ||
6 | +import java.util.List; | ||
7 | + | ||
8 | +/** | ||
9 | + * @author 子诚 | ||
10 | + * Description: | ||
11 | + * 时间:2020/5/29 11:11 | ||
12 | + */ | ||
13 | +@Data | ||
14 | +public class ResultExitDataList implements Serializable { | ||
15 | + | ||
16 | + private static final long serialVersionUID = -7991080091037744719L; | ||
17 | + | ||
18 | + private List<ResultExitData> exitInfoList; | ||
19 | + | ||
20 | + private int size=exitInfoList.size(); | ||
21 | +} |
1 | +package com.sunyo.wlpt.cgonms.provide.excle; | ||
2 | + | ||
3 | +import com.sunyo.wlpt.cgonms.provide.domain.ResultExitData; | ||
4 | +import com.sunyo.wlpt.cgonms.provide.domain.ResultExitDataList; | ||
5 | +import lombok.extern.slf4j.Slf4j; | ||
6 | +import org.apache.poi.hssf.usermodel.*; | ||
7 | +import org.springframework.web.bind.annotation.PostMapping; | ||
8 | +import org.springframework.web.bind.annotation.RequestBody; | ||
9 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
10 | +import org.springframework.web.bind.annotation.RestController; | ||
11 | + | ||
12 | +import javax.servlet.http.HttpServletResponse; | ||
13 | +import java.io.*; | ||
14 | +import java.util.List; | ||
15 | + | ||
16 | +import lombok.extern.slf4j.Slf4j; | ||
17 | +import oracle.sql.DATE; | ||
18 | +import org.springframework.beans.factory.annotation.Autowired; | ||
19 | +import org.springframework.web.bind.annotation.*; | ||
20 | + | ||
21 | +import javax.servlet.http.HttpServletResponse; | ||
22 | +import java.net.URLEncoder; | ||
23 | +import java.nio.charset.StandardCharsets; | ||
24 | +import java.util.HashMap; | ||
25 | +import java.util.List; | ||
26 | +import java.util.Map; | ||
27 | + | ||
28 | +/** | ||
29 | + * @author 子诚 | ||
30 | + * Description: | ||
31 | + * 时间:2020/5/29 10:04 | ||
32 | + */ | ||
33 | +@Slf4j | ||
34 | +@RestController | ||
35 | +@RequestMapping("/exit") | ||
36 | +public class ExitExcel { | ||
37 | + | ||
38 | + @PostMapping("/excel") | ||
39 | + public void getExit(@RequestBody List<ResultExitData> exitInfoList, HttpServletResponse httpServletResponse) { | ||
40 | + exportExcel(exitInfoList, httpServletResponse); | ||
41 | + } | ||
42 | + | ||
43 | + private void exportExcel(List<ResultExitData> exitInfoList, HttpServletResponse response) { | ||
44 | + // 创建工作簿 | ||
45 | + HSSFWorkbook workbook = new HSSFWorkbook(); | ||
46 | + // 创建表 | ||
47 | + HSSFSheet sheet = workbook.createSheet("export"); | ||
48 | + // 创建行 | ||
49 | + HSSFRow row = sheet.createRow(0); | ||
50 | + // 创建单元格样式 | ||
51 | + HSSFCellStyle cellStyle = workbook.createCellStyle(); | ||
52 | + // 表头 | ||
53 | + String[] head = { | ||
54 | + "运单号", | ||
55 | + "件数", | ||
56 | + "重量", | ||
57 | + "计费重量", | ||
58 | + "体积", | ||
59 | + "品名", | ||
60 | + "二级品类", | ||
61 | + "一级品类", | ||
62 | + "货物目的站", | ||
63 | + "货物目的国家/地区", | ||
64 | + "所属洲", | ||
65 | + "航空公司", | ||
66 | + "航班号", | ||
67 | + "航班日期", | ||
68 | + "航班时间", | ||
69 | + "航班计划日期", | ||
70 | + "航班计划时间", | ||
71 | + "航段", | ||
72 | + "机号", | ||
73 | + "机型", | ||
74 | + "最大业载", | ||
75 | + "运单发货人", | ||
76 | + "运单收货人", | ||
77 | + "订舱代理人", | ||
78 | + "结算代理人", | ||
79 | + "自定义项" | ||
80 | + }; | ||
81 | + HSSFCell cell; | ||
82 | + // 设置表头 | ||
83 | + for (int i = 0; i < head.length; i++) { | ||
84 | + cell = row.createCell(i); | ||
85 | + cell.setCellValue(head[i]); | ||
86 | + cell.setCellStyle(cellStyle); | ||
87 | + // 设置单元格宽度 | ||
88 | + sheet.setColumnWidth(i, 4000); | ||
89 | + } | ||
90 | + // 设置表格内容 | ||
91 | + for (int i = 0; i < exitInfoList.size(); i++) { | ||
92 | + row = sheet.createRow(i + 1); | ||
93 | + ResultExitData ResultExitData = exitInfoList.get(i); | ||
94 | + // 这里是内容设置,替换则自己的数据即可 | ||
95 | + String[] excelTitle = new String[40]; | ||
96 | + | ||
97 | + //取出数据,运单号 | ||
98 | + excelTitle[0] = ResultExitData.getWaybillNoMaster(); | ||
99 | + //件数 | ||
100 | + excelTitle[1] = ResultExitData.getTallyTotalPiece(); | ||
101 | + //重量 | ||
102 | + excelTitle[2] = ResultExitData.getTallyTotalWeight(); | ||
103 | + //计费重量 | ||
104 | + excelTitle[3] = String.valueOf(ResultExitData.getTotalGrossWeightMeasure()); | ||
105 | + //体积 | ||
106 | + excelTitle[4] = String.valueOf(ResultExitData.getVolumeMeasure()); | ||
107 | + //品名 | ||
108 | + excelTitle[5] = ResultExitData.getSdCargoName(); | ||
109 | + //二级品类 | ||
110 | + excelTitle[6] = ResultExitData.getTwoTypeName(); | ||
111 | + //一级品类 | ||
112 | + excelTitle[7] = ResultExitData.getTypeName(); | ||
113 | + //货物目的站 | ||
114 | + excelTitle[8] = ResultExitData.getAimStation(); | ||
115 | + //货物目的国家/地区 | ||
116 | + excelTitle[9] = ResultExitData.getCountry(); | ||
117 | + //所属洲 | ||
118 | + excelTitle[10] = ResultExitData.getAreaDescChn(); | ||
119 | + //航空公司 | ||
120 | + excelTitle[11] = ResultExitData.getAirCompany(); | ||
121 | + //航班号 | ||
122 | + excelTitle[12] = ResultExitData.getFlightNo(); | ||
123 | + //航班日期 | ||
124 | + excelTitle[13] = String.valueOf(ResultExitData.getFlightDate()); | ||
125 | + //航班时间 | ||
126 | + excelTitle[14] = String.valueOf(ResultExitData.getFlightTime()); | ||
127 | + //航班计划日期 | ||
128 | + excelTitle[15] = String.valueOf(ResultExitData.getFlightPlanDate()); | ||
129 | + //航班计划时间 | ||
130 | + excelTitle[16] = String.valueOf(ResultExitData.getFlightPlanTime()); | ||
131 | + //航段 | ||
132 | + excelTitle[17] = ResultExitData.getSegment(); | ||
133 | + //机号 | ||
134 | + excelTitle[18] = ResultExitData.getCfNo(); | ||
135 | + //机型 | ||
136 | + excelTitle[19] = ResultExitData.getCfTp(); | ||
137 | + //最大业载 | ||
138 | + excelTitle[20] = ""; | ||
139 | + //运单发货人 | ||
140 | + excelTitle[21] = ResultExitData.getShipperName(); | ||
141 | + //运单收货人 | ||
142 | + excelTitle[22] = ResultExitData.getConsigneeName(); | ||
143 | + //订舱代理人(代理人全称) | ||
144 | + excelTitle[23] = ResultExitData.getOrderName(); | ||
145 | + //结算代理人(代理人全程) | ||
146 | + excelTitle[24] = ResultExitData.getCountName(); | ||
147 | + //自定义项 | ||
148 | + excelTitle[25] = ""; | ||
149 | + | ||
150 | + for (int j = 0; j < excelTitle.length; j++) { | ||
151 | + row.createCell(j).setCellValue(excelTitle[j]); | ||
152 | + } | ||
153 | + } | ||
154 | + // 设置文件名 | ||
155 | + String title = "export.xls"; | ||
156 | + String filePath = "H:" + File.separator + title; | ||
157 | + try { | ||
158 | + FileOutputStream fos = new FileOutputStream(filePath); | ||
159 | + workbook.write(fos); | ||
160 | + fos.flush(); | ||
161 | + fos.close(); | ||
162 | + } catch (FileNotFoundException e) { | ||
163 | + e.printStackTrace(); | ||
164 | + } catch (IOException e) { | ||
165 | + e.printStackTrace(); | ||
166 | + } | ||
167 | + | ||
168 | + } | ||
169 | +} |
@@ -63,11 +63,11 @@ eureka: | @@ -63,11 +63,11 @@ eureka: | ||
63 | feign: | 63 | feign: |
64 | hystrix: | 64 | hystrix: |
65 | enabled: false | 65 | enabled: false |
66 | -# client: | ||
67 | -# config: | ||
68 | -# default: | ||
69 | -# connectTimeout: 1000000 # feign 的超时设置 | ||
70 | -# readTimeout: 1000000 | 66 | + client: |
67 | + config: | ||
68 | + default: | ||
69 | + connectTimeout: 1000000 # feign 的超时设置 | ||
70 | + readTimeout: 1000000 | ||
71 | # boot admin | 71 | # boot admin |
72 | management: | 72 | management: |
73 | endpoints: | 73 | endpoints: |
-
请 注册 或 登录 后发表评论