Commit 7017c98f authored by Quxl's avatar Quxl

x

parent a201855f
......@@ -4,10 +4,12 @@ import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.ApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableScheduling
@EnableCaching
@EnableSwagger2
@SpringBootApplication
......
......@@ -2,23 +2,21 @@ package com.egolm.shop.config;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
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.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class SolrConfig {
@Value("${solr.baseURL}")
private String baseURL;
@Value("${solr.goods.core-url}")
private String houseUrl;
@Bean
public HttpSolrClient httpSolrClient() {
System.out.println(baseURL);
return new Builder().withBaseSolrUrl(baseURL).build();
//return new HttpSolrClient(baseURL);
@Qualifier("goodsSolrClient")
public HttpSolrClient getHouseHttpSolrClient() {
return new Builder().withBaseSolrUrl(houseUrl).build();
}
}
......@@ -369,7 +369,7 @@ public class GoodsServiceImpl implements GoodsService {
public String goodsDetail(Map<String, Object> map) {
String goodsId=(String) map.get("goodsId");
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);
List<Map<String,Object>> picList = goodsPicList(goodsId, contractNo);
return Rjx.jsonOk().set("goodsDetail", detail).set("imgGroup", picList).toJson();
......
spring.profiles.active=dev
spring.messages.basename=messages
###版本号
maven.build.timestamp=@maven.build.timestamp@
\ No newline at end of file
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