From 8c8a28e15748b45cfc9f5502553c4006b02a8821 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 23 Apr 2024 11:07:08 +0800 Subject: [PATCH 1/2] 1 --- docker/php7.4/Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 docker/php7.4/Dockerfile diff --git a/docker/php7.4/Dockerfile b/docker/php7.4/Dockerfile new file mode 100644 index 00000000..1cec316c --- /dev/null +++ b/docker/php7.4/Dockerfile @@ -0,0 +1,16 @@ +# Download base image ubuntu 20.04 +FROM ubuntu:20.04 + +# LABEL about the custom image +LABEL maintainer="aozhiwei@kingsome.cn" +LABEL version="0.1" +LABEL description="This is custom Docker Image for \ + the php Services." + +# RUN sh -c '/bin/echo -e "\n6\n70" | sh Anaconda3-4.4.0-Linux-x86_64.sh' +# 6 70 +RUN apt update +RUN apt install -y tzdata +RUN apt install -y net-tools iputils-ping vim mariadb-client redis php php-fpm php-pdo php-mysql php-redis php-mbstring +#php-pecl-libsodium +#RUN sh -c '/bin/echo -e "\n6\n70" | apt install -y net-tools iputils-ping mariadb-client php php-fpm' From 103962bd71bf1b2e1c4a9040f3471fb6498c97a8 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 23 Apr 2024 11:21:28 +0800 Subject: [PATCH 2/2] 1 --- webapp/controller/UserController.class.php | 2 +- webapp/models/HeroPreset.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/controller/UserController.class.php b/webapp/controller/UserController.class.php index 8b3a3328..066defa5 100644 --- a/webapp/controller/UserController.class.php +++ b/webapp/controller/UserController.class.php @@ -594,7 +594,7 @@ class UserController extends BaseAuthedController { $heroInfo = Hero::toDto($heroDb); $heroInfo['avatar_info'] = Hero::avatarInfo($heroDb); { - $preset = HeroPreset::getHeroPreset($heroUniId); + HeroPreset::upsertPresetNew($heroUniId, $specSkill); $heroInfo['spec_skill'] = '' . $specSkill; } myself()->_rspData(array( diff --git a/webapp/models/HeroPreset.php b/webapp/models/HeroPreset.php index 97c1adf4..a148c9c2 100644 --- a/webapp/models/HeroPreset.php +++ b/webapp/models/HeroPreset.php @@ -93,4 +93,9 @@ class HeroPreset extends BaseModel { ) ); } -} \ No newline at end of file + + public static function upsertPresetNew($heroId,$skillId){ + self::upsertPreset($heroId, $skillId, 0, 0, 0); + } + +}