Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-webapp-plug
Overview
Overview
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
base_platform_enterprise
gic-webapp-plug
Commits
c2ae17ce
Commit
c2ae17ce
authored
Sep 20, 2019
by
何文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新商品选择器权限
parent
fd41f770
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
71 additions
and
2 deletions
+71
-2
GoodsRightsSelectorController.java
...g/web/controller/goods/GoodsRightsSelectorController.java
+4
-0
GoodsSelectorController.java
...ic/plug/web/controller/goods/GoodsSelectorController.java
+17
-2
GoodsRightsSelectorSaveQO.java
.../com/gic/plug/web/qo/goods/GoodsRightsSelectorSaveQO.java
+13
-0
GoodsRightsSelectorUpdateQO.java
...om/gic/plug/web/qo/goods/GoodsRightsSelectorUpdateQO.java
+12
-0
GoodsRightsSelectorVO.java
...java/com/gic/plug/web/vo/goods/GoodsRightsSelectorVO.java
+13
-0
GoodsSelectorVO.java
src/main/java/com/gic/plug/web/vo/goods/GoodsSelectorVO.java
+12
-0
No files found.
src/main/java/com/gic/plug/web/controller/goods/GoodsRightsSelectorController.java
View file @
c2ae17ce
...
...
@@ -9,6 +9,7 @@ import com.gic.commons.util.EntityUtil;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.goods.api.dto.GoodsRightsSelectorDTO
;
import
com.gic.goods.api.service.GoodsRightsSelectorApiService
;
import
com.gic.goods.api.util.Constant
;
import
com.gic.plug.web.qo.goods.GoodsRightsSelectorSaveQO
;
import
com.gic.plug.web.qo.goods.GoodsRightsSelectorUpdateQO
;
import
com.gic.plug.web.vo.goods.GoodsRightsSelectorVO
;
...
...
@@ -30,6 +31,9 @@ public class GoodsRightsSelectorController {
@RequestMapping
(
"/goods-rights-selector-save"
)
public
RestResponse
goodsRightsSelectorSave
(
GoodsRightsSelectorSaveQO
goodsRightsSelectorSaveQO
)
{
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsRightsSelectorDTO
.
class
,
goodsRightsSelectorSaveQO
);
if
(
goodsRightsSelectorDTO
.
getHasRights
()
==
null
)
{
goodsRightsSelectorDTO
.
setHasRights
(
Constant
.
NO
);
}
ServiceResponse
<
GoodsRightsSelectorDTO
>
serviceResponse
=
goodsRightsSelectorApiService
.
saveGoodsRightsSelector
(
goodsRightsSelectorDTO
);
if
(
serviceResponse
.
isSuccess
())
{
goodsRightsSelectorDTO
=
serviceResponse
.
getResult
();
...
...
src/main/java/com/gic/plug/web/controller/goods/GoodsSelectorController.java
View file @
c2ae17ce
...
...
@@ -58,6 +58,14 @@ public class GoodsSelectorController {
public
RestResponse
goodsSelectorSave
(
GoodsSelectorSaveQO
goodsSelectorSaveQO
)
{
GoodsSelectorDTO
goodsSelectorDTO
=
EntityUtil
.
changeEntityByOrika
(
GoodsSelectorDTO
.
class
,
goodsSelectorSaveQO
);
goodsSelectorDTO
.
setEnterpriseId
(
Constant
.
TEST_ENTERPRISE_ID
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
46703961214504960L
);
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
}
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
goodsRightsSelectorDTOServiceResponse
.
getResult
();
goodsSelectorDTO
.
setHasRights
(
goodsRightsSelectorDTO
.
getHasRights
());
goodsSelectorDTO
.
setGoodsSearchRightValue
(
goodsRightsSelectorDTO
.
getGoodsRightsSearchValue
());
goodsSelectorDTO
.
setGoodsSearchRightText
(
goodsRightsSelectorDTO
.
getGoodsRightsSearchText
());
ServiceResponse
<
GoodsSelectorDTO
>
serviceResponse
=
goodsSelectorApiService
.
saveGoodsSelector
(
goodsSelectorDTO
);
if
(
serviceResponse
.
isSuccess
())
{
goodsSelectorDTO
=
serviceResponse
.
getResult
();
...
...
@@ -70,13 +78,20 @@ public class GoodsSelectorController {
@RequestMapping
(
"change-goods-rights-for-selector"
)
public
RestResponse
changeGoodsRightsForSelector
(
Long
goodsSelectorId
)
{
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
1234
L
);
ServiceResponse
<
GoodsRightsSelectorDTO
>
goodsRightsSelectorDTOServiceResponse
=
goodsRightsSelectorApiService
.
getGoodsRightsSelector
(
48157557076766720
L
);
if
(!
goodsRightsSelectorDTOServiceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
goodsRightsSelectorDTOServiceResponse
.
getCode
(),
goodsRightsSelectorDTOServiceResponse
.
getMessage
());
}
if
(
goodsSelectorId
==
null
)
{
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
new
GoodsRightsSelectorDTO
();
goodsRightsSelectorDTO
.
setGoodsRightsSearchText
(
goodsRightsSelectorDTOServiceResponse
.
getResult
().
getGoodsRightsSearchText
());
goodsRightsSelectorDTO
.
setGoodsRightsSearchValue
(
goodsRightsSelectorDTOServiceResponse
.
getResult
().
getGoodsRightsSearchValue
());
goodsRightsSelectorDTO
.
setHasRights
(
goodsRightsSelectorDTOServiceResponse
.
getResult
().
getHasRights
());
return
RestResponse
.
success
(
goodsRightsSelectorDTO
);
}
GoodsRightsSelectorDTO
goodsRightsSelectorDTO
=
goodsRightsSelectorDTOServiceResponse
.
getResult
();
ServiceResponse
<
GoodsSelectorDTO
>
serviceResponse
=
goodsSelectorApiService
.
updateGoodsSelectorRights
(
goodsSelectorId
,
goodsRightsSelectorDTO
.
getGoodsRightsSearchText
(),
goodsRightsSelectorDTO
.
getGoodsRightsSearchValue
());
goodsRightsSelectorDTO
.
getGoodsRightsSearchText
(),
goodsRightsSelectorDTO
.
getGoodsRightsSearchValue
()
,
goodsRightsSelectorDTO
.
getHasRights
()
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
...
...
src/main/java/com/gic/plug/web/qo/goods/GoodsRightsSelectorSaveQO.java
View file @
c2ae17ce
...
...
@@ -13,6 +13,11 @@ public class GoodsRightsSelectorSaveQO {
*/
private
String
goodsRightSearchEdit
;
/**
* 是否有商品权限 0没有 1有
*/
private
Integer
hasRights
;
public
String
getGoodsRightsSearchValue
()
{
return
goodsRightsSearchValue
;
}
...
...
@@ -28,4 +33,12 @@ public class GoodsRightsSelectorSaveQO {
public
void
setGoodsRightSearchEdit
(
String
goodsRightSearchEdit
)
{
this
.
goodsRightSearchEdit
=
goodsRightSearchEdit
;
}
public
Integer
getHasRights
()
{
return
hasRights
;
}
public
void
setHasRights
(
Integer
hasRights
)
{
this
.
hasRights
=
hasRights
;
}
}
src/main/java/com/gic/plug/web/qo/goods/GoodsRightsSelectorUpdateQO.java
View file @
c2ae17ce
...
...
@@ -13,6 +13,10 @@ public class GoodsRightsSelectorUpdateQO {
*/
private
String
goodsRightsSearchValue
;
/**
* 是否有商品权限 0没有 1有
*/
private
Integer
hasRights
;
/**
* 编辑回显的值
...
...
@@ -42,4 +46,12 @@ public class GoodsRightsSelectorUpdateQO {
public
void
setGoodsRightSearchEdit
(
String
goodsRightSearchEdit
)
{
this
.
goodsRightSearchEdit
=
goodsRightSearchEdit
;
}
public
Integer
getHasRights
()
{
return
hasRights
;
}
public
void
setHasRights
(
Integer
hasRights
)
{
this
.
hasRights
=
hasRights
;
}
}
src/main/java/com/gic/plug/web/vo/goods/GoodsRightsSelectorVO.java
View file @
c2ae17ce
...
...
@@ -53,6 +53,11 @@ public class GoodsRightsSelectorVO {
*/
private
String
goodsRightsBrands
;
/**
* 是否有商品权限 0没有 1有
*/
private
Integer
hasRights
;
public
Long
getGoodsRightsSelectorId
()
{
return
goodsRightsSelectorId
;
}
...
...
@@ -132,4 +137,12 @@ public class GoodsRightsSelectorVO {
public
void
setGoodsRightsBrands
(
String
goodsRightsBrands
)
{
this
.
goodsRightsBrands
=
goodsRightsBrands
;
}
public
Integer
getHasRights
()
{
return
hasRights
;
}
public
void
setHasRights
(
Integer
hasRights
)
{
this
.
hasRights
=
hasRights
;
}
}
src/main/java/com/gic/plug/web/vo/goods/GoodsSelectorVO.java
View file @
c2ae17ce
...
...
@@ -24,6 +24,10 @@ public class GoodsSelectorVO {
private
Long
findCount
;
/**
* 是否有商品权限 0没有 1有
*/
private
Integer
hasRights
;
public
Long
getGoodsSelectorId
()
{
return
goodsSelectorId
;
...
...
@@ -96,4 +100,12 @@ public class GoodsSelectorVO {
public
void
setFindCount
(
Long
findCount
)
{
this
.
findCount
=
findCount
;
}
public
Integer
getHasRights
()
{
return
hasRights
;
}
public
void
setHasRights
(
Integer
hasRights
)
{
this
.
hasRights
=
hasRights
;
}
}
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