通过导入excel方式发货时,向redis中添加一个15天过期的key
This commit is contained in:
24
.idea/workspace.xml
generated
24
.idea/workspace.xml
generated
@ -6,10 +6,7 @@
|
|||||||
<component name="ChangeListManager">
|
<component name="ChangeListManager">
|
||||||
<list default="true" id="bdad98b9-7a5e-48f7-b79e-ed6a34d55dab" name="Default Changelist" comment="第一次提交">
|
<list default="true" id="bdad98b9-7a5e-48f7-b79e-ed6a34d55dab" name="Default Changelist" comment="第一次提交">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/code/com/wisdo/mmining/util/excel/ExcelUntils.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/code/com/wisdo/mmining/util/excel/ExcelUntils.java" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/service/impl/OrderServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/service/impl/OrderServiceImpl.java" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/api/UserApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/com/wisdo/mmining/api/UserApi.java" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/application-db.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application-db.yml" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/src/main/resources/application.yml" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/resources/application.yml" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<option name="SHOW_DIALOG" value="false" />
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
@ -654,7 +651,8 @@
|
|||||||
<workItem from="1719296864680" duration="33000" />
|
<workItem from="1719296864680" duration="33000" />
|
||||||
<workItem from="1719564748404" duration="2015000" />
|
<workItem from="1719564748404" duration="2015000" />
|
||||||
<workItem from="1719795551124" duration="6472000" />
|
<workItem from="1719795551124" duration="6472000" />
|
||||||
<workItem from="1720079374607" duration="5264000" />
|
<workItem from="1720079374607" duration="5784000" />
|
||||||
|
<workItem from="1720140599554" duration="3146000" />
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00001" summary="第一次提交">
|
<task id="LOCAL-00001" summary="第一次提交">
|
||||||
<created>1623736948713</created>
|
<created>1623736948713</created>
|
||||||
@ -788,22 +786,6 @@
|
|||||||
<MESSAGE value="测试提交" />
|
<MESSAGE value="测试提交" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="测试提交" />
|
<option name="LAST_COMMIT_MESSAGE" value="测试提交" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
|
||||||
<breakpoint-manager>
|
|
||||||
<breakpoints>
|
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
|
||||||
<url>file://$PROJECT_DIR$/src/main/java/com/wisdo/mmining/service/impl/OrderServiceImpl.java</url>
|
|
||||||
<line>397</line>
|
|
||||||
<option name="timeStamp" value="16" />
|
|
||||||
</line-breakpoint>
|
|
||||||
<line-breakpoint enabled="true" type="java-line">
|
|
||||||
<url>file://$PROJECT_DIR$/src/main/java/com/wisdo/mmining/service/impl/OrderServiceImpl.java</url>
|
|
||||||
<line>400</line>
|
|
||||||
<option name="timeStamp" value="17" />
|
|
||||||
</line-breakpoint>
|
|
||||||
</breakpoints>
|
|
||||||
</breakpoint-manager>
|
|
||||||
</component>
|
|
||||||
<component name="XSLT-Support.FileAssociations.UIState">
|
<component name="XSLT-Support.FileAssociations.UIState">
|
||||||
<expand />
|
<expand />
|
||||||
<select />
|
<select />
|
||||||
|
@ -371,7 +371,6 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, WisdOeder> implem
|
|||||||
try {
|
try {
|
||||||
List<List<Object>> list = ExcelUntils.importExcel(inputStream, file.getOriginalFilename());
|
List<List<Object>> list = ExcelUntils.importExcel(inputStream, file.getOriginalFilename());
|
||||||
inputStream.close();
|
inputStream.close();
|
||||||
System.out.println(list);
|
|
||||||
List<WisdOeder> orderList = new ArrayList<>();
|
List<WisdOeder> orderList = new ArrayList<>();
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
if (list.get(i).get(2).toString() != null && !"".equals(list.get(i).get(2).toString())) {
|
if (list.get(i).get(2).toString() != null && !"".equals(list.get(i).get(2).toString())) {
|
||||||
@ -393,6 +392,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, WisdOeder> implem
|
|||||||
}
|
}
|
||||||
Boolean flags = updateBatchById(orderList);
|
Boolean flags = updateBatchById(orderList);
|
||||||
if (flags) {
|
if (flags) {
|
||||||
|
for (WisdOeder order : orderList) {
|
||||||
|
// TODO: 向Redis中添加一个十四天后过期的key
|
||||||
|
redisService.set("{'orderNumber':" + order.getOrderNumber() + ",'status':'4'}", "{'orderNumber':" + order.getOrderNumber() + ",'status':'4'}", 1296000000);//1296000000
|
||||||
|
}
|
||||||
return new Result(ResultUtil.SUCCESS, ResultUtil.SUCCESS_MSG);
|
return new Result(ResultUtil.SUCCESS, ResultUtil.SUCCESS_MSG);
|
||||||
} else {
|
} else {
|
||||||
return new Result(ResultUtil.ERROR, "添加失败");
|
return new Result(ResultUtil.ERROR, "添加失败");
|
||||||
|
Reference in New Issue
Block a user