Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
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
youjj
cloud-platform
Commits
12e1fab7
Commit
12e1fab7
authored
Dec 04, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-new-activity' into dev
parents
7a346571
9bc1feb6
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
145 additions
and
3 deletions
+145
-3
TicketCollectionRecord.java
...xxfc/platform/activity/entity/TicketCollectionRecord.java
+37
-0
TicketCollectionRecordBiz.java
...xxfc/platform/activity/biz/TicketCollectionRecordBiz.java
+49
-0
TicketCollectionRecordMapper.java
...latform/activity/mapper/TicketCollectionRecordMapper.java
+10
-0
ActivityPopularizeLogController.java
...atform/activity/rest/ActivityPopularizeLogController.java
+2
-0
TicketCollectionRecordController.java
...tform/activity/rest/TicketCollectionRecordController.java
+25
-0
generatorConfig.xml
...ity-server/src/main/resources/builder/generatorConfig.xml
+2
-2
ActivityPopularizeLogMapper.xml
...src/main/resources/mapper/ActivityPopularizeLogMapper.xml
+1
-1
TicketCollectionRecordMapper.xml
...rc/main/resources/mapper/TicketCollectionRecordMapper.xml
+19
-0
No files found.
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/TicketCollectionRecord.java
0 → 100644
View file @
12e1fab7
package
com
.
xxfc
.
platform
.
activity
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
java.util.Date
;
@Table
(
name
=
"ticket_collection_record"
)
@Data
public
class
TicketCollectionRecord
{
@Id
private
Integer
id
;
/**
* 领取人姓名
*/
private
String
name
;
/**
* 领取人手机号
*/
private
String
phone
;
@Column
(
name
=
"crt_time"
)
private
Date
crtTime
;
@Column
(
name
=
"upd_time"
)
private
Date
updTime
;
/**
* 门票类型
*/
private
Integer
type
;
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/TicketCollectionRecordBiz.java
0 → 100644
View file @
12e1fab7
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.entity.TicketCollectionRecord
;
import
com.xxfc.platform.activity.mapper.TicketCollectionRecordMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
@Service
@Slf4j
public
class
TicketCollectionRecordBiz
extends
BaseBiz
<
TicketCollectionRecordMapper
,
TicketCollectionRecord
>
{
public
ObjectRestResponse
<
List
<
TicketCollectionRecord
>>
selectAllByType
(
Integer
type
)
{
Integer
newType
=
type
==
null
?
1
:
type
;
List
<
TicketCollectionRecord
>
list
=
mapper
.
selectAllByType
(
new
TicketCollectionRecord
()
{{
setType
(
newType
);
}});
return
ObjectRestResponse
.
succ
(
list
);
}
public
ObjectRestResponse
add
(
TicketCollectionRecord
ticketCollectionRecord
)
{
if
(
ticketCollectionRecord
==
null
||
ticketCollectionRecord
.
getPhone
()
==
null
)
{
return
ObjectRestResponse
.
paramIsEmpty
();
}
if
(
ticketCollectionRecord
.
getType
()
==
null
){
ticketCollectionRecord
.
setType
(
1
);
}
TicketCollectionRecord
oldValue
=
selectByPhoneAndType
(
ticketCollectionRecord
.
getPhone
(),
ticketCollectionRecord
.
getType
());
if
(
oldValue
==
null
)
{
insertSelectiveRe
(
ticketCollectionRecord
);
}
else
{
BeanUtil
.
copyProperties
(
ticketCollectionRecord
,
oldValue
,
CopyOptions
.
create
().
setIgnoreNullValue
(
true
).
setIgnoreError
(
true
));
updateSelectiveByIdRe
(
oldValue
);
}
return
ObjectRestResponse
.
succ
();
}
public
TicketCollectionRecord
selectByPhoneAndType
(
String
phone
,
Integer
type
)
{
Example
example
=
new
Example
(
TicketCollectionRecord
.
class
);
example
.
createCriteria
().
andEqualTo
(
"phone"
,
phone
).
andEqualTo
(
"type"
,
type
);
return
mapper
.
selectOneByExample
(
example
);
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/mapper/TicketCollectionRecordMapper.java
0 → 100644
View file @
12e1fab7
package
com
.
xxfc
.
platform
.
activity
.
mapper
;
import
com.xxfc.platform.activity.entity.TicketCollectionRecord
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.util.List
;
public
interface
TicketCollectionRecordMapper
extends
Mapper
<
TicketCollectionRecord
>
{
List
<
TicketCollectionRecord
>
selectAllByType
(
TicketCollectionRecord
ticketCollectionRecord
);
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopularizeLogController.java
View file @
12e1fab7
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityPopularizeLogBiz
;
...
...
@@ -15,6 +16,7 @@ public class ActivityPopularizeLogController extends BaseController<ActivityPopu
@GetMapping
(
value
=
"/getByUser"
)
@IgnoreClientToken
@IgnoreUserToken
public
ObjectRestResponse
selectByUserId
(
Integer
popularizeId
)
{
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectByUserId
(
popularizeId
));
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/TicketCollectionRecordController.java
0 → 100644
View file @
12e1fab7
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.TicketCollectionRecordBiz
;
import
com.xxfc.platform.activity.entity.TicketCollectionRecord
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
value
=
"ticketCollection"
)
public
class
TicketCollectionRecordController
extends
BaseController
<
TicketCollectionRecordBiz
,
TicketCollectionRecord
>
{
@PostMapping
(
value
=
"/app/unauth/add"
)
public
ObjectRestResponse
add
(
@RequestBody
TicketCollectionRecord
ticketCollectionRecord
)
{
return
baseBiz
.
add
(
ticketCollectionRecord
);
}
@GetMapping
(
value
=
"/app/unauth/getAll"
)
public
ObjectRestResponse
<
List
<
TicketCollectionRecord
>>
getAll
(
Integer
type
)
{
return
baseBiz
.
selectAllByType
(
type
);
}
}
xx-activity/xx-activity-server/src/main/resources/builder/generatorConfig.xml
View file @
12e1fab7
...
...
@@ -15,7 +15,7 @@
</plugin>
<jdbcConnection
driverClass=
"com.mysql.jdbc.Driver"
connectionURL=
"jdbc:mysql://10.5.52.
4:3307
/xxfc_activity?useUnicode=true&characterEncoding=UTF8"
connectionURL=
"jdbc:mysql://10.5.52.
3:3306
/xxfc_activity?useUnicode=true&characterEncoding=UTF8"
userId=
"root"
password=
"sslcloud123*()"
>
</jdbcConnection>
...
...
@@ -26,6 +26,6 @@
<javaClientGenerator
targetPackage=
"${targetMapperPackage}"
targetProject=
"${targetJavaProject}"
type=
"XMLMAPPER"
/>
<table
tableName=
"
integral_user_status"
domainObjectName=
"IntegralUserStatus
"
></table>
<table
tableName=
"
ticket_collection_record"
domainObjectName=
"TicketCollectionRecord
"
></table>
</context>
</generatorConfiguration>
\ No newline at end of file
xx-activity/xx-activity-server/src/main/resources/mapper/ActivityPopularizeLogMapper.xml
View file @
12e1fab7
...
...
@@ -16,7 +16,7 @@
</resultMap>
<select
id=
"selectByUserId"
resultType=
"com.xxfc.platform.activity.entity.ActivityPopularizeLog"
parameterType=
"Map"
>
select * from activity_
popularize_log
where user_id = #{userId} and popularize_id = #{popularizeId}
select * from activity_
log_list
where user_id = #{userId} and popularize_id = #{popularizeId}
</select>
</mapper>
\ No newline at end of file
xx-activity/xx-activity-server/src/main/resources/mapper/TicketCollectionRecordMapper.xml
0 → 100644
View file @
12e1fab7
<?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.xxfc.platform.activity.mapper.TicketCollectionRecordMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.xxfc.platform.activity.entity.TicketCollectionRecord"
>
<!--
WARNING - @mbg.generated
-->
<id
column=
"id"
property=
"id"
jdbcType=
"INTEGER"
/>
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"phone"
property=
"phone"
jdbcType=
"VARCHAR"
/>
<result
column=
"crt_time"
property=
"crtTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"upd_time"
property=
"updTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"type"
property=
"type"
jdbcType=
"BIT"
/>
</resultMap>
<select
id=
"selectAllByType"
resultType=
"com.xxfc.platform.activity.entity.TicketCollectionRecord"
parameterType=
"com.xxfc.platform.activity.entity.TicketCollectionRecord"
>
select * from ticket_collection_record where type = #{type}
</select>
</mapper>
\ No newline at end of file
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