客户案例修改
This commit is contained in:
@ -20,6 +20,8 @@ public class SysCustomerCase extends BaseEntity
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
private Long[] ids;
|
||||
|
||||
/** 案例名称 */
|
||||
@Excel(name = "案例名称")
|
||||
private String name;
|
||||
@ -37,7 +39,7 @@ public class SysCustomerCase extends BaseEntity
|
||||
private String customerName;
|
||||
|
||||
//是否显示到微信小程序
|
||||
private Integer wxShow;
|
||||
private Boolean wxShow;
|
||||
|
||||
/** 删除标识 0未删除 1已删除,默认0 */
|
||||
private Long delFlag;
|
||||
|
@ -7,7 +7,7 @@ import java.util.List;
|
||||
@Data
|
||||
public class CustomerCaseResponse {
|
||||
|
||||
private Long id;
|
||||
private String id;
|
||||
|
||||
private String name;
|
||||
|
||||
@ -15,5 +15,7 @@ public class CustomerCaseResponse {
|
||||
|
||||
private String remark;
|
||||
|
||||
private Boolean wxShow;
|
||||
|
||||
private List<String> fileList;
|
||||
}
|
||||
|
@ -2,6 +2,8 @@ package com.stdiet.custom.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysCustomerCase;
|
||||
import com.stdiet.custom.dto.response.CustomerCaseResponse;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 客户案例管理Mapper接口
|
||||
@ -58,4 +60,19 @@ public interface SysCustomerCaseMapper
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysCustomerCaseByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 查询微信小程序上展示的客户案例
|
||||
* @param sysCustomerCase
|
||||
* @return
|
||||
*/
|
||||
public List<CustomerCaseResponse> getWxCustomerCaseList(SysCustomerCase sysCustomerCase);
|
||||
|
||||
/**
|
||||
* 更新微信展示状态
|
||||
* @param wxShow 是否展示 0不展示 1展示
|
||||
* @param ids id数组
|
||||
* @return
|
||||
*/
|
||||
public int updateWxShowByIds(@Param("wxShow")Integer wxShow, @Param("array") Long[] ids);
|
||||
}
|
@ -3,6 +3,7 @@ package com.stdiet.custom.service;
|
||||
import java.util.List;
|
||||
import com.stdiet.custom.domain.SysCustomerCase;
|
||||
import com.stdiet.custom.domain.SysCustomerCaseFile;
|
||||
import com.stdiet.custom.dto.response.CustomerCaseResponse;
|
||||
|
||||
/**
|
||||
* 客户案例管理Service接口
|
||||
@ -66,4 +67,19 @@ public interface ISysCustomerCaseService {
|
||||
*/
|
||||
List<SysCustomerCaseFile> getFileListByCaseId(Long caseId);
|
||||
|
||||
/**
|
||||
* 查询微信小程序上展示的客户案例
|
||||
* @param sysCustomerCase
|
||||
* @return
|
||||
*/
|
||||
List<CustomerCaseResponse> getWxCustomerCaseList(SysCustomerCase sysCustomerCase);
|
||||
|
||||
/**
|
||||
* 更新微信展示状态
|
||||
* @param wxShow 是否展示 0不展示 1展示
|
||||
* @param ids id数组
|
||||
* @return
|
||||
*/
|
||||
int updateWxShowByIds(Integer wxShow, Long[] ids);
|
||||
|
||||
}
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.stdiet.common.utils.DateUtils;
|
||||
import com.stdiet.custom.domain.SysCustomerCaseFile;
|
||||
import com.stdiet.custom.dto.response.CustomerCaseResponse;
|
||||
import com.stdiet.custom.mapper.SysCustomerCaseFileMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -154,7 +155,29 @@ public class SysCustomerCaseServiceImpl implements ISysCustomerCaseService
|
||||
* @param caseId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<SysCustomerCaseFile> getFileListByCaseId(Long caseId){
|
||||
return sysCustomerCaseFileMapper.selectSysCustomerCaseFileListByCaseId(caseId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询微信小程序上展示的客户案例
|
||||
* @param sysCustomerCase
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<CustomerCaseResponse> getWxCustomerCaseList(SysCustomerCase sysCustomerCase){
|
||||
return sysCustomerCaseMapper.getWxCustomerCaseList(sysCustomerCase);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新微信展示状态
|
||||
* @param wxShow 是否展示 0不展示 1展示
|
||||
* @param ids id数组
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public int updateWxShowByIds(Integer wxShow, Long[] ids){
|
||||
return sysCustomerCaseMapper.updateWxShowByIds(wxShow, ids);
|
||||
}
|
||||
}
|
@ -10,6 +10,7 @@
|
||||
<result property="keyword" column="keyword" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="customerId" column="customer_id" />
|
||||
<result property="wxShow" column="wx_show" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
@ -19,8 +20,16 @@
|
||||
<result property="customerName" column="customer_name"></result>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.stdiet.custom.dto.response.CustomerCaseResponse" id="SysCustomerCaseResponseResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="keyword" column="keyword" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="wxShow" column="wx_show" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysCustomerCaseVo">
|
||||
select id, name, keyword, remark, customer_id, create_time from sys_customer_case
|
||||
select id, name, keyword, remark, customer_id, wx_show, create_time from sys_customer_case
|
||||
</sql>
|
||||
|
||||
<sql id="searchKey">
|
||||
@ -34,7 +43,7 @@
|
||||
</sql>
|
||||
|
||||
<select id="selectSysCustomerCaseList" parameterType="SysCustomerCase" resultMap="SysCustomerCaseResult">
|
||||
select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.create_time,sc.name as customer_name from sys_customer_case scc
|
||||
select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.wx_show, scc.create_time,sc.name as customer_name from sys_customer_case scc
|
||||
left join sys_customer sc on sc.id = scc.customer_id and sc.del_flag = 0
|
||||
where scc.del_flag = 0
|
||||
<include refid="searchKey">
|
||||
@ -50,7 +59,7 @@
|
||||
</select>
|
||||
|
||||
<select id="selectSysCustomerCaseById" parameterType="Long" resultMap="SysCustomerCaseResult">
|
||||
select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.create_time,sc.name as customer_name from sys_customer_case scc
|
||||
select scc.id, scc.name, scc.keyword, scc.remark, scc.customer_id, scc.wx_show, scc.create_time,sc.name as customer_name from sys_customer_case scc
|
||||
left join sys_customer sc on sc.id = scc.customer_id and sc.del_flag = 0
|
||||
where scc.id = #{id} and scc.del_flag = 0
|
||||
</select>
|
||||
@ -62,6 +71,7 @@
|
||||
<if test="keyword != null">keyword,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="customerId != null">customer_id,</if>
|
||||
<if test="wxShow != null">wx_show,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
@ -73,6 +83,7 @@
|
||||
<if test="keyword != null">#{keyword},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="customerId != null">#{customerId},</if>
|
||||
<if test="wxShow != null">#{wxShow},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
@ -88,6 +99,7 @@
|
||||
<if test="keyword != null">keyword = #{keyword},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="customerId != null">customer_id = #{customerId},</if>
|
||||
<if test="wxShow != null">wx_show = #{wxShow},</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>
|
||||
@ -108,4 +120,22 @@
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<!-- 获取在微信小程序上展示的客户案例 -->
|
||||
<select id="getWxCustomerCaseList" parameterType="SysCustomerCase" resultMap="SysCustomerCaseResponseResult">
|
||||
select scc.id, scc.name, scc.keyword, scc.remark, scc.wx_show from sys_customer_case scc
|
||||
where scc.del_flag = 0 and scc.wx_show = 1
|
||||
<include refid="searchKey">
|
||||
<property name="keywordArray" value="#{keywordArray}"/>
|
||||
</include>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<!-- 更新是否在微信小程序上展示 -->
|
||||
<update id="updateWxShowByIds">
|
||||
update sys_customer_case set wx_show = #{wxShow} where del_flag = 0 and id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user