Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
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
base_platform_enterprise
gic-platform-enterprise
Commits
ab76ffef
Commit
ab76ffef
authored
Jan 06, 2020
by
陶光胜
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
二维码
parent
09601d41
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
113 additions
and
31 deletions
+113
-31
QrCodeValueDTO.java
.../src/main/java/com/gic/enterprise/dto/QrCodeValueDTO.java
+26
-0
QrcodeDTO.java
...e-api/src/main/java/com/gic/enterprise/dto/QrcodeDTO.java
+12
-0
QrCodeApiService.java
...ain/java/com/gic/enterprise/service/QrCodeApiService.java
+5
-4
TabQrcodeDownload.java
...ain/java/com/gic/enterprise/entity/TabQrcodeDownload.java
+14
-0
QrCodeService.java
...c/main/java/com/gic/enterprise/service/QrCodeService.java
+2
-0
QrCodeServiceImpl.java
...va/com/gic/enterprise/service/impl/QrCodeServiceImpl.java
+6
-0
QrCodeApiServiceImpl.java
...c/enterprise/service/outer/impl/QrCodeApiServiceImpl.java
+19
-4
TabQrcodeDownloadMapper.xml
...ice/src/main/resources/mapper/TabQrcodeDownloadMapper.xml
+29
-23
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/QrCodeValueDTO.java
0 → 100644
View file @
ab76ffef
package
com
.
gic
.
enterprise
.
dto
;
import
java.io.Serializable
;
public
class
QrCodeValueDTO
implements
Serializable
{
/**二维码类型,1门店 2导购**/
private
Integer
qrCodeType
;
private
String
value
;
public
Integer
getQrCodeType
()
{
return
qrCodeType
;
}
public
void
setQrCodeType
(
Integer
qrCodeType
)
{
this
.
qrCodeType
=
qrCodeType
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/QrcodeDTO.java
View file @
ab76ffef
...
...
@@ -17,6 +17,10 @@ public class QrcodeDTO implements Serializable {
private
String
callBackService
;
private
String
callBackMethod
;
private
String
fileId
;
/**
* 二维码类型;1门店, 2导购
*/
private
Integer
qrCodeType
;
public
Integer
getH5
()
{
return
h5
;
...
...
@@ -113,4 +117,12 @@ public class QrcodeDTO implements Serializable {
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
;
}
public
Integer
getQrCodeType
()
{
return
qrCodeType
;
}
public
void
setQrCodeType
(
Integer
qrCodeType
)
{
this
.
qrCodeType
=
qrCodeType
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/QrCodeApiService.java
View file @
ab76ffef
...
...
@@ -2,10 +2,7 @@ package com.gic.enterprise.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.dto.QrcodeDTO
;
import
com.gic.enterprise.dto.QrcodeScenesClassifyDTO
;
import
com.gic.enterprise.dto.QrcodeScenesDTO
;
import
com.gic.enterprise.dto.QrcodeScenesValueDTO
;
import
com.gic.enterprise.dto.*
;
import
java.util.List
;
...
...
@@ -105,4 +102,8 @@ public interface QrCodeApiService {
ServiceResponse
<
Integer
>
deleteQrcodeScenesValue
(
Integer
valueId
);
ServiceResponse
<
Integer
>
saveQrcodeDownload
(
QrcodeDTO
qrcodeDTO
);
ServiceResponse
<
QrcodeDTO
>
getQrcodeDownload
(
Integer
id
);
ServiceResponse
<
QrCodeValueDTO
>
getQrCodeValueById
(
String
id
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabQrcodeDownload.java
View file @
ab76ffef
...
...
@@ -86,6 +86,11 @@ public class TabQrcodeDownload {
*/
private
String
fileId
;
/**
* 二维码类型;1门店, 2导购
*/
private
Integer
qrCodeType
;
public
Integer
getId
()
{
return
id
;
}
...
...
@@ -213,4 +218,12 @@ public class TabQrcodeDownload {
public
void
setFileId
(
String
fileId
)
{
this
.
fileId
=
fileId
;
}
public
Integer
getQrCodeType
()
{
return
qrCodeType
;
}
public
void
setQrCodeType
(
Integer
qrCodeType
)
{
this
.
qrCodeType
=
qrCodeType
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/QrCodeService.java
View file @
ab76ffef
...
...
@@ -37,4 +37,6 @@ public interface QrCodeService {
int
deleteQrcodeScenesValue
(
Integer
valueId
);
int
saveQrcodeDownload
(
TabQrcodeDownload
qrcodeDownload
);
TabQrcodeDownload
getQrcodeDownload
(
Integer
id
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/QrCodeServiceImpl.java
View file @
ab76ffef
...
...
@@ -125,4 +125,10 @@ public class QrCodeServiceImpl implements QrCodeService {
this
.
tabQrcodeDownloadMapper
.
insertSelective
(
qrcodeDownload
);
return
qrcodeDownload
.
getId
();
}
@Override
public
TabQrcodeDownload
getQrcodeDownload
(
Integer
id
)
{
TabQrcodeDownload
tabQrcodeDownload
=
this
.
tabQrcodeDownloadMapper
.
selectByPrimaryKey
(
id
);
return
tabQrcodeDownload
;
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/QrCodeApiServiceImpl.java
View file @
ab76ffef
...
...
@@ -5,10 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.dto.QrcodeDTO
;
import
com.gic.enterprise.dto.QrcodeScenesClassifyDTO
;
import
com.gic.enterprise.dto.QrcodeScenesDTO
;
import
com.gic.enterprise.dto.QrcodeScenesValueDTO
;
import
com.gic.enterprise.dto.*
;
import
com.gic.enterprise.entity.TabQrcodeDownload
;
import
com.gic.enterprise.entity.TabQrcodeScenes
;
import
com.gic.enterprise.entity.TabQrcodeScenesClassify
;
...
...
@@ -149,4 +146,22 @@ public class QrCodeApiServiceImpl implements QrCodeApiService {
int
i
=
this
.
qrCodeService
.
saveQrcodeDownload
(
EntityUtil
.
changeEntityByJSON
(
TabQrcodeDownload
.
class
,
qrcodeDTO
));
return
ServiceResponse
.
success
(
i
);
}
@Override
public
ServiceResponse
<
QrcodeDTO
>
getQrcodeDownload
(
Integer
id
)
{
TabQrcodeDownload
qrcodeDownload
=
this
.
qrCodeService
.
getQrcodeDownload
(
id
);
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityByJSON
(
QrcodeDTO
.
class
,
qrcodeDownload
));
}
@Override
public
ServiceResponse
<
QrCodeValueDTO
>
getQrCodeValueById
(
String
id
)
{
TabQrcodeDownload
qrcodeDownload
=
this
.
qrCodeService
.
getQrcodeDownload
(
Integer
.
valueOf
(
id
));
if
(
qrcodeDownload
!=
null
){
QrCodeValueDTO
qrCodeValueDTO
=
new
QrCodeValueDTO
();
qrCodeValueDTO
.
setQrCodeType
(
qrcodeDownload
.
getQrCodeType
());
qrCodeValueDTO
.
setValue
(
qrcodeDownload
.
getCustomParams
());
return
ServiceResponse
.
success
(
qrCodeValueDTO
);
}
return
ServiceResponse
.
success
();
}
}
gic-platform-enterprise-service/src/main/resources/mapper/TabQrcodeDownloadMapper.xml
View file @
ab76ffef
...
...
@@ -18,14 +18,15 @@
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"file_id"
jdbcType=
"VARCHAR"
property=
"fileId"
/>
<result
column=
"qr_code_type"
jdbcType=
"INTEGER"
property=
"qrCodeType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, enterprise_id, h5, applet_ids, fwh_ids, scenes_value_ids, type, end_time, content,
custom_params, call_back_service, call_back_method, status, create_time, update_time,
file_id
id, enterprise_id, h5, applet_ids, fwh_ids, scenes_value_ids, type, end_time, content,
custom_params, call_back_service, call_back_method, status, create_time, update_time,
file_id
, qr_code_type
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
select
<include
refid=
"Base_Column_List"
/>
from tab_qrcode_download
where id = #{id,jdbcType=INTEGER}
...
...
@@ -35,26 +36,20 @@
where id = #{id,jdbcType=INTEGER}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.enterprise.entity.TabQrcodeDownload"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_qrcode_download (id, enterprise_id, h5,
applet_ids, fwh_ids, scenes_value_ids,
type, end_time, content,
custom_params, call_back_service, call_back_method,
status, create_time, update_time,
file_id)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{h5,jdbcType=INTEGER},
#{appletIds,jdbcType=VARCHAR}, #{fwhIds,jdbcType=VARCHAR}, #{scenesValueIds,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{endTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR},
#{customParams,jdbcType=VARCHAR}, #{callBackService,jdbcType=VARCHAR}, #{callBackMethod,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{fileId,jdbcType=VARCHAR})
insert into tab_qrcode_download (id, enterprise_id, h5,
applet_ids, fwh_ids, scenes_value_ids,
type, end_time, content,
custom_params, call_back_service, call_back_method,
status, create_time, update_time,
file_id, qr_code_type)
values (#{id,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{h5,jdbcType=INTEGER},
#{appletIds,jdbcType=VARCHAR}, #{fwhIds,jdbcType=VARCHAR}, #{scenesValueIds,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{endTime,jdbcType=TIMESTAMP}, #{content,jdbcType=VARCHAR},
#{customParams,jdbcType=VARCHAR}, #{callBackService,jdbcType=VARCHAR}, #{callBackMethod,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{fileId,jdbcType=VARCHAR}, #{qrCodeType,jdbcType=INTEGER})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.enterprise.entity.TabQrcodeDownload"
>
<selectKey
keyProperty=
"id"
order=
"AFTER"
resultType=
"java.lang.Integer"
>
SELECT LAST_INSERT_ID()
</selectKey>
insert into tab_qrcode_download
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -105,6 +100,9 @@
<if
test=
"fileId != null"
>
file_id,
</if>
<if
test=
"qrCodeType != null"
>
qr_code_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -155,6 +153,9 @@
<if
test=
"fileId != null"
>
#{fileId,jdbcType=VARCHAR},
</if>
<if
test=
"qrCodeType != null"
>
#{qrCodeType,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.enterprise.entity.TabQrcodeDownload"
>
...
...
@@ -205,6 +206,9 @@
<if
test=
"fileId != null"
>
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if
test=
"qrCodeType != null"
>
qr_code_type = #{qrCodeType,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
...
...
@@ -224,7 +228,8 @@
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
file_id = #{fileId,jdbcType=VARCHAR}
file_id = #{fileId,jdbcType=VARCHAR},
qr_code_type = #{qrCodeType,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
</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