Administrator пре 1 година
родитељ
комит
21001b6e89

+ 97 - 0
ruoyi-admin/src/main/java/com/ruoyi/web/controller/investment/ZxInvestmentController.java

@@ -0,0 +1,97 @@
+package com.ruoyi.web.controller.investment;
+
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.system.domain.investment.ZxInvestment;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.service.IZxInvestmentService;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+import java.util.List;
+
+/**
+ * 政协委员招商引资Controller
+ *
+ * @author boman
+ * @date 2024-03-27
+ */
+@RestController
+@RequestMapping("/zx/investment")
+public class ZxInvestmentController extends BaseController {
+    @Autowired
+    private IZxInvestmentService zxInvestmentService;
+
+    /**
+     * 查询政协委员招商引资列表
+     */
+    @PreAuthorize("@ss.hasPermi('zx:investment:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(ZxInvestment zxInvestment) {
+        startPage();
+        List<ZxInvestment> list = zxInvestmentService.selectZxInvestmentList(zxInvestment);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出政协委员招商引资列表
+     */
+    @PreAuthorize("@ss.hasPermi('zx:investment:export')")
+    @Log(title = "政协委员招商引资", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, ZxInvestment zxInvestment) {
+        List<ZxInvestment> list = zxInvestmentService.selectZxInvestmentList(zxInvestment);
+        ExcelUtil<ZxInvestment> util = new ExcelUtil<ZxInvestment>(ZxInvestment.class);
+        util.exportExcel(response, list, "政协委员招商引资数据");
+    }
+
+    /**
+     * 获取政协委员招商引资详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('zx:investment:query')")
+    @GetMapping(value = "/{investmentId}")
+    public AjaxResult getInfo(@PathVariable("investmentId") Long investmentId) {
+        return success(zxInvestmentService.selectZxInvestmentByInvestmentId(investmentId));
+    }
+
+    /**
+     * 新增政协委员招商引资
+     */
+    @PreAuthorize("@ss.hasPermi('zx:investment:add')")
+    @Log(title = "政协委员招商引资", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody ZxInvestment zxInvestment) {
+        return toAjax(zxInvestmentService.insertZxInvestment(zxInvestment));
+    }
+
+    /**
+     * 修改政协委员招商引资
+     */
+    @PreAuthorize("@ss.hasPermi('zx:investment:edit')")
+    @Log(title = "政协委员招商引资", businessType = BusinessType.UPDATE)
+    @PostMapping("/put")
+    public AjaxResult edit(@RequestBody ZxInvestment zxInvestment) {
+        return toAjax(zxInvestmentService.updateZxInvestment(zxInvestment));
+    }
+
+    /**
+     * 删除政协委员招商引资
+     */
+    @PreAuthorize("@ss.hasPermi('zx:investment:remove')")
+    @Log(title = "政协委员招商引资", businessType = BusinessType.DELETE)
+    @GetMapping("/delete/{investmentIds}")
+    public AjaxResult remove(@PathVariable Long[] investmentIds) {
+        return toAjax(zxInvestmentService.deleteZxInvestmentByInvestmentIds(investmentIds));
+    }
+}

+ 15 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/bonus/ZxBonus.java

@@ -1,7 +1,10 @@
 package com.ruoyi.system.domain.bonus;
 
 import java.util.Date;
+import java.util.List;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.system.domain.ZxFj;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
@@ -52,6 +55,18 @@ public class ZxBonus extends BaseEntity
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @Excel(name = "加分时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
     private Date bonusTime;
+    /**
+     * 附件
+     */
+    private List<ZxFj> zxFjList;
+
+    public List<ZxFj> getZxFjList() {
+        return zxFjList;
+    }
+
+    public void setZxFjList(List<ZxFj> zxFjList) {
+        this.zxFjList = zxFjList;
+    }
 
     public String getName() {
         return name;

+ 157 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/investment/ZxInvestment.java

@@ -0,0 +1,157 @@
+package com.ruoyi.system.domain.investment;
+
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 政协委员招商引资对象 zx_investment
+ * 
+ * @author boman
+ * @date 2024-03-27
+ */
+public class ZxInvestment extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 政协委员招商引资ID */
+    private Long investmentId;
+
+    /** 委员账号id */
+    @Excel(name = "委员账号id")
+    private Long userId;
+
+    /** 委员姓名 */
+    @Excel(name = "委员姓名")
+    private String name;
+
+    /** 项目线索名称 */
+    @Excel(name = "项目线索名称")
+    private String clueName;
+
+    /** 拟投资额 */
+    @Excel(name = "拟投资额")
+    private String investmentAmount;
+
+    /** 联系人 */
+    @Excel(name = "联系人")
+    private String contactsName;
+
+    /** 联系方式 */
+    @Excel(name = "联系方式")
+    private String contactsPhone;
+
+    /** 联系内容 */
+    @Excel(name = "联系内容")
+    private String contactsContent;
+
+    /** 录入时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "录入时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date publishTime;
+
+    public void setInvestmentId(Long investmentId) 
+    {
+        this.investmentId = investmentId;
+    }
+
+    public Long getInvestmentId() 
+    {
+        return investmentId;
+    }
+    public void setUserId(Long userId) 
+    {
+        this.userId = userId;
+    }
+
+    public Long getUserId() 
+    {
+        return userId;
+    }
+    public void setName(String name) 
+    {
+        this.name = name;
+    }
+
+    public String getName() 
+    {
+        return name;
+    }
+    public void setClueName(String clueName) 
+    {
+        this.clueName = clueName;
+    }
+
+    public String getClueName() 
+    {
+        return clueName;
+    }
+    public void setInvestmentAmount(String investmentAmount) 
+    {
+        this.investmentAmount = investmentAmount;
+    }
+
+    public String getInvestmentAmount() 
+    {
+        return investmentAmount;
+    }
+    public void setContactsName(String contactsName) 
+    {
+        this.contactsName = contactsName;
+    }
+
+    public String getContactsName() 
+    {
+        return contactsName;
+    }
+    public void setContactsPhone(String contactsPhone) 
+    {
+        this.contactsPhone = contactsPhone;
+    }
+
+    public String getContactsPhone() 
+    {
+        return contactsPhone;
+    }
+    public void setContactsContent(String contactsContent) 
+    {
+        this.contactsContent = contactsContent;
+    }
+
+    public String getContactsContent() 
+    {
+        return contactsContent;
+    }
+    public void setPublishTime(Date publishTime) 
+    {
+        this.publishTime = publishTime;
+    }
+
+    public Date getPublishTime() 
+    {
+        return publishTime;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("investmentId", getInvestmentId())
+            .append("userId", getUserId())
+            .append("name", getName())
+            .append("clueName", getClueName())
+            .append("investmentAmount", getInvestmentAmount())
+            .append("contactsName", getContactsName())
+            .append("contactsPhone", getContactsPhone())
+            .append("contactsContent", getContactsContent())
+            .append("publishTime", getPublishTime())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/ZxInvestmentMapper.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.mapper;
+
+import com.ruoyi.system.domain.investment.ZxInvestment;
+
+import java.util.List;
+
+
+/**
+ * 政协委员招商引资Mapper接口
+ * 
+ * @author boman
+ * @date 2024-03-27
+ */
+public interface ZxInvestmentMapper 
+{
+    /**
+     * 查询政协委员招商引资
+     * 
+     * @param investmentId 政协委员招商引资主键
+     * @return 政协委员招商引资
+     */
+    public ZxInvestment selectZxInvestmentByInvestmentId(Long investmentId);
+
+    /**
+     * 查询政协委员招商引资列表
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 政协委员招商引资集合
+     */
+    public List<ZxInvestment> selectZxInvestmentList(ZxInvestment zxInvestment);
+
+    /**
+     * 新增政协委员招商引资
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 结果
+     */
+    public int insertZxInvestment(ZxInvestment zxInvestment);
+
+    /**
+     * 修改政协委员招商引资
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 结果
+     */
+    public int updateZxInvestment(ZxInvestment zxInvestment);
+
+    /**
+     * 删除政协委员招商引资
+     * 
+     * @param investmentId 政协委员招商引资主键
+     * @return 结果
+     */
+    public int deleteZxInvestmentByInvestmentId(Long investmentId);
+
+    /**
+     * 批量删除政协委员招商引资
+     * 
+     * @param investmentIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteZxInvestmentByInvestmentIds(Long[] investmentIds);
+}

+ 63 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/IZxInvestmentService.java

@@ -0,0 +1,63 @@
+package com.ruoyi.system.service;
+
+import com.ruoyi.system.domain.investment.ZxInvestment;
+
+import java.util.List;
+
+
+/**
+ * 政协委员招商引资Service接口
+ * 
+ * @author boman
+ * @date 2024-03-27
+ */
+public interface IZxInvestmentService 
+{
+    /**
+     * 查询政协委员招商引资
+     * 
+     * @param investmentId 政协委员招商引资主键
+     * @return 政协委员招商引资
+     */
+    public ZxInvestment selectZxInvestmentByInvestmentId(Long investmentId);
+
+    /**
+     * 查询政协委员招商引资列表
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 政协委员招商引资集合
+     */
+    public List<ZxInvestment> selectZxInvestmentList(ZxInvestment zxInvestment);
+
+    /**
+     * 新增政协委员招商引资
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 结果
+     */
+    public int insertZxInvestment(ZxInvestment zxInvestment);
+
+    /**
+     * 修改政协委员招商引资
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 结果
+     */
+    public int updateZxInvestment(ZxInvestment zxInvestment);
+
+    /**
+     * 批量删除政协委员招商引资
+     * 
+     * @param investmentIds 需要删除的政协委员招商引资主键集合
+     * @return 结果
+     */
+    public int deleteZxInvestmentByInvestmentIds(Long[] investmentIds);
+
+    /**
+     * 删除政协委员招商引资信息
+     * 
+     * @param investmentId 政协委员招商引资主键
+     * @return 结果
+     */
+    public int deleteZxInvestmentByInvestmentId(Long investmentId);
+}

+ 41 - 1
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxBonusServiceImpl.java

@@ -3,13 +3,22 @@ package com.ruoyi.system.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.common.utils.StringUtils;
+import com.ruoyi.system.domain.ZxFj;
+import com.ruoyi.system.domain.activity.ZxActivity;
 import com.ruoyi.system.domain.bonus.ZxBonus;
+import com.ruoyi.system.mapper.ZxFjMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.ruoyi.system.mapper.ZxBonusMapper;
 import com.ruoyi.system.service.IZxBonusService;
+
+import java.util.ArrayList;
 import java.util.List;
 
+import static com.ruoyi.common.constant.CommonConstants.FIV;
+import static com.ruoyi.common.constant.CommonConstants.SEV;
+
 /**
  * 政协履职加分Service业务层处理
  * 
@@ -22,6 +31,9 @@ public class ZxBonusServiceImpl implements IZxBonusService
     @Autowired
     private ZxBonusMapper zxBonusMapper;
 
+    @Autowired
+    private ZxFjMapper zxFjMapper;
+
     /**
      * 查询政协履职加分
      * 
@@ -59,7 +71,9 @@ public class ZxBonusServiceImpl implements IZxBonusService
         zxBonus.setUserId(SecurityUtils.getUserId());
         zxBonus.setName(SecurityUtils.getUsername());
         zxBonus.setCreateTime(DateUtils.getNowDate());
-        return zxBonusMapper.insertZxBonus(zxBonus);
+        int rows = zxBonusMapper.insertZxBonus(zxBonus);
+        insertZxFj(zxBonus);
+        return rows;
     }
 
     /**
@@ -72,6 +86,8 @@ public class ZxBonusServiceImpl implements IZxBonusService
     public int updateZxBonus(ZxBonus zxBonus)
     {
         zxBonus.setUpdateTime(DateUtils.getNowDate());
+        zxFjMapper.deleteZxFjBySourceId(zxBonus.getBonusId());
+        insertZxFj(zxBonus);
         return zxBonusMapper.updateZxBonus(zxBonus);
     }
 
@@ -98,4 +114,28 @@ public class ZxBonusServiceImpl implements IZxBonusService
     {
         return zxBonusMapper.deleteZxBonusByBonusId(bonusId);
     }
+
+    /**
+     * 新增加分附件信息
+     */
+    public void insertZxFj(ZxBonus zxBonus)
+    {
+        List<ZxFj> zxFjListFj = zxBonus.getZxFjList();
+        Long bonusId = zxBonus.getBonusId();
+        if (StringUtils.isNotNull(zxFjListFj))
+        {
+            List<ZxFj> list = new ArrayList<ZxFj>();
+            for (ZxFj zxFj : zxFjListFj)
+            {
+                zxFj.setType(SEV);
+                zxFj.setMainId(bonusId);
+                zxFj.setSourceId(bonusId);
+                list.add(zxFj);
+            }
+            if (list.size() > 0)
+            {
+                zxFjMapper.batchZxFj(list);
+            }
+        }
+    }
 }

+ 99 - 0
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ZxInvestmentServiceImpl.java

@@ -0,0 +1,99 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import com.ruoyi.common.utils.SecurityUtils;
+import com.ruoyi.system.domain.investment.ZxInvestment;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.ZxInvestmentMapper;
+import com.ruoyi.system.service.IZxInvestmentService;
+
+/**
+ * 政协委员招商引资Service业务层处理
+ * 
+ * @author boman
+ * @date 2024-03-27
+ */
+@Service
+public class ZxInvestmentServiceImpl implements IZxInvestmentService 
+{
+    @Autowired
+    private ZxInvestmentMapper zxInvestmentMapper;
+
+    /**
+     * 查询政协委员招商引资
+     * 
+     * @param investmentId 政协委员招商引资主键
+     * @return 政协委员招商引资
+     */
+    @Override
+    public ZxInvestment selectZxInvestmentByInvestmentId(Long investmentId)
+    {
+        return zxInvestmentMapper.selectZxInvestmentByInvestmentId(investmentId);
+    }
+
+    /**
+     * 查询政协委员招商引资列表
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 政协委员招商引资
+     */
+    @Override
+    public List<ZxInvestment> selectZxInvestmentList(ZxInvestment zxInvestment)
+    {
+        return zxInvestmentMapper.selectZxInvestmentList(zxInvestment);
+    }
+
+    /**
+     * 新增政协委员招商引资
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 结果
+     */
+    @Override
+    public int insertZxInvestment(ZxInvestment zxInvestment)
+    {
+        zxInvestment.setUserId(SecurityUtils.getUserId());
+        zxInvestment.setName(SecurityUtils.getUsername());
+        zxInvestment.setCreateTime(DateUtils.getNowDate());
+        return zxInvestmentMapper.insertZxInvestment(zxInvestment);
+    }
+
+    /**
+     * 修改政协委员招商引资
+     * 
+     * @param zxInvestment 政协委员招商引资
+     * @return 结果
+     */
+    @Override
+    public int updateZxInvestment(ZxInvestment zxInvestment)
+    {
+        zxInvestment.setUpdateTime(DateUtils.getNowDate());
+        return zxInvestmentMapper.updateZxInvestment(zxInvestment);
+    }
+
+    /**
+     * 批量删除政协委员招商引资
+     * 
+     * @param investmentIds 需要删除的政协委员招商引资主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZxInvestmentByInvestmentIds(Long[] investmentIds)
+    {
+        return zxInvestmentMapper.deleteZxInvestmentByInvestmentIds(investmentIds);
+    }
+
+    /**
+     * 删除政协委员招商引资信息
+     * 
+     * @param investmentId 政协委员招商引资主键
+     * @return 结果
+     */
+    @Override
+    public int deleteZxInvestmentByInvestmentId(Long investmentId)
+    {
+        return zxInvestmentMapper.deleteZxInvestmentByInvestmentId(investmentId);
+    }
+}

+ 111 - 0
ruoyi-system/src/main/resources/mapper/system/ZxInvestmentMapper.xml

@@ -0,0 +1,111 @@
+<?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.system.mapper.ZxInvestmentMapper">
+    
+    <resultMap type="ZxInvestment" id="ZxInvestmentResult">
+        <result property="investmentId"    column="investment_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="name"    column="name"    />
+        <result property="clueName"    column="clue_name"    />
+        <result property="investmentAmount"    column="investment_amount"    />
+        <result property="contactsName"    column="contacts_name"    />
+        <result property="contactsPhone"    column="contacts_phone"    />
+        <result property="contactsContent"    column="contacts_content"    />
+        <result property="publishTime"    column="publish_time"    />
+        <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="selectZxInvestmentVo">
+        select investment_id, user_id, name, clue_name, investment_amount, contacts_name, contacts_phone, contacts_content, publish_time, create_by, create_time, update_by, update_time, remark from zx_investment
+    </sql>
+
+    <select id="selectZxInvestmentList" parameterType="ZxInvestment" resultMap="ZxInvestmentResult">
+        <include refid="selectZxInvestmentVo"/>
+        <where>  
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="clueName != null  and clueName != ''"> and clue_name like concat('%', #{clueName}, '%')</if>
+            <if test="investmentAmount != null  and investmentAmount != ''"> and investment_amount = #{investmentAmount}</if>
+            <if test="contactsName != null  and contactsName != ''"> and contacts_name like concat('%', #{contactsName}, '%')</if>
+            <if test="contactsPhone != null  and contactsPhone != ''"> and contacts_phone = #{contactsPhone}</if>
+            <if test="contactsContent != null  and contactsContent != ''"> and contacts_content = #{contactsContent}</if>
+            <if test="publishTime != null "> and publish_time = #{publishTime}</if>
+        </where>
+    </select>
+    
+    <select id="selectZxInvestmentByInvestmentId" parameterType="Long" resultMap="ZxInvestmentResult">
+        <include refid="selectZxInvestmentVo"/>
+        where investment_id = #{investmentId}
+    </select>
+        
+    <insert id="insertZxInvestment" parameterType="ZxInvestment" useGeneratedKeys="true" keyProperty="investmentId">
+        insert into zx_investment
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="userId != null">user_id,</if>
+            <if test="name != null">name,</if>
+            <if test="clueName != null">clue_name,</if>
+            <if test="investmentAmount != null">investment_amount,</if>
+            <if test="contactsName != null">contacts_name,</if>
+            <if test="contactsPhone != null">contacts_phone,</if>
+            <if test="contactsContent != null">contacts_content,</if>
+            <if test="publishTime != null">publish_time,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="userId != null">#{userId},</if>
+            <if test="name != null">#{name},</if>
+            <if test="clueName != null">#{clueName},</if>
+            <if test="investmentAmount != null">#{investmentAmount},</if>
+            <if test="contactsName != null">#{contactsName},</if>
+            <if test="contactsPhone != null">#{contactsPhone},</if>
+            <if test="contactsContent != null">#{contactsContent},</if>
+            <if test="publishTime != null">#{publishTime},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateZxInvestment" parameterType="ZxInvestment">
+        update zx_investment
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="name != null">name = #{name},</if>
+            <if test="clueName != null">clue_name = #{clueName},</if>
+            <if test="investmentAmount != null">investment_amount = #{investmentAmount},</if>
+            <if test="contactsName != null">contacts_name = #{contactsName},</if>
+            <if test="contactsPhone != null">contacts_phone = #{contactsPhone},</if>
+            <if test="contactsContent != null">contacts_content = #{contactsContent},</if>
+            <if test="publishTime != null">publish_time = #{publishTime},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where investment_id = #{investmentId}
+    </update>
+
+    <delete id="deleteZxInvestmentByInvestmentId" parameterType="Long">
+        delete from zx_investment where investment_id = #{investmentId}
+    </delete>
+
+    <delete id="deleteZxInvestmentByInvestmentIds" parameterType="String">
+        delete from zx_investment where investment_id in 
+        <foreach item="investmentId" collection="array" open="(" separator="," close=")">
+            #{investmentId}
+        </foreach>
+    </delete>
+</mapper>