增加统一返回Result,协议管理、工程管理
This commit is contained in:
parent
9cda5248e3
commit
80d340acdf
|
|
@ -0,0 +1,71 @@
|
|||
package com.bonus.base.controller;
|
||||
|
||||
import com.bonus.base.domain.BmAgreement;
|
||||
import com.bonus.base.service.BmAgreementService;
|
||||
import com.bonus.base.utils.ResultBean;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
/**
|
||||
* 协议管理(bm_agreement)表控制层
|
||||
*
|
||||
* @author 阮世耀
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bm_agreement")
|
||||
public class BmAgreementController {
|
||||
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Autowired
|
||||
private BmAgreementService bmAgreementService;
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResultBean<BmAgreement> queryById(@PathVariable("id") Integer id) {
|
||||
return ResultBean.success(this.bmAgreementService.selectByPrimaryKey(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param bmAgreement 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
public ResultBean<Boolean> add(BmAgreement bmAgreement) {
|
||||
int result = this.bmAgreementService.insertSelective(bmAgreement);
|
||||
return result > 0 ? ResultBean.success(true) : ResultBean.error(0, "删除0条");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param bmAgreement 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping(value = "/update")
|
||||
public ResultBean<Boolean> edit(BmAgreement bmAgreement) {
|
||||
this.bmAgreementService.updateByPrimaryKeySelective(bmAgreement);
|
||||
return ResultBean.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@PostMapping(value = "/delete/{id}")
|
||||
public ResultBean<Boolean> deleteById(@PathVariable("id") Integer id) {
|
||||
this.bmAgreementService.deleteByPrimaryKey(id);
|
||||
return ResultBean.success(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
package com.bonus.base.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 协议管理
|
||||
* @PackagePath: com.bonus.base
|
||||
* @author : 阮世耀
|
||||
* @CreateTime: 2024-08-09 10:33
|
||||
* @Description: 描述
|
||||
* @version : 1.0
|
||||
*/
|
||||
|
||||
@ApiModel(description="协议管理")
|
||||
@Data
|
||||
public class BmAgreement implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String code;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String signDate;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private Integer leaseCompany;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private Integer project;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String leaseTerm;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String advanceCharge;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String authorizingPerson;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String authorizingPhone;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String contractNumber;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String creator;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String settlementTime;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String isBalance;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String url;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String isSure;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private Integer companyId;
|
||||
|
||||
/**
|
||||
* i8系统是否推送
|
||||
*/
|
||||
@ApiModelProperty(value="i8系统是否推送")
|
||||
private String isPush;
|
||||
|
||||
}
|
||||
|
|
@ -2,127 +2,181 @@ package com.bonus.base.domain;
|
|||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base
|
||||
*@author : 阮世耀
|
||||
*@CreateTime: 2024-08-09 10:13
|
||||
*@Description: 工程实体类
|
||||
*@version : 1.0
|
||||
*/
|
||||
@ApiModel(description="工程项目管理")
|
||||
@Data
|
||||
public class BmProject {
|
||||
|
||||
@ApiModelProperty(value="主键")
|
||||
/**
|
||||
* 工程表
|
||||
* @author 阮世耀
|
||||
*
|
||||
*/
|
||||
@ApiModel(description="工程管理")
|
||||
@Data
|
||||
public class BmProject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ApiModelProperty(value = "")
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 项目类型。 1:线路工程;2:变电工程;3:业务工程;4:其他工程
|
||||
*/
|
||||
@ApiModelProperty(value="项目类型。 1:线路工程;2:变电工程;3:业务工程;4:其他工程")
|
||||
* 项目类型。 1:线路工程;2:变电工程;3:业务工程;4:其他工程
|
||||
*/
|
||||
@ApiModelProperty(value = "项目类型。 1:线路工程;2:变电工程;3:业务工程;4:其他工程")
|
||||
private Integer projectType;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 工程编号
|
||||
*/
|
||||
@ApiModelProperty(value = "工程编号")
|
||||
private String num;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 项目经理
|
||||
*/
|
||||
@ApiModelProperty(value = "项目经理")
|
||||
private String manager;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 项目性质
|
||||
*/
|
||||
@ApiModelProperty(value = "项目性质")
|
||||
private String nature;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String telphone;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
@ApiModelProperty(value = "传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@ApiModelProperty(value = "地址")
|
||||
private String address;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remarks;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 材料员
|
||||
*/
|
||||
@ApiModelProperty(value = "材料员")
|
||||
private String materialClerk;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String clerkPhone;
|
||||
/**
|
||||
* 电压等级,如1 为10kv,2为 35kv, 11为1100kv
|
||||
*/
|
||||
@ApiModelProperty(value = "电压等级,如1 为10kv,2为 35kv, 11为1100kv")
|
||||
private Integer volId;
|
||||
|
||||
/**
|
||||
* 电压等级,如1 为10kv,2为 35kv, 11为1100kv
|
||||
*/
|
||||
@ApiModelProperty(value="电压等级,如1 为10kv,2为 35kv, 11为1100kv")
|
||||
private Integer voltageClass;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
* 数据所属
|
||||
*/
|
||||
@ApiModelProperty(value = "数据所属")
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
private String isBalanceEnd;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private String time;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 是否启用0不启用1启用
|
||||
*/
|
||||
@ApiModelProperty(value = "是否启用:0不启用 1启用")
|
||||
private String isActive;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@ApiModelProperty(value="经度")
|
||||
* 经度
|
||||
*/
|
||||
@ApiModelProperty(value = "经度")
|
||||
private String lon;
|
||||
|
||||
/**
|
||||
* 维度
|
||||
*/
|
||||
@ApiModelProperty(value="维度")
|
||||
* 维度
|
||||
*/
|
||||
@ApiModelProperty(value = "维度")
|
||||
private String lat;
|
||||
|
||||
/**
|
||||
* 组织分公司id
|
||||
*/
|
||||
@ApiModelProperty(value="组织分公司id")
|
||||
* 组织分公司id
|
||||
*/
|
||||
@ApiModelProperty(value = "组织分公司id")
|
||||
private String company;
|
||||
|
||||
/**
|
||||
* 实施单位
|
||||
*/
|
||||
@ApiModelProperty(value="实施单位")
|
||||
* 实施单位
|
||||
*/
|
||||
@ApiModelProperty(value = "实施单位")
|
||||
private String impUnit;
|
||||
|
||||
/**
|
||||
* 项目部
|
||||
*/
|
||||
@ApiModelProperty(value="项目部")
|
||||
* 项目部
|
||||
*/
|
||||
@ApiModelProperty(value = "项目部")
|
||||
private String deptName;
|
||||
|
||||
/**
|
||||
* i8工程id
|
||||
*/
|
||||
@ApiModelProperty(value="i8工程id")
|
||||
* i8工程id
|
||||
*/
|
||||
@ApiModelProperty(value = "i8工程id")
|
||||
private String proId;
|
||||
|
||||
/**
|
||||
* 项目部id
|
||||
*/
|
||||
@ApiModelProperty(value="项目部id")
|
||||
* 项目部id
|
||||
*/
|
||||
@ApiModelProperty(value = "项目部id")
|
||||
private Integer deptId;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 电压等级
|
||||
*/
|
||||
@ApiModelProperty(value = "电压等级")
|
||||
private String cvo;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 工程状态
|
||||
*/
|
||||
@ApiModelProperty(value = "工程状态")
|
||||
private String stats;
|
||||
|
||||
@ApiModelProperty(value="")
|
||||
/**
|
||||
* 合同主体
|
||||
*/
|
||||
@ApiModelProperty(value = "合同主体")
|
||||
private String htzt;
|
||||
|
||||
/**
|
||||
* 工程补录是否匹配
|
||||
*/
|
||||
@ApiModelProperty(value = "工程补录是否匹配")
|
||||
private String isMatch;
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package com.bonus.base.mapper;
|
||||
|
||||
import com.bonus.base.domain.BmAgreement;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
*@PackagePath: com.bonus.base.mapper
|
||||
*@author : 阮世耀
|
||||
*@CreateTime: 2024-08-09 10:33
|
||||
*@Description: 描述
|
||||
*@version : 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BmAgreementMapper {
|
||||
/**
|
||||
* delete by primary key
|
||||
* @param id primaryKey
|
||||
* @return deleteCount
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* insert record to table
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insert(BmAgreement record);
|
||||
|
||||
int insertOrUpdate(BmAgreement record);
|
||||
|
||||
int insertOrUpdateSelective(BmAgreement record);
|
||||
|
||||
/**
|
||||
* insert record to table selective
|
||||
* @param record the record
|
||||
* @return insert count
|
||||
*/
|
||||
int insertSelective(BmAgreement record);
|
||||
|
||||
/**
|
||||
* select by primary key
|
||||
* @param id primary key
|
||||
* @return object by primary key
|
||||
*/
|
||||
BmAgreement selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* update record selective
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKeySelective(BmAgreement record);
|
||||
|
||||
/**
|
||||
* update record
|
||||
* @param record the updated record
|
||||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(BmAgreement record);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.bonus.base.domain.BmAgreement;
|
||||
import com.bonus.base.mapper.BmAgreementMapper;
|
||||
/**
|
||||
*@PackagePath: com.bonus.base
|
||||
*@author : 阮世耀
|
||||
*@CreateTime: 2024-08-09 10:33
|
||||
*@Description: 描述
|
||||
*@version : 1.0
|
||||
*/
|
||||
@Service
|
||||
public class BmAgreementService{
|
||||
|
||||
@Autowired
|
||||
private BmAgreementMapper bmAgreementMapper;
|
||||
|
||||
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return bmAgreementMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
public int insert(BmAgreement record) {
|
||||
return bmAgreementMapper.insert(record);
|
||||
}
|
||||
|
||||
|
||||
public int insertOrUpdate(BmAgreement record) {
|
||||
return bmAgreementMapper.insertOrUpdate(record);
|
||||
}
|
||||
|
||||
|
||||
public int insertOrUpdateSelective(BmAgreement record) {
|
||||
return bmAgreementMapper.insertOrUpdateSelective(record);
|
||||
}
|
||||
|
||||
|
||||
public int insertSelective(BmAgreement record) {
|
||||
return bmAgreementMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
|
||||
public BmAgreement selectByPrimaryKey(Integer id) {
|
||||
return bmAgreementMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
|
||||
public int updateByPrimaryKeySelective(BmAgreement record) {
|
||||
return bmAgreementMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
|
||||
public int updateByPrimaryKey(BmAgreement record) {
|
||||
return bmAgreementMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
package com.bonus.base.utils;
|
||||
|
||||
import com.bonus.common.core.constant.HttpStatus;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* @author : 阮世耀
|
||||
* @version : 1.0
|
||||
* @PackagePath: com.bonus.base.utils
|
||||
* @CreateTime: 2024-08-09 10:37
|
||||
* @Description: 用于封装API返回结果的不可变类
|
||||
*/
|
||||
@Getter
|
||||
@RequiredArgsConstructor
|
||||
public final class ResultBean<T> {
|
||||
|
||||
private final int code;
|
||||
private final String message;
|
||||
private final T data;
|
||||
|
||||
/**
|
||||
* 创建一个错误结果,并自定义错误码
|
||||
*
|
||||
* @param code 错误码
|
||||
* @param message 错误信息
|
||||
* @return 构建的ResultBean实例
|
||||
*/
|
||||
public static <T> ResultBean<T> error(int code, String message) {
|
||||
return new ResultBean<>(code, message, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建一个错误结果
|
||||
*
|
||||
* @param message 错误信息
|
||||
* @return 构建的ResultBean实例
|
||||
*/
|
||||
public static <T> ResultBean<T> error(String message) {
|
||||
return new ResultBean<>(500, message, null);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 创建一个成功结果,无数据
|
||||
*
|
||||
* @return 构建的ResultBean实例
|
||||
*/
|
||||
public static <T> ResultBean<T> success() {
|
||||
return new ResultBean<>(HttpStatus.SUCCESS, "success", null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建一个成功结果,并携带数据
|
||||
*
|
||||
* @param data 数据
|
||||
* @return 构建的ResultBean实例
|
||||
*/
|
||||
public static <T> ResultBean<T> success(T data) {
|
||||
// 检查data是否为null
|
||||
if (data == null) {
|
||||
return new ResultBean<>(HttpStatus.SUCCESS, "success", null);
|
||||
}
|
||||
return new ResultBean<>(HttpStatus.SUCCESS, "success", data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,507 @@
|
|||
<?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.bonus.base.mapper.BmAgreementMapper">
|
||||
<resultMap id="BaseResultMap" type="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
<!--@Table bm_agreement-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
||||
<result column="sign_date" jdbcType="VARCHAR" property="signDate" />
|
||||
<result column="lease_company" jdbcType="INTEGER" property="leaseCompany" />
|
||||
<result column="project" jdbcType="INTEGER" property="project" />
|
||||
<result column="start_time" jdbcType="VARCHAR" property="startTime" />
|
||||
<result column="lease_term" jdbcType="VARCHAR" property="leaseTerm" />
|
||||
<result column="advance_charge" jdbcType="VARCHAR" property="advanceCharge" />
|
||||
<result column="authorizing_person" jdbcType="VARCHAR" property="authorizingPerson" />
|
||||
<result column="authorizing_phone" jdbcType="VARCHAR" property="authorizingPhone" />
|
||||
<result column="contract_number" jdbcType="VARCHAR" property="contractNumber" />
|
||||
<result column="creator" jdbcType="VARCHAR" property="creator" />
|
||||
<result column="create_time" jdbcType="VARCHAR" property="createTime" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="settlement_time" jdbcType="VARCHAR" property="settlementTime" />
|
||||
<result column="is_balance" jdbcType="VARCHAR" property="isBalance" />
|
||||
<result column="url" jdbcType="VARCHAR" property="url" />
|
||||
<result column="is_sure" jdbcType="VARCHAR" property="isSure" />
|
||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||
<result column="is_push" jdbcType="VARCHAR" property="isPush" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, code, sign_date, lease_company, project, start_time, lease_term, advance_charge,
|
||||
authorizing_person, authorizing_phone, contract_number, creator, create_time, remark,
|
||||
settlement_time, is_balance, url, is_sure, company_id, is_push
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--@mbg.generated-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from bm_agreement
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--@mbg.generated-->
|
||||
delete from bm_agreement
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_agreement (id, code, sign_date,
|
||||
lease_company, project, start_time,
|
||||
lease_term, advance_charge, authorizing_person,
|
||||
authorizing_phone, contract_number, creator,
|
||||
create_time, remark, settlement_time,
|
||||
is_balance, url, is_sure,
|
||||
company_id, is_push)
|
||||
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{signDate,jdbcType=VARCHAR},
|
||||
#{leaseCompany,jdbcType=INTEGER}, #{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{leaseTerm,jdbcType=VARCHAR}, #{advanceCharge,jdbcType=VARCHAR}, #{authorizingPerson,jdbcType=VARCHAR},
|
||||
#{authorizingPhone,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{settlementTime,jdbcType=VARCHAR},
|
||||
#{isBalance,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{isSure,jdbcType=VARCHAR},
|
||||
#{companyId,jdbcType=INTEGER}, #{isPush,jdbcType=VARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_agreement
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
code,
|
||||
</if>
|
||||
<if test="signDate != null and signDate != ''">
|
||||
sign_date,
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company,
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="leaseTerm != null and leaseTerm != ''">
|
||||
lease_term,
|
||||
</if>
|
||||
<if test="advanceCharge != null and advanceCharge != ''">
|
||||
advance_charge,
|
||||
</if>
|
||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
||||
authorizing_person,
|
||||
</if>
|
||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
||||
authorizing_phone,
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
contract_number,
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
creator,
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
remark,
|
||||
</if>
|
||||
<if test="settlementTime != null and settlementTime != ''">
|
||||
settlement_time,
|
||||
</if>
|
||||
<if test="isBalance != null and isBalance != ''">
|
||||
is_balance,
|
||||
</if>
|
||||
<if test="url != null and url != ''">
|
||||
url,
|
||||
</if>
|
||||
<if test="isSure != null and isSure != ''">
|
||||
is_sure,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
<if test="isPush != null and isPush != ''">
|
||||
is_push,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="signDate != null and signDate != ''">
|
||||
#{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
#{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
#{startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseTerm != null and leaseTerm != ''">
|
||||
#{leaseTerm,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="advanceCharge != null and advanceCharge != ''">
|
||||
#{advanceCharge,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
||||
#{authorizingPerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
||||
#{authorizingPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
#{contractNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
#{creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
#{createTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="settlementTime != null and settlementTime != ''">
|
||||
#{settlementTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isBalance != null and isBalance != ''">
|
||||
#{isBalance,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null and url != ''">
|
||||
#{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSure != null and isSure != ''">
|
||||
#{isSure,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isPush != null and isPush != ''">
|
||||
#{isPush,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
update bm_agreement
|
||||
<set>
|
||||
<if test="code != null and code != ''">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="signDate != null and signDate != ''">
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseTerm != null and leaseTerm != ''">
|
||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="advanceCharge != null and advanceCharge != ''">
|
||||
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
||||
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
||||
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
contract_number = #{contractNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
create_time = #{createTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="settlementTime != null and settlementTime != ''">
|
||||
settlement_time = #{settlementTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isBalance != null and isBalance != ''">
|
||||
is_balance = #{isBalance,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null and url != ''">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSure != null and isSure != ''">
|
||||
is_sure = #{isSure,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isPush != null and isPush != ''">
|
||||
is_push = #{isPush,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
update bm_agreement
|
||||
set code = #{code,jdbcType=VARCHAR},
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
||||
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
|
||||
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
|
||||
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
|
||||
contract_number = #{contractNumber,jdbcType=VARCHAR},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
settlement_time = #{settlementTime,jdbcType=VARCHAR},
|
||||
is_balance = #{isBalance,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
is_sure = #{isSure,jdbcType=VARCHAR},
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
is_push = #{isPush,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<insert id="insertOrUpdate" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_agreement
|
||||
(id, code, sign_date, lease_company, project, start_time, lease_term, advance_charge,
|
||||
authorizing_person, authorizing_phone, contract_number, creator, create_time, remark,
|
||||
settlement_time, is_balance, url, is_sure, company_id, is_push)
|
||||
values
|
||||
(#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{signDate,jdbcType=VARCHAR},
|
||||
#{leaseCompany,jdbcType=INTEGER}, #{project,jdbcType=INTEGER}, #{startTime,jdbcType=VARCHAR},
|
||||
#{leaseTerm,jdbcType=VARCHAR}, #{advanceCharge,jdbcType=VARCHAR}, #{authorizingPerson,jdbcType=VARCHAR},
|
||||
#{authorizingPhone,jdbcType=VARCHAR}, #{contractNumber,jdbcType=VARCHAR}, #{creator,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{settlementTime,jdbcType=VARCHAR},
|
||||
#{isBalance,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, #{isSure,jdbcType=VARCHAR},
|
||||
#{companyId,jdbcType=INTEGER}, #{isPush,jdbcType=VARCHAR})
|
||||
on duplicate key update
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
||||
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
|
||||
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
|
||||
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
|
||||
contract_number = #{contractNumber,jdbcType=VARCHAR},
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=VARCHAR},
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
settlement_time = #{settlementTime,jdbcType=VARCHAR},
|
||||
is_balance = #{isBalance,jdbcType=VARCHAR},
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
is_sure = #{isSure,jdbcType=VARCHAR},
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
is_push = #{isPush,jdbcType=VARCHAR}
|
||||
</insert>
|
||||
<insert id="insertOrUpdateSelective" parameterType="com.bonus.base.domain.BmAgreement">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_agreement
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
code,
|
||||
</if>
|
||||
<if test="signDate != null and signDate != ''">
|
||||
sign_date,
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company,
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project,
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
start_time,
|
||||
</if>
|
||||
<if test="leaseTerm != null and leaseTerm != ''">
|
||||
lease_term,
|
||||
</if>
|
||||
<if test="advanceCharge != null and advanceCharge != ''">
|
||||
advance_charge,
|
||||
</if>
|
||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
||||
authorizing_person,
|
||||
</if>
|
||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
||||
authorizing_phone,
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
contract_number,
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
creator,
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
remark,
|
||||
</if>
|
||||
<if test="settlementTime != null and settlementTime != ''">
|
||||
settlement_time,
|
||||
</if>
|
||||
<if test="isBalance != null and isBalance != ''">
|
||||
is_balance,
|
||||
</if>
|
||||
<if test="url != null and url != ''">
|
||||
url,
|
||||
</if>
|
||||
<if test="isSure != null and isSure != ''">
|
||||
is_sure,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
<if test="isPush != null and isPush != ''">
|
||||
is_push,
|
||||
</if>
|
||||
</trim>
|
||||
values
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
#{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="signDate != null and signDate != ''">
|
||||
#{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
#{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
#{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
#{startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseTerm != null and leaseTerm != ''">
|
||||
#{leaseTerm,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="advanceCharge != null and advanceCharge != ''">
|
||||
#{advanceCharge,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
||||
#{authorizingPerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
||||
#{authorizingPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
#{contractNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
#{creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
#{createTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
#{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="settlementTime != null and settlementTime != ''">
|
||||
#{settlementTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isBalance != null and isBalance != ''">
|
||||
#{isBalance,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null and url != ''">
|
||||
#{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSure != null and isSure != ''">
|
||||
#{isSure,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isPush != null and isPush != ''">
|
||||
#{isPush,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
on duplicate key update
|
||||
<trim suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id = #{id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
code = #{code,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="signDate != null and signDate != ''">
|
||||
sign_date = #{signDate,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseCompany != null">
|
||||
lease_company = #{leaseCompany,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="project != null">
|
||||
project = #{project,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
start_time = #{startTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="leaseTerm != null and leaseTerm != ''">
|
||||
lease_term = #{leaseTerm,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="advanceCharge != null and advanceCharge != ''">
|
||||
advance_charge = #{advanceCharge,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPerson != null and authorizingPerson != ''">
|
||||
authorizing_person = #{authorizingPerson,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="authorizingPhone != null and authorizingPhone != ''">
|
||||
authorizing_phone = #{authorizingPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="contractNumber != null and contractNumber != ''">
|
||||
contract_number = #{contractNumber,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="creator != null and creator != ''">
|
||||
creator = #{creator,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="createTime != null and createTime != ''">
|
||||
create_time = #{createTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
remark = #{remark,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="settlementTime != null and settlementTime != ''">
|
||||
settlement_time = #{settlementTime,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isBalance != null and isBalance != ''">
|
||||
is_balance = #{isBalance,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="url != null and url != ''">
|
||||
url = #{url,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="isSure != null and isSure != ''">
|
||||
is_sure = #{isSure,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isPush != null and isPush != ''">
|
||||
is_push = #{isPush,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue