Commit a5bd381a authored by 盖献康's avatar 盖献康

车企信息 - 修改

parent f580eafc
package com.ruoyi.domain; package com.ruoyi.domain;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
...@@ -19,30 +19,36 @@ import com.ruoyi.common.core.domain.BaseEntity; ...@@ -19,30 +19,36 @@ import com.ruoyi.common.core.domain.BaseEntity;
@Builder @Builder
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class TAutomobileEnterprise extends BaseEntity @ApiModel(value = "车企信息对象")
public class AutomobileEnterprise extends BaseEntity
{ {
private static final long serialVersionUID = 1L;
/** 主键 */ /** 主键 */
@ApiModelProperty("ID")
private Long id; private Long id;
/** 企业名称 */ /** 企业名称 */
@Excel(name = "企业名称") @Excel(name = "企业名称")
@ApiModelProperty("企业名称")
private String enterpriseName; private String enterpriseName;
/** 地址 */ /** 地址 */
@Excel(name = "地址") @Excel(name = "地址")
@ApiModelProperty("地址")
private String address; private String address;
/** 邮编 */ /** 邮编 */
@Excel(name = "邮编") @Excel(name = "邮编")
@ApiModelProperty("邮编")
private String postcode; private String postcode;
/** 企业联系人 */ /** 企业联系人 */
@Excel(name = "企业联系人") @Excel(name = "企业联系人")
@ApiModelProperty("企业联系人")
private String enterpriseContact; private String enterpriseContact;
/** 联系电话 */ /** 联系电话 */
@Excel(name = "联系电话") @Excel(name = "联系电话")
@ApiModelProperty("联系电话")
private String contactNumber; private String contactNumber;
} }
package com.ruoyi.mapper; package com.ruoyi.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.domain.TAutomobileEnterprise; import com.ruoyi.domain.AutomobileEnterprise;
/** /**
* 车企信息Mapper接口 * 车企信息Mapper接口
...@@ -9,7 +9,7 @@ import com.ruoyi.domain.TAutomobileEnterprise; ...@@ -9,7 +9,7 @@ import com.ruoyi.domain.TAutomobileEnterprise;
* @author gxk * @author gxk
* @date 2024-01-05 * @date 2024-01-05
*/ */
public interface TAutomobileEnterpriseMapper public interface AutomobileEnterpriseMapper
{ {
/** /**
* 查询车企信息 * 查询车企信息
...@@ -17,31 +17,31 @@ public interface TAutomobileEnterpriseMapper ...@@ -17,31 +17,31 @@ public interface TAutomobileEnterpriseMapper
* @param id 车企信息主键 * @param id 车企信息主键
* @return 车企信息 * @return 车企信息
*/ */
public TAutomobileEnterprise selectTAutomobileEnterpriseById(Long id); public AutomobileEnterprise selectAutomobileEnterpriseById(Long id);
/** /**
* 查询车企信息列表 * 查询车企信息列表
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 车企信息集合 * @return 车企信息集合
*/ */
public List<TAutomobileEnterprise> selectTAutomobileEnterpriseList(TAutomobileEnterprise tAutomobileEnterprise); public List<AutomobileEnterprise> selectAutomobileEnterpriseList(AutomobileEnterprise automobileEnterprise);
/** /**
* 新增车企信息 * 新增车企信息
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 结果 * @return 结果
*/ */
public int insertTAutomobileEnterprise(TAutomobileEnterprise tAutomobileEnterprise); public int insertAutomobileEnterprise(AutomobileEnterprise automobileEnterprise);
/** /**
* 修改车企信息 * 修改车企信息
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 结果 * @return 结果
*/ */
public int updateTAutomobileEnterprise(TAutomobileEnterprise tAutomobileEnterprise); public int updateAutomobileEnterprise(AutomobileEnterprise automobileEnterprise);
/** /**
* 删除车企信息 * 删除车企信息
...@@ -49,7 +49,7 @@ public interface TAutomobileEnterpriseMapper ...@@ -49,7 +49,7 @@ public interface TAutomobileEnterpriseMapper
* @param id 车企信息主键 * @param id 车企信息主键
* @return 结果 * @return 结果
*/ */
public int deleteTAutomobileEnterpriseById(Long id); public int deleteAutomobileEnterpriseById(Long id);
/** /**
* 批量删除车企信息 * 批量删除车企信息
...@@ -57,5 +57,5 @@ public interface TAutomobileEnterpriseMapper ...@@ -57,5 +57,5 @@ public interface TAutomobileEnterpriseMapper
* @param ids 需要删除的数据主键集合 * @param ids 需要删除的数据主键集合
* @return 结果 * @return 结果
*/ */
public int deleteTAutomobileEnterpriseByIds(Long[] ids); public int deleteAutomobileEnterpriseByIds(Long[] ids);
} }
package com.ruoyi.service; package com.ruoyi.service;
import java.util.List; import java.util.List;
import com.ruoyi.domain.TAutomobileEnterprise; import com.ruoyi.domain.AutomobileEnterprise;
import org.apache.ibatis.annotations.Mapper;
/** /**
* 车企信息Service接口 * 车企信息Service接口
...@@ -9,7 +10,8 @@ import com.ruoyi.domain.TAutomobileEnterprise; ...@@ -9,7 +10,8 @@ import com.ruoyi.domain.TAutomobileEnterprise;
* @author gxk * @author gxk
* @date 2024-01-05 * @date 2024-01-05
*/ */
public interface ITAutomobileEnterpriseService @Mapper
public interface IAutomobileEnterpriseService
{ {
/** /**
* 查询车企信息 * 查询车企信息
...@@ -17,31 +19,31 @@ public interface ITAutomobileEnterpriseService ...@@ -17,31 +19,31 @@ public interface ITAutomobileEnterpriseService
* @param id 车企信息主键 * @param id 车企信息主键
* @return 车企信息 * @return 车企信息
*/ */
public TAutomobileEnterprise selectTAutomobileEnterpriseById(Long id); public AutomobileEnterprise selectAutomobileEnterpriseById(Long id);
/** /**
* 查询车企信息列表 * 查询车企信息列表
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 车企信息集合 * @return 车企信息集合
*/ */
public List<TAutomobileEnterprise> selectTAutomobileEnterpriseList(TAutomobileEnterprise tAutomobileEnterprise); public List<AutomobileEnterprise> selectAutomobileEnterpriseList(AutomobileEnterprise automobileEnterprise);
/** /**
* 新增车企信息 * 新增车企信息
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 结果 * @return 结果
*/ */
public int insertTAutomobileEnterprise(TAutomobileEnterprise tAutomobileEnterprise); public int insertAutomobileEnterprise(AutomobileEnterprise automobileEnterprise);
/** /**
* 修改车企信息 * 修改车企信息
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 结果 * @return 结果
*/ */
public int updateTAutomobileEnterprise(TAutomobileEnterprise tAutomobileEnterprise); public int updateAutomobileEnterprise(AutomobileEnterprise automobileEnterprise);
/** /**
* 批量删除车企信息 * 批量删除车企信息
...@@ -49,7 +51,7 @@ public interface ITAutomobileEnterpriseService ...@@ -49,7 +51,7 @@ public interface ITAutomobileEnterpriseService
* @param ids 需要删除的车企信息主键集合 * @param ids 需要删除的车企信息主键集合
* @return 结果 * @return 结果
*/ */
public int deleteTAutomobileEnterpriseByIds(Long[] ids); public int deleteAutomobileEnterpriseByIds(Long[] ids);
/** /**
* 删除车企信息信息 * 删除车企信息信息
...@@ -57,5 +59,5 @@ public interface ITAutomobileEnterpriseService ...@@ -57,5 +59,5 @@ public interface ITAutomobileEnterpriseService
* @param id 车企信息主键 * @param id 车企信息主键
* @return 结果 * @return 结果
*/ */
public int deleteTAutomobileEnterpriseById(Long id); public int deleteAutomobileEnterpriseById(Long id);
} }
...@@ -5,9 +5,9 @@ import com.ruoyi.common.utils.DateUtils; ...@@ -5,9 +5,9 @@ import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils; import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.mapper.TAutomobileEnterpriseMapper; import com.ruoyi.mapper.AutomobileEnterpriseMapper;
import com.ruoyi.domain.TAutomobileEnterprise; import com.ruoyi.domain.AutomobileEnterprise;
import com.ruoyi.service.ITAutomobileEnterpriseService; import com.ruoyi.service.IAutomobileEnterpriseService;
/** /**
* 车企信息Service业务层处理 * 车企信息Service业务层处理
...@@ -16,10 +16,10 @@ import com.ruoyi.service.ITAutomobileEnterpriseService; ...@@ -16,10 +16,10 @@ import com.ruoyi.service.ITAutomobileEnterpriseService;
* @date 2024-01-05 * @date 2024-01-05
*/ */
@Service @Service
public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseService public class AutomobileEnterpriseServiceImpl implements IAutomobileEnterpriseService
{ {
@Autowired @Autowired
private TAutomobileEnterpriseMapper tAutomobileEnterpriseMapper; private AutomobileEnterpriseMapper automobileEnterpriseMapper;
/** /**
* 查询车企信息 * 查询车企信息
...@@ -28,49 +28,49 @@ public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseS ...@@ -28,49 +28,49 @@ public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseS
* @return 车企信息 * @return 车企信息
*/ */
@Override @Override
public TAutomobileEnterprise selectTAutomobileEnterpriseById(Long id) public AutomobileEnterprise selectAutomobileEnterpriseById(Long id)
{ {
return tAutomobileEnterpriseMapper.selectTAutomobileEnterpriseById(id); return automobileEnterpriseMapper.selectAutomobileEnterpriseById(id);
} }
/** /**
* 查询车企信息列表 * 查询车企信息列表
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 车企信息 * @return 车企信息
*/ */
@Override @Override
public List<TAutomobileEnterprise> selectTAutomobileEnterpriseList(TAutomobileEnterprise tAutomobileEnterprise) public List<AutomobileEnterprise> selectAutomobileEnterpriseList(AutomobileEnterprise automobileEnterprise)
{ {
return tAutomobileEnterpriseMapper.selectTAutomobileEnterpriseList(tAutomobileEnterprise); return automobileEnterpriseMapper.selectAutomobileEnterpriseList(automobileEnterprise);
} }
/** /**
* 新增车企信息 * 新增车企信息
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int insertTAutomobileEnterprise(TAutomobileEnterprise tAutomobileEnterprise) public int insertAutomobileEnterprise(AutomobileEnterprise automobileEnterprise)
{ {
tAutomobileEnterprise.setCreateTime(DateUtils.getNowDate()); automobileEnterprise.setCreateTime(DateUtils.getNowDate());
tAutomobileEnterprise.setCreateBy(String.valueOf(SecurityUtils.getUserId())); automobileEnterprise.setCreateBy(String.valueOf(SecurityUtils.getUserId()));
return tAutomobileEnterpriseMapper.insertTAutomobileEnterprise(tAutomobileEnterprise); return automobileEnterpriseMapper.insertAutomobileEnterprise(automobileEnterprise);
} }
/** /**
* 修改车企信息 * 修改车企信息
* *
* @param tAutomobileEnterprise 车企信息 * @param automobileEnterprise 车企信息
* @return 结果 * @return 结果
*/ */
@Override @Override
public int updateTAutomobileEnterprise(TAutomobileEnterprise tAutomobileEnterprise) public int updateAutomobileEnterprise(AutomobileEnterprise automobileEnterprise)
{ {
tAutomobileEnterprise.setUpdateTime(DateUtils.getNowDate()); automobileEnterprise.setUpdateTime(DateUtils.getNowDate());
tAutomobileEnterprise.setUpdateBy(String.valueOf(SecurityUtils.getUserId())); automobileEnterprise.setUpdateBy(String.valueOf(SecurityUtils.getUserId()));
return tAutomobileEnterpriseMapper.updateTAutomobileEnterprise(tAutomobileEnterprise); return automobileEnterpriseMapper.updateAutomobileEnterprise(automobileEnterprise);
} }
/** /**
...@@ -80,9 +80,9 @@ public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseS ...@@ -80,9 +80,9 @@ public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteTAutomobileEnterpriseByIds(Long[] ids) public int deleteAutomobileEnterpriseByIds(Long[] ids)
{ {
return tAutomobileEnterpriseMapper.deleteTAutomobileEnterpriseByIds(ids); return automobileEnterpriseMapper.deleteAutomobileEnterpriseByIds(ids);
} }
/** /**
...@@ -92,8 +92,8 @@ public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseS ...@@ -92,8 +92,8 @@ public class TAutomobileEnterpriseServiceImpl implements ITAutomobileEnterpriseS
* @return 结果 * @return 结果
*/ */
@Override @Override
public int deleteTAutomobileEnterpriseById(Long id) public int deleteAutomobileEnterpriseById(Long id)
{ {
return tAutomobileEnterpriseMapper.deleteTAutomobileEnterpriseById(id); return automobileEnterpriseMapper.deleteAutomobileEnterpriseById(id);
} }
} }
...@@ -4,8 +4,11 @@ import java.util.List; ...@@ -4,8 +4,11 @@ import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.annotation.Anonymous; import com.ruoyi.common.annotation.Anonymous;
import org.springframework.security.access.prepost.PreAuthorize; import com.ruoyi.common.core.domain.R;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.PutMapping;
...@@ -18,8 +21,8 @@ import com.ruoyi.common.annotation.Log; ...@@ -18,8 +21,8 @@ import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType; import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.domain.TAutomobileEnterprise; import com.ruoyi.domain.AutomobileEnterprise;
import com.ruoyi.service.ITAutomobileEnterpriseService; import com.ruoyi.service.IAutomobileEnterpriseService;
import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.common.core.page.TableDataInfo;
...@@ -29,22 +32,23 @@ import com.ruoyi.common.core.page.TableDataInfo; ...@@ -29,22 +32,23 @@ import com.ruoyi.common.core.page.TableDataInfo;
* @author gxk * @author gxk
* @date 2024-01-05 * @date 2024-01-05
*/ */
@Api(tags = {"车企信息"})
@RestController @RestController
@RequestMapping("/system/enterprise") @RequestMapping("/system/enterprise")
public class TAutomobileEnterpriseController extends BaseController public class AutomobileEnterpriseController extends BaseController
{ {
@Autowired @Autowired
private ITAutomobileEnterpriseService tAutomobileEnterpriseService; private IAutomobileEnterpriseService automobileEnterpriseService;
/** /**
* 查询车企信息列表 * 查询车企信息列表
*/ */
@Anonymous @ApiOperation("分页查询车企信息列表")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TAutomobileEnterprise tAutomobileEnterprise) public TableDataInfo list(AutomobileEnterprise automobileEnterprise)
{ {
startPage(); startPage();
List<TAutomobileEnterprise> list = tAutomobileEnterpriseService.selectTAutomobileEnterpriseList(tAutomobileEnterprise); List<AutomobileEnterprise> list = automobileEnterpriseService.selectAutomobileEnterpriseList(automobileEnterprise);
return getDataTable(list); return getDataTable(list);
} }
...@@ -52,51 +56,55 @@ public class TAutomobileEnterpriseController extends BaseController ...@@ -52,51 +56,55 @@ public class TAutomobileEnterpriseController extends BaseController
* 导出车企信息列表 * 导出车企信息列表
*/ */
@Log(title = "车企信息", businessType = BusinessType.EXPORT) @Log(title = "车企信息", businessType = BusinessType.EXPORT)
@ApiOperation("导出车企信息列表")
@PostMapping("/export") @PostMapping("/export")
public void export(HttpServletResponse response, TAutomobileEnterprise tAutomobileEnterprise) public void export(HttpServletResponse response, AutomobileEnterprise automobileEnterprise)
{ {
List<TAutomobileEnterprise> list = tAutomobileEnterpriseService.selectTAutomobileEnterpriseList(tAutomobileEnterprise); List<AutomobileEnterprise> list = automobileEnterpriseService.selectAutomobileEnterpriseList(automobileEnterprise);
ExcelUtil<TAutomobileEnterprise> util = new ExcelUtil<TAutomobileEnterprise>(TAutomobileEnterprise.class); ExcelUtil<AutomobileEnterprise> util = new ExcelUtil<AutomobileEnterprise>(AutomobileEnterprise.class);
util.exportExcel(response, list, "车企信息数据"); util.exportExcel(response, list, "车企信息数据");
} }
/** /**
* 获取车企信息详细信息 * 获取车企信息详细信息
*/ */
@ApiOperation("获取车企信息详细信息")
@GetMapping(value = "/{id}") @GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) public R getInfo(@PathVariable("id") Long id)
{ {
return success(tAutomobileEnterpriseService.selectTAutomobileEnterpriseById(id)); return R.ok(automobileEnterpriseService.selectAutomobileEnterpriseById(id));
} }
/** /**
* 新增车企信息 * 新增车企信息
*/ */
@Anonymous @ApiOperation("新增车企信息")
@Log(title = "车企信息", businessType = BusinessType.INSERT) @Log(title = "车企信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TAutomobileEnterprise tAutomobileEnterprise) public R add(@RequestBody AutomobileEnterprise automobileEnterprise)
{ {
return toAjax(tAutomobileEnterpriseService.insertTAutomobileEnterprise(tAutomobileEnterprise)); return R.ok(automobileEnterpriseService.insertAutomobileEnterprise(automobileEnterprise));
} }
/** /**
* 修改车企信息 * 修改车企信息
*/ */
@ApiOperation("修改车企信息")
@Log(title = "车企信息", businessType = BusinessType.UPDATE) @Log(title = "车企信息", businessType = BusinessType.UPDATE)
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TAutomobileEnterprise tAutomobileEnterprise) public R edit(@RequestBody AutomobileEnterprise automobileEnterprise)
{ {
return toAjax(tAutomobileEnterpriseService.updateTAutomobileEnterprise(tAutomobileEnterprise)); return R.ok(automobileEnterpriseService.updateAutomobileEnterprise(automobileEnterprise));
} }
/** /**
* 删除车企信息 * 删除车企信息
*/ */
@ApiOperation("删除车企信息")
@Log(title = "车企信息", businessType = BusinessType.DELETE) @Log(title = "车企信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}") @DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) public R remove(@PathVariable Long[] ids)
{ {
return toAjax(tAutomobileEnterpriseService.deleteTAutomobileEnterpriseByIds(ids)); return R.ok(automobileEnterpriseService.deleteAutomobileEnterpriseByIds(ids));
} }
} }
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.mapper.TAutomobileEnterpriseMapper"> <mapper namespace="com.ruoyi.mapper.AutomobileEnterpriseMapper">
<resultMap type="com.ruoyi.domain.TAutomobileEnterprise" id="TAutomobileEnterpriseResult"> <resultMap type="com.ruoyi.domain.AutomobileEnterprise" id="AutomobileEnterpriseResult">
<result property="id" column="id"/> <result property="id" column="id"/>
<result property="enterpriseName" column="enterprise_name"/> <result property="enterpriseName" column="enterprise_name"/>
<result property="address" column="address"/> <result property="address" column="address"/>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<result property="updateTime" column="update_time"/> <result property="updateTime" column="update_time"/>
</resultMap> </resultMap>
<sql id="selectTAutomobileEnterpriseVo"> <sql id="selectAutomobileEnterpriseVo">
select id, select id,
enterprise_name, enterprise_name,
address, address,
...@@ -31,9 +31,9 @@ ...@@ -31,9 +31,9 @@
from t_automobile_enterprise from t_automobile_enterprise
</sql> </sql>
<select id="selectTAutomobileEnterpriseList" parameterType="TAutomobileEnterprise" <select id="selectAutomobileEnterpriseList" parameterType="com.ruoyi.domain.AutomobileEnterprise"
resultMap="TAutomobileEnterpriseResult"> resultMap="AutomobileEnterpriseResult">
<include refid="selectTAutomobileEnterpriseVo"/> <include refid="selectAutomobileEnterpriseVo"/>
<where> <where>
<if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like concat('%', <if test="enterpriseName != null and enterpriseName != ''">and enterprise_name like concat('%',
#{enterpriseName}, '%') #{enterpriseName}, '%')
...@@ -47,12 +47,12 @@ ...@@ -47,12 +47,12 @@
</where> </where>
</select> </select>
<select id="selectTAutomobileEnterpriseById" parameterType="Long" resultMap="TAutomobileEnterpriseResult"> <select id="selectAutomobileEnterpriseById" parameterType="Long" resultMap="AutomobileEnterpriseResult">
<include refid="selectTAutomobileEnterpriseVo"/> <include refid="selectAutomobileEnterpriseVo"/>
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertTAutomobileEnterprise" parameterType="TAutomobileEnterprise"> <insert id="insertAutomobileEnterprise" parameterType="com.ruoyi.domain.AutomobileEnterprise">
insert into t_automobile_enterprise insert into t_automobile_enterprise
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if> <if test="id != null">id,</if>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</trim> </trim>
</insert> </insert>
<update id="updateTAutomobileEnterprise" parameterType="TAutomobileEnterprise"> <update id="updateAutomobileEnterprise" parameterType="com.ruoyi.domain.AutomobileEnterprise">
update t_automobile_enterprise update t_automobile_enterprise
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
...@@ -96,13 +96,13 @@ ...@@ -96,13 +96,13 @@
where id = #{id} where id = #{id}
</update> </update>
<delete id="deleteTAutomobileEnterpriseById" parameterType="Long"> <delete id="deleteAutomobileEnterpriseById" parameterType="Long">
delete delete
from t_automobile_enterprise from t_automobile_enterprise
where id = #{id} where id = #{id}
</delete> </delete>
<delete id="deleteTAutomobileEnterpriseByIds" parameterType="String"> <delete id="deleteAutomobileEnterpriseByIds" parameterType="String">
delete from t_automobile_enterprise where id in delete from t_automobile_enterprise where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment