修改查询条件

This commit is contained in:
yan.y 2025-05-24 21:20:07 +08:00
parent 7032513f7f
commit 8b12ac44ee
3 changed files with 7 additions and 3 deletions

View File

@ -20,7 +20,6 @@ import java.util.*;
@Data
@Entity
@Table(name="pets")
@Where(clause = StatusUtil.NOT_DELETE)
@EntityListeners(AuditingEntityListener.class)
public class Pet implements Serializable {
// 主键ID

View File

@ -16,4 +16,5 @@ public interface PetRepository extends BaseRepository<Pet, Long>, JpaSpecificati
List<Pet> findAllByUid(long uid);
Pet findFirstById(Long id);
Pet findFirstByIdAndStatusIn(Long id, List<Byte> statusList);
}

View File

@ -148,8 +148,12 @@ public class OrderMainServiceImpl implements OrderMainService {
}
}
Pet pet = petRepository.findFirstById(orderSub.getPetId());
try {
String petInfo = "宠物名称:" + pet.getNickName() + "</br>品种:" + InitLoadDataService.PET_BASE_INFO_MAP.get(pet.getPetId()).getAssortment() + "</br>体重:" + (InitLoadDataService.PET_BASE_INFO_MAP.get(pet.getPetId()).getPetType() == 1 ? DictUtil.petCatWeight(Byte.valueOf(pet.getWeight().toString())) : DictUtil.petDogWeight(Byte.valueOf(pet.getWeight().toString()))) + "</br>服务项目:" + orderSub.getGoods();
orderSub.setPetInfo(petInfo);
} catch (Exception e) {
e.printStackTrace();
}
String str = "";
if (orderSubs.size() > 1) {
str = "<br><br>";