控制平台导入权限问题解决
This commit is contained in:
parent
599a64a9f6
commit
1c11e6d23e
@ -27,4 +27,6 @@ public interface ShopSyncImportService{
|
||||
|
||||
// 导入商品Excel数据
|
||||
void importShopsData(MultipartFile file,String storeId);
|
||||
|
||||
boolean checkIsPlate();
|
||||
}
|
||||
|
||||
@ -165,9 +165,6 @@ public class ShopSyncImportServiceImpl implements ShopSyncImportService {
|
||||
@Override
|
||||
@Async
|
||||
public void importShopsData(MultipartFile file,String storeId) {
|
||||
if(!checkIsPlate()){
|
||||
throw new ApiException("用户无权限");
|
||||
}
|
||||
String fileName = storeUploadedFile(file);
|
||||
readAndImportShopsExcelData(fileName,storeId);
|
||||
}
|
||||
@ -260,7 +257,7 @@ public class ShopSyncImportServiceImpl implements ShopSyncImportService {
|
||||
* 判断是否平台
|
||||
* @return
|
||||
*/
|
||||
private boolean checkIsPlate(){
|
||||
public boolean checkIsPlate(){
|
||||
UserDto userDto= ContextUtil.getCurrentUser();
|
||||
assert userDto != null;
|
||||
return 9 == userDto.getRole_id();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user