Commit 970793e6 by tyfanchz

生成新表相关逻辑

1 parent 3f3719c3
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;
}
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> {
}
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);
}
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);
}
}
<?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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!