基础模块调整,控制器增加注解,yml配置
This commit is contained in:
parent
7b62acf7de
commit
0a2315d4fa
|
|
@ -7,12 +7,14 @@ import java.util.Map;
|
|||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* Entity基类
|
||||
*
|
||||
* @author bonus
|
||||
*/
|
||||
@Setter
|
||||
public class BaseEntity implements Serializable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
|
@ -47,61 +49,31 @@ public class BaseEntity implements Serializable
|
|||
return searchValue;
|
||||
}
|
||||
|
||||
public void setSearchValue(String searchValue)
|
||||
{
|
||||
this.searchValue = searchValue;
|
||||
}
|
||||
|
||||
public String getCreateBy()
|
||||
{
|
||||
return createBy;
|
||||
}
|
||||
|
||||
public void setCreateBy(String createBy)
|
||||
{
|
||||
this.createBy = createBy;
|
||||
}
|
||||
|
||||
public Date getCreateTime()
|
||||
{
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime)
|
||||
{
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateBy()
|
||||
{
|
||||
return updateBy;
|
||||
}
|
||||
|
||||
public void setUpdateBy(String updateBy)
|
||||
{
|
||||
this.updateBy = updateBy;
|
||||
}
|
||||
|
||||
public Date getUpdateTime()
|
||||
{
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime)
|
||||
{
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getRemark()
|
||||
{
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark)
|
||||
{
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParams()
|
||||
{
|
||||
if (params == null)
|
||||
|
|
@ -111,8 +83,4 @@ public class BaseEntity implements Serializable
|
|||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, Object> params)
|
||||
{
|
||||
this.params = params;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
|||
* @author 阮世耀
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bm_agreement")
|
||||
@RequestMapping("/agreement")
|
||||
public class BmAgreementController extends BaseController {
|
||||
|
||||
/**
|
||||
|
|
@ -30,7 +30,7 @@ public class BmAgreementController extends BaseController {
|
|||
/**
|
||||
* 分页查询
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/getAgreementList")
|
||||
public TableDataInfo list(BmAgreement bmAgreement) {
|
||||
startPage();
|
||||
List<BmAgreement> list = this.bmAgreementService.selectAll();
|
||||
|
|
@ -56,7 +56,7 @@ public class BmAgreementController extends BaseController {
|
|||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
public ResultBean<Boolean> add(BmAgreement bmAgreement) {
|
||||
public ResultBean<Boolean> add(@RequestBody BmAgreement bmAgreement) {
|
||||
int result = this.bmAgreementService.insertSelective(bmAgreement);
|
||||
return result > 0 ? ResultBean.success(true) : ResultBean.error("删除失败");
|
||||
}
|
||||
|
|
@ -68,7 +68,7 @@ public class BmAgreementController extends BaseController {
|
|||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping(value = "/update")
|
||||
public ResultBean<Boolean> edit(BmAgreement bmAgreement) {
|
||||
public ResultBean<Boolean> edit(@RequestBody BmAgreement bmAgreement) {
|
||||
this.bmAgreementService.updateByPrimaryKeySelective(bmAgreement);
|
||||
return ResultBean.success(true);
|
||||
}
|
||||
|
|
@ -80,9 +80,8 @@ public class BmAgreementController extends BaseController {
|
|||
* @return 删除是否成功
|
||||
*/
|
||||
@PostMapping(value = "/delete/{id}")
|
||||
public ResultBean<Boolean> deleteById(@PathVariable("id") Integer id) {
|
||||
this.bmAgreementService.deleteByPrimaryKey(id);
|
||||
return ResultBean.success(true);
|
||||
public ResultBean<String> deleteById(@PathVariable("id") Integer id) {
|
||||
return ResultBean.toIsSuccess(this.bmAgreementService.deleteByPrimaryKey(id), "删除成功");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,24 +26,24 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/customer")
|
||||
@Slf4j
|
||||
public class BmCustomerController extends BaseController
|
||||
{
|
||||
public class BmCustomerController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IBmCustomerService customerService;
|
||||
|
||||
/**
|
||||
* 获取往来单位列表
|
||||
*/
|
||||
@RequiresPermissions("bm:customer:list")
|
||||
@GetMapping("/list")
|
||||
@SysLog(title = "往来单位", businessType = OperaType.QUERY,logType = 0,module = "基础管理->往来单位")
|
||||
@RequiresPermissions("base:customer:list")
|
||||
@GetMapping("/getList")
|
||||
@SysLog(title = "往来单位", businessType = OperaType.QUERY, logType = 0, module = "基础管理->往来单位")
|
||||
public TableDataInfo list(BmCustomer bmCustomer) {
|
||||
try{
|
||||
try {
|
||||
startPage();
|
||||
List<BmCustomer> list = customerService.selectCustomerList(bmCustomer);
|
||||
return getDataTable(list);
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return getDataTableError(new ArrayList<>());
|
||||
}
|
||||
|
|
@ -51,66 +51,62 @@ public class BmCustomerController extends BaseController
|
|||
/**
|
||||
* 根据往来单位编号获取详细信息
|
||||
*/
|
||||
@RequiresPermissions("bm:customer:query")
|
||||
@RequiresPermissions("base:customer:query")
|
||||
@GetMapping(value = "/{customerId}")
|
||||
public AjaxResult getInfo(@PathVariable Long customerId) {
|
||||
try{
|
||||
try {
|
||||
return success(customerService.selectCustomerById(customerId));
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增往来单位
|
||||
*/
|
||||
@RequiresPermissions("bm:customer:add")
|
||||
@PostMapping
|
||||
@SysLog(title = "往来单位", businessType = OperaType.INSERT,logType = 0,module = "基础管理->往来单位")
|
||||
@RequiresPermissions("base:customer:add")
|
||||
@PostMapping("/add")
|
||||
@SysLog(title = "往来单位", businessType = OperaType.INSERT, logType = 0, module = "基础管理->往来单位")
|
||||
public AjaxResult add(@Validated @RequestBody BmCustomer customer) {
|
||||
try{
|
||||
// customer.setCreateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
// customer.setCreateBy(SecurityUtils.getUsername());
|
||||
return toAjax(customerService.insertCustomer(customer));
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常");
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改往来单位
|
||||
*/
|
||||
@RequiresPermissions("bm:customer:edit")
|
||||
@PutMapping
|
||||
@SysLog(title = "往来单位", businessType = OperaType.UPDATE,logType = 0,module = "基础管理->往来单位")
|
||||
@RequiresPermissions("base:customer:edit")
|
||||
@PutMapping("/update")
|
||||
@SysLog(title = "往来单位", businessType = OperaType.UPDATE, logType = 0, module = "基础管理->往来单位")
|
||||
public AjaxResult edit(@Validated @RequestBody BmCustomer customer) {
|
||||
try{
|
||||
// customer.setUpdateBy(SecurityUtils.getUsername());
|
||||
try {
|
||||
// customer.setUpdateBy(SecurityUtils.getUsername());
|
||||
return toAjax(customerService.updateCustomer(customer));
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除往来单位
|
||||
*/
|
||||
@RequiresPermissions("bm:customer:remove")
|
||||
@RequiresPermissions("base:customer:remove")
|
||||
@DeleteMapping("/{customerIds}")
|
||||
@SysLog(title = "往来单位", businessType = OperaType.DELETE,logType = 0,module = "基础管理->往来单位")
|
||||
@SysLog(title = "往来单位", businessType = OperaType.DELETE, logType = 0, module = "基础管理->往来单位")
|
||||
public AjaxResult remove(@PathVariable Long[] customerIds) {
|
||||
try{
|
||||
try {
|
||||
return toAjax(customerService.deleteCustomerByIds(customerIds));
|
||||
}catch (Exception e){
|
||||
log.error(e.toString(),e);
|
||||
} catch (Exception e) {
|
||||
log.error(e.toString(), e);
|
||||
}
|
||||
return error("系统异常");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public class BmCustomerTypeController extends BaseController {
|
|||
*/
|
||||
@PostMapping(value = "/add")
|
||||
@RequiresPermissions("base:customerType:add")
|
||||
public ResultBean<Boolean> add(BmCustomerType bmCustomerType) {
|
||||
public ResultBean<Boolean> add(@RequestBody BmCustomerType bmCustomerType) {
|
||||
this.bmCustomerTypeService.insertSelective(bmCustomerType);
|
||||
return ResultBean.success(true);
|
||||
}
|
||||
|
|
@ -70,7 +70,7 @@ public class BmCustomerTypeController extends BaseController {
|
|||
*/
|
||||
@PutMapping(value = "/update")
|
||||
@RequiresPermissions("base:customerType:edit")
|
||||
public ResultBean<Boolean> edit(BmCustomerType bmCustomerType) {
|
||||
public ResultBean<Boolean> edit(@RequestBody BmCustomerType bmCustomerType) {
|
||||
this.bmCustomerTypeService.updateByPrimaryKeySelective(bmCustomerType);
|
||||
return ResultBean.success(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.bonus.base.controller;
|
||||
import com.bonus.base.domain.BmCustomerType;
|
||||
import com.bonus.base.domain.BmProject;
|
||||
import com.bonus.base.service.BmProjectService;
|
||||
import com.bonus.base.utils.ResultBean;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
|
|
@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.*;
|
|||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -18,7 +19,7 @@ import java.util.List;
|
|||
* @author 阮世耀
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bm_project")
|
||||
@RequestMapping("/project")
|
||||
public class BmProjectController extends BaseController {
|
||||
|
||||
/**
|
||||
|
|
@ -60,7 +61,7 @@ public class BmProjectController extends BaseController {
|
|||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping(value = "/add")
|
||||
public ResultBean<Boolean> add(BmProject obj) {
|
||||
public ResultBean<Boolean> add(@RequestBody BmProject obj) {
|
||||
int result = this.bmProjectService.insertSelective(obj);
|
||||
return result > 0 ? ResultBean.success(true) : ResultBean.error(0, "增加失败");
|
||||
}
|
||||
|
|
@ -72,21 +73,31 @@ public class BmProjectController extends BaseController {
|
|||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping(value = "/update")
|
||||
public ResultBean<Boolean> edit(BmProject obj) {
|
||||
public ResultBean<Boolean> edit(@RequestBody BmProject obj) {
|
||||
this.bmProjectService.updateByPrimaryKeySelective(obj);
|
||||
return ResultBean.success(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
* 逻辑删除
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@PostMapping(value = "/delete/{id}")
|
||||
public ResultBean<Boolean> deleteById(@PathVariable("id") Integer id) {
|
||||
this.bmProjectService.deleteByPrimaryKey(id);
|
||||
return ResultBean.success(true);
|
||||
@DeleteMapping("/{id}")
|
||||
public ResultBean<String> deleteById(@PathVariable("id") Integer id) {
|
||||
return ResultBean.toIsSuccess(this.bmProjectService.updateIsActive(id),"删除失败");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量导出excel
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BmProject record) {
|
||||
List<BmProject> list = bmProjectService.selectAll();
|
||||
ExcelUtil<BmProject> util = new ExcelUtil<>(BmProject.class);
|
||||
util.exportExcel(response, list, "工程管理数据");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@Api(tags = "供应商管理")
|
||||
@RequestMapping("/bmSupplier")
|
||||
@RequestMapping("/masupplier")
|
||||
public class BmSupplierController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
|
|
@ -37,7 +37,7 @@ public class BmSupplierController extends BaseController {
|
|||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "分页查询供应商列表")
|
||||
@GetMapping("/list")
|
||||
@GetMapping("/getMaSupplierList")
|
||||
public TableDataInfo queryByPage(BmSupplier bmSupplier) {
|
||||
startPage();
|
||||
List<BmSupplier> list = bmSupplierService.queryByPage(bmSupplier);
|
||||
|
|
|
|||
|
|
@ -1,22 +1,21 @@
|
|||
package com.bonus.base.domain;
|
||||
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* 工程表
|
||||
* 工程管理信息表
|
||||
* @author 阮世耀
|
||||
*
|
||||
*/
|
||||
@ApiModel(description="工程管理")
|
||||
@Data
|
||||
public class BmProject implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@EqualsAndHashCode(callSuper = false) // 添加 callSuper = false
|
||||
public class BmProject extends BaseEntity implements Serializable {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
@ -110,7 +109,7 @@ public class BmProject implements Serializable {
|
|||
/**
|
||||
* 是否启用0不启用1启用
|
||||
*/
|
||||
@ApiModelProperty(value = "是否启用:0不启用 1启用")
|
||||
@ApiModelProperty(value = "是否启用0不启用1启用")
|
||||
private String isActive;
|
||||
|
||||
/**
|
||||
|
|
@ -179,4 +178,5 @@ public class BmProject implements Serializable {
|
|||
@ApiModelProperty(value = "工程补录是否匹配")
|
||||
private String isMatch;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
|
@ -61,4 +61,5 @@ public interface BmAgreementMapper {
|
|||
* @return update count
|
||||
*/
|
||||
int updateByPrimaryKey(BmAgreement record);
|
||||
|
||||
}
|
||||
|
|
@ -55,6 +55,9 @@ public interface BmProjectMapper {
|
|||
*/
|
||||
int updateByPrimaryKeySelective(BmProject record);
|
||||
|
||||
|
||||
int updateIsActive(Integer id);
|
||||
|
||||
/**
|
||||
* update record
|
||||
* @param record the updated record
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
package com.bonus.base.service;
|
||||
|
||||
//import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ public class BmProjectService{
|
|||
public int deleteByPrimaryKey(Integer id) {
|
||||
return bmProjectMapper.deleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public int updateIsActive(Integer id) {
|
||||
return bmProjectMapper.updateIsActive(id);
|
||||
}
|
||||
|
||||
public int insert(BmProject record) {
|
||||
return bmProjectMapper.insert(record);
|
||||
|
|
|
|||
|
|
@ -66,4 +66,18 @@ public final class ResultBean<T> {
|
|||
return new ResultBean<>(HttpStatus.SUCCESS, "success", data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除/修改/新增操作 根据影响条数返回响应内容
|
||||
*
|
||||
* @param data 数据
|
||||
* @return 构建的ResultBean实例
|
||||
*/
|
||||
public static <T> ResultBean<T> toIsSuccess(int record,T data) {
|
||||
// 检查data是否为null
|
||||
if (data == null) {
|
||||
return new ResultBean<>(record > 0 ? HttpStatus.SUCCESS : HttpStatus.NO_CONTENT, "success", null);
|
||||
}
|
||||
return new ResultBean<>(record > 0 ? HttpStatus.SUCCESS : HttpStatus.NO_CONTENT, "error", data);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ server:
|
|||
# Spring
|
||||
spring:
|
||||
redis:
|
||||
host: localhost
|
||||
host: 192.168.0.56
|
||||
port: 6379
|
||||
datasource:
|
||||
druid:
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@
|
|||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from bm_customer_type
|
||||
where IS_ACTIVE = '1'
|
||||
</select>
|
||||
|
||||
<update id="updateById">
|
||||
|
|
|
|||
|
|
@ -16,10 +16,7 @@
|
|||
<result column="address" jdbcType="VARCHAR" property="address" />
|
||||
<result column="remarks" jdbcType="VARCHAR" property="remarks" />
|
||||
<result column="material_clerk" jdbcType="VARCHAR" property="materialClerk" />
|
||||
<result column="clerk_phone" jdbcType="VARCHAR" property="clerkPhone" />
|
||||
<result column="voltage class" jdbcType="INTEGER" property="voltageClass" />
|
||||
<result column="company_id" jdbcType="INTEGER" property="companyId" />
|
||||
<result column="is_balance_end" jdbcType="CHAR" property="isBalanceEnd" />
|
||||
<result column="time" jdbcType="VARCHAR" property="time" />
|
||||
<result column="is_active" jdbcType="VARCHAR" property="isActive" />
|
||||
<result column="lon" jdbcType="VARCHAR" property="lon" />
|
||||
|
|
@ -32,13 +29,14 @@
|
|||
<result column="cvo" jdbcType="VARCHAR" property="cvo" />
|
||||
<result column="stats" jdbcType="VARCHAR" property="stats" />
|
||||
<result column="htzt" jdbcType="VARCHAR" property="htzt" />
|
||||
<result column="is_match" jdbcType="VARCHAR" property="isMatch" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
<!--@mbg.generated-->
|
||||
id, project_type, `name`, num, manager, nature, telphone, phone, fax, address, remarks,
|
||||
material_clerk, clerk_phone, `voltage class`, company_id, is_balance_end, `time`,
|
||||
is_active, lon, lat, company, imp_unit, dept_name, pro_id, dept_id, cvo, stats, htzt
|
||||
material_clerk, company_id, `time`,
|
||||
is_active, lon, lat, company, imp_unit, dept_name, pro_id, dept_id, cvo, stats, htzt, is_match
|
||||
</sql>
|
||||
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
|
|
@ -65,20 +63,18 @@
|
|||
|
||||
<insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.bonus.base.domain.BmProject" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_project (project_type, `name`, num,
|
||||
manager, nature, telphone,
|
||||
phone, fax, address,
|
||||
remarks, material_clerk, clerk_phone,
|
||||
`voltage class`, company_id, is_balance_end,
|
||||
`time`, is_active, lon,
|
||||
lat, company, imp_unit,
|
||||
dept_name, pro_id, dept_id,
|
||||
insert into bm_project (project_type, `name`, num,
|
||||
manager, nature, telphone,
|
||||
phone, fax, address,
|
||||
remarks, material_clerk, company_id,
|
||||
`time`, is_active, lon,
|
||||
lat, company, imp_unit,
|
||||
dept_name, pro_id, dept_id,
|
||||
cvo, stats, htzt)
|
||||
values (#{projectType,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{num,jdbcType=VARCHAR},
|
||||
#{manager,jdbcType=VARCHAR}, #{nature,jdbcType=VARCHAR}, #{telphone,jdbcType=VARCHAR},
|
||||
#{phone,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR}, #{materialClerk,jdbcType=VARCHAR}, #{clerkPhone,jdbcType=VARCHAR},
|
||||
#{voltageClass,jdbcType=INTEGER}, #{companyId,jdbcType=INTEGER}, #{isBalanceEnd,jdbcType=CHAR},
|
||||
#{remarks,jdbcType=VARCHAR}, #{materialClerk,jdbcType=VARCHAR}, #{companyId,jdbcType=INTEGER},
|
||||
#{time,jdbcType=VARCHAR}, '1', #{lon,jdbcType=VARCHAR},
|
||||
#{lat,jdbcType=VARCHAR}, #{company,jdbcType=VARCHAR}, #{impUnit,jdbcType=VARCHAR},
|
||||
#{deptName,jdbcType=VARCHAR}, #{proId,jdbcType=VARCHAR}, #{deptId,jdbcType=INTEGER},
|
||||
|
|
@ -122,18 +118,9 @@
|
|||
<if test="materialClerk != null and materialClerk != ''">
|
||||
material_clerk,
|
||||
</if>
|
||||
<if test="clerkPhone != null and clerkPhone != ''">
|
||||
clerk_phone,
|
||||
</if>
|
||||
<if test="voltageClass != null">
|
||||
`voltage class`,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
<if test="isBalanceEnd != null and isBalanceEnd != ''">
|
||||
is_balance_end,
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
`time`,
|
||||
</if>
|
||||
|
|
@ -168,7 +155,7 @@
|
|||
stats,
|
||||
</if>
|
||||
<if test="htzt != null and htzt != ''">
|
||||
htzt,
|
||||
htzt
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
|
|
@ -205,18 +192,9 @@
|
|||
<if test="materialClerk != null and materialClerk != ''">
|
||||
#{materialClerk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="clerkPhone != null and clerkPhone != ''">
|
||||
#{clerkPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="voltageClass != null">
|
||||
#{voltageClass,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isBalanceEnd != null and isBalanceEnd != ''">
|
||||
#{isBalanceEnd,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
#{time,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
|
@ -251,7 +229,7 @@
|
|||
#{stats,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="htzt != null and htzt != ''">
|
||||
#{htzt,jdbcType=VARCHAR},
|
||||
#{htzt,jdbcType=VARCHAR}
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
|
@ -292,18 +270,9 @@
|
|||
<if test="materialClerk != null and materialClerk != ''">
|
||||
material_clerk = #{materialClerk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="clerkPhone != null and clerkPhone != ''">
|
||||
clerk_phone = #{clerkPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="voltageClass != null">
|
||||
`voltage class` = #{voltageClass,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isBalanceEnd != null and isBalanceEnd != ''">
|
||||
is_balance_end = #{isBalanceEnd,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
`time` = #{time,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
|
@ -343,6 +312,7 @@
|
|||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<update id="updateByPrimaryKey" parameterType="com.bonus.base.domain.BmProject">
|
||||
<!--@mbg.generated-->
|
||||
update bm_project
|
||||
|
|
@ -357,10 +327,7 @@
|
|||
address = #{address,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
material_clerk = #{materialClerk,jdbcType=VARCHAR},
|
||||
clerk_phone = #{clerkPhone,jdbcType=VARCHAR},
|
||||
`voltage class` = #{voltageClass,jdbcType=INTEGER},
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
is_balance_end = #{isBalanceEnd,jdbcType=CHAR},
|
||||
`time` = #{time,jdbcType=VARCHAR},
|
||||
is_active = #{isActive,jdbcType=VARCHAR},
|
||||
lon = #{lon,jdbcType=VARCHAR},
|
||||
|
|
@ -375,6 +342,7 @@
|
|||
htzt = #{htzt,jdbcType=VARCHAR}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
<insert id="insertOrUpdate" keyColumn="id" keyProperty="id" parameterType="com.bonus.base.domain.BmProject" useGeneratedKeys="true">
|
||||
<!--@mbg.generated-->
|
||||
insert into bm_project
|
||||
|
|
@ -393,10 +361,7 @@
|
|||
address,
|
||||
remarks,
|
||||
material_clerk,
|
||||
clerk_phone,
|
||||
`voltage class`,
|
||||
company_id,
|
||||
is_balance_end,
|
||||
`time`,
|
||||
is_active,
|
||||
lon,
|
||||
|
|
@ -426,10 +391,7 @@
|
|||
#{address,jdbcType=VARCHAR},
|
||||
#{remarks,jdbcType=VARCHAR},
|
||||
#{materialClerk,jdbcType=VARCHAR},
|
||||
#{clerkPhone,jdbcType=VARCHAR},
|
||||
#{voltageClass,jdbcType=INTEGER},
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
#{isBalanceEnd,jdbcType=CHAR},
|
||||
#{time,jdbcType=VARCHAR},
|
||||
#{isActive,jdbcType=VARCHAR},
|
||||
#{lon,jdbcType=VARCHAR},
|
||||
|
|
@ -459,10 +421,7 @@
|
|||
address = #{address,jdbcType=VARCHAR},
|
||||
remarks = #{remarks,jdbcType=VARCHAR},
|
||||
material_clerk = #{materialClerk,jdbcType=VARCHAR},
|
||||
clerk_phone = #{clerkPhone,jdbcType=VARCHAR},
|
||||
`voltage class` = #{voltageClass,jdbcType=INTEGER},
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
is_balance_end = #{isBalanceEnd,jdbcType=CHAR},
|
||||
`time` = #{time,jdbcType=VARCHAR},
|
||||
is_active = #{isActive,jdbcType=VARCHAR},
|
||||
lon = #{lon,jdbcType=VARCHAR},
|
||||
|
|
@ -517,18 +476,9 @@
|
|||
<if test="materialClerk != null and materialClerk != ''">
|
||||
material_clerk,
|
||||
</if>
|
||||
<if test="clerkPhone != null and clerkPhone != ''">
|
||||
clerk_phone,
|
||||
</if>
|
||||
<if test="voltageClass != null">
|
||||
`voltage class`,
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id,
|
||||
</if>
|
||||
<if test="isBalanceEnd != null and isBalanceEnd != ''">
|
||||
is_balance_end,
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
`time`,
|
||||
</if>
|
||||
|
|
@ -604,18 +554,9 @@
|
|||
<if test="materialClerk != null and materialClerk != ''">
|
||||
#{materialClerk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="clerkPhone != null and clerkPhone != ''">
|
||||
#{clerkPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="voltageClass != null">
|
||||
#{voltageClass,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
#{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isBalanceEnd != null and isBalanceEnd != ''">
|
||||
#{isBalanceEnd,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
#{time,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
|
@ -691,18 +632,9 @@
|
|||
<if test="materialClerk != null and materialClerk != ''">
|
||||
material_clerk = #{materialClerk,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="clerkPhone != null and clerkPhone != ''">
|
||||
clerk_phone = #{clerkPhone,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="voltageClass != null">
|
||||
`voltage class` = #{voltageClass,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="companyId != null">
|
||||
company_id = #{companyId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="isBalanceEnd != null and isBalanceEnd != ''">
|
||||
is_balance_end = #{isBalanceEnd,jdbcType=CHAR},
|
||||
</if>
|
||||
<if test="time != null and time != ''">
|
||||
`time` = #{time,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
|
@ -741,4 +673,9 @@
|
|||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateIsActive">
|
||||
update bm_project set is_active = '0' where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue