Commit 40285018 by XiaHou

万科文档下载

parent a8704eed
......@@ -2,9 +2,9 @@ server:
port: 8182
spring:
datasource:
url: jdbc:mysql://115.29.198.90:3306/vanke_download?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/vanke_download?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: 123
druid:
initial-size: 5 #连接池初始化大小
min-idle: 10 #最小空闲连接数
......@@ -23,10 +23,10 @@ spring:
max-request-size: 100MB
redis:
host: 115.29.198.90 # Redis服务器地址
host: 127.0.0.1 # Redis服务器地址
database: 0 # Redis数据库索引(默认为0)
port: 6379 # Redis服务器连接端口
password: "sixjust" # Redis服务器连接密码(默认为空)
password: # Redis服务器连接密码(默认为空)
jedis:
pool:
max-active: 200 # 连接池最大连接数(使用负值表示没有限制)
......@@ -111,7 +111,9 @@ aliyun:
accessKeySecret: MThxbXZvJC38FxnL6KEr9LDfl0rHjm # 用户用于加密签名字符串和oss用来验证签名字符串的密钥
bucketName: haihaigo # oss的存储空间
filepath: D:/files/ #本地文件存储路径
fileUrl: 192.168.31.127:8401/mall-admin/files/ #本地访问上传文件 如果部署到线上需要通过nginx去配置
fileUrl: 192.168.223.100:8401/mall-admin/files/ #本地访问上传文件 如果部署到线上需要通过nginx去配置
#filepath: /usr/local/java-file/ #本地文件存储路径
#fileUrl: http://vankefile.jsonpro.cn/files/ #本地访问上传文件 如果部署到线上需要通过nginx去配置
policy:
expire: 300 # 签名有效期(S)
maxSize: 1024 # 上传文件大小(M)
......
......@@ -32,7 +32,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<!-- <plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
......@@ -58,7 +58,7 @@
</resource>
</resources>
</configuration>
</plugin>
</plugin>-->
</plugins>
</build>
......
......@@ -2,4 +2,4 @@ eureka:
client:
service-url:
# defaultZone: http://localhost:8001/eureka/
defaultZone: http://mall-registry:8002/eureka/
\ No newline at end of file
defaultZone: http://127.0.0.1:8002/eureka/
\ No newline at end of file
......@@ -4,7 +4,7 @@ spring:
application:
name: mall-config
profiles:
active: dev #使用本地配置,要使用git存储改为git即可
active: native #使用本地配置,要使用git存储改为git即可
cloud:
config:
server:
......@@ -12,9 +12,3 @@ spring:
search-locations: classpath:/config/{application}
native: #本地仓库存储
search-locations: classpath:/config/{application}
git: #Git仓库存储
uri: http://git.jsonpro.cn/S2B2C/server.git
username: 349830964@qq.com
password: 2017gzmm
clone-on-start: true
search-paths: '{application}'
......@@ -12,9 +12,9 @@ aliyun:
prefix: mall/images/ # 上传文件夹路径前缀
spring:
datasource:
url: jdbc:mysql://115.29.198.90:3306/haihaigo?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/vanke_download?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: 123
logging:
level:
root: info #日志配置DEBUG,INFO,WARN,ERROR
......
spring:
datasource:
url: jdbc:mysql://115.29.198.90:3306/haihaigo?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/vanke_download?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
data:
mongodb:
host: 129.204.227.14
port: 27017
database: mall-port
password: 123
redis:
host: 129.204.227.14 # Redis服务器地址
host: 127.0.0.1 # Redis服务器地址
database: 0 # Redis数据库索引(默认为0)
port: 6379 # Redis服务器连接端口
password: # Redis服务器连接密码(默认为空)
rabbitmq:
host: 129.204.227.14
port: 5672
virtual-host: /mall
username: mall
password: mall
publisher-confirms: true #如果对异步消息需要回调必须设置为true
# 日志配置
logging:
level:
org.springframework.data.mongodb.core: debug
com.macro.mall.mapper: debug
com.macro.mall.portal.dao: debug
\ No newline at end of file
......@@ -3,21 +3,9 @@ spring:
url: jdbc:mysql://db:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: 2017gzMM
data:
mongodb:
host: mongo
port: 27017
database: mall-port
redis:
host: redis # Redis服务器地址
host: 127.0.0.1 # Redis服务器地址
database: 0 # Redis数据库索引(默认为0)
port: 6379 # Redis服务器连接端口
password: #不设置密码
rabbitmq:
host: rabbit
port: 5672
virtual-host: /mall
username: mall
password: mall
publisher-confirms: true #如果对异步消息需要回调必须设置为true
......@@ -31,7 +31,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<!--<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
......@@ -57,7 +57,7 @@
</resource>
</resources>
</configuration>
</plugin>
</plugin>-->
</plugins>
</build>
......
......@@ -29,11 +29,6 @@
<groupId>com.macro.mall</groupId>
<artifactId>mall-service</artifactId>
</dependency>
<!--mongodb依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<!--redis依赖配置-->
<dependency>
<groupId>org.springframework.boot</groupId>
......
/*
package com.macro.mall.portal.config;
import com.macro.mall.portal.domain.QueueEnum;
......@@ -5,16 +6,20 @@ import org.springframework.amqp.core.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
*/
/**
* 消息队列配置
* Created by macro on 2018/9/14.
*/
*//*
@Configuration
public class RabbitMqConfig {
/**
*/
/**
* 订单消息实际消费队列所绑定的交换机
*/
*//*
@Bean
DirectExchange orderDirect() {
return (DirectExchange) ExchangeBuilder
......@@ -23,9 +28,11 @@ public class RabbitMqConfig {
.build();
}
/**
*/
/**
* 订单延迟队列队列所绑定的交换机
*/
*//*
@Bean
DirectExchange orderTtlDirect() {
return (DirectExchange) ExchangeBuilder
......@@ -34,17 +41,21 @@ public class RabbitMqConfig {
.build();
}
/**
*/
/**
* 订单实际消费队列
*/
*//*
@Bean
public Queue orderQueue() {
return new Queue(QueueEnum.QUEUE_ORDER_CANCEL.getName());
}
/**
*/
/**
* 订单延迟队列(死信队列)
*/
*//*
@Bean
public Queue orderTtlQueue() {
return QueueBuilder
......@@ -54,9 +65,11 @@ public class RabbitMqConfig {
.build();
}
/**
*/
/**
* 将订单队列绑定到交换机
*/
*//*
@Bean
Binding orderBinding(DirectExchange orderDirect,Queue orderQueue){
return BindingBuilder
......@@ -65,9 +78,11 @@ public class RabbitMqConfig {
.with(QueueEnum.QUEUE_ORDER_CANCEL.getRouteKey());
}
/**
*/
/**
* 将订单延迟队列绑定到交换机
*/
*//*
@Bean
Binding orderTtlBinding(DirectExchange orderTtlDirect,Queue orderTtlQueue){
return BindingBuilder
......@@ -77,3 +92,4 @@ public class RabbitMqConfig {
}
}
*/
package com.macro.mall.portal.domain;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import java.util.Date;
......@@ -10,16 +8,11 @@ import java.util.Date;
* 会员关注的品牌
* Created by macro on 2018/8/2.
*/
@Document
public class MemberBrandAttention {
@Id
private String id;
@Indexed
private Long memberId;
private String memberNickname;
private String memberIcon;
@Indexed
private Long brandId;
private String brandName;
private String brandLogo;
private String brandCity;
......@@ -34,13 +27,6 @@ public class MemberBrandAttention {
this.id = id;
}
public Long getMemberId() {
return memberId;
}
public void setMemberId(Long memberId) {
this.memberId = memberId;
}
public String getMemberNickname() {
return memberNickname;
......@@ -58,13 +44,6 @@ public class MemberBrandAttention {
this.memberIcon = memberIcon;
}
public Long getBrandId() {
return brandId;
}
public void setBrandId(Long brandId) {
this.brandId = brandId;
}
public String getBrandName() {
return brandName;
......
package com.macro.mall.portal.repository;
import com.macro.mall.portal.domain.MemberBrandAttention;
import org.springframework.data.mongodb.repository.MongoRepository;
import java.util.List;
......@@ -9,7 +8,7 @@ import java.util.List;
* 会员关注Repository
* Created by macro on 2018/8/2.
*/
public interface MemberBrandAttentionRepository extends MongoRepository<MemberBrandAttention,String> {
public interface MemberBrandAttentionRepository {
MemberBrandAttention findByMemberIdAndBrandId(Long memberId, Long brandId);
int deleteByMemberIdAndBrandId(Long memberId,Long brandId);
List<MemberBrandAttention> findByMemberId(Long memberId);
......
......@@ -9,18 +9,4 @@ import java.util.List;
* Created by macro on 2018/8/2.
*/
public interface MemberAttentionService {
/**
* 添加关注
*/
int add(MemberBrandAttention memberBrandAttention);
/**
* 取消关注
*/
int delete(Long memberId, Long brandId);
/**
* 获取用户关注列表
*/
List<MemberBrandAttention> list(Long memberId);
}
......@@ -14,27 +14,5 @@ import java.util.List;
*/
@Service
public class MemberAttentionServiceImpl implements MemberAttentionService {
@Autowired
private MemberBrandAttentionRepository memberBrandAttentionRepository;
@Override
public int add(MemberBrandAttention memberBrandAttention) {
int count = 0;
MemberBrandAttention findAttention = memberBrandAttentionRepository.findByMemberIdAndBrandId(memberBrandAttention.getMemberId(), memberBrandAttention.getBrandId());
if (findAttention == null) {
memberBrandAttentionRepository.save(memberBrandAttention);
count = 1;
}
return count;
}
@Override
public int delete(Long memberId, Long brandId) {
return memberBrandAttentionRepository.deleteByMemberIdAndBrandId(memberId,brandId);
}
@Override
public List<MemberBrandAttention> list(Long memberId) {
return memberBrandAttentionRepository.findByMemberId(memberId);
}
}
......@@ -2,9 +2,9 @@ server:
port: 8086
spring:
datasource:
url: jdbc:mysql://115.29.198.90:3306/vanke_download?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://127.0.0.1:3306/vanke_download?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
password: 123
druid:
initial-size: 5 #连接池初始化大小
min-idle: 10 #最小空闲连接数
......@@ -20,10 +20,10 @@ spring:
port: 27017
database: mall-port
redis:
host: 115.29.198.90 # Redis服务器地址
host: 127.0.0.1 # Redis服务器地址
database: 0 # Redis数据库索引(默认为0)
port: 6379 # Redis服务器连接端口
password: "sixjust" # Redis服务器连接密码(默认为空)
password: # Redis服务器连接密码(默认为空)
jedis:
pool:
max-active: 8 # 连接池最大连接数(使用负值表示没有限制)
......@@ -31,13 +31,6 @@ spring:
max-idle: 8 # 连接池中的最大空闲连接
min-idle: 0 # 连接池中的最小空闲连接
timeout: 3000ms # 连接超时时间(毫秒)
rabbitmq:
host: 115.29.198.90
port: 5672
virtual-host: my_vhost
username: admin
password: 123456
publisher-confirms: true #如果对异步消息需要回调必须设置为true
jpa:
hibernate:
ddl-auto: none
......@@ -102,11 +95,6 @@ redis:
payOrderId: "portal:payOrderId:"
expire:
authCode: 90 # 验证码超期时间
# 自定义消息队列名称
rabbitmq:
queue:
name:
cancelOrder: cancelOrderQueue
## 微信开放平台
wechat:
open:
......@@ -121,7 +109,9 @@ aliyun:
accessKeySecret: MThxbXZvJC38FxnL6KEr9LDfl0rHjm # 用户用于加密签名字符串和oss用来验证签名字符串的密钥
bucketName: haihaigo # oss的存储空间
filepath: D:/files/ #本地文件存储路径
fileUrl: 192.168.31.127:8401/mall-admin/files/ #本地访问上传文件 如果部署到线上需要通过nginx去配置
fileUrl: 127.0.0.1:8401/mall-admin/files/ #本地访问上传文件 如果部署到线上需要通过nginx去配置
#filepath: /usr/local/java-file/ #本地文件存储路径
#fileUrl: http://vankefile.jsonpro.cn/files/ #本地访问上传文件 如果部署到线上需要通过nginx去配置
policy:
expire: 300 # 签名有效期(S)
......
......@@ -27,7 +27,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<!--<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.maven.plugin.version}</version>
......@@ -53,7 +53,7 @@
</resource>
</resources>
</configuration>
</plugin>
</plugin>-->
</plugins>
</build>
......
......@@ -17,10 +17,10 @@
<if test="typeId != null">
and a.type_id = #{typeId}
</if>
<if test=" queryTime != null and queryTime != ''">
and #{queryTime} = date_format( createtime, '%Y-%m-%d' )
<if test="queryTime != null and queryTime != ''">
and #{queryTime} = date_format( a.createtime, '%Y-%m-%d' )
</if>
<if test=" adminName != null and adminName != ''">
<if test="adminName != null and adminName != ''">
and b.name like CONCAT(#{adminName},'%')
</if>
<if test="isByTime!= null and isByTime == 1">
......
......@@ -33,9 +33,9 @@
<properties>
<skipTests>true</skipTests>
<docker.host>http://115.29.198.90:8375</docker.host>
<!-- <docker.host>http://129.204.227.14:2375</docker.host>-->
<docker.maven.plugin.version>1.1.0</docker.maven.plugin.version>
<!-- <docker.host>http://115.29.198.90:8375</docker.host>
<docker.host>http://129.204.227.14:2375</docker.host>
<docker.maven.plugin.version>1.1.0</docker.maven.plugin.version>-->
<java.version>1.8</java.version>
<spring-cloud.version>Greenwich.SR2</spring-cloud.version>
<pagehelper-starter.version>1.2.10</pagehelper-starter.version>
......@@ -211,13 +211,13 @@
<artifactId>logstash-logback-encoder</artifactId>
<version>${logstash-logback.version}</version>
</dependency>
<!--集成SpringBoot Admin监控-->
<!--集成SpringBoot Admin监控
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
<version>${admin-starter-server.version}</version>
</dependency>
-->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
......
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