From 865caa29e70c94f1c376057b5fbdf59dfcef446b Mon Sep 17 00:00:00 2001 From: "DESKTOP-369JRHT\\12997" <9> Date: Thu, 1 Aug 2024 14:21:56 +0800 Subject: [PATCH] no message --- .../controller/TiktokConfigController.java | 90 ++++++++++++++ .../business/sys/entity/TiktokConfig.java | 117 ++++++++++++++++++ .../sys/mapper/TiktokConfigMapper.java | 15 +++ .../sys/service/TiktokConfigService.java | 15 +++ .../service/impl/TiktokConfigServiceImpl.java | 19 +++ 5 files changed, 256 insertions(+) create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/TiktokConfigController.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/TiktokConfig.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/TiktokConfigMapper.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/TiktokConfigService.java create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/TiktokConfigServiceImpl.java diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/TiktokConfigController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/TiktokConfigController.java new file mode 100644 index 000000000..d412afff6 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/controller/TiktokConfigController.java @@ -0,0 +1,90 @@ +package com.fuint.business.sys.controller; + + + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.api.ApiController; +import com.baomidou.mybatisplus.extension.api.R; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.sys.entity.TiktokConfig; +import com.fuint.business.sys.service.TiktokConfigService; +import com.fuint.framework.web.BaseController; +import com.fuint.framework.web.ResponseObject; +import org.springframework.web.bind.annotation.*; + +import javax.annotation.Resource; +import java.io.Serializable; +import java.util.List; + +/** + * 抖音配置(TiktokConfig)表控制层 + * + * @author wangh + * @since 2024-08-01 09:22:46 + */ +@RestController +@RequestMapping("tiktokConfig") +public class TiktokConfigController extends BaseController { + /** + * 服务对象 + */ + @Resource + private TiktokConfigService tiktokConfigService; + + /** + * 分页查询所有数据 + * + * @param page 分页对象 + * @param tiktokConfig 查询实体 + * @return 所有数据 + */ + @GetMapping + public ResponseObject selectAll(Page page, TiktokConfig tiktokConfig) { + return getSuccessResult(this.tiktokConfigService.page(page, new QueryWrapper<>(tiktokConfig))); + } + + /** + * 通过主键查询单条数据 + * + * @param id 主键 + * @return 单条数据 + */ + @GetMapping("{id}") + public ResponseObject selectOne(@PathVariable Serializable id) { + return getSuccessResult(this.tiktokConfigService.getById(id)); + } + + /** + * 新增数据 + * + * @param tiktokConfig 实体对象 + * @return 新增结果 + */ + @PostMapping + public ResponseObject insert(@RequestBody TiktokConfig tiktokConfig) { + return getSuccessResult(this.tiktokConfigService.save(tiktokConfig)); + } + + /** + * 修改数据 + * + * @param tiktokConfig 实体对象 + * @return 修改结果 + */ + @PutMapping + public ResponseObject update(@RequestBody TiktokConfig tiktokConfig) { + return getSuccessResult(this.tiktokConfigService.updateById(tiktokConfig)); + } + + /** + * 删除数据 + * + * @param idList 主键结合 + * @return 删除结果 + */ + @DeleteMapping + public ResponseObject delete(@RequestParam("idList") List idList) { + return getSuccessResult(this.tiktokConfigService.removeByIds(idList)); + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/TiktokConfig.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/TiktokConfig.java new file mode 100644 index 000000000..9e95be78d --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/entity/TiktokConfig.java @@ -0,0 +1,117 @@ +package com.fuint.business.sys.entity; + +import java.util.Date; +import com.baomidou.mybatisplus.extension.activerecord.Model; +import java.io.Serializable; + +/** + * 抖音配置(TiktokConfig)表实体类 + * + * @author wangh + * @since 2024-08-01 09:22:52 + */ +@SuppressWarnings("serial") +public class TiktokConfig extends Model { +//主键id + private Integer id; +//所属连锁店id + private Integer chainStorId; +//所属店铺id + private Integer storeId; +//抖音商店id + private Integer tiktokStoreId; +//状态 0:启用 1:禁用 + private String status; +//创建者 + private String createBy; +//创建时间 + private Date createTime; +//更新者 + private String updateBy; +//更新时间 + private Date updateTime; + + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public Integer getChainStorId() { + return chainStorId; + } + + public void setChainStorId(Integer chainStorId) { + this.chainStorId = chainStorId; + } + + public Integer getStoreId() { + return storeId; + } + + public void setStoreId(Integer storeId) { + this.storeId = storeId; + } + + public Integer getTiktokStoreId() { + return tiktokStoreId; + } + + public void setTiktokStoreId(Integer tiktokStoreId) { + this.tiktokStoreId = tiktokStoreId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + 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; + } +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/TiktokConfigMapper.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/TiktokConfigMapper.java new file mode 100644 index 000000000..9fb19f9b6 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/mapper/TiktokConfigMapper.java @@ -0,0 +1,15 @@ +package com.fuint.business.sys.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.fuint.business.sys.entity.TiktokConfig; + +/** + * 抖音配置(TiktokConfig)表数据库访问层 + * + * @author wangh + * @since 2024-08-01 09:22:46 + */ +public interface TiktokConfigMapper extends BaseMapper { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/TiktokConfigService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/TiktokConfigService.java new file mode 100644 index 000000000..dcf791b4b --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/TiktokConfigService.java @@ -0,0 +1,15 @@ +package com.fuint.business.sys.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.fuint.business.sys.entity.TiktokConfig; + +/** + * 抖音配置(TiktokConfig)表服务接口 + * + * @author wangh + * @since 2024-08-01 09:22:52 + */ +public interface TiktokConfigService extends IService { + +} + diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/TiktokConfigServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/TiktokConfigServiceImpl.java new file mode 100644 index 000000000..e4f040826 --- /dev/null +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/sys/service/impl/TiktokConfigServiceImpl.java @@ -0,0 +1,19 @@ +package com.fuint.business.sys.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.fuint.business.sys.mapper.TiktokConfigMapper; +import com.fuint.business.sys.entity.TiktokConfig; +import com.fuint.business.sys.service.TiktokConfigService; +import org.springframework.stereotype.Service; + +/** + * 抖音配置(TiktokConfig)表服务实现类 + * + * @author wangh + * @since 2024-08-01 09:22:52 + */ +@Service("tiktokConfigService") +public class TiktokConfigServiceImpl extends ServiceImpl implements TiktokConfigService { + +} +