Commit f7be2e7f authored by “dujiuxin”'s avatar “dujiuxin”

1

parent ec682c9e
...@@ -2,9 +2,17 @@ package com.zfxftech.telmarket.mapper.business; ...@@ -2,9 +2,17 @@ package com.zfxftech.telmarket.mapper.business;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfxftech.telmarket.common.pojo.dao.MarketProfitLog; import com.zfxftech.telmarket.common.pojo.dao.MarketProfitLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public interface MarketProfitLogMapper extends BaseMapper<MarketProfitLog> { public interface MarketProfitLogMapper extends BaseMapper<MarketProfitLog> {
@Select("select id,market_id,principal,profit_rate from market_profit_log " +
"where id = ( " +
" select max(id) from market_profit_log " +
" where market_id=#{marketId} and is_deleted='0' " +
")")
MarketProfitLog selectLastLogByMarketId(@Param("marketId") Long marketId);
} }
...@@ -2,9 +2,16 @@ package com.zfxftech.telmarket.mapper.business.asset; ...@@ -2,9 +2,16 @@ package com.zfxftech.telmarket.mapper.business.asset;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfxftech.telmarket.common.pojo.dao.asset.AssetMarketProfitLog; import com.zfxftech.telmarket.common.pojo.dao.asset.AssetMarketProfitLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public interface AssetMarketProfitLogMapper extends BaseMapper<AssetMarketProfitLog> { public interface AssetMarketProfitLogMapper extends BaseMapper<AssetMarketProfitLog> {
@Select("select id,market_id,principal,profit_rate from asset_market_profit_log " +
"where id = ( " +
" select max(id) from asset_market_profit_log " +
" where market_id=#{marketId} and is_deleted='0' " +
")")
AssetMarketProfitLog selectLastLogByMarketId(@Param("marketId") Long marketId);
} }
package com.zfxftech.telmarket.mapper.business.high; package com.zfxftech.telmarket.mapper.business.high;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfxftech.telmarket.common.pojo.dao.asset.AssetMarketProfitLog;
import com.zfxftech.telmarket.common.pojo.dao.high.HighMarketProfitLog; import com.zfxftech.telmarket.common.pojo.dao.high.HighMarketProfitLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public interface HighMarketProfitLogMapper extends BaseMapper<HighMarketProfitLog> { public interface HighMarketProfitLogMapper extends BaseMapper<HighMarketProfitLog> {
@Select("select id,market_id,principal,profit_rate from high_market_profit_log " +
"where id = ( " +
" select max(id) from high_market_profit_log " +
" where market_id=#{marketId} and is_deleted='0' " +
")")
HighMarketProfitLog selectLastLogByMarketId(@Param("marketId") Long marketId);
} }
...@@ -2,9 +2,16 @@ package com.zfxftech.telmarket.mapper.business.smart; ...@@ -2,9 +2,16 @@ package com.zfxftech.telmarket.mapper.business.smart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfxftech.telmarket.common.pojo.dao.smart.SmartMarketProfitLog; import com.zfxftech.telmarket.common.pojo.dao.smart.SmartMarketProfitLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public interface SmartMarketProfitLogMapper extends BaseMapper<SmartMarketProfitLog> { public interface SmartMarketProfitLogMapper extends BaseMapper<SmartMarketProfitLog> {
@Select("select id,market_id,principal,profit_rate from smart_market_profit_log " +
"where id = ( " +
" select max(id) from smart_market_profit_log " +
" where market_id=#{marketId} and is_deleted='0' " +
")")
SmartMarketProfitLog selectLastLogByMarketId(@Param("marketId") Long marketId);
} }
...@@ -2,9 +2,16 @@ package com.zfxftech.telmarket.mapper.business.survey; ...@@ -2,9 +2,16 @@ package com.zfxftech.telmarket.mapper.business.survey;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zfxftech.telmarket.common.pojo.dao.survey.SurveyMarketProfitLog; import com.zfxftech.telmarket.common.pojo.dao.survey.SurveyMarketProfitLog;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
@Repository @Repository
public interface SurveyMarketProfitLogMapper extends BaseMapper<SurveyMarketProfitLog> { public interface SurveyMarketProfitLogMapper extends BaseMapper<SurveyMarketProfitLog> {
@Select("select id,market_id,principal,profit_rate from survey_market_profit_log " +
"where id = ( " +
" select max(id) from survey_market_profit_log " +
" where market_id=#{marketId} and is_deleted='0' " +
")")
SurveyMarketProfitLog selectLastLogByMarketId(@Param("marketId") Long marketId);
} }
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