添加公司信息
This commit is contained in:
@ -4,24 +4,24 @@ import com.ruoyi.common.core.lang.UUID;
|
||||
|
||||
/**
|
||||
* ID生成器工具类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class IdUtils
|
||||
{
|
||||
/**
|
||||
* 获取随机UUID
|
||||
*
|
||||
*
|
||||
* @return 随机UUID
|
||||
*/
|
||||
public static String randomUUID()
|
||||
{
|
||||
return UUID.randomUUID().toString();
|
||||
return UUID.randomUUID().toString().toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* 简化的UUID,去掉了横线
|
||||
*
|
||||
*
|
||||
* @return 简化的UUID,去掉了横线
|
||||
*/
|
||||
public static String simpleUUID()
|
||||
@ -31,17 +31,17 @@ public class IdUtils
|
||||
|
||||
/**
|
||||
* 获取随机UUID,使用性能更好的ThreadLocalRandom生成UUID
|
||||
*
|
||||
*
|
||||
* @return 随机UUID
|
||||
*/
|
||||
public static String fastUUID()
|
||||
{
|
||||
return UUID.fastUUID().toString();
|
||||
return UUID.fastUUID().toString().toUpperCase();
|
||||
}
|
||||
|
||||
/**
|
||||
* 简化的UUID,去掉了横线,使用性能更好的ThreadLocalRandom生成UUID
|
||||
*
|
||||
*
|
||||
* @return 简化的UUID,去掉了横线
|
||||
*/
|
||||
public static String fastSimpleUUID()
|
||||
|
@ -16,19 +16,20 @@ import javax.imageio.ImageIO;
|
||||
|
||||
/**
|
||||
* 验证码工具类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class VerifyCodeUtils
|
||||
{
|
||||
// 使用到Algerian字体,系统里没有的话需要安装字体,字体只显示大写,去掉了1,0,i,o几个容易混淆的字符
|
||||
public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||
// public static final String VERIFY_CODES = "123456789ABCDEFGHJKLMNPQRSTUVWXYZ";
|
||||
public static final String VERIFY_CODES = "123456789";
|
||||
|
||||
private static Random random = new SecureRandom();
|
||||
|
||||
/**
|
||||
* 使用系统默认字符源生成验证码
|
||||
*
|
||||
*
|
||||
* @param verifySize 验证码长度
|
||||
* @return
|
||||
*/
|
||||
@ -39,7 +40,7 @@ public class VerifyCodeUtils
|
||||
|
||||
/**
|
||||
* 使用指定源生成验证码
|
||||
*
|
||||
*
|
||||
* @param verifySize 验证码长度
|
||||
* @param sources 验证码字符源
|
||||
* @return
|
||||
@ -62,7 +63,7 @@ public class VerifyCodeUtils
|
||||
|
||||
/**
|
||||
* 输出指定验证码图片流
|
||||
*
|
||||
*
|
||||
* @param w
|
||||
* @param h
|
||||
* @param os
|
||||
@ -223,4 +224,4 @@ public class VerifyCodeUtils
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ import com.ruoyi.framework.datasource.DynamicDataSource;
|
||||
|
||||
/**
|
||||
* druid 配置多数据源
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@Configuration
|
||||
@ -58,10 +58,10 @@ public class DruidConfig
|
||||
setDataSource(targetDataSources, DataSourceType.SLAVE.name(), "slaveDataSource");
|
||||
return new DynamicDataSource(masterDataSource, targetDataSources);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 设置数据源
|
||||
*
|
||||
*
|
||||
* @param targetDataSources 备选数据源集合
|
||||
* @param sourceName 数据源名称
|
||||
* @param beanName bean名称
|
||||
@ -109,7 +109,7 @@ public class DruidConfig
|
||||
// 获取common.js
|
||||
String text = Utils.readFromResource(filePath);
|
||||
// 正则替换banner, 除去底部的广告信息
|
||||
text = text.replaceAll("<a.*?banner\"></a><br/>", "");
|
||||
//text = text.replaceAll("<a.*?banner\"></a><br/>", "");
|
||||
text = text.replaceAll("powered.*?shrek.wang</a>", "");
|
||||
response.getWriter().write(text);
|
||||
}
|
||||
|
@ -0,0 +1,112 @@
|
||||
package com.ruoyi.project.mr.controller;
|
||||
|
||||
import com.ruoyi.common.utils.IdUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
import com.ruoyi.project.mr.domain.BaseCompany;
|
||||
import com.ruoyi.project.mr.service.IBaseCompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Controller
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/base/company")
|
||||
public class BaseCompanyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBaseCompanyService baseCompanyService;
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BaseCompany baseCompany)
|
||||
{
|
||||
startPage();
|
||||
List<BaseCompany> list = baseCompanyService.selectBaseCompanyList(baseCompany);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公司管理列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:export')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(BaseCompany baseCompany)
|
||||
{
|
||||
List<BaseCompany> list = baseCompanyService.selectBaseCompanyList(baseCompany);
|
||||
ExcelUtil<BaseCompany> util = new ExcelUtil<BaseCompany>(BaseCompany.class);
|
||||
return util.exportExcel(list, "公司信息");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公司管理详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||
{
|
||||
return AjaxResult.success(baseCompanyService.selectBaseCompanyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:add')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setId(IdUtils.fastUUID());
|
||||
return toAjax(baseCompanyService.insertBaseCompany(baseCompany));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:edit')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BaseCompany baseCompany)
|
||||
{
|
||||
return toAjax(baseCompanyService.updateBaseCompany(baseCompany));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司管理
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:remove')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable String[] ids)
|
||||
{
|
||||
return toAjax(baseCompanyService.deleteBaseCompanyByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态修改
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('base:company:edit')")
|
||||
@Log(title = "公司管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/changeEnabled")
|
||||
public AjaxResult changeEnabled(@RequestBody BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(baseCompanyService.updateBaseCompanyEnabled(baseCompany));
|
||||
}
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.ruoyi.project.mr.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 公司管理对象 base_company
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
public class BaseCompany extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** UUID */
|
||||
private String id;
|
||||
|
||||
/** 排序 */
|
||||
@Excel(name = "排序")
|
||||
private Long sort;
|
||||
|
||||
/** 公司代码 */
|
||||
@Excel(name = "公司代码")
|
||||
private String codeid;
|
||||
|
||||
/** 公司简称 */
|
||||
@Excel(name = "公司简称")
|
||||
private String name;
|
||||
|
||||
/** 状态(0正常 1停用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String enabled;
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSort(Long sort)
|
||||
{
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
public void setCodeid(String codeid)
|
||||
{
|
||||
this.codeid = codeid;
|
||||
}
|
||||
|
||||
public String getCodeid()
|
||||
{
|
||||
return codeid;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setEnabled(String enabled)
|
||||
{
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public String getEnabled()
|
||||
{
|
||||
return enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("sort", getSort())
|
||||
.append("codeid", getCodeid())
|
||||
.append("name", getName())
|
||||
.append("enabled", getEnabled())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.mr.mapper;
|
||||
|
||||
import com.ruoyi.project.mr.domain.BaseCompany;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Mapper接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
public interface BaseCompanyMapper
|
||||
{
|
||||
/**
|
||||
* 查询公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 公司管理
|
||||
*/
|
||||
public BaseCompany selectBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 公司管理集合
|
||||
*/
|
||||
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 删除公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 批量删除公司管理
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyByIds(String[] ids);
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.ruoyi.project.mr.service;
|
||||
|
||||
import com.ruoyi.project.mr.domain.BaseCompany;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Service接口
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
public interface IBaseCompanyService
|
||||
{
|
||||
/**
|
||||
* 查询公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 公司管理
|
||||
*/
|
||||
public BaseCompany selectBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 公司管理集合
|
||||
*/
|
||||
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCompany(BaseCompany baseCompany);
|
||||
|
||||
/**
|
||||
* 批量删除公司管理
|
||||
*
|
||||
* @param ids 需要删除的公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 删除公司管理信息
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBaseCompanyById(String id);
|
||||
|
||||
/**
|
||||
* 修改公司状态
|
||||
*
|
||||
* @param baseCompany 公司信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBaseCompanyEnabled(BaseCompany baseCompany);
|
||||
}
|
@ -0,0 +1,111 @@
|
||||
package com.ruoyi.project.mr.service.impl;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.project.mr.domain.BaseCompany;
|
||||
import com.ruoyi.project.mr.mapper.BaseCompanyMapper;
|
||||
import com.ruoyi.project.mr.service.IBaseCompanyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公司管理Service业务层处理
|
||||
*
|
||||
* @author mr
|
||||
* @date 2020-01-04
|
||||
*/
|
||||
@Service
|
||||
public class BaseCompanyServiceImpl implements IBaseCompanyService
|
||||
{
|
||||
@Autowired
|
||||
private BaseCompanyMapper baseCompanyMapper;
|
||||
|
||||
/**
|
||||
* 查询公司管理
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 公司管理
|
||||
*/
|
||||
@Override
|
||||
public BaseCompany selectBaseCompanyById(String id)
|
||||
{
|
||||
return baseCompanyMapper.selectBaseCompanyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询公司管理列表
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 公司管理
|
||||
*/
|
||||
@Override
|
||||
public List<BaseCompany> selectBaseCompanyList(BaseCompany baseCompany)
|
||||
{
|
||||
return baseCompanyMapper.selectBaseCompanyList(baseCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBaseCompany(BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setCreateTime(DateUtils.getNowDate());
|
||||
return baseCompanyMapper.insertBaseCompany(baseCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公司管理
|
||||
*
|
||||
* @param baseCompany 公司管理
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCompany(BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseCompanyMapper.updateBaseCompany(baseCompany);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除公司管理
|
||||
*
|
||||
* @param ids 需要删除的公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCompanyByIds(String[] ids)
|
||||
{
|
||||
return baseCompanyMapper.deleteBaseCompanyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公司管理信息
|
||||
*
|
||||
* @param id 公司管理ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBaseCompanyById(String id)
|
||||
{
|
||||
return baseCompanyMapper.deleteBaseCompanyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户状态
|
||||
*
|
||||
* @param baseCompany 用户信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBaseCompanyEnabled(BaseCompany baseCompany)
|
||||
{
|
||||
baseCompany.setUpdateTime(DateUtils.getNowDate());
|
||||
return baseCompanyMapper.updateBaseCompany(baseCompany);
|
||||
}
|
||||
|
||||
}
|
@ -21,4 +21,4 @@ Spring Boot Version: ${spring-boot.version}
|
||||
// `=---=' //
|
||||
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
|
||||
// 佛祖保佑 永不宕机 永无BUG //
|
||||
////////////////////////////////////////////////////////////////////
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
94
ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml
Normal file
94
ruoyi/src/main/resources/mybatis/base/BaseCompanyMapper.xml
Normal file
@ -0,0 +1,94 @@
|
||||
<?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.ruoyi.project.mr.mapper.BaseCompanyMapper">
|
||||
|
||||
<resultMap type="BaseCompany" id="BaseCompanyResult">
|
||||
<result property="id" column="ID" />
|
||||
<result property="sort" column="Sort" />
|
||||
<result property="codeid" column="CodeID" />
|
||||
<result property="name" column="Name" />
|
||||
<result property="enabled" column="Enabled" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBaseCompanyVo">
|
||||
select ID, Sort, CodeID, Name, Enabled, create_by, create_time, update_by, update_time, remark from base_company
|
||||
</sql>
|
||||
|
||||
<select id="selectBaseCompanyList" parameterType="BaseCompany" resultMap="BaseCompanyResult">
|
||||
<include refid="selectBaseCompanyVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and Name like concat('%', #{name}, '%')</if>
|
||||
<if test="enabled != null and enabled != ''"> and Enabled = #{enabled}</if>
|
||||
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||
<if test="remark != null and remark != ''"> and remark like concat('%', #{remark}, '%')</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBaseCompanyById" parameterType="String" resultMap="BaseCompanyResult">
|
||||
<include refid="selectBaseCompanyVo"/>
|
||||
where ID = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBaseCompany" parameterType="BaseCompany">
|
||||
insert into base_company
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">ID,</if>
|
||||
<if test="sort != null ">Sort,</if>
|
||||
<if test="codeid != null and codeid != ''">CodeID,</if>
|
||||
<if test="name != null and name != ''">Name,</if>
|
||||
<if test="enabled != null and enabled != ''">Enabled,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by,</if>
|
||||
<if test="updateTime != null ">update_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null and id != ''">#{id},</if>
|
||||
<if test="sort != null ">#{sort},</if>
|
||||
<if test="codeid != null and codeid != ''">#{codeid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="enabled != null and enabled != ''">#{enabled},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
||||
<if test="updateTime != null ">#{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBaseCompany" parameterType="BaseCompany">
|
||||
update base_company
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="sort != null ">Sort = #{sort},</if>
|
||||
<if test="codeid != null and codeid != ''">CodeID = #{codeid},</if>
|
||||
<if test="name != null and name != ''">Name = #{name},</if>
|
||||
<if test="enabled != null and enabled != ''">Enabled = #{enabled},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null ">update_time = #{updateTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
</trim>
|
||||
where ID = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBaseCompanyById" parameterType="String">
|
||||
delete from base_company where ID = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBaseCompanyByIds" parameterType="String">
|
||||
delete from base_company where ID in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
@ -97,7 +97,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="${businessName}List" @selection-change="handleSelectionChange">
|
||||
<el-table v-loading="loading" :data="${businessName}List" stripe height @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
#foreach($column in $columns)
|
||||
#set($javaField=$column.javaField)
|
||||
@ -140,7 +140,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -436,4 +436,4 @@ export default {
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user