From 9759a296eef2df3d92e76215fec58d6599715c99 Mon Sep 17 00:00:00 2001 From: elliott <382696293@qq.com> Date: Thu, 14 Dec 2023 11:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BC=9A=E5=91=98=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=A7=AF=E5=88=86=E6=B5=81=E6=B0=B4=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/domain/entity/WxUserIntegralLog.java | 123 +++++++ .../core/mapper/WxUserIntegralLogMapper.java | 62 ++++ .../mapper/WxUserIntegralLogMapper.xml | 89 +++++ .../WxUserIntegralLogController.java | 106 ++++++ .../service/IWxUserIntegralLogService.java | 62 ++++ .../impl/WxUserIntegralLogServiceImpl.java | 96 ++++++ flossom-ui/src/api/system/integralLog.js | 44 +++ .../src/views/system/integralLog/index.vue | 311 ++++++++++++++++++ 8 files changed, 893 insertions(+) create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserIntegralLog.java create mode 100644 flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserIntegralLogMapper.java create mode 100644 flossom-common/flossom-common-core/src/main/resources/mapper/WxUserIntegralLogMapper.xml create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserIntegralLogController.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserIntegralLogService.java create mode 100644 flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserIntegralLogServiceImpl.java create mode 100644 flossom-ui/src/api/system/integralLog.js create mode 100644 flossom-ui/src/views/system/integralLog/index.vue diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserIntegralLog.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserIntegralLog.java new file mode 100644 index 0000000..2b86622 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/domain/entity/WxUserIntegralLog.java @@ -0,0 +1,123 @@ +package com.flossom.common.core.domain.entity; + +import com.flossom.common.core.annotation.Excel; +import com.flossom.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 微信用户积分流水对象 wx_user_integral_log + * + * @author flossom + * @date 2023-12-14 + */ +public class WxUserIntegralLog extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键ID */ + private Long id; + + /** 用户昵称 */ + @Excel(name = "用户昵称") + private String userName; + + /** 用户手机号码 */ + @Excel(name = "用户手机号码") + private String userPhone; + + /** 1-增加 2-减少 */ + @Excel(name = "1-增加 2-减少") + private String source; + + /** 浮动分数 */ + @Excel(name = "浮动分数") + private Long floatScore; + + /** 来源ID */ + @Excel(name = "来源ID") + private Long soureId; + + /** 说明 */ + @Excel(name = "说明") + private String remarkContent; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setUserName(String userName) + { + this.userName = userName; + } + + public String getUserName() + { + return userName; + } + public void setUserPhone(String userPhone) + { + this.userPhone = userPhone; + } + + public String getUserPhone() + { + return userPhone; + } + public void setSource(String source) + { + this.source = source; + } + + public String getSource() + { + return source; + } + public void setFloatScore(Long floatScore) + { + this.floatScore = floatScore; + } + + public Long getFloatScore() + { + return floatScore; + } + public void setSoureId(Long soureId) + { + this.soureId = soureId; + } + + public Long getSoureId() + { + return soureId; + } + public void setRemarkContent(String remarkContent) + { + this.remarkContent = remarkContent; + } + + public String getRemarkContent() + { + return remarkContent; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("userName", getUserName()) + .append("userPhone", getUserPhone()) + .append("source", getSource()) + .append("floatScore", getFloatScore()) + .append("soureId", getSoureId()) + .append("remarkContent", getRemarkContent()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .toString(); + } +} diff --git a/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserIntegralLogMapper.java b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserIntegralLogMapper.java new file mode 100644 index 0000000..5498227 --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/java/com/flossom/common/core/mapper/WxUserIntegralLogMapper.java @@ -0,0 +1,62 @@ +package com.flossom.common.core.mapper; + +import com.flossom.common.core.domain.entity.WxUserIntegralLog; + +import java.util.List; + +/** + * 微信用户积分流水Mapper接口 + * + * @author flossom + * @date 2023-12-14 + */ +public interface WxUserIntegralLogMapper +{ + /** + * 查询微信用户积分流水 + * + * @param id 微信用户积分流水主键 + * @return 微信用户积分流水 + */ + public WxUserIntegralLog selectWxUserIntegralLogById(Long id); + + /** + * 查询微信用户积分流水列表 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 微信用户积分流水集合 + */ + public List selectWxUserIntegralLogList(WxUserIntegralLog wxUserIntegralLog); + + /** + * 新增微信用户积分流水 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 结果 + */ + public int insertWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog); + + /** + * 修改微信用户积分流水 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 结果 + */ + public int updateWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog); + + /** + * 删除微信用户积分流水 + * + * @param id 微信用户积分流水主键 + * @return 结果 + */ + public int deleteWxUserIntegralLogById(Long id); + + /** + * 批量删除微信用户积分流水 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteWxUserIntegralLogByIds(Long[] ids); +} diff --git a/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserIntegralLogMapper.xml b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserIntegralLogMapper.xml new file mode 100644 index 0000000..125887b --- /dev/null +++ b/flossom-common/flossom-common-core/src/main/resources/mapper/WxUserIntegralLogMapper.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + select id, user_name, user_phone, source, float_score, soure_id, remark_content, create_time, create_by from wx_user_integral_log + + + + + + + + insert into wx_user_integral_log + + user_name, + user_phone, + source, + float_score, + soure_id, + remark_content, + create_time, + create_by, + + + #{userName}, + #{userPhone}, + #{source}, + #{floatScore}, + #{soureId}, + #{remarkContent}, + #{createTime}, + #{createBy}, + + + + + update wx_user_integral_log + + user_name = #{userName}, + user_phone = #{userPhone}, + source = #{source}, + float_score = #{floatScore}, + soure_id = #{soureId}, + remark_content = #{remarkContent}, + create_time = #{createTime}, + create_by = #{createBy}, + + where id = #{id} + + + + delete from wx_user_integral_log where id = #{id} + + + + delete from wx_user_integral_log where id in + + #{id} + + + diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserIntegralLogController.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserIntegralLogController.java new file mode 100644 index 0000000..6f6486c --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/controller/WxUserIntegralLogController.java @@ -0,0 +1,106 @@ +package com.flossom.system.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.flossom.common.core.domain.entity.WxUserIntegralLog; +import com.flossom.common.core.utils.poi.ExcelUtil; +import com.flossom.common.core.web.controller.BaseController; +import com.flossom.common.core.web.domain.AjaxResult; +import com.flossom.common.core.web.page.TableDataInfo; +import com.flossom.common.log.annotation.Log; +import com.flossom.common.log.enums.BusinessType; +import com.flossom.common.security.annotation.RequiresPermissions; +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.flossom.system.service.IWxUserIntegralLogService; + +/** + * 微信用户积分流水Controller + * + * @author flossom + * @date 2023-12-14 + */ +@RestController +@RequestMapping("/integralLog") +public class WxUserIntegralLogController extends BaseController +{ + @Autowired + private IWxUserIntegralLogService wxUserIntegralLogService; + + /** + * 查询微信用户积分流水列表 + */ + @RequiresPermissions("system:integralLog:list") + @GetMapping("/list") + public TableDataInfo list(WxUserIntegralLog wxUserIntegralLog) + { + startPage(); + List list = wxUserIntegralLogService.selectWxUserIntegralLogList(wxUserIntegralLog); + return getDataTable(list); + } + + /** + * 导出微信用户积分流水列表 + */ + @RequiresPermissions("system:integralLog:export") + @Log(title = "微信用户积分流水", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, WxUserIntegralLog wxUserIntegralLog) + { + List list = wxUserIntegralLogService.selectWxUserIntegralLogList(wxUserIntegralLog); + ExcelUtil util = new ExcelUtil(WxUserIntegralLog.class); + util.exportExcel(response, list, "微信用户积分流水数据"); + } + + /** + * 获取微信用户积分流水详细信息 + */ + @RequiresPermissions("system:integralLog:query") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(wxUserIntegralLogService.selectWxUserIntegralLogById(id)); + } + + /** + * 新增微信用户积分流水 + */ + @RequiresPermissions("system:integralLog:add") + @Log(title = "微信用户积分流水", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody WxUserIntegralLog wxUserIntegralLog) + { + return toAjax(wxUserIntegralLogService.insertWxUserIntegralLog(wxUserIntegralLog)); + } + + /** + * 修改微信用户积分流水 + */ + @RequiresPermissions("system:integralLog:edit") + @Log(title = "微信用户积分流水", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody WxUserIntegralLog wxUserIntegralLog) + { + return toAjax(wxUserIntegralLogService.updateWxUserIntegralLog(wxUserIntegralLog)); + } + + /** + * 删除微信用户积分流水 + */ + @RequiresPermissions("system:integralLog:remove") + @Log(title = "微信用户积分流水", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(wxUserIntegralLogService.deleteWxUserIntegralLogByIds(ids)); + } +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserIntegralLogService.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserIntegralLogService.java new file mode 100644 index 0000000..1198613 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/IWxUserIntegralLogService.java @@ -0,0 +1,62 @@ +package com.flossom.system.service; + +import com.flossom.common.core.domain.entity.WxUserIntegralLog; + +import java.util.List; + +/** + * 微信用户积分流水Service接口 + * + * @author flossom + * @date 2023-12-14 + */ +public interface IWxUserIntegralLogService +{ + /** + * 查询微信用户积分流水 + * + * @param id 微信用户积分流水主键 + * @return 微信用户积分流水 + */ + public WxUserIntegralLog selectWxUserIntegralLogById(Long id); + + /** + * 查询微信用户积分流水列表 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 微信用户积分流水集合 + */ + public List selectWxUserIntegralLogList(WxUserIntegralLog wxUserIntegralLog); + + /** + * 新增微信用户积分流水 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 结果 + */ + public int insertWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog); + + /** + * 修改微信用户积分流水 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 结果 + */ + public int updateWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog); + + /** + * 批量删除微信用户积分流水 + * + * @param ids 需要删除的微信用户积分流水主键集合 + * @return 结果 + */ + public int deleteWxUserIntegralLogByIds(Long[] ids); + + /** + * 删除微信用户积分流水信息 + * + * @param id 微信用户积分流水主键 + * @return 结果 + */ + public int deleteWxUserIntegralLogById(Long id); +} diff --git a/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserIntegralLogServiceImpl.java b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserIntegralLogServiceImpl.java new file mode 100644 index 0000000..f490869 --- /dev/null +++ b/flossom-modules/flossom-system/src/main/java/com/flossom/system/service/impl/WxUserIntegralLogServiceImpl.java @@ -0,0 +1,96 @@ +package com.flossom.system.service.impl; + +import java.util.List; + +import com.flossom.common.core.domain.entity.WxUserIntegralLog; +import com.flossom.common.core.mapper.WxUserIntegralLogMapper; +import com.flossom.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.flossom.system.service.IWxUserIntegralLogService; + +/** + * 微信用户积分流水Service业务层处理 + * + * @author flossom + * @date 2023-12-14 + */ +@Service +public class WxUserIntegralLogServiceImpl implements IWxUserIntegralLogService +{ + @Autowired + private WxUserIntegralLogMapper wxUserIntegralLogMapper; + + /** + * 查询微信用户积分流水 + * + * @param id 微信用户积分流水主键 + * @return 微信用户积分流水 + */ + @Override + public WxUserIntegralLog selectWxUserIntegralLogById(Long id) + { + return wxUserIntegralLogMapper.selectWxUserIntegralLogById(id); + } + + /** + * 查询微信用户积分流水列表 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 微信用户积分流水 + */ + @Override + public List selectWxUserIntegralLogList(WxUserIntegralLog wxUserIntegralLog) + { + return wxUserIntegralLogMapper.selectWxUserIntegralLogList(wxUserIntegralLog); + } + + /** + * 新增微信用户积分流水 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 结果 + */ + @Override + public int insertWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog) + { + wxUserIntegralLog.setCreateTime(DateUtils.getNowDate()); + return wxUserIntegralLogMapper.insertWxUserIntegralLog(wxUserIntegralLog); + } + + /** + * 修改微信用户积分流水 + * + * @param wxUserIntegralLog 微信用户积分流水 + * @return 结果 + */ + @Override + public int updateWxUserIntegralLog(WxUserIntegralLog wxUserIntegralLog) + { + return wxUserIntegralLogMapper.updateWxUserIntegralLog(wxUserIntegralLog); + } + + /** + * 批量删除微信用户积分流水 + * + * @param ids 需要删除的微信用户积分流水主键 + * @return 结果 + */ + @Override + public int deleteWxUserIntegralLogByIds(Long[] ids) + { + return wxUserIntegralLogMapper.deleteWxUserIntegralLogByIds(ids); + } + + /** + * 删除微信用户积分流水信息 + * + * @param id 微信用户积分流水主键 + * @return 结果 + */ + @Override + public int deleteWxUserIntegralLogById(Long id) + { + return wxUserIntegralLogMapper.deleteWxUserIntegralLogById(id); + } +} diff --git a/flossom-ui/src/api/system/integralLog.js b/flossom-ui/src/api/system/integralLog.js new file mode 100644 index 0000000..bcdc925 --- /dev/null +++ b/flossom-ui/src/api/system/integralLog.js @@ -0,0 +1,44 @@ +import request from '@/utils/request' + +// 查询微信用户积分流水列表 +export function listLog(query) { + return request({ + url: '/system/integralLog/list', + method: 'get', + params: query + }) +} + +// 查询微信用户积分流水详细 +export function getLog(id) { + return request({ + url: '/system/integralLog/' + id, + method: 'get' + }) +} + +// 新增微信用户积分流水 +export function addLog(data) { + return request({ + url: '/system/integralLog', + method: 'post', + data: data + }) +} + +// 修改微信用户积分流水 +export function updateLog(data) { + return request({ + url: '/system/integralLog', + method: 'put', + data: data + }) +} + +// 删除微信用户积分流水 +export function delLog(id) { + return request({ + url: '/system/integralLog/' + id, + method: 'delete' + }) +} diff --git a/flossom-ui/src/views/system/integralLog/index.vue b/flossom-ui/src/views/system/integralLog/index.vue new file mode 100644 index 0000000..e6cb29d --- /dev/null +++ b/flossom-ui/src/views/system/integralLog/index.vue @@ -0,0 +1,311 @@ + + +