This commit is contained in:
cun-nan 2024-03-11 09:53:30 +08:00
parent de5f474687
commit 3645e64d6f
7 changed files with 69 additions and 18 deletions

View File

@ -44,6 +44,15 @@ export function updateActiveDiscount(data) {
}) })
} }
// 修改折扣营销
export function editActiveDiscount(data) {
return request({
url: '/business/marketingActivity/activeDiscount/updateIsOnline',
method: 'post',
data: data
})
}
// 删除折扣营销 // 删除折扣营销
export function delActiveDiscount(id) { export function delActiveDiscount(id) {
return request({ return request({

View File

@ -282,9 +282,16 @@
</template> </template>
<script> <script>
import { listActiveDiscount, getActiveDiscount, delActiveDiscount, addActiveDiscount, updateActiveDiscount } from "@/api/EventMarketing/activeDiscount";
import { import {
delActiveConsumption, listActiveDiscount,
getActiveDiscount,
delActiveDiscount,
addActiveDiscount,
updateActiveDiscount,
editActiveDiscount
} from "@/api/EventMarketing/activeDiscount";
import {
delActiveConsumption, editActiveConsumption,
getActiveConsumption, getActiveConsumption,
getoilName, looklook, looklooklook, getoilName, looklook, looklooklook,
updateActiveConsumption updateActiveConsumption
@ -535,17 +542,25 @@ export default {
}); });
}, },
handleDeletexia(row){ handleDeletexia(row){
getActiveDiscount(row.id).then(response => { // getActiveDiscount(row.id).then(response => {
// this.form = response.data; // // this.form = response.data;
let data = response.data // let data = response.data
data.isonline = 1 // data.isonline = 1
updateActiveDiscount(data).then(response => { // updateActiveDiscount(data).then(response => {
this.$modal.msgSuccess("下线成功"); // this.$modal.msgSuccess("线");
this.open = false; // this.open = false;
this.getList(); // this.getList();
}); // });
//
// });
}); this.$modal.confirm('确定下线此条修改折扣营销活动信息?').then(function() {
return editActiveDiscount({id:row.id,isonline:1});
}).then(() => {
this.$modal.msgSuccess("下线成功");
this.open = false;
this.getList();
}).catch(() => {});
}, },
qiyong(row){ qiyong(row){
// //

View File

@ -15,6 +15,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.io.Serializable; import java.io.Serializable;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 折扣营销表(ActiveDiscount)表控制层 * 折扣营销表(ActiveDiscount)表控制层
@ -91,6 +92,19 @@ public class ActiveDiscountController extends BaseController {
return getSuccessResult(this.activeDiscountService.updateOneById(activeDiscountDTO)); return getSuccessResult(this.activeDiscountService.updateOneById(activeDiscountDTO));
} }
/**
* 修改数据
*
* @param map 实体对象
* @return 修改结果
*/
@PostMapping("/updateIsOnline")
public ResponseObject updateIsOnline(@RequestBody Map<String,String> map) {
Integer id = Integer.valueOf(map.get("id"));
String isonline = map.get("isonline");
return getSuccessResult(this.activeDiscountService.updateIsOnline(id,isonline));
}
/** /**
* 删除数据 * 删除数据
* *

View File

@ -49,6 +49,8 @@ public interface ActiveDiscountService extends IService<ActiveDiscount> {
*/ */
Boolean updateOneById(ActiveDiscountDTO activeDiscountDTO); Boolean updateOneById(ActiveDiscountDTO activeDiscountDTO);
Boolean updateIsOnline(Integer id,String isonline);
/** /**
* 查询所有数据(小程序端) * 查询所有数据(小程序端)
* @param activeDiscount * @param activeDiscount

View File

@ -251,6 +251,18 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
return update; return update;
} }
@Override
public Boolean updateIsOnline(Integer id, String isonline) {
int row = 0;
ActiveDiscount activeDiscount = baseMapper.selectById(id);
if (ObjectUtil.isNotEmpty(activeDiscount)){
activeDiscount.setStatus("1");
activeDiscount.setIsonline(isonline);
row = baseMapper.updateById(activeDiscount);
}
return row==1;
}
@Override @Override
public List<ActiveDiscountAppletVO> selectAllApplet(ActiveDiscount activeDiscount) { public List<ActiveDiscountAppletVO> selectAllApplet(ActiveDiscount activeDiscount) {
IPage page = select(new Page(1, 9999), activeDiscount); IPage page = select(new Page(1, 9999), activeDiscount);

View File

@ -1,10 +1,9 @@
# \u57FA\u672C\u914D\u7F6E # \u57FA\u672C\u914D\u7F6E
server.port=8008 server.port=8080
env.profile=dev env.profile=dev
#env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/ #env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
env.properties.path=D:/code/oilSystem/fuintBackend/configure/ env.properties.path=D:/workspaces/oilSystem/fuintBackend/configure/
#env.properties.path=/www/wwwroot/shenlanshuke/oilAdmin/
# \u6570\u636E\u5E93\u914D\u7F6E # \u6570\u636E\u5E93\u914D\u7F6E
spring.datasource.type=com.zaxxer.hikari.HikariDataSource spring.datasource.type=com.zaxxer.hikari.HikariDataSource

View File

@ -102,10 +102,10 @@
<view class="station-title" style="display: flex;justify-content: space-between;"> <view class="station-title" style="display: flex;justify-content: space-between;">
{{store.name}}{{store.description ? "("+store.description+")" : ""}} {{store.name}}{{store.description ? "("+store.description+")" : ""}}
<view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;"> <!-- <view class="" @click="goChooseAddress" style="width: 22%;font-size: 14px;font-weight: 400;">
<view style="font-size: 12px;">切换位置 <uni-icons type="right" color="#304fff" <view style="font-size: 12px;">切换位置 <uni-icons type="right" color="#304fff"
size="14"></uni-icons> </view> size="14"></uni-icons> </view>
</view> </view> -->
</view><!--顺通石化加油站(工业南路站)--> </view><!--顺通石化加油站(工业南路站)-->
<view style="display: flex;"> <view style="display: flex;">
<view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index"> <view class="bule-icon" v-if="welfare.length!=0" v-for="(item,index) in welfare" :key="index">