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