Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
leyi cen
Jeesns
Commits
3dceac62
Commit
3dceac62
authored
5 years ago
by
zchuanzhao
Browse files
Options
Download
Email Patches
Plain Diff
商城模块
parent
750ebd5e
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
jeesns-service/src/main/java/com/lxinet/jeesns/dao/common/IAreaDao.java
+2
-0
.../src/main/java/com/lxinet/jeesns/dao/common/IAreaDao.java
jeesns-service/src/main/java/com/lxinet/jeesns/dao/member/IDeliveryAddressDao.java
+2
-0
...ava/com/lxinet/jeesns/dao/member/IDeliveryAddressDao.java
jeesns-service/src/main/java/com/lxinet/jeesns/dao/shop/IGoodsCateDao.java
+3
-1
...c/main/java/com/lxinet/jeesns/dao/shop/IGoodsCateDao.java
jeesns-service/src/main/java/com/lxinet/jeesns/dao/shop/IGoodsDao.java
+2
-0
...e/src/main/java/com/lxinet/jeesns/dao/shop/IGoodsDao.java
jeesns-service/src/main/java/com/lxinet/jeesns/dao/shop/IShopCartDao.java
+2
-0
...rc/main/java/com/lxinet/jeesns/dao/shop/IShopCartDao.java
jeesns-web/src/main/java/com/lxinet/jeesns/web/manage/cms/ArticleController.java
+8
-8
...a/com/lxinet/jeesns/web/manage/cms/ArticleController.java
jeesns-web/src/main/java/com/lxinet/jeesns/web/manage/shop/GoodsCateController.java
+1
-1
...om/lxinet/jeesns/web/manage/shop/GoodsCateController.java
jeesns-web/src/main/java/com/lxinet/jeesns/web/manage/shop/GoodsController.java
+1
-1
...va/com/lxinet/jeesns/web/manage/shop/GoodsController.java
with
21 additions
and
11 deletions
+21
-11
jeesns-service/src/main/java/com/lxinet/jeesns/dao/common/IAreaDao.java
+
2
-
0
View file @
3dceac62
...
...
@@ -2,10 +2,12 @@ package com.lxinet.jeesns.dao.common;
import
com.lxinet.jeesns.core.dao.BaseMapper
;
import
com.lxinet.jeesns.model.common.Area
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
IAreaDao
extends
BaseMapper
<
Area
>
{
/**
...
...
This diff is collapsed.
Click to expand it.
jeesns-service/src/main/java/com/lxinet/jeesns/dao/member/IDeliveryAddressDao.java
+
2
-
0
View file @
3dceac62
...
...
@@ -4,6 +4,7 @@ import com.lxinet.jeesns.core.dao.BaseMapper;
import
com.lxinet.jeesns.core.model.Page
;
import
com.lxinet.jeesns.model.member.DeliveryAddress
;
import
com.lxinet.jeesns.model.member.Financial
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -11,6 +12,7 @@ import java.util.List;
/**
* Created by zchuanzhao on 2018/11/28.
*/
@Mapper
public
interface
IDeliveryAddressDao
extends
BaseMapper
<
DeliveryAddress
>
{
List
<
DeliveryAddress
>
listByMemberId
(
Integer
memberId
);
...
...
This diff is collapsed.
Click to expand it.
jeesns-service/src/main/java/com/lxinet/jeesns/dao/shop/IGoodsCateDao.java
+
3
-
1
View file @
3dceac62
...
...
@@ -3,6 +3,7 @@ package com.lxinet.jeesns.dao.shop;
import
com.lxinet.jeesns.core.dao.BaseMapper
;
import
com.lxinet.jeesns.model.cms.ArticleCate
;
import
com.lxinet.jeesns.model.shop.GoodsCate
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -11,7 +12,8 @@ import java.util.List;
* 商品分类
* Created by zchuanzhao on 2019/5/15.
*/
public
interface
IGoodsCateDao
extends
BaseMapper
<
GoodsCate
>
{
@Mapper
public
interface
IGoodsCateDao
extends
BaseMapper
<
GoodsCate
>
{
/**
* 获取分类
...
...
This diff is collapsed.
Click to expand it.
jeesns-service/src/main/java/com/lxinet/jeesns/dao/shop/IGoodsDao.java
+
2
-
0
View file @
3dceac62
...
...
@@ -3,6 +3,7 @@ package com.lxinet.jeesns.dao.shop;
import
com.lxinet.jeesns.core.dao.BaseMapper
;
import
com.lxinet.jeesns.core.model.Page
;
import
com.lxinet.jeesns.model.shop.Goods
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
...
...
@@ -11,6 +12,7 @@ import java.util.List;
* 商品DAO接口
* Created by zchuanzhao on 2019/5/15.
*/
@Mapper
public
interface
IGoodsDao
extends
BaseMapper
<
Goods
>
{
List
<
Goods
>
list
(
@Param
(
"page"
)
Page
page
,
@Param
(
"key"
)
String
key
,
@Param
(
"cateid"
)
Integer
cateid
,
@Param
(
"status"
)
Integer
status
);
...
...
This diff is collapsed.
Click to expand it.
jeesns-service/src/main/java/com/lxinet/jeesns/dao/shop/IShopCartDao.java
+
2
-
0
View file @
3dceac62
...
...
@@ -3,10 +3,12 @@ package com.lxinet.jeesns.dao.shop;
import
com.lxinet.jeesns.core.dao.BaseMapper
;
import
com.lxinet.jeesns.core.model.Page
;
import
com.lxinet.jeesns.model.shop.ShopCart
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
IShopCartDao
extends
BaseMapper
<
ShopCart
>
{
List
<
ShopCart
>
listByMemberId
(
@Param
(
"page"
)
Page
page
,
@Param
(
"memberId"
)
Integer
memberId
);
...
...
This diff is collapsed.
Click to expand it.
jeesns-web/src/main/java/com/lxinet/jeesns/web/manage/cms/ArticleController.java
+
8
-
8
View file @
3dceac62
...
...
@@ -33,7 +33,7 @@ public class ArticleController extends BaseController {
@Resource
private
ArticleService
articleService
;
@RequestMapping
(
"${managePath}/cms/index"
)
@RequestMapping
(
"${
jeesns.
managePath}/cms/index"
)
@Before
(
AdminLoginInterceptor
.
class
)
public
String
index
(
String
key
,
@RequestParam
(
value
=
"cateid"
,
defaultValue
=
"0"
,
required
=
false
)
Integer
cateid
,
@RequestParam
(
value
=
"status"
,
defaultValue
=
"2"
,
required
=
false
)
Integer
status
,
...
...
@@ -48,14 +48,14 @@ public class ArticleController extends BaseController {
return
MANAGE_FTL_PATH
+
"index"
;
}
@RequestMapping
(
value
=
"${managePath}/cms/article/add"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/add"
,
method
=
RequestMethod
.
GET
)
public
String
add
(
Model
model
)
{
List
<
ArticleCate
>
cateList
=
articleCateService
.
list
();
model
.
addAttribute
(
"cateList"
,
cateList
);
return
MANAGE_FTL_PATH
+
"add"
;
}
@RequestMapping
(
value
=
"${managePath}/cms/article/save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/save"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Result
save
(
@Valid
Article
article
,
BindingResult
bindingResult
)
{
if
(
bindingResult
.
hasErrors
()){
...
...
@@ -65,7 +65,7 @@ public class ArticleController extends BaseController {
return
new
Result
(
articleService
.
save
(
loginMember
,
article
));
}
@RequestMapping
(
value
=
"${managePath}/cms/article/list"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/list"
,
method
=
RequestMethod
.
GET
)
public
String
list
(
String
key
,
@RequestParam
(
value
=
"cateid"
,
defaultValue
=
"0"
,
required
=
false
)
Integer
cateid
,
@RequestParam
(
value
=
"status"
,
defaultValue
=
"2"
,
required
=
false
)
Integer
status
,
@RequestParam
(
value
=
"memberId"
,
defaultValue
=
"0"
,
required
=
false
)
Integer
memberId
,
Model
model
)
{
...
...
@@ -75,7 +75,7 @@ public class ArticleController extends BaseController {
return
MANAGE_FTL_PATH
+
"list"
;
}
@RequestMapping
(
value
=
"${managePath}/cms/article/edit/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/edit/{id}"
,
method
=
RequestMethod
.
GET
)
public
String
edit
(
@PathVariable
(
"id"
)
Integer
id
,
Model
model
){
Member
loginMember
=
MemberUtil
.
getLoginMember
(
request
);
List
<
ArticleCate
>
cateList
=
articleCateService
.
list
();
...
...
@@ -85,7 +85,7 @@ public class ArticleController extends BaseController {
return
MANAGE_FTL_PATH
+
"/edit"
;
}
@RequestMapping
(
value
=
"${managePath}/cms/article/update"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/update"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
Result
update
(
@Valid
Article
article
,
BindingResult
bindingResult
)
{
if
(
bindingResult
.
hasErrors
()){
...
...
@@ -99,14 +99,14 @@ public class ArticleController extends BaseController {
}
@RequestMapping
(
value
=
"${managePath}/cms/article/delete/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/delete/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Result
delete
(
@PathVariable
(
"id"
)
Integer
id
){
Member
loginMember
=
MemberUtil
.
getLoginMember
(
request
);
return
new
Result
(
articleService
.
delete
(
loginMember
,
id
));
}
@RequestMapping
(
value
=
"${managePath}/cms/article/audit/{id}"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"${
jeesns.
managePath}/cms/article/audit/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
Result
audit
(
@PathVariable
(
"id"
)
Integer
id
){
return
new
Result
(
articleService
.
audit
(
id
));
...
...
This diff is collapsed.
Click to expand it.
jeesns-web/src/main/java/com/lxinet/jeesns/web/manage/shop/GoodsCateController.java
+
1
-
1
View file @
3dceac62
...
...
@@ -23,7 +23,7 @@ import java.util.List;
* Created by zchuanzhao on 2019/5/15.
*/
@Controller
@RequestMapping
(
"${managePath}/shop/goodsCate/"
)
@RequestMapping
(
"${
jeesns.
managePath}/shop/goodsCate/"
)
@Before
(
AdminLoginInterceptor
.
class
)
public
class
GoodsCateController
extends
BaseController
{
private
static
final
String
MANAGE_FTL_PATH
=
"/manage/shop/goodsCate"
;
...
...
This diff is collapsed.
Click to expand it.
jeesns-web/src/main/java/com/lxinet/jeesns/web/manage/shop/GoodsController.java
+
1
-
1
View file @
3dceac62
...
...
@@ -21,7 +21,7 @@ import java.util.List;
* Created by zchuanzhao on 2019/5/15.
*/
@Controller
(
"manageGoodsController"
)
@RequestMapping
(
"${managePath}/shop/goods/"
)
@RequestMapping
(
"${
jeesns.
managePath}/shop/goods/"
)
@Before
(
AdminLoginInterceptor
.
class
)
public
class
GoodsController
extends
BaseController
{
private
static
final
String
MANAGE_FTL_PATH
=
"/manage/shop/goods/"
;
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help