Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
Z
zion
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
1
合并请求
1
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
zhengfg
zion
Commits
7f64a5ff
提交
7f64a5ff
authored
1月 10, 2020
作者:
zgy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
商品详情显示邮费
上级
d09eb45b
显示空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
205 行增加
和
4 行删除
+205
-4
KeyConstant.java
...ava/com/diaoyun/zion/chinafrica/constant/KeyConstant.java
+3
-1
ShopifyController.java
...diaoyun/zion/chinafrica/controller/ShopifyController.java
+2
-2
TbCfDescripitonDao.java
...a/com/diaoyun/zion/chinafrica/dao/TbCfDescripitonDao.java
+17
-0
TbCfDescripitonEntity.java
...diaoyun/zion/chinafrica/entity/TbCfDescripitonEntity.java
+54
-1
TbCfStationItemServiceImpl.java
...n/chinafrica/service/impl/TbCfStationItemServiceImpl.java
+9
-0
TbCfDescripitonDao.xml
src/main/resources/mapper/TbCfDescripitonDao.xml
+120
-0
没有找到文件。
src/main/java/com/diaoyun/zion/chinafrica/constant/KeyConstant.java
浏览文件 @
7f64a5ff
...
@@ -49,6 +49,8 @@ public class KeyConstant {
...
@@ -49,6 +49,8 @@ public class KeyConstant {
//点赞
//点赞
public
final
static
String
GIVE_LIKE
=
"give_like"
;
public
final
static
String
GIVE_LIKE
=
"give_like"
;
public
final
static
String
YES
=
"yes"
;
public
final
static
String
YES
=
"yes"
;
public
final
static
String
POSTAGE
=
"0"
;
}
}
src/main/java/com/diaoyun/zion/chinafrica/controller/ShopifyController.java
浏览文件 @
7f64a5ff
...
@@ -94,7 +94,7 @@ public class ShopifyController {
...
@@ -94,7 +94,7 @@ public class ShopifyController {
@ApiOperation
(
value
=
"查询商品评论"
)
@ApiOperation
(
value
=
"查询商品评论"
)
@GetMapping
(
"/querylastcomment"
)
@GetMapping
(
"/querylastcomment"
)
public
Result
queryLastComment
(
@ApiParam
(
"商品ID"
)
@RequestParam
(
value
=
"itemId"
)
String
itemId
,
public
Result
queryLastComment
(
@ApiParam
(
"商品ID"
)
@RequestParam
(
value
=
"itemId"
)
String
itemId
,
@ApiParam
(
"
商品
ID"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
{
@ApiParam
(
"
用户
ID"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
{
return
tbCfItemCommentService
.
queryLastComment
(
itemId
,
userId
);
return
tbCfItemCommentService
.
queryLastComment
(
itemId
,
userId
);
}
}
...
@@ -112,7 +112,7 @@ public class ShopifyController {
...
@@ -112,7 +112,7 @@ public class ShopifyController {
public
Result
queryComments
(
@ApiParam
(
"商品ID"
)
@RequestParam
(
value
=
"itemId"
)
String
itemId
,
public
Result
queryComments
(
@ApiParam
(
"商品ID"
)
@RequestParam
(
value
=
"itemId"
)
String
itemId
,
@ApiParam
(
value
=
"页数 默认1"
)
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@ApiParam
(
value
=
"页数 默认1"
)
@RequestParam
(
value
=
"pageNum"
,
defaultValue
=
"1"
)
Integer
pageNum
,
@ApiParam
(
value
=
"每页大小 默认10"
)
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
@ApiParam
(
value
=
"每页大小 默认10"
)
@RequestParam
(
value
=
"pageSize"
,
defaultValue
=
"10"
)
Integer
pageSize
,
@ApiParam
(
"
商品
ID"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
{
@ApiParam
(
"
用户
ID"
)
@RequestParam
(
value
=
"userId"
,
required
=
false
)
String
userId
)
{
return
tbCfItemCommentService
.
querycomments
(
itemId
,
pageNum
,
pageSize
,
userId
);
return
tbCfItemCommentService
.
querycomments
(
itemId
,
pageNum
,
pageSize
,
userId
);
}
}
...
...
src/main/java/com/diaoyun/zion/chinafrica/dao/TbCfDescripitonDao.java
0 → 100644
浏览文件 @
7f64a5ff
package
com
.
diaoyun
.
zion
.
chinafrica
.
dao
;
import
com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity
;
import
com.diaoyun.zion.master.dao.BaseDao
;
/**
* Dao
*
* @author lipengjun
* @date 2020-01-10 11:01:40
*/
public
interface
TbCfDescripitonDao
extends
BaseDao
<
TbCfDescripitonEntity
>
{
TbCfDescripitonEntity
queryPostage
(
String
itemId
);
}
src/main/java/com/diaoyun/zion/chinafrica/entity/TbCfDescripitonEntity.java
浏览文件 @
7f64a5ff
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
package
com
.
diaoyun
.
zion
.
chinafrica
.
entity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
/**
* 实体
* 实体
* 表名 tb_cf_descripiton
* 表名 tb_cf_descripiton
*
*
* @author lipengjun
* @author lipengjun
* @date 20
19-10-16 11:32:22
* @date 20
20-01-10 11:01:40
*/
*/
public
class
TbCfDescripitonEntity
implements
Serializable
{
public
class
TbCfDescripitonEntity
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
...
@@ -32,6 +34,18 @@ public class TbCfDescripitonEntity implements Serializable {
...
@@ -32,6 +34,18 @@ public class TbCfDescripitonEntity implements Serializable {
* 二级分类Id
* 二级分类Id
*/
*/
private
String
goodstwotypeId
;
private
String
goodstwotypeId
;
/**
* 品名图片
*/
private
String
image
;
/**
* 单件邮费
*/
private
BigDecimal
postage
;
/**
* 续件邮费
*/
private
BigDecimal
morePostage
;
/**
/**
* 设置:品名Id
* 设置:品名Id
...
@@ -98,4 +112,43 @@ public class TbCfDescripitonEntity implements Serializable {
...
@@ -98,4 +112,43 @@ public class TbCfDescripitonEntity implements Serializable {
public
String
getGoodstwotypeId
()
{
public
String
getGoodstwotypeId
()
{
return
goodstwotypeId
;
return
goodstwotypeId
;
}
}
/**
* 设置:品名图片
*/
public
void
setImage
(
String
image
)
{
this
.
image
=
image
;
}
/**
* 获取:品名图片
*/
public
String
getImage
()
{
return
image
;
}
/**
* 设置:单件邮费
*/
public
void
setPostage
(
BigDecimal
postage
)
{
this
.
postage
=
postage
;
}
/**
* 获取:单件邮费
*/
public
BigDecimal
getPostage
()
{
return
postage
;
}
/**
* 设置:续件邮费
*/
public
void
setMorePostage
(
BigDecimal
morePostage
)
{
this
.
morePostage
=
morePostage
;
}
/**
* 获取:续件邮费
*/
public
BigDecimal
getMorePostage
()
{
return
morePostage
;
}
}
}
src/main/java/com/diaoyun/zion/chinafrica/service/impl/TbCfStationItemServiceImpl.java
浏览文件 @
7f64a5ff
...
@@ -54,6 +54,9 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
...
@@ -54,6 +54,9 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
@Autowired
@Autowired
private
TbCfItemCommentDao
tbCfItemCommentDao
;
private
TbCfItemCommentDao
tbCfItemCommentDao
;
@Autowired
private
TbCfDescripitonDao
tbCfDescripitonDao
;
@Override
@Override
public
TbCfStationItemEntity
queryObject
(
String
itemId
)
{
public
TbCfStationItemEntity
queryObject
(
String
itemId
)
{
return
tbCfStationItemDao
.
queryObject
(
itemId
);
return
tbCfStationItemDao
.
queryObject
(
itemId
);
...
@@ -147,6 +150,12 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
...
@@ -147,6 +150,12 @@ public class TbCfStationItemServiceImpl implements TbCfStationItemService {
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
boolean
collection
=
false
;
boolean
collection
=
false
;
try
{
try
{
//商品邮费
TbCfDescripitonEntity
postage
=
tbCfDescripitonDao
.
queryPostage
(
itemId
);
map
.
put
(
"postage"
,
KeyConstant
.
POSTAGE
);
if
(
postage
!=
null
)
{
map
.
put
(
"postage"
,
postage
.
getPostage
().
toString
());
}
//判断商品是否被收藏
//判断商品是否被收藏
if
(!
StringUtils
.
isBlank
(
userId
))
{
if
(!
StringUtils
.
isBlank
(
userId
))
{
TbCfItemCollectionEntity
isCollection
=
tbCfItemCollectionDao
.
queryIsCollection
(
userId
,
itemId
);
TbCfItemCollectionEntity
isCollection
=
tbCfItemCollectionDao
.
queryIsCollection
(
userId
,
itemId
);
...
...
src/main/resources/mapper/TbCfDescripitonDao.xml
0 → 100644
浏览文件 @
7f64a5ff
<?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.diaoyun.zion.chinafrica.dao.TbCfDescripitonDao"
>
<resultMap
type=
"com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity"
id=
"tbCfDescripitonMap"
>
<result
property=
"descripitionId"
column=
"descripition_id"
/>
<result
property=
"descripitionName"
column=
"descripition_name"
/>
<result
property=
"descripitionCode"
column=
"descripition_code"
/>
<result
property=
"goodstypeId"
column=
"goodstype_id"
/>
<result
property=
"goodstwotypeId"
column=
"goodstwotype_id"
/>
<result
property=
"image"
column=
"image"
/>
<result
property=
"postage"
column=
"postage"
/>
<result
property=
"morePostage"
column=
"more_postage"
/>
</resultMap>
<select
id=
"queryObject"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity"
>
select
`descripition_id`,
`descripition_name`,
`descripition_code`,
`goodstype_id`,
`goodstwotype_id`,
`image`,
`postage`,
`more_postage`
from tb_cf_descripiton
where descripition_id = #{id}
</select>
<select
id=
"queryList"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity"
>
select
`descripition_id`,
`descripition_name`,
`descripition_code`,
`goodstype_id`,
`goodstwotype_id`,
`image`,
`postage`,
`more_postage`
from tb_cf_descripiton
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
<choose>
<when
test=
"sidx != null and sidx.trim() != ''"
>
order by ${sidx} ${order}
</when>
<otherwise>
order by descripition_id desc
</otherwise>
</choose>
<if
test=
"offset != null and limit != null"
>
limit #{offset}, #{limit}
</if>
</select>
<select
id=
"queryPostage"
resultType=
"com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity"
>
SELECT
*
FROM
tb_cf_descripiton
WHERE
descripition_id = ( SELECT item_descrition_id FROM tb_cf_station_item WHERE item_id = #{itemId} )
</select>
<select
id=
"queryTotal"
resultType=
"int"
>
select count(*) from tb_cf_descripiton
WHERE 1=1
<if
test=
"name != null and name.trim() != ''"
>
AND name LIKE concat('%',#{name},'%')
</if>
</select>
<insert
id=
"save"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity"
>
insert into tb_cf_descripiton(
`descripition_id`,
`descripition_name`,
`descripition_code`,
`goodstype_id`,
`goodstwotype_id`,
`image`,
`postage`,
`more_postage`)
values(
#{descripitionId},
#{descripitionName},
#{descripitionCode},
#{goodstypeId},
#{goodstwotypeId},
#{image},
#{postage},
#{morePostage})
</insert>
<update
id=
"update"
parameterType=
"com.diaoyun.zion.chinafrica.entity.TbCfDescripitonEntity"
>
update tb_cf_descripiton
<set>
<if
test=
"descripitionName != null"
>
`descripition_name` = #{descripitionName},
</if>
<if
test=
"descripitionCode != null"
>
`descripition_code` = #{descripitionCode},
</if>
<if
test=
"goodstypeId != null"
>
`goodstype_id` = #{goodstypeId},
</if>
<if
test=
"goodstwotypeId != null"
>
`goodstwotype_id` = #{goodstwotypeId},
</if>
<if
test=
"image != null"
>
`image` = #{image},
</if>
<if
test=
"postage != null"
>
`postage` = #{postage},
</if>
<if
test=
"morePostage != null"
>
`more_postage` = #{morePostage}
</if>
</set>
where descripition_id = #{descripitionId}
</update>
<delete
id=
"delete"
>
delete from tb_cf_descripiton where descripition_id = #{value}
</delete>
<delete
id=
"deleteBatch"
>
delete from tb_cf_descripiton where descripition_id in
<foreach
item=
"descripitionId"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{descripitionId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论