商机管理
This commit is contained in:
@@ -122,7 +122,7 @@ public class OaBusinessController extends BaseController {
|
||||
public TableDataInfo<OaBusiness> getBusinessByCustomerId(@PathVariable Long customerId, PageQuery pageQuery){
|
||||
return iOaBusinessService.getBusinessByCustomerId(customerId,pageQuery);
|
||||
}
|
||||
@Log(title = "CRM 商机", businessType = BusinessType.DELETE)
|
||||
@Log(title = "CRM 商机", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping
|
||||
public R<Void> deleteBusiness(@RequestParam Long businessId){
|
||||
iOaBusinessService.deleteBusiness(businessId);
|
||||
|
||||
@@ -2,13 +2,12 @@ package com.ruoyi.oa.mapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.ruoyi.oa.domain.OaBusiness;
|
||||
import com.ruoyi.oa.domain.bo.OaBusinessBo;
|
||||
import com.ruoyi.oa.domain.bo.SysOaProjectBo;
|
||||
import com.ruoyi.oa.domain.vo.OaBusinessVo;
|
||||
import com.ruoyi.common.core.mapper.BaseMapperPlus;
|
||||
import com.ruoyi.oa.domain.vo.OaProductVo;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@@ -28,8 +27,7 @@ public interface OaBusinessMapper extends BaseMapperPlus<OaBusinessMapper, OaBus
|
||||
|
||||
|
||||
Page<OaBusinessVo> getBusinessByCustomerId(Long customerId);
|
||||
@Delete( "delete from oa_business where business_id=#{businessId}"
|
||||
)
|
||||
|
||||
void deleteBusinessById(Long businessId);
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.ruoyi.oa.service;
|
||||
|
||||
|
||||
import com.ruoyi.oa.domain.OaBusiness;
|
||||
import com.ruoyi.oa.domain.vo.OaBusinessVo;
|
||||
import com.ruoyi.oa.domain.bo.OaBusinessBo;
|
||||
@@ -55,11 +54,6 @@ public interface IOaBusinessService {
|
||||
*/
|
||||
TableDataInfo<OaProductVo> getBusinessProducts(OaBusinessBo bo);
|
||||
|
||||
|
||||
/**
|
||||
* 查询CRM 批量商机
|
||||
*/
|
||||
List<OaBusinessVo> queryByIds(Collection<Long> list);
|
||||
TableDataInfo<OaBusiness> getBusinessByCustomerId(Long customerId, PageQuery pageQuery);
|
||||
|
||||
void deleteBusiness(Long businessId);
|
||||
|
||||
@@ -35,6 +35,7 @@ import java.util.Collection;
|
||||
public class OaBusinessServiceImpl implements IOaBusinessService {
|
||||
|
||||
private final OaBusinessMapper baseMapper;
|
||||
|
||||
private final OaBusinessProductMapper oaBusinessProductMapper;
|
||||
|
||||
/**
|
||||
@@ -51,8 +52,9 @@ public class OaBusinessServiceImpl implements IOaBusinessService {
|
||||
@Override
|
||||
public TableDataInfo<OaBusinessVo> queryPageList(OaBusinessBo bo, PageQuery pageQuery) {
|
||||
LambdaQueryWrapper<OaBusiness> lqw = buildQueryWrapper(bo);
|
||||
Page<OaBusinessVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(result);
|
||||
List<OaBusinessVo> oaBusiness= queryList(bo);
|
||||
// Page<OaBusinessVo> result = baseMapper.selectVoPage(pageQuery.build(), lqw);
|
||||
return TableDataInfo.build(oaBusiness);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,17 +138,6 @@ public class OaBusinessServiceImpl implements IOaBusinessService {
|
||||
return TableDataInfo.build(baseMapper.getBusinessProducts(bo,queryWrapper));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询CRM 批量商机
|
||||
*/
|
||||
@Override
|
||||
public List<OaBusinessVo> queryByIds(Collection<Long> list) {
|
||||
if (list == null || list.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return baseMapper.selectVoList(new LambdaQueryWrapper<OaBusiness>().in(OaBusiness::getBusinessId, list));
|
||||
}
|
||||
|
||||
@Override
|
||||
public TableDataInfo<OaBusiness> getBusinessByCustomerId(Long customerId,PageQuery pageQuery) {
|
||||
List<OaBusiness> list = buildQueryByCustomerId(customerId);
|
||||
|
||||
@@ -27,6 +27,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="endRemark" column="end_remark"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
<update id="setFollow">
|
||||
update oa_business set follow_up_status = 1 where business_id=#{businessId}
|
||||
</update>
|
||||
<delete id="deleteBusinessById">
|
||||
delete from oa_business
|
||||
<where>business_id=#{businessId}</where>
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="getBusinessProducts" resultType="com.ruoyi.oa.domain.vo.OaProductVo">
|
||||
@@ -36,15 +43,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
left join oa_product op on obp.product_id = op.product_id
|
||||
${ew.getCustomSqlSegment}
|
||||
</select>
|
||||
<update id="setFollow">
|
||||
update oa_business set follow_up_status = 1 where business_id=#{businessId}
|
||||
</update>
|
||||
|
||||
<select id="getBusinessByCustomerId" resultType="com.ruoyi.oa.domain.vo.OaBusinessVo">
|
||||
select * from oa_business
|
||||
<where >
|
||||
customerId=#{customerId}
|
||||
</where>
|
||||
<where >
|
||||
customerId=#{customerId}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteByBusinessId">
|
||||
delete from oa_business_product where business_id = #{businessId}
|
||||
</delete>
|
||||
|
||||
Reference in New Issue
Block a user