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
14ea1ffb
Commit
14ea1ffb
authored
Feb 13, 2020
by
zhangdongwei-intern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix-1002347: 小号新增编号
parent
1f8b34a8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
4 deletions
+42
-4
PcloudRobotBizImpl.java
...cloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
+10
-0
PcloudRobotDao.java
...ava/com/pcloud/book/pcloudkeyword/dao/PcloudRobotDao.java
+7
-0
PcloudRobotDaoImpl.java
...cloud/book/pcloudkeyword/dao/impl/PcloudRobotDaoImpl.java
+5
-0
PcloudRobot.java
...ava/com/pcloud/book/pcloudkeyword/entity/PcloudRobot.java
+3
-0
PcloudRobot.Mapper.xml
...ain/resources/mapper/pcloudkeyword/PcloudRobot.Mapper.xml
+17
-4
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/biz/impl/PcloudRobotBizImpl.java
View file @
14ea1ffb
...
...
@@ -84,6 +84,16 @@ public class PcloudRobotBizImpl implements PcloudRobotBiz {
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
updatePcloudRobot
(
PcloudRobot
pcloudRobot
)
{
if
(!
StringUtil
.
isEmpty
(
pcloudRobot
.
getUniqueNumber
())){
if
(
pcloudRobot
.
getUniqueNumber
().
length
()
>
20
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"编号长度不能超过20,请重新输入"
);
}
//校验编号是否重复
PcloudRobot
robot
=
pcloudRobotDao
.
getByUniqueNumber
(
pcloudRobot
.
getUniqueNumber
());
if
(
null
!=
robot
){
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_ERROR
,
"编号重复,请重新输入"
);
}
}
pcloudRobotDao
.
update
(
pcloudRobot
);
if
(
pcloudRobot
.
getRobotType
()
!=
null
)
{
PcloudRobotQrcode
robotQrcode
=
pcloudRobotQrcodeDao
.
getByRobotType
(
pcloudRobot
.
getRobotType
());
...
...
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/PcloudRobotDao.java
View file @
14ea1ffb
...
...
@@ -21,4 +21,11 @@ public interface PcloudRobotDao extends BaseDao<PcloudRobot> {
List
<
RobotClassifyDTO
>
getAllPcloudRobot
();
/**
* 根据编号获取小号
* @param uniqueNumber
* @return
*/
PcloudRobot
getByUniqueNumber
(
String
uniqueNumber
);
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/dao/impl/PcloudRobotDaoImpl.java
View file @
14ea1ffb
...
...
@@ -42,4 +42,9 @@ public class PcloudRobotDaoImpl extends BaseDaoImpl<PcloudRobot> implements Pclo
return
this
.
getSessionTemplate
().
selectList
(
this
.
getStatement
(
"getAllPcloudRobot"
));
}
@Override
public
PcloudRobot
getByUniqueNumber
(
String
uniqueNumber
)
{
return
this
.
getSessionTemplate
().
selectOne
(
this
.
getStatement
(
"getByUniqueNumber"
),
uniqueNumber
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/pcloudkeyword/entity/PcloudRobot.java
View file @
14ea1ffb
...
...
@@ -52,4 +52,7 @@ public class PcloudRobot extends BaseEntity {
@ApiModelProperty
(
"自动唤醒配置 1开启"
)
private
Integer
wakeUp
;
@ApiModelProperty
(
"编号"
)
private
String
uniqueNumber
;
}
pcloud-service-book/src/main/resources/mapper/pcloudkeyword/PcloudRobot.Mapper.xml
View file @
14ea1ffb
...
...
@@ -11,10 +11,10 @@
<result
column=
"keyword_classify_id"
jdbcType=
"BIGINT"
property=
"keywordClassifyId"
/>
<result
column=
"state"
property=
"state"
jdbcType=
"INTEGER"
/>
<result
column=
"wake_up"
property=
"wakeUp"
jdbcType=
"INTEGER"
/>
<result
column=
"unique_number"
property=
"uniqueNumber"
jdbcType=
"VARCHAR"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, wx_id, nick_name, head, qrcode_url, robot_type, keyword_classify_id, state, wake_up
id, wx_id, nick_name, head, qrcode_url, robot_type, keyword_classify_id, state, wake_up
, unique_number
</sql>
<insert
id=
"insert"
parameterType=
"PcloudRobot"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
...
...
@@ -26,7 +26,8 @@
robot_type,
keyword_classify_id,
state,
wake_up
wake_up,
unique_number
)
values (
#{wxId,jdbcType=VARCHAR},
...
...
@@ -36,7 +37,8 @@
#{robotType,jdbcType=INTEGER},
#{keywordClassifyId,jdbcType=BIGINT},
#{state,jdbcType=INTEGER},
#{wakeUp,jdbcType=INTEGER}
#{wakeUp,jdbcType=INTEGER},
#{uniqueNumber, jdbcType=VARCHAR}
)
</insert>
...
...
@@ -67,6 +69,9 @@
<if
test=
"wakeUp != null"
>
wake_up = #{wakeUp,jdbcType=INTEGER},
</if>
<if
test=
"uniqueNumber != null"
>
unique_number = #{uniqueNumber, jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
...
...
@@ -92,6 +97,7 @@
r.robot_type robotType,
r.keyword_classify_id keywordClassifyId,
r.state state,
r.unique_number uniqueNumber,
rc.classify_name classifyName
FROM
pcloud_robot r
...
...
@@ -184,4 +190,10 @@
pr.is_delete = 0
</select>
<select
id=
"getByUniqueNumber"
parameterType=
"string"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from pcloud_robot where unique_number = #{uniqueNumber}
limit 1
</select>
</mapper>
\ No newline at end of file
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