bug
This commit is contained in:
parent
d45fa5c92a
commit
0cf9a992a4
40
fuintAdmin/src/api/userGroup/userMassSend.js
Normal file
40
fuintAdmin/src/api/userGroup/userMassSend.js
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员标签列表
|
||||
export function listUserMassSend(query) {
|
||||
return request({
|
||||
url: '/userMassSend',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 根据id查询会员标签
|
||||
export function getUserMassSend(id) {
|
||||
return request({
|
||||
url: '/userMassSend/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 添加会员标签
|
||||
export function addUserMassSend(data) {
|
||||
return request({
|
||||
url: '/userMassSend',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改会员标签
|
||||
export function editUserMassSend(data) {
|
||||
return request({
|
||||
url: '/userMassSend',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除会员标签
|
||||
export function deleteUserMassSend(id) {
|
||||
return request({
|
||||
url: '/userMassSend/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
40
fuintAdmin/src/api/userGroup/userMassSendRecord.js
Normal file
40
fuintAdmin/src/api/userGroup/userMassSendRecord.js
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员标签列表
|
||||
export function listUserMassSendRecord(query) {
|
||||
return request({
|
||||
url: '/userMassSendRecord',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 根据id查询会员标签
|
||||
export function getUserMassSendRecord(id) {
|
||||
return request({
|
||||
url: '/userMassSendRecord/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 添加会员标签
|
||||
export function addUserMassSendRecord(data) {
|
||||
return request({
|
||||
url: '/userMassSendRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改会员标签
|
||||
export function editUserMassSendRecord(data) {
|
||||
return request({
|
||||
url: '/userMassSendRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除会员标签
|
||||
export function deleteUserMassSendRecord(id) {
|
||||
return request({
|
||||
url: '/userMassSendRecord/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
40
fuintAdmin/src/api/userGroup/usergroup.js
Normal file
40
fuintAdmin/src/api/userGroup/usergroup.js
Normal file
@ -0,0 +1,40 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询会员标签列表
|
||||
export function listUserGroup(query) {
|
||||
return request({
|
||||
url: '/userGroup',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 根据id查询会员标签
|
||||
export function getUserGroup(id) {
|
||||
return request({
|
||||
url: '/userGroup/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
// 添加会员标签
|
||||
export function addUserGroup(data) {
|
||||
return request({
|
||||
url: '/userGroup',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 修改会员标签
|
||||
export function editUserGroup(data) {
|
||||
return request({
|
||||
url: '/userGroup',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 删除会员标签
|
||||
export function deleteUserGroup(id) {
|
||||
return request({
|
||||
url: '/userGroup/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
@ -372,17 +372,25 @@ export default {
|
||||
this.form.staffId = this.form.staffId.toString()
|
||||
if (!this.form.id) {
|
||||
addFleetInfo(this.form).then(res => {
|
||||
this.$message.success("添加成功")
|
||||
this.open = false
|
||||
this.queryParams.page = 1
|
||||
this.getList()
|
||||
if (res.data==1) {
|
||||
this.$message.success("添加成功")
|
||||
this.open = false
|
||||
this.queryParams.page = 1
|
||||
this.getList()
|
||||
}else {
|
||||
this.$message.error("添加失败,车队名称不可重复")
|
||||
}
|
||||
})
|
||||
} else {
|
||||
editFleetInfo(this.form).then(res => {
|
||||
this.$message.success("修改成功")
|
||||
this.open = false
|
||||
this.queryParams.page = 1
|
||||
this.getList()
|
||||
if (res.data==1) {
|
||||
this.$message.success("修改成功")
|
||||
this.open = false
|
||||
this.queryParams.page = 1
|
||||
this.getList()
|
||||
}else {
|
||||
this.$message.error("添加失败,车队名称不可重复")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -4,9 +4,9 @@
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="120px">
|
||||
|
||||
<el-form-item label="" prop="deptId" style="width: 180px">
|
||||
<el-form-item label="" prop="labelName" style="width: 180px">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
v-model="queryParams.labelName"
|
||||
placeholder="请输入标签名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@ -43,11 +43,15 @@
|
||||
:data="orderList"
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="storeName" align="center" label="标签名称"></el-table-column>
|
||||
<el-table-column prop="storeName" align="center" label="备注"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="会员数量"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="会员占比"></el-table-column>
|
||||
<el-table-column prop="payMoney" align="center" label="标签状态">
|
||||
<el-table-column prop="labelName" align="center" label="标签名称"></el-table-column>
|
||||
<el-table-column prop="remark" align="center" label="备注">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.remark || "--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="userNum" align="center" label="会员数量"></el-table-column>
|
||||
<el-table-column prop="userProportion" align="center" label="会员占比"></el-table-column>
|
||||
<el-table-column prop="status" align="center" label="标签状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.status"
|
||||
@ -58,8 +62,8 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="count" align="center" label="创建人"></el-table-column>
|
||||
<el-table-column prop="refMoney" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column prop="accountName" align="center" label="创建人"></el-table-column>
|
||||
<el-table-column prop="createTime" align="center" label="创建时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -91,8 +95,8 @@
|
||||
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="标签名称" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入设备名称" maxlength="30" style="width: 270px"/>
|
||||
<el-form-item label="标签名称" prop="labelName">
|
||||
<el-input v-model="form.labelName" placeholder="请输入标签名称" maxlength="30"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="标签状态" prop="status">
|
||||
@ -121,7 +125,7 @@
|
||||
<script>
|
||||
|
||||
import {delStaff} from "@/api/staff/staff";
|
||||
import {listUserLabel} from "@/api/staff/user/userlabel";
|
||||
import {addUserLabel, deleteUserLabel, editUserLabel, getUserLabel, listUserLabel} from "@/api/staff/user/userlabel";
|
||||
|
||||
export default {
|
||||
dicts: ['zhzt'],
|
||||
@ -146,23 +150,8 @@ export default {
|
||||
total: 0,
|
||||
// 表单校验
|
||||
rules: {
|
||||
realName: [
|
||||
{required: true, message: "设备名称不能为空", trigger: "blur"},
|
||||
],
|
||||
pinpai: [
|
||||
{required: true, message: "品牌不能为空", trigger: "blur"},
|
||||
],
|
||||
gongneng: [
|
||||
{required: true, message: "设备功能不能为空", trigger: "blur"}
|
||||
],
|
||||
zhongduan: [
|
||||
{required: true, message: "设备终端号不能为空", trigger: "blur"}
|
||||
],
|
||||
miyao: [
|
||||
{required: true, message: "密钥不能为空", trigger: "blur"}
|
||||
],
|
||||
staffId: [
|
||||
{required: true, message: "关联员工不能为空", trigger: "blur"}
|
||||
labelName: [
|
||||
{required: true, message: "标签名称不能为空", trigger: "blur"},
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "状态不能为空", trigger: "blur"}
|
||||
@ -188,7 +177,8 @@ export default {
|
||||
dateRange.push(this.endTime.toLocaleDateString())
|
||||
}
|
||||
listUserLabel(this.addDateRange(this.queryParams, dateRange)).then(res => {
|
||||
|
||||
this.orderList = res.data.records
|
||||
this.total = res.data.total
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
@ -201,9 +191,19 @@ export default {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (!this.form.id) {
|
||||
|
||||
addUserLabel(this.form).then(res => {
|
||||
this.$message.success("添加成功")
|
||||
this.open = false
|
||||
this.queryParams.page = 1;
|
||||
this.getList()
|
||||
})
|
||||
} else {
|
||||
|
||||
editUserLabel(this.form).then(res => {
|
||||
this.$message.success("修改成功")
|
||||
this.open = false
|
||||
this.queryParams.page = 1;
|
||||
this.getList()
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -211,8 +211,11 @@ export default {
|
||||
// 新增按钮操作
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.form = {
|
||||
status:"qy"
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "新增员工";
|
||||
this.title = "新增会员标签";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
@ -226,12 +229,18 @@ export default {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime = ''
|
||||
this.endTime = ''
|
||||
this.handleQuery();
|
||||
},
|
||||
// 修改按钮操作
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
getUserLabel(row.id).then(res => {
|
||||
this.open = true;
|
||||
this.form = res.data;
|
||||
this.title = "修改会员标签"
|
||||
})
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
@ -239,9 +248,9 @@ export default {
|
||||
},
|
||||
// 删除按钮操作
|
||||
handleDelete(row) {
|
||||
const name = row.realName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的员工信息?').then(function() {
|
||||
return delStaff(row.id);
|
||||
const name = row.labelName || this.id;
|
||||
this.$modal.confirm('是否确认删除"' + name + '"的会员标签信息?').then(function() {
|
||||
return deleteUserLabel(row.id);
|
||||
}).then(() => {
|
||||
this.queryParams.page = 1
|
||||
this.getList();
|
||||
|
@ -0,0 +1,88 @@
|
||||
package com.fuint.business.userGroup.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userGroup.service.UserGroupService;
|
||||
import com.fuint.business.userGroup.vo.UserGroupVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(UserGroup)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userGroup")
|
||||
public class UserGroupController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private UserGroupService userGroupService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param userGroupVo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(UserGroupVo userGroupVo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(userGroupService.queryPage(page,userGroupVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(userGroupService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userGroup 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody UserGroup userGroup) {
|
||||
return getSuccessResult(userGroupService.insert(userGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param userGroup 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody UserGroup userGroup) {
|
||||
return getSuccessResult(userGroupService.update(userGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(userGroupService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
package com.fuint.business.userGroup.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserMassSend;
|
||||
import com.fuint.business.userGroup.service.UserMassSendService;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(UserMassSend)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userMassSend")
|
||||
public class UserMassSendController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private UserMassSendService userMassSendService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param userMassSendVo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(UserMassSendVo userMassSendVo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(userMassSendService.queryPage(page,userMassSendVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(userMassSendService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param UserMassSend 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody UserMassSend UserMassSend) {
|
||||
return getSuccessResult(userMassSendService.insert(UserMassSend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param UserMassSend 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody UserMassSend UserMassSend) {
|
||||
return getSuccessResult(userMassSendService.update(UserMassSend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(userMassSendService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,88 @@
|
||||
package com.fuint.business.userGroup.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserMassSendRecord;
|
||||
import com.fuint.business.userGroup.service.UserMassSendRecordService;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendRecordVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(UserMassSend)表控制层
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-07-31 14:59:04
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("userMassSendRecord")
|
||||
public class UserMassSendRecordController extends BaseController {
|
||||
/**
|
||||
* 服务对象
|
||||
*/
|
||||
@Resource
|
||||
private UserMassSendRecordService userMassSendRecordService;
|
||||
|
||||
/**
|
||||
* 根据条件分页查询首页轮播图
|
||||
* @param userMassSendVo
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(UserMassSendRecordVo userMassSendVo,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(userMassSendRecordService.queryPage(page,userMassSendVo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(userMassSendRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param UserMassSend 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody UserMassSendRecord UserMassSend) {
|
||||
return getSuccessResult(userMassSendRecordService.insert(UserMassSend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param UserMassSend 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody UserMassSendRecord UserMassSend) {
|
||||
return getSuccessResult(userMassSendRecordService.update(UserMassSend));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(userMassSendRecordService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,138 @@
|
||||
package com.fuint.business.userGroup.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 会员分组(UserGroup)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 09:25:28
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_group")
|
||||
@ApiModel(value = "UserGroup对象", description = "会员分组")
|
||||
public class UserGroup extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 分组名称
|
||||
*/
|
||||
private String groupName;
|
||||
/**
|
||||
* 会员等级id
|
||||
*/
|
||||
private Integer gradeId;
|
||||
/**
|
||||
* 会员标签id:可多选
|
||||
*/
|
||||
private String userLabelId;
|
||||
/**
|
||||
* 会员性别:可多选
|
||||
*/
|
||||
private String userSex;
|
||||
/**
|
||||
* 会员年龄:前面的
|
||||
*/
|
||||
private Integer userAgeFront;
|
||||
/**
|
||||
* 会员年龄:后面的
|
||||
*/
|
||||
private Integer userAgeAfter;
|
||||
/**
|
||||
* 会员余额:前
|
||||
*/
|
||||
private Double userBalanceFront;
|
||||
/**
|
||||
* 会员余额:后
|
||||
*/
|
||||
private Double userBalanceAfter;
|
||||
/**
|
||||
* 会员积分:前
|
||||
*/
|
||||
private Double userPointFront;
|
||||
/**
|
||||
* 会员积分:后
|
||||
*/
|
||||
private Double userPointAfter;
|
||||
/**
|
||||
* 充值次数:前
|
||||
*/
|
||||
private Integer rechargeNumFront;
|
||||
/**
|
||||
* 充值次数:后
|
||||
*/
|
||||
private Integer rechargeNumAfter;
|
||||
/**
|
||||
* 充值金额:前
|
||||
*/
|
||||
private Double rechargeAmountFront;
|
||||
/**
|
||||
* 充值金额:后
|
||||
*/
|
||||
private Double rechargeAmountAfter;
|
||||
/**
|
||||
* 消费周期:0、不限制;1、7天;2、15天;3、30天;4、60天;5、90天;6、180天
|
||||
*/
|
||||
private String consumeCycle;
|
||||
/**
|
||||
* 消费油品:可多选
|
||||
*/
|
||||
private String consumeOil;
|
||||
/**
|
||||
* 消费次数:前
|
||||
*/
|
||||
private Integer consumeNumFront;
|
||||
/**
|
||||
* 消费次数:后
|
||||
*/
|
||||
private Integer consumeNumAfter;
|
||||
/**
|
||||
* 消费金额:前
|
||||
*/
|
||||
private Double consumeAmountFront;
|
||||
/**
|
||||
* 消费金额:后
|
||||
*/
|
||||
private Double consumeAmountAfter;
|
||||
/**
|
||||
* 平均消费:前
|
||||
*/
|
||||
private Double averageConsumeFront;
|
||||
/**
|
||||
* 平均消费:后
|
||||
*/
|
||||
private Double averageConsumeAfter;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,98 @@
|
||||
package com.fuint.business.userGroup.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 会员群发(UserMassSend)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 10:50:55
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_mass_send")
|
||||
@ApiModel(value = "UserMassSend对象", description = "会员群发")
|
||||
public class UserMassSend extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 会员分组id
|
||||
*/
|
||||
private Integer userGroupId;
|
||||
/**
|
||||
* 活动时间类型:0、永久有效;1、自定义
|
||||
*/
|
||||
private String activityTimeType;
|
||||
/**
|
||||
* 活动时间
|
||||
*/
|
||||
private Date activityTime;
|
||||
/**
|
||||
* 发送频次:0、每天一次;1、周固定时间;2、月固定时间;3、法定节日时间
|
||||
*/
|
||||
private String sendFrequency;
|
||||
/**
|
||||
* 发送时间:每天几点
|
||||
*/
|
||||
private String sendTime;
|
||||
/**
|
||||
* 发送日期:周/月/法定
|
||||
*/
|
||||
private String sendDate;
|
||||
/**
|
||||
* 群发方式:0、短信消息
|
||||
*/
|
||||
private String sendWay;
|
||||
/**
|
||||
* 群发礼品:0、积分;1、优惠券;2、成长值
|
||||
*/
|
||||
private String senfGift;
|
||||
/**
|
||||
* 短信模板id
|
||||
*/
|
||||
private Integer messageId;
|
||||
/**
|
||||
* 跳转链接:0、小程序链接;1、常用链接
|
||||
*/
|
||||
private String jumpLink;
|
||||
/**
|
||||
* 小程序跳转页面:0、首页;1、一键加油;2、储值卡充值;3、囤油卡充值;4、礼品卡兑换;5、消费有礼;6、折扣营销;7、满减营销;8、积分商城;9、邀请有礼
|
||||
*/
|
||||
private String appletJumpPage;
|
||||
/**
|
||||
* 群发会员数量
|
||||
*/
|
||||
private Integer sendUserNum;
|
||||
/**
|
||||
* 活动状态:0、未开始;1、进行中;2、已结束
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,70 @@
|
||||
package com.fuint.business.userGroup.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 群发记录(UserMassSendRecord)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 13:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("user_mass_send_record")
|
||||
@ApiModel(value = "UserMassSendRecord对象", description = "群发记录")
|
||||
public class UserMassSendRecord extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 所属连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 所属店铺id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 群发活动id
|
||||
*/
|
||||
private Integer massSendId;
|
||||
/**
|
||||
* 群发礼品:0、积分;1、优惠券;2、成长值
|
||||
*/
|
||||
private String senfGift;
|
||||
/**
|
||||
* 群发方式:0、短信消息
|
||||
*/
|
||||
private String sendWay;
|
||||
/**
|
||||
* 群发会员数量
|
||||
*/
|
||||
private Integer userNum;
|
||||
/**
|
||||
* 成功数量
|
||||
*/
|
||||
private Integer successNum;
|
||||
/**
|
||||
* 失败数量
|
||||
*/
|
||||
private Integer failNum;
|
||||
/**
|
||||
* 状态:0、已发送;1发送失败
|
||||
*/
|
||||
private String status;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.userGroup.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userGroup.vo.UserGroupVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserGroupMapper extends BaseMapper<UserGroup> {
|
||||
IPage<UserGroupVo> queryPage(Page page, @Param("entity") UserGroupVo userGroup);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.userGroup.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserMassSend;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserMassSendMapper extends BaseMapper<UserMassSend> {
|
||||
IPage<UserMassSendVo> queryPage(Page page, @Param("entity") UserMassSendVo userGroup);
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.userGroup.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserMassSendRecord;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendRecordVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserMassSendRecordMapper extends BaseMapper<UserMassSendRecord> {
|
||||
IPage<UserMassSendRecordVo> queryPage(Page page, @Param("entity") UserMassSendRecordVo userMassSendRecordVo);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.userGroup.mapper.UserGroupMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.userGroup.vo.UserGroupVo">
|
||||
SELECT ug.*,ta.real_name accountName FROM user_group ug LEFT JOIN t_account ta ON ug.create_by = ta.acct_id
|
||||
<where>
|
||||
<if test="entity.chainStoreId != null and entity.chainStoreId != ''">
|
||||
and ug.chain_store_id = #{entity.chainStoreId}
|
||||
</if>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and ug.store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.groupName != null and entity.groupName != ''">
|
||||
and ug.group_name like concat('%', #{entity.groupName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(ug.create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(ug.create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.userGroup.mapper.UserMassSendMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.userGroup.vo.UserMassSendVo">
|
||||
SELECT ums.*,ta.real_name accountName FROM user_mass_send ums LEFT JOIN t_account ta ON ums.create_by = ta.acct_id
|
||||
<where>
|
||||
<if test="entity.chainStoreId != null and entity.chainStoreId != ''">
|
||||
and ums.chain_store_id = #{entity.chainStoreId}
|
||||
</if>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and ums.store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and ums.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(ums.create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(ums.create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.userGroup.mapper.UserMassSendRecordMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.userGroup.vo.UserMassSendRecordVo">
|
||||
SELECT umsr.*,ums.`name` activityName,ta.real_name accountName FROM user_mass_send_record umsr
|
||||
LEFT JOIN user_mass_send ums on umsr.mass_send_id = ums.id
|
||||
LEFT JOIN t_account ta on umsr.create_by = ta.acct_id
|
||||
<where>
|
||||
<if test="entity.chainStoreId != null and entity.chainStoreId != ''">
|
||||
and umsr.chain_store_id = #{entity.chainStoreId}
|
||||
</if>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and umsr.store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.status != null and entity.status != ''">
|
||||
and umsr.status = #{entity.status}
|
||||
</if>
|
||||
<if test="entity.name != null and entity.name != ''">
|
||||
and ums.name like concat('%', #{entity.name}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(ums.create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(ums.create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
@ -0,0 +1,55 @@
|
||||
package com.fuint.business.userGroup.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userGroup.vo.UserGroupVo;
|
||||
|
||||
/**
|
||||
* 会员分组(UserGroup)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 09:25:28
|
||||
*/
|
||||
public interface UserGroupService {
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
* @param page
|
||||
* @param userGroup
|
||||
* @return
|
||||
*/
|
||||
IPage<UserGroupVo> queryPage(Page page, UserGroupVo userGroup);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
UserGroup queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userGroup 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(UserGroup userGroup);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userGroup 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(UserGroup userGroup);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.fuint.business.userGroup.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserMassSendRecord;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendRecordVo;
|
||||
|
||||
/**
|
||||
* 群发记录(UserMassSendRecord)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 13:58:13
|
||||
*/
|
||||
public interface UserMassSendRecordService {
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
* @param page
|
||||
* @param userMassSendRecordVo
|
||||
* @return
|
||||
*/
|
||||
IPage<UserMassSendRecordVo> queryPage(Page page, UserMassSendRecordVo userMassSendRecordVo);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
UserMassSendRecord queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userMassSendRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(UserMassSendRecord userMassSendRecord);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userMassSendRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(UserMassSendRecord userMassSendRecord);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.fuint.business.userGroup.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userGroup.entity.UserMassSend;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 会员群发(UserMassSend)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 10:50:55
|
||||
*/
|
||||
public interface UserMassSendService {
|
||||
/**
|
||||
* 根据条件分页查询
|
||||
* @param page
|
||||
* @param userGroup
|
||||
* @return
|
||||
*/
|
||||
IPage<UserMassSendVo> queryPage(Page page, UserMassSendVo userGroup);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
UserMassSend queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userMassSend 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(UserMassSend userMassSend);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userMassSend 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(UserMassSend userMassSend);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.fuint.business.userGroup.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userGroup.mapper.UserGroupMapper;
|
||||
import com.fuint.business.userGroup.service.UserGroupService;
|
||||
import com.fuint.business.userGroup.vo.UserGroupVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员分组(UserGroup)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 09:25:28
|
||||
*/
|
||||
@Service("userGroupService")
|
||||
public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper,UserGroup> implements UserGroupService {
|
||||
|
||||
@Override
|
||||
public IPage<UserGroupVo> queryPage(Page page, UserGroupVo userGroup) {
|
||||
return baseMapper.queryPage(page,userGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public UserGroup queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userGroup 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserGroup userGroup) {
|
||||
return baseMapper.insert(userGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userGroup 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(UserGroup userGroup) {
|
||||
return baseMapper.updateById(userGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.fuint.business.userGroup.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.userGroup.entity.UserMassSendRecord;
|
||||
import com.fuint.business.userGroup.mapper.UserMassSendRecordMapper;
|
||||
import com.fuint.business.userGroup.service.UserMassSendRecordService;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendRecordVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 群发记录(UserMassSendRecord)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 13:58:13
|
||||
*/
|
||||
@Service("userMassSendRecordService")
|
||||
public class UserMassSendRecordServiceImpl extends ServiceImpl<UserMassSendRecordMapper,UserMassSendRecord> implements UserMassSendRecordService {
|
||||
|
||||
|
||||
@Override
|
||||
public IPage<UserMassSendRecordVo> queryPage(Page page, UserMassSendRecordVo userMassSendRecordVo) {
|
||||
return baseMapper.queryPage(page,userMassSendRecordVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public UserMassSendRecord queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userMassSendRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserMassSendRecord userMassSendRecord) {
|
||||
return baseMapper.insert(userMassSendRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userMassSendRecord 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(UserMassSendRecord userMassSendRecord) {
|
||||
return baseMapper.updateById(userMassSendRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package com.fuint.business.userGroup.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.userGroup.entity.UserMassSend;
|
||||
import com.fuint.business.userGroup.mapper.UserMassSendMapper;
|
||||
import com.fuint.business.userGroup.service.UserMassSendService;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 会员群发(UserMassSend)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-09 10:50:55
|
||||
*/
|
||||
@Service("userMassSendService")
|
||||
public class UserMassSendServiceImpl extends ServiceImpl<UserMassSendMapper,UserMassSend> implements UserMassSendService {
|
||||
|
||||
@Override
|
||||
public IPage<UserMassSendVo> queryPage(Page page, UserMassSendVo userGroup) {
|
||||
return baseMapper.queryPage(page,userGroup);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public UserMassSend queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param userMassSend 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserMassSend userMassSend) {
|
||||
return baseMapper.insert(userMassSend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param userMassSend 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(UserMassSend userMassSend) {
|
||||
return baseMapper.updateById(userMassSend);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.userGroup.vo;
|
||||
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserGroupVo extends UserGroup {
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String accountName;
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package com.fuint.business.userGroup.vo;
|
||||
|
||||
import com.fuint.business.userGroup.entity.UserMassSendRecord;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserMassSendRecordVo extends UserMassSendRecord {
|
||||
/**
|
||||
* 群发活动名称
|
||||
*/
|
||||
private String activityName;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String accountName;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.userGroup.vo;
|
||||
|
||||
import com.fuint.business.userGroup.entity.UserMassSend;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserMassSendVo extends UserMassSend {
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String accountName;
|
||||
}
|
@ -3,6 +3,7 @@ package com.fuint.business.userManager.controller;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.service.UserLabelService;
|
||||
import com.fuint.business.userManager.vo.UserLabelVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -32,8 +33,8 @@ public class UserLabelController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject lists(UserLabel userLabel,
|
||||
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||
public ResponseObject lists(UserLabelVo userLabel,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
return getSuccessResult(userLabelService.queryPage(page,userLabel));
|
||||
|
@ -72,8 +72,10 @@ public class UserBalance extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private String fixingLevel;
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 会员标签id
|
||||
*/
|
||||
private Integer userLabelId;
|
||||
|
||||
}
|
||||
|
||||
|
@ -49,22 +49,6 @@ public class UserLabel extends BaseEntity implements Serializable {
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 更新者
|
||||
*/
|
||||
private String updateBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,9 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.vo.UserLabelVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface UserLabelMapper extends BaseMapper<UserLabel> {
|
||||
IPage<UserLabel> queryPage(Page page, @Param("entity") UserLabel userLabel);
|
||||
IPage<UserLabelVo> queryPage(Page page, @Param("entity") UserLabelVo userLabel);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
</sql>
|
||||
<sql id="selectUserAndBalance">
|
||||
select mu.*,mub.id balanceId,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
|
||||
mub.second_card,mub.fixing_level,mub.create_time balCreateTime,mub.remark remark
|
||||
mub.second_card,mub.fixing_level,mub.create_time balCreateTime,mub.remark remark,mub.user_label_id userLabelId
|
||||
FROM mt_user mu
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
</sql>
|
||||
|
@ -2,20 +2,23 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.fuint.business.userManager.mapper.UserLabelMapper">
|
||||
|
||||
<select id="queryPage" resultType="com.fuint.business.userManager.entity.UserLabel">
|
||||
SELECT * FROM user_label
|
||||
<select id="queryPage" resultType="com.fuint.business.userManager.vo.UserLabelVo">
|
||||
SELECT ul.*,ta.real_name accountName FROM user_label ul LEFT JOIN t_account ta ON ul.create_by = ta.acct_id
|
||||
<where>
|
||||
<if test="entity.chainStoreId != null and entity.chainStoreId != ''">
|
||||
and ul.chain_store_id = #{entity.chainStoreId}
|
||||
</if>
|
||||
<if test="entity.storeId != null and entity.storeId != ''">
|
||||
and store_id = #{entity.storeId}
|
||||
and ul.store_id = #{entity.storeId}
|
||||
</if>
|
||||
<if test="entity.labelName != null and entity.labelName != ''">
|
||||
and label_name like concat('%', #{entity.labelName}, '%')
|
||||
and ul.label_name like concat('%', #{entity.labelName}, '%')
|
||||
</if>
|
||||
<if test="entity.params.beginTime != null and entity.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
and date_format(ul.create_time,'%y%m%d') >= date_format(#{entity.params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="entity.params.endTime != null and entity.params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
and date_format(ul.create_time,'%y%m%d') <= date_format(#{entity.params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY create_time DESC
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.userManager.service;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.vo.UserLabelVo;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
|
||||
/**
|
||||
@ -18,7 +19,7 @@ public interface UserLabelService {
|
||||
* @param userLabel
|
||||
* @return
|
||||
*/
|
||||
IPage<UserLabel> queryPage(Page page, UserLabel userLabel);
|
||||
IPage<UserLabelVo> queryPage(Page page, UserLabelVo userLabel);
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
|
@ -5,9 +5,18 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import com.fuint.business.userManager.mapper.UserLabelMapper;
|
||||
import com.fuint.business.userManager.service.LJUserService;
|
||||
import com.fuint.business.userManager.service.UserLabelService;
|
||||
import com.fuint.business.userManager.vo.LJUserVo;
|
||||
import com.fuint.business.userManager.vo.UserLabelVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员标签表(UserLabel)表服务实现类
|
||||
*
|
||||
@ -17,9 +26,27 @@ import org.springframework.stereotype.Service;
|
||||
@Service("userLabelService")
|
||||
public class UserLabelServiceImpl extends ServiceImpl<UserLabelMapper,UserLabel> implements UserLabelService {
|
||||
|
||||
@Autowired
|
||||
@Lazy
|
||||
private LJUserService userService;
|
||||
|
||||
@Override
|
||||
public IPage<UserLabel> queryPage(Page page, UserLabel userLabel) {
|
||||
return baseMapper.queryPage(page,userLabel);
|
||||
public IPage<UserLabelVo> queryPage(Page page, UserLabelVo userLabel) {
|
||||
userLabel.setChainStoreId(TokenUtil.getNowAccountInfo().getChainStoreId());
|
||||
IPage<UserLabelVo> userLabelVoIPage = baseMapper.queryPage(page, userLabel);
|
||||
List<LJUserVo> ljUserVos = userService.selectUsersList();
|
||||
Integer userTotal = ljUserVos.size();
|
||||
for (UserLabelVo record : userLabelVoIPage.getRecords()) {
|
||||
Integer userNum = 0;
|
||||
for (LJUserVo ljUserVo : ljUserVos) {
|
||||
if (ljUserVo.getUserLabelId()==record.getId()){
|
||||
userNum += 1;
|
||||
}
|
||||
}
|
||||
record.setUserNum(userNum);
|
||||
record.setUserProportion((double) (userNum / userTotal));
|
||||
}
|
||||
return userLabelVoIPage;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -41,6 +68,9 @@ public class UserLabelServiceImpl extends ServiceImpl<UserLabelMapper,UserLabel>
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserLabel userLabel) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
userLabel.setStoreId(nowAccountInfo.getStoreId());
|
||||
userLabel.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
return baseMapper.insert(userLabel);
|
||||
}
|
||||
|
||||
|
@ -129,4 +129,8 @@ public class LJUserVo extends BaseEntity {
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
private Date balCreateTime;
|
||||
/**
|
||||
* 会员标签id
|
||||
*/
|
||||
private Integer userLabelId;
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.fuint.business.userManager.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fuint.business.userManager.entity.UserLabel;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UserLabelVo extends UserLabel {
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String accountName;
|
||||
/**
|
||||
* 会员数量
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer userNum;
|
||||
/**
|
||||
* 会员占比
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Double userProportion;
|
||||
}
|
Loading…
Reference in New Issue
Block a user