Commit a795255d by manxiaoqiang

app排序

parent cb5ef8cf
......@@ -30,7 +30,7 @@ public interface ContractRepository extends JpaRepository<Contract, Long> {
@Query(value="SELECT * from contract where platform = ?1 and email = ?2",nativeQuery=true)
List<Contract> findByPlatformAndEmail(String platform, String email);
@Query(value="SELECT * from contract where start_date = ?1",nativeQuery=true)
@Query(value="SELECT * from contract where start_date = ?1 and status <> 'cancel'",nativeQuery=true)
List<Contract> findByStartDate(String startDate);
@Query(value="SELECT * from contract where end_date <= ?1 and (status <> 'end' or status <> 'cancel')",nativeQuery=true)
......
......@@ -48,10 +48,10 @@ public class ContractSendEmailThread
User user = userRepository.findOne(this.contract.getSale());
List<String> list = new ArrayList<>();
list.add(user.getEmail());
if(!user.getRoleType().equals(RoleTypeEnum.MANAGER)){
if(!user.getRoleType().equals(RoleTypeEnum.MANAGER.getKey())){
List<User> userList = userRepository.findOneDepartment(user.getRole());
for(User u : userList){
if (u.getRoleType().equals(RoleTypeEnum.MANAGER)){
if (u.getRoleType().equals(RoleTypeEnum.MANAGER.getKey())){
list.add(u.getEmail());
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment