bug
This commit is contained in:
parent
5d2a87edb7
commit
de5f474687
@ -75,6 +75,15 @@ export function updateActiveConsumption(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 修改消费有礼活动
|
||||||
|
export function editActiveConsumption(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/activeConsumption/edit',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除消费有礼活动
|
// 删除消费有礼活动
|
||||||
export function delActiveConsumption(id) {
|
export function delActiveConsumption(id) {
|
||||||
return request({
|
return request({
|
||||||
|
@ -635,7 +635,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getoiltype,getoilName, listActiveConsumption,listExchange,listLJGoods, getActiveConsumption, delActiveConsumption, addActiveConsumption, updateActiveConsumption,listFavorable,looklook,looklooklook } from "@/api/EventMarketing/activeConsumption";
|
import {
|
||||||
|
getoiltype,
|
||||||
|
getoilName,
|
||||||
|
listActiveConsumption,
|
||||||
|
listExchange,
|
||||||
|
listLJGoods,
|
||||||
|
getActiveConsumption,
|
||||||
|
delActiveConsumption,
|
||||||
|
addActiveConsumption,
|
||||||
|
updateActiveConsumption,
|
||||||
|
listFavorable,
|
||||||
|
looklook,
|
||||||
|
looklooklook,
|
||||||
|
editActiveConsumption
|
||||||
|
} from "@/api/EventMarketing/activeConsumption";
|
||||||
import {listUserGrade} from "@/api/staff/user/usergrade";
|
import {listUserGrade} from "@/api/staff/user/usergrade";
|
||||||
import {getOilNameList} from "@/api/order/oilnumgun";
|
import {getOilNameList} from "@/api/order/oilnumgun";
|
||||||
import {updateExchange} from "@/api/EventMarketing/cardExchange";
|
import {updateExchange} from "@/api/EventMarketing/cardExchange";
|
||||||
@ -1164,7 +1178,7 @@ export default {
|
|||||||
// });
|
// });
|
||||||
|
|
||||||
this.$modal.confirm('确定下线此条修改消费有礼活动信息?').then(function() {
|
this.$modal.confirm('确定下线此条修改消费有礼活动信息?').then(function() {
|
||||||
return updateActiveConsumption({id:row.id,isonline:1});
|
return editActiveConsumption({id:row.id,isonline:1});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$modal.msgSuccess("下线成功");
|
this.$modal.msgSuccess("下线成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
|
@ -14,6 +14,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;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 消费有礼活动(ActiveConsumption)表控制层
|
* 消费有礼活动(ActiveConsumption)表控制层
|
||||||
@ -101,6 +102,19 @@ public class ActiveConsumptionController extends BaseController {
|
|||||||
return getSuccessResult(this.activeConsumptionService.updateOneById(activeConsumptionDTO));
|
return getSuccessResult(this.activeConsumptionService.updateOneById(activeConsumptionDTO));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param map 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping("/edit")
|
||||||
|
public ResponseObject edit(@RequestBody Map<String,String> map) {
|
||||||
|
Integer id = Integer.valueOf(map.get("id"));
|
||||||
|
String isonline = map.get("isonline");
|
||||||
|
return getSuccessResult(this.activeConsumptionService.editIsLone(id, isonline));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除数据
|
* 删除数据
|
||||||
* @param ids
|
* @param ids
|
||||||
|
@ -49,6 +49,14 @@ public interface ActiveConsumptionService extends IService<ActiveConsumption> {
|
|||||||
*/
|
*/
|
||||||
Boolean updateOneById(ActiveConsumptionDTO activeConsumptionDTO);
|
Boolean updateOneById(ActiveConsumptionDTO activeConsumptionDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改下线
|
||||||
|
* @param id
|
||||||
|
* @param isonline
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean editIsLone(Integer id,String isonline);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有数据(小程序端)
|
* 查询所有数据(小程序端)
|
||||||
* @param activeConsumption
|
* @param activeConsumption
|
||||||
|
@ -363,6 +363,18 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
|
|||||||
return update;
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean editIsLone(Integer id, String isonline) {
|
||||||
|
int row = 0;
|
||||||
|
ActiveConsumption activeConsumption = baseMapper.selectById(id);
|
||||||
|
if (ObjectUtil.isNotEmpty(activeConsumption)){
|
||||||
|
activeConsumption.setIsonline(isonline);
|
||||||
|
activeConsumption.setStatus("1");
|
||||||
|
row = baseMapper.updateById(activeConsumption);
|
||||||
|
}
|
||||||
|
return row == 1;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有数据(小程序端)
|
* 查询所有数据(小程序端)
|
||||||
* @param activeConsumption
|
* @param activeConsumption
|
||||||
|
Loading…
Reference in New Issue
Block a user