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 970793e6
authored
Apr 11, 2021
by
tyfanchz
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
生成新表相关逻辑
1 parent
3f3719c3
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
153 additions
and
0 deletions
src/main/java/com/glsx/smart/dao/entity/SmartSceneLog.java
src/main/java/com/glsx/smart/dao/mapper/SmartSceneLogMapper.java
src/main/java/com/glsx/smart/service/SmartSceneLogService.java
src/main/java/com/glsx/smart/service/impl/SmartSceneLogServiceImpl.java
src/main/resources/mapper/SmartSceneLogMapper.xml
src/main/java/com/glsx/smart/dao/entity/SmartSceneLog.java
0 → 100644
View file @
970793e
package
com
.
glsx
.
smart
.
dao
.
entity
;
import
javax.persistence.Column
;
import
javax.persistence.GeneratedValue
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
import
lombok.Data
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-04-11
*/
/**
* 车家智能用户场景日志表
*/
@Data
@Table
(
name
=
"smart_scene_log"
)
public
class
SmartSceneLog
{
/**
* 标识ID
*/
@Id
@Column
(
name
=
"id"
)
@GeneratedValue
(
generator
=
"JDBC"
)
private
Long
id
;
/**
* 用户ID 关联smart_user_relation中id
*/
@Column
(
name
=
"user_id"
)
private
Long
userId
;
/**
* 描述
*/
@Column
(
name
=
"descript"
)
private
String
descript
;
/**
* 场景数据
*/
@Column
(
name
=
"remark"
)
private
String
remark
;
/**
* 创建时间
*/
@Column
(
name
=
"create_time"
)
private
Date
createTime
;
}
src/main/java/com/glsx/smart/dao/mapper/SmartSceneLogMapper.java
0 → 100644
View file @
970793e
package
com
.
glsx
.
smart
.
dao
.
mapper
;
import
com.glsx.smart.dao.entity.SmartSceneLog
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-04-11
*/
@Mapper
public
interface
SmartSceneLogMapper
extends
tk
.
mybatis
.
mapper
.
common
.
Mapper
<
SmartSceneLog
>
{
}
src/main/java/com/glsx/smart/service/SmartSceneLogService.java
0 → 100644
View file @
970793e
package
com
.
glsx
.
smart
.
service
;
import
com.glsx.smart.dao.entity.SmartSceneLog
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-04-11
*/
public
interface
SmartSceneLogService
{
SmartSceneLog
selectByPrimaryKey
(
SmartSceneLog
sceneLog
);
int
insertSelective
(
SmartSceneLog
sceneLog
);
int
deleteByPrimaryKey
(
SmartSceneLog
sceneLog
);
int
updateByPrimaryKeySelective
(
SmartSceneLog
sceneLog
);
}
src/main/java/com/glsx/smart/service/impl/SmartSceneLogServiceImpl.java
0 → 100644
View file @
970793e
package
com
.
glsx
.
smart
.
service
.
impl
;
import
javax.annotation.Resource
;
import
com.glsx.smart.dao.entity.SmartSceneLog
;
import
com.glsx.smart.dao.mapper.SmartSceneLogMapper
;
import
com.glsx.smart.service.SmartSceneLogService
;
import
org.springframework.stereotype.Service
;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-04-11
*/
@Service
public
class
SmartSceneLogServiceImpl
implements
SmartSceneLogService
{
@Resource
private
SmartSceneLogMapper
sceneLogMapper
;
@Override
public
SmartSceneLog
selectByPrimaryKey
(
SmartSceneLog
sceneLog
)
{
return
sceneLogMapper
.
selectByPrimaryKey
(
sceneLog
.
getId
());
}
@Override
public
int
insertSelective
(
SmartSceneLog
sceneLog
)
{
return
sceneLogMapper
.
insertSelective
(
sceneLog
);
}
@Override
public
int
deleteByPrimaryKey
(
SmartSceneLog
sceneLog
)
{
return
sceneLogMapper
.
deleteByPrimaryKey
(
sceneLog
.
getId
());
}
@Override
public
int
updateByPrimaryKeySelective
(
SmartSceneLog
sceneLog
)
{
return
sceneLogMapper
.
updateByPrimaryKeySelective
(
sceneLog
);
}
}
src/main/resources/mapper/SmartSceneLogMapper.xml
0 → 100644
View file @
970793e
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.glsx.smart.dao.mapper.SmartSceneLogMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.glsx.smart.dao.entity.SmartSceneLog"
>
<!--@mbg.generated generated on Sun Apr 11 11:12:26 CST 2021.-->
<!--@Table smart_scene_log-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"user_id"
jdbcType=
"BIGINT"
property=
"userId"
/>
<result
column=
"descript"
jdbcType=
"VARCHAR"
property=
"descript"
/>
<result
column=
"remark"
jdbcType=
"LONGVARCHAR"
property=
"remark"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
<!--@mbg.generated generated on Sun Apr 11 11:12:26 CST 2021.-->
id, user_id, descript, remark, create_time
</sql>
</mapper>
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