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
46a8baa6
Commit
46a8baa6
authored
Oct 19, 2023
by
张永
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
V1.1.2
parent
daa77baa
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1081 additions
and
529 deletions
+1081
-529
pom.xml
pom.xml
+5
-1
ShopApplication.java
src/main/java/com/egolm/shop/ShopApplication.java
+2
-0
ActivityController.java
src/main/java/com/egolm/shop/api/ActivityController.java
+4
-1
AddressController.java
src/main/java/com/egolm/shop/api/AddressController.java
+218
-211
BrandController.java
src/main/java/com/egolm/shop/api/BrandController.java
+10
-0
CartController.java
src/main/java/com/egolm/shop/api/CartController.java
+9
-0
CategoryController.java
src/main/java/com/egolm/shop/api/CategoryController.java
+75
-72
CommonController.java
src/main/java/com/egolm/shop/api/CommonController.java
+7
-0
CouponController.java
src/main/java/com/egolm/shop/api/CouponController.java
+154
-150
ExpressController.java
src/main/java/com/egolm/shop/api/ExpressController.java
+42
-40
GoodsController.java
src/main/java/com/egolm/shop/api/GoodsController.java
+8
-0
OrderController.java
src/main/java/com/egolm/shop/api/OrderController.java
+17
-0
PageController.java
src/main/java/com/egolm/shop/api/PageController.java
+4
-0
PayNotifyController.java
src/main/java/com/egolm/shop/api/PayNotifyController.java
+2
-0
PromoController.java
src/main/java/com/egolm/shop/api/PromoController.java
+3
-0
SystemCtrlController.java
src/main/java/com/egolm/shop/api/SystemCtrlController.java
+53
-51
UserController.java
src/main/java/com/egolm/shop/api/UserController.java
+15
-0
YunController.java
src/main/java/com/egolm/shop/api/YunController.java
+2
-0
TIdcServicesLogs.java
src/main/java/com/egolm/shop/bean/TIdcServicesLogs.java
+228
-0
IDCLogResource.java
.../java/com/egolm/shop/common/component/IDCLogResource.java
+44
-0
IDCSystemLogAspect.java
...a/com/egolm/shop/common/component/IDCSystemLogAspect.java
+134
-0
ShopUtil.java
src/main/java/com/egolm/shop/common/utils/ShopUtil.java
+40
-0
application.properties
src/main/resources/application.properties
+2
-2
redmine.html
src/main/resources/templates/redmine.html
+3
-1
No files found.
pom.xml
View file @
46a8baa6
...
@@ -33,7 +33,11 @@
...
@@ -33,7 +33,11 @@
<artifactId>
spring-boot-devtools
</artifactId>
<artifactId>
spring-boot-devtools
</artifactId>
<optional>
true
</optional>
<optional>
true
</optional>
</dependency>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-core
</artifactId>
<artifactId>
spring-security-core
</artifactId>
...
...
src/main/java/com/egolm/shop/ShopApplication.java
View file @
46a8baa6
...
@@ -6,6 +6,7 @@ import org.slf4j.Logger;
...
@@ -6,6 +6,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
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.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableAsync
;
...
@@ -20,6 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -20,6 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCaching
@EnableCaching
@EnableSwagger2
@EnableSwagger2
@SpringBootApplication
@SpringBootApplication
@ServletComponentScan
@EnableTransactionManagement
@EnableTransactionManagement
public
class
ShopApplication
{
public
class
ShopApplication
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ShopApplication
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ShopApplication
.
class
);
...
...
src/main/java/com/egolm/shop/api/ActivityController.java
View file @
46a8baa6
...
@@ -17,8 +17,9 @@ import com.egolm.common.StringUtil;
...
@@ -17,8 +17,9 @@ import com.egolm.common.StringUtil;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.ActivityService
;
import
com.egolm.shop.api.service.ActivityService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
...
@@ -42,6 +43,7 @@ public class ActivityController {
...
@@ -42,6 +43,7 @@ public class ActivityController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
})
@RequestMapping
(
value
=
"/crowdFundingProjectList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/crowdFundingProjectList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"众筹项目列表"
)
public
String
crowdFundingProjectList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
crowdFundingProjectList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
index
=
request
.
getParameter
(
"index"
);
String
index
=
request
.
getParameter
(
"index"
);
...
@@ -76,6 +78,7 @@ public class ActivityController {
...
@@ -76,6 +78,7 @@ public class ActivityController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
})
})
@RequestMapping
(
value
=
"/crowdFundingProjectDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/crowdFundingProjectDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"众筹项目下的商品列表"
)
public
String
crowdFundingProjectDetail
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
crowdFundingProjectDetail
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
projectId
=
request
.
getParameter
(
"projectId"
);
String
projectId
=
request
.
getParameter
(
"projectId"
);
String
orgNo
=
request
.
getParameter
(
"orgNo"
);
String
orgNo
=
request
.
getParameter
(
"orgNo"
);
...
...
src/main/java/com/egolm/shop/api/AddressController.java
View file @
46a8baa6
package
com
.
egolm
.
shop
.
api
;
package
com
.
egolm
.
shop
.
api
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.AddressService
;
import
com.egolm.shop.api.service.AddressService
;
import
com.egolm.shop.bean.TCustAddress
;
import
com.egolm.shop.bean.TCustAddress
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"地址相关接口"
})
@RestController
@Api
(
tags
={
"地址相关接口"
})
@RequestMapping
(
"address"
)
@RestController
public
class
AddressController
{
@RequestMapping
(
"address"
)
public
class
AddressController
{
@Autowired
private
AddressService
addressService
;
@Autowired
private
AddressService
addressService
;
@ApiOperation
(
"地址列表"
)
@ApiImplicitParams
({
@ApiOperation
(
"地址列表"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"index"
,
dataType
=
"int"
,
required
=
true
,
value
=
"页码"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"index"
,
dataType
=
"int"
,
required
=
true
,
value
=
"页码"
,
defaultValue
=
"1"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
})
public
String
list
(
HttpServletRequest
request
)
{
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
@IDCLogResource
(
name
=
"地址列表"
)
String
userNO
=
request
.
getParameter
(
"userNO"
);
public
String
list
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
index
=
request
.
getParameter
(
"index"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
limit
=
request
.
getParameter
(
"limit"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
index
=
request
.
getParameter
(
"index"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
String
limit
=
request
.
getParameter
(
"limit"
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"userNO"
,
userNO
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"shopNO"
,
shopNO
);
Page
page
=
new
Page
();
params
.
put
(
"userNO"
,
userNO
);
page
.
setIndex
(
Long
.
valueOf
(
index
));
page
.
setLimit
(
Long
.
valueOf
(
limit
));
Page
page
=
new
Page
();
page
.
setLimitKey
(
" tag DESC ,lastUpdateTime desc "
);
page
.
setIndex
(
Long
.
valueOf
(
index
));
page
.
setLimit
(
Long
.
valueOf
(
limit
));
List
<
Map
<
String
,
Object
>>
list
=
addressService
.
query
(
params
,
page
);
page
.
setLimitKey
(
" tag DESC ,lastUpdateTime desc "
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
List
<
Map
<
String
,
Object
>>
list
=
addressService
.
query
(
params
,
page
);
}
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
}
@ApiOperation
(
"新增或修改"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"地址ID,修改是不能为空"
,
defaultValue
=
""
),
@ApiOperation
(
"新增或修改"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
false
,
value
=
"地址ID,修改是不能为空"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addrName"
,
dataType
=
"String"
,
required
=
false
,
value
=
"地址别名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"provinceID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"省编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"province"
,
dataType
=
"String"
,
required
=
true
,
value
=
"省"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addrName"
,
dataType
=
"String"
,
required
=
false
,
value
=
"地址别名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"cityID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"市编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"provinceID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"省编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"city"
,
dataType
=
"String"
,
required
=
true
,
value
=
"市"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"province"
,
dataType
=
"String"
,
required
=
true
,
value
=
"省"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"districtID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"区编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"cityID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"市编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"district"
,
dataType
=
"String"
,
required
=
true
,
value
=
"区"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"city"
,
dataType
=
"String"
,
required
=
true
,
value
=
"市"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"streetID"
,
dataType
=
"String"
,
value
=
"街道编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"districtID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"区编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"street"
,
dataType
=
"String"
,
value
=
"街道"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"district"
,
dataType
=
"String"
,
required
=
true
,
value
=
"区"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contacts"
,
dataType
=
"String"
,
required
=
true
,
value
=
"联系人"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"streetID"
,
dataType
=
"String"
,
value
=
"街道编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"address"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"street"
,
dataType
=
"String"
,
value
=
"街道"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"postCode"
,
dataType
=
"String"
,
value
=
"邮编"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contacts"
,
dataType
=
"String"
,
required
=
true
,
value
=
"联系人"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"mobile"
,
dataType
=
"String"
,
required
=
true
,
value
=
"手机号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"address"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tel"
,
dataType
=
"String"
,
required
=
true
,
value
=
"联系电话"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"postCode"
,
dataType
=
"String"
,
value
=
"邮编"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"mobile"
,
dataType
=
"String"
,
required
=
true
,
value
=
"手机号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tel"
,
dataType
=
"String"
,
required
=
true
,
value
=
"联系电话"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@RequestMapping
(
value
=
"/saveOrUpdate"
,
method
=
RequestMethod
.
POST
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
public
String
saveOrUpdate
(
HttpServletRequest
request
)
{
})
String
addId
=
request
.
getParameter
(
"addId"
);
@RequestMapping
(
value
=
"/saveOrUpdate"
,
method
=
RequestMethod
.
POST
)
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
@IDCLogResource
(
name
=
"新增或修改"
)
String
userNO
=
request
.
getParameter
(
"userNO"
);
public
String
saveOrUpdate
(
HttpServletRequest
request
)
{
String
addrName
=
request
.
getParameter
(
"addrName"
);
String
addId
=
request
.
getParameter
(
"addId"
);
String
provinceID
=
request
.
getParameter
(
"provinceID"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
province
=
request
.
getParameter
(
"province"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
cityID
=
request
.
getParameter
(
"cityID"
);
String
addrName
=
request
.
getParameter
(
"addrName"
);
String
city
=
request
.
getParameter
(
"city"
);
String
provinceID
=
request
.
getParameter
(
"provinceID"
);
String
districtID
=
request
.
getParameter
(
"districtID"
);
String
province
=
request
.
getParameter
(
"province"
);
String
district
=
request
.
getParameter
(
"district"
);
String
cityID
=
request
.
getParameter
(
"cityID"
);
String
streetID
=
request
.
getParameter
(
"streetID"
);
String
city
=
request
.
getParameter
(
"city"
);
String
street
=
request
.
getParameter
(
"street"
);
String
districtID
=
request
.
getParameter
(
"districtID"
);
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
district
=
request
.
getParameter
(
"district"
);
String
tel
=
request
.
getParameter
(
"tel"
);
String
streetID
=
request
.
getParameter
(
"streetID"
);
String
contacts
=
request
.
getParameter
(
"contacts"
);
String
street
=
request
.
getParameter
(
"street"
);
String
postCode
=
request
.
getParameter
(
"postCode"
);
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
address
=
request
.
getParameter
(
"address"
);
String
tel
=
request
.
getParameter
(
"tel"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
contacts
=
request
.
getParameter
(
"contacts"
);
String
postCode
=
request
.
getParameter
(
"postCode"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
String
address
=
request
.
getParameter
(
"address"
);
params
.
put
(
"addId"
,
addId
);
String
langID
=
request
.
getParameter
(
"langID"
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"userNO"
,
userNO
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"addrName"
,
addrName
);
params
.
put
(
"addId"
,
addId
);
params
.
put
(
"provinceID"
,
provinceID
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"province"
,
province
);
params
.
put
(
"userNO"
,
userNO
);
params
.
put
(
"cityID"
,
cityID
);
params
.
put
(
"addrName"
,
addrName
);
params
.
put
(
"city"
,
city
);
params
.
put
(
"provinceID"
,
provinceID
);
params
.
put
(
"districtID"
,
districtID
);
params
.
put
(
"province"
,
province
);
params
.
put
(
"district"
,
district
);
params
.
put
(
"cityID"
,
cityID
);
params
.
put
(
"streetID"
,
streetID
);
params
.
put
(
"city"
,
city
);
params
.
put
(
"street"
,
street
);
params
.
put
(
"districtID"
,
districtID
);
params
.
put
(
"mobile"
,
mobile
);
params
.
put
(
"district"
,
district
);
params
.
put
(
"tel"
,
tel
);
params
.
put
(
"streetID"
,
streetID
);
params
.
put
(
"contacts"
,
contacts
);
params
.
put
(
"street"
,
street
);
params
.
put
(
"postCode"
,
postCode
);
params
.
put
(
"mobile"
,
mobile
);
params
.
put
(
"address"
,
address
);
params
.
put
(
"tel"
,
tel
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"contacts"
,
contacts
);
params
.
put
(
"postCode"
,
postCode
);
return
addressService
.
saveOrUpdate
(
params
);
params
.
put
(
"address"
,
address
);
}
params
.
put
(
"langID"
,
langID
);
return
addressService
.
saveOrUpdate
(
params
);
@ApiOperation
(
"删除"
)
}
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiOperation
(
"删除"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址ID"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址ID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
public
String
delete
(
HttpServletRequest
request
)
{
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
String
addId
=
request
.
getParameter
(
"addId"
);
})
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
String
userNO
=
request
.
getParameter
(
"userNO"
);
@IDCLogResource
(
name
=
"删除"
)
String
langID
=
request
.
getParameter
(
"langID"
);
public
String
delete
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
return
addressService
.
delete
(
addId
,
userNO
,
shopNO
,
langID
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
}
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
langID
=
request
.
getParameter
(
"langID"
);
@ApiOperation
(
"设置或取消默认"
)
@ApiImplicitParams
({
return
addressService
.
delete
(
addId
,
userNO
,
shopNO
,
langID
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
}
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址ID"
,
defaultValue
=
""
),
@ApiOperation
(
"设置或取消默认"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"type"
,
dataType
=
"String"
,
required
=
true
,
value
=
"操作类型 0为取消默认 ,2为设置默认"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址ID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"type"
,
dataType
=
"String"
,
required
=
true
,
value
=
"操作类型 0为取消默认 ,2为设置默认"
,
defaultValue
=
""
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@RequestMapping
(
value
=
"/defaultAdd"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
public
String
defaultAdd
(
HttpServletRequest
request
)
{
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
String
addId
=
request
.
getParameter
(
"addId"
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
})
String
type
=
request
.
getParameter
(
"type"
);
@RequestMapping
(
value
=
"/defaultAdd"
,
method
=
RequestMethod
.
GET
)
String
userNO
=
request
.
getParameter
(
"userNO"
);
@IDCLogResource
(
name
=
"设置或取消默认"
)
String
langID
=
request
.
getParameter
(
"langID"
);
public
String
defaultAdd
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
return
addressService
.
defaultAdd
(
addId
,
userNO
,
shopNO
,
type
,
langID
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
}
String
type
=
request
.
getParameter
(
"type"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
langID
=
request
.
getParameter
(
"langID"
);
@ApiOperation
(
"地址详情"
)
@ApiImplicitParams
({
return
addressService
.
defaultAdd
(
addId
,
userNO
,
shopNO
,
type
,
langID
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址ID"
,
defaultValue
=
""
),
}
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiOperation
(
"地址详情"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParams
({
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"addId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"地址ID"
,
defaultValue
=
""
),
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
public
String
detail
(
HttpServletRequest
request
)
{
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
String
addId
=
request
.
getParameter
(
"addId"
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
String
langID
=
request
.
getParameter
(
"langID"
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
TCustAddress
custAddress
=
addressService
.
getAddById
(
addId
);
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
return
Rjx
.
jsonOk
().
set
(
"detail"
,
custAddress
).
toJson
();
@IDCLogResource
(
name
=
"地址详情"
)
}
public
String
detail
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
String
langID
=
request
.
getParameter
(
"langID"
);
@ApiOperation
(
"获取默认地址"
)
@ApiImplicitParams
({
TCustAddress
custAddress
=
addressService
.
getAddById
(
addId
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
return
Rjx
.
jsonOk
().
set
(
"detail"
,
custAddress
).
toJson
();
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
}
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiOperation
(
"获取默认地址"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParams
({
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@RequestMapping
(
value
=
"/getDefaultAddress"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
public
String
getDefaultAddress
(
String
custNo
,
String
shopNo
)
{
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
Map
<
String
,
Object
>
map
=
addressService
.
getDefaultAddress
(
custNo
,
shopNo
);
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
return
Rjx
.
jsonOk
().
setData
(
map
).
toJson
();
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
}
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
}
@RequestMapping
(
value
=
"/getDefaultAddress"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取默认地址"
)
public
String
getDefaultAddress
(
String
custNo
,
String
shopNo
)
{
Map
<
String
,
Object
>
map
=
addressService
.
getDefaultAddress
(
custNo
,
shopNo
);
return
Rjx
.
jsonOk
().
setData
(
map
).
toJson
();
}
}
src/main/java/com/egolm/shop/api/BrandController.java
View file @
46a8baa6
...
@@ -18,6 +18,7 @@ import com.egolm.common.StringUtil;
...
@@ -18,6 +18,7 @@ import com.egolm.common.StringUtil;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.BrandService
;
import
com.egolm.shop.api.service.BrandService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -45,6 +46,7 @@ public class BrandController {
...
@@ -45,6 +46,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getBanner"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getBanner"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"首页Banner图片"
)
public
String
getBanner
(
HttpServletRequest
request
)
{
public
String
getBanner
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
...
@@ -82,6 +84,7 @@ public class BrandController {
...
@@ -82,6 +84,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getGroupBrandList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getGroupBrandList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"品牌列表接口按首字母"
)
public
String
getGroupBrandList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
getGroupBrandList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
List
<
Map
<
String
,
Object
>>
listMap
;
listMap
=
brandService
.
queryBrandList
(
request
.
getParameter
(
"orgNo"
));
listMap
=
brandService
.
queryBrandList
(
request
.
getParameter
(
"orgNo"
));
...
@@ -129,6 +132,7 @@ public class BrandController {
...
@@ -129,6 +132,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getBrandList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getBrandList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取品牌列表"
)
public
String
getBrandList
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
getBrandList
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
returnList
=
brandService
.
queryBrandList
(
orgNo
);
List
<
Map
<
String
,
Object
>>
returnList
=
brandService
.
queryBrandList
(
orgNo
);
List
<
String
>
cs
=
new
ArrayList
<
String
>();
List
<
String
>
cs
=
new
ArrayList
<
String
>();
...
@@ -151,6 +155,7 @@ public class BrandController {
...
@@ -151,6 +155,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getHotSaleBrands"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getHotSaleBrands"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热销品牌列表"
)
public
String
getHotSaleBrands
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
getHotSaleBrands
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
List
<
Map
<
String
,
Object
>>
listMap
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -178,6 +183,7 @@ public class BrandController {
...
@@ -178,6 +183,7 @@ public class BrandController {
})
})
@RequestMapping
(
value
=
"/hotIPList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/hotIPList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热门IP列表"
)
public
String
hotIPList
(
HttpServletRequest
request
)
{
public
String
hotIPList
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
comId
=
request
.
getParameter
(
"comId"
);
String
comId
=
request
.
getParameter
(
"comId"
);
...
@@ -213,6 +219,7 @@ public class BrandController {
...
@@ -213,6 +219,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
),
})
})
@RequestMapping
(
value
=
"/hotIPDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/hotIPDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热门IP详情"
)
public
String
hotIPDetail
(
HttpServletRequest
request
)
{
public
String
hotIPDetail
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
ipId
=
request
.
getParameter
(
"ipId"
);
String
ipId
=
request
.
getParameter
(
"ipId"
);
...
@@ -248,6 +255,7 @@ public class BrandController {
...
@@ -248,6 +255,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contact"
,
dataType
=
"String"
,
required
=
false
,
value
=
"contact"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contact"
,
dataType
=
"String"
,
required
=
false
,
value
=
"contact"
,
defaultValue
=
""
),
})
})
@RequestMapping
(
value
=
"/saveAuthorizationIP"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/saveAuthorizationIP"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"IP授权保存"
)
public
String
authorizationIP
(
HttpServletRequest
request
)
{
public
String
authorizationIP
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
ipId
=
request
.
getParameter
(
"ipId"
);
String
ipId
=
request
.
getParameter
(
"ipId"
);
...
@@ -279,6 +287,7 @@ public class BrandController {
...
@@ -279,6 +287,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编号"
,
defaultValue
=
""
),
})
})
@RequestMapping
(
value
=
"/authorizationIPList"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/authorizationIPList"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"获取IP授权列表"
)
public
Object
authorizationIPList
(
String
custNo
,
String
orgNo
)
{
public
Object
authorizationIPList
(
String
custNo
,
String
orgNo
)
{
List
<
Map
<
String
,
Object
>>
list
=
brandService
.
queryAuthorizationIPList
(
custNo
,
orgNo
);
List
<
Map
<
String
,
Object
>>
list
=
brandService
.
queryAuthorizationIPList
(
custNo
,
orgNo
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
...
@@ -294,6 +303,7 @@ public class BrandController {
...
@@ -294,6 +303,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"brandId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"品牌ID"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"brandId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"品牌ID"
,
defaultValue
=
""
),
})
})
@RequestMapping
(
value
=
"/authorizationIPDetail"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/authorizationIPDetail"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"获取IP授权详情"
)
public
Object
authorizationIPDetail
(
String
custNo
,
String
brandId
,
String
orgNo
)
{
public
Object
authorizationIPDetail
(
String
custNo
,
String
brandId
,
String
orgNo
)
{
Map
<
String
,
Object
>
map
=
brandService
.
queryAuthorizationIPDetail
(
custNo
,
brandId
,
orgNo
);
Map
<
String
,
Object
>
map
=
brandService
.
queryAuthorizationIPDetail
(
custNo
,
brandId
,
orgNo
);
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
...
...
src/main/java/com/egolm/shop/api/CartController.java
View file @
46a8baa6
...
@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSONObject;
...
@@ -15,6 +15,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.CartService
;
import
com.egolm.shop.api.service.CartService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -40,6 +41,7 @@ public class CartController {
...
@@ -40,6 +41,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/getCartCount"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCartCount"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"购物车商品种类数量"
)
public
String
cartQuery
(
String
orgNo
,
String
shopNo
)
{
public
String
cartQuery
(
String
orgNo
,
String
shopNo
)
{
Map
<
String
,
Object
>
map
=
cartService
.
count
(
orgNo
,
shopNo
);
Map
<
String
,
Object
>
map
=
cartService
.
count
(
orgNo
,
shopNo
);
return
Rjx
.
jsonOk
().
set
(
"count"
,
map
.
get
(
"totalCount"
)).
set
(
"qty"
,
map
.
get
(
"totalSaleQty"
)).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"count"
,
map
.
get
(
"totalCount"
)).
set
(
"qty"
,
map
.
get
(
"totalSaleQty"
)).
toJson
();
...
@@ -58,6 +60,7 @@ public class CartController {
...
@@ -58,6 +60,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/cartQuery"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/cartQuery"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"购物车信息"
)
public
String
cartQuery
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
cartQuery
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
isCaclPromo
=
request
.
getParameter
(
"isCalcPromo"
);
String
isCaclPromo
=
request
.
getParameter
(
"isCalcPromo"
);
if
(
StringUtil
.
isNotUndefinedAndNull
(
isCaclPromo
)
&&
StringUtil
.
isNotEmpty
(
isCaclPromo
))
{
if
(
StringUtil
.
isNotUndefinedAndNull
(
isCaclPromo
)
&&
StringUtil
.
isNotEmpty
(
isCaclPromo
))
{
...
@@ -87,6 +90,7 @@ public class CartController {
...
@@ -87,6 +90,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/appendCart"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@RequestMapping
(
value
=
"/appendCart"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@IDCLogResource
(
name
=
"加入购物车(JSON格式)"
)
public
String
appendCart
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
appendCart
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
@@ -108,6 +112,7 @@ public class CartController {
...
@@ -108,6 +112,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/remove"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/remove"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"删除购物车(JSON格式)"
)
public
String
remove
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
remove
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
@@ -126,6 +131,7 @@ public class CartController {
...
@@ -126,6 +131,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/updateQty"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateQty"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改数量(JSON格式)"
)
public
String
updateQty
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
updateQty
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
@@ -145,6 +151,7 @@ public class CartController {
...
@@ -145,6 +151,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/updateSelected"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/updateSelected"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"增加可选择商品去结算(JSON格式)"
)
public
String
updateSelected
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
updateSelected
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
@@ -164,6 +171,7 @@ public class CartController {
...
@@ -164,6 +171,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/setPrice"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/setPrice"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改价格(JSON格式)"
)
public
String
setPrice
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
setPrice
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
@@ -185,6 +193,7 @@ public class CartController {
...
@@ -185,6 +193,7 @@ public class CartController {
})
})
@RequestMapping
(
value
=
"/clear"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/clear"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"清空购物车"
)
public
String
clear
(
String
orgNo
,
String
shopNo
)
{
public
String
clear
(
String
orgNo
,
String
shopNo
)
{
cartService
.
clear
(
orgNo
,
shopNo
);
cartService
.
clear
(
orgNo
,
shopNo
);
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
...
...
src/main/java/com/egolm/shop/api/CategoryController.java
View file @
46a8baa6
package
com
.
egolm
.
shop
.
api
;
package
com
.
egolm
.
shop
.
api
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.CategoryService
;
import
com.egolm.shop.api.service.CategoryService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"分类相关接口"
})
@RestController
@Api
(
tags
={
"分类相关接口"
})
@RequestMapping
(
"category"
)
@RestController
public
class
CategoryController
{
@RequestMapping
(
"category"
)
public
class
CategoryController
{
@Autowired
private
CategoryService
categoryService
;
@Autowired
private
CategoryService
categoryService
;
@ApiOperation
(
"分类列表(按Level查询)"
)
@ApiImplicitParams
({
@ApiOperation
(
"分类列表(按Level查询)"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"level"
,
dataType
=
"int"
,
required
=
true
,
value
=
"级别"
,
defaultValue
=
"3"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"level"
,
dataType
=
"int"
,
required
=
true
,
value
=
"级别"
,
defaultValue
=
"3"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"scopeTypeID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺类型"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"scopeTypeID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺类型"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@RequestMapping
(
value
=
"/queryCategoryByLevel"
,
method
=
RequestMethod
.
GET
)
})
public
String
queryCategoryByLevel
(
String
orgNo
,
String
scopeTypeID
,
Integer
level
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
@RequestMapping
(
value
=
"/queryCategoryByLevel"
,
method
=
RequestMethod
.
GET
)
List
<
Map
<
String
,
Object
>>
list
=
categoryService
.
queryCategoryByLevel
(
orgNo
,
scopeTypeID
,
level
);
@IDCLogResource
(
name
=
"分类列表(按Level查询)"
)
List
<
String
>
cs
=
new
ArrayList
<
String
>();
public
String
queryCategoryByLevel
(
String
orgNo
,
String
scopeTypeID
,
Integer
level
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
for
(
Map
<
String
,
Object
>
map
:
list
)
{
List
<
Map
<
String
,
Object
>>
list
=
categoryService
.
queryCategoryByLevel
(
orgNo
,
scopeTypeID
,
level
);
cs
.
add
((
String
)
map
.
get
(
"sCategoryDesc"
));
List
<
String
>
cs
=
new
ArrayList
<
String
>();
}
for
(
Map
<
String
,
Object
>
map
:
list
)
{
return
Rjx
.
jsonOk
().
set
(
"keys"
,
cs
).
set
(
"list"
,
list
).
toJson
();
cs
.
add
((
String
)
map
.
get
(
"sCategoryDesc"
));
}
}
return
Rjx
.
jsonOk
().
set
(
"keys"
,
cs
).
set
(
"list"
,
list
).
toJson
();
@ApiOperation
(
"分类列表(按上级分类查询)"
)
}
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"upCategoryNo"
,
dataType
=
"int"
,
required
=
true
,
value
=
"上级分类编码"
,
defaultValue
=
"3"
),
@ApiOperation
(
"分类列表(按上级分类查询)"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"scopeTypeID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺类型"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"upCategoryNo"
,
dataType
=
"int"
,
required
=
true
,
value
=
"上级分类编码"
,
defaultValue
=
"3"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"scopeTypeID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"店铺类型"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@RequestMapping
(
value
=
"/queryCategory"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
public
String
queryCategory
(
String
orgNo
,
String
scopeTypeID
,
Integer
level
,
String
upCategoryNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
})
List
<
Map
<
String
,
Object
>>
list
=
categoryService
.
queryCategory
(
orgNo
,
scopeTypeID
,
upCategoryNo
);
@RequestMapping
(
value
=
"/queryCategory"
,
method
=
RequestMethod
.
GET
)
List
<
String
>
cs
=
new
ArrayList
<
String
>();
@IDCLogResource
(
name
=
"分类列表(按上级分类查询)"
)
for
(
Map
<
String
,
Object
>
map
:
list
)
{
public
String
queryCategory
(
String
orgNo
,
String
scopeTypeID
,
Integer
level
,
String
upCategoryNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
cs
.
add
((
String
)
map
.
get
(
"sCategoryDesc"
));
List
<
Map
<
String
,
Object
>>
list
=
categoryService
.
queryCategory
(
orgNo
,
scopeTypeID
,
upCategoryNo
);
}
List
<
String
>
cs
=
new
ArrayList
<
String
>();
return
Rjx
.
jsonOk
().
set
(
"keys"
,
cs
).
set
(
"list"
,
list
).
toJson
();
for
(
Map
<
String
,
Object
>
map
:
list
)
{
}
cs
.
add
((
String
)
map
.
get
(
"sCategoryDesc"
));
}
return
Rjx
.
jsonOk
().
set
(
"keys"
,
cs
).
set
(
"list"
,
list
).
toJson
();
}
}
}
src/main/java/com/egolm/shop/api/CommonController.java
View file @
46a8baa6
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.shop.api.service.CommonService
;
import
com.egolm.shop.api.service.CommonService
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -44,6 +45,7 @@ public class CommonController {
...
@@ -44,6 +45,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/queryDistrictByOrgNO"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryDistrictByOrgNO"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"组织构购获取省市区"
)
public
String
queryDistrictByOrgNO
(
HttpServletRequest
request
)
{
public
String
queryDistrictByOrgNO
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
langID
=
request
.
getParameter
(
"langID"
);
...
@@ -58,6 +60,7 @@ public class CommonController {
...
@@ -58,6 +60,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getOpenCity"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getOpenCity"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取已开通的城市"
)
public
String
getOpenCity
(
HttpServletRequest
request
)
{
public
String
getOpenCity
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
String
langID
=
request
.
getParameter
(
"langID"
);
return
commonService
.
getOpenCity
(
langID
);
return
commonService
.
getOpenCity
(
langID
);
...
@@ -72,6 +75,7 @@ public class CommonController {
...
@@ -72,6 +75,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getCommonArgs"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCommonArgs"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取共同参数"
)
public
String
getCommonArgs
(
HttpServletRequest
request
)
{
public
String
getCommonArgs
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
commonNo
=
request
.
getParameter
(
"commonNo"
);
String
commonNo
=
request
.
getParameter
(
"commonNo"
);
...
@@ -88,6 +92,7 @@ public class CommonController {
...
@@ -88,6 +92,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getPayTypeList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getPayTypeList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取付款方式"
)
public
String
getPayTypeList
(
HttpServletRequest
request
)
{
public
String
getPayTypeList
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
shopNo
=
request
.
getParameter
(
"shopNo"
);
String
shopNo
=
request
.
getParameter
(
"shopNo"
);
...
@@ -111,6 +116,7 @@ public class CommonController {
...
@@ -111,6 +116,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getRegionList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getRegionList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取省市区数据"
)
public
String
getCityListByProvince
(
String
regionNo
)
{
public
String
getCityListByProvince
(
String
regionNo
)
{
if
(
StringUtil
.
isBlank
(
regionNo
))
{
if
(
StringUtil
.
isBlank
(
regionNo
))
{
regionNo
=
"000000"
;
regionNo
=
"000000"
;
...
@@ -130,6 +136,7 @@ public class CommonController {
...
@@ -130,6 +136,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getConfig"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getConfig"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取配置信息"
)
public
Object
getConfig
(
String
appId
,
String
orgNo
,
String
agentID
)
{
public
Object
getConfig
(
String
appId
,
String
orgNo
,
String
agentID
)
{
Map
<
String
,
Object
>
map
=
null
;
Map
<
String
,
Object
>
map
=
null
;
try
{
try
{
...
...
src/main/java/com/egolm/shop/api/CouponController.java
View file @
46a8baa6
package
com
.
egolm
.
shop
.
api
;
package
com
.
egolm
.
shop
.
api
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.CouponService
;
import
com.egolm.shop.api.service.CouponService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"优惠券相关接口"
})
@RestController
@Api
(
tags
={
"优惠券相关接口"
})
@RequestMapping
(
"coupon"
)
@RestController
public
class
CouponController
{
@RequestMapping
(
"coupon"
)
public
class
CouponController
{
@Autowired
private
CouponService
couponService
;
@Autowired
private
CouponService
couponService
;
@ApiOperation
(
"查询所有可领取券制券单列表"
)
@ApiImplicitParams
({
@ApiOperation
(
"查询所有可领取券制券单列表"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tradeDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"查询日期"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tradeDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"查询日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@RequestMapping
(
value
=
"/allCoupon"
,
method
=
RequestMethod
.
GET
)
})
public
String
allCoupon
(
HttpServletRequest
request
)
{
@RequestMapping
(
value
=
"/allCoupon"
,
method
=
RequestMethod
.
GET
)
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
@IDCLogResource
(
name
=
"查询所有可领取券制券单列表"
)
String
userNO
=
request
.
getParameter
(
"userNO"
);
public
String
allCoupon
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
terminal
=
request
.
getParameter
(
"terminal"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
tradeDate
=
request
.
getParameter
(
"tradeDate"
);
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
terminal
=
request
.
getParameter
(
"terminal"
);
String
tradeDate
=
request
.
getParameter
(
"tradeDate"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
String
langID
=
request
.
getParameter
(
"langID"
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"userNO"
,
userNO
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"tradeDate"
,
tradeDate
);
params
.
put
(
"userNO"
,
userNO
);
params
.
put
(
"terminal"
,
terminal
);
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"tradeDate"
,
tradeDate
);
params
.
put
(
"terminal"
,
terminal
);
params
.
put
(
"langID"
,
langID
);
List
<
Map
<
String
,
Object
>>
list
=
couponService
.
allCoupon
(
params
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
List
<
Map
<
String
,
Object
>>
list
=
couponService
.
allCoupon
(
params
);
}
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
}
@ApiOperation
(
"我的优惠券"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tradeDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"查询日期"
,
defaultValue
=
""
),
@ApiOperation
(
"我的优惠券"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tradeDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"查询日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"status"
,
dataType
=
"String"
,
required
=
true
,
value
=
"券状态(unused/used/expire)"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"beginDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"开始日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"endDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"结束日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"status"
,
dataType
=
"String"
,
required
=
true
,
value
=
"券状态(unused/used/expire)"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"beginDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"开始日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"endDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"结束日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@RequestMapping
(
value
=
"/myCoupon"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
public
String
myCoupon
(
HttpServletRequest
request
)
{
})
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
@RequestMapping
(
value
=
"/myCoupon"
,
method
=
RequestMethod
.
GET
)
String
userNO
=
request
.
getParameter
(
"userNO"
);
@IDCLogResource
(
name
=
"我的优惠券"
)
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
public
String
myCoupon
(
HttpServletRequest
request
)
{
String
terminal
=
request
.
getParameter
(
"terminal"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
tradeDate
=
request
.
getParameter
(
"tradeDate"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
status
=
request
.
getParameter
(
"status"
);
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
beginDate
=
request
.
getParameter
(
"beginDate"
);
String
terminal
=
request
.
getParameter
(
"terminal"
);
String
endDate
=
request
.
getParameter
(
"endDate"
);
String
tradeDate
=
request
.
getParameter
(
"tradeDate"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
status
=
request
.
getParameter
(
"status"
);
String
beginDate
=
request
.
getParameter
(
"beginDate"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
String
endDate
=
request
.
getParameter
(
"endDate"
);
params
.
put
(
"shopNO"
,
shopNO
);
String
langID
=
request
.
getParameter
(
"langID"
);
params
.
put
(
"userNO"
,
userNO
);
params
.
put
(
"orgNO"
,
orgNO
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"tradeDate"
,
tradeDate
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"userNO"
,
userNO
);
params
.
put
(
"beginDate"
,
beginDate
);
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"endDate"
,
endDate
);
params
.
put
(
"tradeDate"
,
tradeDate
);
params
.
put
(
"terminal"
,
terminal
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"beginDate"
,
beginDate
);
params
.
put
(
"endDate"
,
endDate
);
params
.
put
(
"terminal"
,
terminal
);
List
<
Map
<
String
,
Object
>>
list
=
couponService
.
myCoupon
(
params
);
params
.
put
(
"langID"
,
langID
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
}
List
<
Map
<
String
,
Object
>>
list
=
couponService
.
myCoupon
(
params
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
@ApiOperation
(
"领取优惠券"
)
}
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tradeDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"查询日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiOperation
(
"领取优惠券"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"tradeDate"
,
dataType
=
"String"
,
required
=
false
,
value
=
"查询日期"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"orgNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"组织机构"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"makePaperNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"制券单号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"shopNO"
,
dataType
=
"String"
,
required
=
false
,
value
=
"店铺编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"point"
,
dataType
=
"int"
,
required
=
false
,
value
=
"抵扣金币"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"userNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编码"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"makePaperNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"制券单号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"point"
,
dataType
=
"int"
,
required
=
false
,
value
=
"抵扣金币"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@RequestMapping
(
value
=
"/getCoupon"
,
method
=
RequestMethod
.
GET
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
public
String
getCoupon
(
HttpServletRequest
request
)
{
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
})
String
userNO
=
request
.
getParameter
(
"userNO"
);
@RequestMapping
(
value
=
"/getCoupon"
,
method
=
RequestMethod
.
GET
)
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
@IDCLogResource
(
name
=
"领取优惠券"
)
String
terminal
=
request
.
getParameter
(
"terminal"
);
public
String
getCoupon
(
HttpServletRequest
request
)
{
String
tradeDate
=
request
.
getParameter
(
"tradeDate"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
status
=
request
.
getParameter
(
"status"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
String
beginDate
=
request
.
getParameter
(
"beginDate"
);
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
endDate
=
request
.
getParameter
(
"endDate"
);
String
terminal
=
request
.
getParameter
(
"terminal"
);
String
langID
=
request
.
getParameter
(
"langID"
);
String
tradeDate
=
request
.
getParameter
(
"tradeDate"
);
String
status
=
request
.
getParameter
(
"status"
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
String
beginDate
=
request
.
getParameter
(
"beginDate"
);
params
.
put
(
"shopNO"
,
shopNO
);
String
endDate
=
request
.
getParameter
(
"endDate"
);
params
.
put
(
"userNO"
,
userNO
);
String
langID
=
request
.
getParameter
(
"langID"
);
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"tradeDate"
,
tradeDate
);
Map
<
String
,
Object
>
params
=
new
HashMap
<
String
,
Object
>();
params
.
put
(
"status"
,
status
);
params
.
put
(
"shopNO"
,
shopNO
);
params
.
put
(
"beginDate"
,
beginDate
);
params
.
put
(
"userNO"
,
userNO
);
params
.
put
(
"endDate"
,
endDate
);
params
.
put
(
"orgNO"
,
orgNO
);
params
.
put
(
"terminal"
,
terminal
);
params
.
put
(
"tradeDate"
,
tradeDate
);
params
.
put
(
"langID"
,
langID
);
params
.
put
(
"status"
,
status
);
params
.
put
(
"beginDate"
,
beginDate
);
params
.
put
(
"endDate"
,
endDate
);
return
couponService
.
getCoupon
(
params
);
params
.
put
(
"terminal"
,
terminal
);
}
params
.
put
(
"langID"
,
langID
);
}
return
couponService
.
getCoupon
(
params
);
}
}
src/main/java/com/egolm/shop/api/ExpressController.java
View file @
46a8baa6
package
com
.
egolm
.
shop
.
api
;
package
com
.
egolm
.
shop
.
api
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.common.utils.Express
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.Express
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@RestController
@Api
(
tags
={
"快递接口"
})
@RestController
@RequestMapping
(
"express"
)
@Api
(
tags
={
"快递接口"
})
public
class
ExpressController
{
@RequestMapping
(
"express"
)
public
class
ExpressController
{
@Autowired
private
Express
express
;
@Autowired
private
Express
express
;
@ApiOperation
(
"快递查询"
)
@ApiImplicitParams
({
@ApiOperation
(
"快递查询"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sExpressNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"快递单号"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sExpressType"
,
dataType
=
"String"
,
required
=
false
,
value
=
"快递公司"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sExpressNO"
,
dataType
=
"String"
,
required
=
true
,
value
=
"快递单号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sExpressType"
,
dataType
=
"String"
,
required
=
false
,
value
=
"快递公司"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getExpressDetail"
,
method
=
RequestMethod
.
GET
)
public
Object
getExpressDetail
(
String
sExpressNO
,
String
sExpressType
)
{
@RequestMapping
(
value
=
"/getExpressDetail"
,
method
=
RequestMethod
.
GET
)
JSONArray
data
=
express
.
get
(
sExpressNO
,
sExpressType
);
@IDCLogResource
(
name
=
"快递查询"
)
return
Rjx
.
jsonOk
().
setData
(
data
);
public
Object
getExpressDetail
(
String
sExpressNO
,
String
sExpressType
)
{
}
JSONArray
data
=
express
.
get
(
sExpressNO
,
sExpressType
);
return
Rjx
.
jsonOk
().
setData
(
data
);
}
}
}
\ No newline at end of file
src/main/java/com/egolm/shop/api/GoodsController.java
View file @
46a8baa6
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.GoodsService
;
import
com.egolm.shop.api.service.GoodsService
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -43,6 +44,7 @@ public class GoodsController {
...
@@ -43,6 +44,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/thinkLike"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/thinkLike"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"猜你喜欢商品"
)
public
String
thinkLike
(
HttpServletRequest
request
)
{
public
String
thinkLike
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
...
@@ -90,6 +92,7 @@ public class GoodsController {
...
@@ -90,6 +92,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getHotSaleGoods"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getHotSaleGoods"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热销商品列表"
)
public
String
getHotSaleGoods
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
getHotSaleGoods
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
List
<
Map
<
String
,
Object
>>
listMap
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -118,6 +121,7 @@ public class GoodsController {
...
@@ -118,6 +121,7 @@ public class GoodsController {
})
})
@RequestMapping
(
value
=
"/getCategoryGoods"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCategoryGoods"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"分类商品页数据"
)
public
String
getCategoryGoods
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
getCategoryGoods
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
List
<
Map
<
String
,
Object
>>
listMap
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -147,6 +151,7 @@ public class GoodsController {
...
@@ -147,6 +151,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/hotSearchKey"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/hotSearchKey"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热搜词"
)
public
String
hotSearchKey
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
hotSearchKey
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
agentID
=
request
.
getParameter
(
"agentID"
);
String
agentID
=
request
.
getParameter
(
"agentID"
);
List
<
Map
<
String
,
Object
>>
listMap
;
List
<
Map
<
String
,
Object
>>
listMap
;
...
@@ -176,6 +181,7 @@ public class GoodsController {
...
@@ -176,6 +181,7 @@ public class GoodsController {
})
})
@RequestMapping
(
value
=
"/goodsDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/goodsDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"商品详情"
)
public
String
goodsDetail
(
String
orgNo
,
String
goodsId
,
String
contractNo
,
String
custTypeId
,
String
terminal
,
String
langID
,
String
agentID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
goodsDetail
(
String
orgNo
,
String
goodsId
,
String
contractNo
,
String
custTypeId
,
String
terminal
,
String
langID
,
String
agentID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
@@ -201,6 +207,7 @@ public class GoodsController {
...
@@ -201,6 +207,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/queryStockPrice"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryStockPrice"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询库存价格"
)
public
String
queryStockPrice
(
String
uid
,
String
shopNo
,
String
orgNo
,
String
agentID
)
{
public
String
queryStockPrice
(
String
uid
,
String
shopNo
,
String
orgNo
,
String
agentID
)
{
XException
.
assertNotBlank
(
uid
,
"商品唯一标识不能为空"
);
XException
.
assertNotBlank
(
uid
,
"商品唯一标识不能为空"
);
uid
=
uid
.
replaceAll
(
"\\s+"
,
""
);
uid
=
uid
.
replaceAll
(
"\\s+"
,
""
);
...
@@ -223,6 +230,7 @@ public class GoodsController {
...
@@ -223,6 +230,7 @@ public class GoodsController {
})
})
@RequestMapping
(
value
=
"/myFlavor"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/myFlavor"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"收藏及取消收藏"
)
public
String
myFlavor
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
myFlavor
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
goodsID
=
request
.
getParameter
(
"goodsID"
);
String
goodsID
=
request
.
getParameter
(
"goodsID"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
...
...
src/main/java/com/egolm/shop/api/OrderController.java
View file @
46a8baa6
...
@@ -29,6 +29,7 @@ import com.egolm.common.jdbc.Page;
...
@@ -29,6 +29,7 @@ import com.egolm.common.jdbc.Page;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.bean.RespObject
;
import
com.egolm.shop.bean.RespObject
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.XmlUtil
;
import
com.egolm.shop.common.utils.XmlUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -53,6 +54,7 @@ public class OrderController {
...
@@ -53,6 +54,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"订单提交前检查"
)
@RequestMapping
(
value
=
"/check"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/check"
,
method
=
RequestMethod
.
GET
)
public
String
check
(
HttpServletRequest
request
)
{
public
String
check
(
HttpServletRequest
request
)
{
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
...
@@ -73,6 +75,7 @@ public class OrderController {
...
@@ -73,6 +75,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@IDCLogResource
(
name
=
"订单正式提交(JSON格式)"
)
public
String
submit
(
HttpServletRequest
request
)
{
public
String
submit
(
HttpServletRequest
request
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
@@ -92,6 +95,7 @@ public class OrderController {
...
@@ -92,6 +95,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"String"
,
required
=
true
,
value
=
"每页数量"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"String"
,
required
=
true
,
value
=
"每页数量"
,
defaultValue
=
"20"
),
})
})
@RequestMapping
(
value
=
"/getOrderList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getOrderList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取主订单列表"
)
public
String
getOrderList
(
String
orgNo
,
String
shopNo
,
Integer
status
,
Integer
[]
orderType
,
String
langID
,
Integer
index
,
Integer
limit
)
{
public
String
getOrderList
(
String
orgNo
,
String
shopNo
,
Integer
status
,
Integer
[]
orderType
,
String
langID
,
Integer
index
,
Integer
limit
)
{
List
<
String
>
types
=
new
ArrayList
<
String
>();
List
<
String
>
types
=
new
ArrayList
<
String
>();
if
(
orderType
!=
null
)
{
if
(
orderType
!=
null
)
{
...
@@ -119,6 +123,7 @@ public class OrderController {
...
@@ -119,6 +123,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"String"
,
required
=
true
,
value
=
"每页数量"
,
defaultValue
=
"20"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"String"
,
required
=
true
,
value
=
"每页数量"
,
defaultValue
=
"20"
),
})
})
@RequestMapping
(
value
=
"/getRefundOrderList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getRefundOrderList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"B2B售后退单列表"
)
public
RespObject
getRefundOrderList
(
String
orgNo
,
String
shopNo
,
Integer
refundStatus
,
String
langID
,
Integer
index
,
Integer
limit
)
{
public
RespObject
getRefundOrderList
(
String
orgNo
,
String
shopNo
,
Integer
refundStatus
,
String
langID
,
Integer
index
,
Integer
limit
)
{
Page
page
=
new
Page
();
Page
page
=
new
Page
();
...
@@ -137,6 +142,7 @@ public class OrderController {
...
@@ -137,6 +142,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/getOrderDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getOrderDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取主订单详情"
)
public
String
getOrderDetail
(
String
salesOrderId
,
String
langID
,
Integer
index
,
Integer
limit
)
{
public
String
getOrderDetail
(
String
salesOrderId
,
String
langID
,
Integer
index
,
Integer
limit
)
{
XException
.
assertNotBlank
(
salesOrderId
,
"单号不能为空"
);
XException
.
assertNotBlank
(
salesOrderId
,
"单号不能为空"
);
...
@@ -150,6 +156,7 @@ public class OrderController {
...
@@ -150,6 +156,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/getSubOrderList"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getSubOrderList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取子订单列表及详情"
)
public
String
getSubOrderList
(
String
salesOrderId
)
{
public
String
getSubOrderList
(
String
salesOrderId
)
{
XException
.
assertNotBlank
(
salesOrderId
,
"单号不能为空"
);
XException
.
assertNotBlank
(
salesOrderId
,
"单号不能为空"
);
return
orderService
.
queryOrderDetailList
(
salesOrderId
);
return
orderService
.
queryOrderDetailList
(
salesOrderId
);
...
@@ -162,6 +169,7 @@ public class OrderController {
...
@@ -162,6 +169,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/getSubOrderDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getSubOrderDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取子订单详情"
)
public
String
getSubOrderDetail
(
String
subOrderID
)
{
public
String
getSubOrderDetail
(
String
subOrderID
)
{
XException
.
assertNotBlank
(
subOrderID
,
"单号不能为空"
);
XException
.
assertNotBlank
(
subOrderID
,
"单号不能为空"
);
return
orderService
.
getSubOrderDetail
(
subOrderID
);
return
orderService
.
getSubOrderDetail
(
subOrderID
);
...
@@ -174,6 +182,7 @@ public class OrderController {
...
@@ -174,6 +182,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/getDeliverSubDetail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getDeliverSubDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取送货单详情"
)
public
String
getDeliverSubDetail
(
String
aocOrderID
)
{
public
String
getDeliverSubDetail
(
String
aocOrderID
)
{
XException
.
assertNotBlank
(
aocOrderID
,
"单号不能为空"
);
XException
.
assertNotBlank
(
aocOrderID
,
"单号不能为空"
);
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
getDeliverSubDetail
(
aocOrderID
);
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
getDeliverSubDetail
(
aocOrderID
);
...
@@ -191,6 +200,7 @@ public class OrderController {
...
@@ -191,6 +200,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/paySuccess"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/paySuccess"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"小程序在线支付交易成功通知支付状态"
)
public
String
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
String
PayTypeID
)
{
public
String
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
String
PayTypeID
)
{
try
{
try
{
String
[]
ary
=
sOutTradeNO
.
split
(
"_"
,
2
);
String
[]
ary
=
sOutTradeNO
.
split
(
"_"
,
2
);
...
@@ -279,6 +289,7 @@ public class OrderController {
...
@@ -279,6 +289,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@RequestMapping
(
value
=
"/cancelOrder"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/cancelOrder"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"取消未付款订单"
)
public
String
cancelOrder
(
String
sSalesOrderID
)
{
public
String
cancelOrder
(
String
sSalesOrderID
)
{
orderService
.
cancelOrder
(
sSalesOrderID
);
orderService
.
cancelOrder
(
sSalesOrderID
);
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
...
@@ -306,6 +317,7 @@ public class OrderController {
...
@@ -306,6 +317,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"提交组合促销订单"
)
public
String
submitByGroup
(
String
orgNo
,
String
shopNo
,
String
promoPaperNO
,
String
promoGroupNO
,
Integer
saleQty
,
String
addrId
,
String
payTypeId
,
String
terminal
,
String
salesmanNo
,
String
formId
,
String
bankType
,
String
bankAccount
,
String
bankAccountName
,
String
revBankType
,
String
revBankAccount
,
String
revBankAccountNo
,
String
memo
)
{
public
String
submitByGroup
(
String
orgNo
,
String
shopNo
,
String
promoPaperNO
,
String
promoGroupNO
,
Integer
saleQty
,
String
addrId
,
String
payTypeId
,
String
terminal
,
String
salesmanNo
,
String
formId
,
String
bankType
,
String
bankAccount
,
String
bankAccountName
,
String
revBankType
,
String
revBankAccount
,
String
revBankAccountNo
,
String
memo
)
{
String
sSalesOrderID
=
orderService
.
submitByGroup
(
orgNo
,
shopNo
,
promoPaperNO
,
promoGroupNO
,
saleQty
,
addrId
,
payTypeId
,
terminal
,
salesmanNo
,
formId
,
bankType
,
bankAccount
,
bankAccountName
,
revBankType
,
revBankAccount
,
revBankAccountNo
,
memo
);
String
sSalesOrderID
=
orderService
.
submitByGroup
(
orgNo
,
shopNo
,
promoPaperNO
,
promoGroupNO
,
saleQty
,
addrId
,
payTypeId
,
terminal
,
salesmanNo
,
formId
,
bankType
,
bankAccount
,
bankAccountName
,
revBankType
,
revBankAccount
,
revBankAccountNo
,
memo
);
return
Rjx
.
jsonOk
().
set
(
"sSalesOrderID"
,
sSalesOrderID
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"sSalesOrderID"
,
sSalesOrderID
).
toJson
();
...
@@ -332,6 +344,7 @@ public class OrderController {
...
@@ -332,6 +344,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"提交众筹订单"
)
public
String
submitByZhc
(
String
orgNo
,
String
shopNo
,
Integer
planId
,
Integer
saleQty
,
String
addrId
,
String
payTypeId
,
String
terminal
,
String
salesmanNo
,
String
formId
,
String
bankType
,
String
bankAccount
,
String
bankAccountName
,
String
revBankType
,
String
revBankAccount
,
String
revBankAccountNo
,
String
memo
)
{
public
String
submitByZhc
(
String
orgNo
,
String
shopNo
,
Integer
planId
,
Integer
saleQty
,
String
addrId
,
String
payTypeId
,
String
terminal
,
String
salesmanNo
,
String
formId
,
String
bankType
,
String
bankAccount
,
String
bankAccountName
,
String
revBankType
,
String
revBankAccount
,
String
revBankAccountNo
,
String
memo
)
{
String
sSalesOrderID
=
orderService
.
submitByZhc
(
orgNo
,
shopNo
,
planId
,
saleQty
,
addrId
,
payTypeId
,
terminal
,
salesmanNo
,
formId
,
bankType
,
bankAccount
,
bankAccountName
,
revBankType
,
revBankAccount
,
revBankAccountNo
,
memo
);
String
sSalesOrderID
=
orderService
.
submitByZhc
(
orgNo
,
shopNo
,
planId
,
saleQty
,
addrId
,
payTypeId
,
terminal
,
salesmanNo
,
formId
,
bankType
,
bankAccount
,
bankAccountName
,
revBankType
,
revBankAccount
,
revBankAccountNo
,
memo
);
return
Rjx
.
jsonOk
().
set
(
"sSalesOrderID"
,
sSalesOrderID
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"sSalesOrderID"
,
sSalesOrderID
).
toJson
();
...
@@ -360,6 +373,7 @@ public class OrderController {
...
@@ -360,6 +373,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"提交门店装饰订单"
)
public
String
submitByMdzs
(
String
orgNo
,
String
shopNo
,
String
contractNo
,
Integer
goodsId
,
Integer
saleQty
,
String
addrId
,
String
email
,
String
payTypeId
,
String
terminal
,
String
salesmanNo
,
String
formId
,
String
bankType
,
String
bankAccount
,
String
bankAccountName
,
String
revBankType
,
String
revBankAccount
,
String
revBankAccountNo
,
String
memo
)
{
public
String
submitByMdzs
(
String
orgNo
,
String
shopNo
,
String
contractNo
,
Integer
goodsId
,
Integer
saleQty
,
String
addrId
,
String
email
,
String
payTypeId
,
String
terminal
,
String
salesmanNo
,
String
formId
,
String
bankType
,
String
bankAccount
,
String
bankAccountName
,
String
revBankType
,
String
revBankAccount
,
String
revBankAccountNo
,
String
memo
)
{
String
sSalesOrderID
=
orderService
.
submitByMdzs
(
orgNo
,
shopNo
,
contractNo
,
goodsId
,
saleQty
,
addrId
,
email
,
payTypeId
,
terminal
,
salesmanNo
,
formId
,
bankType
,
bankAccount
,
bankAccountName
,
revBankType
,
revBankAccount
,
revBankAccountNo
,
memo
);
String
sSalesOrderID
=
orderService
.
submitByMdzs
(
orgNo
,
shopNo
,
contractNo
,
goodsId
,
saleQty
,
addrId
,
email
,
payTypeId
,
terminal
,
salesmanNo
,
formId
,
bankType
,
bankAccount
,
bankAccountName
,
revBankType
,
revBankAccount
,
revBankAccountNo
,
memo
);
return
Rjx
.
jsonOk
().
set
(
"sSalesOrderID"
,
sSalesOrderID
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"sSalesOrderID"
,
sSalesOrderID
).
toJson
();
...
@@ -373,6 +387,7 @@ public class OrderController {
...
@@ -373,6 +387,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"确认收货"
)
public
String
confirmReceipt
(
String
custNo
,
String
subOrderID
)
{
public
String
confirmReceipt
(
String
custNo
,
String
subOrderID
)
{
orderService
.
confirmReceipt
(
custNo
,
subOrderID
);
orderService
.
confirmReceipt
(
custNo
,
subOrderID
);
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
...
@@ -393,6 +408,7 @@ public class OrderController {
...
@@ -393,6 +408,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"提交补款记录"
)
public
String
createSalesOrderDebtPay
(
String
shopNO
,
String
salesOrderID
,
String
subOrderID
,
String
payTypeID
,
String
payType
,
String
payAmount
,
String
payCardNO
)
{
public
String
createSalesOrderDebtPay
(
String
shopNO
,
String
salesOrderID
,
String
subOrderID
,
String
payTypeID
,
String
payType
,
String
payAmount
,
String
payCardNO
)
{
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
createSalesOrderDebtPay
(
shopNO
,
salesOrderID
,
subOrderID
,
payTypeID
,
payType
,
payAmount
,
payCardNO
);
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
createSalesOrderDebtPay
(
shopNO
,
salesOrderID
,
subOrderID
,
payTypeID
,
payType
,
payAmount
,
payCardNO
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
...
@@ -409,6 +425,7 @@ public class OrderController {
...
@@ -409,6 +425,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
})
@IDCLogResource
(
name
=
"提交结算付款记录"
)
public
String
createSettlePay
(
String
settleNO
,
String
payTypeID
,
String
payType
,
String
payAmount
,
String
payCardNO
)
{
public
String
createSettlePay
(
String
settleNO
,
String
payTypeID
,
String
payType
,
String
payAmount
,
String
payCardNO
)
{
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
createSettlePay
(
settleNO
,
payTypeID
,
payType
,
payAmount
,
payCardNO
);
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
createSettlePay
(
settleNO
,
payTypeID
,
payType
,
payAmount
,
payCardNO
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
...
...
src/main/java/com/egolm/shop/api/PageController.java
View file @
46a8baa6
...
@@ -16,6 +16,7 @@ import com.egolm.common.StringUtil;
...
@@ -16,6 +16,7 @@ import com.egolm.common.StringUtil;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.PageService
;
import
com.egolm.shop.api.service.PageService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -43,6 +44,7 @@ public class PageController {
...
@@ -43,6 +44,7 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
})
@RequestMapping
(
value
=
"/queryBanner"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryBanner"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询banner1"
)
public
String
queryBanner
(
HttpServletRequest
request
)
{
public
String
queryBanner
(
HttpServletRequest
request
)
{
String
custNo
=
request
.
getParameter
(
"custNo"
);
String
custNo
=
request
.
getParameter
(
"custNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
...
@@ -86,6 +88,7 @@ public class PageController {
...
@@ -86,6 +88,7 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
})
@RequestMapping
(
value
=
"/queryNews"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryNews"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询快报"
)
public
String
queryNews
(
HttpServletRequest
request
)
{
public
String
queryNews
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
msgTypeID
=
request
.
getParameter
(
"msgTypeID"
);
String
msgTypeID
=
request
.
getParameter
(
"msgTypeID"
);
...
@@ -125,6 +128,7 @@ public class PageController {
...
@@ -125,6 +128,7 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
})
@RequestMapping
(
value
=
"/queryFinanceProd"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryFinanceProd"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询金融产品"
)
public
String
queryFinanceProd
(
HttpServletRequest
request
)
{
public
String
queryFinanceProd
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
index
=
request
.
getParameter
(
"index"
);
String
index
=
request
.
getParameter
(
"index"
);
...
...
src/main/java/com/egolm/shop/api/PayNotifyController.java
View file @
46a8baa6
...
@@ -26,6 +26,7 @@ import com.egolm.common.HttpsUtil;
...
@@ -26,6 +26,7 @@ import com.egolm.common.HttpsUtil;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.bean.WxPayResponse
;
import
com.egolm.shop.bean.WxPayResponse
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.thoughtworks.xstream.XStream
;
import
com.thoughtworks.xstream.XStream
;
import
com.thoughtworks.xstream.io.xml.DomDriver
;
import
com.thoughtworks.xstream.io.xml.DomDriver
;
...
@@ -46,6 +47,7 @@ public class PayNotifyController {
...
@@ -46,6 +47,7 @@ public class PayNotifyController {
@ApiIgnore
@ApiIgnore
@ApiOperation
(
"支付回调通知接口"
)
@ApiOperation
(
"支付回调通知接口"
)
@RequestMapping
(
value
=
"/callback"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/callback"
,
method
=
RequestMethod
.
POST
)
public
Object
callback
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
public
Object
callback
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
WxPayResponse
postData
=
null
;
WxPayResponse
postData
=
null
;
...
...
src/main/java/com/egolm/shop/api/PromoController.java
View file @
46a8baa6
...
@@ -14,6 +14,7 @@ import com.egolm.common.bean.Rjx;
...
@@ -14,6 +14,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.PromoService
;
import
com.egolm.shop.api.service.PromoService
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
...
@@ -38,6 +39,7 @@ public class PromoController {
...
@@ -38,6 +39,7 @@ public class PromoController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@GetMapping
(
"getGroupList"
)
@GetMapping
(
"getGroupList"
)
@IDCLogResource
(
name
=
"获取组合列表"
)
public
Object
getGroupList
(
String
orgNo
,
String
shopNo
,
Long
index
,
Long
limit
)
{
public
Object
getGroupList
(
String
orgNo
,
String
shopNo
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
limit
=
limit
==
null
?
20
:
limit
;
...
@@ -60,6 +62,7 @@ public class PromoController {
...
@@ -60,6 +62,7 @@ public class PromoController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@GetMapping
(
"getGroupGoodsDetail"
)
@GetMapping
(
"getGroupGoodsDetail"
)
@IDCLogResource
(
name
=
"获取组合详情"
)
public
Object
getGroupGoodsDetail
(
String
orgNo
,
String
shopNo
,
String
promoPaperNO
,
String
promoGroupNO
,
String
agentID
)
{
public
Object
getGroupGoodsDetail
(
String
orgNo
,
String
shopNo
,
String
promoPaperNO
,
String
promoGroupNO
,
String
agentID
)
{
Integer
status
=
0
;
Integer
status
=
0
;
String
statusDesc
=
"正常活动"
;
String
statusDesc
=
"正常活动"
;
...
...
src/main/java/com/egolm/shop/api/SystemCtrlController.java
View file @
46a8baa6
package
com
.
egolm
.
shop
.
api
;
package
com
.
egolm
.
shop
.
api
;
import
java.util.Map
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.SystemCtrlService
;
import
com.egolm.shop.api.service.SystemCtrlService
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
@Api
(
tags
={
"数据字典接口"
})
@RestController
@Api
(
tags
={
"数据字典接口"
})
@RequestMapping
(
"ctrl"
)
@RestController
public
class
SystemCtrlController
{
@RequestMapping
(
"ctrl"
)
public
class
SystemCtrlController
{
@Autowired
private
SystemCtrlService
systemCtrlService
;
@Autowired
private
SystemCtrlService
systemCtrlService
;
@ApiOperation
(
"获取字典参数"
)
@ApiImplicitParams
({
@ApiOperation
(
"获取字典参数"
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"code"
,
dataType
=
"String"
,
required
=
true
,
value
=
"编号"
,
defaultValue
=
""
),
@ApiImplicitParams
({
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"code"
,
dataType
=
"String"
,
required
=
true
,
value
=
"编号"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
false
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
})
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getSystemCtrlByCode"
,
method
=
RequestMethod
.
GET
)
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
@RequestMapping
(
value
=
"/getSystemCtrlByCode"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取字典参数"
)
String
code
=
request
.
getParameter
(
"code"
);
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
Map
<
String
,
Object
>
result
=
systemCtrlService
.
queryTSystemCtrlByCode
(
code
,
langID
);
String
code
=
request
.
getParameter
(
"code"
);
if
(
result
!=
null
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
return
Rjx
.
jsonOk
().
setData
(
result
).
toJson
();
Map
<
String
,
Object
>
result
=
systemCtrlService
.
queryTSystemCtrlByCode
(
code
,
langID
);
}
else
{
if
(
result
!=
null
)
{
return
Rjx
.
jsonErr
().
setCode
(-
1
).
setMessage
(
I18NUtils
.
getMessage
(
langID
,
"Msg_DataDictionary_query_error"
)).
toJson
();
return
Rjx
.
jsonOk
().
setData
(
result
).
toJson
();
}
}
else
{
}
return
Rjx
.
jsonErr
().
setCode
(-
1
).
setMessage
(
I18NUtils
.
getMessage
(
langID
,
"Msg_DataDictionary_query_error"
)).
toJson
();
}
}
}
}
src/main/java/com/egolm/shop/api/UserController.java
View file @
46a8baa6
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.shop.api.service.UserService
;
import
com.egolm.shop.api.service.UserService
;
import
com.egolm.shop.bean.TCustomer
;
import
com.egolm.shop.bean.TCustomer
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -43,6 +44,7 @@ public class UserController {
...
@@ -43,6 +44,7 @@ public class UserController {
})
})
@RequestMapping
(
value
=
"/createGuest"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/createGuest"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"创建游客账号"
)
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"orgNO"
,
request
.
getParameter
(
"orgNO"
));
params
.
put
(
"orgNO"
,
request
.
getParameter
(
"orgNO"
));
...
@@ -65,6 +67,7 @@ public class UserController {
...
@@ -65,6 +67,7 @@ public class UserController {
})
})
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"登陆"
)
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
userNO
=
request
.
getParameter
(
"userNO"
)==
null
?
""
:
request
.
getParameter
(
"userNO"
);
String
userNO
=
request
.
getParameter
(
"userNO"
)==
null
?
""
:
request
.
getParameter
(
"userNO"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
...
@@ -89,6 +92,7 @@ public class UserController {
...
@@ -89,6 +92,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/userInfo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/userInfo"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取用户信息"
)
public
String
userInfo
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
userInfo
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
custNO
=
request
.
getParameter
(
"custNO"
);
String
custNO
=
request
.
getParameter
(
"custNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
)==
null
?
""
:
request
.
getParameter
(
"shopNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
)==
null
?
""
:
request
.
getParameter
(
"shopNO"
);
...
@@ -126,6 +130,7 @@ public class UserController {
...
@@ -126,6 +130,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/modifyPwd"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/modifyPwd"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改密码"
)
public
String
modifyPwd
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
modifyPwd
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
...
@@ -155,6 +160,7 @@ public class UserController {
...
@@ -155,6 +160,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/sendSms"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/sendSms"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"发送短信"
)
public
String
sendSms
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
sendSms
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
smsTmpID
=
request
.
getParameter
(
"smsTmpID"
);
String
smsTmpID
=
request
.
getParameter
(
"smsTmpID"
);
...
@@ -179,6 +185,7 @@ public class UserController {
...
@@ -179,6 +185,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/logoutByOpenId"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/logoutByOpenId"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"小程序注销"
)
public
String
logoutByOpenId
(
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
logoutByOpenId
(
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
userService
.
deleteOpenId
(
openId
);
userService
.
deleteOpenId
(
openId
);
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
...
@@ -197,6 +204,7 @@ public class UserController {
...
@@ -197,6 +204,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/loginByOpenId"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/loginByOpenId"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"小程序登陆"
)
public
String
loginByOpenId
(
String
appId
,
String
openId
,
String
mobile
,
String
orgNo
,
String
name
,
String
unionId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
loginByOpenId
(
String
appId
,
String
openId
,
String
mobile
,
String
orgNo
,
String
name
,
String
unionId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
XException
.
assertNotBlank
(
appId
,
"appId不能为空"
);
XException
.
assertNotBlank
(
appId
,
"appId不能为空"
);
XException
.
assertNotBlank
(
openId
,
"OpenID不能为空"
);
XException
.
assertNotBlank
(
openId
,
"OpenID不能为空"
);
...
@@ -236,6 +244,7 @@ public class UserController {
...
@@ -236,6 +244,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/modifyShopAuthInfo"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"/modifyShopAuthInfo"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改认证信息"
)
public
String
modifyShopAuthInfo
(
public
String
modifyShopAuthInfo
(
String
shopNo
,
String
shopNo
,
String
shopName
,
String
shopName
,
...
@@ -289,6 +298,7 @@ public class UserController {
...
@@ -289,6 +298,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/queryShopAuthInfo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryShopAuthInfo"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询认证信息"
)
public
String
queryShopAuthInfo
(
String
shopNo
,
String
langID
)
{
public
String
queryShopAuthInfo
(
String
shopNo
,
String
langID
)
{
return
userService
.
queryShopAuthInfo
(
shopNo
,
langID
);
return
userService
.
queryShopAuthInfo
(
shopNo
,
langID
);
}
}
...
@@ -302,6 +312,7 @@ public class UserController {
...
@@ -302,6 +312,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/queryUserInfoByOpenId"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/queryUserInfoByOpenId"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"根据OPENID获取用户信息"
)
public
String
queryUserInfoByOpenId
(
String
orgNo
,
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
queryUserInfoByOpenId
(
String
orgNo
,
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
customerMap
=
userService
.
queryCustomerByOpenId
(
openId
);
Map
<
String
,
Object
>
customerMap
=
userService
.
queryCustomerByOpenId
(
openId
);
if
(
customerMap
==
null
)
{
if
(
customerMap
==
null
)
{
...
@@ -334,6 +345,7 @@ public class UserController {
...
@@ -334,6 +345,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getSalesmanByShopNo"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getSalesmanByShopNo"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"根据店铺编号查询业务员"
)
public
String
getSalesmanByShopNo
(
String
shopNo
)
{
public
String
getSalesmanByShopNo
(
String
shopNo
)
{
Map
<
String
,
Object
>
map
=
userService
.
getSalesmanByShopNo
(
shopNo
);
Map
<
String
,
Object
>
map
=
userService
.
getSalesmanByShopNo
(
shopNo
);
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
...
@@ -349,6 +361,7 @@ public class UserController {
...
@@ -349,6 +361,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/getCustomer"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getCustomer"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询个人信息"
)
public
String
getCustomer
(
String
custNo
)
{
public
String
getCustomer
(
String
custNo
)
{
Map
<
String
,
Object
>
map
=
userService
.
getCustomerByNO
(
custNo
);
Map
<
String
,
Object
>
map
=
userService
.
getCustomerByNO
(
custNo
);
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
...
@@ -364,6 +377,7 @@ public class UserController {
...
@@ -364,6 +377,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/updateCustomerEmail"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/updateCustomerEmail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"修改个人信息邮箱"
)
public
String
updateCustomerEmail
(
String
custNo
,
String
email
)
{
public
String
updateCustomerEmail
(
String
custNo
,
String
email
)
{
userService
.
updateCustomerEmail
(
custNo
,
email
);
userService
.
updateCustomerEmail
(
custNo
,
email
);
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
...
@@ -380,6 +394,7 @@ public class UserController {
...
@@ -380,6 +394,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
})
@RequestMapping
(
value
=
"/updateB2BUnionID"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/updateB2BUnionID"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"修改B2B用户UnionID"
)
public
String
updateB2BUnionID
(
String
UserNO
,
String
UnionID
)
{
public
String
updateB2BUnionID
(
String
UserNO
,
String
UnionID
)
{
userService
.
updateB2BUnionID
(
UserNO
,
UnionID
);
userService
.
updateB2BUnionID
(
UserNO
,
UnionID
);
return
Rjx
.
jsonOk
().
toJson
();
return
Rjx
.
jsonOk
().
toJson
();
...
...
src/main/java/com/egolm/shop/api/YunController.java
View file @
46a8baa6
...
@@ -23,6 +23,7 @@ import com.aliyuncs.profile.IClientProfile;
...
@@ -23,6 +23,7 @@ import com.aliyuncs.profile.IClientProfile;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.SystemCtrlService
;
import
com.egolm.shop.api.service.SystemCtrlService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.ShopContstrant
;
import
com.egolm.shop.common.utils.ShopContstrant
;
import
com.tencent.cloud.CosStsClient
;
import
com.tencent.cloud.CosStsClient
;
...
@@ -47,6 +48,7 @@ public class YunController {
...
@@ -47,6 +48,7 @@ public class YunController {
})
})
@RequestMapping
(
value
=
"/getPolicy"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"/getPolicy"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取上传凭证及上传的云平台"
)
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
choiceMap
=
systemCtrlService
.
queryTSystemCtrlByCode
(
ShopContstrant
.
Choice_OSS_KEY
,
"936"
);
Map
<
String
,
Object
>
choiceMap
=
systemCtrlService
.
queryTSystemCtrlByCode
(
ShopContstrant
.
Choice_OSS_KEY
,
"936"
);
if
(
choiceMap
!=
null
)
{
if
(
choiceMap
!=
null
)
{
...
...
src/main/java/com/egolm/shop/bean/TIdcServicesLogs.java
0 → 100644
View file @
46a8baa6
package
com
.
egolm
.
shop
.
bean
;
import
javax.persistence.Entity
;
import
javax.persistence.Column
;
import
javax.persistence.Id
;
import
java.util.Date
;
@Entity
(
name
=
"tIdcServicesLogs"
)
public
class
TIdcServicesLogs
implements
java
.
io
.
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@Id
@Column
(
columnDefinition
=
"int"
)
private
Integer
nID
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sChannel
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sName
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sFunctionName
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sClassName
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sHttpMethod
;
@Column
(
columnDefinition
=
"text"
)
private
String
sRequestText
;
@Column
(
columnDefinition
=
"text"
)
private
String
sRequestHeader
;
@Column
(
columnDefinition
=
"text"
)
private
String
sResponseText
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sUserAgent
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sIp
;
@Column
(
columnDefinition
=
"datetime"
)
private
Date
dStartTime
;
@Column
(
columnDefinition
=
"datetime"
)
private
Date
dEndTime
;
@Column
(
columnDefinition
=
"int"
)
private
Integer
nCost
;
@Column
(
columnDefinition
=
"int"
)
private
Integer
nTag
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sCreateUser
;
@Column
(
columnDefinition
=
"datetime"
)
private
Date
dCreateDate
;
@Column
(
columnDefinition
=
"datetime"
)
private
Date
dLastUpdateTime
;
@Column
(
columnDefinition
=
"varchar"
)
private
String
sTraceId
;
public
void
setnID
(
Integer
nID
)
{
this
.
nID
=
nID
;
}
public
Integer
getnID
()
{
return
nID
;
}
public
void
setsChannel
(
String
sChannel
)
{
this
.
sChannel
=
sChannel
;
}
public
String
getsChannel
()
{
return
sChannel
;
}
public
void
setsName
(
String
sName
)
{
this
.
sName
=
sName
;
}
public
String
getsName
()
{
return
sName
;
}
public
void
setsFunctionName
(
String
sFunctionName
)
{
this
.
sFunctionName
=
sFunctionName
;
}
public
String
getsFunctionName
()
{
return
sFunctionName
;
}
public
void
setsClassName
(
String
sClassName
)
{
this
.
sClassName
=
sClassName
;
}
public
String
getsClassName
()
{
return
sClassName
;
}
public
void
setsHttpMethod
(
String
sHttpMethod
)
{
this
.
sHttpMethod
=
sHttpMethod
;
}
public
String
getsHttpMethod
()
{
return
sHttpMethod
;
}
public
void
setsRequestText
(
String
sRequestText
)
{
this
.
sRequestText
=
sRequestText
;
}
public
String
getsRequestText
()
{
return
sRequestText
;
}
public
void
setsRequestHeader
(
String
sRequestHeader
)
{
this
.
sRequestHeader
=
sRequestHeader
;
}
public
String
getsRequestHeader
()
{
return
sRequestHeader
;
}
public
void
setsResponseText
(
String
sResponseText
)
{
this
.
sResponseText
=
sResponseText
;
}
public
String
getsResponseText
()
{
return
sResponseText
;
}
public
void
setsUserAgent
(
String
sUserAgent
)
{
this
.
sUserAgent
=
sUserAgent
;
}
public
String
getsUserAgent
()
{
return
sUserAgent
;
}
public
void
setsIp
(
String
sIp
)
{
this
.
sIp
=
sIp
;
}
public
String
getsIp
()
{
return
sIp
;
}
public
void
setdStartTime
(
Date
dStartTime
)
{
this
.
dStartTime
=
dStartTime
;
}
public
Date
getdStartTime
()
{
return
dStartTime
;
}
public
void
setdEndTime
(
Date
dEndTime
)
{
this
.
dEndTime
=
dEndTime
;
}
public
Date
getdEndTime
()
{
return
dEndTime
;
}
public
void
setnCost
(
Integer
nCost
)
{
this
.
nCost
=
nCost
;
}
public
Integer
getnCost
()
{
return
nCost
;
}
public
void
setnTag
(
Integer
nTag
)
{
this
.
nTag
=
nTag
;
}
public
Integer
getnTag
()
{
return
nTag
;
}
public
void
setsCreateUser
(
String
sCreateUser
)
{
this
.
sCreateUser
=
sCreateUser
;
}
public
String
getsCreateUser
()
{
return
sCreateUser
;
}
public
void
setdCreateDate
(
Date
dCreateDate
)
{
this
.
dCreateDate
=
dCreateDate
;
}
public
Date
getdCreateDate
()
{
return
dCreateDate
;
}
public
void
setdLastUpdateTime
(
Date
dLastUpdateTime
)
{
this
.
dLastUpdateTime
=
dLastUpdateTime
;
}
public
Date
getdLastUpdateTime
()
{
return
dLastUpdateTime
;
}
public
void
setsTraceId
(
String
sTraceId
)
{
this
.
sTraceId
=
sTraceId
;
}
public
String
getsTraceId
()
{
return
sTraceId
;
}
}
src/main/java/com/egolm/shop/common/component/IDCLogResource.java
0 → 100644
View file @
46a8baa6
package
com
.
egolm
.
shop
.
common
.
component
;
import
java.lang.annotation.Documented
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Inherited
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* AOP 记录日志
* @ClassName: IDCLogResource
* @Description: TODO(这里用一句话描述这个类的作用)
* @author zhangyong0129@126.com
* @date 2023年10月18日 下午4:36:25
*
*/
@Target
({
ElementType
.
METHOD
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Inherited
@Documented
public
@interface
IDCLogResource
{
/**
* 服务名称
*
* @return
*/
String
name
();
/**
* 操作位置描述
*
* @return
*/
String
position
()
default
""
;
/**
* 日志类型
*
* @return
*/
String
logType
()
default
""
;
}
src/main/java/com/egolm/shop/common/component/IDCSystemLogAspect.java
0 → 100644
View file @
46a8baa6
package
com
.
egolm
.
shop
.
common
.
component
;
import
java.io.UnsupportedEncodingException
;
import
java.lang.reflect.Method
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.http.HttpHeaders
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Pointcut
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.serializer.SerializerFeature
;
import
com.egolm.common.GsonUtil
;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.shop.bean.TIdcServicesLogs
;
import
com.egolm.shop.common.utils.ShopUtil
;
/**
* aop 操作日志切面
*
* @ClassName: IDCSystemLogAspect
* @Description: TODO(这里用一句话描述这个类的作用)
* @author zhangyong0129@126.com
* @date 2023年10月18日 下午4:37:34
*
*/
@Aspect
@Component
public
class
IDCSystemLogAspect
{
private
static
final
Log
logger
=
LogFactory
.
getLog
(
IDCSystemLogAspect
.
class
);
@Autowired
private
JdbcTemplate
jdbcTemplate
;
// 扫描使用@LogResource注解的方法
@Pointcut
(
"@annotation(com.egolm.shop.common.component.IDCLogResource)"
)
public
void
logPointCut
()
{
};
@Around
(
"logPointCut()"
)
public
Object
around
(
ProceedingJoinPoint
point
)
throws
Throwable
{
Date
startTime
=
new
Date
();
String
exception
=
null
;
String
result
=
null
;
try
{
Object
[]
args
=
point
.
getArgs
();
Object
obj
=
point
.
proceed
(
args
);
//获取的完整 一些,不参加参则只有结果。
if
(
obj
!=
null
)
{
result
=
JSONObject
.
toJSONString
(
obj
);
}
return
obj
;
}
catch
(
Exception
e
)
{
//请求时报错
exception
=
e
.
toString
();
throw
e
;
}
finally
{
//操作和报错日志都记录
HttpServletResponse
response
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getResponse
();
int
statusCode
=
response
.
getStatus
();
if
(
exception
!=
null
)
{
/** CHECKSTYLE:OFF:MagicNumber */
statusCode
=
500
;
/** CHECKSTYLE:ON:MagicNumber */
}
System
.
out
.
println
();
syncSaveLog
(
point
,
startTime
,
new
Date
(),
exception
,
result
,
statusCode
);
}
}
@Async
void
syncSaveLog
(
ProceedingJoinPoint
joinPoint
,
Date
startTime
,
Date
endTime
,
String
exception
,
String
result
,
int
statusCode
)
{
TIdcServicesLogs
log
=
new
TIdcServicesLogs
();
log
.
setsChannel
(
"shop"
);
try
{
//获取请求参数,不通过 joinPoint.getArgs() 获取。
HttpServletRequest
request
=
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
if
(
request
!=
null
)
{
log
.
setsUserAgent
(
request
.
getHeader
(
HttpHeaders
.
USER_AGENT
));
log
.
setsHttpMethod
(
request
.
getMethod
());
log
.
setsIp
(
request
.
getRemoteAddr
());
log
.
setsRequestText
(
GsonUtil
.
toJson
(
ShopUtil
.
getParameterMap
(
request
)));
}
MethodSignature
signature
=
(
MethodSignature
)
joinPoint
.
getSignature
();
Method
method
=
signature
.
getMethod
();
IDCLogResource
annotation
=
method
.
getAnnotation
(
IDCLogResource
.
class
);
if
(
annotation
!=
null
)
{
//注解上的描述
//log.setOperateName(annotation.name());
log
.
setsName
(
annotation
.
name
());
System
.
out
.
println
(
"--------------------"
+
annotation
.
name
());
}
/* System.out.println("aop 获取目标方法名 "+joinPoint.getSignature().getName());
System.out.println("aop 获取目标方法所属类的简单类名 "+joinPoint.getSignature().getDeclaringType().getName());
System.out.println("aop 返回 "+result);*/
log
.
setsClassName
(
joinPoint
.
getSignature
().
getDeclaringType
().
getName
());
log
.
setsFunctionName
(
joinPoint
.
getSignature
().
getName
());
log
.
setdStartTime
(
startTime
);
log
.
setdEndTime
(
endTime
);
log
.
setsCreateUser
(
"aop"
);
//入参
Long
cost
=
endTime
.
getTime
()
-
startTime
.
getTime
();
log
.
setnCost
(
cost
.
intValue
());
log
.
setsResponseText
(
result
);
jdbcTemplate
.
saveOrUpdate
(
log
);
}
catch
(
Exception
e
)
{
logger
.
info
(
"aop 保存日志异常:"
,
e
);
}
}
}
src/main/java/com/egolm/shop/common/utils/ShopUtil.java
0 → 100644
View file @
46a8baa6
package
com
.
egolm
.
shop
.
common
.
utils
;
import
java.util.HashMap
;
import
java.util.Iterator
;
import
java.util.Map
;
import
java.util.Map.Entry
;
import
javax.servlet.http.HttpServletRequest
;
public
class
ShopUtil
{
public
static
Map
<
String
,
Object
>
getParameterMap
(
HttpServletRequest
request
)
{
// 参数Map
Map
<
String
,
String
[]>
properties
=
request
.
getParameterMap
();
// 返回值Map
Map
<
String
,
Object
>
returnMap
=
new
HashMap
<
String
,
Object
>();
Iterator
<
Entry
<
String
,
String
[]>>
entries
=
properties
.
entrySet
().
iterator
();
Map
.
Entry
<
String
,
String
[]>
entry
;
String
name
=
""
;
String
value
=
""
;
while
(
entries
.
hasNext
())
{
entry
=
(
Map
.
Entry
<
String
,
String
[]>)
entries
.
next
();
name
=
(
String
)
entry
.
getKey
();
Object
valueObj
=
entry
.
getValue
();
if
(
null
==
valueObj
)
{
value
=
""
;
}
else
if
(
valueObj
instanceof
String
[])
{
String
[]
values
=
(
String
[])
valueObj
;
for
(
int
i
=
0
;
i
<
values
.
length
;
i
++)
{
value
=
values
[
i
]
+
","
;
}
value
=
value
.
substring
(
0
,
value
.
length
()
-
1
);
}
else
{
value
=
valueObj
.
toString
();
}
returnMap
.
put
(
name
,
value
);
}
return
returnMap
;
}
}
src/main/resources/application.properties
View file @
46a8baa6
...
@@ -14,7 +14,7 @@ spring.http.encoding.charset=utf-8
...
@@ -14,7 +14,7 @@ spring.http.encoding.charset=utf-8
spring.aop.proxy-target-class
=
true
spring.aop.proxy-target-class
=
true
spring.profiles.active
=
dev
spring.profiles.active
=
dev
spring.messages.basename
=
messages
spring.messages.basename
=
messages
#thymeleaf
#thymeleaf
# 前缀
# 前缀
spring.thymeleaf.prefix
=
classpath:/templates/
spring.thymeleaf.prefix
=
classpath:/templates/
...
@@ -22,7 +22,7 @@ spring.thymeleaf.prefix=classpath:/templates/
...
@@ -22,7 +22,7 @@ spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix
=
.html
spring.thymeleaf.suffix
=
.html
#关闭swagger true开启 false关闭
#关闭swagger true开启 false关闭
swagger2.enable
=
fals
e
swagger2.enable
=
tru
e
spring.datasource.username
=
ERP
spring.datasource.username
=
ERP
spring.datasource.password
=
qiyang@2013
spring.datasource.password
=
qiyang@2013
...
...
src/main/resources/templates/redmine.html
View file @
46a8baa6
...
@@ -21,7 +21,9 @@
...
@@ -21,7 +21,9 @@
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<el-divider
content-position=
"left"
>
V1.1.2 2023-10-19
</el-divider>
<p
class=
"title"
>
1.接口调用日志通过AOP保存到tIdcServicesLogs表中
</p>
<el-divider
content-position=
"left"
>
V1.1.1
</el-divider>
<el-divider
content-position=
"left"
>
V1.1.1
</el-divider>
<p
class=
"title"
>
1.修改微企付和网商银行的退款回调过程
</p>
<p
class=
"title"
>
1.修改微企付和网商银行的退款回调过程
</p>
<el-divider
content-position=
"left"
>
V1.1.0
</el-divider>
<el-divider
content-position=
"left"
>
V1.1.0
</el-divider>
...
...
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