会员管理 固定等级
This commit is contained in:
parent
18cbb90abd
commit
a28df63a64
44
fuintAdmin/src/api/staff/user/certifiedmember.js
Normal file
44
fuintAdmin/src/api/staff/user/certifiedmember.js
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询固定等级列表
|
||||||
|
export function listCertifiedMember(query) {
|
||||||
|
return request({
|
||||||
|
url: '/business/userManager/certifiedMember/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询固定等级详细
|
||||||
|
export function getCertifiedMember(id) {
|
||||||
|
return request({
|
||||||
|
url: '/business/userManager/certifiedMember/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增固定等级
|
||||||
|
export function addCertifiedMember(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/userManager/certifiedMember',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改固定等级
|
||||||
|
export function updateCertifiedMember(data) {
|
||||||
|
return request({
|
||||||
|
url: '/business/userManager/certifiedMember',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除固定等级
|
||||||
|
export function delCertifiedMember(id) {
|
||||||
|
return request({
|
||||||
|
url: '/business/userManager/certifiedMember/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
@ -52,13 +52,19 @@
|
|||||||
<el-tab-pane label="固定等级认证" name="fixingLevel">
|
<el-tab-pane label="固定等级认证" name="fixingLevel">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
<el-form-item label="认证状态" prop="status">
|
<el-form-item label="认证状态" prop="status">
|
||||||
<el-input
|
<el-select
|
||||||
v-model="queryParams.status"
|
v-model="queryParams.status"
|
||||||
placeholder="全部"
|
placeholder="全部"
|
||||||
clearable
|
clearable
|
||||||
style="width: 240px;"
|
style="width: 240px"
|
||||||
@keyup.enter.native="handleQuery"
|
>
|
||||||
/>
|
<el-option
|
||||||
|
v-for="dict in dict.type.zhzt"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
@ -89,14 +95,18 @@
|
|||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['member:add']"
|
v-hasPermi="['member:add']"
|
||||||
>新增用户认证</el-button>
|
>新增用户认证</el-button>
|
||||||
<el-table ref="tables" v-loading="loading" :data="list" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
<el-table ref="tables" v-loading="loading" :data="listMember" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="handleSortChange">
|
||||||
<el-table-column label="认证类型" prop="id" align="center" width="60"/>
|
<el-table-column label="认证类型" prop="fixingLevelId" align="center">
|
||||||
<el-table-column label="手机号" align="center" width="70"/>
|
<template slot-scope="scope">
|
||||||
<el-table-column label="关联会员" align="center" prop="userNo" width="150"/>
|
<span>{{ scope.row.fixingLevelId ? getName(fixingLevelList, scope.row.fixingLevelId) : '-' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="手机号" align="center"prop="mobile"/>
|
||||||
|
<el-table-column label="关联会员" align="center" prop="userId"/>
|
||||||
<el-table-column label="姓名" align="center" prop="name" />
|
<el-table-column label="姓名" align="center" prop="name" />
|
||||||
<el-table-column label="车牌号" align="center" prop="mobile" width="110"/>
|
<el-table-column label="车牌号" align="center" prop="carNumber"/>
|
||||||
<el-table-column label="认证资料" align="center" prop="gradeId" width="80"/>
|
<el-table-column label="认证资料" align="center" prop="attestationData"/>
|
||||||
<el-table-column label="备注" align="center" prop="balance"/>
|
<el-table-column label="备注" align="center" prop="remark"/>
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<dict-tag :options="dict.type.rzzt" :value="scope.row.status"/>
|
<dict-tag :options="dict.type.rzzt" :value="scope.row.status"/>
|
||||||
@ -125,9 +135,9 @@
|
|||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total>0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.page"
|
:page.sync="queryParam.page"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParam.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getListMember"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -296,7 +306,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
<!-- 添加或修改对话框 -->
|
<!-- 添加固定等级或修改对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" class="roll-dialog"
|
<el-dialog :title="title" :visible.sync="open" class="roll-dialog"
|
||||||
:close-on-click-modal="false" append-to-body>
|
:close-on-click-modal="false" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||||
@ -572,14 +582,17 @@ import {
|
|||||||
listFixingLevel,
|
listFixingLevel,
|
||||||
updateFixingLevel
|
updateFixingLevel
|
||||||
} from "@/api/staff/user/fixinglevel";
|
} from "@/api/staff/user/fixinglevel";
|
||||||
|
import {listCertifiedMember} from "@/api/staff/user/certifiedmember";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
dicts: ['yhlx','yes_or_no','zhzt','yhhdz'],
|
dicts: ['yhlx','yes_or_no','zhzt','yhhdz','rzzt'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeName: 'member',
|
activeName: 'member',
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
// 固定等级列表
|
||||||
|
fixingLevelList:[],
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -588,6 +601,14 @@ export default {
|
|||||||
id: '',
|
id: '',
|
||||||
type: '',
|
type: '',
|
||||||
status: '',
|
status: '',
|
||||||
|
},// 查询参数
|
||||||
|
queryParam: {
|
||||||
|
page: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
mobile: '',
|
||||||
|
id: '',
|
||||||
|
type: '',
|
||||||
|
status: '',
|
||||||
},
|
},
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
@ -597,6 +618,8 @@ export default {
|
|||||||
total: 0,
|
total: 0,
|
||||||
// 表格数据
|
// 表格数据
|
||||||
list: [],
|
list: [],
|
||||||
|
// 表格数据
|
||||||
|
listMember: [],
|
||||||
// 默认排序
|
// 默认排序
|
||||||
defaultSort: {prop: 'updateTime', order: 'descending'},
|
defaultSort: {prop: 'updateTime', order: 'descending'},
|
||||||
// 标题
|
// 标题
|
||||||
@ -651,6 +674,7 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getListMember();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(tab, event) {
|
handleClick(tab, event) {
|
||||||
@ -665,6 +689,16 @@ export default {
|
|||||||
this.loading = true;
|
this.loading = true;
|
||||||
listFixingLevel(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
listFixingLevel(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
|
||||||
this.list = response.data.records;
|
this.list = response.data.records;
|
||||||
|
this.fixingLevelList = response.data.records;
|
||||||
|
this.total = response.data.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getListMember(){
|
||||||
|
this.loading = true;
|
||||||
|
listCertifiedMember(this.addDateRange(this.queryParam, this.dateRange)).then( response => {
|
||||||
|
console.log(response)
|
||||||
|
this.listMember = response.data.records;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1,78 @@
|
|||||||
|
package com.fuint.business.userManager.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.userManager.entity.CertifiedMember;
|
||||||
|
import com.fuint.business.userManager.service.CertifiedMemberService;
|
||||||
|
import com.fuint.framework.web.BaseController;
|
||||||
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 固定等级 controller层
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/business/userManager/certifiedMember")
|
||||||
|
public class CertifiedMemberController extends BaseController {
|
||||||
|
@Autowired
|
||||||
|
private CertifiedMemberService certifiedMemberService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据条件分页查询固定等级信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @param pageNo
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public ResponseObject list(CertifiedMember certifiedMember,
|
||||||
|
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
|
||||||
|
Page page =new Page(pageNo,pageSize);
|
||||||
|
IPage<CertifiedMember> list = certifiedMemberService.selectCertifiedMemberList(page,certifiedMember);
|
||||||
|
return getSuccessResult(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询固定等级信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public ResponseObject staffInfo(@PathVariable Integer id){
|
||||||
|
CertifiedMember certifiedMember = certifiedMemberService.selectCertifiedMemberById(id);
|
||||||
|
return getSuccessResult(certifiedMember);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除固定等级信息
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@DeleteMapping("/{id}")
|
||||||
|
public ResponseObject remove(@PathVariable Integer id){
|
||||||
|
certifiedMemberService.deleteCertifiedMemberById(id);
|
||||||
|
return getSuccessResult("操作成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加固定等级信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public ResponseObject add(@Validated @RequestBody CertifiedMember certifiedMember){
|
||||||
|
return getSuccessResult(certifiedMemberService.insertCertifiedMember(certifiedMember));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改固定等级信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public ResponseObject edit(@Validated @RequestBody CertifiedMember certifiedMember){
|
||||||
|
return getSuccessResult(certifiedMemberService.updateCertifiedMember(certifiedMember));
|
||||||
|
}
|
||||||
|
}
|
@ -2,14 +2,12 @@ package com.fuint.business.userManager.controller;
|
|||||||
|
|
||||||
import com.alibaba.excel.EasyExcel;
|
import com.alibaba.excel.EasyExcel;
|
||||||
import com.alibaba.excel.EasyExcelFactory;
|
import com.alibaba.excel.EasyExcelFactory;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.fuint.business.userManager.entity.LJUser;
|
import com.fuint.business.userManager.entity.LJUser;
|
||||||
import com.fuint.business.userManager.listener.EasyExcelListener;
|
import com.fuint.business.userManager.listener.EasyExcelListener;
|
||||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||||
import com.fuint.business.userManager.service.LJUserService;
|
import com.fuint.business.userManager.service.LJUserService;
|
||||||
import com.fuint.framework.web.BaseController;
|
import com.fuint.framework.web.BaseController;
|
||||||
import com.fuint.framework.web.ResponseObject;
|
import com.fuint.framework.web.ResponseObject;
|
||||||
import org.apache.poi.ss.formula.functions.T;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
@ -20,9 +18,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.URLEncoder;
|
import java.net.URLEncoder;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/excel")
|
@RequestMapping("/excel")
|
||||||
@ -53,7 +49,7 @@ public class ExportController extends BaseController{
|
|||||||
//获取数据
|
//获取数据
|
||||||
List<Object> list = listener.getDatas();
|
List<Object> list = listener.getDatas();
|
||||||
total = list.size();
|
total = list.size();
|
||||||
if (list.size() > 1) {
|
if (list.size() >= 1) {
|
||||||
for (int i = 0; i < list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
LJUser user = (LJUser) list.get(i);
|
LJUser user = (LJUser) list.get(i);
|
||||||
LJUser user1 = service.selectUserByMobile(user.getMobile());
|
LJUser user1 = service.selectUserByMobile(user.getMobile());
|
||||||
@ -80,7 +76,6 @@ public class ExportController extends BaseController{
|
|||||||
return getSuccessResult(map);
|
return getSuccessResult(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("/export")
|
@RequestMapping("/export")
|
||||||
public void export(HttpServletResponse response, HttpServletRequest request) {
|
public void export(HttpServletResponse response, HttpServletRequest request) {
|
||||||
|
|
||||||
@ -96,17 +91,16 @@ public class ExportController extends BaseController{
|
|||||||
response.setCharacterEncoding("utf-8");
|
response.setCharacterEncoding("utf-8");
|
||||||
response.addHeader("Content-Disposition", "filename=" + filenames + ".xlsx");
|
response.addHeader("Content-Disposition", "filename=" + filenames + ".xlsx");
|
||||||
|
|
||||||
// Step1:创建一个 QueryWrapper 对象
|
LJUser ljUser = new LJUser();
|
||||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
ljUser.setUserNo("51246214");
|
||||||
|
ljUser.setName("会员");
|
||||||
|
ljUser.setMobile("15245698512");
|
||||||
|
ljUser.setIdcard("845126542514568542");
|
||||||
|
|
||||||
// Step2: 构造查询条件
|
|
||||||
queryWrapper
|
|
||||||
.select("*");
|
|
||||||
|
|
||||||
// Step3:执行查询
|
List<LJUser> list = new ArrayList<>();
|
||||||
List<LJUser> userList = mapper.selectList(queryWrapper);
|
list.add(ljUser);
|
||||||
|
EasyExcel.write(response.getOutputStream(), LJUser.class).sheet("sheet").doWrite(list);
|
||||||
EasyExcel.write(response.getOutputStream(), LJUser.class).sheet("sheet").doWrite(userList);
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,72 @@
|
|||||||
|
package com.fuint.business.userManager.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.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证会员表(CertifiedMember)实体类
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@TableName("certified_member")
|
||||||
|
@ApiModel(value = "CertifiedMember对象", description = "")
|
||||||
|
public class CertifiedMember extends BaseEntity implements Serializable {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("自增ID")
|
||||||
|
@TableId(value = "ID", type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 固定等级id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("固定等级id")
|
||||||
|
private Integer fixingLevelId;
|
||||||
|
/**
|
||||||
|
* 会员id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("会员id")
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 姓名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("姓名")
|
||||||
|
private String name;
|
||||||
|
/**
|
||||||
|
* 手机号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("手机号")
|
||||||
|
private String mobile;
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("车牌号")
|
||||||
|
private String carNumber;
|
||||||
|
/**
|
||||||
|
* 认证资料
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("认证资料")
|
||||||
|
private String attestationData;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String remark;
|
||||||
|
/**
|
||||||
|
* 认证状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("认证状态")
|
||||||
|
private String status;
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ import com.alibaba.excel.annotation.format.DateTimeFormat;
|
|||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.baomidou.mybatisplus.annotation.*;
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fuint.business.userManager.util.GenderConverter;
|
||||||
import com.fuint.framework.entity.BaseEntity;
|
import com.fuint.framework.entity.BaseEntity;
|
||||||
import io.swagger.annotations.ApiModel;
|
import io.swagger.annotations.ApiModel;
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
@ -44,7 +45,7 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private String avatar;
|
private String avatar;
|
||||||
|
|
||||||
@ApiModelProperty("称呼")
|
@ApiModelProperty("称呼")
|
||||||
@ExcelProperty(value = "称呼")
|
@ExcelProperty(value = "姓名")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty("微信")
|
@ApiModelProperty("微信")
|
||||||
@ -52,7 +53,7 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private String openId;
|
private String openId;
|
||||||
|
|
||||||
@ApiModelProperty("手机号码")
|
@ApiModelProperty("手机号码")
|
||||||
@ExcelProperty(value = "手机号码")
|
@ExcelProperty(value = "手机号码(必填)")
|
||||||
private String mobile;
|
private String mobile;
|
||||||
|
|
||||||
@ApiModelProperty("证件号码")
|
@ApiModelProperty("证件号码")
|
||||||
@ -60,7 +61,6 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private String idcard;
|
private String idcard;
|
||||||
|
|
||||||
@ApiModelProperty("等级ID")
|
@ApiModelProperty("等级ID")
|
||||||
@ExcelProperty(value = "等级ID")
|
|
||||||
private String gradeId;
|
private String gradeId;
|
||||||
|
|
||||||
@ApiModelProperty("会员开始时间")
|
@ApiModelProperty("会员开始时间")
|
||||||
@ -81,20 +81,17 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
@ExcelProperty(value = "积分")
|
@ExcelProperty(value = "积分")
|
||||||
private Integer point;
|
private Integer point;
|
||||||
|
|
||||||
@ApiModelProperty("性别 1男;0女")
|
@ApiModelProperty("性别 1男,0女")
|
||||||
@ExcelProperty(value = "性别 1男;0女")
|
@ExcelProperty(value = "性别",converter = GenderConverter.class)
|
||||||
private Integer sex;
|
private Integer sex;
|
||||||
|
|
||||||
@ApiModelProperty("出生日期")
|
@ApiModelProperty("出生日期")
|
||||||
@ExcelProperty(value = "出生日期")
|
|
||||||
private String birthday;
|
private String birthday;
|
||||||
|
|
||||||
@ApiModelProperty("车牌号")
|
@ApiModelProperty("车牌号")
|
||||||
@ExcelProperty(value = "车牌号")
|
|
||||||
private String carNo;
|
private String carNo;
|
||||||
|
|
||||||
@ApiModelProperty("来源渠道")
|
@ApiModelProperty("来源渠道")
|
||||||
@ExcelProperty(value = "来源渠道")
|
|
||||||
private String source;
|
private String source;
|
||||||
|
|
||||||
@ApiModelProperty("密码")
|
@ApiModelProperty("密码")
|
||||||
@ -102,7 +99,6 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
@ApiModelProperty("salt")
|
@ApiModelProperty("salt")
|
||||||
@ExcelProperty(value = "salt")
|
|
||||||
private String salt;
|
private String salt;
|
||||||
|
|
||||||
@ApiModelProperty("地址")
|
@ApiModelProperty("地址")
|
||||||
@ -110,14 +106,12 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private String address;
|
private String address;
|
||||||
|
|
||||||
@ApiModelProperty("所属商户ID")
|
@ApiModelProperty("所属商户ID")
|
||||||
@ExcelProperty(value = "所属商户ID")
|
|
||||||
private Integer merchantId;
|
private Integer merchantId;
|
||||||
|
|
||||||
@ApiModelProperty("默认店铺")
|
@ApiModelProperty("默认店铺")
|
||||||
@ExcelProperty(value = "默认店铺")
|
|
||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
|
|
||||||
@ApiModelProperty("状态,A:激活;N:禁用;D:删除")
|
@ApiModelProperty("状态,启用、禁用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
@ApiModelProperty("备注信息")
|
@ApiModelProperty("备注信息")
|
||||||
@ -132,7 +126,6 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private BigDecimal literCard;
|
private BigDecimal literCard;
|
||||||
|
|
||||||
@ApiModelProperty("公众号")
|
@ApiModelProperty("公众号")
|
||||||
@ExcelProperty(value = "公众号")
|
|
||||||
private String official;
|
private String official;
|
||||||
|
|
||||||
@ApiModelProperty("加油金")
|
@ApiModelProperty("加油金")
|
||||||
@ -148,6 +141,5 @@ public class LJUser extends BaseEntity implements Serializable {
|
|||||||
private String secondCard;
|
private String secondCard;
|
||||||
|
|
||||||
@ApiModelProperty("固定等级")
|
@ApiModelProperty("固定等级")
|
||||||
@ExcelProperty(value = "固定等级")
|
|
||||||
private String fixingLevel;
|
private String fixingLevel;
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.fuint.business.userManager.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.userManager.entity.CertifiedMember;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
public interface CertifiedMemberMapper extends BaseMapper<CertifiedMember> {
|
||||||
|
public IPage<CertifiedMember> selectCertifiedMemberList(Page page, @Param("certifiedMember") CertifiedMember certifiedMember);
|
||||||
|
}
|
@ -0,0 +1,28 @@
|
|||||||
|
<?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.userManager.mapper.CertifiedMemberMapper">
|
||||||
|
<sql id="selectCertifiedMember">
|
||||||
|
select * from certified_member
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectCertifiedMemberList" resultType="com.fuint.business.userManager.entity.CertifiedMember">
|
||||||
|
<include refid="selectCertifiedMember"></include>
|
||||||
|
<where>
|
||||||
|
<if test="certifiedMember.mobile != null and certifiedMember.mobile != ''">
|
||||||
|
and mobile = #{certifiedMember.mobile}
|
||||||
|
</if>
|
||||||
|
<if test="certifiedMember.fixingLevelId != null and certifiedMember.fixingLevelId != ''">
|
||||||
|
and fixing_level_id = #{certifiedMember.fixingLevelId}
|
||||||
|
</if>
|
||||||
|
<if test="certifiedMember.status != null and certifiedMember.status != ''">
|
||||||
|
and status = #{certifiedMember.status}
|
||||||
|
</if>
|
||||||
|
<if test="certifiedMember.params.beginTime != null and certifiedMember.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
|
and date_format(create_time,'%y%m%d') >= date_format(#{certifiedMember.params.beginTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
<if test="certifiedMember.params.endTime != null and certifiedMember.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
|
and date_format(create_time,'%y%m%d') <= date_format(#{certifiedMember.params.endTime},'%y%m%d')
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
</mapper>
|
@ -12,10 +12,10 @@
|
|||||||
and status = #{fixingLevel.status}
|
and status = #{fixingLevel.status}
|
||||||
</if>
|
</if>
|
||||||
<if test="fixingLevel.params.beginTime != null and fixingLevel.params.beginTime != ''"><!-- 开始时间检索 -->
|
<if test="fixingLevel.params.beginTime != null and fixingLevel.params.beginTime != ''"><!-- 开始时间检索 -->
|
||||||
and date_format(create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d')
|
and date_format(create_time,'%y%m%d') >= date_format(#{fixingLevel.params.beginTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
<if test="fixingLevel.params.endTime != null and fixingLevel.params.endTime != ''"><!-- 结束时间检索 -->
|
<if test="fixingLevel.params.endTime != null and fixingLevel.params.endTime != ''"><!-- 结束时间检索 -->
|
||||||
and date_format(create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d')
|
and date_format(create_time,'%y%m%d') <= date_format(#{fixingLevel.params.endTime},'%y%m%d')
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.fuint.business.userManager.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.userManager.entity.CertifiedMember;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证会员 业务层
|
||||||
|
*/
|
||||||
|
public interface CertifiedMemberService extends IService<CertifiedMember> {
|
||||||
|
/**
|
||||||
|
* 根据条件分页查询认证会员信息
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public IPage<CertifiedMember> selectCertifiedMemberList(Page page, CertifiedMember certifiedMember);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询认证会员信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public CertifiedMember selectCertifiedMemberById(int id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id删除认证会员信息
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void deleteCertifiedMemberById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加认证会员信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int insertCertifiedMember(CertifiedMember certifiedMember);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改认证会员信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int updateCertifiedMember(CertifiedMember certifiedMember);
|
||||||
|
}
|
@ -8,7 +8,7 @@ import com.fuint.business.userManager.entity.FixingLevel;
|
|||||||
/**
|
/**
|
||||||
* 固定等级 业务层
|
* 固定等级 业务层
|
||||||
*/
|
*/
|
||||||
public interface FixingLevelService extends IService<FixingLevel> {
|
public interface FixingLevelService extends IService<FixingLevel> {
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询固定等级信息
|
* 根据条件分页查询固定等级信息
|
||||||
* @param page
|
* @param page
|
||||||
|
@ -0,0 +1,73 @@
|
|||||||
|
package com.fuint.business.userManager.service.impl;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSONArray;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
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.userManager.entity.CertifiedMember;
|
||||||
|
import com.fuint.business.userManager.entity.FixingLevel;
|
||||||
|
import com.fuint.business.userManager.mapper.CertifiedMemberMapper;
|
||||||
|
import com.fuint.business.userManager.mapper.FixingLevelMapper;
|
||||||
|
import com.fuint.business.userManager.service.CertifiedMemberService;
|
||||||
|
import com.fuint.business.userManager.service.FixingLevelService;
|
||||||
|
import com.fuint.common.util.StringUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 认证会员 业务层
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMapper, CertifiedMember> implements CertifiedMemberService {
|
||||||
|
/**
|
||||||
|
* 根据条件分页查询固定等级信息
|
||||||
|
* @param page
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<CertifiedMember> selectCertifiedMemberList(Page page, CertifiedMember certifiedMember) {
|
||||||
|
IPage<CertifiedMember> fixingLevelIPage = baseMapper.selectCertifiedMemberList(page, certifiedMember);
|
||||||
|
return fixingLevelIPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询固定等级信息
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public CertifiedMember selectCertifiedMemberById(int id) {
|
||||||
|
return baseMapper.selectById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id删除固定等级信息
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void deleteCertifiedMemberById(Integer id) {
|
||||||
|
baseMapper.deleteById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 增加固定等级信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertCertifiedMember(CertifiedMember certifiedMember) {
|
||||||
|
int row = baseMapper.insert(certifiedMember);
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改固定等级信息
|
||||||
|
* @param certifiedMember
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateCertifiedMember(CertifiedMember certifiedMember) {
|
||||||
|
int row = baseMapper.updateById(certifiedMember);
|
||||||
|
return row;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.fuint.business.userManager.util;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.excel.converters.Converter;
|
||||||
|
import com.alibaba.excel.enums.CellDataTypeEnum;
|
||||||
|
import com.alibaba.excel.metadata.CellData;
|
||||||
|
import com.alibaba.excel.metadata.GlobalConfiguration;
|
||||||
|
import com.alibaba.excel.metadata.property.ExcelContentProperty;
|
||||||
|
|
||||||
|
public class GenderConverter implements Converter<Integer> {
|
||||||
|
|
||||||
|
public static final String MALE = "男";
|
||||||
|
public static final String FEMALE = "女";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class supportJavaTypeKey() {
|
||||||
|
return Integer.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellDataTypeEnum supportExcelTypeKey() {
|
||||||
|
return CellDataTypeEnum.STRING;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||||
|
String stringValue = cellData.getStringValue();
|
||||||
|
if (MALE.equals(stringValue)){
|
||||||
|
return 1;
|
||||||
|
}else {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CellData convertToExcelData(Integer integer, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user