Commit 7017c98f authored by Quxl's avatar Quxl

x

parent a201855f
...@@ -4,10 +4,12 @@ import org.springframework.boot.SpringApplication; ...@@ -4,10 +4,12 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching; import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableScheduling
@EnableCaching @EnableCaching
@EnableSwagger2 @EnableSwagger2
@SpringBootApplication @SpringBootApplication
......
...@@ -2,6 +2,7 @@ package com.egolm.shop.config; ...@@ -2,6 +2,7 @@ package com.egolm.shop.config;
import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder; import org.apache.solr.client.solrj.impl.HttpSolrClient.Builder;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
...@@ -9,16 +10,13 @@ import org.springframework.context.annotation.Configuration; ...@@ -9,16 +10,13 @@ import org.springframework.context.annotation.Configuration;
@Configuration @Configuration
public class SolrConfig { public class SolrConfig {
@Value("${solr.baseURL}") @Value("${solr.goods.core-url}")
private String baseURL; private String houseUrl;
@Bean @Bean
public HttpSolrClient httpSolrClient() { @Qualifier("goodsSolrClient")
System.out.println(baseURL); public HttpSolrClient getHouseHttpSolrClient() {
return new Builder().withBaseSolrUrl(baseURL).build(); return new Builder().withBaseSolrUrl(houseUrl).build();
//return new HttpSolrClient(baseURL);
} }
} }
...@@ -369,7 +369,7 @@ public class GoodsServiceImpl implements GoodsService { ...@@ -369,7 +369,7 @@ public class GoodsServiceImpl implements GoodsService {
public String goodsDetail(Map<String, Object> map) { public String goodsDetail(Map<String, Object> map) {
String goodsId=(String) map.get("goodsId"); String goodsId=(String) map.get("goodsId");
String contractNo=(String) map.get("contractNo"); String contractNo=(String) map.get("contractNo");
String sql = "select * from tAgentContractGoods where sContractNO = ? and nGoodsID = ?"; String sql = "select * from tAgentContractGoods where sAgentContractNO = ? and nGoodsID = ?";
Map<String, Object> detail = jdbcTemplate.queryForMap(sql, contractNo, goodsId); Map<String, Object> detail = jdbcTemplate.queryForMap(sql, contractNo, goodsId);
List<Map<String,Object>> picList = goodsPicList(goodsId, contractNo); List<Map<String,Object>> picList = goodsPicList(goodsId, contractNo);
return Rjx.jsonOk().set("goodsDetail", detail).set("imgGroup", picList).toJson(); return Rjx.jsonOk().set("goodsDetail", detail).set("imgGroup", picList).toJson();
......
...@@ -2,3 +2,12 @@ spring.profiles.active=dev ...@@ -2,3 +2,12 @@ spring.profiles.active=dev
spring.messages.basename=messages spring.messages.basename=messages
###版本号 ###版本号
maven.build.timestamp=@maven.build.timestamp@ maven.build.timestamp=@maven.build.timestamp@
sql.house.create-index-query= sql/goods/create-index-query.sql
sql.house.delete-index-query= sql/goods/delete-index-query.sql
sql.house.update-index-query= sql/goods/update-index-query.sql
solr.house.core-url= http://10.10.0.15:8983/solr/house
solr.house.offset-minute-for-day: 1500
solr.house.offset-minute-for-minute: 10
solr.house.cron-for-day: 0 0 3 * * ?
solr.house.cron-for-minute: 0 * * * * ?
\ No newline at end of file
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