Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
S
shop
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
曲欣亮
shop
Commits
7017c98f
Commit
7017c98f
authored
Sep 17, 2019
by
Quxl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
parent
a201855f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
11 deletions
+20
-11
ShopApplication.java
src/main/java/com/egolm/shop/ShopApplication.java
+2
-0
SolrConfig.java
src/main/java/com/egolm/shop/config/SolrConfig.java
+7
-9
GoodsServiceImpl.java
...in/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
+1
-1
application.properties
src/main/resources/application.properties
+10
-1
No files found.
src/main/java/com/egolm/shop/ShopApplication.java
View file @
7017c98f
...
@@ -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
...
...
src/main/java/com/egolm/shop/config/SolrConfig.java
View file @
7017c98f
...
@@ -2,23 +2,21 @@ package com.egolm.shop.config;
...
@@ -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
;
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
;
@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);
}
}
}
}
src/main/java/com/egolm/shop/service/impl/GoodsServiceImpl.java
View file @
7017c98f
...
@@ -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 s
Agent
ContractNO = ? 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
();
...
...
src/main/resources/application.properties
View file @
7017c98f
spring.profiles.active
=
dev
spring.profiles.active
=
dev
spring.messages.basename
=
messages
spring.messages.basename
=
messages
###版本号
###版本号
maven.build.timestamp
=
@maven.build.timestamp@
maven.build.timestamp
=
@maven.build.timestamp@
\ No newline at end of file
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment