parent
8ed6ec7bae
commit
c9b4bbe22b
@ -0,0 +1,34 @@
|
||||
package com.java3y.austin.web.service;
|
||||
|
||||
|
||||
import com.java3y.austin.common.vo.BasicResultVO;
|
||||
import com.java3y.austin.support.domain.ChannelAccount;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 渠道账号接口
|
||||
*
|
||||
* @author 3y
|
||||
*/
|
||||
public interface ChannelAccountService {
|
||||
|
||||
|
||||
/**
|
||||
* 保存/修改渠道账号信息
|
||||
*
|
||||
* @param channelAccount
|
||||
* @return
|
||||
*/
|
||||
ChannelAccount save(ChannelAccount channelAccount);
|
||||
|
||||
/**
|
||||
* 根据渠道标识查询账号信息
|
||||
*
|
||||
* @param channelType 渠道标识
|
||||
* @return
|
||||
*/
|
||||
List<ChannelAccount> queryByChannelType(Integer channelType);
|
||||
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package com.java3y.austin.web.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.java3y.austin.common.constant.AustinConstant;
|
||||
import com.java3y.austin.support.dao.ChannelAccountDao;
|
||||
import com.java3y.austin.support.domain.ChannelAccount;
|
||||
import com.java3y.austin.web.service.ChannelAccountService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 3y
|
||||
*/
|
||||
@Service
|
||||
public class ChannelAccountServiceImpl implements ChannelAccountService {
|
||||
|
||||
@Autowired
|
||||
private ChannelAccountDao channelAccountDao;
|
||||
@Override
|
||||
public ChannelAccount save(ChannelAccount channelAccount) {
|
||||
if (channelAccount.getId() == null) {
|
||||
channelAccount.setCreated(Math.toIntExact(DateUtil.currentSeconds()));
|
||||
channelAccount.setIsDeleted(AustinConstant.FALSE);
|
||||
}
|
||||
channelAccount.setUpdated(Math.toIntExact(DateUtil.currentSeconds()));
|
||||
return channelAccountDao.save(channelAccount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ChannelAccount> queryByChannelType(Integer channelType) {
|
||||
return channelAccountDao.findAllByIsDeletedEqualsAndSendChannelEquals(AustinConstant.FALSE, channelType);
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
# 使用openjdk8的镜像
|
||||
FROM openjdk:8-jre
|
||||
|
||||
ENV PARAMS=""
|
||||
|
||||
# 设置工作目录
|
||||
WORKDIR /build
|
||||
# 将jar包复制到容器中
|
||||
ADD ./austin-web-0.0.1-SNAPSHOT.jar ./austin.jar
|
||||
# 暴露8080端口
|
||||
EXPOSE 8080
|
||||
|
||||
# 运行jar包
|
||||
ENTRYPOINT ["sh","-c","java -jar $JAVA_OPTS austin.jar $PARAMS"]
|
||||
|
||||
|
||||
# docker run -e PARAMS="--austin-database-ip= --austin-database-port=3306 --austin-redis-ip= --austin-mq-pipeline=eventbus " -p 8080:8080 --name austin:1.0
|
Loading…
Reference in new issue