子卡管理
This commit is contained in:
parent
4d5b7529e4
commit
0a4cde035f
@ -20,9 +20,6 @@ public class CardValueRecord extends Model<CardValueRecord> {
|
|||||||
//主键id
|
//主键id
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Integer id;
|
private Integer id;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private Integer storeId;
|
private Integer storeId;
|
||||||
//会员id
|
//会员id
|
||||||
private Integer mtUserId;
|
private Integer mtUserId;
|
||||||
|
@ -0,0 +1,90 @@
|
|||||||
|
package com.fuint.business.marketingActivity.cardValueChildrens.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.entity.CardValudChildrens;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.service.CardValudChildrensService;
|
||||||
|
import com.fuint.framework.web.BaseController;
|
||||||
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卡表(CardValudChildrens)表控制层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-18 15:59:36
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("cardValudChildrens")
|
||||||
|
public class CardValudChildrensController extends BaseController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private CardValudChildrensService cardValudChildrensService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询所有数据
|
||||||
|
* @param cardValudChildrens 查询实体
|
||||||
|
* @return 所有数据
|
||||||
|
*/
|
||||||
|
@GetMapping
|
||||||
|
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
|
@Param("cardValudChildrens") CardValudChildrens cardValudChildrens) {
|
||||||
|
Page page = new Page(pageNo, pageSize);
|
||||||
|
return getSuccessResult(this.cardValudChildrensService.page(page, new QueryWrapper<>(cardValudChildrens)));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
public ResponseObject selectOne(@PathVariable Serializable id) {
|
||||||
|
return getSuccessResult(this.cardValudChildrensService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param cardValudChildrens 实体对象
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public ResponseObject insert(@RequestBody CardValudChildrens cardValudChildrens) {
|
||||||
|
return getSuccessResult(this.cardValudChildrensService.add(cardValudChildrens));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param cardValudChildrens 实体对象
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public ResponseObject update(@RequestBody CardValudChildrens cardValudChildrens) {
|
||||||
|
return getSuccessResult(this.cardValudChildrensService.updateById(cardValudChildrens));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param idList 主键结合
|
||||||
|
* @return 删除结果
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||||
|
return getSuccessResult(this.cardValudChildrensService.removeByIds(idList));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,105 @@
|
|||||||
|
package com.fuint.business.marketingActivity.cardValueChildrens.entity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卡表(CardValudChildrens)表实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-18 15:59:36
|
||||||
|
*/
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
public class CardValudChildrens extends Model<CardValudChildrens> {
|
||||||
|
//主键id
|
||||||
|
@TableId(type = IdType.AUTO)
|
||||||
|
private Integer id;
|
||||||
|
//主卡id
|
||||||
|
private Integer cardValueId;
|
||||||
|
//子卡手机号
|
||||||
|
private String cardChildPhones;
|
||||||
|
//创建者
|
||||||
|
private String createBy;
|
||||||
|
//创建时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createTime;
|
||||||
|
//更新者
|
||||||
|
private String updateBy;
|
||||||
|
//更新时间
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCardValueId() {
|
||||||
|
return cardValueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCardValueId(Integer cardValueId) {
|
||||||
|
this.cardValueId = cardValueId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCardChildPhones() {
|
||||||
|
return cardChildPhones;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCardChildPhones(String cardChildPhones) {
|
||||||
|
this.cardChildPhones = cardChildPhones;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCreateBy() {
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateBy(String createBy) {
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreateTime() {
|
||||||
|
return createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreateTime(Date createTime) {
|
||||||
|
this.createTime = createTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUpdateBy() {
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateBy(String updateBy) {
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdateTime() {
|
||||||
|
return updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdateTime(Date updateTime) {
|
||||||
|
this.updateTime = updateTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取主键值
|
||||||
|
*
|
||||||
|
* @return 主键值
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected Serializable pkVal() {
|
||||||
|
return this.id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,15 @@
|
|||||||
|
package com.fuint.business.marketingActivity.cardValueChildrens.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.entity.CardValudChildrens;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卡表(CardValudChildrens)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-18 15:59:36
|
||||||
|
*/
|
||||||
|
public interface CardValudChildrensMapper extends BaseMapper<CardValudChildrens> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
|||||||
|
package com.fuint.business.marketingActivity.cardValueChildrens.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.entity.CardValudChildrens;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卡表(CardValudChildrens)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-18 15:59:36
|
||||||
|
*/
|
||||||
|
public interface CardValudChildrensService extends IService<CardValudChildrens> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
* @param cardValudChildrens
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean add(CardValudChildrens cardValudChildrens);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
package com.fuint.business.marketingActivity.cardValueChildrens.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.marketingActivity.cardValue.service.CardValueService;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.mapper.CardValudChildrensMapper;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.entity.CardValudChildrens;
|
||||||
|
import com.fuint.business.marketingActivity.cardValueChildrens.service.CardValudChildrensService;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 子卡表(CardValudChildrens)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-12-18 15:59:36
|
||||||
|
*/
|
||||||
|
@Service("cardValudChildrensService")
|
||||||
|
public class CardValudChildrensServiceImpl extends ServiceImpl<CardValudChildrensMapper, CardValudChildrens> implements CardValudChildrensService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private CardValueService cardValueService;
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
* @param cardValudChildrens
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean add(CardValudChildrens cardValudChildrens) {
|
||||||
|
if (ObjectUtils.isNotEmpty(cardValudChildrens)){
|
||||||
|
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -9,7 +9,7 @@
|
|||||||
<view class="mub">
|
<view class="mub">
|
||||||
<view class="mub-box" v-for="(item,index) in activityList" :key="index">
|
<view class="mub-box" v-for="(item,index) in activityList" :key="index">
|
||||||
<view class="right-box" v-if="index != 0">
|
<view class="right-box" v-if="index != 0">
|
||||||
立即前往
|
最新活动
|
||||||
</view>
|
</view>
|
||||||
<view class="right-box" v-if="index == 0">
|
<view class="right-box" v-if="index == 0">
|
||||||
最新活动
|
最新活动
|
||||||
|
Loading…
Reference in New Issue
Block a user