|
@@ -184,7 +184,7 @@ public interface CoinMapper {
|
|
|
@Update("update coin_watchlist set cmc_id=#{cmcId},total_market_ranking=#{totalMarketRanking},total_market_value=#{totalMarketValue}," +
|
|
@Update("update coin_watchlist set cmc_id=#{cmcId},total_market_ranking=#{totalMarketRanking},total_market_value=#{totalMarketValue}," +
|
|
|
"mark_price=#{markPrice},price_change_percentage_24h=#{priceChangePercentage24h},highest_historical_price=#{highestHistoricalPrice},ath_change_percentage=#{athChangePercentage},atl_change_percentage=#{atlChangePercentage},lowest_historical_price=#{lowestHistoricalPrice}," +
|
|
"mark_price=#{markPrice},price_change_percentage_24h=#{priceChangePercentage24h},highest_historical_price=#{highestHistoricalPrice},ath_change_percentage=#{athChangePercentage},atl_change_percentage=#{atlChangePercentage},lowest_historical_price=#{lowestHistoricalPrice}," +
|
|
|
"highest_historical_date=#{highestHistoricalDate},lowest_historical_date=#{lowestHistoricalDate},increase_multiple=#{increaseMultiple}," +
|
|
"highest_historical_date=#{highestHistoricalDate},lowest_historical_date=#{lowestHistoricalDate},increase_multiple=#{increaseMultiple}," +
|
|
|
- "issuing_days=#{issuingDays},coingecko_url=#{coingeckoUrl},cmc_url=#{cmcUrl},feixiaohao_url=#{feixiaohaoUrl},modify_time=now() where id = #{id}")
|
|
|
|
|
|
|
+ "coingecko_url=#{coingeckoUrl},cmc_url=#{cmcUrl},feixiaohao_url=#{feixiaohaoUrl},modify_time=now() where id = #{id}")
|
|
|
int updateCoinWatchlist(CoinWatchlist coinWatchlist);
|
|
int updateCoinWatchlist(CoinWatchlist coinWatchlist);
|
|
|
|
|
|
|
|
@Insert("INSERT INTO coin_watchlist_other(symbol, max_supply, circulating_supply, circulating_rate, total_supply, market_cap, fully_diluted_market_cap, create_time, modify_time) " +
|
|
@Insert("INSERT INTO coin_watchlist_other(symbol, max_supply, circulating_supply, circulating_rate, total_supply, market_cap, fully_diluted_market_cap, create_time, modify_time) " +
|
|
@@ -213,7 +213,7 @@ public interface CoinMapper {
|
|
|
int insertOrUpdateCoinWatchlistOtherList(Collection<CoinWatchlistOther> coinWatchlistOtherList);
|
|
int insertOrUpdateCoinWatchlistOtherList(Collection<CoinWatchlistOther> coinWatchlistOtherList);
|
|
|
|
|
|
|
|
@Update({"<script>" +
|
|
@Update({"<script>" +
|
|
|
- "update coin_watchlist " +
|
|
|
|
|
|
|
+ "update coin_watchlist_user " +
|
|
|
"<set>" +
|
|
"<set>" +
|
|
|
"<if test=\"score != null and score != ''\">" +
|
|
"<if test=\"score != null and score != ''\">" +
|
|
|
" score = #{score}," +
|
|
" score = #{score}," +
|
|
@@ -223,13 +223,17 @@ public interface CoinMapper {
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
"modify_time=now()" +
|
|
"modify_time=now()" +
|
|
|
"</set>" +
|
|
"</set>" +
|
|
|
- "where symbol = #{symbol}" +
|
|
|
|
|
|
|
+ "where user_id = #{userId} and symbol = #{symbol}" +
|
|
|
"</script>"})
|
|
"</script>"})
|
|
|
- int updateCoinWatchlistRemark(CoinWatchlist coinWatchlist);
|
|
|
|
|
|
|
+ int updateCoinWatchlistRemarkAndScore(CoinWatchlist coinWatchlist);
|
|
|
|
|
|
|
|
@Select("select * from coin_watchlist where symbol = #{symbol} and delete_flag = 1")
|
|
@Select("select * from coin_watchlist where symbol = #{symbol} and delete_flag = 1")
|
|
|
CoinWatchlist findWatchlistBySymbol(String symbol);
|
|
CoinWatchlist findWatchlistBySymbol(String symbol);
|
|
|
|
|
|
|
|
|
|
+ @Select("select cwu.*,cw.cmc_id,cw.cmc_url,cw.coingecko_id,cw.coingecko_url,cw.feixiaohao_url" +
|
|
|
|
|
+ " from coin_watchlist_user cwu left join coin_watchlist cw on cwu.symbol=cw.symbol where cwu.user_id = #{userId} and cwu.symbol = #{symbol} and cwu.delete_flag = 1")
|
|
|
|
|
+ CoinWatchlist findWatchlistUserBySymbolAndUserId(String symbol, Integer userId);
|
|
|
|
|
+
|
|
|
@Insert({"<script>" +
|
|
@Insert({"<script>" +
|
|
|
"INSERT INTO coin_cmc_map(cmc_id,cmc_rank,name,symbol,slug,is_active,status," +
|
|
"INSERT INTO coin_cmc_map(cmc_id,cmc_rank,name,symbol,slug,is_active,status," +
|
|
|
"first_historical_data,last_historical_data,platform,modify_time)" +
|
|
"first_historical_data,last_historical_data,platform,modify_time)" +
|
|
@@ -259,12 +263,18 @@ public interface CoinMapper {
|
|
|
@MapKey("job_name")
|
|
@MapKey("job_name")
|
|
|
Map<String, JSONObject> findMonitorJobConfig();
|
|
Map<String, JSONObject> findMonitorJobConfig();
|
|
|
|
|
|
|
|
- @Insert("INSERT INTO coin_watchlist(cmc_id, symbol, track_category, track_category2, issuing_date, coingecko_id, coingecko_url, cmc_url, feixiaohao_url, filter_flag, create_time, modify_time) " +
|
|
|
|
|
- "VALUES (#{cmcId}, #{symbol}, #{trackCategory}, #{trackCategory2}, #{issuingDate}, #{coingeckoId}, #{coingeckoUrl}, #{cmcUrl}, #{feixiaohaoUrl}, #{filterFlag}, now(), now())" +
|
|
|
|
|
- " ON DUPLICATE KEY UPDATE cmc_id=values(cmc_id),track_category=values(track_category),track_category2=values(track_category2),issuing_date=values(issuing_date),coingecko_id=values(coingecko_id)" +
|
|
|
|
|
- ",coingecko_url=values(coingecko_url),cmc_url=values(cmc_url),feixiaohao_url=values(feixiaohao_url),filter_flag=values(filter_flag),modify_time=now()")
|
|
|
|
|
|
|
+ @Insert("INSERT INTO coin_watchlist(cmc_id, symbol, coingecko_id, coingecko_url, cmc_url, feixiaohao_url, create_time, modify_time, delete_flag) " +
|
|
|
|
|
+ "VALUES (#{cmcId}, #{symbol}, #{coingeckoId}, #{coingeckoUrl}, #{cmcUrl}, #{feixiaohaoUrl}, now(), now(), 1)" +
|
|
|
|
|
+ " ON DUPLICATE KEY UPDATE cmc_id=values(cmc_id),coingecko_id=values(coingecko_id)" +
|
|
|
|
|
+ ",coingecko_url=values(coingecko_url),cmc_url=values(cmc_url),feixiaohao_url=values(feixiaohao_url),modify_time=now(),delete_flag=1")
|
|
|
int insertOrUpdateWatchlist(CoinWatchlist coinWatchlist);
|
|
int insertOrUpdateWatchlist(CoinWatchlist coinWatchlist);
|
|
|
|
|
|
|
|
|
|
+ @Insert("INSERT INTO coin_watchlist_user(symbol, user_id, track_category, track_category2, issuing_date, issuing_days, filter_flag, create_time, modify_time, delete_flag) " +
|
|
|
|
|
+ "VALUES (#{symbol}, #{userId}, #{trackCategory}, #{trackCategory2}, #{issuingDate}, #{issuingDays}, #{filterFlag}, now(), now(), 1)" +
|
|
|
|
|
+ " ON DUPLICATE KEY UPDATE track_category=values(track_category),track_category2=values(track_category2),issuing_date=values(issuing_date)," +
|
|
|
|
|
+ "issuing_days=values(issuing_days),filter_flag=values(filter_flag),modify_time=now(),delete_flag=1")
|
|
|
|
|
+ int insertOrUpdateWatchlistUser(CoinWatchlist coinWatchlist);
|
|
|
|
|
+
|
|
|
@Insert({"<script>" +
|
|
@Insert({"<script>" +
|
|
|
"INSERT INTO coin_binance_symbol(symbol,status,baseAsset,marginAsset,baseAssetPrecision,contractType,underlyingSubType," +
|
|
"INSERT INTO coin_binance_symbol(symbol,status,baseAsset,marginAsset,baseAssetPrecision,contractType,underlyingSubType," +
|
|
|
"filters,orderTypes,timeInForce,liquidationFee,marketTakeBound,deliveryDate,onboardDate,modify_time)" +
|
|
"filters,orderTypes,timeInForce,liquidationFee,marketTakeBound,deliveryDate,onboardDate,modify_time)" +
|