Commit 8cde038b by tyfanchz

删除无用的表和相关代码

1 parent 244d4271
package com.glsx.smart.dao.entity;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-15
*/
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import lombok.Data;
/**
* 车家智能产品类型参数表
*/
@Data
@Table(name = "smart_product_type_param")
public class SmartProductTypeParam {
/**
* 标识ID
*/
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/**
* 产品类型ID 关联smart_product_type中id
*/
private Long typeId;
/**
* 指令code
*/
private String devideOrderCode;
/**
* 指令名称
*/
private String devideOrderName;
/**
* 1.有效 0.无效
*/
private String status;
/**
* 指令集取值类型
*/
private String devideOrderValuetype;
}
package com.glsx.smart.dao.mapper;
import java.util.List;
import com.glsx.smart.dao.entity.SmartProductTypeParam;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-15
*/
@Mapper
public interface SmartProductTypeParamMapper
extends tk.mybatis.mapper.common.Mapper<SmartProductTypeParam> {
int insertOrUpdate(SmartProductTypeParam record);
int insertOrUpdateSelective(SmartProductTypeParam record);
int updateBatch(List<SmartProductTypeParam> list);
int updateBatchSelective(List<SmartProductTypeParam> list);
int batchInsert(@Param("list") List<SmartProductTypeParam> list);
}
package com.glsx.smart.service;
import java.util.List;
import com.glsx.smart.dao.entity.SmartProductTypeParam;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-15
*/
public interface SmartProductTypeParamService {
int deleteByPrimaryKey(Long id);
int insertSelective(SmartProductTypeParam record);
List<SmartProductTypeParam> selectByExample(SmartProductTypeParam example);
SmartProductTypeParam selectByPrimaryKey(Long id);
int updateByPrimaryKeySelective(SmartProductTypeParam record);
int updateBatchSelective(List<SmartProductTypeParam> list);
int batchInsert(List<SmartProductTypeParam> list);
}
package com.glsx.smart.service.impl;
import javax.annotation.Resource;
import java.util.List;
import com.glsx.smart.dao.entity.SmartProductTypeParam;
import com.glsx.smart.dao.mapper.SmartProductTypeParamMapper;
import com.glsx.smart.service.SmartProductTypeParamService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
/**
* <p>Description:
* <p>Project: chejia-smart
*
* @author wbh
* @date 2021-03-15
*/
@Slf4j
@Service
public class SmartProductTypeParamServiceImpl implements SmartProductTypeParamService {
@Resource
private SmartProductTypeParamMapper smartProductTypeParamMapper;
@Override
public int deleteByPrimaryKey(Long id) {
return smartProductTypeParamMapper.deleteByPrimaryKey(id);
}
@Override
public int insertSelective(SmartProductTypeParam record) {
return smartProductTypeParamMapper.insertSelective(record);
}
@Override
public List<SmartProductTypeParam> selectByExample(SmartProductTypeParam example) {
return smartProductTypeParamMapper.select(example);
}
@Override
public SmartProductTypeParam selectByPrimaryKey(Long id) {
return smartProductTypeParamMapper.selectByPrimaryKey(id);
}
@Override
public int updateByPrimaryKeySelective(SmartProductTypeParam record) {
return smartProductTypeParamMapper.updateByPrimaryKeySelective(record);
}
@Override
public int updateBatchSelective(List<SmartProductTypeParam> list) {
return smartProductTypeParamMapper.updateBatchSelective(list);
}
@Override
public int batchInsert(List<SmartProductTypeParam> list) {
return smartProductTypeParamMapper.batchInsert(list);
}
}
<?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.SmartProductTypeParamMapper">
<resultMap id="BaseResultMap" type="com.glsx.smart.dao.entity.SmartProductTypeParam">
<!--@mbg.generated-->
<!--@Table smart_product_type_param-->
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="type_id" jdbcType="BIGINT" property="typeId"/>
<result column="devide_order_code" jdbcType="VARCHAR" property="devideOrderCode"/>
<result column="devide_order_name" jdbcType="VARCHAR" property="devideOrderName"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="devide_order_valuetype" jdbcType="VARCHAR" property="devideOrderValuetype"/>
</resultMap>
<sql id="Base_Column_List">
<!--@mbg.generated-->
id, type_id, devide_order_code, devide_order_name, `status`, devide_order_valuetype
</sql>
<update id="updateBatch" parameterType="java.util.List">
<!--@mbg.generated-->
update smart_product_type_param
<trim prefix="set" suffixOverrides=",">
<trim prefix="type_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.typeId,jdbcType=BIGINT}
</foreach>
</trim>
<trim prefix="devide_order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then
#{item.devideOrderCode,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="devide_order_name = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then
#{item.devideOrderName,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="`status` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then #{item.status,jdbcType=VARCHAR}
</foreach>
</trim>
<trim prefix="devide_order_valuetype = case" suffix="end,">
<foreach collection="list" index="index" item="item">
when id = #{item.id,jdbcType=BIGINT} then
#{item.devideOrderValuetype,jdbcType=VARCHAR}
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<update id="updateBatchSelective" parameterType="java.util.List">
<!--@mbg.generated-->
update smart_product_type_param
<trim prefix="set" suffixOverrides=",">
<trim prefix="type_id = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.typeId != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.typeId,jdbcType=BIGINT}
</if>
</foreach>
</trim>
<trim prefix="devide_order_code = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.devideOrderCode != null">
when id = #{item.id,jdbcType=BIGINT} then
#{item.devideOrderCode,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="devide_order_name = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.devideOrderName != null">
when id = #{item.id,jdbcType=BIGINT} then
#{item.devideOrderName,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="`status` = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.status != null">
when id = #{item.id,jdbcType=BIGINT} then #{item.status,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
<trim prefix="devide_order_valuetype = case" suffix="end,">
<foreach collection="list" index="index" item="item">
<if test="item.devideOrderValuetype != null">
when id = #{item.id,jdbcType=BIGINT} then
#{item.devideOrderValuetype,jdbcType=VARCHAR}
</if>
</foreach>
</trim>
</trim>
where id in
<foreach close=")" collection="list" item="item" open="(" separator=", ">
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map"
useGeneratedKeys="true">
<!--@mbg.generated-->
insert into smart_product_type_param
(type_id, devide_order_code, devide_order_name, `status`, devide_order_valuetype)
values
<foreach collection="list" item="item" separator=",">
(#{item.typeId,jdbcType=BIGINT}, #{item.devideOrderCode,jdbcType=VARCHAR},
#{item.devideOrderName,jdbcType=VARCHAR},
#{item.status,jdbcType=VARCHAR}, #{item.devideOrderValuetype,jdbcType=VARCHAR})
</foreach>
</insert>
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id"
parameterType="com.glsx.smart.dao.entity.SmartProductTypeParam" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into smart_product_type_param
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
type_id,
devide_order_code,
devide_order_name,
`status`,
devide_order_valuetype,
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
#{typeId,jdbcType=BIGINT},
#{devideOrderCode,jdbcType=VARCHAR},
#{devideOrderName,jdbcType=VARCHAR},
#{status,jdbcType=VARCHAR},
#{devideOrderValuetype,jdbcType=VARCHAR},
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=BIGINT},
</if>
type_id = #{typeId,jdbcType=BIGINT},
devide_order_code = #{devideOrderCode,jdbcType=VARCHAR},
devide_order_name = #{devideOrderName,jdbcType=VARCHAR},
`status` = #{status,jdbcType=VARCHAR},
devide_order_valuetype = #{devideOrderValuetype,jdbcType=VARCHAR},
</trim>
</insert>
<insert id="insertOrUpdateSelective" keyColumn="id" keyProperty="id"
parameterType="com.glsx.smart.dao.entity.SmartProductTypeParam" useGeneratedKeys="true">
<!--@mbg.generated-->
insert into smart_product_type_param
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="typeId != null">
type_id,
</if>
<if test="devideOrderCode != null and devideOrderCode != ''">
devide_order_code,
</if>
<if test="devideOrderName != null and devideOrderName != ''">
devide_order_name,
</if>
<if test="status != null and status != ''">
`status`,
</if>
<if test="devideOrderValuetype != null and devideOrderValuetype != ''">
devide_order_valuetype,
</if>
</trim>
values
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="typeId != null">
#{typeId,jdbcType=BIGINT},
</if>
<if test="devideOrderCode != null and devideOrderCode != ''">
#{devideOrderCode,jdbcType=VARCHAR},
</if>
<if test="devideOrderName != null and devideOrderName != ''">
#{devideOrderName,jdbcType=VARCHAR},
</if>
<if test="status != null and status != ''">
#{status,jdbcType=VARCHAR},
</if>
<if test="devideOrderValuetype != null and devideOrderValuetype != ''">
#{devideOrderValuetype,jdbcType=VARCHAR},
</if>
</trim>
on duplicate key update
<trim suffixOverrides=",">
<if test="id != null">
id = #{id,jdbcType=BIGINT},
</if>
<if test="typeId != null">
type_id = #{typeId,jdbcType=BIGINT},
</if>
<if test="devideOrderCode != null and devideOrderCode != ''">
devide_order_code = #{devideOrderCode,jdbcType=VARCHAR},
</if>
<if test="devideOrderName != null and devideOrderName != ''">
devide_order_name = #{devideOrderName,jdbcType=VARCHAR},
</if>
<if test="status != null and status != ''">
`status` = #{status,jdbcType=VARCHAR},
</if>
<if test="devideOrderValuetype != null and devideOrderValuetype != ''">
devide_order_valuetype = #{devideOrderValuetype,jdbcType=VARCHAR},
</if>
</trim>
</insert>
</mapper>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!