|
@@ -11,7 +11,16 @@ public interface FamilyFortuneMapper extends BaseMapper<FamilyFortune> {
|
|
|
/**
|
|
/**
|
|
|
* 获取家庭某天的运势信息
|
|
* 获取家庭某天的运势信息
|
|
|
*/
|
|
*/
|
|
|
- @Select("SELECT * FROM family_fortune WHERE family_id = #{familyId} AND fortune_date = #{date} LIMIT 1")
|
|
|
|
|
|
|
+ @Select({
|
|
|
|
|
+ "SELECT id, family_id as familyId, date as fortuneDate, ",
|
|
|
|
|
+ "five_elements_main as dominantElement, ",
|
|
|
|
|
+ "fortune_level_text as fortuneLevelText, fortune_description as fortuneDescription, ",
|
|
|
|
|
+ "family_advice as dailyTip, focus_member_tip as weeklyTip, ",
|
|
|
|
|
+ "mood_score as moodScore, mood_emoji as moodEmoji, mood_text as moodText, ",
|
|
|
|
|
+ "created_at as createdAt, updated_at as updatedAt ",
|
|
|
|
|
+ "FROM tianpan_daily_fortune ",
|
|
|
|
|
+ "WHERE family_id = #{familyId} AND date = DATE_FORMAT(#{date}, '%Y-%m-%d') LIMIT 1"
|
|
|
|
|
+ })
|
|
|
FamilyFortune selectByFamilyAndDate(@Param("familyId") Long familyId, @Param("date") LocalDate date);
|
|
FamilyFortune selectByFamilyAndDate(@Param("familyId") Long familyId, @Param("date") LocalDate date);
|
|
|
|
|
|
|
|
/**
|
|
/**
|