Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
tjmdp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
other-project
tjmdp
Commits
eb713584
Commit
eb713584
authored
May 21, 2019
by
liuchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
df48e996
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
18 deletions
+18
-18
PointsController.java
src/main/java/com/qiankun/controller/PointsController.java
+4
-4
PointsTypeDao.java
src/main/java/com/qiankun/dao/PointsTypeDao.java
+2
-2
PointsTypeDaoImpl.java
src/main/java/com/qiankun/dao/PointsTypeDaoImpl.java
+2
-2
PointsType.java
src/main/java/com/qiankun/entity/PointsType.java
+1
-1
UserPoints.java
src/main/java/com/qiankun/entity/UserPoints.java
+3
-3
PointsService.java
src/main/java/com/qiankun/service/PointsService.java
+6
-6
No files found.
src/main/java/com/qiankun/controller/PointsController.java
View file @
eb713584
...
...
@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.servlet.ModelAndView
;
import
com.qiankun.controller.base.BaseController
;
import
com.qiankun.entity.Points
;
import
com.qiankun.entity.Points
Type
;
import
com.qiankun.service.PointsService
;
@Controller
...
...
@@ -31,7 +31,7 @@ public class PointsController extends BaseController<Object>{
@RequestMapping
(
"/points/type/add"
)
public
ModelAndView
typeAdd
(
String
id
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
Points
type
=
new
Points
();
Points
Type
type
=
new
PointsType
();
if
(
StringUtils
.
isNotBlank
(
id
))
{
type
=
pointsService
.
findById
(
id
);
}
...
...
@@ -42,10 +42,10 @@ public class PointsController extends BaseController<Object>{
}
@RequestMapping
(
"/points/type/save"
)
public
ModelAndView
saveType
(
Points
type
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
ModelAndView
saveType
(
Points
Type
type
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
ModelAndView
view
=
new
ModelAndView
();
if
(
StringUtils
.
isNotEmpty
(
type
.
getId
()))
{
Points
t
=
pointsService
.
findById
(
type
.
getId
());
Points
Type
t
=
pointsService
.
findById
(
type
.
getId
());
t
.
setAvailable
(
type
.
isAvailable
());
t
.
setId
(
type
.
getId
());
t
.
setName
(
type
.
getName
());
...
...
src/main/java/com/qiankun/dao/PointsTypeDao.java
View file @
eb713584
package
com
.
qiankun
.
dao
;
import
com.qiankun.dao.core.IDao
;
import
com.qiankun.entity.Points
;
import
com.qiankun.entity.Points
Type
;
public
interface
PointsTypeDao
extends
IDao
<
Points
,
String
>
{
public
interface
PointsTypeDao
extends
IDao
<
Points
Type
,
String
>
{
}
src/main/java/com/qiankun/dao/PointsTypeDaoImpl.java
View file @
eb713584
...
...
@@ -3,10 +3,10 @@ package com.qiankun.dao;
import
org.springframework.stereotype.Repository
;
import
com.qiankun.dao.core.AbsDao
;
import
com.qiankun.entity.Points
;
import
com.qiankun.entity.Points
Type
;
@Repository
public
class
PointsTypeDaoImpl
extends
AbsDao
<
Points
,
String
>
implements
PointsTypeDao
{
public
class
PointsTypeDaoImpl
extends
AbsDao
<
Points
Type
,
String
>
implements
PointsTypeDao
{
...
...
src/main/java/com/qiankun/entity/Points.java
→
src/main/java/com/qiankun/entity/Points
Type
.java
View file @
eb713584
...
...
@@ -13,7 +13,7 @@ import org.hibernate.annotations.GenericGenerator;
@Entity
@Cache
(
usage
=
CacheConcurrencyStrategy
.
READ_WRITE
)
@Inheritance
(
strategy
=
InheritanceType
.
TABLE_PER_CLASS
)
public
class
Points
{
public
class
Points
Type
{
@Id
@GenericGenerator
(
name
=
"systemUUID"
,
strategy
=
"uuid2"
)
...
...
src/main/java/com/qiankun/entity/UserPoints.java
View file @
eb713584
...
...
@@ -24,7 +24,7 @@ public class UserPoints {
private
String
id
;
@ManyToOne
private
Points
type
=
new
Points
();
//积分类别
private
Points
Type
type
=
new
PointsType
();
//积分类别
private
Long
point
;
//积分
...
...
@@ -41,11 +41,11 @@ public class UserPoints {
this
.
id
=
id
;
}
public
Points
getType
()
{
public
Points
Type
getType
()
{
return
type
;
}
public
void
setType
(
Points
type
)
{
public
void
setType
(
Points
Type
type
)
{
this
.
type
=
type
;
}
...
...
src/main/java/com/qiankun/service/PointsService.java
View file @
eb713584
...
...
@@ -7,7 +7,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
com.qiankun.dao.PointsTypeDao
;
import
com.qiankun.entity.Points
;
import
com.qiankun.entity.Points
Type
;
@Service
public
class
PointsService
{
...
...
@@ -15,14 +15,14 @@ public class PointsService {
@Autowired
private
PointsTypeDao
typeDao
;
public
Points
findById
(
String
id
)
{
Points
type
=
typeDao
.
find
(
id
);
public
Points
Type
findById
(
String
id
)
{
Points
Type
type
=
typeDao
.
find
(
id
);
return
type
;
}
@Transactional
public
Points
saveType
(
Points
type
)
{
public
Points
Type
saveType
(
PointsType
type
)
{
return
typeDao
.
save
(
type
);
}
...
...
@@ -32,8 +32,8 @@ public class PointsService {
}
public
List
<
Points
>
findAllType
()
{
List
<
Points
>
list
=
typeDao
.
findAll
();
public
List
<
Points
Type
>
findAllType
()
{
List
<
Points
Type
>
list
=
typeDao
.
findAll
();
return
list
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment