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
bd84aef0
Commit
bd84aef0
authored
Jan 22, 2024
by
吕明尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
4eb6a013
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
74 additions
and
34 deletions
+74
-34
SCleanConsumerController.java
...share/web/controller/system/SCleanConsumerController.java
+2
-2
PositionEnum.java
...common/src/main/java/share/common/enums/PositionEnum.java
+35
-0
RoleTypeEnum.java
...common/src/main/java/share/common/enums/RoleTypeEnum.java
+2
-2
SConsumer.java
...e-system/src/main/java/share/system/domain/SConsumer.java
+1
-1
SStoreConsumer.java
...tem/src/main/java/share/system/domain/SStoreConsumer.java
+3
-22
SStoreConsumerMapper.java
...c/main/java/share/system/mapper/SStoreConsumerMapper.java
+3
-1
QPServiceImpl.java
...rc/main/java/share/system/service/impl/QPServiceImpl.java
+12
-1
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+6
-1
SStoreServiceImpl.java
...ain/java/share/system/service/impl/SStoreServiceImpl.java
+1
-0
SConsumerMapper.xml
...stem/src/main/resources/mapper/system/SConsumerMapper.xml
+2
-2
SStoreConsumerMapper.xml
...src/main/resources/mapper/system/SStoreConsumerMapper.xml
+7
-2
No files found.
share-admin/src/main/java/share/web/controller/system/SCleanConsumerController.java
View file @
bd84aef0
...
@@ -31,7 +31,7 @@ public class SCleanConsumerController extends BaseController
...
@@ -31,7 +31,7 @@ public class SCleanConsumerController extends BaseController
private
SConsumerService
sConsumerService
;
private
SConsumerService
sConsumerService
;
/**
/**
* 查询
保洁
员用户列表
* 查询
店
员用户列表
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:cleanConsumer:list')"
)
@PreAuthorize
(
"@ss.hasPermi('system:cleanConsumer:list')"
)
@GetMapping
(
"/list"
)
@GetMapping
(
"/list"
)
...
@@ -68,7 +68,7 @@ public class SCleanConsumerController extends BaseController
...
@@ -68,7 +68,7 @@ public class SCleanConsumerController extends BaseController
}
}
/**
/**
* 新增
保洁
员用户
* 新增
店
员用户
*/
*/
@PreAuthorize
(
"@ss.hasPermi('system:cleanConsumer:add')"
)
@PreAuthorize
(
"@ss.hasPermi('system:cleanConsumer:add')"
)
@Log
(
title
=
"保洁员"
,
businessType
=
BusinessType
.
INSERT
)
@Log
(
title
=
"保洁员"
,
businessType
=
BusinessType
.
INSERT
)
...
...
share-common/src/main/java/share/common/enums/PositionEnum.java
0 → 100644
View file @
bd84aef0
package
share
.
common
.
enums
;
//职位枚举
public
enum
PositionEnum
{
//1保洁人员 2管理员
CLEANER
(
1
,
"保洁人员"
),
ADMIN
(
2
,
"管理员"
),
;
private
Integer
code
;
private
String
name
;
PositionEnum
()
{
}
PositionEnum
(
Integer
code
,
String
name
)
{
this
.
code
=
code
;
this
.
name
=
name
;
}
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
}
share-common/src/main/java/share/common/enums/RoleTypeEnum.java
View file @
bd84aef0
...
@@ -2,8 +2,8 @@ package share.common.enums;
...
@@ -2,8 +2,8 @@ package share.common.enums;
public
enum
RoleTypeEnum
{
public
enum
RoleTypeEnum
{
MEMBRO
(
0
,
"会员"
),
MEMBRO
(
0
,
"会员"
),
CLEANER
(
1
,
"
保洁人
员"
),
CLEANER
(
1
,
"
店
员"
),
ADMIN
(
2
,
"后台管理人员"
);
;
;
private
Integer
code
;
private
Integer
code
;
private
String
name
;
private
String
name
;
...
...
share-system/src/main/java/share/system/domain/SConsumer.java
View file @
bd84aef0
...
@@ -53,7 +53,7 @@ public class SConsumer implements Serializable
...
@@ -53,7 +53,7 @@ public class SConsumer implements Serializable
private
Integer
level
;
private
Integer
level
;
/** 会员角色类型(0:会员,1:保洁人员,2:后台管理人员) */
/** 会员角色类型(0:会员,1:保洁人员,2:后台管理人员) */
@ApiModelProperty
(
value
=
"会员角色类型"
,
example
=
"0=:会员,1:
保洁人员,2:后台管理人
员"
)
@ApiModelProperty
(
value
=
"会员角色类型"
,
example
=
"0=:会员,1:
店
员"
)
private
Integer
roleType
;
private
Integer
roleType
;
/** 会员性别(0:未知,1:男,2:女) */
/** 会员性别(0:未知,1:男,2:女) */
...
...
share-system/src/main/java/share/system/domain/SStoreConsumer.java
View file @
bd84aef0
package
share
.
system
.
domain
;
package
share
.
system
.
domain
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
@@ -9,6 +10,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
...
@@ -9,6 +10,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
* @author: lwj
* @author: lwj
* @create: 2023-10-16 17:02
* @create: 2023-10-16 17:02
*/
*/
@Data
public
class
SStoreConsumer
{
public
class
SStoreConsumer
{
/** 门店ID */
/** 门店ID */
private
Long
storeId
;
private
Long
storeId
;
...
@@ -16,27 +18,6 @@ public class SStoreConsumer {
...
@@ -16,27 +18,6 @@ public class SStoreConsumer {
/** 保洁员ID */
/** 保洁员ID */
private
Long
consumerId
;
private
Long
consumerId
;
public
Long
getStoreId
()
{
private
Integer
position
;
return
storeId
;
}
public
void
setStoreId
(
Long
storeId
)
{
this
.
storeId
=
storeId
;
}
public
Long
getConsumerId
()
{
return
consumerId
;
}
public
void
setConsumerId
(
Long
consumerId
)
{
this
.
consumerId
=
consumerId
;
}
@Override
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"storeId"
,
getStoreId
())
.
append
(
"consumerId"
,
getConsumerId
())
.
toString
();
}
}
}
share-system/src/main/java/share/system/mapper/SStoreConsumerMapper.java
View file @
bd84aef0
package
share
.
system
.
mapper
;
package
share
.
system
.
mapper
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
share.system.domain.SStore
;
import
share.system.domain.SStoreConsumer
;
import
share.system.domain.SStoreConsumer
;
import
share.system.domain.SysUserRole
;
import
share.system.domain.SysUserRole
;
...
@@ -12,7 +14,7 @@ import java.util.List;
...
@@ -12,7 +14,7 @@ import java.util.List;
* @author: lwj
* @author: lwj
* @create: 2023-10-16 17:07
* @create: 2023-10-16 17:07
*/
*/
public
interface
SStoreConsumerMapper
{
public
interface
SStoreConsumerMapper
extends
BaseMapper
<
SStoreConsumer
>
{
public
int
deleteByConsumerId
(
Long
consumerId
);
public
int
deleteByConsumerId
(
Long
consumerId
);
...
...
share-system/src/main/java/share/system/service/impl/QPServiceImpl.java
View file @
bd84aef0
...
@@ -414,7 +414,18 @@ public class QPServiceImpl implements QPService {
...
@@ -414,7 +414,18 @@ public class QPServiceImpl implements QPService {
logger
.
error
(
"适用店铺查询接口:{}"
,
response
.
getMsg
());
logger
.
error
(
"适用店铺查询接口:{}"
,
response
.
getMsg
());
throw
new
RuntimeException
(
response
.
getMsg
());
throw
new
RuntimeException
(
response
.
getMsg
());
}
}
return
response
.
getData
();
//查询所有门店
List
<
SStore
>
list
=
storeService
.
list
();
//过滤以增加的门店 根据open_shop_uuid
List
<
CustomerKeyShopScopeResponseEntity
>
data
=
response
.
getData
();
List
<
CustomerKeyShopScopeResponseEntity
>
collect
=
data
.
stream
().
filter
(
o1
->
{
Optional
<
SStore
>
first
=
list
.
stream
().
filter
(
o2
->
o2
.
getOpenShopUuid
().
equals
(
o1
.
getOpen_shop_uuid
())).
findFirst
();
if
(
first
.
isPresent
())
{
return
false
;
}
return
true
;
}).
collect
(
java
.
util
.
stream
.
Collectors
.
toList
());
return
collect
;
}
}
}
}
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
bd84aef0
...
@@ -23,10 +23,12 @@ import share.common.utils.BaseUtil;
...
@@ -23,10 +23,12 @@ import share.common.utils.BaseUtil;
import
share.common.utils.DateUtil
;
import
share.common.utils.DateUtil
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SConsumerCoupon
;
import
share.system.domain.SRoomPack
;
import
share.system.domain.SRoomPack
;
import
share.system.domain.SStoreConsumer
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.domain.SConsumer
;
import
share.system.domain.SConsumer
;
import
share.system.mapper.SStoreConsumerMapper
;
import
share.system.request.RegisterThirdSConsumerRequest
;
import
share.system.request.RegisterThirdSConsumerRequest
;
import
share.system.service.ISConsumerCouponService
;
import
share.system.service.ISConsumerCouponService
;
import
share.system.service.SConsumerService
;
import
share.system.service.SConsumerService
;
...
@@ -45,6 +47,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -45,6 +47,8 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
@Autowired
@Autowired
private
ISConsumerCouponService
sConsumerCouponService
;
private
ISConsumerCouponService
sConsumerCouponService
;
@Autowired
private
SStoreConsumerMapper
storeConsumerMapper
;
/**
/**
* 查询会员用户
* 查询会员用户
...
@@ -264,9 +268,10 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
...
@@ -264,9 +268,10 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
if
(
ArrayUtil
.
isNotEmpty
(
ids
))
{
if
(
ArrayUtil
.
isNotEmpty
(
ids
))
{
List
<
Long
>
idList
=
ListUtil
.
toList
(
ids
);
List
<
Long
>
idList
=
ListUtil
.
toList
(
ids
);
List
<
SConsumer
>
list
=
baseMapper
.
selectBatchIds
(
idList
);
List
<
SConsumer
>
list
=
baseMapper
.
selectBatchIds
(
idList
);
//解除所有门店关联
storeConsumerMapper
.
deleteBatchIds
(
idList
);
list
.
stream
().
forEach
(
sConsumer
->
{
list
.
stream
().
forEach
(
sConsumer
->
{
sConsumer
.
setRoleType
(
RoleTypeEnum
.
MEMBRO
.
getCode
());
sConsumer
.
setRoleType
(
RoleTypeEnum
.
MEMBRO
.
getCode
());
});
});
updateBatchById
(
list
);
updateBatchById
(
list
);
return
idList
.
size
();
return
idList
.
size
();
...
...
share-system/src/main/java/share/system/service/impl/SStoreServiceImpl.java
View file @
bd84aef0
...
@@ -362,6 +362,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
...
@@ -362,6 +362,7 @@ public class SStoreServiceImpl extends ServiceImpl<SStoreMapper, SStore> impleme
SStoreConsumer
sc
=
new
SStoreConsumer
();
SStoreConsumer
sc
=
new
SStoreConsumer
();
sc
.
setStoreId
(
storeId
);
sc
.
setStoreId
(
storeId
);
sc
.
setConsumerId
(
consumerId
);
sc
.
setConsumerId
(
consumerId
);
sc
.
setPosition
(
PositionEnum
.
CLEANER
.
getCode
());
list
.
add
(
sc
);
list
.
add
(
sc
);
}
}
return
storeConsumerMapper
.
batchSStoreConsumer
(
list
);
return
storeConsumerMapper
.
batchSStoreConsumer
(
list
);
...
...
share-system/src/main/resources/mapper/system/SConsumerMapper.xml
View file @
bd84aef0
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
t1.free_amount, t1.total_times, t1.duration, t1.status, t1.pwd, t1.create_time, t1.last_login_time
t1.free_amount, t1.total_times, t1.duration, t1.status, t1.pwd, t1.create_time, t1.last_login_time
from s_consumer t1
from s_consumer t1
left join s_store_consumer t2 on t2.consumer_id = t1.id
left join s_store_consumer t2 on t2.consumer_id = t1.id
where t1.role_type = '1' and t2.store_id = #{storeId}
where t1.role_type = '1' and t2.
position='1' and t2.
store_id = #{storeId}
<if
test=
"nickName != null and nickName != ''"
>
<if
test=
"nickName != null and nickName != ''"
>
AND t1.nick_name like concat('%', #{nickName}, '%')
AND t1.nick_name like concat('%', #{nickName}, '%')
</if>
</if>
...
@@ -67,7 +67,7 @@
...
@@ -67,7 +67,7 @@
t1.free_amount, t1.total_times, t1.duration, t1.status, t1.pwd, t1.create_time, t1.last_login_time
t1.free_amount, t1.total_times, t1.duration, t1.status, t1.pwd, t1.create_time, t1.last_login_time
from s_consumer t1
from s_consumer t1
where t1.role_type = '1'
where t1.role_type = '1'
and t1.id not in (select consumer_id from s_store_consumer where store_id = #{storeId}
)
and t1.id not in (select consumer_id from s_store_consumer where store_id = #{storeId} and position = '2'
)
<if
test=
"nickName != null and nickName != ''"
>
<if
test=
"nickName != null and nickName != ''"
>
AND t1.nick_name like concat('%', #{nickName}, '%')
AND t1.nick_name like concat('%', #{nickName}, '%')
</if>
</if>
...
...
share-system/src/main/resources/mapper/system/SStoreConsumerMapper.xml
View file @
bd84aef0
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<resultMap
type=
"SStoreConsumer"
id=
"SStoreConsumerResult"
>
<resultMap
type=
"SStoreConsumer"
id=
"SStoreConsumerResult"
>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"storeId"
column=
"store_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"consumerId"
column=
"consumer_id"
/>
<result
property=
"position"
column=
"position"
/>
</resultMap>
</resultMap>
<delete
id=
"deleteByConsumerId"
parameterType=
"Long"
>
<delete
id=
"deleteByConsumerId"
parameterType=
"Long"
>
...
@@ -35,11 +36,15 @@
...
@@ -35,11 +36,15 @@
</insert>
</insert>
<delete
id=
"deleteInfo"
parameterType=
"SStoreConsumer"
>
<delete
id=
"deleteInfo"
parameterType=
"SStoreConsumer"
>
delete from s_store_consumer where consumer_id=#{consumerId} and store_id=#{storeId}
delete
from s_store_consumer
where consumer_id = #{consumerId}
and store_id = #{storeId}
and position = '1'
</delete>
</delete>
<delete
id=
"deleteInfos"
>
<delete
id=
"deleteInfos"
>
delete from s_store_consumer where store_id=#{storeId} and consumer_id in
delete from s_store_consumer where store_id=#{storeId} and
position = '1' and
consumer_id in
<foreach
collection=
"consumerIds"
item=
"consumerId"
open=
"("
separator=
","
close=
")"
>
<foreach
collection=
"consumerIds"
item=
"consumerId"
open=
"("
separator=
","
close=
")"
>
#{consumerId}
#{consumerId}
</foreach>
</foreach>
...
...
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