Skip to content
切换导航面板
项目
群组
代码片段
帮助
zhangtai
/
zzhnc
当前项目
正在载入...
登录
切换导航面板
转到一个项目
项目
版本库
问题
0
合并请求
0
流水线
维基
设置
活动
图像
图表
创建新的问题
作业
提交
问题看板
文件
提交
分支
标签
贡献者
图像
比较
图表
Commit 2a114a53
由
zxt@theyeasy.com
编写于
Dec 29, 2017
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
update 空指针异常
1 个父辈
1af58920
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
9 行增加
和
9 行删除
src/com/w1hd/zzhnc/model/Prize.java
src/com/w1hd/zzhnc/service/GoodsService.java
src/com/w1hd/zzhnc/model/Prize.java
查看文件 @
2a114a5
...
...
@@ -15,7 +15,7 @@ public class Prize implements Serializable {
private
Integer
id
;
private
String
name
;
private
Integer
num
;
private
Integer
num
=
0
;
private
Boolean
isMoney
;
private
Integer
probability
;
private
Integer
mixMoney
;
...
...
@@ -72,16 +72,16 @@ public class Prize implements Serializable {
}
public
Integer
getNum
()
{
if
(
num
==
0
||
num
==
null
)
{
return
0
;
}
if
(
null
!=
num
)
return
num
;
else
return
0
;
}
public
void
setNum
(
Integer
num
)
{
if
(
num
<
0
)
{
if
(
num
<
0
)
{
this
.
num
=
0
;
}
else
{
}
else
{
this
.
num
=
num
;
}
...
...
@@ -103,5 +103,4 @@ public class Prize implements Serializable {
this
.
deleted
=
deleted
;
}
}
\ No newline at end of file
src/com/w1hd/zzhnc/service/GoodsService.java
查看文件 @
2a114a5
...
...
@@ -29,8 +29,9 @@ public class GoodsService {
public
List
<
Goods
>
getHomeData
()
{
Example
ex
=
new
Example
(
Goods
.
class
);
ex
.
createCriteria
().
andEqualTo
(
"deleted"
,
false
).
andEqualTo
(
"isHome"
,
true
);
RowBounds
r
=
new
RowBounds
(
0
,
5
);
return
goodsDao
.
selectByExampleAndRowBounds
(
ex
,
r
);
ex
.
setOrderByClause
(
"pageViews desc"
);
RowBounds
r
=
new
RowBounds
(
0
,
10
);
return
goodsDao
.
selectByExample
(
ex
);
}
@SuppressWarnings
(
"unchecked"
)
...
...
编写
预览
Markdown
格式
附加文件
你添加了
0
人
到此讨论。请谨慎行事。
请先完成此消息的编辑!
取消
请
注册
或
登录
后发表评论