去除 user 服务,对 product 服务的依赖。

目前 product 服务会报错,稍后修复
This commit is contained in:
YunaiV
2020-04-13 23:01:47 +08:00
parent 0761607bef
commit 4dc0e6aead
11 changed files with 13 additions and 17 deletions

View File

@@ -67,6 +67,8 @@ dubbo:
version: 1.0.0
ProductSpuCollectionService:
version: 1.0.0
UserProductSpuCollectionsService:
version: 1.0.0
# Seata 配置项
seata:

View File

@@ -0,0 +1,41 @@
<?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="cn.iocoder.mall.user.biz.dao.UserProductSpuCollectionsMapper">
<sql id="FIELDS">
id, user_id, nickname, spu_id, spu_name,
spu_image,sell_point,price, create_time, update_time,
deleted
</sql>
<select id="selectById" parameterType="Integer" resultType="cn.iocoder.mall.user.biz.dataobject.UserProductSpuCollectionsDO">
SELECT
<include refid="FIELDS" />
FROM user_spu_collections
WHERE id = #{id}
AND deleted = 0
</select>
<select id="selectListByUser" resultType="cn.iocoder.mall.user.biz.dataobject.UserProductSpuCollectionsDO">
SELECT
<include refid="FIELDS" />
FROM user_spu_collections
<where>
user_id = #{userId} AND deleted = 0
</where>
<if test="offset != null and limit != null">
LIMIT #{offset}, #{limit}
</if>
</select>
<select id="selectCountByUser" resultType="Integer">
SELECT
COUNT(1)
FROM user_spu_collections
<where>
user_id = #{userId} AND deleted = 0
</where>
</select>
</mapper>