Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
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
徐少华
midjourney-proxy
Commits
55982a68
Commit
55982a68
authored
Feb 25, 2021
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: [none] 编辑创建书加IP
parent
369ddb4c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
4 deletions
+9
-4
BookBizImpl.java
.../main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
+1
-0
BookFacade.java
...src/main/java/com/pcloud/book/book/facade/BookFacade.java
+2
-1
BookFacadeImpl.java
...java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
+4
-1
BookAdviser.Mapper.xml
...ook/src/main/resources/mapper/book/BookAdviser.Mapper.xml
+2
-2
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/book/biz/impl/BookBizImpl.java
View file @
55982a68
...
@@ -1646,6 +1646,7 @@ public class BookBizImpl implements BookBiz {
...
@@ -1646,6 +1646,7 @@ public class BookBizImpl implements BookBiz {
bookAdviser
.
setDepLabelId
(
book
.
getDepLabelId
());
bookAdviser
.
setDepLabelId
(
book
.
getDepLabelId
());
bookAdviser
.
setPurLabelId
(
book
.
getPurLabelId
());
bookAdviser
.
setPurLabelId
(
book
.
getPurLabelId
());
bookAdviser
.
setVolLabelId
(
book
.
getVolLabelId
());
bookAdviser
.
setVolLabelId
(
book
.
getVolLabelId
());
bookAdviser
.
setIpAddress
(
book
.
getIpAddress
());
if
(
book
.
getIsBookGroup
()!=
null
&&
book
.
getIsBookGroup
()){
if
(
book
.
getIsBookGroup
()!=
null
&&
book
.
getIsBookGroup
()){
bookAdviser
.
setIsOpenRobotProcess
(
1
);
bookAdviser
.
setIsOpenRobotProcess
(
1
);
}
else
{
}
else
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/BookFacade.java
View file @
55982a68
...
@@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -36,6 +36,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -559,7 +560,7 @@ public interface BookFacade {
...
@@ -559,7 +560,7 @@ public interface BookFacade {
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"token"
,
value
=
"token"
,
dataType
=
"String"
,
paramType
=
"header"
),
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@ApiImplicitParam
(
name
=
"book"
,
value
=
"书籍实体"
,
dataType
=
"Book"
,
paramType
=
"body"
)})
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
,
HttpServletRequest
request
)
throws
BizException
,
PermissionException
,
JsonParseException
;
throws
BizException
,
PermissionException
,
JsonParseException
;
/**
/**
...
...
pcloud-service-book/src/main/java/com/pcloud/book/book/facade/impl/BookFacadeImpl.java
View file @
55982a68
...
@@ -31,6 +31,7 @@ import com.pcloud.common.permission.PermissionException;
...
@@ -31,6 +31,7 @@ import com.pcloud.common.permission.PermissionException;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.ListUtils
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.SessionUtil
;
import
com.pcloud.common.utils.cookie.Cookie
;
import
com.pcloud.common.utils.cookie.Cookie
;
import
com.pcloud.common.utils.nginx.NginxUtils
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.common.utils.string.StringUtil
;
import
com.pcloud.wechatgroup.message.enums.IsSystem
;
import
com.pcloud.wechatgroup.message.enums.IsSystem
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
...
@@ -40,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -40,6 +41,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.*
;
/**
/**
...
@@ -762,13 +764,14 @@ public class BookFacadeImpl implements BookFacade {
...
@@ -762,13 +764,14 @@ public class BookFacadeImpl implements BookFacade {
*/
*/
@Override
@Override
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"create4Adviser"
,
method
=
RequestMethod
.
POST
)
public
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
)
public
ResponseDto
<
BookDto
>
create4Adviser
(
@RequestHeader
(
"token"
)
String
token
,
@RequestBody
Book
book
,
HttpServletRequest
request
)
throws
BizException
,
PermissionException
{
throws
BizException
,
PermissionException
{
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
adviserId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
PARTY_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
Long
agentId
=
(
Long
)
SessionUtil
.
getVlaue
(
token
,
SessionUtil
.
TENANT_ID
);
// 实体赋值
// 实体赋值
book
.
setCreatedUser
(
adviserId
);
book
.
setCreatedUser
(
adviserId
);
book
.
setAgentId
(
agentId
);
book
.
setAgentId
(
agentId
);
book
.
setIpAddress
(
NginxUtils
.
getClientIp
(
request
));
BookDto
bookDto
=
bookBiz
.
create4Adviser
(
book
);
BookDto
bookDto
=
bookBiz
.
create4Adviser
(
book
);
return
new
ResponseDto
<>(
bookDto
);
return
new
ResponseDto
<>(
bookDto
);
}
}
...
...
pcloud-service-book/src/main/resources/mapper/book/BookAdviser.Mapper.xml
View file @
55982a68
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
INSERT INTO BOOK_ADVISER (
INSERT INTO BOOK_ADVISER (
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID, SECOND_TEMPLET_ID,third_templet_id,
BOOK_ID, ADVISER_ID, CHANNEL_ID, CREATED_USER, CREATED_DATE,IS_MAIN_EDITOR, TEMPLET_ID, SECOND_TEMPLET_ID,third_templet_id,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_label_id,is_open_robot_process,
GRA_LABEL_ID,SUB_LABEL_ID,VER_LABEL_ID,AREA_LABEL_ID,pro_label_id, dep_label_id,pur_label_id,is_open_robot_process,
vol_label_id,LAST_MODIFIED_DATE
vol_label_id,LAST_MODIFIED_DATE
,ip_address
)
)
VALUES (
VALUES (
#{bookId, jdbcType=VARCHAR}, #{adviserId, jdbcType=VARCHAR}, #{channelId, jdbcType=VARCHAR},
#{bookId, jdbcType=VARCHAR}, #{adviserId, jdbcType=VARCHAR}, #{channelId, jdbcType=VARCHAR},
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
#{secondTempletId, jdbcType=BIGINT},#{thirdTempletId},#{graLabelId, jdbcType=BIGINT},#{subLabelId, jdbcType=BIGINT},
#{secondTempletId, jdbcType=BIGINT},#{thirdTempletId},#{graLabelId, jdbcType=BIGINT},#{subLabelId, jdbcType=BIGINT},
#{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT},
#{verLabelId, jdbcType=BIGINT},#{areaLabelId, jdbcType=BIGINT},#{proLabelId,jdbcType=BIGINT},
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT},
#{depLabelId,jdbcType=BIGINT},#{purLabelId,jdbcType=BIGINT},#{isOpenRobotProcess,jdbcType=BIT},
#{volLabelId},now()
#{volLabelId},now()
,#{ipAddress}
)
)
ON
ON
DUPLICATE KEY UPDATE IS_DELETE = 0,LAST_MODIFIED_DATE=now(), IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT}
DUPLICATE KEY UPDATE IS_DELETE = 0,LAST_MODIFIED_DATE=now(), IS_MAIN_EDITOR = #{isMainEditor, jdbcType=BIT}
...
...
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