diff --git a/.gitignore b/.gitignore index d54da7b..ee69f1b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ .history/ .vscode/ .github/ +node_modules/ + !gradle/wrapper/gradle-wrapper.jar diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/public/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/AdvImgController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AdvImgController.java new file mode 100644 index 0000000..b505b0f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/AdvImgController.java @@ -0,0 +1,122 @@ +package com.ruoyi.system.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.system.domain.SiteDelivery; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.annotation.Log; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; +import com.ruoyi.common.enums.BusinessType; +import com.ruoyi.system.domain.AdvImg; +import com.ruoyi.system.service.IAdvImgService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 广告配置Controller + * + * @author ruoyi + * @date 2025-05-26 + */ +@RestController +@RequestMapping("/system/AdvImg") +public class AdvImgController extends BaseController +{ + @Autowired + private IAdvImgService advImgService; + + /** + * 查询广告配置列表 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:list')") + @GetMapping("/list") + public TableDataInfo list(AdvImg advImg) + { + startPage(); + List list = advImgService.selectAdvImgList(advImg); + return getDataTable(list); + } + + /** + * 导出广告配置列表 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:export')") + @Log(title = "广告配置", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AdvImg advImg) + { + List list = advImgService.selectAdvImgList(advImg); + ExcelUtil util = new ExcelUtil(AdvImg.class); + util.exportExcel(response, list, "广告配置数据"); + } + + /** + * 获取广告配置详细信息 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(advImgService.selectAdvImgById(id)); + } + + /** + * 新增广告配置 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:add')") + @Log(title = "广告配置", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody AdvImg advImg) + { + return toAjax(advImgService.insertAdvImg(advImg)); + } + + /** + * 修改广告配置 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:edit')") + @Log(title = "广告配置", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody AdvImg advImg) + { + return toAjax(advImgService.updateAdvImg(advImg)); + } + + + + /** + * 定时任务状态修改 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:changeStatus')") + @Log(title = "修改状态", businessType = BusinessType.UPDATE) + @PutMapping("/changeStatus") + public AjaxResult changeStatus(@RequestBody AdvImg advImg) + { + AdvImg newAdvImg = advImgService.selectAdvImgById(advImg.getId()); + newAdvImg.setStatus(advImg.getStatus()); + return toAjax(advImgService.updateAdvImg(newAdvImg)); + } + + + /** + * 删除广告配置 + */ + @PreAuthorize("@ss.hasPermi('system:AdvImg:remove')") + @Log(title = "广告配置", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(advImgService.deleteAdvImgByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteTypeController.java b/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteTypeController.java index 3f8bb5e..58fae7e 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteTypeController.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/controller/QuoteTypeController.java @@ -2,9 +2,12 @@ package com.ruoyi.system.controller; import java.util.Arrays; import java.util.List; +import java.util.stream.Collectors; import java.util.stream.IntStream; import javax.servlet.http.HttpServletResponse; +import com.alibaba.fastjson2.JSON; +import com.alibaba.fastjson2.JSONObject; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.ruoyi.system.domain.QuoteCraft; @@ -129,9 +132,29 @@ public class QuoteTypeController extends BaseController @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { - return success(quoteTypeService.selectQuoteTypeById(id)); + + QuoteType quoteType = quoteTypeService.selectQuoteTypeById(id); + if (quoteType.getGoodId()!=null){ + String str = "[\"45\", \"47\", \"48\", \"49\", \"5\", \"52\"]"; + List stringList = JSON.parseArray(str, String.class); + List intList = stringList.stream().map(Integer::parseInt).collect(Collectors.toList()); + quoteType.setGoodsintids(intList); + } + + + + return success(quoteType); } +// public static void main(String[] args) { +// String str = "[\"45\", \"47\", \"48\", \"49\", \"5\", \"52\"]"; +// List stringList = JSON.parseArray(str, String.class); +// List intList = stringList.stream().map(Integer::parseInt).collect(Collectors.toList()); +// System.out.println(intList); // 输出: [45, 47, 48, 49, 5, 52] +// } + + + /** * 新增项目报价--工艺分类 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/AdvImg.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/AdvImg.java new file mode 100644 index 0000000..a405bd1 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/AdvImg.java @@ -0,0 +1,158 @@ +package com.ruoyi.system.domain; + +import java.util.Date; +import com.fasterxml.jackson.annotation.JsonFormat; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ruoyi.common.annotation.Excel; +import com.ruoyi.common.core.domain.BaseEntity; + +/** + * 广告配置对象 adv_img + * + * @author ruoyi + * @date 2025-05-26 + */ +public class AdvImg extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** $column.columnComment */ + @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Long id; + + /** 名称 */ + @Excel(name = "名称") + private String title; + + /** 位置 */ + @Excel(name = "位置") + private Long type; + + /** 图片 */ + @Excel(name = "图片") + private String image; + + /** 链接 */ + @Excel(name = "链接") + private String link; + + /** 排序 */ + @Excel(name = "排序") + private Long sort; + + /** 状态 */ + @Excel(name = "状态") + private Long status; + + /** $column.columnComment */ + private Date createdAt; + + /** $column.columnComment */ + private Date updatedAt; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + + public void setType(Long type) + { + this.type = type; + } + + public Long getType() + { + return type; + } + + public void setImage(String image) + { + this.image = image; + } + + public String getImage() + { + return image; + } + + public void setLink(String link) + { + this.link = link; + } + + public String getLink() + { + return link; + } + + public void setSort(Long sort) + { + this.sort = sort; + } + + public Long getSort() + { + return sort; + } + + public void setStatus(Long status) + { + this.status = status; + } + + public Long getStatus() + { + return status; + } + + public void setCreatedAt(Date createdAt) + { + this.createdAt = createdAt; + } + + public Date getCreatedAt() + { + return createdAt; + } + + public void setUpdatedAt(Date updatedAt) + { + this.updatedAt = updatedAt; + } + + public Date getUpdatedAt() + { + return updatedAt; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("title", getTitle()) + .append("type", getType()) + .append("image", getImage()) + .append("link", getLink()) + .append("sort", getSort()) + .append("status", getStatus()) + .append("createdAt", getCreatedAt()) + .append("updatedAt", getUpdatedAt()) + .toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/QuoteType.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/QuoteType.java index 66d95e8..2b54add 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/QuoteType.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/QuoteType.java @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; import java.util.Date; import java.util.List; +import com.alibaba.fastjson2.JSONObject; import com.fasterxml.jackson.annotation.JsonFormat; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; @@ -44,6 +45,11 @@ public class QuoteType extends BaseEntity private List goodsids; + private List goodsintids; + + + + /** 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @@ -140,6 +146,14 @@ public class QuoteType extends BaseEntity this.goodsids = goodsids; } + public List getGoodsintids() { + return goodsintids; + } + + public void setGoodsintids(List goodsintids) { + this.goodsintids = goodsintids; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AdvImgMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AdvImgMapper.java new file mode 100644 index 0000000..20c491c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/AdvImgMapper.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.mapper; + +import java.util.List; +import com.ruoyi.system.domain.AdvImg; + +/** + * 广告配置Mapper接口 + * + * @author ruoyi + * @date 2025-05-26 + */ +public interface AdvImgMapper +{ + /** + * 查询广告配置 + * + * @param id 广告配置主键 + * @return 广告配置 + */ + public AdvImg selectAdvImgById(Long id); + + /** + * 查询广告配置列表 + * + * @param advImg 广告配置 + * @return 广告配置集合 + */ + public List selectAdvImgList(AdvImg advImg); + + /** + * 新增广告配置 + * + * @param advImg 广告配置 + * @return 结果 + */ + public int insertAdvImg(AdvImg advImg); + + /** + * 修改广告配置 + * + * @param advImg 广告配置 + * @return 结果 + */ + public int updateAdvImg(AdvImg advImg); + + /** + * 删除广告配置 + * + * @param id 广告配置主键 + * @return 结果 + */ + public int deleteAdvImgById(Long id); + + /** + * 批量删除广告配置 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAdvImgByIds(Long[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IAdvImgService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAdvImgService.java new file mode 100644 index 0000000..370941c --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IAdvImgService.java @@ -0,0 +1,61 @@ +package com.ruoyi.system.service; + +import java.util.List; +import com.ruoyi.system.domain.AdvImg; + +/** + * 广告配置Service接口 + * + * @author ruoyi + * @date 2025-05-26 + */ +public interface IAdvImgService +{ + /** + * 查询广告配置 + * + * @param id 广告配置主键 + * @return 广告配置 + */ + public AdvImg selectAdvImgById(Long id); + + /** + * 查询广告配置列表 + * + * @param advImg 广告配置 + * @return 广告配置集合 + */ + public List selectAdvImgList(AdvImg advImg); + + /** + * 新增广告配置 + * + * @param advImg 广告配置 + * @return 结果 + */ + public int insertAdvImg(AdvImg advImg); + + /** + * 修改广告配置 + * + * @param advImg 广告配置 + * @return 结果 + */ + public int updateAdvImg(AdvImg advImg); + + /** + * 批量删除广告配置 + * + * @param ids 需要删除的广告配置主键集合 + * @return 结果 + */ + public int deleteAdvImgByIds(Long[] ids); + + /** + * 删除广告配置信息 + * + * @param id 广告配置主键 + * @return 结果 + */ + public int deleteAdvImgById(Long id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AdvImgServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AdvImgServiceImpl.java new file mode 100644 index 0000000..30eaabd --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/AdvImgServiceImpl.java @@ -0,0 +1,93 @@ +package com.ruoyi.system.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.system.mapper.AdvImgMapper; +import com.ruoyi.system.domain.AdvImg; +import com.ruoyi.system.service.IAdvImgService; + +/** + * 广告配置Service业务层处理 + * + * @author ruoyi + * @date 2025-05-26 + */ +@Service +public class AdvImgServiceImpl implements IAdvImgService +{ + @Autowired + private AdvImgMapper advImgMapper; + + /** + * 查询广告配置 + * + * @param id 广告配置主键 + * @return 广告配置 + */ + @Override + public AdvImg selectAdvImgById(Long id) + { + return advImgMapper.selectAdvImgById(id); + } + + /** + * 查询广告配置列表 + * + * @param advImg 广告配置 + * @return 广告配置 + */ + @Override + public List selectAdvImgList(AdvImg advImg) + { + return advImgMapper.selectAdvImgList(advImg); + } + + /** + * 新增广告配置 + * + * @param advImg 广告配置 + * @return 结果 + */ + @Override + public int insertAdvImg(AdvImg advImg) + { + return advImgMapper.insertAdvImg(advImg); + } + + /** + * 修改广告配置 + * + * @param advImg 广告配置 + * @return 结果 + */ + @Override + public int updateAdvImg(AdvImg advImg) + { + return advImgMapper.updateAdvImg(advImg); + } + + /** + * 批量删除广告配置 + * + * @param ids 需要删除的广告配置主键 + * @return 结果 + */ + @Override + public int deleteAdvImgByIds(Long[] ids) + { + return advImgMapper.deleteAdvImgByIds(ids); + } + + /** + * 删除广告配置信息 + * + * @param id 广告配置主键 + * @return 结果 + */ + @Override + public int deleteAdvImgById(Long id) + { + return advImgMapper.deleteAdvImgById(id); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/AdvImgMapper.xml b/ruoyi-system/src/main/resources/mapper/system/AdvImgMapper.xml new file mode 100644 index 0000000..f9adebc --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/AdvImgMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + select id, title, type, image, link, sort, status, created_at, updated_at from adv_img + + + + + + + + insert into adv_img + + title, + type, + image, + link, + sort, + status, + created_at, + updated_at + + + #{title}, + #{type}, + #{image}, + #{link}, + #{sort}, + #{status}, + NOW(), + NOW() + + + + + update adv_img + + title = #{title}, + type = #{type}, + image = #{image}, + link = #{link}, + sort = #{sort}, + status = #{status}, + updated_at=NOW() + + where id = #{id} + + + + delete from adv_img where id = #{id} + + + + delete from adv_img where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-ui.7z b/ruoyi-ui.7z new file mode 100644 index 0000000..1d42f92 Binary files /dev/null and b/ruoyi-ui.7z differ diff --git a/ruoyi-ui/src/api/system/AdvImg.js b/ruoyi-ui/src/api/system/AdvImg.js new file mode 100644 index 0000000..2a11a5a --- /dev/null +++ b/ruoyi-ui/src/api/system/AdvImg.js @@ -0,0 +1,55 @@ +import request from '@/utils/request' + +// 查询广告配置列表 +export function listAdvImg(query) { + return request({ + url: '/system/AdvImg/list', + method: 'get', + params: query + }) +} + +// 查询广告配置详细 +export function getAdvImg(id) { + return request({ + url: '/system/AdvImg/' + id, + method: 'get' + }) +} +// 任务状态修改 +export function changefenleiStatus(id, status) { + const data = { + id, + status + } + return request({ + url: '/system/AdvImg/changeStatus', + method: 'put', + data: data + }) +} +// 新增广告配置 +export function addAdvImg(data) { + return request({ + url: '/system/AdvImg', + method: 'post', + data: data + }) +} + +// 修改广告配置 +export function updateAdvImg(data) { + return request({ + url: '/system/AdvImg', + method: 'put', + data: data + }) +} + +// 删除广告配置 +export function delAdvImg(id) { + return request({ + url: '/system/AdvImg/' + id, + method: 'delete' + }) +} diff --git a/ruoyi-ui/src/components/Sku/sku.vue b/ruoyi-ui/src/components/Sku/sku.vue new file mode 100644 index 0000000..0df4d07 --- /dev/null +++ b/ruoyi-ui/src/components/Sku/sku.vue @@ -0,0 +1,303 @@ + + + + diff --git a/ruoyi-ui/src/components/Sku/skufrom.vue b/ruoyi-ui/src/components/Sku/skufrom.vue new file mode 100644 index 0000000..7716037 --- /dev/null +++ b/ruoyi-ui/src/components/Sku/skufrom.vue @@ -0,0 +1,753 @@ + + + + + diff --git a/ruoyi-ui/src/views/system/AdvImg/index.vue b/ruoyi-ui/src/views/system/AdvImg/index.vue new file mode 100644 index 0000000..ff7a517 --- /dev/null +++ b/ruoyi-ui/src/views/system/AdvImg/index.vue @@ -0,0 +1,359 @@ + + + diff --git a/ruoyi-ui/src/views/system/GoodsOrder/index.vue b/ruoyi-ui/src/views/system/GoodsOrder/index.vue index dbd5111..7201c10 100644 --- a/ruoyi-ui/src/views/system/GoodsOrder/index.vue +++ b/ruoyi-ui/src/views/system/GoodsOrder/index.vue @@ -209,113 +209,92 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 待支付 + 已支付 + 待发货 + 待收货 + 已完成 + + + + + + + + + + + + + + + + + + + + + + + + + - + diff --git a/ruoyi-ui/src/views/system/GoodsShangPin/index.vue b/ruoyi-ui/src/views/system/GoodsShangPin/index.vue index 74ff30a..f9a6a85 100644 --- a/ruoyi-ui/src/views/system/GoodsShangPin/index.vue +++ b/ruoyi-ui/src/views/system/GoodsShangPin/index.vue @@ -203,110 +203,119 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{dict.label}} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 单规格 + 多规格 + + +
+ + + + + + +
+
+ +
+
+ + + + + + + + + + + + +
- +
+
@@ -330,10 +339,12 @@ diff --git a/ruoyi-ui/src/views/system/Order/index.vue b/ruoyi-ui/src/views/system/Order/index.vue index c13ff71..e0c5045 100644 --- a/ruoyi-ui/src/views/system/Order/index.vue +++ b/ruoyi-ui/src/views/system/Order/index.vue @@ -328,156 +328,92 @@ /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 待支付 + 已支付 + 待发货 + 待收货 + 已完成 + + + + + + + + + + + + + + + + + + + + + + + + + - - + --> - + - - - - - + + - + + + + - + - - {{dict.label}} - - - - - - - - - + - @@ -321,7 +299,14 @@ export default { this.reset() const id = row.id || this.ids getQuoteType(id).then(response => { - this.form = response.data + const data = response.data + // 处理 goodId 为多选数组 + if (typeof data.goodId === 'string') { + data.goodId = data.goodId.split(',').map(i => i.trim()).filter(i => i) + } else if (!Array.isArray(data.goodId)) { + data.goodId = [] + } + this.form = data this.open = true this.title = "修改项目报价--工艺分类" }) diff --git a/ruoyi-ui/src/views/system/ServiceCate/index.vue b/ruoyi-ui/src/views/system/ServiceCate/index.vue index 448eb7d..cd225ba 100644 --- a/ruoyi-ui/src/views/system/ServiceCate/index.vue +++ b/ruoyi-ui/src/views/system/ServiceCate/index.vue @@ -164,7 +164,7 @@ /> - + diff --git a/ruoyi-ui/src/views/system/UsersWorker/index.vue b/ruoyi-ui/src/views/system/UsersWorker/index.vue new file mode 100644 index 0000000..bc55f0b --- /dev/null +++ b/ruoyi-ui/src/views/system/UsersWorker/index.vue @@ -0,0 +1,559 @@ + + + diff --git a/ruoyi-ui/src/views/system/sysseting/sysseting.vue b/ruoyi-ui/src/views/system/sysseting/sysseting.vue new file mode 100644 index 0000000..d8e7d48 --- /dev/null +++ b/ruoyi-ui/src/views/system/sysseting/sysseting.vue @@ -0,0 +1,254 @@ + + + + +