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
8ce3fce3
Commit
8ce3fce3
authored
May 07, 2020
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
微盟卡券配置分页查询接口
parent
70170e57
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
154 additions
and
4 deletions
+154
-4
WmStoreCouponConfigDTO.java
...ava/com/gic/enterprise/dto/wm/WmStoreCouponConfigDTO.java
+28
-0
CouponConfigQO.java
...rc/main/java/com/gic/enterprise/qo/wm/CouponConfigQO.java
+31
-1
WmStoreApiService.java
...in/java/com/gic/enterprise/service/WmStoreApiService.java
+12
-0
TabWmStoreCouponConfig.java
...ava/com/gic/enterprise/entity/TabWmStoreCouponConfig.java
+29
-0
WmStoreCouponConfigService.java
...om/gic/enterprise/service/WmStoreCouponConfigService.java
+3
-0
WmStoreCouponConfigServiceImpl.java
...terprise/service/impl/WmStoreCouponConfigServiceImpl.java
+9
-0
WmStoreApiServiceImpl.java
.../enterprise/service/outer/impl/WmStoreApiServiceImpl.java
+9
-0
TabWmStoreCouponConfigMapper.xml
...rc/main/resources/mapper/TabWmStoreCouponConfigMapper.xml
+33
-3
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/wm/WmStoreCouponConfigDTO.java
View file @
8ce3fce3
...
...
@@ -34,11 +34,21 @@ public class WmStoreCouponConfigDTO implements Serializable{
private
String
gicCouponId
;
/**
* gic卡券名称
*/
private
String
gicCouponName
;
/**
* 微盟卡券ID
*/
private
String
wmCouponId
;
/**
* 微盟卡券名称
*/
private
String
wmCouponName
;
/**
* gic卡券过期时间,如果是固定时间,则有值,如果未null,说明有效
*/
private
Date
gicCouponExpire
;
...
...
@@ -138,4 +148,22 @@ public class WmStoreCouponConfigDTO implements Serializable{
this
.
updateTime
=
updateTime
;
return
this
;
}
public
String
getGicCouponName
()
{
return
gicCouponName
;
}
public
WmStoreCouponConfigDTO
setGicCouponName
(
String
gicCouponName
)
{
this
.
gicCouponName
=
gicCouponName
;
return
this
;
}
public
String
getWmCouponName
()
{
return
wmCouponName
;
}
public
WmStoreCouponConfigDTO
setWmCouponName
(
String
wmCouponName
)
{
this
.
wmCouponName
=
wmCouponName
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/qo/wm/CouponConfigQO.java
View file @
8ce3fce3
package
com
.
gic
.
enterprise
.
qo
.
wm
;
import
com.gic.enterprise.qo.PageQO
;
import
java.io.Serializable
;
/**
* 卡券配置查询参数
...
...
@@ -8,7 +10,7 @@ import java.io.Serializable;
* @author guojuxing
* @date 2020/5/7 11:04 AM
*/
public
class
CouponConfigQO
implements
Serializable
{
public
class
CouponConfigQO
extends
PageQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2703515379512499369L
;
/**
...
...
@@ -26,6 +28,16 @@ public class CouponConfigQO implements Serializable{
*/
private
String
wmCouponId
;
/**
* 仅展示有效卡券 1:是
*/
private
Integer
onlyShowEffective
;
/**
* 卡券名称
*/
private
String
couponName
;
public
String
getWmMainAccount
()
{
return
wmMainAccount
;
}
...
...
@@ -52,4 +64,22 @@ public class CouponConfigQO implements Serializable{
this
.
wmCouponId
=
wmCouponId
;
return
this
;
}
public
Integer
getOnlyShowEffective
()
{
return
onlyShowEffective
;
}
public
CouponConfigQO
setOnlyShowEffective
(
Integer
onlyShowEffective
)
{
this
.
onlyShowEffective
=
onlyShowEffective
;
return
this
;
}
public
String
getCouponName
()
{
return
couponName
;
}
public
CouponConfigQO
setCouponName
(
String
couponName
)
{
this
.
couponName
=
couponName
;
return
this
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/WmStoreApiService.java
View file @
8ce3fce3
package
com
.
gic
.
enterprise
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.dto.WmMemberCardConfigDTO
;
import
com.gic.enterprise.dto.WmOrderConfigDTO
;
...
...
@@ -7,6 +8,7 @@ import com.gic.enterprise.dto.WmStoreDTO;
import
com.gic.enterprise.dto.wm.WmCouponDTO
;
import
com.gic.enterprise.dto.wm.WmStoreConfigDTO
;
import
com.gic.enterprise.dto.wm.WmStoreCouponConfigDTO
;
import
com.gic.enterprise.qo.wm.CouponConfigQO
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -125,4 +127,14 @@ public interface WmStoreApiService {
* @return com.gic.enterprise.dto.wm.WmCouponDTO
*/
ServiceResponse
<
List
<
WmCouponDTO
>>
getWmCouponId
(
Long
couponId
);
/**
* 分页查询卡券绑定记录
* @Title: pageCouponConfig
* @Description:
* @author guojuxing
* @param params
* @return com.gic.api.base.commons.ServiceResponse<com.gic.api.base.commons.Page<com.gic.enterprise.dto.wm.WmStoreCouponConfigDTO>>
*/
ServiceResponse
<
Page
<
WmStoreCouponConfigDTO
>>
pageCouponConfig
(
CouponConfigQO
params
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabWmStoreCouponConfig.java
View file @
8ce3fce3
...
...
@@ -27,11 +27,21 @@ public class TabWmStoreCouponConfig {
private
String
gicCouponId
;
/**
* gic卡券名称
*/
private
String
gicCouponName
;
/**
* 微盟卡券ID
*/
private
String
wmCouponId
;
/**
* 微盟卡券名称
*/
private
String
wmCouponName
;
/**
* gic卡券过期时间,如果是固定时间,则有值,如果未null,说明有效
*/
private
Date
gicCouponExpire
;
...
...
@@ -131,4 +141,22 @@ public class TabWmStoreCouponConfig {
this
.
updateTime
=
updateTime
;
return
this
;
}
public
String
getGicCouponName
()
{
return
gicCouponName
;
}
public
TabWmStoreCouponConfig
setGicCouponName
(
String
gicCouponName
)
{
this
.
gicCouponName
=
gicCouponName
;
return
this
;
}
public
String
getWmCouponName
()
{
return
wmCouponName
;
}
public
TabWmStoreCouponConfig
setWmCouponName
(
String
wmCouponName
)
{
this
.
wmCouponName
=
wmCouponName
;
return
this
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/WmStoreCouponConfigService.java
View file @
8ce3fce3
...
...
@@ -3,6 +3,7 @@ package com.gic.enterprise.service;
import
com.gic.enterprise.dto.wm.WmStoreCouponConfigDTO
;
import
com.gic.enterprise.entity.TabWmStoreCouponConfig
;
import
com.gic.enterprise.qo.wm.CouponConfigQO
;
import
com.github.pagehelper.Page
;
import
java.util.List
;
...
...
@@ -27,4 +28,6 @@ public interface WmStoreCouponConfigService {
* @return com.gic.enterprise.entity.TabWmStoreCouponConfig
*/
List
<
TabWmStoreCouponConfig
>
getCouponConfig
(
CouponConfigQO
params
);
Page
<
TabWmStoreCouponConfig
>
pageCouponConfig
(
CouponConfigQO
params
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/WmStoreCouponConfigServiceImpl.java
View file @
8ce3fce3
...
...
@@ -6,6 +6,8 @@ import com.gic.enterprise.dto.wm.WmStoreCouponConfigDTO;
import
com.gic.enterprise.entity.TabWmStoreCouponConfig
;
import
com.gic.enterprise.qo.wm.CouponConfigQO
;
import
com.gic.enterprise.service.WmStoreCouponConfigService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -31,4 +33,11 @@ public class WmStoreCouponConfigServiceImpl implements WmStoreCouponConfigServic
public
List
<
TabWmStoreCouponConfig
>
getCouponConfig
(
CouponConfigQO
params
)
{
return
tabWmStoreCouponConfigMapper
.
getCouponConfig
(
params
);
}
@Override
public
Page
<
TabWmStoreCouponConfig
>
pageCouponConfig
(
CouponConfigQO
params
)
{
PageHelper
.
startPage
(
params
.
getCurrentPage
(),
params
.
getPageSize
());
List
<
TabWmStoreCouponConfig
>
list
=
tabWmStoreCouponConfigMapper
.
getCouponConfig
(
params
);
return
(
Page
<
TabWmStoreCouponConfig
>)
list
;
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/WmStoreApiServiceImpl.java
View file @
8ce3fce3
...
...
@@ -4,6 +4,8 @@ import java.util.*;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.commons.util.StringUtil
;
import
com.gic.enterprise.dto.WmOrderConfigDTO
;
import
com.gic.enterprise.dto.wm.WmCouponDTO
;
...
...
@@ -225,6 +227,13 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
return
ServiceResponse
.
success
(
list
);
}
@Override
public
ServiceResponse
<
Page
<
WmStoreCouponConfigDTO
>>
pageCouponConfig
(
CouponConfigQO
params
)
{
com
.
github
.
pagehelper
.
Page
<
TabWmStoreCouponConfig
>
page
=
wmStoreCouponConfigService
.
pageCouponConfig
(
params
);
Page
<
WmStoreCouponConfigDTO
>
resultPage
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
page
,
WmStoreCouponConfigDTO
.
class
);
return
ServiceResponse
.
success
(
resultPage
);
}
private
ServiceResponse
validWmMemberCardConfig
(
WmMemberCardConfigDTO
dto
)
{
if
(
dto
.
getEnterpriseId
()
==
null
)
{
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabWmStoreCouponConfigMapper.xml
View file @
8ce3fce3
...
...
@@ -6,14 +6,16 @@
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
<result
column=
"wm_main_account"
jdbcType=
"VARCHAR"
property=
"wmMainAccount"
/>
<result
column=
"gic_coupon_id"
jdbcType=
"VARCHAR"
property=
"gicCouponId"
/>
<result
column=
"gic_coupon_name"
jdbcType=
"VARCHAR"
property=
"gicCouponName"
/>
<result
column=
"wm_coupon_id"
jdbcType=
"VARCHAR"
property=
"wmCouponId"
/>
<result
column=
"wm_coupon_name"
jdbcType=
"VARCHAR"
property=
"wmCouponName"
/>
<result
column=
"gic_coupon_expire"
jdbcType=
"TIMESTAMP"
property=
"gicCouponExpire"
/>
<result
column=
"status"
jdbcType=
"INTEGER"
property=
"status"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
coupon_config_id, enterprise_id, wm_main_account, gic_coupon_id,
wm_coupon_id, gic_coupon_expire,
coupon_config_id, enterprise_id, wm_main_account, gic_coupon_id,
gic_coupon_name, wm_coupon_id, wm_coupon_name, gic_coupon_expire,
status, create_time, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
...
...
@@ -28,11 +30,12 @@
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.enterprise.entity.TabWmStoreCouponConfig"
>
insert into tab_wm_store_coupon_config (coupon_config_id, enterprise_id, wm_main_account,
gic_coupon_id,
wm_coupon_id, gic_coupon_expire,
gic_coupon_id,
gic_coupon_name, wm_coupon_id, wm_coupon_name, gic_coupon_expire,
status, create_time, update_time
)
values (#{couponConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMainAccount,jdbcType=VARCHAR},
#{gicCouponId,jdbcType=VARCHAR}, #{wmCouponId,jdbcType=VARCHAR}, #{gicCouponExpire,jdbcType=TIMESTAMP},
#{gicCouponId,jdbcType=VARCHAR}, #{gicCouponName,jdbcType=VARCHAR}, #{wmCouponId,jdbcType=VARCHAR},
#{wmCouponName,jdbcType=VARCHAR}, #{gicCouponExpire,jdbcType=TIMESTAMP},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
...
...
@@ -51,9 +54,15 @@
<if
test=
"gicCouponId != null"
>
gic_coupon_id,
</if>
<if
test=
"gicCouponName != null"
>
gic_coupon_name,
</if>
<if
test=
"wmCouponId != null"
>
wm_coupon_id,
</if>
<if
test=
"wmCouponName != null"
>
wm_coupon_name,
</if>
<if
test=
"gicCouponExpire != null"
>
gic_coupon_expire,
</if>
...
...
@@ -80,9 +89,15 @@
<if
test=
"gicCouponId != null"
>
#{gicCouponId,jdbcType=VARCHAR},
</if>
<if
test=
"gicCouponName != null"
>
#{gicCouponName,jdbcType=VARCHAR},
</if>
<if
test=
"wmCouponId != null"
>
#{wmCouponId,jdbcType=VARCHAR},
</if>
<if
test=
"wmCouponName != null"
>
#{wmCouponName,jdbcType=VARCHAR},
</if>
<if
test=
"gicCouponExpire != null"
>
#{gicCouponExpire,jdbcType=TIMESTAMP},
</if>
...
...
@@ -109,9 +124,15 @@
<if
test=
"gicCouponId != null"
>
gic_coupon_id = #{gicCouponId,jdbcType=VARCHAR},
</if>
<if
test=
"gicCouponName != null"
>
gic_coupon_name = #{gicCouponId,jdbcType=VARCHAR},
</if>
<if
test=
"wmCouponId != null"
>
wm_coupon_id = #{wmCouponId,jdbcType=VARCHAR},
</if>
<if
test=
"wmCouponName != null"
>
wm_coupon_name = #{wmCouponId,jdbcType=VARCHAR},
</if>
<if
test=
"gicCouponExpire != null"
>
gic_coupon_expire = #{gicCouponExpire,jdbcType=TIMESTAMP},
</if>
...
...
@@ -132,7 +153,9 @@
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
gic_coupon_id = #{gicCouponId,jdbcType=VARCHAR},
gic_coupon_name = #{gicCouponName,jdbcType=VARCHAR},
wm_coupon_id = #{wmCouponId,jdbcType=VARCHAR},
wm_coupon_name = #{wmCouponName,jdbcType=VARCHAR},
gic_coupon_expire = #{gicCouponExpire,jdbcType=TIMESTAMP},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
...
...
@@ -154,5 +177,11 @@
<if
test=
"wmCouponId != null and wmCouponId != '' "
>
and wm_coupon_id = #{wmCouponId}
</if>
<if
test=
"onlyShowEffective != null and onlyShowEffective == 1"
>
and (gic_coupon_expire is null or TIMESTAMPDIFF(DAY, now(), gic_coupon_expire) >= 0)
</if>
<if
test=
"couponName != null and couponName != '' "
>
and (gic_coupon_name like concat('%', #{couponName}, '%') or wm_coupon_name like concat('%', #{couponName}, '%'))
</if>
</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