9.11
This commit is contained in:
parent
d182ba99ad
commit
afe8f64d05
@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<div class="rp-box">
|
||||
<!-- 营销活动-->
|
||||
<div class="bai-box" v-show="tabindex == 0">
|
||||
<div class="bai-box" style="height: 84.5vh;overflow: auto" v-show="tabindex == 0">
|
||||
<div class="d-s">
|
||||
<div class="gang"></div>
|
||||
<div style="font-weight: bold">会员营销</div>
|
||||
@ -216,6 +216,7 @@
|
||||
<el-button icon="el-icon-refresh-right" @click="resetQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 70vh;overflow: auto">
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
@ -231,12 +232,12 @@
|
||||
<span v-else>{{ scope.row.activeStartTime }} ~ {{ scope.row.activeEndTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adaptUserType" label="适用会员等级">
|
||||
<el-table-column prop="userGradeName" label="适用会员等级">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.adaptUserType || "--" }}</span>
|
||||
<span>{{ scope.row.userGradeName || "--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="name" label="已领数量"></el-table-column>
|
||||
<el-table-column prop="sendNum" label="已领数量"></el-table-column>
|
||||
<el-table-column prop="activeStatus" label="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -273,6 +274,7 @@
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -302,6 +304,7 @@
|
||||
<el-button icon="el-icon-refresh-right" @click="resetOldQuery">重置</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 70vh;overflow: auto">
|
||||
<el-table
|
||||
:data="oldTableData"
|
||||
border
|
||||
@ -320,9 +323,9 @@
|
||||
<span v-else>{{ scope.row.activeStartTime }} ~ {{ scope.row.activeEndTime }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="adaptUserType" label="适用会员等级">
|
||||
<el-table-column prop="userGradeName" label="适用会员等级">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.adaptUserType || "--" }}</span>
|
||||
<span>{{ scope.row.userGradeName || "--" }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sendNum" label="已领数量"></el-table-column>
|
||||
@ -363,6 +366,7 @@
|
||||
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<pagination
|
||||
v-show="oldTotal>0"
|
||||
:total="oldTotal"
|
||||
|
@ -73,5 +73,10 @@ public class ActiveApplet extends Model<ActiveApplet> {
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String createName;
|
||||
/**
|
||||
* 创建人名称
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private String userGradeName;
|
||||
}
|
||||
|
||||
|
@ -8,9 +8,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
|
||||
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
|
||||
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
|
||||
import com.fuint.business.userManager.entity.LJUserGrade;
|
||||
import com.fuint.business.userManager.service.LJUserGradeService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import com.fuint.utils.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -27,6 +30,8 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
||||
|
||||
@Resource
|
||||
private ActiveAppletMapper activeAppletMapper;
|
||||
@Autowired
|
||||
private LJUserGradeService userGradeService;
|
||||
|
||||
@Override
|
||||
public List<ActiveApplet> applet(ActiveApplet activeApplet) {
|
||||
@ -65,8 +70,22 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
||||
@Override
|
||||
public IPage<ActiveApplet> pageActive(Page<ActiveApplet> page, ActiveApplet activeApplet) {
|
||||
IPage<ActiveApplet> result = activeAppletMapper.pageActive(page,activeApplet);
|
||||
// 查询用户等级信息
|
||||
List<LJUserGrade> ljUserGrades = userGradeService.selectUserGradeAll(TokenUtil.getNowAccountInfo().getStoreId());
|
||||
result.getRecords().forEach(item -> {
|
||||
item.setTypeText(replaceType(item.getType()));
|
||||
String userGradeName = "";
|
||||
if (ObjectUtil.isNotEmpty(item.getAdaptUserType())){
|
||||
String[] gradeIds = item.getAdaptUserType().split(",");
|
||||
for (String gradeId : gradeIds) {
|
||||
for (LJUserGrade ljUserGrade : ljUserGrades) {
|
||||
if (gradeId.equals(ljUserGrade.getId().toString())){
|
||||
userGradeName += ljUserGrade.getName() + ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
item.setUserGradeName(userGradeName);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
@ -88,16 +107,16 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
|
||||
**/
|
||||
public String replaceType(String type) {
|
||||
if (StringUtil.isNotBlank(type)) {
|
||||
type = type.replace("1", "储值卡");
|
||||
type = type.replace("2", "囤油卡");
|
||||
type = type.replace("3", "立减营销");
|
||||
type = type.replace("4", "生日有礼");
|
||||
type = type.replace("5", "消费有礼");
|
||||
type = type.replace("6", "开卡有礼");
|
||||
type = type.replace("7", "邀请有礼");
|
||||
type = type.replace("8", "推荐会员充值有礼");
|
||||
type = type.replace("9", "推荐会员消费有礼");
|
||||
type = type.replace("10", "弹窗营销");
|
||||
type = type.replace("9", "推荐会员消费有礼");
|
||||
type = type.replace("8", "推荐会员充值有礼");
|
||||
type = type.replace("7", "邀请有礼");
|
||||
type = type.replace("6", "开卡有礼");
|
||||
type = type.replace("5", "消费有礼");
|
||||
type = type.replace("4", "生日有礼");
|
||||
type = type.replace("3", "立减营销");
|
||||
type = type.replace("2", "囤油卡");
|
||||
type = type.replace("1", "储值卡");
|
||||
} else {
|
||||
type = "无";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user