diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/XbMessageController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/XbMessageController.java new file mode 100644 index 0000000..bb8e7d2 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/XbMessageController.java @@ -0,0 +1,112 @@ +package com.ruoyi.web.controller.jarvis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +import com.ruoyi.jarvis.domain.XbMessageItem; +import com.ruoyi.jarvis.service.IXbMessageItemService; +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.jarvis.domain.XbMessage; +import com.ruoyi.jarvis.service.IXbMessageService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 线报消息Controller + * + * @author ruoyi + */ +@RestController +@RequestMapping("/jarvis/xbmessage") +public class XbMessageController extends BaseController +{ + @Autowired + private IXbMessageService xbMessageService; + @Autowired + private IXbMessageItemService xbMessageItemService; + + /** + * 查询线报消息列表 + */ + @GetMapping("/list") + public TableDataInfo list(XbMessage xbMessage) + { + startPage(); + List list = xbMessageService.selectXbMessageList(xbMessage); + TableDataInfo dataTable = getDataTable(list); + if (!dataTable.getRows().isEmpty()) { + @SuppressWarnings("unchecked") + List rows = (List) dataTable.getRows(); + for (XbMessage xbMessageCache : rows) { + XbMessageItem item = new XbMessageItem(); + item.setXbMessageId(xbMessageCache.getId().toString()); + List children = xbMessageItemService.selectXbMessageItemList(item); + xbMessageCache.setChildren(children); + } + } + return dataTable; + } + + /** + * 导出线报消息列表 + */ + @Log(title = "线报消息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, XbMessage xbMessage) + { + List list = xbMessageService.selectXbMessageList(xbMessage); + ExcelUtil util = new ExcelUtil(XbMessage.class); + util.exportExcel(response, list, "线报消息数据"); + } + + /** + * 获取线报消息详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Integer id) + { + return success(xbMessageService.selectXbMessageById(id)); + } + + /** + * 新增线报消息 + */ + @Log(title = "线报消息", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody XbMessage xbMessage) + { + return toAjax(xbMessageService.insertXbMessage(xbMessage)); + } + + /** + * 修改线报消息 + */ + @Log(title = "线报消息", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody XbMessage xbMessage) + { + return toAjax(xbMessageService.updateXbMessage(xbMessage)); + } + + /** + * 删除线报消息 + */ + @Log(title = "线报消息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Integer[] ids) + { + return toAjax(xbMessageService.deleteXbMessageByIds(ids)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/XbMessageItemController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/XbMessageItemController.java new file mode 100644 index 0000000..b5c93c0 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/jarvis/XbMessageItemController.java @@ -0,0 +1,98 @@ +package com.ruoyi.web.controller.jarvis; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; + +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.jarvis.domain.XbMessageItem; +import com.ruoyi.jarvis.service.IXbMessageItemService; +import com.ruoyi.common.utils.poi.ExcelUtil; +import com.ruoyi.common.core.page.TableDataInfo; + +/** + * 线报消息项Controller + * + * @author ruoyi + */ +@RestController +@RequestMapping("/jarvis/xbmessageitem") +public class XbMessageItemController extends BaseController +{ + @Autowired + private IXbMessageItemService xbMessageItemService; + + /** + * 查询线报消息项列表 + */ + @GetMapping("/list") + public TableDataInfo list(XbMessageItem xbMessageItem) + { + startPage(); + List list = xbMessageItemService.selectXbMessageItemList(xbMessageItem); + TableDataInfo data = getDataTable(list); + return data; + } + + /** + * 导出线报消息项列表 + */ + @Log(title = "线报消息项", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, XbMessageItem xbMessageItem) + { + List list = xbMessageItemService.selectXbMessageItemList(xbMessageItem); + ExcelUtil util = new ExcelUtil(XbMessageItem.class); + util.exportExcel(response, list, "线报消息项数据"); + } + + /** + * 获取线报消息项详细信息 + */ + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Integer id) + { + return success(xbMessageItemService.selectXbMessageItemById(id)); + } + + /** + * 新增线报消息项 + */ + @Log(title = "线报消息项", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody XbMessageItem xbMessageItem) + { + return toAjax(xbMessageItemService.insertXbMessageItem(xbMessageItem)); + } + + /** + * 修改线报消息项 + */ + @Log(title = "线报消息项", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody XbMessageItem xbMessageItem) + { + return toAjax(xbMessageItemService.updateXbMessageItem(xbMessageItem)); + } + + /** + * 删除线报消息项 + */ + @Log(title = "线报消息项", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Integer[] ids) + { + return toAjax(xbMessageItemService.deleteXbMessageItemByIds(ids)); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/XbMessage.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/XbMessage.java new file mode 100644 index 0000000..9c8695b --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/XbMessage.java @@ -0,0 +1,233 @@ +package com.ruoyi.jarvis.domain; + +import org.springframework.data.annotation.Transient; + +import java.util.Date; +import java.util.List; + +/** + * + * @TableName xb_message + */ +public class XbMessage { + /** + * + */ + private Integer id; + + /** + * + */ + private Date createDate; + + /** + * + */ + private String skuid; + + /** + * 线报原消息 + */ + private String tipOriginalMessage; + + /** + * 来源 + */ + private String fromWxid; + + /** + * 线报消息首行内容 + */ + private String firstLine; + + /** + * 第一个商品的标题 + */ + private String firstSkuName; + + /** + * 第一个线报商品的价格 + */ + private Double firstPrice; + + public List getChildren() { + if (children == null) { + children = new java.util.ArrayList<>(); + } + return children; + } + + public void setChildren(List children) { + this.children = children; + } + + @Transient + private List children; + + /** + * + */ + public Integer getId() { + return id; + } + + /** + * + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * + */ + public Date getCreateDate() { + return createDate; + } + + /** + * + */ + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * + */ + public String getSkuid() { + return skuid; + } + + /** + * + */ + public void setSkuid(String skuid) { + this.skuid = skuid; + } + + /** + * 线报原消息 + */ + public String getTipOriginalMessage() { + return tipOriginalMessage; + } + + /** + * 线报原消息 + */ + public void setTipOriginalMessage(String tipOriginalMessage) { + this.tipOriginalMessage = tipOriginalMessage; + } + + /** + * 来源 + */ + public String getFromWxid() { + return fromWxid; + } + + /** + * 来源 + */ + public void setFromWxid(String fromWxid) { + this.fromWxid = fromWxid; + } + + /** + * 线报消息首行内容 + */ + public String getFirstLine() { + return firstLine; + } + + /** + * 线报消息首行内容 + */ + public void setFirstLine(String firstLine) { + this.firstLine = firstLine; + } + + /** + * 第一个商品的标题 + */ + public String getFirstSkuName() { + return firstSkuName; + } + + /** + * 第一个商品的标题 + */ + public void setFirstSkuName(String firstSkuName) { + this.firstSkuName = firstSkuName; + } + + /** + * 第一个线报商品的价格 + */ + public Double getFirstPrice() { + return firstPrice; + } + + /** + * 第一个线报商品的价格 + */ + public void setFirstPrice(Double firstPrice) { + this.firstPrice = firstPrice; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + XbMessage other = (XbMessage) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate())) + && (this.getSkuid() == null ? other.getSkuid() == null : this.getSkuid().equals(other.getSkuid())) + && (this.getTipOriginalMessage() == null ? other.getTipOriginalMessage() == null : this.getTipOriginalMessage().equals(other.getTipOriginalMessage())) + && (this.getFromWxid() == null ? other.getFromWxid() == null : this.getFromWxid().equals(other.getFromWxid())) + && (this.getFirstLine() == null ? other.getFirstLine() == null : this.getFirstLine().equals(other.getFirstLine())) + && (this.getFirstSkuName() == null ? other.getFirstSkuName() == null : this.getFirstSkuName().equals(other.getFirstSkuName())) + && (this.getFirstPrice() == null ? other.getFirstPrice() == null : this.getFirstPrice().equals(other.getFirstPrice())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); + result = prime * result + ((getSkuid() == null) ? 0 : getSkuid().hashCode()); + result = prime * result + ((getTipOriginalMessage() == null) ? 0 : getTipOriginalMessage().hashCode()); + result = prime * result + ((getFromWxid() == null) ? 0 : getFromWxid().hashCode()); + result = prime * result + ((getFirstLine() == null) ? 0 : getFirstLine().hashCode()); + result = prime * result + ((getFirstSkuName() == null) ? 0 : getFirstSkuName().hashCode()); + result = prime * result + ((getFirstPrice() == null) ? 0 : getFirstPrice().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", createDate=").append(createDate); + sb.append(", skuid=").append(skuid); + sb.append(", tipOriginalMessage=").append(tipOriginalMessage); + sb.append(", fromWxid=").append(fromWxid); + sb.append(", firstLine=").append(firstLine); + sb.append(", firstSkuName=").append(firstSkuName); + sb.append(", firstPrice=").append(firstPrice); + sb.append("]"); + return sb.toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/XbMessageItem.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/XbMessageItem.java new file mode 100644 index 0000000..181a0f9 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/domain/XbMessageItem.java @@ -0,0 +1,348 @@ +package com.ruoyi.jarvis.domain; + +import java.util.Date; + +/** + * + * @TableName xb_message_item + */ +public class XbMessageItem { + /** + * + */ + private Integer id; + + /** + * + */ + private Date createDate; + + /** + * + */ + private String skuid; + + /** + * 主表id + */ + private String xbMessageId; + + /** + * jd_union_open_goods_query_responce.queryResult的完整JSON + */ + private String jsonQueryResult; + + /** + * couponInfo.couponList + */ + private String jsonCouponList; + + /** + * spuid + */ + private String spuid; + + /** + * skuName + */ + private String skuName; + + /** + * shopInfo + */ + private String jsonShopInfo; + + /** + * priceInfo + */ + private String priceInfo; + + /** + * commissionInfo + */ + private String jsonCommissionInfo; + + /** + * imageList + */ + private String jsonImageList; + + /** + * owner + */ + private String owner; + + /** + * categoryInfo + */ + private String jsonCategoryInfo; + + /** + * + */ + public Integer getId() { + return id; + } + + /** + * + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * + */ + public Date getCreateDate() { + return createDate; + } + + /** + * + */ + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + + /** + * + */ + public String getSkuid() { + return skuid; + } + + /** + * + */ + public void setSkuid(String skuid) { + this.skuid = skuid; + } + + /** + * 主表id + */ + public String getXbMessageId() { + return xbMessageId; + } + + /** + * 主表id + */ + public void setXbMessageId(String xbMessageId) { + this.xbMessageId = xbMessageId; + } + + /** + * jd_union_open_goods_query_responce.queryResult的完整JSON + */ + public String getJsonQueryResult() { + return jsonQueryResult; + } + + /** + * jd_union_open_goods_query_responce.queryResult的完整JSON + */ + public void setJsonQueryResult(String jsonQueryResult) { + this.jsonQueryResult = jsonQueryResult; + } + + /** + * couponInfo.couponList + */ + public String getJsonCouponList() { + return jsonCouponList; + } + + /** + * couponInfo.couponList + */ + public void setJsonCouponList(String jsonCouponList) { + this.jsonCouponList = jsonCouponList; + } + + /** + * spuid + */ + public String getSpuid() { + return spuid; + } + + /** + * spuid + */ + public void setSpuid(String spuid) { + this.spuid = spuid; + } + + /** + * skuName + */ + public String getSkuName() { + return skuName; + } + + /** + * skuName + */ + public void setSkuName(String skuName) { + this.skuName = skuName; + } + + /** + * shopInfo + */ + public String getJsonShopInfo() { + return jsonShopInfo; + } + + /** + * shopInfo + */ + public void setJsonShopInfo(String jsonShopInfo) { + this.jsonShopInfo = jsonShopInfo; + } + + /** + * priceInfo + */ + public String getPriceInfo() { + return priceInfo; + } + + /** + * priceInfo + */ + public void setPriceInfo(String priceInfo) { + this.priceInfo = priceInfo; + } + + /** + * commissionInfo + */ + public String getJsonCommissionInfo() { + return jsonCommissionInfo; + } + + /** + * commissionInfo + */ + public void setJsonCommissionInfo(String jsonCommissionInfo) { + this.jsonCommissionInfo = jsonCommissionInfo; + } + + /** + * imageList + */ + public String getJsonImageList() { + return jsonImageList; + } + + /** + * imageList + */ + public void setJsonImageList(String jsonImageList) { + this.jsonImageList = jsonImageList; + } + + /** + * owner + */ + public String getOwner() { + return owner; + } + + /** + * owner + */ + public void setOwner(String owner) { + this.owner = owner; + } + + /** + * categoryInfo + */ + public String getJsonCategoryInfo() { + return jsonCategoryInfo; + } + + /** + * categoryInfo + */ + public void setJsonCategoryInfo(String jsonCategoryInfo) { + this.jsonCategoryInfo = jsonCategoryInfo; + } + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that == null) { + return false; + } + if (getClass() != that.getClass()) { + return false; + } + XbMessageItem other = (XbMessageItem) that; + return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) + && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate())) + && (this.getSkuid() == null ? other.getSkuid() == null : this.getSkuid().equals(other.getSkuid())) + && (this.getXbMessageId() == null ? other.getXbMessageId() == null : this.getXbMessageId().equals(other.getXbMessageId())) + && (this.getJsonQueryResult() == null ? other.getJsonQueryResult() == null : this.getJsonQueryResult().equals(other.getJsonQueryResult())) + && (this.getJsonCouponList() == null ? other.getJsonCouponList() == null : this.getJsonCouponList().equals(other.getJsonCouponList())) + && (this.getSpuid() == null ? other.getSpuid() == null : this.getSpuid().equals(other.getSpuid())) + && (this.getSkuName() == null ? other.getSkuName() == null : this.getSkuName().equals(other.getSkuName())) + && (this.getJsonShopInfo() == null ? other.getJsonShopInfo() == null : this.getJsonShopInfo().equals(other.getJsonShopInfo())) + && (this.getPriceInfo() == null ? other.getPriceInfo() == null : this.getPriceInfo().equals(other.getPriceInfo())) + && (this.getJsonCommissionInfo() == null ? other.getJsonCommissionInfo() == null : this.getJsonCommissionInfo().equals(other.getJsonCommissionInfo())) + && (this.getJsonImageList() == null ? other.getJsonImageList() == null : this.getJsonImageList().equals(other.getJsonImageList())) + && (this.getOwner() == null ? other.getOwner() == null : this.getOwner().equals(other.getOwner())) + && (this.getJsonCategoryInfo() == null ? other.getJsonCategoryInfo() == null : this.getJsonCategoryInfo().equals(other.getJsonCategoryInfo())); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); + result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode()); + result = prime * result + ((getSkuid() == null) ? 0 : getSkuid().hashCode()); + result = prime * result + ((getXbMessageId() == null) ? 0 : getXbMessageId().hashCode()); + result = prime * result + ((getJsonQueryResult() == null) ? 0 : getJsonQueryResult().hashCode()); + result = prime * result + ((getJsonCouponList() == null) ? 0 : getJsonCouponList().hashCode()); + result = prime * result + ((getSpuid() == null) ? 0 : getSpuid().hashCode()); + result = prime * result + ((getSkuName() == null) ? 0 : getSkuName().hashCode()); + result = prime * result + ((getJsonShopInfo() == null) ? 0 : getJsonShopInfo().hashCode()); + result = prime * result + ((getPriceInfo() == null) ? 0 : getPriceInfo().hashCode()); + result = prime * result + ((getJsonCommissionInfo() == null) ? 0 : getJsonCommissionInfo().hashCode()); + result = prime * result + ((getJsonImageList() == null) ? 0 : getJsonImageList().hashCode()); + result = prime * result + ((getOwner() == null) ? 0 : getOwner().hashCode()); + result = prime * result + ((getJsonCategoryInfo() == null) ? 0 : getJsonCategoryInfo().hashCode()); + return result; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(getClass().getSimpleName()); + sb.append(" ["); + sb.append("Hash = ").append(hashCode()); + sb.append(", id=").append(id); + sb.append(", createDate=").append(createDate); + sb.append(", skuid=").append(skuid); + sb.append(", xbMessageId=").append(xbMessageId); + sb.append(", jsonQueryResult=").append(jsonQueryResult); + sb.append(", jsonCouponList=").append(jsonCouponList); + sb.append(", spuid=").append(spuid); + sb.append(", skuName=").append(skuName); + sb.append(", jsonShopInfo=").append(jsonShopInfo); + sb.append(", priceInfo=").append(priceInfo); + sb.append(", jsonCommissionInfo=").append(jsonCommissionInfo); + sb.append(", jsonImageList=").append(jsonImageList); + sb.append(", owner=").append(owner); + sb.append(", jsonCategoryInfo=").append(jsonCategoryInfo); + sb.append("]"); + return sb.toString(); + } +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/XbMessageItemMapper.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/XbMessageItemMapper.java new file mode 100644 index 0000000..c74c634 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/XbMessageItemMapper.java @@ -0,0 +1,60 @@ +package com.ruoyi.jarvis.mapper; + +import java.util.List; +import com.ruoyi.jarvis.domain.XbMessageItem; + +/** + * 线报消息项Mapper接口 + * + * @author ruoyi + */ +public interface XbMessageItemMapper +{ + /** + * 查询线报消息项 + * + * @param id 线报消息项主键 + * @return 线报消息项 + */ + public XbMessageItem selectXbMessageItemById(Integer id); + + /** + * 查询线报消息项列表 + * + * @param xbMessageItem 线报消息项 + * @return 线报消息项集合 + */ + public List selectXbMessageItemList(XbMessageItem xbMessageItem); + + /** + * 新增线报消息项 + * + * @param xbMessageItem 线报消息项 + * @return 结果 + */ + public int insertXbMessageItem(XbMessageItem xbMessageItem); + + /** + * 修改线报消息项 + * + * @param xbMessageItem 线报消息项 + * @return 结果 + */ + public int updateXbMessageItem(XbMessageItem xbMessageItem); + + /** + * 删除线报消息项 + * + * @param id 线报消息项主键 + * @return 结果 + */ + public int deleteXbMessageItemById(Integer id); + + /** + * 批量删除线报消息项 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteXbMessageItemByIds(Integer[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/XbMessageMapper.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/XbMessageMapper.java new file mode 100644 index 0000000..e0abfc2 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/mapper/XbMessageMapper.java @@ -0,0 +1,60 @@ +package com.ruoyi.jarvis.mapper; + +import java.util.List; +import com.ruoyi.jarvis.domain.XbMessage; + +/** + * 线报消息Mapper接口 + * + * @author ruoyi + */ +public interface XbMessageMapper +{ + /** + * 查询线报消息 + * + * @param id 线报消息主键 + * @return 线报消息 + */ + public XbMessage selectXbMessageById(Integer id); + + /** + * 查询线报消息列表 + * + * @param xbMessage 线报消息 + * @return 线报消息集合 + */ + public List selectXbMessageList(XbMessage xbMessage); + + /** + * 新增线报消息 + * + * @param xbMessage 线报消息 + * @return 结果 + */ + public int insertXbMessage(XbMessage xbMessage); + + /** + * 修改线报消息 + * + * @param xbMessage 线报消息 + * @return 结果 + */ + public int updateXbMessage(XbMessage xbMessage); + + /** + * 删除线报消息 + * + * @param id 线报消息主键 + * @return 结果 + */ + public int deleteXbMessageById(Integer id); + + /** + * 批量删除线报消息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteXbMessageByIds(Integer[] ids); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IXbMessageItemService.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IXbMessageItemService.java new file mode 100644 index 0000000..09e0aca --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IXbMessageItemService.java @@ -0,0 +1,61 @@ +package com.ruoyi.jarvis.service; + +import java.util.List; +import com.ruoyi.jarvis.domain.XbMessageItem; + +/** + * 线报消息项Service接口 + * + * @author ruoyi + */ +public interface IXbMessageItemService +{ + /** + * 查询线报消息项 + * + * @param id 线报消息项主键 + * @return 线报消息项 + */ + public XbMessageItem selectXbMessageItemById(Integer id); + + /** + * 查询线报消息项列表 + * + * @param xbMessageItem 线报消息项 + * @return 线报消息项集合 + */ + public List selectXbMessageItemList(XbMessageItem xbMessageItem); + + /** + * 新增线报消息项 + * + * @param xbMessageItem 线报消息项 + * @return 结果 + */ + public int insertXbMessageItem(XbMessageItem xbMessageItem); + + /** + * 修改线报消息项 + * + * @param xbMessageItem 线报消息项 + * @return 结果 + */ + public int updateXbMessageItem(XbMessageItem xbMessageItem); + + /** + * 批量删除线报消息项 + * + * @param ids 需要删除的线报消息项主键 + * @return 结果 + */ + public int deleteXbMessageItemByIds(Integer[] ids); + + /** + * 删除线报消息项信息 + * + * @param id 线报消息项主键 + * @return 结果 + */ + public int deleteXbMessageItemById(Integer id); + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IXbMessageService.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IXbMessageService.java new file mode 100644 index 0000000..afeea6f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/IXbMessageService.java @@ -0,0 +1,60 @@ +package com.ruoyi.jarvis.service; + +import java.util.List; +import com.ruoyi.jarvis.domain.XbMessage; + +/** + * 线报消息Service接口 + * + * @author ruoyi + */ +public interface IXbMessageService +{ + /** + * 查询线报消息 + * + * @param id 线报消息主键 + * @return 线报消息 + */ + public XbMessage selectXbMessageById(Integer id); + + /** + * 查询线报消息列表 + * + * @param xbMessage 线报消息 + * @return 线报消息集合 + */ + public List selectXbMessageList(XbMessage xbMessage); + + /** + * 新增线报消息 + * + * @param xbMessage 线报消息 + * @return 结果 + */ + public int insertXbMessage(XbMessage xbMessage); + + /** + * 修改线报消息 + * + * @param xbMessage 线报消息 + * @return 结果 + */ + public int updateXbMessage(XbMessage xbMessage); + + /** + * 批量删除线报消息 + * + * @param ids 需要删除的线报消息主键 + * @return 结果 + */ + public int deleteXbMessageByIds(Integer[] ids); + + /** + * 删除线报消息信息 + * + * @param id 线报消息主键 + * @return 结果 + */ + public int deleteXbMessageById(Integer id); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/XbMessageItemServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/XbMessageItemServiceImpl.java new file mode 100644 index 0000000..a0b5573 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/XbMessageItemServiceImpl.java @@ -0,0 +1,94 @@ +package com.ruoyi.jarvis.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.jarvis.mapper.XbMessageItemMapper; +import com.ruoyi.jarvis.domain.XbMessageItem; +import com.ruoyi.jarvis.service.IXbMessageItemService; + +/** + * 线报消息项Service业务层处理 + * + * @author ruoyi + */ +@Service +public class XbMessageItemServiceImpl implements IXbMessageItemService +{ + @Autowired + private XbMessageItemMapper xbMessageItemMapper; + + /** + * 查询线报消息项 + * + * @param id 线报消息项主键 + * @return 线报消息项 + */ + @Override + public XbMessageItem selectXbMessageItemById(Integer id) + { + return xbMessageItemMapper.selectXbMessageItemById(id); + } + + /** + * 查询线报消息项列表 + * + * @param xbMessageItem 线报消息项 + * @return 线报消息项 + */ + @Override + public List selectXbMessageItemList(XbMessageItem xbMessageItem) + { + return xbMessageItemMapper.selectXbMessageItemList(xbMessageItem); + } + + /** + * 新增线报消息项 + * + * @param xbMessageItem 线报消息项 + * @return 结果 + */ + @Override + public int insertXbMessageItem(XbMessageItem xbMessageItem) + { + return xbMessageItemMapper.insertXbMessageItem(xbMessageItem); + } + + /** + * 修改线报消息项 + * + * @param xbMessageItem 线报消息项 + * @return 结果 + */ + @Override + public int updateXbMessageItem(XbMessageItem xbMessageItem) + { + return xbMessageItemMapper.updateXbMessageItem(xbMessageItem); + } + + /** + * 批量删除线报消息项 + * + * @param ids 需要删除的线报消息项主键 + * @return 结果 + */ + @Override + public int deleteXbMessageItemByIds(Integer[] ids) + { + return xbMessageItemMapper.deleteXbMessageItemByIds(ids); + } + + /** + * 删除线报消息项信息 + * + * @param id 线报消息项主键 + * @return 结果 + */ + @Override + public int deleteXbMessageItemById(Integer id) + { + return xbMessageItemMapper.deleteXbMessageItemById(id); + } + + +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/XbMessageServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/XbMessageServiceImpl.java new file mode 100644 index 0000000..831ba70 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/jarvis/service/impl/XbMessageServiceImpl.java @@ -0,0 +1,92 @@ +package com.ruoyi.jarvis.service.impl; + +import java.util.List; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ruoyi.jarvis.mapper.XbMessageMapper; +import com.ruoyi.jarvis.domain.XbMessage; +import com.ruoyi.jarvis.service.IXbMessageService; + +/** + * 线报消息Service业务层处理 + * + * @author ruoyi + */ +@Service +public class XbMessageServiceImpl implements IXbMessageService +{ + @Autowired + private XbMessageMapper xbMessageMapper; + + /** + * 查询线报消息 + * + * @param id 线报消息主键 + * @return 线报消息 + */ + @Override + public XbMessage selectXbMessageById(Integer id) + { + return xbMessageMapper.selectXbMessageById(id); + } + + /** + * 查询线报消息列表 + * + * @param xbMessage 线报消息 + * @return 线报消息 + */ + @Override + public List selectXbMessageList(XbMessage xbMessage) + { + return xbMessageMapper.selectXbMessageList(xbMessage); + } + + /** + * 新增线报消息 + * + * @param xbMessage 线报消息 + * @return 结果 + */ + @Override + public int insertXbMessage(XbMessage xbMessage) + { + return xbMessageMapper.insertXbMessage(xbMessage); + } + + /** + * 修改线报消息 + * + * @param xbMessage 线报消息 + * @return 结果 + */ + @Override + public int updateXbMessage(XbMessage xbMessage) + { + return xbMessageMapper.updateXbMessage(xbMessage); + } + + /** + * 批量删除线报消息 + * + * @param ids 需要删除的线报消息主键 + * @return 结果 + */ + @Override + public int deleteXbMessageByIds(Integer[] ids) + { + return xbMessageMapper.deleteXbMessageByIds(ids); + } + + /** + * 删除线报消息信息 + * + * @param id 线报消息主键 + * @return 结果 + */ + @Override + public int deleteXbMessageById(Integer id) + { + return xbMessageMapper.deleteXbMessageById(id); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/jarvis/XbMessageItemMapper.xml b/ruoyi-system/src/main/resources/mapper/jarvis/XbMessageItemMapper.xml new file mode 100644 index 0000000..a19dce4 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/jarvis/XbMessageItemMapper.xml @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, create_date, skuid, xb_message_id, json_query_result, json_coupon_list, spuid, sku_name, json_shop_info, price_info, json_commission_info, json_image_list, owner, json_category_info from xb_message_item + + + + + + + + insert into xb_message_item + + create_date, + skuid, + xb_message_id, + json_query_result, + json_coupon_list, + spuid, + sku_name, + json_shop_info, + price_info, + json_commission_info, + json_image_list, + owner, + json_category_info, + + + #{createDate}, + #{skuid}, + #{xbMessageId}, + #{jsonQueryResult}, + #{jsonCouponList}, + #{spuid}, + #{skuName}, + #{jsonShopInfo}, + #{priceInfo}, + #{jsonCommissionInfo}, + #{jsonImageList}, + #{owner}, + #{jsonCategoryInfo}, + + + + + update xb_message_item + + create_date = #{createDate}, + skuid = #{skuid}, + xb_message_id = #{xbMessageId}, + json_query_result = #{jsonQueryResult}, + json_coupon_list = #{jsonCouponList}, + spuid = #{spuid}, + sku_name = #{skuName}, + json_shop_info = #{jsonShopInfo}, + price_info = #{priceInfo}, + json_commission_info = #{jsonCommissionInfo}, + json_image_list = #{jsonImageList}, + owner = #{owner}, + json_category_info = #{jsonCategoryInfo}, + + where id = #{id} + + + + delete from xb_message_item where id = #{id} + + + + delete from xb_message_item where id in + + #{id} + + + + diff --git a/ruoyi-system/src/main/resources/mapper/jarvis/XbMessageMapper.xml b/ruoyi-system/src/main/resources/mapper/jarvis/XbMessageMapper.xml new file mode 100644 index 0000000..a816e17 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/jarvis/XbMessageMapper.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + select id, create_date, skuid, tip_original_message, from_wxid, first_line, first_sku_name, first_price from xb_message + + + + + + + + insert into xb_message + + create_date, + skuid, + tip_original_message, + from_wxid, + first_line, + first_sku_name, + first_price, + + + #{createDate}, + #{skuid}, + #{tipOriginalMessage}, + #{fromWxid}, + #{firstLine}, + #{firstSkuName}, + #{firstPrice}, + + + + + update xb_message + + create_date = #{createDate}, + skuid = #{skuid}, + tip_original_message = #{tipOriginalMessage}, + from_wxid = #{fromWxid}, + first_line = #{firstLine}, + first_sku_name = #{firstSkuName}, + first_price = #{firstPrice}, + + where id = #{id} + + + + delete from xb_message where id = #{id} + + + + delete from xb_message where id in + + #{id} + + + +