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
1e1a909d
Commit
1e1a909d
authored
Oct 20, 2023
by
YG8999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保洁分配
parent
c4eae0b5
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
47 additions
and
17 deletions
+47
-17
SCleanConsumerController.java
...share/web/controller/system/SCleanConsumerController.java
+4
-0
SStoreController.java
...in/java/share/web/controller/system/SStoreController.java
+3
-2
SConsumer.java
...e-system/src/main/java/share/system/domain/SConsumer.java
+5
-1
SConsumerVo.java
...tem/src/main/java/share/system/domain/vo/SConsumerVo.java
+17
-0
SConsumerMapper.java
...em/src/main/java/share/system/mapper/SConsumerMapper.java
+3
-2
SConsumerService.java
.../src/main/java/share/system/service/SConsumerService.java
+4
-2
SConsumerServiceImpl.java
.../java/share/system/service/impl/SConsumerServiceImpl.java
+3
-2
SConsumerMapper.xml
...stem/src/main/resources/mapper/system/SConsumerMapper.xml
+8
-8
No files found.
share-admin/src/main/java/share/web/controller/system/SCleanConsumerController.java
View file @
1e1a909d
...
...
@@ -8,6 +8,7 @@ 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.BaseUtil
;
import
share.common.utils.poi.ExcelUtil
;
import
share.system.domain.SConsumer
;
import
share.system.service.SConsumerService
;
...
...
@@ -74,6 +75,9 @@ public class SCleanConsumerController extends BaseController
public
AjaxResult
add
(
@RequestBody
SConsumer
sConsumer
)
{
sConsumer
.
setRoleType
(
"1"
);
sConsumer
.
setAccount
(
sConsumer
.
getPhone
());
String
password
=
BaseUtil
.
encryptPassword
(
"12345678"
,
sConsumer
.
getPhone
());
sConsumer
.
setPwd
(
password
);
return
toAjax
(
sConsumerService
.
insertSConsumer
(
sConsumer
));
}
...
...
share-admin/src/main/java/share/web/controller/system/SStoreController.java
View file @
1e1a909d
...
...
@@ -24,6 +24,7 @@ import share.system.domain.SConsumer;
import
share.system.domain.SStore
;
import
share.system.domain.SStoreConsumer
;
import
share.system.domain.SysUserRole
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.service.ISStoreService
;
import
share.common.utils.poi.ExcelUtil
;
import
share.common.core.page.TableDataInfo
;
...
...
@@ -128,7 +129,7 @@ public class SStoreController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:store:list')"
)
@GetMapping
(
"/consumer/allocatedList"
)
public
TableDataInfo
allocatedList
(
SConsumer
sConsumer
)
public
TableDataInfo
allocatedList
(
SConsumer
Vo
sConsumer
)
{
startPage
();
List
<
SConsumer
>
list
=
sConsumerService
.
selectAllocatedList
(
sConsumer
);
...
...
@@ -140,7 +141,7 @@ public class SStoreController extends BaseController
*/
@PreAuthorize
(
"@ss.hasPermi('system:store:list')"
)
@GetMapping
(
"/consumer/unallocatedList"
)
public
TableDataInfo
unallocatedList
(
SConsumer
sConsumer
)
public
TableDataInfo
unallocatedList
(
SConsumer
Vo
sConsumer
)
{
startPage
();
List
<
SConsumer
>
list
=
sConsumerService
.
selectUnallocatedList
(
sConsumer
);
...
...
share-system/src/main/java/share/system/domain/SConsumer.java
View file @
1e1a909d
package
share
.
system
.
domain
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
share.common.core.domain.BaseEntity
;
...
...
@@ -15,11 +18,12 @@ import share.common.core.domain.BaseEntity;
* @date 2023-09-27
*/
@Data
public
class
SConsumer
public
class
SConsumer
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1L
;
/** 会员用户ID */
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
id
;
@ApiModelProperty
(
value
=
"用户账号"
)
...
...
share-system/src/main/java/share/system/domain/vo/SConsumerVo.java
0 → 100644
View file @
1e1a909d
package
share
.
system
.
domain
.
vo
;
import
lombok.Data
;
import
share.system.domain.SConsumer
;
/**
* @className: share.system.domain.vo.SConsumerVo
* @description: 会员
* @author: lwj
* @create: 2023-10-20 15:06
*/
@Data
public
class
SConsumerVo
extends
SConsumer
{
private
Long
storeId
;
}
share-system/src/main/java/share/system/mapper/SConsumerMapper.java
View file @
1e1a909d
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.SConsumerVo
;
/**
* 会员用户Mapper接口
...
...
@@ -61,9 +62,9 @@ public interface SConsumerMapper extends BaseMapper<SConsumer>
*/
public
int
deleteSConsumerByIds
(
Long
[]
ids
);
List
<
SConsumer
>
selectAllocatedList
(
SConsumer
sConsumer
);
List
<
SConsumer
>
selectAllocatedList
(
SConsumer
Vo
sConsumer
);
List
<
SConsumer
>
selectUnallocatedList
(
SConsumer
sConsumer
);
List
<
SConsumer
>
selectUnallocatedList
(
SConsumer
Vo
sConsumer
);
List
<
SConsumer
>
selectListByStoreId
(
Long
storeId
);
}
share-system/src/main/java/share/system/service/SConsumerService.java
View file @
1e1a909d
...
...
@@ -4,6 +4,7 @@ import java.util.List;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
share.system.domain.SConsumer
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.request.RegisterThirdSConsumerRequest
;
/**
...
...
@@ -14,7 +15,7 @@ import share.system.request.RegisterThirdSConsumerRequest;
*/
public
interface
SConsumerService
extends
IService
<
SConsumer
>
{
List
<
SConsumer
>
selectAllocatedList
(
SConsumer
sConsumer
);
List
<
SConsumer
>
selectAllocatedList
(
SConsumer
Vo
sConsumer
);
/**
* 查询会员用户
...
...
@@ -110,5 +111,6 @@ public interface SConsumerService extends IService<SConsumer>
* @return
*/
boolean
editSConsumer
(
SConsumer
request
);
List
<
SConsumer
>
selectUnallocatedList
(
SConsumer
sConsumer
);
List
<
SConsumer
>
selectUnallocatedList
(
SConsumerVo
sConsumer
);
}
share-system/src/main/java/share/system/service/impl/SConsumerServiceImpl.java
View file @
1e1a909d
...
...
@@ -16,6 +16,7 @@ import share.common.exception.base.BaseException;
import
share.common.utils.BaseUtil
;
import
share.common.utils.DateUtil
;
import
share.system.domain.vo.FrontTokenComponent
;
import
share.system.domain.vo.SConsumerVo
;
import
share.system.mapper.SConsumerMapper
;
import
share.system.domain.SConsumer
;
import
share.system.request.RegisterThirdSConsumerRequest
;
...
...
@@ -189,7 +190,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
* @return
*/
@Override
public
List
<
SConsumer
>
selectAllocatedList
(
SConsumer
sConsumer
)
{
public
List
<
SConsumer
>
selectAllocatedList
(
SConsumer
Vo
sConsumer
)
{
return
sConsumerMapper
.
selectAllocatedList
(
sConsumer
);
}
...
...
@@ -197,7 +198,7 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
* 查询未分配保洁列表
*/
@Override
public
List
<
SConsumer
>
selectUnallocatedList
(
SConsumer
sConsumer
)
{
public
List
<
SConsumer
>
selectUnallocatedList
(
SConsumer
Vo
sConsumer
)
{
return
sConsumerMapper
.
selectUnallocatedList
(
sConsumer
);
}
}
share-system/src/main/resources/mapper/system/SConsumerMapper.xml
View file @
1e1a909d
...
...
@@ -49,9 +49,9 @@
</where>
</select>
<select
id=
"selectAllocatedList"
parameterType=
"SConsumer"
resultMap=
"SConsumerResult"
>
select t1.id, t1.
open_id, t1.nick_name, t1.phone, t1.level, t1.role_type, t1.sex
, t1.amount,
t1.free_amount, t1.total_times, t1.duration
<select
id=
"selectAllocatedList"
parameterType=
"SConsumer
Vo
"
resultMap=
"SConsumerResult"
>
select t1.id, t1.
account, t1.nick_name, t1.avatar, t1.phone, t1.level, t1.role_type, t1.sex, t1.addres
, t1.amount,
t1.free_amount, t1.total_times, t1.duration, t1.status, t1.pwd, t1.create_time, t1.last_login_time
from s_consumer t1
left join s_store_consumer t2 on t2.consumer_id = t1.id
where t1.role_type = '1' and t2.store_id = #{storeId}
...
...
@@ -62,9 +62,9 @@
AND t1.phone like concat('%', #{phone}, '%')
</if>
</select>
<select
id=
"selectUnallocatedList"
parameterType=
"SConsumer"
resultMap=
"SConsumerResult"
>
select t1.id, t1.
open_id, t1.nick_name, t1.phone, t1.level, t1.role_type, t1.sex
, t1.amount,
t1.free_amount, t1.total_times, t1.duration
<select
id=
"selectUnallocatedList"
parameterType=
"SConsumer
Vo
"
resultMap=
"SConsumerResult"
>
select t1.id, t1.
account, t1.nick_name, t1.avatar, t1.phone, t1.level, t1.role_type, t1.sex, t1.addres
, t1.amount,
t1.free_amount, t1.total_times, t1.duration
, t1.status, t1.pwd, t1.create_time, t1.last_login_time
from s_consumer t1
left join s_store_consumer t2 on t2.consumer_id = t1.id
where t1.role_type = '1' and t1.id not in (select consumer_id from s_store_consumer where store_id = #{storeId})
...
...
@@ -77,8 +77,8 @@
</select>
<select
id=
"selectListByStoreId"
parameterType=
"Long"
resultMap=
"SConsumerResult"
>
select t1.id, t1.
open_id, t1.nick_name, t1.phone, t1.level, t1.role_type, t1.sex
, t1.amount,
t1.free_amount, t1.total_times, t1.duration
select t1.id, t1.
account, t1.nick_name, t1.avatar, t1.phone, t1.level, t1.role_type, t1.sex, t1.addres
, t1.amount,
t1.free_amount, t1.total_times, t1.duration, t1.status, t1.pwd, t1.create_time, t1.last_login_time
from s_consumer t1
left join s_store_consumer t2 on t2.consumer_id = t1.id
where t1.role_type = '1' and t1.id in (select consumer_id from s_store_consumer where store_id = #{storeId})
...
...
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