8 changed files with 93 additions and 19 deletions
@ -1,12 +1,11 @@ |
|||||
package cc.hiver.mall.shoprelations.mapper; |
package cc.hiver.mall.shoprelations.mapper; |
||||
|
|
||||
import cc.hiver.mall.shoprelations.entity.ShopRelations; |
import cc.hiver.mall.shoprelations.entity.ShopRelations; |
||||
import cc.hiver.mall.shoprelations.vo.ShopRelationsVo; |
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import org.apache.ibatis.annotations.Param; |
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
import java.util.List; |
import java.util.List; |
||||
|
|
||||
public interface ShopRelationsMapper extends BaseMapper<ShopRelations> { |
public interface ShopRelationsMapper extends BaseMapper<ShopRelations> { |
||||
List<ShopRelationsVo> getShopRelations(@Param("shopId") String shopId); |
List<ShopRelations> getShopRelations(@Param("shopId") String shopId); |
||||
} |
} |
||||
|
|||||
@ -0,0 +1,38 @@ |
|||||
|
<?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="cc.hiver.mall.shoprelations.mapper.ShopRelationsMapper"> |
||||
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.shoprelations.entity.ShopRelations"> |
||||
|
<id column="id" jdbcType="VARCHAR" property="id" /> |
||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
||||
|
<result column="create_by_name" jdbcType="VARCHAR" property="createByName" /> |
||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
||||
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
||||
|
<result column="group_name" jdbcType="VARCHAR" property="groupName" /> |
||||
|
<result column="shop_owner_id" jdbcType="VARCHAR" property="shopOwnerId" /> |
||||
|
<result column="shop_owner_name" jdbcType="VARCHAR" property="shopOwnerName" /> |
||||
|
<result column="shop_id" jdbcType="VARCHAR" property="shopId" /> |
||||
|
<result column="shop_name" jdbcType="VARCHAR" property="shopName" /> |
||||
|
|
||||
|
|
||||
|
</resultMap> |
||||
|
<sql id="Base_Column_List"> |
||||
|
id, create_by,create_by_name, create_time, del_flag, update_by, update_time, |
||||
|
group_name,shop_owner_id, shop_owner_name,shop_id,shop_name |
||||
|
</sql> |
||||
|
<insert id="insert" parameterType="cc.hiver.mall.shoprelations.entity.ShopRelations"> |
||||
|
insert into t_shop_relations (id, create_by, create_by_name, create_time, del_flag, update_by, update_time, |
||||
|
group_name,shop_owner_id, shop_owner_name,shop_id,shop_name) |
||||
|
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createByName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
||||
|
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
#{groupName,jdbcType=VARCHAR},#{shopOwnerId,jdbcType=VARCHAR},#{shopOwnerName,jdbcType=VARCHAR}, |
||||
|
#{shopId,jdbcType=VARCHAR},#{shopName,jdbcType=VARCHAR}) |
||||
|
</insert> |
||||
|
<select id="getShopRelations" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_shop_relations |
||||
|
where shop_id like concat('%',#{shopId},'%') |
||||
|
</select> |
||||
|
</mapper> |
||||
Loading…
Reference in new issue