Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
7ae28966
Commit
7ae28966
authored
May 06, 2019
by
Junling Bu
Browse files
chore[litemall-admin, litemall-admin-api]: 调整管理后台的数组对象使用场景
parent
d60e90b0
Changes
46
Hide whitespace changes
Inline
Side-by-side
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminTopicController.java
View file @
7ae28966
package
org.linlinjava.litemall.admin.web
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
...
...
@@ -17,9 +16,7 @@ import org.springframework.web.bind.annotation.*;
import
javax.validation.constraints.NotNull
;
import
java.math.BigDecimal
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
@RestController
@RequestMapping
(
"/admin/topic"
)
...
...
@@ -39,12 +36,7 @@ public class AdminTopicController {
@Sort
@RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
List
<
LitemallTopic
>
topicList
=
topicService
.
querySelective
(
title
,
subtitle
,
page
,
limit
,
sort
,
order
);
long
total
=
PageInfo
.
of
(
topicList
).
getTotal
();
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"total"
,
total
);
data
.
put
(
"items"
,
topicList
);
return
ResponseUtil
.
ok
(
data
);
return
ResponseUtil
.
okList
(
topicList
);
}
private
Object
validate
(
LitemallTopic
topic
)
{
...
...
litemall-admin-api/src/main/java/org/linlinjava/litemall/admin/web/AdminUserController.java
View file @
7ae28966
package
org.linlinjava.litemall.admin.web
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.linlinjava.litemall.admin.annotation.RequiresPermissionsDesc
;
import
org.linlinjava.litemall.core.util.RegexUtil
;
import
org.linlinjava.litemall.core.util.ResponseUtil
;
import
org.linlinjava.litemall.core.util.bcrypt.BCryptPasswordEncoder
;
import
org.linlinjava.litemall.core.validator.Order
;
import
org.linlinjava.litemall.core.validator.Sort
;
import
org.linlinjava.litemall.db.domain.LitemallUser
;
import
org.linlinjava.litemall.db.service.LitemallUserService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.StringUtils
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.constraints.NotEmpty
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
static
org
.
linlinjava
.
litemall
.
admin
.
util
.
AdminResponseCode
.*;
@RestController
@RequestMapping
(
"/admin/user"
)
...
...
@@ -42,11 +33,6 @@ public class AdminUserController {
@Sort
@RequestParam
(
defaultValue
=
"add_time"
)
String
sort
,
@Order
@RequestParam
(
defaultValue
=
"desc"
)
String
order
)
{
List
<
LitemallUser
>
userList
=
userService
.
querySelective
(
username
,
mobile
,
page
,
limit
,
sort
,
order
);
long
total
=
PageInfo
.
of
(
userList
).
getTotal
();
Map
<
String
,
Object
>
data
=
new
HashMap
<>();
data
.
put
(
"total"
,
total
);
data
.
put
(
"items"
,
userList
);
return
ResponseUtil
.
ok
(
data
);
return
ResponseUtil
.
okList
(
userList
);
}
}
litemall-admin/src/views/goods/comment.vue
View file @
7ae28966
...
...
@@ -64,7 +64,7 @@ export default {
components
:
{
Pagination
},
data
()
{
return
{
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -90,7 +90,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listComment
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/goods/list.vue
View file @
7ae28966
...
...
@@ -153,7 +153,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listGoods
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/mall/brand.vue
View file @
7ae28966
...
...
@@ -110,7 +110,7 @@ export default {
data
()
{
return
{
uploadPath
,
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -157,7 +157,7 @@ export default {
this
.
listLoading
=
true
listBrand
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/mall/category.vue
View file @
7ae28966
...
...
@@ -180,7 +180,7 @@ export default {
this
.
listLoading
=
true
listCategory
()
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
this
.
list
=
response
.
data
.
data
.
list
this
.
listLoading
=
false
})
.
catch
(()
=>
{
...
...
@@ -190,7 +190,7 @@ export default {
},
getCatL1
()
{
listCatL1
().
then
(
response
=>
{
this
.
catL1
=
response
.
data
.
data
this
.
catL1
=
response
.
data
.
data
.
list
})
},
resetForm
()
{
...
...
litemall-admin/src/views/mall/issue.vue
View file @
7ae28966
...
...
@@ -91,7 +91,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listIssue
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/mall/keyword.vue
View file @
7ae28966
...
...
@@ -82,7 +82,7 @@ export default {
components
:
{
Pagination
},
data
()
{
return
{
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -119,7 +119,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listKeyword
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/mall/order.vue
View file @
7ae28966
...
...
@@ -168,7 +168,7 @@ export default {
},
data
()
{
return
{
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -209,7 +209,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listOrder
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/mall/region.vue
View file @
7ae28966
...
...
@@ -35,7 +35,7 @@ export default {
},
data
()
{
return
{
list
:
undefined
,
list
:
[]
,
listLoading
:
true
,
downloadLoading
:
false
}
...
...
@@ -47,7 +47,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listRegion
().
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
this
.
list
=
response
.
data
.
data
.
list
this
.
listLoading
=
false
}).
catch
(()
=>
{
this
.
list
=
[]
...
...
litemall-admin/src/views/promotion/ad.vue
View file @
7ae28966
...
...
@@ -129,7 +129,7 @@ export default {
data
()
{
return
{
uploadPath
,
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -182,7 +182,7 @@ export default {
this
.
listLoading
=
true
listAd
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/promotion/coupon.vue
View file @
7ae28966
...
...
@@ -245,7 +245,7 @@ export default {
return
{
typeOptions
:
Object
.
assign
({},
defaultTypeOptions
),
statusOptions
:
Object
.
assign
({},
defaultStatusOptions
),
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -297,7 +297,7 @@ export default {
this
.
listLoading
=
true
listCoupon
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/promotion/couponDetail.vue
View file @
7ae28966
...
...
@@ -154,7 +154,7 @@ export default {
typeOptions
:
Object
.
assign
({},
defaultTypeOptions
),
useStatusOptions
:
Object
.
assign
({},
defaultUseStatusOptions
),
coupon
:
{},
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -187,7 +187,7 @@ export default {
this
.
listLoading
=
true
listCouponUser
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/promotion/grouponActivity.vue
View file @
7ae28966
...
...
@@ -109,7 +109,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listRecord
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/promotion/grouponRule.vue
View file @
7ae28966
...
...
@@ -132,7 +132,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listGroupon
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/promotion/topic.vue
View file @
7ae28966
...
...
@@ -133,7 +133,7 @@ export default {
data
()
{
return
{
uploadPath
,
list
:
undefined
,
list
:
[]
,
total
:
0
,
listLoading
:
true
,
listQuery
:
{
...
...
@@ -213,7 +213,7 @@ export default {
this
.
listLoading
=
true
listTopic
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/sys/admin.vue
View file @
7ae28966
...
...
@@ -178,7 +178,7 @@ export default {
this
.
listLoading
=
true
listAdmin
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/sys/log.vue
View file @
7ae28966
...
...
@@ -79,7 +79,7 @@ export default {
this
.
listLoading
=
true
listLog
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
litemall-admin/src/views/sys/os.vue
View file @
7ae28966
...
...
@@ -101,7 +101,7 @@ export default {
getList
()
{
this
.
listLoading
=
true
listStorage
(
this
.
listQuery
).
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
}).
catch
(()
=>
{
...
...
litemall-admin/src/views/sys/role.vue
View file @
7ae28966
...
...
@@ -116,7 +116,7 @@ export default {
this
.
listLoading
=
true
listRole
(
this
.
listQuery
)
.
then
(
response
=>
{
this
.
list
=
response
.
data
.
data
.
items
this
.
list
=
response
.
data
.
data
.
list
this
.
total
=
response
.
data
.
data
.
total
this
.
listLoading
=
false
})
...
...
Prev
1
2
3
Next
Write
Preview
Supports
Markdown
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