Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
1c78c520
Commit
1c78c520
authored
Jul 25, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/base-modify' into base-modify
parents
7df6b31d
91196d8b
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
592 additions
and
92 deletions
+592
-92
AppUserManageDTO.java
...m/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
+2
-2
AppUserLoginBiz.java
...om/github/wxiaoqi/security/admin/biz/AppUserLoginBiz.java
+10
-0
AppUserManageBiz.java
...m/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
+2
-1
AppUsersManageController.java
...wxiaoqi/security/admin/rest/AppUsersManageController.java
+21
-10
GroupController.java
...m/github/wxiaoqi/security/admin/rest/GroupController.java
+5
-0
AppUserDetailMapper.xml
...e-admin/src/main/resources/mapper/AppUserDetailMapper.xml
+11
-7
ActivityList.java
.../java/com/xxfc/platform/activity/entity/ActivityList.java
+3
-0
ActivityManagement.java
...com/xxfc/platform/activity/entity/ActivityManagement.java
+10
-2
ActivityPopup.java
...java/com/xxfc/platform/activity/entity/ActivityPopup.java
+3
-1
HomeActivities.java
...ava/com/xxfc/platform/activity/entity/HomeActivities.java
+102
-0
ActivitiesQuery.java
...n/java/com/xxfc/platform/activity/vo/ActivitiesQuery.java
+11
-0
ActivityManagementQuery.java
...om/xxfc/platform/activity/vo/ActivityManagementQuery.java
+7
-0
PopupQuery.java
...c/main/java/com/xxfc/platform/activity/vo/PopupQuery.java
+14
-0
Query.java
...pi/src/main/java/com/xxfc/platform/activity/vo/Query.java
+13
-0
ActivityListBiz.java
.../java/com/xxfc/platform/activity/biz/ActivityListBiz.java
+0
-1
ActivityManagementBiz.java
...com/xxfc/platform/activity/biz/ActivityManagementBiz.java
+8
-6
ActivityPopupBiz.java
...java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
+24
-5
HomeActivitiesBiz.java
...ava/com/xxfc/platform/activity/biz/HomeActivitiesBiz.java
+59
-0
UserCouponBiz.java
...in/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
+18
-4
HomeActivitiesMapper.java
...m/xxfc/platform/activity/mapper/HomeActivitiesMapper.java
+10
-0
ActivityListController.java
...m/xxfc/platform/activity/rest/ActivityListController.java
+0
-2
ActivityManagementController.java
.../platform/activity/rest/ActivityManagementController.java
+6
-5
ActivityPopupController.java
.../xxfc/platform/activity/rest/ActivityPopupController.java
+3
-0
ActivityPopupManageController.java
...platform/activity/rest/ActivityPopupManageController.java
+74
-0
DateController.java
.../java/com/xxfc/platform/activity/rest/DateController.java
+6
-1
HomeActivitiesController.java
...xxfc/platform/activity/rest/HomeActivitiesController.java
+79
-0
DailyOrderStatistics.java
.../com/xxfc/platform/order/entity/DailyOrderStatistics.java
+14
-0
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+6
-0
BaseOrderMapper.java
.../java/com/xxfc/platform/order/mapper/BaseOrderMapper.java
+2
-0
BaseOrderMapper.xml
...rder-server/src/main/resources/mapper/BaseOrderMapper.xml
+69
-45
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/dto/AppUserManageDTO.java
View file @
1c78c520
...
...
@@ -24,7 +24,7 @@ public class AppUserManageDTO {
/**
* 手机号
*/
private
Integer
mobile
;
private
String
mobile
;
/**
* 注册终端
...
...
@@ -32,7 +32,7 @@ public class AppUserManageDTO {
private
Integer
channel
;
/**
* 会员等级
* 会员等级
(-1为全不会员)
*/
private
Integer
memberLevel
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserLoginBiz.java
View file @
1c78c520
...
...
@@ -12,6 +12,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.time.Instant
;
import
java.util.HashMap
;
...
...
@@ -205,4 +206,13 @@ public class AppUserLoginBiz extends BaseBiz<AppUserLoginMapper, AppUserLogin> {
criteria
.
andIn
(
"username"
,
phons
);
mapper
.
deleteByExample
(
example
);
}
// @CacheClear(pre = "appUser{1}")
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAppUserById
(
Integer
id
)
{
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
appUserLogin
.
setId
(
id
);
appUserLogin
.
setIsdel
(
0
);
mapper
.
updateByPrimaryKeySelective
(
appUserLogin
);
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/AppUserManageBiz.java
View file @
1c78c520
...
...
@@ -80,6 +80,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
* 禁用账户
* @param id
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
deleteAppUser
(
Integer
id
,
Integer
isDel
)
{
AppUserLogin
appUserLogin
=
new
AppUserLogin
();
...
...
@@ -111,7 +112,7 @@ public class AppUserManageBiz extends BaseBiz<AppUserDetailMapper, AppUserDetail
}
/**
*
*
保存
* @param appUserVo
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppUsersManageController.java
View file @
1c78c520
...
...
@@ -34,16 +34,16 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
return
ObjectRestResponse
.
succ
(
baseBiz
.
findAllByQuery
(
appUserManageDTO
));
}
/**
* 禁用
* @param id
* @return
*/
@DeleteMapping
(
"/deleteById/{id}/{isDel}"
)
public
ObjectRestResponse
deleteById
(
@PathVariable
Integer
id
,
@PathVariable
Integer
isDel
){
baseBiz
.
deleteAppUser
(
id
,
isDel
);
return
ObjectRestResponse
.
succ
();
}
//
/**
//
* 禁用
//
* @param id
//
* @return
//
*/
//
@DeleteMapping("/deleteById/{id}/{isDel}")
//
public ObjectRestResponse deleteById(@PathVariable Integer id,@PathVariable Integer isDel){
//
baseBiz.deleteAppUser(id,isDel);
//
return ObjectRestResponse.succ();
//
}
/**
* 查询一条
...
...
@@ -94,6 +94,17 @@ public class AppUsersManageController extends BaseController<AppUserManageBiz,Ap
return
ObjectRestResponse
.
succ
();
}
/**
* 删除用户
* @param id
* @return
*/
@DeleteMapping
(
"/deleteById/{id}"
)
public
ObjectRestResponse
deleteById
(
@PathVariable
Integer
id
){
appUserLoginBiz
.
deleteAppUserById
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/GroupController.java
View file @
1c78c520
...
...
@@ -103,6 +103,11 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return
new
ObjectRestResponse
().
data
(
baseBiz
.
getAuthorityElement
(
id
)).
rel
(
true
);
}
@RequestMapping
(
value
=
"/getGroups"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
GroupUsers
>
getGroups
(){
return
new
ObjectRestResponse
<
GroupUsers
>().
rel
(
true
).
data
(
baseBiz
.
selectListAll
());
}
@RequestMapping
(
value
=
"/tree"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
...
...
ace-modules/ace-admin/src/main/resources/mapper/AppUserDetailMapper.xml
View file @
1c78c520
...
...
@@ -95,23 +95,27 @@
) m
on
l.id = m.user_id
where
1=1
<if
test=
"mobile !=null"
>
where
l.isdel = 0
<if
test=
"mobile !=null
and mobile !=''
"
>
and l.username like CONCAT('%',#{mobile},'%')
</if>
<if
test=
"channel !=null"
>
<if
test=
"channel !=null
"
>
and d.channel=#{channel}
</if>
<if
test=
"memberLevel !=null"
>
<if
test=
"memberLevel !=null
and memberLevel != -1
"
>
and m.member_level = #{memberLevel}
</if>
<if
test=
"registrationTimeBegin !=null"
>
<if
test=
"memberLevel == -1"
>
and m.member_level in (select level from base_user_member_level)
</if>
<if
test=
"registrationTimeBegin !=null "
>
and l.createtime
>
= #{registrationTimeBegin}
</if>
<if
test=
"registrationTimeEnd !=null"
>
<if
test=
"registrationTimeEnd !=null
"
>
and l.createtime
<
= #{registrationTimeEnd}
</if>
<if
test=
"source !=null"
>
<if
test=
"source !=null
"
>
and d.source = #{source}
</if>
order by l.id ASC
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityList.java
View file @
1c78c520
...
...
@@ -115,4 +115,7 @@ public class ActivityList implements Serializable {
@ApiModelProperty
(
"活动时期类型:0-永久,1-有期限"
)
private
Integer
timeType
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityManagement.java
View file @
1c78c520
...
...
@@ -57,10 +57,10 @@ public class ActivityManagement {
private
Integer
hasJoinNum
;
/**
* 当前状态 1--
显示在活动页 2--隐藏
* 当前状态 1--
上架 2--下架
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"当前状态 1--
显示在活动页 2--隐藏
"
)
@ApiModelProperty
(
value
=
"当前状态 1--
上架 2--下架
"
)
private
Integer
status
;
/**
...
...
@@ -90,4 +90,12 @@ public class ActivityManagement {
@Column
(
name
=
"url"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
private
String
url
;
/**
* 活动时期类型:0-永久,1-有期限
*/
@Column
(
name
=
"time_type"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
private
String
timeType
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/ActivityPopup.java
View file @
1c78c520
...
...
@@ -36,7 +36,6 @@ public class ActivityPopup {
private
String
background
;
@Column
(
name
=
"start_time"
)
private
BigInteger
startTime
;
...
...
@@ -56,6 +55,9 @@ public class ActivityPopup {
private
BigInteger
updTime
;
@Column
(
name
=
"is_del"
)
private
Integer
isDel
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/entity/HomeActivities.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
javax.persistence.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* 精彩活动
* @author Administrator
*/
@Data
@Table
(
name
=
"home_activities"
)
public
class
HomeActivities
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
/**
* 主键
*/
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
@ApiModelProperty
(
"主键"
)
private
Integer
id
;
/**
* 创建时间
*/
@Column
(
name
=
"crt_time"
)
@ApiModelProperty
(
value
=
"创建时间"
,
hidden
=
true
)
private
Long
crtTime
;
/**
* 更新时间
*/
@Column
(
name
=
"upd_time"
)
@ApiModelProperty
(
value
=
"更新时间"
,
hidden
=
true
)
private
Long
updTime
;
/**
* 活动名称
*/
@Column
(
name
=
"name"
)
@ApiModelProperty
(
value
=
"精彩活动名称"
)
private
String
name
;
/**
* 精彩活动开始时间
*/
@Column
(
name
=
"start_time"
)
@ApiModelProperty
(
value
=
"活动开始时间"
)
private
Long
startTime
;
/**
* 精彩活动结束时间
*/
@Column
(
name
=
"end_time"
)
@ApiModelProperty
(
value
=
"活动结束时间"
)
private
Long
endTime
;
/**
* 当前状态 1--显示在活动页 2--隐藏
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"当前状态 1--显示在活动页 2--隐藏"
)
private
Integer
status
;
/**
* 排序
*/
@Column
(
name
=
"sort"
)
@ApiModelProperty
(
value
=
"排序"
)
private
Integer
sort
;
/**
* 活动图片
*/
@Column
(
name
=
"picture"
)
@ApiModelProperty
(
value
=
"活动图片"
)
private
String
picture
;
/**
* 活动页面链接
*/
@Column
(
name
=
"url"
)
@ApiModelProperty
(
value
=
"活动页面链接"
)
private
String
url
;
/**
* 是否删除:0-否,1-是
*/
@Column
(
name
=
"is_del"
)
@ApiModelProperty
(
value
=
"是否删除"
)
private
Integer
isDel
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/ActivitiesQuery.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
public
class
ActivitiesQuery
extends
Query
{
private
String
activitiesName
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/ActivityManagementQuery.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
@Data
public
class
ActivityManagementQuery
extends
Query
{
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/PopupQuery.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
net.bytebuddy.implementation.bytecode.assign.TypeCasting
;
/**
* 弹窗搜索条件
* @author Administrator
*/
@Data
public
class
PopupQuery
extends
Query
{
private
String
popupName
;
}
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/vo/Query.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
vo
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
public
class
Query
{
private
Integer
page
;
private
Integer
limit
;
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityListBiz.java
View file @
1c78c520
...
...
@@ -28,7 +28,6 @@ public class ActivityListBiz extends BaseBiz<ActivityListMapper,ActivityList> {
.
andEqualTo
(
ActivityList:
:
getStatus
,
1
)
).
orderByAsc
(
"sort"
).
build
();
List
<
ActivityList
>
activityLists
=
selectByExample
(
exa
);
return
activityLists
;
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityManagementBiz.java
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.ActivityManagement
;
import
com.xxfc.platform.activity.mapper.ActivityManagementMapper
;
import
com.xxfc.platform.activity.vo.ActivityManagementQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.beanutils.BeanUtilsBean
;
import
org.apache.commons.jexl2.UnifiedJEXL
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
...
...
@@ -32,10 +31,13 @@ public class ActivityManagementBiz extends BaseBiz<ActivityManagementMapper, Act
* @return
* @throws InvocationTargetException
* @throws IllegalAccessException
* @param query
*/
public
List
<
ActivityList
>
selectedActivityManagement
()
throws
InvocationTargetException
,
IllegalAccessException
{
public
PageInfo
<
ActivityList
>
selectedActivityManagement
(
ActivityManagementQuery
query
)
throws
InvocationTargetException
,
IllegalAccessException
{
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
ActivityList
>
activityLists
=
activityListBiz
.
selectListAll
();
return
activityLists
;
return
PageInfo
.
of
(
activityLists
)
;
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopupBiz.java
View file @
1c78c520
...
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.biz;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.entity.ActivityPopupUser
;
import
com.xxfc.platform.activity.mapper.ActivityPopupMapper
;
...
...
@@ -49,14 +50,15 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
return
activityPopups
;
}
List
<
Integer
>
collect
=
activityPopups
.
parallelStream
().
map
(
ActivityPopup:
:
getId
).
collect
(
Collectors
.
toList
());
Example
exaple
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
().
andIn
(
ActivityPopupUser:
:
getPopupId
,
collect
)
Example
exaple
=
Example
.
builder
(
ActivityPopupUser
.
class
)
.
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
.
andIn
(
ActivityPopupUser:
:
getPopupId
,
collect
)
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exaple
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
return
activityPopups
;
}
Set
<
Integer
>
popupIdSet
=
activityPopupUsers
.
parallelStream
().
map
(
ActivityPopupUser:
:
getPopupId
).
collect
(
Collectors
.
toSet
());
List
<
ActivityPopup
>
result
=
new
ArrayList
<>();
for
(
ActivityPopup
activityPopup
:
activityPopups
)
{
...
...
@@ -87,21 +89,27 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
.
andLessThanOrEqualTo
(
ActivityPopup:
:
getStartTime
,
BigInteger
.
valueOf
(
System
.
currentTimeMillis
()))
.
andIn
(
ActivityPopup:
:
getType
,
Arrays
.
asList
(
Types
.
split
(
","
)))
.
andEqualTo
(
ActivityPopup:
:
getStatus
,
1
)
.
andEqualTo
(
ActivityPopup:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
List
<
ActivityPopup
>
activityPopups
=
mapper
.
selectByExample
(
exa
);
long
l
=
System
.
currentTimeMillis
();
return
activityPopups
;
}
/**
* 判断是否重复弹窗
* @param userInfo
* @param id
*/
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
void
setActivityPopup
(
AppUserDTO
userInfo
,
Integer
id
){
if
(
userInfo
!=
null
)
{
Example
exa
=
Example
.
builder
(
ActivityPopupUser
.
class
).
where
(
WeekendSqls
.<
ActivityPopupUser
>
custom
()
.
andEqualTo
(
ActivityPopupUser:
:
getPopupId
,
id
)
.
andEqualTo
(
ActivityPopupUser:
:
getUserId
,
userInfo
.
getUserid
())
).
build
();
List
<
ActivityPopupUser
>
activityPopupUsers
=
activityPopupUserBiz
.
selectByExample
(
exa
);
if
(
activityPopupUsers
==
null
||
activityPopupUsers
.
size
()==
0
)
{
ActivityPopupUser
activityPopupUser
=
new
ActivityPopupUser
();
...
...
@@ -114,4 +122,15 @@ public class ActivityPopupBiz extends BaseBiz<ActivityPopupMapper,ActivityPopup>
}
}
public
void
deleteOne
(
Integer
id
)
{
ActivityPopup
activityPopup
=
selectById
(
id
);
if
(
activityPopup
.
getStatus
()==
1
)
{
throw
new
BaseException
(
"Please take it off the shelves first"
);
}
else
{
activityPopup
.
setIsDel
(
1
);
}
updateById
(
activityPopup
);
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/HomeActivitiesBiz.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.HomeActivities
;
import
com.xxfc.platform.activity.mapper.HomeActivitiesMapper
;
import
com.xxfc.platform.activity.vo.ActivitiesQuery
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
tk.mybatis.mapper.weekend.WeekendSqls
;
import
java.util.List
;
/**
* @author Administrator
*/
@Service
public
class
HomeActivitiesBiz
extends
BaseBiz
<
HomeActivitiesMapper
,
HomeActivities
>
{
public
List
<
HomeActivities
>
activities
()
{
long
currentTime
=
System
.
currentTimeMillis
();
Example
exa
=
Example
.
builder
(
HomeActivities
.
class
).
where
(
WeekendSqls
.<
HomeActivities
>
custom
()
.
andGreaterThanOrEqualTo
(
HomeActivities:
:
getEndTime
,
currentTime
)
.
andLessThanOrEqualTo
(
HomeActivities:
:
getStartTime
,
currentTime
)
.
andEqualTo
(
HomeActivities:
:
getStatus
,
1
)
.
andEqualTo
(
HomeActivities:
:
getIsDel
,
0
)
).
orderByAsc
(
"sort"
).
build
();
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
return
activityLists
;
}
public
PageInfo
<
HomeActivities
>
getPage
(
ActivitiesQuery
query
)
{
Example
exa
=
new
Example
(
HomeActivities
.
class
);
if
(
StringUtils
.
isNotBlank
(
query
.
getActivitiesName
())){
exa
.
createCriteria
().
andLike
(
"name"
,
"%"
+
query
.
getActivitiesName
()+
"%"
);
}
exa
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
);
exa
.
orderBy
(
"sort"
).
asc
();
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
HomeActivities
>
activityLists
=
selectByExample
(
exa
);
return
PageInfo
.
of
(
activityLists
);
}
public
void
deleteOne
(
Integer
id
)
{
HomeActivities
homeActivities
=
selectById
(
id
);
if
(
homeActivities
.
getStatus
()==
1
)
{
throw
new
BaseException
(
"Please take it off the shelves first"
);
}
else
{
homeActivities
.
setIsDel
(
1
);
}
updateById
(
homeActivities
);
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/UserCouponBiz.java
View file @
1c78c520
...
...
@@ -269,10 +269,17 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
CollectionUtils
.
isEmpty
(
data
))
{
return
userCouponPag
;
}
Map
<
Integer
,
AppUserLogin
>
userIdAndAppuserLoginMap
=
null
;
if
(
Objects
.
nonNull
(
userCouponFindDTO
.
getPhone
()))
{
List
<
Integer
>
userIds
=
data
.
stream
().
map
(
UserCouponDTO:
:
getUserId
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
AppUserLogin
>
userIdAndAppuserLoginMap
=
new
HashMap
<>();
if
(
StringUtils
.
isEmpty
(
userCouponFindDTO
.
getPhone
()))
{
List
<
Integer
>
userIds
=
data
.
stream
().
map
(
UserCouponDTO:
:
getUserId
).
distinct
().
collect
(
Collectors
.
toList
());
if
(
log
.
isDebugEnabled
()){
log
.
debug
(
"查询的用户ids【{}】"
,
userIds
);
}
userIdAndAppuserLoginMap
=
userFeign
.
findAppUsersByUserIds
(
userIds
);
if
(
log
.
isDebugEnabled
()){
log
.
debug
(
"查询的用户信息【{}】"
,
userIdAndAppuserLoginMap
);
}
}
List
<
UserCouponPageVo
>
userCouponPageVos
=
new
ArrayList
<>();
UserCouponPageVo
userCouponPageVo
;
...
...
@@ -282,7 +289,7 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
if
(
Objects
.
nonNull
(
userCouponFindDTO
.
getPhone
()))
{
userCouponPageVo
.
setPhone
(
userCouponFindDTO
.
getPhone
());
}
else
{
userCouponPageVo
.
setPhone
(
userIdAndAppuserLoginMap
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
())
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
()).
getUsername
());
userCouponPageVo
.
setPhone
(
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
())
==
null
?
""
:
userIdAndAppuserLoginMap
.
get
(
userCouponDTO
.
getUserId
()).
getUsername
());
}
userCouponPageVos
.
add
(
userCouponPageVo
);
}
...
...
@@ -347,4 +354,11 @@ public class UserCouponBiz extends BaseBiz<UserCouponMapper, UserCoupon> {
userInfoDTO
.
setCouponNumber
(
couponNumber
);
return
userInfoDTO
;
}
public
void
deleteByUserIds
(
List
<
Integer
>
userIds
)
{
Example
example
=
new
Example
(
UserCoupon
.
class
);
Example
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIn
(
"userId"
,
userIds
);
mapper
.
deleteByExample
(
example
);
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/mapper/HomeActivitiesMapper.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
mapper
;
import
com.xxfc.platform.activity.entity.HomeActivities
;
import
tk.mybatis.mapper.common.Mapper
;
/**
* @author Administrator
*/
public
interface
HomeActivitiesMapper
extends
Mapper
<
HomeActivities
>
{
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityListController.java
View file @
1c78c520
...
...
@@ -27,6 +27,4 @@ public class ActivityListController extends BaseController<ActivityListBiz,Activ
List
<
ActivityList
>
list
=
baseBiz
.
activities
();
return
ObjectRestResponse
.
succ
(
list
);
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityManagementController.java
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityManagementBiz
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.ActivityManagement
;
import
com.xxfc.platform.activity.vo.ActivityManagementQuery
;
import
org.springframework.web.bind.annotation.*
;
import
java.lang.reflect.InvocationTargetException
;
...
...
@@ -24,11 +26,10 @@ public class ActivityManagementController extends BaseController<ActivityManagem
* @throws InvocationTargetException
* @throws IllegalAccessException
*/
@RequestMapping
(
"/activity/findAll"
)
public
ObjectRestResponse
<
List
<
ActivityManagement
>>
findAll
()
throws
InvocationTargetException
,
IllegalAccessException
{
List
<
ActivityList
>
list
=
baseBiz
.
selectedActivityManagement
();
return
ObjectRestResponse
.
succ
(
list
);
@PostMapping
(
"/activity/findAll"
)
public
ObjectRestResponse
findAll
(
@RequestBody
ActivityManagementQuery
query
)
throws
InvocationTargetException
,
IllegalAccessException
{
PageInfo
<
ActivityList
>
pageInfo
=
baseBiz
.
selectedActivityManagement
(
query
);
return
ObjectRestResponse
.
succ
(
pageInfo
);
}
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopupController.java
View file @
1c78c520
...
...
@@ -38,4 +38,7 @@ public class ActivityPopupController extends ActivityBaseController<ActivityPopu
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/ActivityPopupManageController.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityPopupBiz
;
import
com.xxfc.platform.activity.entity.ActivityPopup
;
import
com.xxfc.platform.activity.vo.PopupQuery
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
/**
* 弹窗后台
*
* @author Administrator
*/
@RestController
@RequestMapping
(
"activityPopupManage"
)
@Slf4j
public
class
ActivityPopupManageController
extends
BaseController
<
ActivityPopupBiz
,
ActivityPopup
>
{
/**
* 后台列表
* @param query
* @return
*/
@PostMapping
(
value
=
"/manage/findAllByQuery"
)
public
ObjectRestResponse
findAllByQuery
(
@RequestBody
PopupQuery
query
)
{
Example
example
=
new
Example
(
ActivityPopup
.
class
);
if
(
StringUtils
.
isNotBlank
(
query
.
getPopupName
()))
{
example
.
createCriteria
().
andLike
(
"name"
,
"%"
+
query
.
getPopupName
()
+
"%"
);
}
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
());
List
<
ActivityPopup
>
activityPopups
=
baseBiz
.
selectByExample
(
example
);
return
ObjectRestResponse
.
succ
(
PageInfo
.
of
(
activityPopups
));
}
/**
* 查询一条
* @param id
* @return
*/
@PostMapping
(
value
=
"/manage/getOne/{id}"
)
public
ObjectRestResponse
<
ActivityPopup
>
getOne
(
@PathVariable
Integer
id
)
{
Example
exa
=
new
Example
(
ActivityPopup
.
class
);
exa
.
createCriteria
().
andEqualTo
(
"isDel"
,
0
);
exa
.
createCriteria
().
andEqualTo
(
"id"
,
id
);
List
<
ActivityPopup
>
activityPopups
=
baseBiz
.
selectByExample
(
exa
);
if
(
activityPopups
==
null
||
activityPopups
.
size
()==
0
)
{
return
ObjectRestResponse
.
succ
(
new
ActivityPopup
());
}
if
(
activityPopups
.
size
()>
1
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
return
ObjectRestResponse
.
succ
(
activityPopups
.
get
(
0
));
}
/**
* 删除
* @param id
* @return
*/
@DeleteMapping
(
"manage/activity/deleteOne/{id}"
)
public
ObjectRestResponse
deleteOne
(
@PathVariable
Integer
id
){
baseBiz
.
deleteOne
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/DateController.java
View file @
1c78c520
...
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.rest;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.xxfc.platform.activity.biz.ActivityPopularizeUserBiz
;
import
com.xxfc.platform.activity.biz.UserCouponBiz
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -20,12 +21,16 @@ import java.util.List;
@RequestMapping
(
"/activity_data"
)
public
class
DateController
{
@Autowired
@Autowired
private
ActivityPopularizeUserBiz
activityPopularizeUserBiz
;
private
UserCouponBiz
userCouponBiz
;
@GetMapping
(
"/clear"
)
public
ObjectRestResponse
<
Void
>
clearDate
(
@RequestParam
(
value
=
"userIds"
)
List
<
Integer
>
userIds
){
activityPopularizeUserBiz
.
deleteByUserIds
(
userIds
);
userCouponBiz
.
deleteByUserIds
(
userIds
);
return
ObjectRestResponse
.
succ
();
}
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/HomeActivitiesController.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
activity
.
rest
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.xxfc.platform.activity.biz.ActivityListBiz
;
import
com.xxfc.platform.activity.biz.HomeActivitiesBiz
;
import
com.xxfc.platform.activity.entity.ActivityList
;
import
com.xxfc.platform.activity.entity.HomeActivities
;
import
com.xxfc.platform.activity.vo.ActivitiesQuery
;
import
org.apache.ibatis.annotations.Delete
;
import
org.springframework.web.bind.annotation.*
;
import
tk.mybatis.mapper.entity.Example
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.List
;
/**
* 精彩活动
* @author Administrator
*/
@RestController
@RequestMapping
(
"homeActivities"
)
public
class
HomeActivitiesController
extends
BaseController
<
HomeActivitiesBiz
,
HomeActivities
>
{
/**
* app精彩活动列表
* @return
* @throws InvocationTargetException
* @throws IllegalAccessException
*/
@GetMapping
(
"/app/unauth/activity/findAll"
)
public
ObjectRestResponse
<
List
<
HomeActivities
>>
appFindAll
()
throws
InvocationTargetException
,
IllegalAccessException
{
List
<
HomeActivities
>
list
=
baseBiz
.
activities
();
return
ObjectRestResponse
.
succ
(
list
);
}
/**
* 后台精彩活动列表
* @param query
* @return
*/
@PostMapping
(
"manage/activity/findAll"
)
public
ObjectRestResponse
findAll
(
@RequestBody
ActivitiesQuery
query
){
return
ObjectRestResponse
.
succ
(
baseBiz
.
getPage
(
query
));
}
/**
* 获取一条精彩活动
* @param id
* @return
*/
@PostMapping
(
value
=
"/manage/activity/getOne/{id}"
)
public
ObjectRestResponse
<
HomeActivities
>
getOne
(
@PathVariable
Integer
id
)
{
Example
exa
=
new
Example
(
HomeActivities
.
class
);
Example
.
Criteria
criteria
=
exa
.
createCriteria
();
criteria
.
andEqualTo
(
"isDel"
,
0
);
criteria
.
andEqualTo
(
"id"
,
id
);
List
<
HomeActivities
>
homeActivities
=
baseBiz
.
selectByExample
(
exa
);
if
(
homeActivities
==
null
||
homeActivities
.
size
()==
0
)
{
return
ObjectRestResponse
.
succ
(
new
HomeActivities
());
}
if
(
homeActivities
.
size
()>
1
)
{
return
ObjectRestResponse
.
createDefaultFail
();
}
return
ObjectRestResponse
.
succ
(
homeActivities
.
get
(
0
));
}
/**
* 删除
* @param id
* @return
*/
@DeleteMapping
(
"manage/activity/deleteOne/{id}"
)
public
ObjectRestResponse
deleteOne
(
@PathVariable
Integer
id
){
baseBiz
.
deleteOne
(
id
);
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/DailyOrderStatistics.java
0 → 100644
View file @
1c78c520
package
com
.
xxfc
.
platform
.
order
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.util.Date
;
@Data
public
class
DailyOrderStatistics
{
@Column
()
private
Date
oneDay
;
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
1c78c520
...
...
@@ -36,6 +36,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.apache.commons.jexl2.MapContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.annotation.Scheduled
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -598,5 +599,10 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
log
.
error
(
e
.
getMessage
(),
e
);
}
}
// @Scheduled(cron = "0 0 2 * * ? ")
// private void countDailyOrdersRegularly(){
// DailyOrderStatistics dailyOrderStatistics= mapper.getTotalOrder();
// }
//
}
\ No newline at end of file
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/mapper/BaseOrderMapper.java
View file @
1c78c520
...
...
@@ -26,4 +26,6 @@ public interface BaseOrderMapper extends Mapper<BaseOrder> {
public
List
<
OrderPageVO
>
getTourList
(
Map
<
String
,
Object
>
paramMap
);
public
OrderPageVO
getOrderDetail
(
String
no
);
Integer
getTotalOrder
();
}
xx-order/xx-order-server/src/main/resources/mapper/BaseOrderMapper.xml
View file @
1c78c520
...
...
@@ -3,7 +3,7 @@
<mapper
namespace=
"com.xxfc.platform.order.mapper.BaseOrderMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"com.xxfc.platform.order.entity.BaseOrder"
id=
"baseOrderMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"no"
column=
"no"
/>
...
...
@@ -29,13 +29,19 @@
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<discriminator
javaType=
"Integer"
column=
"type"
>
<case
value=
"1"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
</case>
<case
value=
"2"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
</case>
<case
value=
"3"
resultType=
"com.xxfc.platform.order.pojo.order.OrderPageVO"
>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
</case>
</discriminator>
</resultMap>
...
...
@@ -45,20 +51,26 @@
<result
javaType=
"Integer"
column=
"type"
property=
"type"
></result>
<discriminator
javaType=
"Integer"
column=
"type"
>
<case
value=
"1"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
<association
column=
"{id=detail_id}"
property=
"orderRentVehicleDetail"
select=
"com.xxfc.platform.order.mapper.OrderRentVehicleDetailMapper.pageByParm"
javaType=
"com.xxfc.platform.order.entity.OrderRentVehicleDetail"
></association>
</case>
<case
value=
"2"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
<association
column=
"detail_id"
property=
"orderTourDetail"
select=
"com.xxfc.platform.order.mapper.OrderTourDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderTourDetail"
></association>
</case>
<case
value=
"3"
resultType=
"com.xxfc.platform.order.pojo.order.OrderListVo"
>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
<association
column=
"detail_id"
property=
"orderMemberDetail"
select=
"com.xxfc.platform.order.mapper.OrderMemberDetailMapper.selectByPrimaryKey"
javaType=
"com.xxfc.platform.order.entity.OrderMemberDetail"
></association>
</case>
</discriminator>
</resultMap>
<select
id=
"pageByParm"
parameterType=
"Map"
resultMap=
"orderPageMap"
>
select *
from base_order
from base_order
<where>
<if
test=
"crtUser != null"
>
and crt_user = #{crtUser}
...
...
@@ -82,7 +94,7 @@
and
(
<foreach
collection=
"multiStatus.split(',')"
index=
"sIndex"
item=
"statusEntity"
separator=
" or "
>
status = #{statusEntity}
status = #{statusEntity}
</foreach>
)
</if>
...
...
@@ -113,7 +125,7 @@
<if
test=
"status != null"
>
and b.status = #{status}
</if>
<if
test=
"type != null"
>
<if
test=
"type != null"
>
and b.type = #{type}
</if>
<if
test=
"no != null"
>
...
...
@@ -123,8 +135,8 @@
and b.name like CONCAT ("%", #{name}, "%")
</if>
<if
test=
"startTime != null"
>
and r.start_time between
#{startTime} and
#{endTime}
or t.start_time between
#{startTime} and
#{endTime}
and r.start_time between
#{startTime} and
#{endTime}
or t.start_time between
#{startTime} and
#{endTime}
</if>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
...
...
@@ -143,24 +155,24 @@
from base_order b
LEFT JOIN order_rent_vehicle_detail r on r.order_id = b.id
where b.type = 1
<if
test=
"userId != null"
>
and b.user_id = #{userId}
</if>
<if
test=
"status != null"
>
and b.status = #{status}
</if>
<if
test=
"no != null"
>
and no like CONCAT ("%", #{no}, "%")
</if>
<if
test=
"startTime != null and status == 4"
>
and r.start_time between #{startTime} and
#{endTime}
</if>
<if
test=
"startTime != null and status == 5"
>
and r.start_time between #{startTime} and
#{endTime}
</if>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
</if>
<if
test=
"userId != null"
>
and b.user_id = #{userId}
</if>
<if
test=
"status != null"
>
and b.status = #{status}
</if>
<if
test=
"no != null"
>
and no like CONCAT ("%", #{no}, "%")
</if>
<if
test=
"startTime != null and status == 4"
>
and r.start_time between #{startTime} and
#{endTime}
</if>
<if
test=
"startTime != null and status == 5"
>
and r.start_time between #{startTime} and
#{endTime}
</if>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
</if>
order by b.crt_time desc
</select>
...
...
@@ -169,21 +181,21 @@
from base_order b
LEFT JOIN order_tour_detail r on r.order_id = b.id
where b.type = 2
<if
test=
"userId != null"
>
and b.user_id = #{userId}
</if>
<if
test=
"status != null"
>
and b.status = #{status}
</if>
<if
test=
"no != null"
>
and no like CONCAT ("%", #{no}, "%")
</if>
<if
test=
"startTime != null"
>
and r.start_time between #{startTime} and
#{endTime}
</if>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
</if>
<if
test=
"userId != null"
>
and b.user_id = #{userId}
</if>
<if
test=
"status != null"
>
and b.status = #{status}
</if>
<if
test=
"no != null"
>
and no like CONCAT ("%", #{no}, "%")
</if>
<if
test=
"startTime != null"
>
and r.start_time between #{startTime} and
#{endTime}
</if>
<if
test=
"startCompanyId != null"
>
and r.start_company_id = #{startCompanyId}
</if>
order by b.crt_time desc
</select>
...
...
@@ -193,4 +205,16 @@
where no = #{no}
</select>
<select
id=
"getTotalOrder"
resultType=
"com.xxfc.platform.order.entity.DailyOrderStatistics"
>
select
date_format(crt_time,'%Y-%c-%d') as oneDay,
SUM(1)
from
base_order
where
date(crt_time)=date(now())-1
group by
date_format(crt_time,'%d')
</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