Commit b2d70349 authored by qinhu's avatar qinhu

---正式版

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