案例管理,添加修改暂停优化,判断时间不能重叠
This commit is contained in:
		| @@ -0,0 +1,35 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
| import lombok.Data; | ||||
|  | ||||
| /** | ||||
|  * 客户案例管理对象 sys_customer_case | ||||
|  * | ||||
|  * @author xiezhijun | ||||
|  * @date 2021-03-04 | ||||
|  */ | ||||
| @Data | ||||
| public class SysCustomerCase extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 案例名称 */ | ||||
|     @Excel(name = "案例名称") | ||||
|     private String name; | ||||
|  | ||||
|     /** 案例关键词 */ | ||||
|     @Excel(name = "案例关键词") | ||||
|     private String keyword; | ||||
|  | ||||
|     /** 案例所属客户ID */ | ||||
|     @Excel(name = "案例所属客户ID") | ||||
|     private Long customerId; | ||||
|  | ||||
|     /** 删除标识 0未删除 1已删除,默认0 */ | ||||
|     private Long delFlag; | ||||
| } | ||||
| @@ -0,0 +1,35 @@ | ||||
| package com.stdiet.custom.domain; | ||||
|  | ||||
| import com.stdiet.common.annotation.Excel; | ||||
| import com.stdiet.common.core.domain.BaseEntity; | ||||
| import lombok.Data; | ||||
|  | ||||
| /** | ||||
|  * 客户案例对应文件管理对象 sys_customer_case_file | ||||
|  * | ||||
|  * @author xiezhijun | ||||
|  * @date 2021-03-04 | ||||
|  */ | ||||
| @Data | ||||
| public class SysCustomerCaseFile extends BaseEntity | ||||
| { | ||||
|     private static final long serialVersionUID = 1L; | ||||
|  | ||||
|     /** $column.columnComment */ | ||||
|     private Long id; | ||||
|  | ||||
|     /** 案例文件 */ | ||||
|     @Excel(name = "案例文件") | ||||
|     private Long caseId; | ||||
|  | ||||
|     /** 文件路径 */ | ||||
|     @Excel(name = "文件路径") | ||||
|     private String fileUrl; | ||||
|  | ||||
|     /** 文件名字 */ | ||||
|     @Excel(name = "文件名字") | ||||
|     private String fileName; | ||||
|  | ||||
|     /** 删除标识 0未删除 1已删除 */ | ||||
|     private Long delFlag; | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomerCaseFile; | ||||
|  | ||||
| /** | ||||
|  * 客户案例对应文件管理Mapper接口 | ||||
|  * | ||||
|  * @author xiezhijun | ||||
|  * @date 2021-03-04 | ||||
|  */ | ||||
| public interface SysCustomerCaseFileMapper | ||||
| { | ||||
|     /** | ||||
|      * 查询客户案例对应文件管理 | ||||
|      * | ||||
|      * @param id 客户案例对应文件管理ID | ||||
|      * @return 客户案例对应文件管理 | ||||
|      */ | ||||
|     public SysCustomerCaseFile selectSysCustomerCaseFileById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户案例对应文件管理列表 | ||||
|      * | ||||
|      * @param sysCustomerCaseFile 客户案例对应文件管理 | ||||
|      * @return 客户案例对应文件管理集合 | ||||
|      */ | ||||
|     public List<SysCustomerCaseFile> selectSysCustomerCaseFileList(SysCustomerCaseFile sysCustomerCaseFile); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户案例对应文件管理 | ||||
|      * | ||||
|      * @param sysCustomerCaseFile 客户案例对应文件管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomerCaseFile(SysCustomerCaseFile sysCustomerCaseFile); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户案例对应文件管理 | ||||
|      * | ||||
|      * @param sysCustomerCaseFile 客户案例对应文件管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomerCaseFile(SysCustomerCaseFile sysCustomerCaseFile); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户案例对应文件管理 | ||||
|      * | ||||
|      * @param id 客户案例对应文件管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerCaseFileById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户案例对应文件管理 | ||||
|      * | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerCaseFileByIds(Long[] ids); | ||||
| } | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.stdiet.custom.mapper; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomerCase; | ||||
|  | ||||
| /** | ||||
|  * 客户案例管理Mapper接口 | ||||
|  * | ||||
|  * @author xiezhijun | ||||
|  * @date 2021-03-04 | ||||
|  */ | ||||
| public interface SysCustomerCaseMapper | ||||
| { | ||||
|     /** | ||||
|      * 查询客户案例管理 | ||||
|      * | ||||
|      * @param id 客户案例管理ID | ||||
|      * @return 客户案例管理 | ||||
|      */ | ||||
|     public SysCustomerCase selectSysCustomerCaseById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户案例管理列表 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 客户案例管理集合 | ||||
|      */ | ||||
|     public List<SysCustomerCase> selectSysCustomerCaseList(SysCustomerCase sysCustomerCase); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户案例管理 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomerCase(SysCustomerCase sysCustomerCase); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户案例管理 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomerCase(SysCustomerCase sysCustomerCase); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户案例管理 | ||||
|      * | ||||
|      * @param id 客户案例管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerCaseById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户案例管理 | ||||
|      * | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerCaseByIds(Long[] ids); | ||||
| } | ||||
| @@ -65,7 +65,7 @@ public interface SysOrderPauseMapper | ||||
|      * @param sysOrderPause | ||||
|      * @return | ||||
|      */ | ||||
|     int getCountByOrderIdAndPauseDate(SysOrderPause sysOrderPause); | ||||
|     int getCountByCusIdAndPauseDate(SysOrderPause sysOrderPause); | ||||
|  | ||||
|     /** | ||||
|      * 根据订单ID删除暂停记录 | ||||
|   | ||||
| @@ -0,0 +1,61 @@ | ||||
| package com.stdiet.custom.service; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.custom.domain.SysCustomerCase; | ||||
|  | ||||
| /** | ||||
|  * 客户案例管理Service接口 | ||||
|  * | ||||
|  * @author xiezhijun | ||||
|  * @date 2021-03-04 | ||||
|  */ | ||||
| public interface ISysCustomerCaseService { | ||||
|     /** | ||||
|      * 查询客户案例管理 | ||||
|      * | ||||
|      * @param id 客户案例管理ID | ||||
|      * @return 客户案例管理 | ||||
|      */ | ||||
|     public SysCustomerCase selectSysCustomerCaseById(Long id); | ||||
|  | ||||
|     /** | ||||
|      * 查询客户案例管理列表 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 客户案例管理集合 | ||||
|      */ | ||||
|     public List<SysCustomerCase> selectSysCustomerCaseList(SysCustomerCase sysCustomerCase); | ||||
|  | ||||
|     /** | ||||
|      * 新增客户案例管理 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int insertSysCustomerCase(SysCustomerCase sysCustomerCase); | ||||
|  | ||||
|     /** | ||||
|      * 修改客户案例管理 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int updateSysCustomerCase(SysCustomerCase sysCustomerCase); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户案例管理 | ||||
|      * | ||||
|      * @param ids 需要删除的客户案例管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerCaseByIds(Long[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除客户案例管理信息 | ||||
|      * | ||||
|      * @param id 客户案例管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteSysCustomerCaseById(Long id); | ||||
|  | ||||
| } | ||||
| @@ -64,7 +64,7 @@ public interface ISysOrderPauseService | ||||
|      * @param sysOrderPause | ||||
|      * @return | ||||
|      */ | ||||
|     int getCountByOrderIdAndPauseDate(SysOrderPause sysOrderPause); | ||||
|     int getCountByCusIdAndPauseDate(SysOrderPause sysOrderPause); | ||||
|  | ||||
|     /** | ||||
|      * 根据订单ID删除暂停记录 | ||||
|   | ||||
| @@ -0,0 +1,96 @@ | ||||
| package com.stdiet.custom.service.impl; | ||||
|  | ||||
| import java.util.List; | ||||
| import com.stdiet.common.utils.DateUtils; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.stdiet.custom.mapper.SysCustomerCaseMapper; | ||||
| import com.stdiet.custom.domain.SysCustomerCase; | ||||
| import com.stdiet.custom.service.ISysCustomerCaseService; | ||||
|  | ||||
| /** | ||||
|  * 客户案例管理Service业务层处理 | ||||
|  * | ||||
|  * @author xiezhijun | ||||
|  * @date 2021-03-04 | ||||
|  */ | ||||
| @Service | ||||
| public class SysCustomerCaseServiceImpl implements ISysCustomerCaseService | ||||
| { | ||||
|     @Autowired | ||||
|     private SysCustomerCaseMapper sysCustomerCaseMapper; | ||||
|  | ||||
|     /** | ||||
|      * 查询客户案例管理 | ||||
|      * | ||||
|      * @param id 客户案例管理ID | ||||
|      * @return 客户案例管理 | ||||
|      */ | ||||
|     @Override | ||||
|     public SysCustomerCase selectSysCustomerCaseById(Long id) | ||||
|     { | ||||
|         return sysCustomerCaseMapper.selectSysCustomerCaseById(id); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 查询客户案例管理列表 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 客户案例管理 | ||||
|      */ | ||||
|     @Override | ||||
|     public List<SysCustomerCase> selectSysCustomerCaseList(SysCustomerCase sysCustomerCase) | ||||
|     { | ||||
|         return sysCustomerCaseMapper.selectSysCustomerCaseList(sysCustomerCase); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增客户案例管理 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertSysCustomerCase(SysCustomerCase sysCustomerCase) | ||||
|     { | ||||
|         sysCustomerCase.setCreateTime(DateUtils.getNowDate()); | ||||
|         return sysCustomerCaseMapper.insertSysCustomerCase(sysCustomerCase); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改客户案例管理 | ||||
|      * | ||||
|      * @param sysCustomerCase 客户案例管理 | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateSysCustomerCase(SysCustomerCase sysCustomerCase) | ||||
|     { | ||||
|         sysCustomerCase.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return sysCustomerCaseMapper.updateSysCustomerCase(sysCustomerCase); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 批量删除客户案例管理 | ||||
|      * | ||||
|      * @param ids 需要删除的客户案例管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCustomerCaseByIds(Long[] ids) | ||||
|     { | ||||
|         return sysCustomerCaseMapper.deleteSysCustomerCaseByIds(ids); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除客户案例管理信息 | ||||
|      * | ||||
|      * @param id 客户案例管理ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteSysCustomerCaseById(Long id) | ||||
|     { | ||||
|         return sysCustomerCaseMapper.deleteSysCustomerCaseById(id); | ||||
|     } | ||||
| } | ||||
| @@ -126,8 +126,8 @@ public class SysOrderPauseServiceImpl implements ISysOrderPauseService | ||||
|      * @return | ||||
|      */ | ||||
|     @Override | ||||
|     public int getCountByOrderIdAndPauseDate(SysOrderPause sysOrderPause){ | ||||
|         return sysOrderPauseMapper.getCountByOrderIdAndPauseDate(sysOrderPause); | ||||
|     public int getCountByCusIdAndPauseDate(SysOrderPause sysOrderPause){ | ||||
|         return sysOrderPauseMapper.getCountByCusIdAndPauseDate(sysOrderPause); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|   | ||||
| @@ -0,0 +1,84 @@ | ||||
| <?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.stdiet.custom.mapper.SysCustomerCaseFileMapper"> | ||||
|  | ||||
|     <resultMap type="SysCustomerCaseFile" id="SysCustomerCaseFileResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="caseId"    column="case_id"    /> | ||||
|         <result property="fileUrl"    column="file_url"    /> | ||||
|         <result property="fileName"    column="file_name"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|         <result property="createBy"    column="create_by"    /> | ||||
|         <result property="updateTime"    column="update_time"    /> | ||||
|         <result property="updateBy"    column="update_by"    /> | ||||
|         <result property="delFlag"    column="del_flag"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysCustomerCaseFileVo"> | ||||
|         select id, case_id, file_url, file_name, create_time, create_by, update_time, update_by, del_flag from sys_customer_case_file | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSysCustomerCaseFileList" parameterType="SysCustomerCaseFile" resultMap="SysCustomerCaseFileResult"> | ||||
|         <include refid="selectSysCustomerCaseFileVo"/> | ||||
|         <where> | ||||
|         </where> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectSysCustomerCaseFileById" parameterType="Long" resultMap="SysCustomerCaseFileResult"> | ||||
|         <include refid="selectSysCustomerCaseFileVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysCustomerCaseFile" parameterType="SysCustomerCaseFile" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sys_customer_case_file | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="caseId != null">case_id,</if> | ||||
|             <if test="fileUrl != null">file_url,</if> | ||||
|             <if test="fileName != null">file_name,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|             <if test="createBy != null">create_by,</if> | ||||
|             <if test="updateTime != null">update_time,</if> | ||||
|             <if test="updateBy != null">update_by,</if> | ||||
|             <if test="delFlag != null">del_flag,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="caseId != null">#{caseId},</if> | ||||
|             <if test="fileUrl != null">#{fileUrl},</if> | ||||
|             <if test="fileName != null">#{fileName},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|             <if test="createBy != null">#{createBy},</if> | ||||
|             <if test="updateTime != null">#{updateTime},</if> | ||||
|             <if test="updateBy != null">#{updateBy},</if> | ||||
|             <if test="delFlag != null">#{delFlag},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSysCustomerCaseFile" parameterType="SysCustomerCaseFile"> | ||||
|         update sys_customer_case_file | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="caseId != null">case_id = #{caseId},</if> | ||||
|             <if test="fileUrl != null">file_url = #{fileUrl},</if> | ||||
|             <if test="fileName != null">file_name = #{fileName},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|             <if test="createBy != null">create_by = #{createBy},</if> | ||||
|             <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
|             <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
|             <if test="delFlag != null">del_flag = #{delFlag},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteSysCustomerCaseFileById" parameterType="Long"> | ||||
|         delete from sys_customer_case_file where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|     <delete id="deleteSysCustomerCaseFileByIds" parameterType="String"> | ||||
|         delete from sys_customer_case_file where id in | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </delete> | ||||
|  | ||||
| </mapper> | ||||
| @@ -0,0 +1,87 @@ | ||||
| <?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.stdiet.custom.mapper.SysCustomerCaseMapper"> | ||||
|  | ||||
|     <resultMap type="SysCustomerCase" id="SysCustomerCaseResult"> | ||||
|         <result property="id"    column="id"    /> | ||||
|         <result property="name"    column="name"    /> | ||||
|         <result property="keyword"    column="keyword"    /> | ||||
|         <result property="remark"    column="remark"    /> | ||||
|         <result property="customerId"    column="customer_id"    /> | ||||
|         <result property="createTime"    column="create_time"    /> | ||||
|         <result property="createBy"    column="create_by"    /> | ||||
|         <result property="updateTime"    column="update_time"    /> | ||||
|         <result property="updateBy"    column="update_by"    /> | ||||
|         <result property="delFlag"    column="del_flag"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectSysCustomerCaseVo"> | ||||
|         select id, name, keyword, remark, customer_id, create_time, create_by, update_time, update_by, del_flag from sys_customer_case | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectSysCustomerCaseList" parameterType="SysCustomerCase" resultMap="SysCustomerCaseResult"> | ||||
|         <include refid="selectSysCustomerCaseVo"/> where del_flag = 0  | ||||
|         <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectSysCustomerCaseById" parameterType="Long" resultMap="SysCustomerCaseResult"> | ||||
|         <include refid="selectSysCustomerCaseVo"/> | ||||
|         where id = #{id} and del_flag = 0 | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertSysCustomerCase" parameterType="SysCustomerCase" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into sys_customer_case | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="name != null">name,</if> | ||||
|             <if test="keyword != null">keyword,</if> | ||||
|             <if test="remark != null">remark,</if> | ||||
|             <if test="customerId != null">customer_id,</if> | ||||
|             <if test="createTime != null">create_time,</if> | ||||
|             <if test="createBy != null">create_by,</if> | ||||
|             <if test="updateTime != null">update_time,</if> | ||||
|             <if test="updateBy != null">update_by,</if> | ||||
|             <if test="delFlag != null">del_flag,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="name != null">#{name},</if> | ||||
|             <if test="keyword != null">#{keyword},</if> | ||||
|             <if test="remark != null">#{remark},</if> | ||||
|             <if test="customerId != null">#{customerId},</if> | ||||
|             <if test="createTime != null">#{createTime},</if> | ||||
|             <if test="createBy != null">#{createBy},</if> | ||||
|             <if test="updateTime != null">#{updateTime},</if> | ||||
|             <if test="updateBy != null">#{updateBy},</if> | ||||
|             <if test="delFlag != null">#{delFlag},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateSysCustomerCase" parameterType="SysCustomerCase"> | ||||
|         update sys_customer_case | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="name != null">name = #{name},</if> | ||||
|             <if test="keyword != null">keyword = #{keyword},</if> | ||||
|             <if test="remark != null">remark = #{remark},</if> | ||||
|             <if test="customerId != null">customer_id = #{customerId},</if> | ||||
|             <if test="createTime != null">create_time = #{createTime},</if> | ||||
|             <if test="createBy != null">create_by = #{createBy},</if> | ||||
|             <if test="updateTime != null">update_time = #{updateTime},</if> | ||||
|             <if test="updateBy != null">update_by = #{updateBy},</if> | ||||
|             <if test="delFlag != null">del_flag = #{delFlag},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <update id="deleteSysCustomerCaseById" parameterType="Long"> | ||||
|         update sys_customer_case set del_flag = 1 where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <update id="deleteSysCustomerCaseByIds" parameterType="String"> | ||||
|         update sys_customer_case set del_flag = 1 where id in | ||||
|         <foreach item="id" collection="array" open="(" separator="," close=")"> | ||||
|             #{id} | ||||
|         </foreach> | ||||
|     </update> | ||||
|  | ||||
| </mapper> | ||||
| @@ -106,9 +106,9 @@ | ||||
|         </foreach> | ||||
|     </update> | ||||
|  | ||||
|     <!-- 根据订单ID、时间范围查询数量 --> | ||||
|     <select id="getCountByOrderIdAndPauseDate" parameterType="SysOrderPause" resultType="int"> | ||||
|         select count(id) from sys_recipes_pause where del_flag = 0 and order_id = #{orderId} | ||||
|     <!-- 根据用户ID、时间范围查询数量 --> | ||||
|     <select id="getCountByCusIdAndPauseDate" parameterType="SysOrderPause" resultType="int"> | ||||
|         select count(id) from sys_recipes_pause where del_flag = 0 and cus_id = #{cusId} | ||||
|         AND (#{pauseStartDate} >= pause_start_date AND pause_end_date >= #{pauseStartDate} | ||||
|         OR #{pauseEndDate} >= pause_start_date AND pause_end_date >= #{pauseEndDate}) | ||||
|         <if test="id != null"> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user