Commit b2d70349 authored by qinhu's avatar qinhu

---正式版

parent 2885edec
......@@ -11,6 +11,7 @@ import org.springframework.context.annotation.Configuration;
@Data
@Configuration
public class DTNFIX {
@Value("${spring.datasource.dtn.userbac.prefix:}")
String prefix;
......
......@@ -10,14 +10,14 @@ spring:
nacos:
discovery:
server-addr: ${nacos.ip}:8848
# namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
config:
server-addr: ${nacos.ip}:8848
file-extension: yaml
#共享文件设置
shared-dataids: common.yaml
refreshable-dataids: common.yaml
# namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
#变量名字
nacos:
ip: 81.68.92.175 #nacosd地址
......
release=1.0.0
dist=x86
servername=oxo-cashiers
dsn=http://b387f3764bbf462889e9477b75320617@81.68.92.175/4
\ No newline at end of file
#release=1.0.0
#dist=x86
#servername=oxo-cashiers
#dsn=http://b387f3764bbf462889e9477b75320617@81.68.92.175/4
\ No newline at end of file
......@@ -5,7 +5,7 @@ import cn.wise.sc.pay.common.core.model.BaseResponse;
import cn.wise.sc.pay.common.core.query.PageQuery;
import org.springframework.stereotype.Component;
@Component
@Component("ArticleCommentServiceImpl")
public class ArticleCommentServiceImpl implements IArticleCommentService {
@Override
public BaseResponse addComment(Comment comment) {
......
......@@ -13,7 +13,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.util.Map;
@Component
@Component("ArticleServiceImpl")
public class ArticleServiceImpl implements IArticleService {
Logger logger = LoggerFactory.getLogger(this.getClass());
......
......@@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Component(value = "BannerServiceImpl")
public class BannerServiceImpl implements IBannerService {
Logger logger = LoggerFactory.getLogger(this.getClass());
......
......@@ -7,7 +7,7 @@ import cn.wise.sc.pay.domain.association.query.BlacklistQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Component;
@Component
@Component("BlacklistServiceImpl")
public class BlacklistServiceImpl implements IBlacklistService {
@Override
public BaseResponse<Page<Blacklist>> list(String userName, PageQuery pageQuery) {
......
......@@ -3,6 +3,6 @@ package cn.wise.sc.pay.api.association.service;
import cn.wise.sc.pay.api.association.service.ICollectionService;
import org.springframework.stereotype.Component;
@Component
@Component("CollectionServiceImpl")
public class CollectionServiceImpl implements ICollectionService {
}
......@@ -4,7 +4,7 @@ import cn.wise.sc.pay.business.comment.bean.Reply;
import cn.wise.sc.pay.common.core.model.BaseResponse;
import org.springframework.stereotype.Component;
@Component
@Component("CommentReplyServiceImpl")
public class CommentReplyServiceImpl implements ICommentReplyService {
@Override
public BaseResponse inserReply(Reply reply) {
......
......@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
import java.util.Map;
@Component
@Component("ConcernServiceImpl")
public class ConcernServiceImpl implements IConcernService {
@Override
public ResponseEntity addConcern(Concern concern) {
......
......@@ -8,7 +8,7 @@ import org.springframework.stereotype.Component;
import java.util.List;
@Component
@Component("TopicServiceImpl")
public class TopicServiceImpl implements ITopicService {
@Override
......
......@@ -46,6 +46,10 @@ public class FastDFSUtils {
return host + relativeUrl;
}
public String getHost(){
return environment.getProperty("fdfs.imgaddress");
}
/**
* 文件上传
*
......
......@@ -101,7 +101,7 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article>
.title(articleQuery.getTitle())
.content(articleQuery.getContent())
.coverImage(articleQuery.getCoverImage())
.createTime(System.currentTimeMillis())
.createTime(articleQuery.getCreateTime() == 0L ? System.currentTimeMillis() : articleQuery.getCreateTime())
.updateTime(System.currentTimeMillis())
.type(articleQuery.getType())
.build();
......@@ -314,7 +314,6 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article>
@Override
public BaseResponse uploadPic(MultipartFile file) {
Map<String, String> map = new HashMap<>();
map.put("host", fastDFSUtils.fullUrl(""));
String path = "";
if (file != null && StringUtils.isNotEmpty(file.getOriginalFilename())) {
try {
......@@ -324,6 +323,7 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article>
}
}
map.put("uri", path);
map.put("host", fastDFSUtils.getHost());
return BaseResponse.ok(map);
}
......
......@@ -10,12 +10,14 @@ spring:
nacos:
discovery:
server-addr: ${nacos.ip}:8848
# namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
config:
server-addr: ${nacos.ip}:8848
file-extension: yaml
#共享文件设置
shared-dataids: common.yaml
refreshable-dataids: common.yaml
# namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
#用的的变量名字
nacos:
......
......@@ -38,4 +38,6 @@ public class ArticleQuery {
private byte type;
/** 发布地址 */
private String address;
private Long createTime = 0L;
}
......@@ -10,12 +10,14 @@ spring:
nacos:
discovery:
server-addr: ${nacos.ip}:8848
namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
config:
server-addr: ${nacos.ip}:8848
file-extension: yaml
#共享文件设置
shared-dataids: common.yaml
refreshable-dataids: common.yaml
namespace: 34ec6c41-14f8-4f0f-a565-6039e5c49b22
#用的的变量名字
nacos:
ip: 81.68.92.175 #nacosd地址
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment