配置管理
This commit is contained in:
parent
1ed4dd8950
commit
25f06fbe76
12
.idea/dataSources.xml
Normal file
12
.idea/dataSources.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
|
||||
<data-source source="LOCAL" name="oil" uuid="4255010b-d3cd-4300-989c-d9a8910e1e0e">
|
||||
<driver-ref>mysql.8</driver-ref>
|
||||
<synchronize>true</synchronize>
|
||||
<jdbc-driver>com.mysql.cj.jdbc.Driver</jdbc-driver>
|
||||
<jdbc-url>jdbc:mysql://47.94.122.58:3306</jdbc-url>
|
||||
<working-dir>$ProjectFileDir$</working-dir>
|
||||
</data-source>
|
||||
</component>
|
||||
</project>
|
145
.idea/easyCodeTableSetting.xml
Normal file
145
.idea/easyCodeTableSetting.xml
Normal file
@ -0,0 +1,145 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EasyCodeTableSetting">
|
||||
<option name="tableInfoMap">
|
||||
<map>
|
||||
<entry key="oilsystem.open_card_gift">
|
||||
<value>
|
||||
<TableInfoDTO>
|
||||
<option name="comment" value="营销中心-开卡有礼" />
|
||||
<option name="fullColumn">
|
||||
<list>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="主键" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="id" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="连锁店id" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="chainStoreId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="油站id" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="storeId" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="活动名称" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="name" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="活动时间类型:0永久有效;1自定义" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="activityTimeType" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="活动时间前" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="activityTimeFront" />
|
||||
<option name="type" value="java.util.Date" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="活动时间后" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="activityTimeAfter" />
|
||||
<option name="type" value="java.util.Date" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="通知内容" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="noticeContent" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="活动详情" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="activityDetails" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="活动奖品(多选):赠送积分、赠送成长值、赠送优惠券" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="activityPrize" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="赠送积分数量" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="givePoints" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="赠送成长值" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="giveGrowthValue" />
|
||||
<option name="type" value="java.lang.Integer" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="赠送优惠信息" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="giveCoupon" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="创建时间" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="createTime" />
|
||||
<option name="type" value="java.util.Date" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="创建人" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="createBy" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="更新时间" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="updateTime" />
|
||||
<option name="type" value="java.util.Date" />
|
||||
</ColumnInfoDTO>
|
||||
<ColumnInfoDTO>
|
||||
<option name="comment" value="更新人" />
|
||||
<option name="custom" value="false" />
|
||||
<option name="ext" value="{}" />
|
||||
<option name="name" value="updateBy" />
|
||||
<option name="type" value="java.lang.String" />
|
||||
</ColumnInfoDTO>
|
||||
</list>
|
||||
</option>
|
||||
<option name="name" value="OpenCardGift" />
|
||||
<option name="preName" value="" />
|
||||
<option name="saveModelName" value="fuint-application" />
|
||||
<option name="savePackageName" value="com.fuint.business.marketingActivity.openCardGift" />
|
||||
<option name="savePath" value="./fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/openCardGift" />
|
||||
<option name="templateGroupName" value="Default" />
|
||||
</TableInfoDTO>
|
||||
</value>
|
||||
</entry>
|
||||
</map>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
43
fuintAdmin/src/api/EventMarketing/openCardGift.js
Normal file
43
fuintAdmin/src/api/EventMarketing/openCardGift.js
Normal file
@ -0,0 +1,43 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询开卡有礼信息
|
||||
export function getOpenCardInfo() {
|
||||
return request({
|
||||
url: 'openCardGift',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id查询开卡有礼信息
|
||||
export function getOpenCardById(id) {
|
||||
return request({
|
||||
url: 'openCardGift/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
|
||||
// 添加开卡有礼信息
|
||||
export function addOpenCardBy(data) {
|
||||
return request({
|
||||
url: 'openCardGift',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 添加开卡有礼信息
|
||||
export function editOpenCardBy(data) {
|
||||
return request({
|
||||
url: 'openCardGift',
|
||||
method: 'put',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
// 根据id删除开卡有礼信息
|
||||
export function deleteOpenCard(id) {
|
||||
return request({
|
||||
url: 'openCardGift/'+id,
|
||||
method: 'delete',
|
||||
})
|
||||
}
|
@ -71,6 +71,16 @@
|
||||
<div>一键发券</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrap-box" @click="gobox(7)" >
|
||||
<img src="./imgs/yjfq.png" style="width: 315px;height: 265px;margin: 0 auto " >
|
||||
<div class="p-r-title">
|
||||
<div style="font-size: 24px;font-weight: bold" >发卡有礼</div>
|
||||
<div style="font-size: 12px">Card issuing gift</div>
|
||||
</div>
|
||||
<div class="bottom-box">
|
||||
<div>发卡有礼</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -125,6 +135,9 @@ export default {
|
||||
if(id == 6){
|
||||
this.$router.push('/EventMarketing/yijiancoupon/index')
|
||||
}
|
||||
if(id == 7){
|
||||
this.$router.push('/EventMarketing/openCardGift/index')
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
127
fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
Normal file
127
fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
Normal file
@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div class="cot-box">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
|
||||
<el-form-item label="活动名称" prop="name">
|
||||
<el-input v-model="ruleForm.name"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" prop="region">
|
||||
<el-select v-model="ruleForm.region" placeholder="请选择活动区域">
|
||||
<el-option label="区域一" value="shanghai"></el-option>
|
||||
<el-option label="区域二" value="beijing"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动时间" required>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="date1">
|
||||
<el-date-picker type="date" placeholder="选择日期" v-model="ruleForm.date1" style="width: 100%;"></el-date-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col class="line" :span="2">-</el-col>
|
||||
<el-col :span="11">
|
||||
<el-form-item prop="date2">
|
||||
<el-time-picker placeholder="选择时间" v-model="ruleForm.date2" style="width: 100%;"></el-time-picker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="通知内容" prop="delivery">
|
||||
<el-switch v-model="ruleForm.delivery"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动详情" prop="type">
|
||||
<el-checkbox-group v-model="ruleForm.type">
|
||||
<el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="地推活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="线下主题活动" name="type"></el-checkbox>
|
||||
<el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="resource">
|
||||
<el-radio-group v-model="ruleForm.resource">
|
||||
<el-radio label="线上品牌商赞助"></el-radio>
|
||||
<el-radio label="线下场地免费"></el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
ruleForm: {
|
||||
name: '',
|
||||
region: '',
|
||||
date1: '',
|
||||
date2: '',
|
||||
delivery: false,
|
||||
type: [],
|
||||
resource: '',
|
||||
desc: ''
|
||||
},
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入活动名称', trigger: 'blur' },
|
||||
{ min: 3, max: 5, message: '长度在 3 到 5 个字符', trigger: 'blur' }
|
||||
],
|
||||
region: [
|
||||
{ required: true, message: '请选择活动区域', trigger: 'change' }
|
||||
],
|
||||
date1: [
|
||||
{ type: 'date', required: true, message: '请选择日期', trigger: 'change' }
|
||||
],
|
||||
date2: [
|
||||
{ type: 'date', required: true, message: '请选择时间', trigger: 'change' }
|
||||
],
|
||||
type: [
|
||||
{ type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
|
||||
],
|
||||
resource: [
|
||||
{ required: true, message: '请选择活动资源', trigger: 'change' }
|
||||
],
|
||||
desc: [
|
||||
{ required: true, message: '请填写活动形式', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
},
|
||||
methods: {
|
||||
submitForm(formName) {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
alert('submit!');
|
||||
} else {
|
||||
console.log('error submit!!');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
background: #f6f8f9;
|
||||
}
|
||||
.cot-box {
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
background: #fff;
|
||||
box-sizing: border-box;
|
||||
padding: 20px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,73 @@
|
||||
package com.fuint.business.marketingActivity.openCardGift.controller;
|
||||
|
||||
import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
|
||||
import com.fuint.business.marketingActivity.openCardGift.service.OpenCardGiftService;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 开卡有礼Controller层
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("openCardGift")
|
||||
public class OpenCardGiftController extends BaseController {
|
||||
@Autowired
|
||||
private OpenCardGiftService openCardGiftService;
|
||||
|
||||
/**
|
||||
* 通过店铺id查询单条数据
|
||||
*
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject getInfo() {
|
||||
return getSuccessResult(openCardGiftService.queryByStoreId());
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 单条数据
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||
return getSuccessResult(openCardGiftService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param openCardGift 实体
|
||||
* @return 新增结果
|
||||
*/
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody OpenCardGift openCardGift) {
|
||||
return getSuccessResult(openCardGiftService.insert(openCardGift));
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑数据
|
||||
*
|
||||
* @param openCardGift 实体
|
||||
* @return 编辑结果
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody OpenCardGift openCardGift) {
|
||||
return getSuccessResult(openCardGiftService.update(openCardGift));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
public ResponseObject deleteById(@PathVariable Integer id) {
|
||||
return getSuccessResult(openCardGiftService.deleteById(id));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,98 @@
|
||||
package com.fuint.business.marketingActivity.openCardGift.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 营销中心-开卡有礼(OpenCardGift)实体类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-27 15:41:16
|
||||
*/
|
||||
@Data
|
||||
@TableName("open_card_gift")
|
||||
@ApiModel(value = "OpenCardGift对象", description = "营销中心-开卡有礼")
|
||||
public class OpenCardGift extends BaseEntity implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("ID")
|
||||
@TableId(value = "ID", type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 连锁店id
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
/**
|
||||
* 油站id
|
||||
*/
|
||||
private Integer storeId;
|
||||
/**
|
||||
* 活动名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 活动时间类型:0永久有效;1自定义
|
||||
*/
|
||||
private String activityTimeType;
|
||||
/**
|
||||
* 活动时间前
|
||||
*/
|
||||
private Date activityTimeFront;
|
||||
/**
|
||||
* 活动时间后
|
||||
*/
|
||||
private Date activityTimeAfter;
|
||||
/**
|
||||
* 通知内容
|
||||
*/
|
||||
private String noticeContent;
|
||||
/**
|
||||
* 活动详情
|
||||
*/
|
||||
private String activityDetails;
|
||||
/**
|
||||
* 活动奖品(多选):赠送积分、赠送成长值、赠送优惠券
|
||||
*/
|
||||
private String activityPrize;
|
||||
/**
|
||||
* 赠送积分数量
|
||||
*/
|
||||
private Integer givePoints;
|
||||
/**
|
||||
* 赠送成长值
|
||||
*/
|
||||
private Integer giveGrowthValue;
|
||||
/**
|
||||
* 赠送优惠信息
|
||||
*/
|
||||
private String giveCoupon;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 更新时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
/**
|
||||
* 更新人
|
||||
*/
|
||||
private String updateBy;
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package com.fuint.business.marketingActivity.openCardGift.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
|
||||
|
||||
public interface OpenCardGiftMapper extends BaseMapper<OpenCardGift> {
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package com.fuint.business.marketingActivity.openCardGift.service;
|
||||
|
||||
import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
|
||||
|
||||
/**
|
||||
* 营销中心-开卡有礼(OpenCardGift)表服务接口
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-27 15:41:20
|
||||
*/
|
||||
public interface OpenCardGiftService {
|
||||
/**
|
||||
* 根据店铺id查询开卡有礼配置信息
|
||||
* @return
|
||||
*/
|
||||
OpenCardGift queryByStoreId();
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
OpenCardGift queryById(Integer id);
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param openCardGift 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int insert(OpenCardGift openCardGift);
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param openCardGift 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
int update(OpenCardGift openCardGift);
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
int deleteById(Integer id);
|
||||
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.fuint.business.marketingActivity.openCardGift.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.fuint.business.marketingActivity.openCardGift.entity.OpenCardGift;
|
||||
import com.fuint.business.marketingActivity.openCardGift.mapper.OpenCardGiftMapper;
|
||||
import com.fuint.business.marketingActivity.openCardGift.service.OpenCardGiftService;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 营销中心-开卡有礼(OpenCardGift)表服务实现类
|
||||
*
|
||||
* @author makejava
|
||||
* @since 2024-08-27 15:41:23
|
||||
*/
|
||||
@Service("openCardGiftService")
|
||||
public class OpenCardGiftServiceImpl extends ServiceImpl<OpenCardGiftMapper,OpenCardGift> implements OpenCardGiftService {
|
||||
|
||||
@Override
|
||||
public OpenCardGift queryByStoreId() {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
|
||||
return baseMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过ID查询单条数据
|
||||
* @param id 主键
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public OpenCardGift queryById(Integer id) {
|
||||
return baseMapper.selectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
* @param openCardGift 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int insert(OpenCardGift openCardGift) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
openCardGift.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
openCardGift.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.insert(openCardGift);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*
|
||||
* @param openCardGift 实例对象
|
||||
* @return 实例对象
|
||||
*/
|
||||
@Override
|
||||
public int update(OpenCardGift openCardGift) {
|
||||
return baseMapper.updateById(openCardGift);
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过主键删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
public int deleteById(Integer id) {
|
||||
return baseMapper.deleteById(id);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user