会员信息
This commit is contained in:
parent
a77183d47b
commit
f920b643aa
@ -245,7 +245,7 @@
|
|||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<!-- 添加会员信息,选择是否批量录入-->
|
<!-- 添加会员信息,选择是否批量录入-->
|
||||||
<el-dialog :close-on-click-modal="false" :title="title" width="55%" :visible.sync="openUser" append-to-body>
|
<el-dialog :title="title" width="55%" :visible.sync="openUser" append-to-body>
|
||||||
<el-alert
|
<el-alert
|
||||||
type="info"
|
type="info"
|
||||||
:closable="false">
|
:closable="false">
|
||||||
@ -334,7 +334,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="会员初始积分" prop="points">
|
<el-form-item label="会员初始积分" prop="points">
|
||||||
<el-input v-model="form.points" placeholder="0" maxlength="30"/>
|
<el-input v-model="form.points" placeholder="请输入会员初始积分" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -348,7 +348,7 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
<el-form-item label="储值通用余额" prop="cardBalance">
|
<el-form-item label="储值通用余额" prop="cardBalance">
|
||||||
<el-input v-model="form.cardBalance" placeholder="0" maxlength="30"/>
|
<el-input v-model="form.cardBalance" placeholder="请输入储值卡初始余额" maxlength="30"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -528,8 +528,9 @@ export default {
|
|||||||
// 默认排序
|
// 默认排序
|
||||||
defaultSort: {prop: 'updateTime', order: 'descending'},
|
defaultSort: {prop: 'updateTime', order: 'descending'},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: { id: '', name: '', gradeId: '', mobile: '', userNo: '',point:'0', startTime: '', endTime: '', refuelMoney:'0',official:'wgz',
|
form: { id: '', name: '', gradeId: '', mobile: '', userNo: '',points:0, startTime: '',
|
||||||
cardBalance:'0', literCard:'0', sex: 1, idcard: '', birthday: '', address: '', status: "qy", description: '' },
|
endTime: '', refuelMoney:'0',official:'wgz',
|
||||||
|
cardBalance:0, literCard:'0', sex: 1, idcard: '', birthday: '', address: '', status: "qy", description: '' },
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -555,6 +556,7 @@ export default {
|
|||||||
status: [{ required: true, message: "请选择会员状态", trigger: "blur" }],
|
status: [{ required: true, message: "请选择会员状态", trigger: "blur" }],
|
||||||
mobile: [
|
mobile: [
|
||||||
{ required: true, message: "请输入手机号", trigger: "blur" },
|
{ required: true, message: "请输入手机号", trigger: "blur" },
|
||||||
|
{ min: 8, max: 11, message: '请输入正确的手机号', trigger: 'blur' }
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -708,15 +710,14 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
this.form= { id: '', name: '', gradeId: '', mobile: '', userNo: '',point:'0', startTime: '', endTime: '',
|
this.form= { id: '', name: '', gradeId: '', mobile: '', userNo: '',points:0, startTime: '', endTime: '',
|
||||||
refuelMoney:'0',official:'wgz',cardBalance:'0', literCard:'0', sex: 1, idcard: '', birthday: '', address: '',
|
refuelMoney:'0',official:'wgz',cardBalance:0, literCard:'0', sex: 1, idcard: '', birthday: '', address: '',
|
||||||
status: "qy", description: ''
|
status: "qy", description: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.openUser = false;
|
|
||||||
this.reset();
|
this.reset();
|
||||||
},
|
},
|
||||||
// 提交按钮
|
// 提交按钮
|
||||||
@ -753,7 +754,6 @@ export default {
|
|||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
getUser(id).then(response => {
|
getUser(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
console.log(this.form)
|
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "编辑会员";
|
this.title = "编辑会员";
|
||||||
});
|
});
|
||||||
@ -786,6 +786,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
.app-container{
|
.app-container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
<result property="id" column="id" jdbcType="INTEGER"/>
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||||
<result property="userId" column="userId" jdbcType="INTEGER"/>
|
<result property="userId" column="userId" jdbcType="INTEGER"/>
|
||||||
<result property="storeId" column="storeId" jdbcType="INTEGER"/>
|
<result property="storeId" column="storeId" jdbcType="INTEGER"/>
|
||||||
<result property="chainstoreId" column="chain_store_id" jdbcType="INTEGER"/>
|
<result property="chainStoreId" column="chain_store_id" jdbcType="INTEGER"/>
|
||||||
<result property="inviterId" column="inviterId" jdbcType="INTEGER"/>
|
|
||||||
<result property="inviterId" column="inviterId" jdbcType="INTEGER"/>
|
<result property="inviterId" column="inviterId" jdbcType="INTEGER"/>
|
||||||
|
<result property="staffId" column="staffId" jdbcType="INTEGER"/>
|
||||||
<result property="status" column="status" jdbcType="VARCHAR"/>
|
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||||
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
<result property="createBy" column="create_by" jdbcType="VARCHAR"/>
|
||||||
@ -19,16 +19,16 @@
|
|||||||
<!--查询单个-->
|
<!--查询单个-->
|
||||||
<select id="queryById" resultMap="MtInvitationMap">
|
<select id="queryById" resultMap="MtInvitationMap">
|
||||||
select
|
select
|
||||||
id, userId, storeId, inviterId, inviterId, status, create_time, create_by, update_time, update_by
|
id, userId, storeId, inviterId, staffId,chain_store_id, status, create_time, create_by, update_time, update_by
|
||||||
from mt_invitation
|
from mt_invitation
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
<!--查询单个-->
|
<!--查询单个-->
|
||||||
<select id="queryBystoreId" resultMap="MtInvitationMap">
|
<select id="queryByStoreId" resultMap="MtInvitationMap">
|
||||||
select
|
select
|
||||||
id, userId, storeId, inviterId, inviterId, status, create_time, create_by, update_time, update_by
|
id, userId, storeId, inviterId, staffId,chain_store_id, status, create_time, create_by, update_time, update_by
|
||||||
from mt_invitation
|
from mt_invitation
|
||||||
where storeId = #{storeId} and userId = #{userId}
|
where storeId = #{storeId} and userId = #{userId}
|
||||||
</select>
|
</select>
|
||||||
@ -36,7 +36,7 @@
|
|||||||
<!--查询指定行数据-->
|
<!--查询指定行数据-->
|
||||||
<select id="queryAllByLimit" resultMap="MtInvitationMap">
|
<select id="queryAllByLimit" resultMap="MtInvitationMap">
|
||||||
select
|
select
|
||||||
id, userId, storeId, inviterId, inviterId, status, create_time, create_by, update_time, update_by
|
id, userId, storeId, inviterId, staffId,chain_store_id, status, create_time, create_by, update_time, update_by
|
||||||
from mt_invitation
|
from mt_invitation
|
||||||
<where>
|
<where>
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
@ -51,8 +51,8 @@
|
|||||||
<if test="inviterId != null">
|
<if test="inviterId != null">
|
||||||
and inviterId = #{inviterId}
|
and inviterId = #{inviterId}
|
||||||
</if>
|
</if>
|
||||||
<if test="inviterId != null">
|
<if test="staffId != null">
|
||||||
and inviterId = #{inviterId}
|
and staffId = #{staffId}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
and status = #{status}
|
and status = #{status}
|
||||||
@ -89,8 +89,8 @@
|
|||||||
<if test="inviterId != null">
|
<if test="inviterId != null">
|
||||||
and inviterId = #{inviterId}
|
and inviterId = #{inviterId}
|
||||||
</if>
|
</if>
|
||||||
<if test="inviterId != null">
|
<if test="staffId != null">
|
||||||
and inviterId = #{inviterId}
|
and staffId = #{staffId}
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
and status = #{status}
|
and status = #{status}
|
||||||
@ -112,23 +112,25 @@
|
|||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into mt_invitation(userId, storeId, inviterId, inviterId, status, create_time, create_by, update_time, update_by,chain_store_id)
|
insert into mt_invitation(userId, storeId, inviterId, staffId,chain_store_id, status, create_time, create_by, update_time, update_by)
|
||||||
values (#{userId}, #{storeId}, #{inviterId}, #{inviterId}, #{status}, #{createTime}, #{createBy}, #{updateTime}, #{updateBy},#{chainStoreId})
|
values (#{userId}, #{storeId}, #{inviterId}, #{staffId}, #{chainStoreId}, #{status}, #{createTime},
|
||||||
|
#{createBy}, #{updateTime}, #{updateBy})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into mt_invitation(userId, storeId, inviterId, inviterId, status, create_time, create_by, update_time, update_by)
|
insert into mt_invitation(userId, storeId, inviterId,staffId,chain_store_id, status, create_time, create_by, update_time, update_by)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.userId}, #{entity.storeId}, #{entity.inviterId}, #{entity.inviterId}, #{entity.status}, #{entity.createTime}, #{entity.createBy}, #{entity.updateTime}, #{entity.updateBy})
|
(#{entity.userId}, #{entity.storeId}, #{entity.inviterId}, #{entity.staffId}, #{entity.chainStoreId},
|
||||||
|
#{entity.status}, #{entity.createTime}, #{entity.createBy}, #{entity.updateTime}, #{entity.updateBy})
|
||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into mt_invitation(userId, storeId, inviterId, inviterId, status, create_time, create_by, update_time, update_by)
|
insert into mt_invitation(userId, storeId, inviterId, staffId,chain_store_id, status, create_time, create_by, update_time, update_by)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.userId}, #{entity.storeId}, #{entity.inviterId}, #{entity.inviterId}, #{entity.status}, #{entity.createTime}, #{entity.createBy}, #{entity.updateTime}, #{entity.updateBy})
|
(#{entity.userId}, #{entity.storeId}, #{entity.inviterId}, #{entity.staffId}, #{entity.chainStoreId}, #{entity.status}, #{entity.createTime}, #{entity.createBy}, #{entity.updateTime}, #{entity.updateBy})
|
||||||
</foreach>
|
</foreach>
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
userId = values(userId),
|
userId = values(userId),
|
||||||
@ -155,8 +157,8 @@
|
|||||||
<if test="inviterId != null">
|
<if test="inviterId != null">
|
||||||
inviterId = #{inviterId},
|
inviterId = #{inviterId},
|
||||||
</if>
|
</if>
|
||||||
<if test="inviterId != null">
|
<if test="staffId != null">
|
||||||
inviterId = #{inviterId},
|
staffId = #{staffId},
|
||||||
</if>
|
</if>
|
||||||
<if test="status != null and status != ''">
|
<if test="status != null and status != ''">
|
||||||
status = #{status},
|
status = #{status},
|
||||||
|
@ -45,6 +45,13 @@ public interface LJUserGradeService extends IService<LJUserGrade> {
|
|||||||
*/
|
*/
|
||||||
public LJUserGrade selectUserGradeByName(String name);
|
public LJUserGrade selectUserGradeByName(String name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据storeId查询会员最低等级信息
|
||||||
|
* @param storeId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public LJUserGrade selectUserGradeByStoreId(int storeId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据id删除会员等级信息
|
* 根据id删除会员等级信息
|
||||||
* @param id
|
* @param id
|
||||||
|
@ -75,6 +75,15 @@ public class LJUserGradeServiceImpl extends ServiceImpl<LJUserGradeMapper, LJUse
|
|||||||
return ljUserGrade;
|
return ljUserGrade;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LJUserGrade selectUserGradeByStoreId(int storeId) {
|
||||||
|
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("store_id",storeId);
|
||||||
|
queryWrapper.orderByAsc("grade");
|
||||||
|
List<LJUserGrade> list = baseMapper.selectList(queryWrapper);
|
||||||
|
return list.get(0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void deleteUserGradeById(Integer id) {
|
public void deleteUserGradeById(Integer id) {
|
||||||
baseMapper.deleteById(id);
|
baseMapper.deleteById(id);
|
||||||
|
@ -7,18 +7,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.fuint.business.storeInformation.entity.LJStore;
|
import com.fuint.business.storeInformation.entity.LJStore;
|
||||||
import com.fuint.business.storeInformation.service.ILJStoreService;
|
import com.fuint.business.storeInformation.service.ILJStoreService;
|
||||||
import com.fuint.business.userManager.entity.CertifiedMember;
|
import com.fuint.business.userManager.entity.*;
|
||||||
import com.fuint.business.userManager.entity.LJUser;
|
|
||||||
import com.fuint.business.userManager.entity.MtInvitation;
|
|
||||||
import com.fuint.business.userManager.entity.UserBalance;
|
|
||||||
import com.fuint.business.userManager.mapper.CertifiedMemberMapper;
|
import com.fuint.business.userManager.mapper.CertifiedMemberMapper;
|
||||||
import com.fuint.business.userManager.mapper.LJUserMapper;
|
import com.fuint.business.userManager.mapper.LJUserMapper;
|
||||||
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
import com.fuint.business.userManager.mapper.MtInvitationMapper;
|
||||||
|
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||||
import com.fuint.business.userManager.service.LJUserService;
|
import com.fuint.business.userManager.service.LJUserService;
|
||||||
import com.fuint.business.userManager.service.MtInvitationService;
|
import com.fuint.business.userManager.service.MtInvitationService;
|
||||||
import com.fuint.business.userManager.service.UserBalanceService;
|
import com.fuint.business.userManager.service.UserBalanceService;
|
||||||
import com.fuint.business.userManager.vo.LJUserVo;
|
import com.fuint.business.userManager.vo.LJUserVo;
|
||||||
import com.fuint.common.dto.AccountInfo;
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.StringUtils;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -154,6 +153,8 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
private ILJStoreService storeService;
|
private ILJStoreService storeService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private MtInvitationMapper invitationMapper;
|
private MtInvitationMapper invitationMapper;
|
||||||
|
@Autowired
|
||||||
|
private LJUserGradeService userGradeService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加会员信息
|
* 添加会员信息
|
||||||
@ -193,7 +194,13 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
user1.setUserNo(user.getUserNo());
|
user1.setUserNo(user.getUserNo());
|
||||||
}
|
}
|
||||||
user1.setAvatar(user.getAvatar());
|
user1.setAvatar(user.getAvatar());
|
||||||
user1.setName(user.getName());
|
if (StringUtils.isEmpty(user.getName()) || user.getName().equals("")){
|
||||||
|
String before = user.getMobile().substring(0, 3);
|
||||||
|
String after = user.getMobile().substring(7);
|
||||||
|
user1.setName(before+"****"+after);
|
||||||
|
}else {
|
||||||
|
user1.setName(user.getName());
|
||||||
|
}
|
||||||
user1.setOpenId(user.getOpenId());
|
user1.setOpenId(user.getOpenId());
|
||||||
user1.setMobile(user.getMobile());
|
user1.setMobile(user.getMobile());
|
||||||
user1.setIdcard(user.getIdcard());
|
user1.setIdcard(user.getIdcard());
|
||||||
@ -214,7 +221,12 @@ public class LJUserServiceImpl extends ServiceImpl<LJUserMapper, LJUser> impleme
|
|||||||
balance.setCardBalance(user.getCardBalance());
|
balance.setCardBalance(user.getCardBalance());
|
||||||
balance.setPoints(user.getPoints());
|
balance.setPoints(user.getPoints());
|
||||||
balance.setStoreId(storeId);
|
balance.setStoreId(storeId);
|
||||||
balance.setGradeId(user.getGradeId());
|
if (user.getGradeId()!=null){
|
||||||
|
balance.setGradeId(user.getGradeId());
|
||||||
|
}else {
|
||||||
|
LJUserGrade ljUserGrade = userGradeService.selectUserGradeByStoreId(storeId);
|
||||||
|
balance.setGradeId(ljUserGrade.getId());
|
||||||
|
}
|
||||||
balance.setConsumeNum(user.getConsumeNum());
|
balance.setConsumeNum(user.getConsumeNum());
|
||||||
balance.setSecondCard(user.getSecondCard());
|
balance.setSecondCard(user.getSecondCard());
|
||||||
balance.setFixingLevel(user.getFixingLevel());
|
balance.setFixingLevel(user.getFixingLevel());
|
||||||
|
Loading…
Reference in New Issue
Block a user