Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiedao-api-boot-master
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
lanbaoming
jiedao-api-boot-master
Commits
32b80572
Commit
32b80572
authored
Jul 31, 2024
by
zhaobiyan
Browse files
Options
Browse Files
Download
Plain Diff
兑换信息导入
parents
d04fa0d3
93fbd7fc
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
367 additions
and
130 deletions
+367
-130
ErrorCodeConstants.java
...iocoder/yudao/module/member/enums/ErrorCodeConstants.java
+2
-1
RelationSymbolEnum.java
...iocoder/yudao/module/member/enums/RelationSymbolEnum.java
+23
-0
TransportType.java
...a/cn/iocoder/yudao/module/member/enums/TransportType.java
+23
-0
pom.xml
yudao-module-member/yudao-module-member-impl/pom.xml
+5
-0
ScoreRuleController.java
...ember/controller/admin/scoreRule/ScoreRuleController.java
+27
-14
ScoreRuleDO.java
...o/module/member/dal/dataobject/scoreRule/ScoreRuleDO.java
+1
-1
ScoreRuleMapper.java
...ao/module/member/dal/mysql/scoreRule/ScoreRuleMapper.java
+40
-43
ScoreRuleExpireTask.java
.../iocoder/yudao/module/member/job/ScoreRuleExpireTask.java
+50
-0
ScoreRuleService.java
...dao/module/member/service/scoreRule/ScoreRuleService.java
+2
-2
ScoreRuleServiceImpl.java
...module/member/service/scoreRule/ScoreRuleServiceImpl.java
+129
-19
IdReqVo.java
.../cn/iocoder/yudao/module/member/vo/scoreRule/IdReqVo.java
+15
-0
ScoreRuleBaseVO.java
...der/yudao/module/member/vo/scoreRule/ScoreRuleBaseVO.java
+1
-1
ScoreRuleQueryVO.java
...er/yudao/module/member/vo/scoreRule/ScoreRuleQueryVO.java
+10
-48
ScoreRuleShareExtraVO.java
...dule/member/vo/scoreRule/extra/ScoreRuleShareExtraVO.java
+1
-1
ChannelConvert.java
...der/yudao/module/sale/convert/channel/ChannelConvert.java
+1
-0
ChannelService.java
...der/yudao/module/sale/service/channel/ChannelService.java
+2
-0
ChannelServiceImpl.java
.../module/sale/service/channel/impl/ChannelServiceImpl.java
+6
-0
ChannelSimpleRespVO.java
...der/yudao/module/sale/vo/channel/ChannelSimpleRespVO.java
+22
-0
ChannelController.java
...dule/sale/controller/admin/channel/ChannelController.java
+7
-0
No files found.
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/ErrorCodeConstants.java
View file @
32b80572
...
@@ -48,7 +48,8 @@ public interface ErrorCodeConstants {
...
@@ -48,7 +48,8 @@ public interface ErrorCodeConstants {
ErrorCode
SCORE_RULE_NOT_EXISTS
=
new
ErrorCode
(
1004008004
,
"score.rule.not.exists"
);
ErrorCode
SCORE_RULE_NOT_EXISTS
=
new
ErrorCode
(
1004008004
,
"score.rule.not.exists"
);
ErrorCode
SCORE_RULE_DELETE_ERROR
=
new
ErrorCode
(
1004008005
,
"score.rule.delete.error"
);
ErrorCode
SCORE_RULE_DELETE_ERROR
=
new
ErrorCode
(
1004008005
,
"score.rule.delete.error"
);
ErrorCode
SCORE_RULE_UPDATE_ERROR
=
new
ErrorCode
(
1004008005
,
"score.rule.update.error"
);
ErrorCode
SCORE_RULE_UPDATE_ERROR
=
new
ErrorCode
(
1004008006
,
"score.rule.update.error"
);
ErrorCode
SCORE_RULE_FIELD_ERROR
=
new
ErrorCode
(
1004008007
,
"score.rule.field.error"
);
}
}
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/RelationSymbolEnum.java
0 → 100644
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
member
.
enums
;
public
enum
RelationSymbolEnum
{
GT
(
1
,
"大于"
),
EQ
(
2
,
"等于"
),
LT
(
3
,
"小于"
);
private
final
int
value
;
private
final
String
name
;
RelationSymbolEnum
(
int
value
,
String
name
)
{
this
.
value
=
value
;
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getName
()
{
return
name
;
}
}
\ No newline at end of file
yudao-module-member/yudao-module-member-api/src/main/java/cn/iocoder/yudao/module/member/enums/TransportType.java
0 → 100644
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
member
.
enums
;
public
enum
TransportType
{
OCEAN_LCL
(
1
,
"海运拼柜"
),
SPECIAL_LINE_AIR_FREIGHT
(
3
,
"专线空运"
);
private
final
int
value
;
private
final
String
name
;
TransportType
(
int
value
,
String
name
)
{
this
.
value
=
value
;
this
.
name
=
name
;
}
public
int
getValue
()
{
return
value
;
}
public
String
getName
()
{
return
name
;
}
}
yudao-module-member/yudao-module-member-impl/pom.xml
View file @
32b80572
...
@@ -44,5 +44,10 @@
...
@@ -44,5 +44,10 @@
<version>
${revision}
</version>
<version>
${revision}
</version>
<scope>
compile
</scope>
<scope>
compile
</scope>
</dependency>
</dependency>
<dependency>
<groupId>
cn.iocoder.boot
</groupId>
<artifactId>
yudao-module-depository-core
</artifactId>
<version>
${revision}
</version>
</dependency>
</dependencies>
</dependencies>
</project>
</project>
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/controller/admin/scoreRule/ScoreRuleController.java
View file @
32b80572
...
@@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
...
@@ -5,6 +5,8 @@ import cn.iocoder.yudao.framework.common.pojo.PageResult;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.excel.util.ExcelUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog
;
import
cn.iocoder.yudao.module.depository.service.warehouse.WarehouseService
;
import
cn.iocoder.yudao.module.depository.vo.warehouse.WarehouseTreeRegionVO
;
import
cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert
;
import
cn.iocoder.yudao.module.member.convert.scoreRule.ScoreRuleConvert
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
import
cn.iocoder.yudao.module.member.service.scoreRule.ScoreRuleService
;
import
cn.iocoder.yudao.module.member.service.scoreRule.ScoreRuleService
;
...
@@ -12,6 +14,7 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.*;
...
@@ -12,6 +14,7 @@ import cn.iocoder.yudao.module.member.vo.scoreRule.*;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.collections4.ListUtils
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
...
@@ -36,6 +39,8 @@ public class ScoreRuleController {
...
@@ -36,6 +39,8 @@ public class ScoreRuleController {
@Resource
@Resource
private
ScoreRuleService
scoreRuleService
;
private
ScoreRuleService
scoreRuleService
;
@Resource
private
WarehouseService
warehouseService
;
@PostMapping
(
"/create"
)
@PostMapping
(
"/create"
)
@ApiOperation
(
"创建积分规则"
)
@ApiOperation
(
"创建积分规则"
)
...
@@ -54,19 +59,17 @@ public class ScoreRuleController {
...
@@ -54,19 +59,17 @@ public class ScoreRuleController {
@PostMapping
(
"/delete"
)
@PostMapping
(
"/delete"
)
@ApiOperation
(
"删除积分规则"
)
@ApiOperation
(
"删除积分规则"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:delete')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:delete')"
)
public
CommonResult
<
Boolean
>
deleteScoreRule
(
@
NotNull
@RequestBody
Long
id
)
{
public
CommonResult
<
Boolean
>
deleteScoreRule
(
@
Valid
@RequestBody
IdReqVo
idReqVo
)
{
scoreRuleService
.
deleteScoreRule
(
id
);
scoreRuleService
.
deleteScoreRule
(
id
ReqVo
.
getId
()
);
return
success
(
true
);
return
success
(
true
);
}
}
@PostMapping
(
"/get"
)
@PostMapping
(
"/get"
)
@ApiOperation
(
"获得积分规则详情"
)
@ApiOperation
(
"获得积分规则详情"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
example
=
"1024"
,
dataTypeClass
=
Long
.
class
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
public
CommonResult
<
ScoreRuleBackDetailVO
>
getScoreRule
(
@
NotNull
@RequestBody
Long
id
)
{
public
CommonResult
<
ScoreRuleBackDetailVO
>
getScoreRule
(
@
Valid
@RequestBody
IdReqVo
idReqVo
)
{
ScoreRuleBackDetailVO
scoreRuleBackDetailVO
=
scoreRuleService
.
getScoreRule
(
id
);
ScoreRuleBackDetailVO
scoreRuleBackDetailVO
=
scoreRuleService
.
getScoreRule
(
id
ReqVo
.
getId
()
);
return
success
(
scoreRuleBackDetailVO
);
return
success
(
scoreRuleBackDetailVO
);
}
}
...
@@ -74,7 +77,7 @@ public class ScoreRuleController {
...
@@ -74,7 +77,7 @@ public class ScoreRuleController {
@ApiOperation
(
"获得积分规则列表"
)
@ApiOperation
(
"获得积分规则列表"
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@ApiImplicitParam
(
name
=
"ids"
,
value
=
"编号列表"
,
required
=
true
,
example
=
"1024,2048"
,
dataTypeClass
=
List
.
class
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:query')"
)
public
CommonResult
<
List
<
ScoreRuleBackVO
>>
getScoreRuleList
(
@NotNull
@Request
Body
Collection
<
Long
>
ids
)
{
public
CommonResult
<
List
<
ScoreRuleBackVO
>>
getScoreRuleList
(
@NotNull
@Request
Param
Collection
<
Long
>
ids
)
{
List
<
ScoreRuleBackVO
>
list
=
scoreRuleService
.
getScoreRuleList
(
ids
);
List
<
ScoreRuleBackVO
>
list
=
scoreRuleService
.
getScoreRuleList
(
ids
);
return
success
(
list
);
return
success
(
list
);
}
}
...
@@ -90,24 +93,34 @@ public class ScoreRuleController {
...
@@ -90,24 +93,34 @@ public class ScoreRuleController {
@ApiOperation
(
"启用关闭"
)
@ApiOperation
(
"启用关闭"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
public
CommonResult
<
Boolean
>
updateStatus
(
@Valid
@RequestBody
ScoreRuleStatusReqVO
scoreRuleStatusReqVO
)
{
public
CommonResult
<
Boolean
>
updateStatus
(
@Valid
@RequestBody
ScoreRuleStatusReqVO
scoreRuleStatusReqVO
)
{
Boolean
res
=
scoreRuleService
.
updateStatus
(
scoreRuleStatusReqVO
);
scoreRuleService
.
updateStatus
(
scoreRuleStatusReqVO
);
return
success
(
res
);
return
success
(
true
);
}
}
@PostMapping
(
"/copy"
)
@PostMapping
(
"/copy"
)
@ApiOperation
(
"复制规则"
)
@ApiOperation
(
"复制规则"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:create')"
)
public
CommonResult
<
Long
>
copyScoreRule
(
@NotNull
@RequestBody
Long
id
)
{
public
CommonResult
<
Long
>
copyScoreRule
(
@Valid
@RequestBody
IdReqVo
idReqVo
)
{
Long
newId
=
scoreRuleService
.
copyScoreRule
(
id
);
return
success
(
scoreRuleService
.
copyScoreRule
(
idReqVo
.
getId
()));
return
success
(
id
);
}
}
@PostMapping
(
"/delay"
)
@PostMapping
(
"/delay"
)
@ApiOperation
(
"延期规则"
)
@ApiOperation
(
"延期规则"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:update')"
)
public
CommonResult
<
Boolean
>
delayScoreRule
(
@Valid
@RequestBody
ScoreDelayReqVO
scoreDelayReqVO
)
{
public
CommonResult
<
Boolean
>
delayScoreRule
(
@Valid
@RequestBody
ScoreDelayReqVO
scoreDelayReqVO
)
{
Boolean
res
=
scoreRuleService
.
delayScoreRule
(
scoreDelayReqVO
);
scoreRuleService
.
delayScoreRule
(
scoreDelayReqVO
);
return
success
(
res
);
return
success
(
true
);
}
@GetMapping
(
"/getWarehouseTreeRegionList"
)
@ApiOperation
(
"获得目的国、目的城市、目的仓列表"
)
public
CommonResult
<
List
<
WarehouseTreeRegionVO
>>
WarehouseTreeRegionList
()
{
List
<
WarehouseTreeRegionVO
>
listIn
=
warehouseService
.
getWarehouseTreeRegionList
(
1
);
List
<
WarehouseTreeRegionVO
>
listOut
=
warehouseService
.
getWarehouseTreeRegionList
(
2
);
List
<
WarehouseTreeRegionVO
>
list
=
ListUtils
.
sum
(
listIn
,
listOut
);
return
success
(
list
);
}
}
@GetMapping
(
"/export-excel"
)
@GetMapping
(
"/export-excel"
)
@ApiOperation
(
"导出积分规则Excel"
)
@ApiOperation
(
"导出积分规则Excel"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:export')"
)
@PreAuthorize
(
"@ss.hasPermission('member:score-rule:export')"
)
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/scoreRule/ScoreRuleDO.java
View file @
32b80572
...
@@ -71,7 +71,7 @@ public class ScoreRuleDO extends BaseDO {
...
@@ -71,7 +71,7 @@ public class ScoreRuleDO extends BaseDO {
/**
/**
* 积分有效期
* 积分有效期
*/
*/
private
Integer
s
oc
rePeriod
;
private
Integer
s
co
rePeriod
;
/**
/**
* 排序值
* 排序值
*/
*/
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/dal/mysql/scoreRule/ScoreRuleMapper.java
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
member
.
dal
.
mysql
.
scoreRule
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
dal
.
mysql
.
scoreRule
;
import
java.util.*
;
import
java.util.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.common.pojo.PageResult
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.mapper.AbstractMapper
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.framework.mybatis.core.vo.PageVO
;
import
cn.iocoder.yudao.module.member.enums.RelationSymbolEnum
;
import
cn.iocoder.yudao.module.member.vo.scoreRule.ScoreRuleQueryVO
;
import
cn.iocoder.yudao.module.member.vo.scoreRule.ScoreRuleQueryVO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
/**
* 积分规则 DO Mapper
* 积分规则 Mapper
*
* @author 系统管理员
* @author 系统管理员
*/
*/
@Mapper
@Mapper
...
@@ -18,58 +22,51 @@ public interface ScoreRuleMapper extends AbstractMapper<ScoreRuleDO> {
...
@@ -18,58 +22,51 @@ public interface ScoreRuleMapper extends AbstractMapper<ScoreRuleDO> {
@Override
@Override
default
PageResult
<
ScoreRuleDO
>
selectPage
(
PageVO
page
,
Object
object
)
{
default
PageResult
<
ScoreRuleDO
>
selectPage
(
PageVO
page
,
Object
object
)
{
if
(
object
instanceof
ScoreRuleQueryVO
)
{
if
(
object
instanceof
ScoreRuleQueryVO
)
{
ScoreRuleQueryVO
vo
=
(
ScoreRuleQueryVO
)
object
;
ScoreRuleQueryVO
vo
=
(
ScoreRuleQueryVO
)
object
;
return
selectPage
(
page
,
new
LambdaQuery
<
ScoreRuleDO
>()
LambdaQueryWrapperX
<
ScoreRuleDO
>
queryWrapperX
=
new
LambdaQuery
<
ScoreRuleDO
>()
.
eqIfPresent
(
ScoreRuleDO:
:
getType
,
vo
.
getType
())
.
eqIfPresent
(
ScoreRuleDO:
:
getType
,
vo
.
getType
())
.
eqIfPresent
(
ScoreRuleDO:
:
getTitleZh
,
vo
.
getTitleZh
())
.
eqIfPresent
(
ScoreRuleDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
ScoreRuleDO:
:
getTitleEn
,
vo
.
getTitleEn
())
.
betweenIfPresent
(
ScoreRuleDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
eqIfPresent
(
ScoreRuleDO:
:
getDescZh
,
vo
.
getDescZh
())
.
orderByDesc
(
ScoreRuleDO:
:
getId
);
.
eqIfPresent
(
ScoreRuleDO:
:
getDescEn
,
vo
.
getDescEn
())
if
(
vo
.
getGetScoreOnceSymbol
()
!=
null
&&
vo
.
getGetScoreOnce
()
!=
null
)
{
.
eqIfPresent
(
ScoreRuleDO:
:
getCoverImageZh
,
vo
.
getCoverImageZh
())
queryWrapperX
.
gt
(
vo
.
getGetScoreOnceSymbol
()
==
RelationSymbolEnum
.
GT
.
getValue
(),
ScoreRuleDO:
:
getGetScoreOnce
,
vo
.
getGetScoreOnce
())
.
eqIfPresent
(
ScoreRuleDO:
:
getCoverImageEn
,
vo
.
getCoverImageEn
())
.
eq
(
vo
.
getGetScoreOnceSymbol
()
==
RelationSymbolEnum
.
EQ
.
getValue
(),
ScoreRuleDO:
:
getGetScoreOnce
,
vo
.
getGetScoreOnce
())
.
eqIfPresent
(
ScoreRuleDO:
:
getGetScoreOnce
,
vo
.
getGetScoreOnce
())
.
lt
(
vo
.
getGetScoreOnceSymbol
()
==
RelationSymbolEnum
.
LT
.
getValue
(),
ScoreRuleDO:
:
getGetScoreOnce
,
vo
.
getGetScoreOnce
());
.
eqIfPresent
(
ScoreRuleDO:
:
getMaxScoreTotal
,
vo
.
getMaxScoreTotal
())
}
.
betweenIfPresent
(
ScoreRuleDO:
:
getStartTime
,
vo
.
getBeginStartTime
(),
vo
.
getEndStartTime
())
if
(
vo
.
getMaxScoreTotalSymbol
()
!=
null
&&
vo
.
getMaxScoreTotal
()
!=
null
)
{
.
betweenIfPresent
(
ScoreRuleDO:
:
getEndTime
,
vo
.
getBeginEndTime
(),
vo
.
getEndEndTime
())
queryWrapperX
.
gt
(
vo
.
getMaxScoreTotalSymbol
()
==
RelationSymbolEnum
.
GT
.
getValue
(),
ScoreRuleDO:
:
getMaxScoreTotal
,
vo
.
getMaxScoreTotal
())
.
eqIfPresent
(
ScoreRuleDO:
:
getSocrePeriod
,
vo
.
getSocrePeriod
())
.
eq
(
vo
.
getMaxScoreTotalSymbol
()
==
RelationSymbolEnum
.
EQ
.
getValue
(),
ScoreRuleDO:
:
getMaxScoreTotal
,
vo
.
getMaxScoreTotal
())
.
eqIfPresent
(
ScoreRuleDO:
:
getOrderNum
,
vo
.
getOrderNum
())
.
lt
(
vo
.
getMaxScoreTotalSymbol
()
==
RelationSymbolEnum
.
LT
.
getValue
(),
ScoreRuleDO:
:
getMaxScoreTotal
,
vo
.
getMaxScoreTotal
());
.
eqIfPresent
(
ScoreRuleDO:
:
getPushActivity
,
vo
.
getPushActivity
())
}
.
eqIfPresent
(
ScoreRuleDO:
:
getShowPlatform
,
vo
.
getShowPlatform
())
queryWrapperX
.
and
(
vo
.
getTitle
()
!=
null
,
wrapper
->
.
eqIfPresent
(
ScoreRuleDO:
:
getStatus
,
vo
.
getStatus
())
wrapper
.
like
(
ScoreRuleDO:
:
getTitleEn
,
vo
.
getTitle
())
.
eqIfPresent
(
ScoreRuleDO:
:
getExtra
,
vo
.
getExtra
())
.
or
()
.
betweenIfPresent
(
ScoreRuleDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
like
(
ScoreRuleDO:
:
getTitleZh
,
vo
.
getTitle
())
.
orderByDesc
(
ScoreRuleDO:
:
getId
));
}
);
queryWrapperX
.
and
(
vo
.
getDesc
()
!=
null
,
wrapper
->
wrapper
.
like
(
ScoreRuleDO:
:
getDescZh
,
vo
.
getDesc
())
.
or
()
.
like
(
ScoreRuleDO:
:
getDescEn
,
vo
.
getDesc
())
);
return
selectPage
(
page
,
queryWrapperX
);
}
return
null
;
return
null
;
}
}
@Override
@Override
default
List
<
ScoreRuleDO
>
selectList
(
Object
object
)
{
default
List
<
ScoreRuleDO
>
selectList
(
Object
object
)
{
if
(
object
instanceof
ScoreRuleQueryVO
)
{
if
(
object
instanceof
ScoreRuleQueryVO
)
{
ScoreRuleQueryVO
vo
=
(
ScoreRuleQueryVO
)
object
;
ScoreRuleQueryVO
vo
=
(
ScoreRuleQueryVO
)
object
;
return
selectList
(
new
LambdaQuery
<
ScoreRuleDO
>()
return
selectList
(
new
LambdaQuery
<
ScoreRuleDO
>()
.
eqIfPresent
(
ScoreRuleDO:
:
getType
,
vo
.
getType
())
.
eqIfPresent
(
ScoreRuleDO:
:
getType
,
vo
.
getType
())
.
eqIfPresent
(
ScoreRuleDO:
:
getTitleZh
,
vo
.
getTitleZh
())
.
eqIfPresent
(
ScoreRuleDO:
:
getGetScoreOnce
,
vo
.
getGetScoreOnce
())
.
eqIfPresent
(
ScoreRuleDO:
:
getTitleEn
,
vo
.
getTitleEn
())
.
eqIfPresent
(
ScoreRuleDO:
:
getMaxScoreTotal
,
vo
.
getMaxScoreTotal
())
.
eqIfPresent
(
ScoreRuleDO:
:
getDescZh
,
vo
.
getDescZh
())
.
eqIfPresent
(
ScoreRuleDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
ScoreRuleDO:
:
getDescEn
,
vo
.
getDescEn
())
.
betweenIfPresent
(
ScoreRuleDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
eqIfPresent
(
ScoreRuleDO:
:
getCoverImageZh
,
vo
.
getCoverImageZh
())
.
eqIfPresent
(
ScoreRuleDO:
:
getCoverImageEn
,
vo
.
getCoverImageEn
())
.
eqIfPresent
(
ScoreRuleDO:
:
getGetScoreOnce
,
vo
.
getGetScoreOnce
())
.
eqIfPresent
(
ScoreRuleDO:
:
getMaxScoreTotal
,
vo
.
getMaxScoreTotal
())
.
betweenIfPresent
(
ScoreRuleDO:
:
getStartTime
,
vo
.
getBeginStartTime
(),
vo
.
getEndStartTime
())
.
betweenIfPresent
(
ScoreRuleDO:
:
getEndTime
,
vo
.
getBeginEndTime
(),
vo
.
getEndEndTime
())
.
eqIfPresent
(
ScoreRuleDO:
:
getSocrePeriod
,
vo
.
getSocrePeriod
())
.
eqIfPresent
(
ScoreRuleDO:
:
getOrderNum
,
vo
.
getOrderNum
())
.
eqIfPresent
(
ScoreRuleDO:
:
getPushActivity
,
vo
.
getPushActivity
())
.
eqIfPresent
(
ScoreRuleDO:
:
getShowPlatform
,
vo
.
getShowPlatform
())
.
eqIfPresent
(
ScoreRuleDO:
:
getStatus
,
vo
.
getStatus
())
.
eqIfPresent
(
ScoreRuleDO:
:
getExtra
,
vo
.
getExtra
())
.
betweenIfPresent
(
ScoreRuleDO:
:
getCreateTime
,
vo
.
getBeginCreateTime
(),
vo
.
getEndCreateTime
())
.
orderByDesc
(
ScoreRuleDO:
:
getId
));
.
orderByDesc
(
ScoreRuleDO:
:
getId
));
}
}
return
null
;
return
null
;
}
}
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/job/ScoreRuleExpireTask.java
0 → 100644
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
member
.
job
;
import
cn.iocoder.yudao.framework.common.util.date.DateUtils
;
import
cn.iocoder.yudao.framework.mybatis.core.query.LambdaQuery
;
import
cn.iocoder.yudao.framework.quartz.core.handler.JobHandler
;
import
cn.iocoder.yudao.module.member.dal.dataobject.scoreRule.ScoreRuleDO
;
import
cn.iocoder.yudao.module.member.enums.ScoreRuleStatusEnum
;
import
cn.iocoder.yudao.module.member.service.scoreRule.ScoreRuleService
;
import
com.baomidou.mybatisplus.core.toolkit.CollectionUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
import
javax.annotation.Resource
;
import
java.util.Date
;
import
java.util.List
;
/**
* 会员积分过期定时任务
*/
@Component
@Slf4j
public
class
ScoreRuleExpireTask
implements
JobHandler
{
/**
* 积分规则的过期时间为每日的0点整
* 任务每天0点整运行,扫描当天0点过期的积分进行状态修改
* @param param 参数
* @return
* @throws Exception
*/
@Resource
private
ScoreRuleService
scoreRuleService
;
@Override
public
String
execute
(
String
param
)
throws
Exception
{
log
.
info
(
"score rule expire task running"
);
LambdaQuery
<
ScoreRuleDO
>
scoreRuleDOLambdaQuery
=
new
LambdaQuery
<>();
scoreRuleDOLambdaQuery
.
eq
(
ScoreRuleDO:
:
getStatus
,
ScoreRuleStatusEnum
.
ENABLED
.
getValue
());
scoreRuleDOLambdaQuery
.
le
(
ScoreRuleDO:
:
getEndTime
,
DateUtils
.
getNextNDayStart
(
new
Date
(),
0
));
List
<
ScoreRuleDO
>
todoList
=
scoreRuleService
.
selectList
(
scoreRuleDOLambdaQuery
);
log
.
info
(
"score rule expire task, to expire rule count :{}"
,
todoList
.
size
());
if
(
CollectionUtils
.
isEmpty
(
todoList
))
{
return
"success"
;
}
else
{
todoList
.
forEach
(
scoreRuleDO
->
scoreRuleDO
.
setStatus
(
ScoreRuleStatusEnum
.
EXPIRED
.
getValue
()));
scoreRuleService
.
updateBatch
(
todoList
);
}
return
"success"
;
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleService.java
View file @
32b80572
...
@@ -72,7 +72,7 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
...
@@ -72,7 +72,7 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
* @param scoreRuleStatusReqVO 积分规则状态
* @param scoreRuleStatusReqVO 积分规则状态
* @return
* @return
*/
*/
Boolean
updateStatus
(
ScoreRuleStatusReqVO
scoreRuleStatusReqVO
);
void
updateStatus
(
ScoreRuleStatusReqVO
scoreRuleStatusReqVO
);
/**
/**
* 积分规则复制
* 积分规则复制
...
@@ -86,5 +86,5 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
...
@@ -86,5 +86,5 @@ public interface ScoreRuleService extends IService<ScoreRuleDO> {
* @param scoreDelayReqVO 积分规则延期
* @param scoreDelayReqVO 积分规则延期
* @return
* @return
*/
*/
Boolean
delayScoreRule
(
ScoreDelayReqVO
scoreDelayReqVO
);
void
delayScoreRule
(
ScoreDelayReqVO
scoreDelayReqVO
);
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/service/scoreRule/ScoreRuleServiceImpl.java
View file @
32b80572
This diff is collapsed.
Click to expand it.
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/scoreRule/IdReqVo.java
0 → 100644
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
scoreRule
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotNull
;
@Data
@ApiModel
(
"管理后台 - 积分规则id请求 VO"
)
public
class
IdReqVo
{
@ApiModelProperty
(
value
=
"主键"
,
required
=
true
)
@NotNull
(
message
=
"主键不能为空"
)
private
Long
id
;
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/scoreRule/ScoreRuleBaseVO.java
View file @
32b80572
...
@@ -24,7 +24,7 @@ public class ScoreRuleBaseVO {
...
@@ -24,7 +24,7 @@ public class ScoreRuleBaseVO {
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
value
=
"规则标题中文"
,
required
=
true
)
@ApiModelProperty
(
value
=
"规则标题中文"
,
required
=
true
)
@Not
Null
(
message
=
"规则标题中文不能为空"
)
@Not
Blank
(
message
=
"规则标题中文不能为空"
)
private
String
titleZh
;
private
String
titleZh
;
@ApiModelProperty
(
value
=
"规则标题英文"
,
required
=
true
)
@ApiModelProperty
(
value
=
"规则标题英文"
,
required
=
true
)
...
...
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/scoreRule/ScoreRuleQueryVO.java
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
scoreRule
;
package
cn
.
iocoder
.
yudao
.
module
.
member
.
vo
.
scoreRule
;
import
lombok.*
;
import
lombok.*
;
import
java.util.*
;
import
java.util.*
;
import
io.swagger.annotations.*
;
import
io.swagger.annotations.*
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
cn.iocoder.yudao.framework.common.pojo.PageParam
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
...
@@ -15,64 +17,25 @@ public class ScoreRuleQueryVO {
...
@@ -15,64 +17,25 @@ public class ScoreRuleQueryVO {
@ApiModelProperty
(
value
=
"指标类型"
)
@ApiModelProperty
(
value
=
"指标类型"
)
private
Integer
type
;
private
Integer
type
;
@ApiModelProperty
(
value
=
"规则标题中文"
)
@ApiModelProperty
(
value
=
"规则标题"
)
private
String
titleZh
;
private
String
title
;
@ApiModelProperty
(
value
=
"规则标题英文"
)
private
String
titleEn
;
@ApiModelProperty
(
value
=
"规则说明中文"
)
private
String
descZh
;
@ApiModelProperty
(
value
=
"规则说明英文"
)
private
String
descEn
;
@ApiModelProperty
(
value
=
"封面图中文"
)
@ApiModelProperty
(
value
=
"规则说明"
)
private
String
coverImageZh
;
private
String
desc
;
@ApiModelProperty
(
value
=
"封面图英文"
)
private
String
coverImageEn
;
@ApiModelProperty
(
value
=
"单次获取积分数查询条件(1大于,2等于,3小于)"
)
private
Integer
getScoreOnceSymbol
;
@ApiModelProperty
(
value
=
"单次获取积分数"
)
@ApiModelProperty
(
value
=
"单次获取积分数"
)
private
Integer
getScoreOnce
;
private
Integer
getScoreOnce
;
@ApiModelProperty
(
value
=
"单次获取积分数查询条件(1大于,2等于,3小于)"
)
private
Integer
maxScoreTotalSymbol
;
@ApiModelProperty
(
value
=
"累积最高积分"
)
@ApiModelProperty
(
value
=
"累积最高积分"
)
private
Integer
maxScoreTotal
;
private
Integer
maxScoreTotal
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始活动开始时间"
)
private
Date
beginStartTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束活动开始时间"
)
private
Date
endStartTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始活动结束时间"
)
private
Date
beginEndTime
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束活动结束时间"
)
private
Date
endEndTime
;
@ApiModelProperty
(
value
=
"积分有效期"
)
private
Integer
socrePeriod
;
@ApiModelProperty
(
value
=
"排序值"
)
private
Integer
orderNum
;
@ApiModelProperty
(
value
=
"是否推送"
)
private
Integer
pushActivity
;
@ApiModelProperty
(
value
=
"展示平台"
)
private
String
showPlatform
;
@ApiModelProperty
(
value
=
"活动状态"
)
@ApiModelProperty
(
value
=
"活动状态"
)
private
Integer
status
;
private
Integer
status
;
@ApiModelProperty
(
value
=
"扩展字段"
)
private
String
extra
;
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"开始创建时间"
)
@ApiModelProperty
(
value
=
"开始创建时间"
)
private
Date
beginCreateTime
;
private
Date
beginCreateTime
;
...
@@ -80,5 +43,4 @@ public class ScoreRuleQueryVO {
...
@@ -80,5 +43,4 @@ public class ScoreRuleQueryVO {
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@DateTimeFormat
(
pattern
=
FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND
)
@ApiModelProperty
(
value
=
"结束创建时间"
)
@ApiModelProperty
(
value
=
"结束创建时间"
)
private
Date
endCreateTime
;
private
Date
endCreateTime
;
}
}
yudao-module-member/yudao-module-member-impl/src/main/java/cn/iocoder/yudao/module/member/vo/scoreRule/extra/ScoreRuleShareExtraVO.java
View file @
32b80572
...
@@ -14,5 +14,5 @@ public class ScoreRuleShareExtraVO {
...
@@ -14,5 +14,5 @@ public class ScoreRuleShareExtraVO {
@ApiModelProperty
(
value
=
"活动链接"
,
required
=
true
)
@ApiModelProperty
(
value
=
"活动链接"
,
required
=
true
)
private
String
activityUrl
;
private
String
activityUrl
;
@ApiModelProperty
(
value
=
"是否分享(0是,1否)默认是"
,
required
=
true
)
@ApiModelProperty
(
value
=
"是否分享(0是,1否)默认是"
,
required
=
true
)
private
String
shareStatus
;
private
Integer
shareStatus
;
}
}
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/convert/channel/ChannelConvert.java
View file @
32b80572
...
@@ -26,6 +26,7 @@ public interface ChannelConvert {
...
@@ -26,6 +26,7 @@ public interface ChannelConvert {
ChannelRespVO
convert
(
ChannelDO
bean
);
ChannelRespVO
convert
(
ChannelDO
bean
);
List
<
ChannelRespVO
>
convertList
(
List
<
ChannelDO
>
list
);
List
<
ChannelRespVO
>
convertList
(
List
<
ChannelDO
>
list
);
List
<
ChannelSimpleRespVO
>
convertSimpleList
(
List
<
ChannelDO
>
list
);
PageResult
<
ChannelRespVO
>
convertPage
(
PageResult
<
ChannelDO
>
page
);
PageResult
<
ChannelRespVO
>
convertPage
(
PageResult
<
ChannelDO
>
page
);
...
...
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/service/channel/ChannelService.java
View file @
32b80572
...
@@ -86,4 +86,6 @@ public interface ChannelService extends IService<ChannelDO> {
...
@@ -86,4 +86,6 @@ public interface ChannelService extends IService<ChannelDO> {
* @return 渠道管理分页
* @return 渠道管理分页
*/
*/
PageResult
<
ChannelRespVO
>
channelPage
(
ChannelPageReqVO
pageVO
);
PageResult
<
ChannelRespVO
>
channelPage
(
ChannelPageReqVO
pageVO
);
List
<
ChannelDO
>
getChannelSimpleList
();
}
}
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/service/channel/impl/ChannelServiceImpl.java
View file @
32b80572
...
@@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.sale.service.channel.ChannelService;
...
@@ -19,6 +19,7 @@ import cn.iocoder.yudao.module.sale.service.channel.ChannelService;
import
cn.iocoder.yudao.module.sale.service.channelPackaging.ChannelPackagingService
;
import
cn.iocoder.yudao.module.sale.service.channelPackaging.ChannelPackagingService
;
import
cn.iocoder.yudao.module.sale.service.channelPriceStepClearance.ChannelPriceStepClearanceService
;
import
cn.iocoder.yudao.module.sale.service.channelPriceStepClearance.ChannelPriceStepClearanceService
;
import
cn.iocoder.yudao.module.sale.vo.channel.*
;
import
cn.iocoder.yudao.module.sale.vo.channel.*
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -233,4 +234,9 @@ public class ChannelServiceImpl extends AbstractService<ChannelMapper, ChannelDO
...
@@ -233,4 +234,9 @@ public class ChannelServiceImpl extends AbstractService<ChannelMapper, ChannelDO
List
<
ChannelRespVO
>
channelList
=
pageResult
.
getList
();
List
<
ChannelRespVO
>
channelList
=
pageResult
.
getList
();
return
pageResult
;
return
pageResult
;
}
}
@Override
public
List
<
ChannelDO
>
getChannelSimpleList
()
{
return
channelMapper
.
selectList
(
new
LambdaQueryWrapper
<
ChannelDO
>());
}
}
}
yudao-module-sale/yudao-module-sale-core/src/main/java/cn/iocoder/yudao/module/sale/vo/channel/ChannelSimpleRespVO.java
0 → 100644
View file @
32b80572
package
cn
.
iocoder
.
yudao
.
module
.
sale
.
vo
.
channel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
@ApiModel
(
"渠道精简信息 Response VO"
)
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
ChannelSimpleRespVO
{
@ApiModelProperty
(
value
=
""
,
required
=
true
)
private
Long
channelId
;
@ApiModelProperty
(
value
=
"中文标题"
)
private
String
nameZh
;
@ApiModelProperty
(
value
=
"英文标题"
)
private
String
nameEn
;
}
\ No newline at end of file
yudao-module-sale/yudao-module-sale-rest/src/main/java/cn/iocoder/yudao/module/sale/controller/admin/channel/ChannelController.java
View file @
32b80572
...
@@ -110,6 +110,13 @@ public class ChannelController {
...
@@ -110,6 +110,13 @@ public class ChannelController {
return
success
(
ChannelConvert
.
INSTANCE
.
convertList
(
list
));
return
success
(
ChannelConvert
.
INSTANCE
.
convertList
(
list
));
}
}
@GetMapping
(
"/list-all-simple"
)
@ApiOperation
(
value
=
"获得渠道精简信息列表"
,
notes
=
"主要用于前端的下拉选项"
)
public
CommonResult
<
List
<
ChannelSimpleRespVO
>>
getChannelSimpleList
()
{
List
<
ChannelDO
>
list
=
channelService
.
getChannelSimpleList
();
return
success
(
ChannelConvert
.
INSTANCE
.
convertSimpleList
(
list
));
}
@GetMapping
(
"/select"
)
@GetMapping
(
"/select"
)
@ApiOperation
(
"获得可用渠道列表查询(参数可选择一个,最终以目的地国家来查询,不传代表查询所有)"
)
@ApiOperation
(
"获得可用渠道列表查询(参数可选择一个,最终以目的地国家来查询,不传代表查询所有)"
)
@ApiImplicitParams
({
@ApiImplicitParams
({
...
...
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