Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gxpt_ht
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
pseer
gxpt_ht
Commits
de8b482a
Commit
de8b482a
authored
Nov 14, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加集点活动和活动配置表
parent
02f3366a
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1097 additions
and
0 deletions
+1097
-0
PointActivitiesConfController.java
.../web/controller/system/PointActivitiesConfController.java
+91
-0
PointActivitiesController.java
...hare/web/controller/system/PointActivitiesController.java
+91
-0
PointActivities.java
...em/src/main/java/share/system/domain/PointActivities.java
+111
-0
PointActivitiesConf.java
...rc/main/java/share/system/domain/PointActivitiesConf.java
+105
-0
PointActivitiesConfMapper.java
...n/java/share/system/mapper/PointActivitiesConfMapper.java
+62
-0
PointActivitiesMapper.java
.../main/java/share/system/mapper/PointActivitiesMapper.java
+62
-0
PointActivitiesConfService.java
...java/share/system/service/PointActivitiesConfService.java
+62
-0
PointActivitiesService.java
...ain/java/share/system/service/PointActivitiesService.java
+62
-0
PointActivitiesConfServiceImpl.java
...e/system/service/impl/PointActivitiesConfServiceImpl.java
+91
-0
PointActivitiesServiceImpl.java
...share/system/service/impl/PointActivitiesServiceImpl.java
+91
-0
PointActivitiesConfMapper.xml
...ain/resources/mapper/system/PointActivitiesConfMapper.xml
+135
-0
PointActivitiesMapper.xml
...rc/main/resources/mapper/system/PointActivitiesMapper.xml
+134
-0
No files found.
share-admin/src/main/java/share/web/controller/system/PointActivitiesConfController.java
0 → 100644
View file @
de8b482a
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.PointActivitiesConf
;
import
share.system.service.PointActivitiesConfService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 用户集点活动配置Controller
*
* @author wuwenlong
* @date 2024-11-14
*/
@RestController
@RequestMapping
(
"/system/pointActivitiesConf"
)
public
class
PointActivitiesConfController
extends
BaseController
{
@Autowired
private
PointActivitiesConfService
pointActivitiesConfService
;
/**
* 查询用户集点活动配置列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivitiesConf:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
PointActivitiesConf
pointActivitiesConf
)
{
startPage
();
List
<
PointActivitiesConf
>
list
=
pointActivitiesConfService
.
selectPointActivitiesConfList
(
pointActivitiesConf
);
return
getDataTable
(
list
);
}
/**
* 导出用户集点活动配置列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivitiesConf:export')"
)
@Log
(
title
=
"用户集点活动配置"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
PointActivitiesConf
pointActivitiesConf
)
{
List
<
PointActivitiesConf
>
list
=
pointActivitiesConfService
.
selectPointActivitiesConfList
(
pointActivitiesConf
);
ExcelUtil
<
PointActivitiesConf
>
util
=
new
ExcelUtil
<
PointActivitiesConf
>(
PointActivitiesConf
.
class
);
util
.
exportExcel
(
response
,
list
,
"用户集点活动配置数据"
);
}
/**
* 获取用户集点活动配置详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivitiesConf:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
pointActivitiesConfService
.
selectPointActivitiesConfById
(
id
));
}
/**
* 新增用户集点活动配置
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivitiesConf:add')"
)
@Log
(
title
=
"用户集点活动配置"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
PointActivitiesConf
pointActivitiesConf
)
{
return
toAjax
(
pointActivitiesConfService
.
insertPointActivitiesConf
(
pointActivitiesConf
));
}
/**
* 修改用户集点活动配置
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivitiesConf:edit')"
)
@Log
(
title
=
"用户集点活动配置"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
PointActivitiesConf
pointActivitiesConf
)
{
return
toAjax
(
pointActivitiesConfService
.
updatePointActivitiesConf
(
pointActivitiesConf
));
}
/**
* 删除用户集点活动配置
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivitiesConf:remove')"
)
@Log
(
title
=
"用户集点活动配置"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
pointActivitiesConfService
.
deletePointActivitiesConfByIds
(
ids
));
}
}
share-admin/src/main/java/share/web/controller/system/PointActivitiesController.java
0 → 100644
View file @
de8b482a
package
share
.
web
.
controller
.
system
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.*
;
import
share.common.annotation.Log
;
import
share.common.core.controller.BaseController
;
import
share.common.core.domain.AjaxResult
;
import
share.common.core.page.TableDataInfo
;
import
share.common.enums.BusinessType
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.PointActivities
;
import
share.system.service.PointActivitiesService
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.List
;
/**
* 用户集点活动Controller
*
* @author wuwenlong
* @date 2024-11-14
*/
@RestController
@RequestMapping
(
"/system/pointActivities"
)
public
class
PointActivitiesController
extends
BaseController
{
@Autowired
private
PointActivitiesService
pointActivitiesService
;
/**
* 查询用户集点活动列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivities:list')"
)
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
PointActivities
pointActivities
)
{
startPage
();
List
<
PointActivities
>
list
=
pointActivitiesService
.
selectPointActivitiesList
(
pointActivities
);
return
getDataTable
(
list
);
}
/**
* 导出用户集点活动列表
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivities:export')"
)
@Log
(
title
=
"用户集点活动"
,
businessType
=
BusinessType
.
EXPORT
)
@PostMapping
(
"/export"
)
public
void
export
(
HttpServletResponse
response
,
PointActivities
pointActivities
)
{
List
<
PointActivities
>
list
=
pointActivitiesService
.
selectPointActivitiesList
(
pointActivities
);
ExcelUtil
<
PointActivities
>
util
=
new
ExcelUtil
<
PointActivities
>(
PointActivities
.
class
);
util
.
exportExcel
(
response
,
list
,
"用户集点活动数据"
);
}
/**
* 获取用户集点活动详细信息
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivities:query')"
)
@GetMapping
(
value
=
"/{id}"
)
public
AjaxResult
getInfo
(
@PathVariable
(
"id"
)
Long
id
)
{
return
success
(
pointActivitiesService
.
selectPointActivitiesById
(
id
));
}
/**
* 新增用户集点活动
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivities:add')"
)
@Log
(
title
=
"用户集点活动"
,
businessType
=
BusinessType
.
INSERT
)
@PostMapping
public
AjaxResult
add
(
@RequestBody
PointActivities
pointActivities
)
{
return
toAjax
(
pointActivitiesService
.
insertPointActivities
(
pointActivities
));
}
/**
* 修改用户集点活动
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivities:edit')"
)
@Log
(
title
=
"用户集点活动"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
public
AjaxResult
edit
(
@RequestBody
PointActivities
pointActivities
)
{
return
toAjax
(
pointActivitiesService
.
updatePointActivities
(
pointActivities
));
}
/**
* 删除用户集点活动
*/
@PreAuthorize
(
"@ss.hasPermi('system:pointActivities:remove')"
)
@Log
(
title
=
"用户集点活动"
,
businessType
=
BusinessType
.
DELETE
)
@DeleteMapping
(
"/{ids}"
)
public
AjaxResult
remove
(
@PathVariable
Long
[]
ids
)
{
return
toAjax
(
pointActivitiesService
.
deletePointActivitiesByIds
(
ids
));
}
}
share-system/src/main/java/share/system/domain/PointActivities.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
import
java.util.Date
;
/**
* 用户集点活动对象 s_point_activities
*
* @author wuwenlong
* @date 2024-11-14
*/
@Data
@TableName
(
"s_point_activities"
)
public
class
PointActivities
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 用户ID
*/
@Excel
(
name
=
"用户ID"
)
private
Long
consumerId
;
/**
* 配置ID
*/
@Excel
(
name
=
"配置ID"
)
private
Long
confId
;
/**
* 已累计点数
*/
@Excel
(
name
=
"已累计点数"
)
private
Long
points
;
/**
* 上次消费时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"上次消费时间"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
lastConsumptionTime
;
/**
* 是否可领取
*/
@Excel
(
name
=
"是否可领取"
)
private
Long
isReceive
;
/**
* 是否已领取优惠券
*/
@Excel
(
name
=
"是否已领取优惠券"
)
private
Long
couponReceived
;
/**
* 优惠券领取日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"优惠券领取日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
receivedDate
;
/**
* 优惠券过期日期
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
@Excel
(
name
=
"优惠券过期日期"
,
width
=
30
,
dateFormat
=
"yyyy-MM-dd"
)
private
Date
couponExpirationDate
;
/**
* 是否删除(0:否,1:是)
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField
(
select
=
false
)
private
Long
isDelete
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
append
(
"confId"
,
getConfId
())
.
append
(
"points"
,
getPoints
())
.
append
(
"lastConsumptionTime"
,
getLastConsumptionTime
())
.
append
(
"isReceive"
,
getIsReceive
())
.
append
(
"couponReceived"
,
getCouponReceived
())
.
append
(
"receivedDate"
,
getReceivedDate
())
.
append
(
"couponExpirationDate"
,
getCouponExpirationDate
())
.
append
(
"isDelete"
,
getIsDelete
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/domain/PointActivitiesConf.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
domain
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableLogic
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
share.common.annotation.Excel
;
import
share.common.core.domain.BaseEntity
;
/**
* 用户集点活动配置对象 s_point_activities_conf
*
* @author wuwenlong
* @date 2024-11-14
*/
@Data
@TableName
(
"s_point_activities_conf"
)
public
class
PointActivitiesConf
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
private
Long
id
;
/**
* 配置名称
*/
@Excel
(
name
=
"配置名称"
)
private
String
name
;
/**
* 集点所需的消费次数
*/
@Excel
(
name
=
"集点所需的消费次数"
)
private
Long
pointsRequired
;
/**
* 每次消费的时间间隔(小时)
*/
@Excel
(
name
=
"每次消费的时间间隔(小时)"
)
private
Long
timeInterval
;
/**
* 优惠券Id
*/
@Excel
(
name
=
"优惠券Id"
)
private
Long
couponId
;
/**
* 优惠券的领取期限 (天)
*/
@Excel
(
name
=
"优惠券的领取期限 (天)"
)
private
Long
collectionDeadline
;
/**
* 优惠券的使用期限 (天)
*/
@Excel
(
name
=
"优惠券的使用期限 (天)"
)
private
Long
couponDuration
;
/**
* 集点活动的重置周期 (月)
*/
@Excel
(
name
=
"集点活动的重置周期 (月)"
)
private
Long
collectionResetPeriod
;
/**
* 是否开启
*/
@Excel
(
name
=
"是否开启"
)
private
Long
isOpen
;
/**
* 是否删除(0:否,1:是)
*/
//逻辑删除注解(0 未删除 1 已删除)
@TableLogic
@TableField
(
select
=
false
)
private
Long
isDelete
;
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"name"
,
getName
())
.
append
(
"pointsRequired"
,
getPointsRequired
())
.
append
(
"timeInterval"
,
getTimeInterval
())
.
append
(
"couponId"
,
getCouponId
())
.
append
(
"collectionDeadline"
,
getCollectionDeadline
())
.
append
(
"couponDuration"
,
getCouponDuration
())
.
append
(
"collectionResetPeriod"
,
getCollectionResetPeriod
())
.
append
(
"isOpen"
,
getIsOpen
())
.
append
(
"isDelete"
,
getIsDelete
())
.
append
(
"createBy"
,
getCreateBy
())
.
append
(
"createTime"
,
getCreateTime
())
.
append
(
"updateBy"
,
getUpdateBy
())
.
append
(
"updateTime"
,
getUpdateTime
())
.
append
(
"remark"
,
getRemark
())
.
toString
();
}
}
share-system/src/main/java/share/system/mapper/PointActivitiesConfMapper.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.PointActivitiesConf
;
import
java.util.List
;
/**
* 用户集点活动配置Mapper接口
*
* @author wuwenlong
* @date 2024-11-14
*/
public
interface
PointActivitiesConfMapper
extends
BaseMapper
<
PointActivitiesConf
>
{
/**
* 查询用户集点活动配置
*
* @param id 用户集点活动配置主键
* @return 用户集点活动配置
*/
public
PointActivitiesConf
selectPointActivitiesConfById
(
Long
id
);
/**
* 查询用户集点活动配置列表
*
* @param pointActivitiesConf 用户集点活动配置
* @return 用户集点活动配置集合
*/
public
List
<
PointActivitiesConf
>
selectPointActivitiesConfList
(
PointActivitiesConf
pointActivitiesConf
);
/**
* 新增用户集点活动配置
*
* @param pointActivitiesConf 用户集点活动配置
* @return 结果
*/
public
int
insertPointActivitiesConf
(
PointActivitiesConf
pointActivitiesConf
);
/**
* 修改用户集点活动配置
*
* @param pointActivitiesConf 用户集点活动配置
* @return 结果
*/
public
int
updatePointActivitiesConf
(
PointActivitiesConf
pointActivitiesConf
);
/**
* 删除用户集点活动配置
*
* @param id 用户集点活动配置主键
* @return 结果
*/
public
int
deletePointActivitiesConfById
(
Long
id
);
/**
* 批量删除用户集点活动配置
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deletePointActivitiesConfByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/mapper/PointActivitiesMapper.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.PointActivities
;
import
java.util.List
;
/**
* 用户集点活动Mapper接口
*
* @author wuwenlong
* @date 2024-11-14
*/
public
interface
PointActivitiesMapper
extends
BaseMapper
<
PointActivities
>
{
/**
* 查询用户集点活动
*
* @param id 用户集点活动主键
* @return 用户集点活动
*/
public
PointActivities
selectPointActivitiesById
(
Long
id
);
/**
* 查询用户集点活动列表
*
* @param pointActivities 用户集点活动
* @return 用户集点活动集合
*/
public
List
<
PointActivities
>
selectPointActivitiesList
(
PointActivities
pointActivities
);
/**
* 新增用户集点活动
*
* @param pointActivities 用户集点活动
* @return 结果
*/
public
int
insertPointActivities
(
PointActivities
pointActivities
);
/**
* 修改用户集点活动
*
* @param pointActivities 用户集点活动
* @return 结果
*/
public
int
updatePointActivities
(
PointActivities
pointActivities
);
/**
* 删除用户集点活动
*
* @param id 用户集点活动主键
* @return 结果
*/
public
int
deletePointActivitiesById
(
Long
id
);
/**
* 批量删除用户集点活动
*
* @param ids 需要删除的数据主键集合
* @return 结果
*/
public
int
deletePointActivitiesByIds
(
Long
[]
ids
);
}
share-system/src/main/java/share/system/service/PointActivitiesConfService.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.PointActivitiesConf
;
import
java.util.List
;
/**
* 用户集点活动配置Service接口
*
* @author wuwenlong
* @date 2024-11-14
*/
public
interface
PointActivitiesConfService
extends
IService
<
PointActivitiesConf
>
{
/**
* 查询用户集点活动配置
*
* @param id 用户集点活动配置主键
* @return 用户集点活动配置
*/
public
PointActivitiesConf
selectPointActivitiesConfById
(
Long
id
);
/**
* 查询用户集点活动配置列表
*
* @param pointActivitiesConf 用户集点活动配置
* @return 用户集点活动配置集合
*/
public
List
<
PointActivitiesConf
>
selectPointActivitiesConfList
(
PointActivitiesConf
pointActivitiesConf
);
/**
* 新增用户集点活动配置
*
* @param pointActivitiesConf 用户集点活动配置
* @return 结果
*/
public
int
insertPointActivitiesConf
(
PointActivitiesConf
pointActivitiesConf
);
/**
* 修改用户集点活动配置
*
* @param pointActivitiesConf 用户集点活动配置
* @return 结果
*/
public
int
updatePointActivitiesConf
(
PointActivitiesConf
pointActivitiesConf
);
/**
* 批量删除用户集点活动配置
*
* @param ids 需要删除的用户集点活动配置主键集合
* @return 结果
*/
public
int
deletePointActivitiesConfByIds
(
Long
[]
ids
);
/**
* 删除用户集点活动配置信息
*
* @param id 用户集点活动配置主键
* @return 结果
*/
public
int
deletePointActivitiesConfById
(
Long
id
);
}
share-system/src/main/java/share/system/service/PointActivitiesService.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.PointActivities
;
import
java.util.List
;
/**
* 用户集点活动Service接口
*
* @author wuwenlong
* @date 2024-11-14
*/
public
interface
PointActivitiesService
extends
IService
<
PointActivities
>
{
/**
* 查询用户集点活动
*
* @param id 用户集点活动主键
* @return 用户集点活动
*/
public
PointActivities
selectPointActivitiesById
(
Long
id
);
/**
* 查询用户集点活动列表
*
* @param pointActivities 用户集点活动
* @return 用户集点活动集合
*/
public
List
<
PointActivities
>
selectPointActivitiesList
(
PointActivities
pointActivities
);
/**
* 新增用户集点活动
*
* @param pointActivities 用户集点活动
* @return 结果
*/
public
int
insertPointActivities
(
PointActivities
pointActivities
);
/**
* 修改用户集点活动
*
* @param pointActivities 用户集点活动
* @return 结果
*/
public
int
updatePointActivities
(
PointActivities
pointActivities
);
/**
* 批量删除用户集点活动
*
* @param ids 需要删除的用户集点活动主键集合
* @return 结果
*/
public
int
deletePointActivitiesByIds
(
Long
[]
ids
);
/**
* 删除用户集点活动信息
*
* @param id 用户集点活动主键
* @return 结果
*/
public
int
deletePointActivitiesById
(
Long
id
);
}
share-system/src/main/java/share/system/service/impl/PointActivitiesConfServiceImpl.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.PointActivitiesConf
;
import
share.system.mapper.PointActivitiesConfMapper
;
import
share.system.service.PointActivitiesConfService
;
import
java.util.List
;
/**
* 用户集点活动配置Service业务层处理
*
* @author wuwenlong
* @date 2024-11-14
*/
@Service
public
class
PointActivitiesConfServiceImpl
extends
ServiceImpl
<
PointActivitiesConfMapper
,
PointActivitiesConf
>
implements
PointActivitiesConfService
{
@Autowired
private
PointActivitiesConfMapper
pointActivitiesConfMapper
;
/**
* 查询用户集点活动配置
*
* @param id 用户集点活动配置主键
* @return 用户集点活动配置
*/
@Override
public
PointActivitiesConf
selectPointActivitiesConfById
(
Long
id
)
{
return
pointActivitiesConfMapper
.
selectPointActivitiesConfById
(
id
);
}
/**
* 查询用户集点活动配置列表
*
* @param pointActivitiesConf 用户集点活动配置
* @return 用户集点活动配置
*/
@Override
public
List
<
PointActivitiesConf
>
selectPointActivitiesConfList
(
PointActivitiesConf
pointActivitiesConf
)
{
return
pointActivitiesConfMapper
.
selectPointActivitiesConfList
(
pointActivitiesConf
);
}
/**
* 新增用户集点活动配置
*
* @param pointActivitiesConf 用户集点活动配置
* @return 结果
*/
@Override
public
int
insertPointActivitiesConf
(
PointActivitiesConf
pointActivitiesConf
)
{
pointActivitiesConf
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
pointActivitiesConfMapper
.
insertPointActivitiesConf
(
pointActivitiesConf
);
}
/**
* 修改用户集点活动配置
*
* @param pointActivitiesConf 用户集点活动配置
* @return 结果
*/
@Override
public
int
updatePointActivitiesConf
(
PointActivitiesConf
pointActivitiesConf
)
{
pointActivitiesConf
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
pointActivitiesConfMapper
.
updatePointActivitiesConf
(
pointActivitiesConf
);
}
/**
* 批量删除用户集点活动配置
*
* @param ids 需要删除的用户集点活动配置主键
* @return 结果
*/
@Override
public
int
deletePointActivitiesConfByIds
(
Long
[]
ids
)
{
return
pointActivitiesConfMapper
.
deletePointActivitiesConfByIds
(
ids
);
}
/**
* 删除用户集点活动配置信息
*
* @param id 用户集点活动配置主键
* @return 结果
*/
@Override
public
int
deletePointActivitiesConfById
(
Long
id
)
{
return
pointActivitiesConfMapper
.
deletePointActivitiesConfById
(
id
);
}
}
share-system/src/main/java/share/system/service/impl/PointActivitiesServiceImpl.java
0 → 100644
View file @
de8b482a
package
share
.
system
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
share.common.utils.DateUtils
;
import
share.system.domain.PointActivities
;
import
share.system.mapper.PointActivitiesMapper
;
import
share.system.service.PointActivitiesService
;
import
java.util.List
;
/**
* 用户集点活动Service业务层处理
*
* @author wuwenlong
* @date 2024-11-14
*/
@Service
public
class
PointActivitiesServiceImpl
extends
ServiceImpl
<
PointActivitiesMapper
,
PointActivities
>
implements
PointActivitiesService
{
@Autowired
private
PointActivitiesMapper
pointActivitiesMapper
;
/**
* 查询用户集点活动
*
* @param id 用户集点活动主键
* @return 用户集点活动
*/
@Override
public
PointActivities
selectPointActivitiesById
(
Long
id
)
{
return
pointActivitiesMapper
.
selectPointActivitiesById
(
id
);
}
/**
* 查询用户集点活动列表
*
* @param pointActivities 用户集点活动
* @return 用户集点活动
*/
@Override
public
List
<
PointActivities
>
selectPointActivitiesList
(
PointActivities
pointActivities
)
{
return
pointActivitiesMapper
.
selectPointActivitiesList
(
pointActivities
);
}
/**
* 新增用户集点活动
*
* @param pointActivities 用户集点活动
* @return 结果
*/
@Override
public
int
insertPointActivities
(
PointActivities
pointActivities
)
{
pointActivities
.
setCreateTime
(
DateUtils
.
getNowDate
());
return
pointActivitiesMapper
.
insertPointActivities
(
pointActivities
);
}
/**
* 修改用户集点活动
*
* @param pointActivities 用户集点活动
* @return 结果
*/
@Override
public
int
updatePointActivities
(
PointActivities
pointActivities
)
{
pointActivities
.
setUpdateTime
(
DateUtils
.
getNowDate
());
return
pointActivitiesMapper
.
updatePointActivities
(
pointActivities
);
}
/**
* 批量删除用户集点活动
*
* @param ids 需要删除的用户集点活动主键
* @return 结果
*/
@Override
public
int
deletePointActivitiesByIds
(
Long
[]
ids
)
{
return
pointActivitiesMapper
.
deletePointActivitiesByIds
(
ids
);
}
/**
* 删除用户集点活动信息
*
* @param id 用户集点活动主键
* @return 结果
*/
@Override
public
int
deletePointActivitiesById
(
Long
id
)
{
return
pointActivitiesMapper
.
deletePointActivitiesById
(
id
);
}
}
share-system/src/main/resources/mapper/system/PointActivitiesConfMapper.xml
0 → 100644
View file @
de8b482a
<?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=
"share.system.mapper.PointActivitiesConfMapper"
>
<resultMap
type=
"PointActivitiesConf"
id=
"PointActivitiesConfResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"name"
column=
"name"
/>
<result
property=
"pointsRequired"
column=
"points_required"
/>
<result
property=
"timeInterval"
column=
"time_interval"
/>
<result
property=
"couponId"
column=
"coupon_id"
/>
<result
property=
"collectionDeadline"
column=
"collection_deadline"
/>
<result
property=
"couponDuration"
column=
"coupon_duration"
/>
<result
property=
"collectionResetPeriod"
column=
"collection_reset_period"
/>
<result
property=
"isOpen"
column=
"is_open"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectPointActivitiesConfVo"
>
select id,
name,
points_required,
time_interval,
coupon_id,
collection_deadline,
coupon_duration,
collection_reset_period,
is_open,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_point_activities_conf
</sql>
<select
id=
"selectPointActivitiesConfList"
parameterType=
"PointActivitiesConf"
resultMap=
"PointActivitiesConfResult"
>
<include
refid=
"selectPointActivitiesConfVo"
/>
<where>
<if
test=
"name != null and name != ''"
>
and name like concat('%', #{name}, '%')
</if>
<if
test=
"pointsRequired != null "
>
and points_required = #{pointsRequired}
</if>
<if
test=
"timeInterval != null "
>
and time_interval = #{timeInterval}
</if>
<if
test=
"couponId != null "
>
and coupon_id = #{couponId}
</if>
<if
test=
"collectionDeadline != null "
>
and collection_deadline = #{collectionDeadline}
</if>
<if
test=
"couponDuration != null "
>
and coupon_duration = #{couponDuration}
</if>
<if
test=
"collectionResetPeriod != null "
>
and collection_reset_period = #{collectionResetPeriod}
</if>
<if
test=
"isOpen != null "
>
and is_open = #{isOpen}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
</select>
<select
id=
"selectPointActivitiesConfById"
parameterType=
"Long"
resultMap=
"PointActivitiesConfResult"
>
<include
refid=
"selectPointActivitiesConfVo"
/>
where id = #{id}
</select>
<insert
id=
"insertPointActivitiesConf"
parameterType=
"PointActivitiesConf"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_point_activities_conf
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name,
</if>
<if
test=
"pointsRequired != null"
>
points_required,
</if>
<if
test=
"timeInterval != null"
>
time_interval,
</if>
<if
test=
"couponId != null"
>
coupon_id,
</if>
<if
test=
"collectionDeadline != null"
>
collection_deadline,
</if>
<if
test=
"couponDuration != null"
>
coupon_duration,
</if>
<if
test=
"collectionResetPeriod != null"
>
collection_reset_period,
</if>
<if
test=
"isOpen != null"
>
is_open,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"name != null"
>
#{name},
</if>
<if
test=
"pointsRequired != null"
>
#{pointsRequired},
</if>
<if
test=
"timeInterval != null"
>
#{timeInterval},
</if>
<if
test=
"couponId != null"
>
#{couponId},
</if>
<if
test=
"collectionDeadline != null"
>
#{collectionDeadline},
</if>
<if
test=
"couponDuration != null"
>
#{couponDuration},
</if>
<if
test=
"collectionResetPeriod != null"
>
#{collectionResetPeriod},
</if>
<if
test=
"isOpen != null"
>
#{isOpen},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updatePointActivitiesConf"
parameterType=
"PointActivitiesConf"
>
update s_point_activities_conf
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"name != null"
>
name = #{name},
</if>
<if
test=
"pointsRequired != null"
>
points_required = #{pointsRequired},
</if>
<if
test=
"timeInterval != null"
>
time_interval = #{timeInterval},
</if>
<if
test=
"couponId != null"
>
coupon_id = #{couponId},
</if>
<if
test=
"collectionDeadline != null"
>
collection_deadline = #{collectionDeadline},
</if>
<if
test=
"couponDuration != null"
>
coupon_duration = #{couponDuration},
</if>
<if
test=
"collectionResetPeriod != null"
>
collection_reset_period = #{collectionResetPeriod},
</if>
<if
test=
"isOpen != null"
>
is_open = #{isOpen},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deletePointActivitiesConfById"
parameterType=
"Long"
>
delete
from s_point_activities_conf
where id = #{id}
</delete>
<delete
id=
"deletePointActivitiesConfByIds"
parameterType=
"String"
>
delete from s_point_activities_conf where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
share-system/src/main/resources/mapper/system/PointActivitiesMapper.xml
0 → 100644
View file @
de8b482a
<?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=
"share.system.mapper.PointActivitiesMapper"
>
<resultMap
type=
"PointActivities"
id=
"PointActivitiesResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"confId"
column=
"conf_id"
/>
<result
property=
"points"
column=
"points"
/>
<result
property=
"lastConsumptionTime"
column=
"last_consumption_time"
/>
<result
property=
"isReceive"
column=
"is_receive"
/>
<result
property=
"couponReceived"
column=
"coupon_received"
/>
<result
property=
"receivedDate"
column=
"received_date"
/>
<result
property=
"couponExpirationDate"
column=
"coupon_expiration_date"
/>
<result
property=
"isDelete"
column=
"is_delete"
/>
<result
property=
"createBy"
column=
"create_by"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateBy"
column=
"update_by"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
<result
property=
"remark"
column=
"remark"
/>
</resultMap>
<sql
id=
"selectPointActivitiesVo"
>
select id,
consumer_id,
conf_id,
points,
last_consumption_time,
is_receive,
coupon_received,
received_date,
coupon_expiration_date,
is_delete,
create_by,
create_time,
update_by,
update_time,
remark
from s_point_activities
</sql>
<select
id=
"selectPointActivitiesList"
parameterType=
"PointActivities"
resultMap=
"PointActivitiesResult"
>
<include
refid=
"selectPointActivitiesVo"
/>
<where>
<if
test=
"consumerId != null "
>
and consumer_id = #{consumerId}
</if>
<if
test=
"confId != null "
>
and conf_id = #{confId}
</if>
<if
test=
"points != null "
>
and points = #{points}
</if>
<if
test=
"lastConsumptionTime != null "
>
and last_consumption_time = #{lastConsumptionTime}
</if>
<if
test=
"isReceive != null "
>
and is_receive = #{isReceive}
</if>
<if
test=
"couponReceived != null "
>
and coupon_received = #{couponReceived}
</if>
<if
test=
"receivedDate != null "
>
and received_date = #{receivedDate}
</if>
<if
test=
"couponExpirationDate != null "
>
and coupon_expiration_date = #{couponExpirationDate}
</if>
<if
test=
"isDelete != null "
>
and is_delete = #{isDelete}
</if>
</where>
</select>
<select
id=
"selectPointActivitiesById"
parameterType=
"Long"
resultMap=
"PointActivitiesResult"
>
<include
refid=
"selectPointActivitiesVo"
/>
where id = #{id}
</select>
<insert
id=
"insertPointActivities"
parameterType=
"PointActivities"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into s_point_activities
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id,
</if>
<if
test=
"confId != null"
>
conf_id,
</if>
<if
test=
"points != null"
>
points,
</if>
<if
test=
"lastConsumptionTime != null"
>
last_consumption_time,
</if>
<if
test=
"isReceive != null"
>
is_receive,
</if>
<if
test=
"couponReceived != null"
>
coupon_received,
</if>
<if
test=
"receivedDate != null"
>
received_date,
</if>
<if
test=
"couponExpirationDate != null"
>
coupon_expiration_date,
</if>
<if
test=
"isDelete != null"
>
is_delete,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
remark,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
#{consumerId},
</if>
<if
test=
"confId != null"
>
#{confId},
</if>
<if
test=
"points != null"
>
#{points},
</if>
<if
test=
"lastConsumptionTime != null"
>
#{lastConsumptionTime},
</if>
<if
test=
"isReceive != null"
>
#{isReceive},
</if>
<if
test=
"couponReceived != null"
>
#{couponReceived},
</if>
<if
test=
"receivedDate != null"
>
#{receivedDate},
</if>
<if
test=
"couponExpirationDate != null"
>
#{couponExpirationDate},
</if>
<if
test=
"isDelete != null"
>
#{isDelete},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</insert>
<update
id=
"updatePointActivities"
parameterType=
"PointActivities"
>
update s_point_activities
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"consumerId != null"
>
consumer_id = #{consumerId},
</if>
<if
test=
"confId != null"
>
conf_id = #{confId},
</if>
<if
test=
"points != null"
>
points = #{points},
</if>
<if
test=
"lastConsumptionTime != null"
>
last_consumption_time = #{lastConsumptionTime},
</if>
<if
test=
"isReceive != null"
>
is_receive = #{isReceive},
</if>
<if
test=
"couponReceived != null"
>
coupon_received = #{couponReceived},
</if>
<if
test=
"receivedDate != null"
>
received_date = #{receivedDate},
</if>
<if
test=
"couponExpirationDate != null"
>
coupon_expiration_date = #{couponExpirationDate},
</if>
<if
test=
"isDelete != null"
>
is_delete = #{isDelete},
</if>
<if
test=
"createBy != null"
>
create_by = #{createBy},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
where id = #{id}
</update>
<delete
id=
"deletePointActivitiesById"
parameterType=
"Long"
>
delete
from s_point_activities
where id = #{id}
</delete>
<delete
id=
"deletePointActivitiesByIds"
parameterType=
"String"
>
delete from s_point_activities where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</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