|
|
@@ -3,6 +3,7 @@ package com.yhlxj.dao.mapper.midjourney;
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.yhlxj.dao.model.entity.MidjourneyUser;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
+import org.apache.ibatis.annotations.Select;
|
|
|
import org.apache.ibatis.annotations.Update;
|
|
|
|
|
|
/**
|
|
|
@@ -22,4 +23,9 @@ public interface MidjourneyUserMapper extends BaseMapper<MidjourneyUser> {
|
|
|
|
|
|
@Update("update midjourney_user set mj_relax_num = mj_relax_num - #{num} where id = #{id} and mj_relax_num = #{relaxNum} and mj_relax_num > 0")
|
|
|
int decRelaxNum(@Param("id") Long id, @Param("num") Integer num, @Param("relaxNum") Integer relaxNum);
|
|
|
+
|
|
|
+ @Select("select ums.custom_id from midjourney_user mu left join order_don o on mu.relation_id = o.relation_id " +
|
|
|
+ "left join user_mirror_shop_order_relate umsor on o.id = umsor.order_id left join user_mirror_shop ums on umsor.mp_id = ums.id " +
|
|
|
+ "where umsor.id is not null and o.`status` = 'complete' and mu.id = #{userId} order by o.id desc limit 1")
|
|
|
+ String getUserCustomId(Long userId);
|
|
|
}
|