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
Show 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,6 +33,10 @@
<artifactId>
spring-boot-devtools
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-aop
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
...
...
src/main/java/com/egolm/shop/ShopApplication.java
View file @
46a8baa6
...
...
@@ -6,6 +6,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.scheduling.annotation.EnableAsync
;
...
...
@@ -20,6 +21,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@EnableCaching
@EnableSwagger2
@SpringBootApplication
@ServletComponentScan
@EnableTransactionManagement
public
class
ShopApplication
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
ShopApplication
.
class
);
...
...
src/main/java/com/egolm/shop/api/ActivityController.java
View file @
46a8baa6
...
...
@@ -17,6 +17,7 @@ import com.egolm.common.StringUtil;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.ActivityService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -42,6 +43,7 @@ public class ActivityController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
@RequestMapping
(
value
=
"/crowdFundingProjectList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"众筹项目列表"
)
public
String
crowdFundingProjectList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
index
=
request
.
getParameter
(
"index"
);
...
...
@@ -76,6 +78,7 @@ public class ActivityController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
),
})
@RequestMapping
(
value
=
"/crowdFundingProjectDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"众筹项目下的商品列表"
)
public
String
crowdFundingProjectDetail
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
projectId
=
request
.
getParameter
(
"projectId"
);
String
orgNo
=
request
.
getParameter
(
"orgNo"
);
...
...
src/main/java/com/egolm/shop/api/AddressController.java
View file @
46a8baa6
...
...
@@ -15,6 +15,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.AddressService
;
import
com.egolm.shop.bean.TCustAddress
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -41,6 +42,7 @@ public class AddressController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"sign"
,
dataType
=
"String"
,
required
=
true
,
value
=
"签名"
,
defaultValue
=
""
),
})
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"地址列表"
)
public
String
list
(
HttpServletRequest
request
)
{
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
...
...
@@ -88,6 +90,7 @@ public class AddressController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/saveOrUpdate"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"新增或修改"
)
public
String
saveOrUpdate
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
...
...
@@ -143,6 +146,7 @@ public class AddressController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/delete"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"删除"
)
public
String
delete
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
...
...
@@ -164,6 +168,7 @@ public class AddressController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/defaultAdd"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"设置或取消默认"
)
public
String
defaultAdd
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
...
...
@@ -184,6 +189,7 @@ public class AddressController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/detail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"地址详情"
)
public
String
detail
(
HttpServletRequest
request
)
{
String
addId
=
request
.
getParameter
(
"addId"
);
String
langID
=
request
.
getParameter
(
"langID"
);
...
...
@@ -203,6 +209,7 @@ public class AddressController {
@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;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.BrandService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -45,6 +46,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getBanner"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"首页Banner图片"
)
public
String
getBanner
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
...
...
@@ -82,6 +84,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getGroupBrandList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"品牌列表接口按首字母"
)
public
String
getGroupBrandList
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
listMap
=
brandService
.
queryBrandList
(
request
.
getParameter
(
"orgNo"
));
...
...
@@ -129,6 +132,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getBrandList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取品牌列表"
)
public
String
getBrandList
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
returnList
=
brandService
.
queryBrandList
(
orgNo
);
List
<
String
>
cs
=
new
ArrayList
<
String
>();
...
...
@@ -151,6 +155,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getHotSaleBrands"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热销品牌列表"
)
public
String
getHotSaleBrands
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -178,6 +183,7 @@ public class BrandController {
})
@RequestMapping
(
value
=
"/hotIPList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热门IP列表"
)
public
String
hotIPList
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
comId
=
request
.
getParameter
(
"comId"
);
...
...
@@ -213,6 +219,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
),
})
@RequestMapping
(
value
=
"/hotIPDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热门IP详情"
)
public
String
hotIPDetail
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
ipId
=
request
.
getParameter
(
"ipId"
);
...
...
@@ -248,6 +255,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"contact"
,
dataType
=
"String"
,
required
=
false
,
value
=
"contact"
,
defaultValue
=
""
),
})
@RequestMapping
(
value
=
"/saveAuthorizationIP"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"IP授权保存"
)
public
String
authorizationIP
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
ipId
=
request
.
getParameter
(
"ipId"
);
...
...
@@ -279,6 +287,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"custNo"
,
dataType
=
"String"
,
required
=
true
,
value
=
"用户编号"
,
defaultValue
=
""
),
})
@RequestMapping
(
value
=
"/authorizationIPList"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"获取IP授权列表"
)
public
Object
authorizationIPList
(
String
custNo
,
String
orgNo
)
{
List
<
Map
<
String
,
Object
>>
list
=
brandService
.
queryAuthorizationIPList
(
custNo
,
orgNo
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
...
...
@@ -294,6 +303,7 @@ public class BrandController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"brandId"
,
dataType
=
"String"
,
required
=
true
,
value
=
"品牌ID"
,
defaultValue
=
""
),
})
@RequestMapping
(
value
=
"/authorizationIPDetail"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"获取IP授权详情"
)
public
Object
authorizationIPDetail
(
String
custNo
,
String
brandId
,
String
orgNo
)
{
Map
<
String
,
Object
>
map
=
brandService
.
queryAuthorizationIPDetail
(
custNo
,
brandId
,
orgNo
);
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;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.CartService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -40,6 +41,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/getCartCount"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"购物车商品种类数量"
)
public
String
cartQuery
(
String
orgNo
,
String
shopNo
)
{
Map
<
String
,
Object
>
map
=
cartService
.
count
(
orgNo
,
shopNo
);
return
Rjx
.
jsonOk
().
set
(
"count"
,
map
.
get
(
"totalCount"
)).
set
(
"qty"
,
map
.
get
(
"totalSaleQty"
)).
toJson
();
...
...
@@ -58,6 +60,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/cartQuery"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"购物车信息"
)
public
String
cartQuery
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
isCaclPromo
=
request
.
getParameter
(
"isCalcPromo"
);
if
(
StringUtil
.
isNotUndefinedAndNull
(
isCaclPromo
)
&&
StringUtil
.
isNotEmpty
(
isCaclPromo
))
{
...
...
@@ -87,6 +90,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/appendCart"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@IDCLogResource
(
name
=
"加入购物车(JSON格式)"
)
public
String
appendCart
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
...
@@ -108,6 +112,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/remove"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"删除购物车(JSON格式)"
)
public
String
remove
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
...
@@ -126,6 +131,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/updateQty"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改数量(JSON格式)"
)
public
String
updateQty
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
...
@@ -145,6 +151,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/updateSelected"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"增加可选择商品去结算(JSON格式)"
)
public
String
updateSelected
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
...
@@ -164,6 +171,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/setPrice"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改价格(JSON格式)"
)
public
String
setPrice
(
String
orgNo
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
...
@@ -185,6 +193,7 @@ public class CartController {
})
@RequestMapping
(
value
=
"/clear"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"清空购物车"
)
public
String
clear
(
String
orgNo
,
String
shopNo
)
{
cartService
.
clear
(
orgNo
,
shopNo
);
return
Rjx
.
jsonOk
().
toJson
();
...
...
src/main/java/com/egolm/shop/api/CategoryController.java
View file @
46a8baa6
...
...
@@ -14,6 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.CategoryService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -39,6 +40,7 @@ public class CategoryController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryCategoryByLevel"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"分类列表(按Level查询)"
)
public
String
queryCategoryByLevel
(
String
orgNo
,
String
scopeTypeID
,
Integer
level
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
list
=
categoryService
.
queryCategoryByLevel
(
orgNo
,
scopeTypeID
,
level
);
List
<
String
>
cs
=
new
ArrayList
<
String
>();
...
...
@@ -59,6 +61,7 @@ public class CategoryController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryCategory"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"分类列表(按上级分类查询)"
)
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
);
List
<
String
>
cs
=
new
ArrayList
<
String
>();
...
...
src/main/java/com/egolm/shop/api/CommonController.java
View file @
46a8baa6
...
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.JdbcTemplate
;
import
com.egolm.shop.api.service.CommonService
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -44,6 +45,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryDistrictByOrgNO"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"组织构购获取省市区"
)
public
String
queryDistrictByOrgNO
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
String
langID
=
request
.
getParameter
(
"langID"
);
...
...
@@ -58,6 +60,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getOpenCity"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取已开通的城市"
)
public
String
getOpenCity
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
return
commonService
.
getOpenCity
(
langID
);
...
...
@@ -72,6 +75,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getCommonArgs"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取共同参数"
)
public
String
getCommonArgs
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
String
commonNo
=
request
.
getParameter
(
"commonNo"
);
...
...
@@ -88,6 +92,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getPayTypeList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取付款方式"
)
public
String
getPayTypeList
(
HttpServletRequest
request
)
{
String
langID
=
request
.
getParameter
(
"langID"
);
String
shopNo
=
request
.
getParameter
(
"shopNo"
);
...
...
@@ -111,6 +116,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getRegionList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取省市区数据"
)
public
String
getCityListByProvince
(
String
regionNo
)
{
if
(
StringUtil
.
isBlank
(
regionNo
))
{
regionNo
=
"000000"
;
...
...
@@ -130,6 +136,7 @@ public class CommonController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getConfig"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取配置信息"
)
public
Object
getConfig
(
String
appId
,
String
orgNo
,
String
agentID
)
{
Map
<
String
,
Object
>
map
=
null
;
try
{
...
...
src/main/java/com/egolm/shop/api/CouponController.java
View file @
46a8baa6
...
...
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.CouponService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -39,6 +40,7 @@ public class CouponController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/allCoupon"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询所有可领取券制券单列表"
)
public
String
allCoupon
(
HttpServletRequest
request
)
{
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
...
...
@@ -77,6 +79,7 @@ public class CouponController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/myCoupon"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"我的优惠券"
)
public
String
myCoupon
(
HttpServletRequest
request
)
{
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
...
...
@@ -120,6 +123,7 @@ public class CouponController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getCoupon"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"领取优惠券"
)
public
String
getCoupon
(
HttpServletRequest
request
)
{
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
String
userNO
=
request
.
getParameter
(
"userNO"
);
...
...
src/main/java/com/egolm/shop/api/ExpressController.java
View file @
46a8baa6
...
...
@@ -7,6 +7,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.alibaba.fastjson.JSONArray
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.Express
;
import
io.swagger.annotations.Api
;
...
...
@@ -33,6 +34,7 @@ public class ExpressController {
})
@RequestMapping
(
value
=
"/getExpressDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"快递查询"
)
public
Object
getExpressDetail
(
String
sExpressNO
,
String
sExpressType
)
{
JSONArray
data
=
express
.
get
(
sExpressNO
,
sExpressType
);
return
Rjx
.
jsonOk
().
setData
(
data
);
...
...
src/main/java/com/egolm/shop/api/GoodsController.java
View file @
46a8baa6
...
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.GoodsService
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -43,6 +44,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/thinkLike"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"猜你喜欢商品"
)
public
String
thinkLike
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNO"
);
...
...
@@ -90,6 +92,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getHotSaleGoods"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热销商品列表"
)
public
String
getHotSaleGoods
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -118,6 +121,7 @@ public class GoodsController {
})
@RequestMapping
(
value
=
"/getCategoryGoods"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"分类商品页数据"
)
public
String
getCategoryGoods
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
List
<
Map
<
String
,
Object
>>
listMap
;
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -147,6 +151,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/hotSearchKey"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"热搜词"
)
public
String
hotSearchKey
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
agentID
=
request
.
getParameter
(
"agentID"
);
List
<
Map
<
String
,
Object
>>
listMap
;
...
...
@@ -176,6 +181,7 @@ public class GoodsController {
})
@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
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
...
...
@@ -201,6 +207,7 @@ public class GoodsController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryStockPrice"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询库存价格"
)
public
String
queryStockPrice
(
String
uid
,
String
shopNo
,
String
orgNo
,
String
agentID
)
{
XException
.
assertNotBlank
(
uid
,
"商品唯一标识不能为空"
);
uid
=
uid
.
replaceAll
(
"\\s+"
,
""
);
...
...
@@ -223,6 +230,7 @@ public class GoodsController {
})
@RequestMapping
(
value
=
"/myFlavor"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"收藏及取消收藏"
)
public
String
myFlavor
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
goodsID
=
request
.
getParameter
(
"goodsID"
);
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;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.bean.RespObject
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.XmlUtil
;
import
io.swagger.annotations.Api
;
...
...
@@ -53,6 +54,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@IDCLogResource
(
name
=
"订单提交前检查"
)
@RequestMapping
(
value
=
"/check"
,
method
=
RequestMethod
.
GET
)
public
String
check
(
HttpServletRequest
request
)
{
String
shopNO
=
request
.
getParameter
(
"shopNO"
);
...
...
@@ -73,6 +75,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
false
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/submit"
,
method
=
RequestMethod
.
POST
,
produces
=
"application/json"
)
@IDCLogResource
(
name
=
"订单正式提交(JSON格式)"
)
public
String
submit
(
HttpServletRequest
request
)
{
String
reqJson
=
request
.
getParameter
(
"data"
);
JSONObject
jsonObj
=
JSONObject
.
parseObject
(
reqJson
);
...
...
@@ -92,6 +95,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"String"
,
required
=
true
,
value
=
"每页数量"
,
defaultValue
=
"20"
),
})
@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
)
{
List
<
String
>
types
=
new
ArrayList
<
String
>();
if
(
orderType
!=
null
)
{
...
...
@@ -119,6 +123,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"String"
,
required
=
true
,
value
=
"每页数量"
,
defaultValue
=
"20"
),
})
@RequestMapping
(
value
=
"/getRefundOrderList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"B2B售后退单列表"
)
public
RespObject
getRefundOrderList
(
String
orgNo
,
String
shopNo
,
Integer
refundStatus
,
String
langID
,
Integer
index
,
Integer
limit
)
{
Page
page
=
new
Page
();
...
...
@@ -137,6 +142,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/getOrderDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取主订单详情"
)
public
String
getOrderDetail
(
String
salesOrderId
,
String
langID
,
Integer
index
,
Integer
limit
)
{
XException
.
assertNotBlank
(
salesOrderId
,
"单号不能为空"
);
...
...
@@ -150,6 +156,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/getSubOrderList"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取子订单列表及详情"
)
public
String
getSubOrderList
(
String
salesOrderId
)
{
XException
.
assertNotBlank
(
salesOrderId
,
"单号不能为空"
);
return
orderService
.
queryOrderDetailList
(
salesOrderId
);
...
...
@@ -162,6 +169,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/getSubOrderDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取子订单详情"
)
public
String
getSubOrderDetail
(
String
subOrderID
)
{
XException
.
assertNotBlank
(
subOrderID
,
"单号不能为空"
);
return
orderService
.
getSubOrderDetail
(
subOrderID
);
...
...
@@ -174,6 +182,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/getDeliverSubDetail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取送货单详情"
)
public
String
getDeliverSubDetail
(
String
aocOrderID
)
{
XException
.
assertNotBlank
(
aocOrderID
,
"单号不能为空"
);
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
getDeliverSubDetail
(
aocOrderID
);
...
...
@@ -191,6 +200,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/paySuccess"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"小程序在线支付交易成功通知支付状态"
)
public
String
paySuccess
(
String
sSalesOrderID
,
BigDecimal
nPayAmount
,
String
sOpenID
,
String
sTransTraceNO
,
String
sOutTradeNO
,
String
PayTypeID
)
{
try
{
String
[]
ary
=
sOutTradeNO
.
split
(
"_"
,
2
);
...
...
@@ -279,6 +289,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@RequestMapping
(
value
=
"/cancelOrder"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"取消未付款订单"
)
public
String
cancelOrder
(
String
sSalesOrderID
)
{
orderService
.
cancelOrder
(
sSalesOrderID
);
return
Rjx
.
jsonOk
().
toJson
();
...
...
@@ -306,6 +317,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@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
)
{
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
();
...
...
@@ -332,6 +344,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@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
)
{
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
();
...
...
@@ -360,6 +373,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@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
)
{
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
();
...
...
@@ -373,6 +387,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"langID"
,
dataType
=
"String"
,
required
=
true
,
value
=
"语言"
,
defaultValue
=
"936"
),
})
@IDCLogResource
(
name
=
"确认收货"
)
public
String
confirmReceipt
(
String
custNo
,
String
subOrderID
)
{
orderService
.
confirmReceipt
(
custNo
,
subOrderID
);
return
Rjx
.
jsonOk
().
toJson
();
...
...
@@ -393,6 +408,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@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
)
{
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
createSalesOrderDebtPay
(
shopNO
,
salesOrderID
,
subOrderID
,
payTypeID
,
payType
,
payAmount
,
payCardNO
);
return
Rjx
.
jsonOk
().
set
(
"list"
,
list
).
toJson
();
...
...
@@ -409,6 +425,7 @@ public class OrderController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"terminal"
,
dataType
=
"String"
,
required
=
true
,
value
=
"终端标识"
,
defaultValue
=
"wechat"
),
@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
)
{
List
<
Map
<
String
,
Object
>>
list
=
orderService
.
createSettlePay
(
settleNO
,
payTypeID
,
payType
,
payAmount
,
payCardNO
);
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;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.PageService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -43,6 +44,7 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
@RequestMapping
(
value
=
"/queryBanner"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询banner1"
)
public
String
queryBanner
(
HttpServletRequest
request
)
{
String
custNo
=
request
.
getParameter
(
"custNo"
);
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
...
...
@@ -86,6 +88,7 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
@RequestMapping
(
value
=
"/queryNews"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询快报"
)
public
String
queryNews
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
String
msgTypeID
=
request
.
getParameter
(
"msgTypeID"
);
...
...
@@ -125,6 +128,7 @@ public class PageController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"limit"
,
dataType
=
"int"
,
required
=
true
,
value
=
"每页显示数"
,
defaultValue
=
"10"
),
})
@RequestMapping
(
value
=
"/queryFinanceProd"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询金融产品"
)
public
String
queryFinanceProd
(
HttpServletRequest
request
)
{
String
orgNO
=
request
.
getParameter
(
"orgNo"
);
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;
import
com.egolm.common.StringUtil
;
import
com.egolm.shop.api.service.OrderService
;
import
com.egolm.shop.bean.WxPayResponse
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.thoughtworks.xstream.XStream
;
import
com.thoughtworks.xstream.io.xml.DomDriver
;
...
...
@@ -46,6 +47,7 @@ public class PayNotifyController {
@ApiIgnore
@ApiOperation
(
"支付回调通知接口"
)
@RequestMapping
(
value
=
"/callback"
,
method
=
RequestMethod
.
POST
)
public
Object
callback
(
HttpServletRequest
req
,
HttpServletResponse
resp
)
{
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;
import
com.egolm.common.jdbc.Page
;
import
com.egolm.shop.api.service.PromoService
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
...
...
@@ -38,6 +39,7 @@ public class PromoController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@GetMapping
(
"getGroupList"
)
@IDCLogResource
(
name
=
"获取组合列表"
)
public
Object
getGroupList
(
String
orgNo
,
String
shopNo
,
Long
index
,
Long
limit
)
{
index
=
index
==
null
?
1
:
index
;
limit
=
limit
==
null
?
20
:
limit
;
...
...
@@ -60,6 +62,7 @@ public class PromoController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@GetMapping
(
"getGroupGoodsDetail"
)
@IDCLogResource
(
name
=
"获取组合详情"
)
public
Object
getGroupGoodsDetail
(
String
orgNo
,
String
shopNo
,
String
promoPaperNO
,
String
promoGroupNO
,
String
agentID
)
{
Integer
status
=
0
;
String
statusDesc
=
"正常活动"
;
...
...
src/main/java/com/egolm/shop/api/SystemCtrlController.java
View file @
46a8baa6
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.SystemCtrlService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -37,6 +38,7 @@ public class SystemCtrlController {
})
@RequestMapping
(
value
=
"/getSystemCtrlByCode"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取字典参数"
)
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
code
=
request
.
getParameter
(
"code"
);
...
...
src/main/java/com/egolm/shop/api/UserController.java
View file @
46a8baa6
...
...
@@ -17,6 +17,7 @@ import com.egolm.common.bean.Rjx;
import
com.egolm.shop.api.service.UserService
;
import
com.egolm.shop.bean.TCustomer
;
import
com.egolm.shop.common.XException
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.I18NUtils
;
import
io.swagger.annotations.Api
;
...
...
@@ -43,6 +44,7 @@ public class UserController {
})
@RequestMapping
(
value
=
"/createGuest"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"创建游客账号"
)
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
params
.
put
(
"orgNO"
,
request
.
getParameter
(
"orgNO"
));
...
...
@@ -65,6 +67,7 @@ public class UserController {
})
@RequestMapping
(
value
=
"/login"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"登陆"
)
public
String
login
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
userNO
=
request
.
getParameter
(
"userNO"
)==
null
?
""
:
request
.
getParameter
(
"userNO"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
...
...
@@ -89,6 +92,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/userInfo"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取用户信息"
)
public
String
userInfo
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
custNO
=
request
.
getParameter
(
"custNO"
);
String
shopNO
=
request
.
getParameter
(
"shopNO"
)==
null
?
""
:
request
.
getParameter
(
"shopNO"
);
...
...
@@ -126,6 +130,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/modifyPwd"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改密码"
)
public
String
modifyPwd
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
password
=
request
.
getParameter
(
"password"
)==
null
?
""
:
request
.
getParameter
(
"password"
);
...
...
@@ -155,6 +160,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/sendSms"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"发送短信"
)
public
String
sendSms
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
String
mobile
=
request
.
getParameter
(
"mobile"
);
String
smsTmpID
=
request
.
getParameter
(
"smsTmpID"
);
...
...
@@ -179,6 +185,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/logoutByOpenId"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"小程序注销"
)
public
String
logoutByOpenId
(
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
userService
.
deleteOpenId
(
openId
);
return
Rjx
.
jsonOk
().
toJson
();
...
...
@@ -197,6 +204,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@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
)
{
XException
.
assertNotBlank
(
appId
,
"appId不能为空"
);
XException
.
assertNotBlank
(
openId
,
"OpenID不能为空"
);
...
...
@@ -236,6 +244,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/modifyShopAuthInfo"
,
method
=
RequestMethod
.
POST
)
@IDCLogResource
(
name
=
"修改认证信息"
)
public
String
modifyShopAuthInfo
(
String
shopNo
,
String
shopName
,
...
...
@@ -289,6 +298,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryShopAuthInfo"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询认证信息"
)
public
String
queryShopAuthInfo
(
String
shopNo
,
String
langID
)
{
return
userService
.
queryShopAuthInfo
(
shopNo
,
langID
);
}
...
...
@@ -302,6 +312,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/queryUserInfoByOpenId"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"根据OPENID获取用户信息"
)
public
String
queryUserInfoByOpenId
(
String
orgNo
,
String
openId
,
String
langID
,
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
customerMap
=
userService
.
queryCustomerByOpenId
(
openId
);
if
(
customerMap
==
null
)
{
...
...
@@ -334,6 +345,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getSalesmanByShopNo"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"根据店铺编号查询业务员"
)
public
String
getSalesmanByShopNo
(
String
shopNo
)
{
Map
<
String
,
Object
>
map
=
userService
.
getSalesmanByShopNo
(
shopNo
);
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
...
...
@@ -349,6 +361,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/getCustomer"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"查询个人信息"
)
public
String
getCustomer
(
String
custNo
)
{
Map
<
String
,
Object
>
map
=
userService
.
getCustomerByNO
(
custNo
);
return
Rjx
.
jsonOk
().
set
(
"data"
,
map
).
toJson
();
...
...
@@ -364,6 +377,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/updateCustomerEmail"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"修改个人信息邮箱"
)
public
String
updateCustomerEmail
(
String
custNo
,
String
email
)
{
userService
.
updateCustomerEmail
(
custNo
,
email
);
return
Rjx
.
jsonOk
().
toJson
();
...
...
@@ -380,6 +394,7 @@ public class UserController {
@ApiImplicitParam
(
paramType
=
"query"
,
name
=
"timestamp"
,
dataType
=
"String"
,
required
=
true
,
value
=
"时间戳"
,
defaultValue
=
""
)
})
@RequestMapping
(
value
=
"/updateB2BUnionID"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"修改B2B用户UnionID"
)
public
String
updateB2BUnionID
(
String
UserNO
,
String
UnionID
)
{
userService
.
updateB2BUnionID
(
UserNO
,
UnionID
);
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;
import
com.egolm.common.StringUtil
;
import
com.egolm.common.bean.Rjx
;
import
com.egolm.shop.api.service.SystemCtrlService
;
import
com.egolm.shop.common.component.IDCLogResource
;
import
com.egolm.shop.common.utils.ShopContstrant
;
import
com.tencent.cloud.CosStsClient
;
...
...
@@ -47,6 +48,7 @@ public class YunController {
})
@RequestMapping
(
value
=
"/getPolicy"
,
method
=
RequestMethod
.
GET
)
@IDCLogResource
(
name
=
"获取上传凭证及上传的云平台"
)
public
String
createGuest
(
HttpServletRequest
request
,
HttpServletResponse
response
)
{
Map
<
String
,
Object
>
choiceMap
=
systemCtrlService
.
queryTSystemCtrlByCode
(
ShopContstrant
.
Choice_OSS_KEY
,
"936"
);
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
...
...
@@ -22,7 +22,7 @@ spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix
=
.html
#关闭swagger true开启 false关闭
swagger2.enable
=
fals
e
swagger2.enable
=
tru
e
spring.datasource.username
=
ERP
spring.datasource.password
=
qiyang@2013
...
...
src/main/resources/templates/redmine.html
View file @
46a8baa6
...
...
@@ -22,6 +22,8 @@
</head>
<body>
<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>
<p
class=
"title"
>
1.修改微企付和网商银行的退款回调过程
</p>
<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