|
|
@ -45,6 +45,7 @@ import com.epmet.service.IcCommunitySelfOrganizationService; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.io.FilenameUtils; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
import org.springframework.web.multipart.MultipartFile; |
|
|
|
|
|
|
@ -139,6 +140,8 @@ public class IcCommunitySelfOrganizationController { |
|
|
|
* @date 2021/11/25 9:03 上午 |
|
|
|
*/ |
|
|
|
@PostMapping("importcommunityselforganization") |
|
|
|
//service方法是异步的,需要事务注解加在被调用方 否则事务不起作用
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public Result importCommunitySelfOrganization(@LoginUser TokenDto tokenDto, HttpServletResponse response, @RequestPart("file") MultipartFile file) throws Exception { |
|
|
|
if (file.isEmpty()) { |
|
|
|
throw new RenException("请上传文件"); |
|
|
|