Commit 68b4909c authored by lixiaolei's avatar lixiaolei

submit

parent 0cecd994
...@@ -27,6 +27,24 @@ public class BusinessFollowRecordController extends BaseController ...@@ -27,6 +27,24 @@ public class BusinessFollowRecordController extends BaseController
/**
* 查询关联项目
*/
@GetMapping("/relate/project/{userId}")
public AjaxResult selectRelateProject(@PathVariable("userId") Integer userId)
{
return success(businessFollowRecordService.selectRelateProject(userId));
}
/**
* 查询关联业主企业
*/
@GetMapping("/relate/company/{userId}")
public AjaxResult selectRelateCompany(@PathVariable("userId") Integer userId)
{
return success(businessFollowRecordService.selectRelateCompany(userId));
}
/** /**
* 新增项目跟进记录 * 新增项目跟进记录
*/ */
......
...@@ -14,6 +14,21 @@ import java.util.List; ...@@ -14,6 +14,21 @@ import java.util.List;
*/ */
public interface BusinessFollowRecordMapper public interface BusinessFollowRecordMapper
{ {
/**
* 查询关联项目
* @param userId
* @return
*/
List<String> selectRelateProject (Integer userId);
/**
* 查询关联业主企业
* @param userId
* @return
*/
List<String> selectRelateCompany (Integer userId);
/** /**
* 查询项目跟进记录 * 查询项目跟进记录
* *
......
...@@ -54,6 +54,20 @@ public interface IBusinessFollowRecordService ...@@ -54,6 +54,20 @@ public interface IBusinessFollowRecordService
*/ */
public int insertBusinessFollowRecord(BusinessFollowRecord businessFollowRecord); public int insertBusinessFollowRecord(BusinessFollowRecord businessFollowRecord);
/**
* 查询关联项目
* @param userId
* @return
*/
List<String> selectRelateProject (Integer userId);
/**
* 查询关联业主企业
* @param userId
* @return
*/
List<String> selectRelateCompany (Integer userId);
/** /**
* 修改项目跟进记录 * 修改项目跟进记录
* *
......
...@@ -71,6 +71,16 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer ...@@ -71,6 +71,16 @@ public class BusinessFollowRecordServiceImpl implements IBusinessFollowRecordSer
return businessFollowRecordMapper.insertBusinessFollowRecord(businessFollowRecord); return businessFollowRecordMapper.insertBusinessFollowRecord(businessFollowRecord);
} }
@Override
public List<String> selectRelateProject(Integer userId) {
return businessFollowRecordMapper.selectRelateProject(userId);
}
@Override
public List<String> selectRelateCompany(Integer userId) {
return businessFollowRecordMapper.selectRelateCompany(userId);
}
/** /**
* 修改项目跟进记录 * 修改项目跟进记录
* *
......
...@@ -87,6 +87,18 @@ ...@@ -87,6 +87,18 @@
</where> </where>
ORDER BY f.creat_time DESC ORDER BY f.creat_time DESC
</select> </select>
<select id="selectRelateProject" resultType="java.lang.String">
select i.project_name
from business_info i
left join business_follow_record f on f.business_id = i.id
where f.user_id = #{userId}
</select>
<select id="selectRelateCompany" resultType="java.lang.String">
select i.construction_unit
from business_info i
left join business_follow_record f on f.business_id = i.id
where f.user_id = #{userId}
</select>
<insert id="insertBusinessFollowRecord" parameterType="com.dsk.common.core.domain.entity.BusinessFollowRecord" useGeneratedKeys="true" <insert id="insertBusinessFollowRecord" parameterType="com.dsk.common.core.domain.entity.BusinessFollowRecord" useGeneratedKeys="true"
keyProperty="id"> keyProperty="id">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment