Browse Source

异步调用使用Bug修复

Signed-off-by: anderx <312518615@qq.com>
anderx 6 years ago
parent
commit
d2b8b7bd75

+ 3 - 1
src/main/java/com/goafanti/order/service/impl/OrderNewServiceImpl.java

@@ -24,6 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.core.task.TaskExecutor;
 import org.springframework.scheduling.annotation.Async;
+import org.springframework.scheduling.annotation.EnableAsync;
 import org.springframework.stereotype.Service;
 
 import com.alibaba.fastjson.JSON;
@@ -90,6 +91,7 @@ import com.goafanti.order.service.OrderService;
 import com.goafanti.organization.bo.OrganizationListOut;
 
 @Service
+@EnableAsync
 public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> implements OrderNewService {
 	@Autowired
 	private TOrderNewMapper	tOrderNewMapper;
@@ -948,7 +950,7 @@ public class OrderNewServiceImpl extends BaseMybatisDao<TOrderNewMapper> impleme
 		}
 		if(!nlist.isEmpty())noticeMapper.insertBatch(nlist);
 		if(StringUtils.isNotBlank(adminIds)) {
-			adminIds.substring(0, adminIds.length()-1);
+			adminIds=adminIds.substring(0, adminIds.length()-1);
 			EmailBo bo = new EmailBo(NoticeStatus.getValueByCode(type), adminIds, a.getDepartmentName(), a.getName(), "请登录查看");
 				try {
 					//使用专利邮件模板

+ 0 - 1
src/main/resources/spring/spring-task.xml

@@ -15,5 +15,4 @@
 	<task:executor id="executor" pool-size="5" />  
     <task:scheduler id="scheduler" pool-size="10" />  
     <task:annotation-driven executor="executor" scheduler="scheduler" />
-    
 </beans>