Refactor the project directory
This commit is contained in:
parent
3f3c95080a
commit
7bf3e22ee6
@ -1,4 +1,4 @@
|
|||||||
package com.example.springdemo.service;
|
package com.example.springdemo.serviceImpl;
|
||||||
|
|
||||||
import com.example.springdemo.dao.DishesRepository;
|
import com.example.springdemo.dao.DishesRepository;
|
||||||
import com.example.springdemo.dao.MerchantsPasswordRepository;
|
import com.example.springdemo.dao.MerchantsPasswordRepository;
|
||||||
@ -6,6 +6,7 @@ import com.example.springdemo.dao.MerchantsRepository;
|
|||||||
import com.example.springdemo.entities.Dishes;
|
import com.example.springdemo.entities.Dishes;
|
||||||
import com.example.springdemo.entities.Merchants;
|
import com.example.springdemo.entities.Merchants;
|
||||||
import com.example.springdemo.entities.password.MerchantsPassword;
|
import com.example.springdemo.entities.password.MerchantsPassword;
|
||||||
|
import com.example.springdemo.service.MerchantsService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
@ -1,6 +1,7 @@
|
|||||||
package com.example.springdemo.service;
|
package com.example.springdemo.serviceImpl;
|
||||||
|
|
||||||
import com.example.springdemo.entities.OrderDishes;
|
import com.example.springdemo.entities.OrderDishes;
|
||||||
|
import com.example.springdemo.service.OrderDishesService;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service
|
@Service
|
@ -1,7 +1,8 @@
|
|||||||
package com.example.springdemo.service;
|
package com.example.springdemo.serviceImpl;
|
||||||
|
|
||||||
import com.example.springdemo.dao.OrdersRepository;
|
import com.example.springdemo.dao.OrdersRepository;
|
||||||
import com.example.springdemo.entities.Orders;
|
import com.example.springdemo.entities.Orders;
|
||||||
|
import com.example.springdemo.service.OrdersService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -1,8 +1,10 @@
|
|||||||
package com.example.springdemo.service;
|
package com.example.springdemo.serviceImpl;
|
||||||
|
|
||||||
import com.example.springdemo.dao.RolesPermissionsRepository;
|
import com.example.springdemo.dao.RolesPermissionsRepository;
|
||||||
import com.example.springdemo.entities.RBAC.RolesPermissions;
|
import com.example.springdemo.entities.RBAC.RolesPermissions;
|
||||||
|
import com.example.springdemo.service.RolesPermissionsService;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.data.jpa.repository.Modifying;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
@ -21,6 +23,7 @@ public class RolesPermissionsServiceImpl implements RolesPermissionsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Modifying
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int RemovePermissionsFromRole(Long roleId, Long permissionId) {
|
public int RemovePermissionsFromRole(Long roleId, Long permissionId) {
|
||||||
int count;
|
int count;
|
||||||
@ -33,6 +36,7 @@ public class RolesPermissionsServiceImpl implements RolesPermissionsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Modifying
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public int updateRolePermissions(Long roleId, Long permissionId) {
|
public int updateRolePermissions(Long roleId, Long permissionId) {
|
||||||
int count;
|
int count;
|
@ -4,6 +4,7 @@ import com.example.springdemo.dao.UsersPasswordRepository;
|
|||||||
import com.example.springdemo.dao.UsersRepository;
|
import com.example.springdemo.dao.UsersRepository;
|
||||||
import com.example.springdemo.entities.Users;
|
import com.example.springdemo.entities.Users;
|
||||||
import com.example.springdemo.entities.password.UsersPassword;
|
import com.example.springdemo.entities.password.UsersPassword;
|
||||||
|
import com.example.springdemo.serviceImpl.UsersServiceImpl;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
@ -20,7 +21,6 @@ import org.springframework.test.annotation.Rollback;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.mockito.ArgumentMatchers.any;
|
import static org.mockito.ArgumentMatchers.any;
|
||||||
|
Loading…
Reference in New Issue
Block a user