forked from luyan/epmet-cloud-lingshan
8 changed files with 123 additions and 5 deletions
@ -0,0 +1,16 @@ |
|||
package com.epmet.dataaggre.dao.opercrm; |
|||
|
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/4/13 10:43 |
|||
*/ |
|||
@Mapper |
|||
public interface CustomerRelationDao { |
|||
List<String> selectUsedAreaCodeList(String areaCode); |
|||
} |
|||
@ -0,0 +1,13 @@ |
|||
package com.epmet.dataaggre.service.opercrm; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/4/13 10:38 |
|||
*/ |
|||
public interface CustomerRelation { |
|||
List<String> selectUsedAreaCodeList(String areaCode); |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
package com.epmet.dataaggre.service.opercrm.impl; |
|||
|
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.dataaggre.constant.DataSourceConstant; |
|||
import com.epmet.dataaggre.dao.opercrm.CustomerRelationDao; |
|||
import com.epmet.dataaggre.service.opercrm.CustomerRelation; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/4/13 10:38 |
|||
*/ |
|||
@DataSource(DataSourceConstant.OPER_CRM) |
|||
@Slf4j |
|||
@Service |
|||
public class CustomerRelationImpl implements CustomerRelation { |
|||
@Autowired |
|||
private CustomerRelationDao customerRelationDao; |
|||
|
|||
@Override |
|||
public List<String> selectUsedAreaCodeList(String areaCode) { |
|||
return customerRelationDao.selectUsedAreaCodeList(areaCode); |
|||
} |
|||
} |
|||
@ -0,0 +1,16 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
|
|||
<mapper namespace="com.epmet.dataaggre.dao.opercrm.CustomerRelationDao"> |
|||
|
|||
<select id="selectUsedAreaCodeList" parameterType="java.lang.String" resultType="java.lang.String"> |
|||
SELECT |
|||
cr.AREA_CODE |
|||
FROM |
|||
customer_relation cr |
|||
WHERE |
|||
cr.DEL_FLAG = '0' |
|||
AND cr.AREA_CODE LIKE concat(#{areaCode}, '%') |
|||
AND cr.AREA_CODE != #{areaCode} |
|||
</select> |
|||
</mapper> |
|||
Loading…
Reference in new issue