Commit a1f6a04a authored by lcl's avatar lcl

数据验证接口

parent 4c16ba73
package com.dsk.system.domain.customer.vo;
import lombok.Data;
import java.io.Serializable;
/**
* 客户状态列表
*
* @author lcl
* @create 2023/5/22
*/
@Data
public class CustomerStatusListVo implements Serializable {
/**
* 客户id
*/
private String customerId;
/**
* 城投id
*/
private String uipId;
}
...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; ...@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dsk.system.domain.customer.Customer; import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.dto.CustomerSearchDto; import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerListVo; import com.dsk.system.domain.customer.vo.CustomerListVo;
import com.dsk.system.domain.customer.vo.CustomerStatusListVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -23,7 +24,9 @@ public interface CustomerMapper extends BaseMapper<Customer> { ...@@ -23,7 +24,9 @@ public interface CustomerMapper extends BaseMapper<Customer> {
List<Customer> selectUserList(Long userId); List<Customer> selectUserList(Long userId);
Customer selectByCompanyNameAndUserId(@Param("companyName")String companyName,@Param("userId")Long userId); Customer selectByCompanyNameAndUserId(@Param("companyName") String companyName, @Param("userId") Long userId);
List<CustomerStatusListVo> selectStatusList(@Param("uipIds") List<String> uipIds, @Param("userId") Long userId);
} }
...@@ -5,6 +5,7 @@ import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto; ...@@ -5,6 +5,7 @@ import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.dto.CustomerSearchDto; import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo; import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.customer.vo.CustomerListVo; import com.dsk.system.domain.customer.vo.CustomerListVo;
import com.dsk.system.domain.customer.vo.CustomerStatusListVo;
import com.dsk.system.domain.customer.vo.CustomerVo; import com.dsk.system.domain.customer.vo.CustomerVo;
import java.util.List; import java.util.List;
...@@ -29,4 +30,6 @@ public interface ICustomerService { ...@@ -29,4 +30,6 @@ public interface ICustomerService {
List<CustomerBusinessListVo> selectBusinessList(CustomerBusinessSearchDto dto); List<CustomerBusinessListVo> selectBusinessList(CustomerBusinessSearchDto dto);
List<CustomerStatusListVo> selectStatusList(List<String> uipIds);
} }
...@@ -13,6 +13,7 @@ import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto; ...@@ -13,6 +13,7 @@ import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.dto.CustomerSearchDto; import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.domain.customer.vo.CustomerBusinessListVo; import com.dsk.system.domain.customer.vo.CustomerBusinessListVo;
import com.dsk.system.domain.customer.vo.CustomerListVo; import com.dsk.system.domain.customer.vo.CustomerListVo;
import com.dsk.system.domain.customer.vo.CustomerStatusListVo;
import com.dsk.system.domain.customer.vo.CustomerVo; import com.dsk.system.domain.customer.vo.CustomerVo;
import com.dsk.system.dskService.EnterpriseService; import com.dsk.system.dskService.EnterpriseService;
import com.dsk.system.mapper.CustomerMapper; import com.dsk.system.mapper.CustomerMapper;
...@@ -123,4 +124,9 @@ public class CustomerServiceImpl implements ICustomerService { ...@@ -123,4 +124,9 @@ public class CustomerServiceImpl implements ICustomerService {
return businessInfoService.selectCustomerBusinessList(dto); return businessInfoService.selectCustomerBusinessList(dto);
} }
@Override
public List<CustomerStatusListVo> selectStatusList(List<String> uipIds) {
return baseMapper.selectStatusList(uipIds, SecurityUtils.getUserId());
}
} }
...@@ -37,5 +37,16 @@ ...@@ -37,5 +37,16 @@
where ct.company_name = #{companyName} and ctu.user_id = #{userId} where ct.company_name = #{companyName} and ctu.user_id = #{userId}
</select> </select>
<select id="selectStatusList" resultType="com.dsk.system.domain.customer.vo.CustomerStatusListVo">
select
ct.customer_id, ct.uip_id
from customer ct
join customer_user ctu on ct.customer_id = ctu.customer_id
where ctu.user_id = #{userId} and ct.uip_id in
<foreach collection="uipIds" item="uipId" open="(" separator="," close=",">
#{uipId}
</foreach>
</select>
</mapper> </mapper>
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