Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
fde3f807
提交
fde3f807
authored
10月 27, 2019
作者:
luojie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修改优惠券字段
上级
bab214c4
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
21 行增加
和
27 行删除
+21
-27
TbCfUserInfoServiceImpl.java
...zion/chinafrica/service/impl/TbCfUserInfoServiceImpl.java
+4
-10
TbCfCommentsInfoDao.xml
src/main/resources/mapper/TbCfCommentsInfoDao.xml
+7
-7
TbCfCommentsReplyDao.xml
src/main/resources/mapper/TbCfCommentsReplyDao.xml
+6
-6
TbCfCouponDao.xml
src/main/resources/mapper/TbCfCouponDao.xml
+3
-3
TbCfStoreDao.xml
src/main/resources/mapper/TbCfStoreDao.xml
+1
-1
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfUserInfoServiceImpl.java
浏览文件 @
fde3f807
...
...
@@ -154,6 +154,9 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
String
password
=
passwordEncoder
.
encode
(
tbCfUserInfoVo
.
getPassword
());
tbCfUserInfoVo
.
setPassword
(
password
);
BeanUtils
.
copyProperties
(
tbCfUserInfoVo
,
tbCfUserInfoEntity
);
//赠送用户优惠券
String
couponId
=
tbCfCouponDao
.
getCouponId
();
tbCfUserInfoVo
.
setCouponId
(
couponId
);
tbCfUserInfoDao
.
save
(
tbCfUserInfoEntity
);
//注册成功 创建token
...
...
@@ -163,21 +166,12 @@ public class TbCfUserInfoServiceImpl implements TbCfUserInfoService {
tokenManager
.
addToken
(
token
,
tbCfUserInfoVo
);
result
.
setMessage
(
ResultCodeEnum
.
SUCCESS
.
getDesc
());
result
.
setData
(
tbCfUserInfoVo
);
//赠送用户优惠券
String
couponId
=
tbCfCouponDao
.
getCouponId
();
tbCfUserInfoVo
.
setCouponId
(
couponId
);
//获取购物返券
List
<
TbCfCouponEntity
>
couponList
=
tbCfCouponDao
.
getCouponByCategory
(
CouponCategoryEnum
.
REGISTER
.
getValue
(),
new
Date
());
if
(!
couponList
.
isEmpty
())
{
//领取优惠券
tbCfCouponService
.
takeCoupon
(
couponList
.
get
(
0
).
getCouponId
(),
tbCfUserInfoVo
.
getUserId
());
}
}
else
{
result
.
setCode
(
ResultCodeEnum
.
VALIDATE_ERROR
.
getCode
());
result
.
setMessage
(
"The mailbox or nick has been registered"
);
}
tbCfUserInfoVo
.
setEnableFlag
(
StateConstant
.
VALID
);
}
return
result
;
}
...
...
src/main/resources/mapper/TbCfCommentsInfoDao.xml
浏览文件 @
fde3f807
<?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.
platform
.dao.TbCfCommentsInfoDao"
>
<mapper
namespace=
"com.
diaoyun.zion.chinafrica
.dao.TbCfCommentsInfoDao"
>
<resultMap
type=
"com.
platform
.entity.TbCfCommentsInfoEntity"
id=
"tbCfCommentsInfoMap"
>
<resultMap
type=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsInfoEntity"
id=
"tbCfCommentsInfoMap"
>
<result
property=
"commentId"
column=
"comment_id"
/>
<result
property=
"commentOwnerId"
column=
"comment_owner_id"
/>
<result
property=
"commentFromId"
column=
"comment_from_id"
/>
<result
property=
"commentFromId"
column=
"comment_from_id"
/>
<result
property=
"commentFromName"
column=
"comment_from_name"
/>
<result
property=
"commentFromAvatar"
column=
"comment_from_avatar"
/>
<result
property=
"likeNum"
column=
"like_num"
/>
...
...
@@ -15,7 +15,7 @@
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.
platform
.entity.TbCfCommentsInfoEntity"
>
<select
id=
"queryObject"
resultType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsInfoEntity"
>
select
`comment_id`,
`comment_owner_id`,
...
...
@@ -30,7 +30,7 @@
where comment_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.
platform
.entity.TbCfCommentsInfoEntity"
>
<select
id=
"queryList"
resultType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsInfoEntity"
>
select
`comment_id`,
`comment_owner_id`,
...
...
@@ -67,7 +67,7 @@
</if>
</select>
<insert
id=
"save"
parameterType=
"com.
platform
.entity.TbCfCommentsInfoEntity"
>
<insert
id=
"save"
parameterType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsInfoEntity"
>
insert into tb_cf_comments_info(
`comment_id`,
`comment_owner_id`,
...
...
@@ -90,7 +90,7 @@
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.
platform
.entity.TbCfCommentsInfoEntity"
>
<update
id=
"update"
parameterType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsInfoEntity"
>
update tb_cf_comments_info
<set>
<if
test=
"commentOwnerId != null"
>
`comment_owner_id` = #{commentOwnerId},
</if>
...
...
src/main/resources/mapper/TbCfCommentsReplyDao.xml
浏览文件 @
fde3f807
<?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.
platform
.dao.TbCfCommentsReplyDao"
>
<mapper
namespace=
"com.
diaoyun.zion.chinafrica
.dao.TbCfCommentsReplyDao"
>
<resultMap
type=
"com.
platform
.entity.TbCfCommentsReplyEntity"
id=
"tbCfCommentsReplyMap"
>
<resultMap
type=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsReplyEntity"
id=
"tbCfCommentsReplyMap"
>
<result
property=
"commentsId"
column=
"comments_id"
/>
<result
property=
"commentId"
column=
"comment_id"
/>
<result
property=
"commentFromId"
column=
"comment_from_id"
/>
...
...
@@ -17,7 +17,7 @@
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.
platform
.entity.TbCfCommentsReplyEntity"
>
<select
id=
"queryObject"
resultType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsReplyEntity"
>
select
`comments_id`,
`comment_id`,
...
...
@@ -34,7 +34,7 @@
where comments_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.
platform
.entity.TbCfCommentsReplyEntity"
>
<select
id=
"queryList"
resultType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsReplyEntity"
>
select
`comments_id`,
`comment_id`,
...
...
@@ -73,7 +73,7 @@
</if>
</select>
<insert
id=
"save"
parameterType=
"com.
platform
.entity.TbCfCommentsReplyEntity"
>
<insert
id=
"save"
parameterType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsReplyEntity"
>
insert into tb_cf_comments_reply(
`comments_id`,
`comment_id`,
...
...
@@ -100,7 +100,7 @@
#{updateTime})
</insert>
<update
id=
"update"
parameterType=
"com.
platform
.entity.TbCfCommentsReplyEntity"
>
<update
id=
"update"
parameterType=
"com.
diaoyun.zion.chinafrica
.entity.TbCfCommentsReplyEntity"
>
update tb_cf_comments_reply
<set>
<if
test=
"commentId != null"
>
`comment_id` = #{commentId},
</if>
...
...
src/main/resources/mapper/TbCfCouponDao.xml
浏览文件 @
fde3f807
...
...
@@ -5,7 +5,7 @@
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfCouponEntity"
id=
"tbCfCouponMap"
>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"couponCategoryId"
column=
"coupon_category_
name
"
/>
<result
property=
"couponCategoryId"
column=
"coupon_category_
id
"
/>
<result
property=
"couponUse"
column=
"coupon_use"
/>
<result
property=
"couponTitle"
column=
"coupon_title"
/>
<result
property=
"couponIcon"
column=
"coupon_icon"
/>
...
...
@@ -188,7 +188,7 @@
<!--查询用户所有有效的优惠券-->
<select
id=
"queryUserAvailableCoupon"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfCouponEntity"
>
select DISTINCT t2.* from tb_cf_take_coupon t1,tb_cf_coupon t2,tb_cf_issue_coupon t3 ,tb_cf_user_info t4
where
where
(t1.user_id=#{userId} or t3.user_id=#{userId} or t4.user_id=#{userId})
and t1.coupon_id=t2.coupon_id and t2.coupon_id=t3.coupon_id or t2.coupon_id=t4.coupon_id
and
<![CDATA[ t2.valid_start_time<=#{nowTime}]]>
and
<![CDATA[t2.valid_end_time>=#{nowTime}]]>
and t2.status=1
...
...
@@ -205,7 +205,7 @@
select t2.* from tb_cf_take_coupon t1,tb_cf_coupon t2 ,tb_cf_issue_coupon t3 ,tb_cf_user_info t4
where (t1.user_id=#{userId} and t1.coupon_id=t2.coupon_id and t2.coupon_id=t3.coupon_id)
and t1.enable_flag=0 and t3.enable_flag=0
</select>
</select>
<!--获取已过期的优惠券-->
<select
id=
"queryUserExpiredoupon"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfCouponEntity"
>
select t2.* from tb_cf_take_coupon t1,tb_cf_coupon t2 ,tb_cf_issue_coupon t3 where t1.user_id=#{userId} and t1.coupon_id=t2.coupon_id and t1.coupon_id=t2.coupon_id and t2.coupon_id=t3.coupon_id
...
...
src/main/resources/mapper/TbCfStoreDao.xml
浏览文件 @
fde3f807
...
...
@@ -133,7 +133,7 @@
</delete>
<!--获取店铺独立站-->
<select
id=
"getStoreStationList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfStoreEntity"
>
select * from tb_cf_store where enable_flag
=1
order by create_time desc
select * from tb_cf_store where enable_flag
!=0
order by create_time desc
</select>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论