修改查询条件
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
@@ -148,8 +148,12 @@ public class OrderMainServiceImpl implements OrderMainService {
|
||||
}
|
||||
}
|
||||
Pet pet = petRepository.findFirstById(orderSub.getPetId());
|
||||
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);
|
||||
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>";
|
||||
|
||||
Reference in New Issue
Block a user