代码更新完善
parent
8831259af1
commit
7e79828244
@ -0,0 +1,14 @@
|
|||||||
|
package com.glxp.api.dao.auth;
|
||||||
|
import com.glxp.api.entity.auth.CustomerInfoEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Mapper
|
||||||
|
public interface CustomerInfoDao {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CustomerInfoEntity selectById(String customerId);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,13 @@
|
|||||||
|
package com.glxp.api.service.auth;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.CustomerInfoEntity;
|
||||||
|
|
||||||
|
|
||||||
|
public interface CustomerInfoService {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
CustomerInfoEntity selectById(String customerId);
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
package com.glxp.api.service.auth.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import com.glxp.api.dao.auth.CustomerInfoDao;
|
||||||
|
|
||||||
|
import com.glxp.api.entity.auth.CustomerInfoEntity;
|
||||||
|
|
||||||
|
import com.glxp.api.service.auth.CustomerInfoService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
|
||||||
|
@Service
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public class CustomerInfoServiceImpl implements CustomerInfoService {
|
||||||
|
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CustomerInfoDao customerInfoDao;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CustomerInfoEntity selectById(String customerId) {
|
||||||
|
return customerInfoDao.selectById(customerId);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,17 @@
|
|||||||
|
<?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.glxp.api.dao.auth.CustomerInfoDao">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="selectById" parameterType="java.lang.String"
|
||||||
|
resultType="com.glxp.api.entity.auth.CustomerInfoEntity">
|
||||||
|
SELECT *
|
||||||
|
FROM customer_info
|
||||||
|
WHERE (customerId = #{customerId}) limit 1
|
||||||
|
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue