PR

【4/29】戦争参加でGOLDキャンペーン #3472

kouho opened this at 2024-04-25T10:33:35; closed

Description

opened by kouho at 2024-04-25T10:33:35; updated 2024-04-26T19:39:54

概要

https://docs.google.com/spreadsheets/d/1tVbnpnqIwvVTk40rNT-m2K8xd7M21gy3Ts5hQ0yFKuY/edit#gid=1062239981

実装用メモシート

https://docs.google.com/spreadsheets/d/17DUe63W0B1lZldvJLyno1F0jXigYui4RoBMHL9yDXeM/edit#gid=1673375366

関連テーブルクエリ

jryeデータベースに作成

-- 配布されたJコイン
CREATE TABLE `user_teamWar_jcoin_present` (
`year_mon_day` int(11) NOT NULL,
`user_no` bigint(20) NOT NULL,
`reward_type` tinyint(4) NOT NULL,
`jcoin` int(11) NOT NULL,
`team_no` int(11) NOT NULL,
`war_id` int(11) NOT NULL,
`user_grade` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `user_teamWar_jcoin_present`
ADD PRIMARY KEY (`year_mon_day`,`user_no`,`reward_type`) USING BTREE,
ADD KEY `year_mon_day` (`year_mon_day`,`team_no`),
ADD KEY `year_mon_day_2` (`year_mon_day`,`war_id`);

-- Jコイン配布swfのログ
CREATE TABLE `log_user_teamWar_jcoin_present_swf` (
`user_no` bigint(20) NOT NULL,
`year_mon_day` int(11) NOT NULL,
`present_flg` tinyint(4) NOT NULL,
`reg_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

ALTER TABLE `log_user_teamWar_jcoin_present_swf`
ADD PRIMARY KEY (`user_no`,`year_mon_day`);

備考

  • 本家のJコイン配布から移植
  • Jcoinの関数名やファイル名はそのまま利用
  • プラットフォーム判定の箇所は削除
  • SubFunc,incへ関数を増やすのは好ましくないですが、一旦そのまま追加
  • user_gradeの判定はヤマダ版では不要なので削除。テーブルには0で入れています。

確認方法

①ローカルで戦争を開始

②両チームでそれぞれ実行
・攻撃 ・防衛

③event_teamwar_jcoin_present.incの以下のtimeを期間内に修正


$time = time(); ⇒ $time = strtotime("2024-04-20 00:00:00");

④以下のテーブルのyear_mon_dayを③にで修正した日に合わせて修正

上の例だと2024042012
teamWar_userDetail
teamWar_info
teamWar_userpoint

⑤スクリプト実行

ENVIRONMENT=development PF=yamada IS_DOCKER=true php event_teamwar_jcoin_present.inc

⑥GOLDがプレゼントに配られているかと、user_teamWar_jcoin_presentにデータが入っていることを確認

⑦時間旅行で戦争終了集計後の時間に

⑧メインページにアクセス

⑨戦争参加でGOLDゲットキャンペーンの結果swfが再生
swf再生に失敗した場合、log_user_teamWar_jcoin_present_swfのレコードを削除

⑩戦争参加でGOLDゲットキャンペーンの結果swfが再生後にキャンページに

⑪キャンペーンページでは以下を確認

  • 累計獲得GOLD
  • その日に獲得したGOLDの内訳表示
  • 日付をタップしてその日の獲得GOLDが表示されること

TODO

  • [x] 画像確認
  • [x] 告知作成
  • [x] 戦争ページでの表示修正(参加人数とキャンペーンリンク)
kouho change_title at 2024-04-25T10:33:42: 【4/29】戦争参加でGOLDキャンペーン [WIP]【4/29】戦争参加でGOLDキャンペーン
kouho change_title at 2024-04-25T18:55:42: [WIP]【4/29】戦争参加でGOLDキャンペーン 【4/29】戦争参加でGOLDキャンペーン

Comment

#34360 by kouho at 2024-04-25T19:31:24; updated 2024-04-25T19:31:24

@wada
レビューお願いいたします

Comment

#34361 by wada at 2024-04-26T13:01:46; updated 2024-04-26T13:01:46

@kouho
ここでカウンタブルエラーが出ています。

Filename: /lib/public/Event-TeamWarJcoinAnimation.inc
Line Number: 58

Comment

#34362 by kouho at 2024-04-26T13:11:05; updated 2024-04-26T13:11:05

@wada
確認ありがとうございます。カウントエラー修正しました。
> ここでカウンタブルエラーが出ています。
>
Filename: /lib/public/Event-TeamWarJcoinAnimation.inc
Line Number: 58

Comment

#34363 by wada at 2024-04-26T13:48:12; updated 2024-04-26T13:48:12

@kouho
event_teamwar_jcoin_present.inc はgit管理されていますか?

Comment

#34364 by wada at 2024-04-26T15:24:31; updated 2024-04-26T15:24:31

@kouho
以下の関数で参照されているlog_user_jcoin_present_campaign_swfも今回テーブル作成しますか?

S_GetLogUserJcoinPresentCampaignSWF()
S_SetLogUserJcoinPresentCampaignSWF()

Comment

#34365 by wada at 2024-04-26T15:48:16; updated 2024-04-26T15:48:16

@kouho
戦争ページ上部のCPバナーが表示されないのですが、表示されるタイミングはありますか?
画像はdevtoolで操作して表示しています。
<img src="https://git.dev.d-es.co.jp/gitbucket/jolly/jr-web/_attached/17141140123418iiRQk716S" width="300">

Comment

#34366 by kouho at 2024-04-26T16:04:37; updated 2024-04-26T16:04:37

@wada
確認ありがとうございます。

> event_teamwar_jcoin_present.inc はgit管理されていますか?

コミット漏れてしまっておりましたのでコミットしています。

> 以下の関数で参照されているlog_user_jcoin_present_campaign_swfも今回テーブル作成しますか?
>
S_GetLogUserJcoinPresentCampaignSWF()
S_SetLogUserJcoinPresentCampaignSWF()

不要な関数を移植してしまっていましたので削除しました。

> 戦争ページ上部のCPバナーが表示されないのですが、表示されるタイミングはありますか?
画像はdevtoolで操作して表示しています。

確認します。

Comment

#34367 by kouho at 2024-04-26T16:54:24; updated 2024-04-26T16:56:39

@wada
> 戦争ページ上部のCPバナーが表示されないのですが、表示されるタイミングはありますか?
画像はdevtoolで操作して表示しています。

こちらの件json.team_member_count_event == 2の場合hideになっていましたが、showに修正して表示するようにしました。
バナー画像を表示したしたほうがいいかどうかを野田くんに画面を確認してもらった結果表示希望でした。

Comment

#34370 by wada at 2024-04-26T17:16:09; updated 2024-04-26T17:16:09

@kouho
ありがとうございます。確認OKです。

wada add_label at 2024-04-26T17:16:12: 和田 LGTM
kouho merge at 2024-04-26T19:39:54: 【4/29】戦争参加でGOLDキャンペーン
kouho close at 2024-04-26T19:39:54: Close

Commit range

base685495d85989719512c01e26f5cb4cd9015741da
head8f060fffd51a8eff47adb96377dbbab1a1274d3d
base branchjolly/jr-web:master
head branchjolly/jr-web:war_gold_campaign

View commits

Commit details are loaded from Git when a dynamic archive server is running, or can be embedded with --include-commits.
Files changed120 filesView patch
statusfile
modifiedlib/SubFunc.inc
addedlib/ajax/event_teamWarJcoin.inc
modifiedlib/ajax/teamWar_default.inc
modifiedlib/conf/class/EventScheduleConfig.class.php
addedlib/conf/class/TeamwarJCoinConfig.class.php
modifiedlib/conf/define_y.inc
addedlib/exec/event_teamwar_jcoin_present.inc
modifiedlib/exec/matching_team_battle.php
modifiedlib/models/Banner.php
addedlib/public/Event-TeamWarJcoin.inc
addedlib/public/Event-TeamWarJcoinAnimation.inc
modifiedlib/public/Main.inc
modifiedpublic_html/ajax.php
addedpublic_html/img/banner/team_war/banner_teamawar_cp_3_1.jpg
addedpublic_html/img/banner/team_war/banner_teamawar_cp_3_2.jpg
addedpublic_html/img/banner/team_war/banner_teamawar_cp_3_end_1.jpg
addedpublic_html/img/banner/team_war/banner_teamawar_cp_3_end_2.jpg
addedpublic_html/img/event/teamwar_jcoin/add_ship_banner/banner.png
addedpublic_html/img/event/teamwar_jcoin/add_ship_banner/banner_gold.png
addedpublic_html/img/event/teamwar_jcoin/back.jpg
addedpublic_html/img/event/teamwar_jcoin/banner.png
addedpublic_html/img/event/teamwar_jcoin/banner_3.png
addedpublic_html/img/event/teamwar_jcoin/banner_9999.png
addedpublic_html/img/event/teamwar_jcoin/banner_end.png
addedpublic_html/img/event/teamwar_jcoin/banner_end_3.png
addedpublic_html/img/event/teamwar_jcoin/banner_end_9999.png
addedpublic_html/img/event/teamwar_jcoin/box_gold.png
addedpublic_html/img/event/teamwar_jcoin/box_gulu.png
addedpublic_html/img/event/teamwar_jcoin/box_jcoin.png
addedpublic_html/img/event/teamwar_jcoin/btn_send.png
addedpublic_html/img/event/teamwar_jcoin/btn_war.png
addedpublic_html/img/event/teamwar_jcoin/check_off.png
addedpublic_html/img/event/teamwar_jcoin/check_on.png
addedpublic_html/img/event/teamwar_jcoin/h_coin.png
addedpublic_html/img/event/teamwar_jcoin/h_distribution.png
addedpublic_html/img/event/teamwar_jcoin/h_distribution_3.png
addedpublic_html/img/event/teamwar_jcoin/h_distribution_9999.png
addedpublic_html/img/event/teamwar_jcoin/h_get.png
addedpublic_html/img/event/teamwar_jcoin/h_get_3.png
addedpublic_html/img/event/teamwar_jcoin/h_get_9999.png
addedpublic_html/img/event/teamwar_jcoin/h_gold.png
addedpublic_html/img/event/teamwar_jcoin/h_member.png
addedpublic_html/img/event/teamwar_jcoin/header_gold.jpg
addedpublic_html/img/event/teamwar_jcoin/header_jcoin.jpg
addedpublic_html/img/event/teamwar_jcoin/icon_comment_done.png
addedpublic_html/img/event/teamwar_jcoin/icon_comment_not.png
addedpublic_html/img/event/teamwar_jcoin/icon_note.png
addedpublic_html/img/event/teamwar_jcoin/info/info_gold_1.png
addedpublic_html/img/event/teamwar_jcoin/info/info_gold_2.png
addedpublic_html/img/event/teamwar_jcoin/info/info_jcoin_1.png
addedpublic_html/img/event/teamwar_jcoin/info/info_jcoin_2.png
addedpublic_html/img/event/teamwar_jcoin/info01.jpg
addedpublic_html/img/event/teamwar_jcoin/info02.jpg
addedpublic_html/img/event/teamwar_jcoin/info03.jpg
addedpublic_html/img/event/teamwar_jcoin/info_comment.png
addedpublic_html/img/event/teamwar_jcoin/info_event_GOLD_1.jpg
addedpublic_html/img/event/teamwar_jcoin/info_event_GOLD_2.jpg
addedpublic_html/img/event/teamwar_jcoin/info_event_Jcoin_1.jpg
addedpublic_html/img/event/teamwar_jcoin/info_event_Jcoin_2.jpg
addedpublic_html/img/event/teamwar_jcoin/info_gulu.png
addedpublic_html/img/event/teamwar_jcoin/info_jcoin_01.png
addedpublic_html/img/event/teamwar_jcoin/info_jcoin_01_3.png
addedpublic_html/img/event/teamwar_jcoin/info_jcoin_01_9999.png
addedpublic_html/img/event/teamwar_jcoin/info_jcoin_02.png
addedpublic_html/img/event/teamwar_jcoin/info_jcoin_02_3.png
addedpublic_html/img/event/teamwar_jcoin/info_jcoin_02_9999.png
addedpublic_html/img/event/teamwar_jcoin/info_sayla_comment.png
addedpublic_html/img/event/teamwar_jcoin/info_team.png
addedpublic_html/img/event/teamwar_jcoin/info_team_few.png
addedpublic_html/img/event/teamwar_jcoin/line.png
addedpublic_html/img/event/teamwar_jcoin/swf_01.jpg
addedpublic_html/img/event/teamwar_jcoin/swf_01_3.jpg
addedpublic_html/img/event/teamwar_jcoin/swf_01_9999.jpg
addedpublic_html/img/event/teamwar_jcoin/swf_02.jpg
addedpublic_html/img/event/teamwar_jcoin/swf_02_3.jpg
addedpublic_html/img/event/teamwar_jcoin/swf_02_9999.jpg
addedpublic_html/img/event/teamwar_jcoin/t_01.png
addedpublic_html/img/event/teamwar_jcoin/t_01_3.png
addedpublic_html/img/event/teamwar_jcoin/t_01_9999.png
addedpublic_html/img/event/teamwar_jcoin/t_02.png
addedpublic_html/img/event/teamwar_jcoin/t_02_3.png
addedpublic_html/img/event/teamwar_jcoin/t_02_9999.png
addedpublic_html/img/event/teamwar_jcoin/t_1_gold.png
addedpublic_html/img/event/teamwar_jcoin/t_2_gold.png
addedpublic_html/img/event/teamwar_jcoin/t_comment_gold.png
addedpublic_html/img/event/teamwar_jcoin/t_comment_jcoin.png
addedpublic_html/img/event/teamwar_jcoin/t_comment_other.png
addedpublic_html/img/event/teamwar_jcoin/t_gulu.png
addedpublic_html/img/event/teamwar_jcoin/t_gulu_list.png
addedpublic_html/img/event/teamwar_jcoin/tab/tab_gold.png
addedpublic_html/img/event/teamwar_jcoin/tab/tab_gold_off.png
addedpublic_html/img/event/teamwar_jcoin/tab/tab_gulu.png
addedpublic_html/img/event/teamwar_jcoin/tab/tab_gulu_off.png
addedpublic_html/img/event/teamwar_jcoin/tab/tab_jcoin.png
addedpublic_html/img/event/teamwar_jcoin/tab/tab_jcoin_off.png
addedpublic_html/img/event/teamwar_jcoin/tag_grade1.png
addedpublic_html/img/event/teamwar_jcoin/tag_grade2.png
addedpublic_html/img/event/teamwar_jcoin/tag_grade3.png
addedpublic_html/img/event/teamwar_jcoin/text_comment.png
addedpublic_html/img/event/teamwar_jcoin/top.jpg
addedpublic_html/img/event/teamwar_jcoin/top_3.jpg
addedpublic_html/img/event/teamwar_jcoin/top_9999.jpg
addedpublic_html/img/event/teamwar_jcoin/war_gulu.png
addedpublic_html/img/event/teamwar_jcoin/weekend/banner.png
addedpublic_html/img/event/teamwar_jcoin/weekend/banner_9999.png
addedpublic_html/img/event/teamwar_jcoin/weekend/info_jcoin_01_9999.png
addedpublic_html/img/event/teamwar_jcoin/weekend/info_jcoin_02_9999.png
addedpublic_html/img/event/teamwar_jcoin/weekend/start_swf_1.jpg
addedpublic_html/img/event/teamwar_jcoin/weekend/start_swf_2.jpg
addedpublic_html/img/event/teamwar_jcoin/weekend/swf_01.jpg
addedpublic_html/img/event/teamwar_jcoin/weekend/swf_02.jpg
addedpublic_html/img/event/teamwar_jcoin/weekend/top.jpg
addedpublic_html/img/event/teamwar_jcoin/weekend/top_9999.jpg
modifiedpublic_html/index.php
modifiedpublic_html/js/JOLLYROGER.js
modifiedpublic_html/js/jr_main.min.js
addedpublic_html/template/Event-TeamWarJcoin.tpl
addedpublic_html/template/Event-TeamWarJcoinAnimation.tpl
modifiedpublic_html/template/TeamWar.tpl
modifiedpublic_html/template/header_sp.tpl
Patch body is stored as a separate file to keep this page lightweight.