查找加盟商接口,改造跟进日志接口
This commit is contained in:
@@ -2,6 +2,7 @@ package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.LineFollowLogDO;
|
||||
import com.cool.store.entity.LineInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.mapper.LineFollowLogMapper;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@@ -24,9 +25,9 @@ public class LineFollowLogDAO {
|
||||
@Resource
|
||||
private LineFollowLogMapper lineFollowLogMapper;
|
||||
|
||||
public Page<LineFollowLogDO> getFollowLogPage(Long lineId, Integer pageNum, Integer pageSize){
|
||||
public Page<LineFollowLogDO> getFollowLogPage(Long lineId, Integer pageNum, Integer pageSize,Integer type){
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
return lineFollowLogMapper.getFollowLogPage(lineId);
|
||||
return lineFollowLogMapper.getFollowLogPage(lineId,type);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -37,11 +38,19 @@ public class LineFollowLogDAO {
|
||||
* @param message
|
||||
* @return
|
||||
*/
|
||||
public Long addFollowLog(LineInfoDO lineInfo, String operateUserId, String operateUsername, String message){
|
||||
public Long addFollowLog(LineInfoDO lineInfo,String operateUserId, String operateUsername, String message,Integer type){
|
||||
if(Objects.isNull(lineInfo)){
|
||||
return null;
|
||||
}
|
||||
LineFollowLogDO followLog = new LineFollowLogDO(lineInfo.getPartnerId(), lineInfo.getId(), operateUserId, operateUsername, lineInfo.getWorkflowStage(), lineInfo.getWorkflowSubStage(), lineInfo.getWorkflowSubStageStatus(), message);
|
||||
LineFollowLogDO followLog = new LineFollowLogDO(lineInfo.getPartnerId(), lineInfo.getId(), operateUserId, operateUsername, lineInfo.getWorkflowStage(), lineInfo.getWorkflowSubStage(), lineInfo.getWorkflowSubStageStatus(), message,type);
|
||||
lineFollowLogMapper.insertSelective(followLog);
|
||||
return followLog.getId();
|
||||
}
|
||||
public Long addFollowLogByShop(ShopInfoDO shopInfoDO, String operateUserId, String operateUsername, String message,Integer type){
|
||||
if(Objects.isNull(shopInfoDO)){
|
||||
return null;
|
||||
}
|
||||
LineFollowLogDO followLog = new LineFollowLogDO(shopInfoDO.getPartnerId(), shopInfoDO.getId(), operateUserId, operateUsername,null,null,null, message,type);
|
||||
lineFollowLogMapper.insertSelective(followLog);
|
||||
return followLog.getId();
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.cool.store.request.PartnerRequest;
|
||||
import com.cool.store.request.PointLinePageRequest;
|
||||
import com.cool.store.request.PublicLineListRequest;
|
||||
import com.cool.store.utils.RandomEightCharCodeUtils;
|
||||
import com.cool.store.vo.LineVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -26,6 +27,7 @@ import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
@@ -198,4 +200,8 @@ public class LineInfoDAO {
|
||||
}
|
||||
return lineInfoMapper.batchUpdateInvestmentManager(lineIds, status, investmentManager,regionId);
|
||||
}
|
||||
|
||||
public List<LineVO> getLines(String keyword){
|
||||
return lineInfoMapper.getLinesByKeyword(keyword);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,5 +12,5 @@ public interface LineFollowLogMapper extends Mapper<LineFollowLogDO> {
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
Page<LineFollowLogDO> getFollowLogPage(@Param("lineId")Long lineId);
|
||||
Page<LineFollowLogDO> getFollowLogPage(@Param("lineId")Long lineId,@Param("type")Integer type);
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import com.cool.store.request.LineListRequest;
|
||||
import com.cool.store.request.PartnerRequest;
|
||||
import com.cool.store.request.PointLinePageRequest;
|
||||
import com.cool.store.request.PublicLineListRequest;
|
||||
import com.cool.store.vo.LineVO;
|
||||
import com.github.pagehelper.Page;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
@@ -125,4 +126,6 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
Integer batchUpdateInvestmentManager(@Param("lineIds") List<Long> lineIds,
|
||||
@Param("status") Integer status,
|
||||
@Param("investmentManager") String investmentManager, @Param("regionId") Long regionId);
|
||||
|
||||
List<LineVO> getLinesByKeyword(@Param("keyword") String keyword);
|
||||
}
|
||||
@@ -14,14 +14,15 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="type" jdbcType="TINYINT" property="type"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="getFollowLogPage" resultMap="BaseResultMap">
|
||||
select
|
||||
id, partner_id, line_id, operate_user_id, operate_username, workflow_stage, workflow_sub_stage, workflow_sub_stage_status, message, create_time
|
||||
id, partner_id, line_id, operate_user_id, operate_username, workflow_stage, workflow_sub_stage, workflow_sub_stage_status, message, create_time,type
|
||||
from
|
||||
xfsg_line_follow_log
|
||||
where
|
||||
line_id = #{lineId} and deleted = '0' order by create_time desc
|
||||
line_id = #{lineId} and deleted = '0' and type = #{type} order by create_time desc
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -588,6 +588,19 @@
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getLinesByKeyword" resultType="com.cool.store.vo.LineVO">
|
||||
select
|
||||
id as lineId,
|
||||
username,
|
||||
mobile
|
||||
from xfsg_line_info
|
||||
where workflow_sub_stage_status >= 45
|
||||
<if test="keyword !=null and keyword != ''">
|
||||
and (mobile like CONCAT('%', #{keyword} ,'%')
|
||||
or username like CONCAT('%', #{keyword} ,'%'))
|
||||
</if>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
|
||||
<update id="batchUpdateInvestmentManager">
|
||||
|
||||
Reference in New Issue
Block a user