Compare commits
3 Commits
50638b0da4
...
3327bece3c
Author | SHA1 | Date | |
---|---|---|---|
|
3327bece3c | ||
|
6833b81a2b | ||
|
8cc44016d7 |
@ -125,12 +125,12 @@
|
|||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
|
|
||||||
<el-button
|
<!-- <el-button-->
|
||||||
size="mini"
|
<!-- size="mini"-->
|
||||||
type="text"
|
<!-- type="text"-->
|
||||||
@click="handleDelete(scope.row)"
|
<!-- @click="handleDelete(scope.row)"-->
|
||||||
>删除
|
<!-- >删除-->
|
||||||
</el-button>
|
<!-- </el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
|
@ -115,7 +115,12 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="28%" append-to-body>
|
<el-dialog
|
||||||
|
@close="close()"
|
||||||
|
:title="title"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:visible.sync="open" width="28%"
|
||||||
|
append-to-body>
|
||||||
<el-form ref="form" :model="deviceInfo" label-width="80px" :rules="rules">
|
<el-form ref="form" :model="deviceInfo" label-width="80px" :rules="rules">
|
||||||
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px" :rules="rules">
|
<el-form :model="deviceInfo" ref="deviceForm" label-width="120px" :rules="rules">
|
||||||
<el-form-item label="banner名称" prop="bannerName">
|
<el-form-item label="banner名称" prop="bannerName">
|
||||||
@ -168,6 +173,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
||||||
|
<el-button @click="open=false">取消</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -250,6 +256,12 @@ export default {
|
|||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//监听弹窗关闭
|
||||||
|
close(){
|
||||||
|
//重置表单状态
|
||||||
|
this.$refs['deviceForm'].resetFields();
|
||||||
|
|
||||||
|
},
|
||||||
getList(){
|
getList(){
|
||||||
getBannerListApi(this.queryParams).then(res=>{
|
getBannerListApi(this.queryParams).then(res=>{
|
||||||
this.tableData = res.data.records;
|
this.tableData = res.data.records;
|
||||||
|
@ -63,7 +63,7 @@ public class CardGiftActiveServiceImpl extends ServiceImpl<CardGiftActiveMapper,
|
|||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
if (CollectionUtil.isNotEmpty(list)) {
|
if (CollectionUtil.isNotEmpty(list)) {
|
||||||
LambdaQueryWrapper<CardGiftActive> queryWrapperActive = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CardGiftActive> queryWrapperActive = new LambdaQueryWrapper<>();
|
||||||
queryWrapperActive.eq(CardGiftActive::getActiveNum,activeNum)
|
queryWrapperActive.eq(CardGiftActive::getActiveName,activeNum)
|
||||||
.eq(CardGiftActive::getStoreId,nowAccountInfo.getStoreId()).last("limit 1");
|
.eq(CardGiftActive::getStoreId,nowAccountInfo.getStoreId()).last("limit 1");
|
||||||
CardGiftActive giftActive = this.getOne(queryWrapperActive);
|
CardGiftActive giftActive = this.getOne(queryWrapperActive);
|
||||||
if (interType.equals("1")){
|
if (interType.equals("1")){
|
||||||
|
@ -70,6 +70,10 @@ public class SysBannerController extends BaseController {
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public ResponseObject add(@RequestBody SysBanner sysBanner) {
|
public ResponseObject add(@RequestBody SysBanner sysBanner) {
|
||||||
try {
|
try {
|
||||||
|
// 先查询名称是否存在
|
||||||
|
if(this.sysBannerService.queryByName(sysBanner.getBannerName())!=null){
|
||||||
|
return getFailureResult(500,"名称已存在");
|
||||||
|
}
|
||||||
SysLog sysLog =new SysLog();
|
SysLog sysLog =new SysLog();
|
||||||
sysLog.setSystemName("1");
|
sysLog.setSystemName("1");
|
||||||
sysLog.setMoudle("banner配置");
|
sysLog.setMoudle("banner配置");
|
||||||
@ -88,6 +92,10 @@ public class SysBannerController extends BaseController {
|
|||||||
@PutMapping
|
@PutMapping
|
||||||
public ResponseObject edit(@RequestBody SysBanner sysBanner) {
|
public ResponseObject edit(@RequestBody SysBanner sysBanner) {
|
||||||
try {
|
try {
|
||||||
|
// 先查询名称是否存在
|
||||||
|
if(this.sysBannerService.queryByName(sysBanner.getBannerName())!=null){
|
||||||
|
return getFailureResult(500,"名称已存在");
|
||||||
|
}
|
||||||
SysLog sysLog =new SysLog();
|
SysLog sysLog =new SysLog();
|
||||||
sysLog.setSystemName("1");
|
sysLog.setSystemName("1");
|
||||||
sysLog.setMoudle("banner配置");
|
sysLog.setMoudle("banner配置");
|
||||||
|
@ -55,4 +55,6 @@ public interface SysBannerService {
|
|||||||
*/
|
*/
|
||||||
boolean deleteById(Integer id);
|
boolean deleteById(Integer id);
|
||||||
|
|
||||||
|
SysBanner queryByName(String bannerName);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,8 @@ import com.fuint.common.dto.AccountInfo;
|
|||||||
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 存储Banner信息的表(SysBanner)表服务实现类
|
* 存储Banner信息的表(SysBanner)表服务实现类
|
||||||
@ -88,4 +90,13 @@ public class SysBannerServiceImpl implements SysBannerService {
|
|||||||
public boolean deleteById(Integer id) {
|
public boolean deleteById(Integer id) {
|
||||||
return this.sysBannerMapper.deleteById(id) > 0;
|
return this.sysBannerMapper.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public SysBanner queryByName(String bannerName) {
|
||||||
|
HashMap<String, Object> objectObjectHashMap = new HashMap<>();
|
||||||
|
objectObjectHashMap.put("banner_name",bannerName);
|
||||||
|
List<SysBanner> sysBanners = sysBannerMapper.selectByMap(objectObjectHashMap);
|
||||||
|
|
||||||
|
return sysBanners.size() > 0 ? sysBanners.get(0) : null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user