Compare commits

..

No commits in common. "master" and "dev" have entirely different histories.
master ... dev

6 changed files with 33 additions and 59 deletions

View File

@ -425,40 +425,36 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin> <!-- <plugin>-->
<groupId>com.spotify</groupId> <!-- <groupId>org.springframework.boot</groupId>-->
<artifactId>docker-maven-plugin</artifactId> <!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
<version>0.2.8</version> <!-- <configuration>-->
<executions> <!-- <includeSystemScope>true</includeSystemScope>-->
<execution> <!-- </configuration>-->
<id>docker</id> <!-- </plugin>-->
<phase>package</phase> <!-- <plugin>-->
<goals> <!-- <groupId>org.apache.maven.plugins</groupId>-->
<goal>build</goal> <!-- <artifactId>maven-surefire-plugin</artifactId>-->
</goals> <!-- <configuration>-->
</execution> <!-- <skipTests>true</skipTests>-->
</executions> <!-- </configuration>-->
<configuration> <!-- </plugin>-->
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory> <!-- <plugin>-->
<!-- 指定本地docker --> <!-- <groupId>com.spotify</groupId>-->
<dockerHost>http://192.168.124.46:2375</dockerHost> <!-- <artifactId>docker-maven-plugin</artifactId>-->
<!-- Configure the image name --> <!-- <version>${docker.plugin.version}</version>-->
<imageName>hisense/share-platform</imageName> <!-- <configuration>-->
<imageTags> <!-- <imageName>renren/${project.artifactId}</imageName>-->
<imageTag>${project.version}</imageTag> <!-- <dockerDirectory>${project.basedir}/</dockerDirectory>-->
</imageTags> <!-- <resources>-->
<forceTags>true</forceTags> <!-- <resource>-->
<resources> <!-- <targetPath>/</targetPath>-->
<resource> <!-- <directory>${project.build.directory}</directory>-->
<targetPath>/application</targetPath> <!-- <include>${project.build.finalName}.jar</include>-->
<directory>${project.build.directory}</directory> <!-- </resource>-->
<includes> <!-- </resources>-->
<include>renren-admin-1.0.tar.gz</include> <!-- </configuration>-->
</includes> <!-- </plugin>-->
</resource>
</resources>
</configuration>
</plugin>
</plugins> </plugins>
</build> </build>
</project> </project>

View File

@ -1,18 +0,0 @@
FROM ibm-semeru-runtimes:open-11-jre
ENV JAR_FILE renren-admin.jar
ENV TAR_FILE renren-admin-1.0.tar.gz
ENV ACTIVE "dev"
ENV Xmx "1G"
ENV VERTICLE_HOME /usr/hisense
EXPOSE 8888
VOLUME ["/usr/hisense"]
ADD application/$TAR_FILE $VERTICLE_HOME/
COPY simsun.ttc /usr/share/fonts/truetype/dejavu/
RUN cd /usr/share/fonts/truetype/dejavu && chmod 755 * && fc-cache -fv
HEALTHCHECK --interval=3m --timeout=3s --start-period=3m --retries=5 CMD curl --silent --fail 127.0.0.1:8888/ucs-admin/census/center/v2/whole_amount || exit 1
WORKDIR $VERTICLE_HOME/renren-admin
ENTRYPOINT ["sh", "-c"]
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx$Xmx -XX:ReservedCodeCacheSize=240m -XX:InitialCodeCacheSize=240m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $VERTICLE_HOME/renren-admin/$JAR_FILE --spring.profiles.active=$ACTIVE"]

View File

@ -15,8 +15,6 @@ import io.renren.modules.notice.enums.NoticeStatusEnum;
import io.renren.modules.notice.service.SysNoticeService; import io.renren.modules.notice.service.SysNoticeService;
import io.renren.modules.sys.dto.SysUserDTO; import io.renren.modules.sys.dto.SysUserDTO;
import io.renren.modules.sys.service.SysUserService; import io.renren.modules.sys.service.SysUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -38,8 +36,6 @@ import java.util.stream.Collectors;
*/ */
@Service @Service
public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService { public class TDemandCommentServiceImpl extends CrudServiceImpl<TDemandCommentDao, TDemandCommentEntity, TDemandCommentDTO> implements TDemandCommentService {
private static Logger logger = LoggerFactory.getLogger(TDemandCommentServiceImpl.class);
private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors(); private static final Integer CPUNUM = Runtime.getRuntime().availableProcessors();
private static final ExecutorService executor = Executors.newWorkStealingPool(CPUNUM); private static final ExecutorService executor = Executors.newWorkStealingPool(CPUNUM);
@Autowired @Autowired

View File

@ -85,9 +85,9 @@ public class TAbilityApplicationServiceImpl extends CrudServiceImpl<TAbilityAppl
String sql = "SELECT 1 FROM tb_resource_score t1 WHERE t1.user_id = t_ability_application.user_id AND t1.resource_id = t_ability_application.resource_id"; String sql = "SELECT 1 FROM tb_resource_score t1 WHERE t1.user_id = t_ability_application.user_id AND t1.resource_id = t_ability_application.resource_id";
String resource_sql = "SELECT 1 FROM tb_data_resource WHERE tb_data_resource.del_flag = 0 AND t_ability_application.resource_id = tb_data_resource.id"; String resource_sql = "SELECT 1 FROM tb_data_resource WHERE tb_data_resource.del_flag = 0 AND t_ability_application.resource_id = tb_data_resource.id";
if (score) { if (score) {
wrapper.exists(sql).exists(resource_sql).eq("approve_status", "通过"); wrapper.exists(sql).exists(resource_sql).ne("approve_status", "通过");
} else { } else {
wrapper.notExists(sql).exists(resource_sql).eq("approve_status", "通过"); wrapper.notExists(sql).exists(resource_sql).ne("approve_status", "通过");
} }
break; break;
} }

View File

@ -19,7 +19,7 @@ fi
#开始方法 #开始方法
start() { start() {
cd $JAR_ROOT cd $JAR_ROOT
nohup java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx$Xmx -XX:ReservedCodeCacheSize=240m -XX:InitialCodeCacheSize=240m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $JAR_PATH --spring.profiles.active=$PROFILES_ACTIVE >$LOG_PATH 2>&1 & nohup java -Dfile.encoding=utf-8 -server -Xms256m -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -Duser.timezone=GMT+08 -XX:HeapDumpPath=./ -jar $JAR_PATH --spring.profiles.active=$PROFILES_ACTIVE >$LOG_PATH 2>&1 &
echo "$JAR_PATH start success." echo "$JAR_PATH start success."
} }