Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
chejia-smart-service
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 76618edb
authored
Mar 24, 2021
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
2 parents
00fb5730
d576242a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
src/main/java/com/glsx/smart/controller/SceneController.java
src/main/java/com/glsx/smart/dao/entity/SmartUserRelation.java
src/main/resources/mapper/SmartUserRelationMapper.xml
src/main/java/com/glsx/smart/controller/SceneController.java
View file @
76618ed
...
@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
...
@@ -11,6 +11,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.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -49,12 +50,14 @@ public class SceneController {
...
@@ -49,12 +50,14 @@ public class SceneController {
@RequestMapping
(
value
=
"/add"
,
method
=
{
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/add"
,
method
=
{
RequestMethod
.
POST
})
public
boolean
save
(
@RequestBody
SmartScene
scene
)
{
public
boolean
save
(
@RequestBody
SmartScene
scene
)
{
scene
.
setCreateTime
(
new
Date
());
log
.
info
(
"用户新增调用/scene/add param: {}"
,
JSON
.
toJSONString
(
scene
));
log
.
info
(
"用户新增调用/scene/add param: {}"
,
JSON
.
toJSONString
(
scene
));
return
sceneService
.
insert
(
scene
)
>
0
?
true
:
false
;
return
sceneService
.
insert
(
scene
)
>
0
?
true
:
false
;
}
}
@RequestMapping
(
value
=
"/update"
,
method
=
{
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/update"
,
method
=
{
RequestMethod
.
POST
})
public
boolean
update
(
@RequestBody
SmartScene
scene
)
{
public
boolean
update
(
@RequestBody
SmartScene
scene
)
{
scene
.
setUpdateTime
(
new
Date
());
log
.
info
(
"用户更新调用/scene/update param: {}"
,
JSON
.
toJSONString
(
scene
));
log
.
info
(
"用户更新调用/scene/update param: {}"
,
JSON
.
toJSONString
(
scene
));
return
sceneService
.
update
(
scene
)
>
0
?
true
:
false
;
return
sceneService
.
update
(
scene
)
>
0
?
true
:
false
;
}
}
...
...
src/main/java/com/glsx/smart/dao/entity/SmartUserRelation.java
View file @
76618ed
package
com
.
glsx
.
smart
.
dao
.
entity
;
package
com
.
glsx
.
smart
.
dao
.
entity
;
import
lombok.Data
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.GenerationType
;
import
javax.persistence.GenerationType
;
import
javax.persistence.Id
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Table
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
lombok.Data
;
/**
/**
* <p>Description:
* <p>Description:
...
@@ -21,7 +23,7 @@ import lombok.Data;
...
@@ -21,7 +23,7 @@ import lombok.Data;
*/
*/
@Data
@Data
@Table
(
name
=
"smart_user_relation"
)
@Table
(
name
=
"smart_user_relation"
)
public
class
SmartUserRelation
{
public
class
SmartUserRelation
implements
Serializable
{
/**
/**
* 标识ID
* 标识ID
*/
*/
...
@@ -30,6 +32,11 @@ public class SmartUserRelation {
...
@@ -30,6 +32,11 @@ public class SmartUserRelation {
private
Long
id
;
private
Long
id
;
/**
/**
* 公司用户ID
*/
private
Long
userId
;
/**
* 用户昵称
* 用户昵称
*/
*/
private
String
name
;
private
String
name
;
...
...
src/main/resources/mapper/SmartUserRelationMapper.xml
View file @
76618ed
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<!--@Table smart_user_relation-->
<!--@Table smart_user_relation-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"phone"
jdbcType=
"VARCHAR"
property=
"phone"
/>
<result
column=
"phone"
jdbcType=
"VARCHAR"
property=
"phone"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"password"
jdbcType=
"VARCHAR"
property=
"password"
/>
<result
column=
"channel"
jdbcType=
"TINYINT"
property=
"channel"
/>
<result
column=
"channel"
jdbcType=
"TINYINT"
property=
"channel"
/>
...
@@ -17,7 +18,7 @@
...
@@ -17,7 +18,7 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
id, `name`, phone, `password`, channel, third_id, `status`, remark, create_time
id, `name`,
user_id,
phone, `password`, channel, third_id, `status`, remark, create_time
</sql>
</sql>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<update
id=
"updateBatch"
parameterType=
"java.util.List"
>
<!--@mbg.generated-->
<!--@mbg.generated-->
...
@@ -298,6 +299,9 @@
...
@@ -298,6 +299,9 @@
<if
test=
"id != null"
>
<if
test=
"id != null"
>
and id = #{id,jdbcType=BIGINT}
and id = #{id,jdbcType=BIGINT}
</if>
</if>
<if
test=
"userId != null"
>
and user_id = #{userId,jdbcType=BIGINT}
</if>
<if
test=
"phone != null and phone != ''"
>
<if
test=
"phone != null and phone != ''"
>
and phone = #{phone,jdbcType=VARCHAR}
and phone = #{phone,jdbcType=VARCHAR}
</if>
</if>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment