用户钱包,用户反馈
This commit is contained in:
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.baseUser.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUserFeedback;
|
||||
import com.ruoyi.baseUser.service.IZcBaseUserFeedbackService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户反馈Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseUser/feedback")
|
||||
public class ZcBaseUserFeedbackController extends BaseController
|
||||
{
|
||||
private String prefix = "baseUser/feedback";
|
||||
|
||||
@Autowired
|
||||
private IZcBaseUserFeedbackService zcBaseUserFeedbackService;
|
||||
|
||||
@RequiresPermissions("baseUser:feedback:view")
|
||||
@GetMapping()
|
||||
public String feedback()
|
||||
{
|
||||
return prefix + "/feedback";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户反馈列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:feedback:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
startPage();
|
||||
List<ZcBaseUserFeedback> list = zcBaseUserFeedbackService.selectZcBaseUserFeedbackList(zcBaseUserFeedback);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户反馈列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:feedback:export")
|
||||
@Log(title = "用户反馈", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
List<ZcBaseUserFeedback> list = zcBaseUserFeedbackService.selectZcBaseUserFeedbackList(zcBaseUserFeedback);
|
||||
ExcelUtil<ZcBaseUserFeedback> util = new ExcelUtil<ZcBaseUserFeedback>(ZcBaseUserFeedback.class);
|
||||
return util.exportExcel(list, "用户反馈数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户反馈
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存用户反馈
|
||||
*/
|
||||
@RequiresPermissions("baseUser:feedback:add")
|
||||
@Log(title = "用户反馈", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
return toAjax(zcBaseUserFeedbackService.insertZcBaseUserFeedback(zcBaseUserFeedback));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户反馈
|
||||
*/
|
||||
@RequiresPermissions("baseUser:feedback:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ZcBaseUserFeedback zcBaseUserFeedback = zcBaseUserFeedbackService.selectZcBaseUserFeedbackById(id);
|
||||
mmap.put("zcBaseUserFeedback", zcBaseUserFeedback);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存用户反馈
|
||||
*/
|
||||
@RequiresPermissions("baseUser:feedback:edit")
|
||||
@Log(title = "用户反馈", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
return toAjax(zcBaseUserFeedbackService.updateZcBaseUserFeedback(zcBaseUserFeedback));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户反馈
|
||||
*/
|
||||
@RequiresPermissions("baseUser:feedback:remove")
|
||||
@Log(title = "用户反馈", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcBaseUserFeedbackService.deleteZcBaseUserFeedbackByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,127 @@
|
||||
package com.ruoyi.baseUser.controller;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWallet;
|
||||
import com.ruoyi.baseUser.service.IZcBaseWalletService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 钱包信息Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/baseUser/wallet")
|
||||
public class ZcBaseWalletController extends BaseController
|
||||
{
|
||||
private String prefix = "baseUser/wallet";
|
||||
|
||||
@Autowired
|
||||
private IZcBaseWalletService zcBaseWalletService;
|
||||
|
||||
@RequiresPermissions("baseUser:wallet:view")
|
||||
@GetMapping()
|
||||
public String wallet()
|
||||
{
|
||||
return prefix + "/wallet";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:wallet:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
startPage();
|
||||
List<ZcBaseWallet> list = zcBaseWalletService.selectZcBaseWalletList(zcBaseWallet);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出钱包信息列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:wallet:export")
|
||||
@Log(title = "钱包信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
List<ZcBaseWallet> list = zcBaseWalletService.selectZcBaseWalletList(zcBaseWallet);
|
||||
ExcelUtil<ZcBaseWallet> util = new ExcelUtil<ZcBaseWallet>(ZcBaseWallet.class);
|
||||
return util.exportExcel(list, "钱包信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包信息
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存钱包信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:wallet:add")
|
||||
@Log(title = "钱包信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
return toAjax(zcBaseWalletService.insertZcBaseWallet(zcBaseWallet));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:wallet:edit")
|
||||
@GetMapping("/edit/{userId}")
|
||||
public String edit(@PathVariable("userId") Long userId, ModelMap mmap)
|
||||
{
|
||||
ZcBaseWallet zcBaseWallet = zcBaseWalletService.selectZcBaseWalletByUserId(userId);
|
||||
mmap.put("zcBaseWallet", zcBaseWallet);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存钱包信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:wallet:edit")
|
||||
@Log(title = "钱包信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
return toAjax(zcBaseWalletService.updateZcBaseWallet(zcBaseWallet));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包信息
|
||||
*/
|
||||
@RequiresPermissions("baseUser:wallet:remove")
|
||||
@Log(title = "钱包信息", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcBaseWalletService.deleteZcBaseWalletByUserIds(ids));
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,107 @@
|
||||
package com.ruoyi.baseUser.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 用户反馈对象 zc_base_user_feedback
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public class ZcBaseUserFeedback extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id主键 */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
private Long userId;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
/** 反馈内容 */
|
||||
@Excel(name = "反馈内容")
|
||||
private String feedbackContent;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setPhoneNumber(String phoneNumber)
|
||||
{
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getPhoneNumber()
|
||||
{
|
||||
return phoneNumber;
|
||||
}
|
||||
public void setFeedbackContent(String feedbackContent)
|
||||
{
|
||||
this.feedbackContent = feedbackContent;
|
||||
}
|
||||
|
||||
public String getFeedbackContent()
|
||||
{
|
||||
return feedbackContent;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("phoneNumber", getPhoneNumber())
|
||||
.append("feedbackContent", getFeedbackContent())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,138 @@
|
||||
package com.ruoyi.baseUser.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 钱包信息对象 zc_base_wallet
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public class ZcBaseWallet extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 用户id主键 */
|
||||
private Long userId;
|
||||
|
||||
/** 用户名 */
|
||||
@Excel(name = "用户名")
|
||||
private String userName;
|
||||
|
||||
/** 手机号 */
|
||||
@Excel(name = "手机号")
|
||||
private String phoneNumber;
|
||||
|
||||
/** 余额(元) */
|
||||
@Excel(name = "余额(元)")
|
||||
private BigDecimal balance;
|
||||
|
||||
/** 可用金额(元) */
|
||||
@Excel(name = "可用金额(元)")
|
||||
private BigDecimal availableAmount;
|
||||
|
||||
/** 冻结金额(元) */
|
||||
@Excel(name = "冻结金额(元)")
|
||||
private BigDecimal freezeAmount;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
/** 钱包变更记录信息 */
|
||||
private List<ZcBaseWalletChange> zcBaseWalletChangeList;
|
||||
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setUserName(String userName)
|
||||
{
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getUserName()
|
||||
{
|
||||
return userName;
|
||||
}
|
||||
public void setPhoneNumber(String phoneNumber)
|
||||
{
|
||||
this.phoneNumber = phoneNumber;
|
||||
}
|
||||
|
||||
public String getPhoneNumber()
|
||||
{
|
||||
return phoneNumber;
|
||||
}
|
||||
public void setBalance(BigDecimal balance)
|
||||
{
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
public BigDecimal getBalance()
|
||||
{
|
||||
return balance;
|
||||
}
|
||||
public void setAvailableAmount(BigDecimal availableAmount)
|
||||
{
|
||||
this.availableAmount = availableAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getAvailableAmount()
|
||||
{
|
||||
return availableAmount;
|
||||
}
|
||||
public void setFreezeAmount(BigDecimal freezeAmount)
|
||||
{
|
||||
this.freezeAmount = freezeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getFreezeAmount()
|
||||
{
|
||||
return freezeAmount;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public List<ZcBaseWalletChange> getZcBaseWalletChangeList()
|
||||
{
|
||||
return zcBaseWalletChangeList;
|
||||
}
|
||||
|
||||
public void setZcBaseWalletChangeList(List<ZcBaseWalletChange> zcBaseWalletChangeList)
|
||||
{
|
||||
this.zcBaseWalletChangeList = zcBaseWalletChangeList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("userId", getUserId())
|
||||
.append("userName", getUserName())
|
||||
.append("phoneNumber", getPhoneNumber())
|
||||
.append("balance", getBalance())
|
||||
.append("availableAmount", getAvailableAmount())
|
||||
.append("freezeAmount", getFreezeAmount())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("zcBaseWalletChangeList", getZcBaseWalletChangeList())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,140 @@
|
||||
package com.ruoyi.baseUser.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 钱包变更记录对象 zc_base_wallet_change
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public class ZcBaseWalletChange extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id主键 */
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
private Long userId;
|
||||
|
||||
/** 变更类型 */
|
||||
@Excel(name = "变更类型")
|
||||
private String changeType;
|
||||
|
||||
/** 支付类型 */
|
||||
@Excel(name = "支付类型")
|
||||
private String payType;
|
||||
|
||||
/** 变更时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "变更时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date changeTime;
|
||||
|
||||
/** 变更金额(元) */
|
||||
@Excel(name = "变更金额(元)")
|
||||
private BigDecimal changeAmount;
|
||||
|
||||
/** 引荐订单 */
|
||||
@Excel(name = "引荐订单")
|
||||
private String referralOrderNo;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
private String delFlag;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setChangeType(String changeType)
|
||||
{
|
||||
this.changeType = changeType;
|
||||
}
|
||||
|
||||
public String getChangeType()
|
||||
{
|
||||
return changeType;
|
||||
}
|
||||
public void setPayType(String payType)
|
||||
{
|
||||
this.payType = payType;
|
||||
}
|
||||
|
||||
public String getPayType()
|
||||
{
|
||||
return payType;
|
||||
}
|
||||
public void setChangeTime(Date changeTime)
|
||||
{
|
||||
this.changeTime = changeTime;
|
||||
}
|
||||
|
||||
public Date getChangeTime()
|
||||
{
|
||||
return changeTime;
|
||||
}
|
||||
public void setChangeAmount(BigDecimal changeAmount)
|
||||
{
|
||||
this.changeAmount = changeAmount;
|
||||
}
|
||||
|
||||
public BigDecimal getChangeAmount()
|
||||
{
|
||||
return changeAmount;
|
||||
}
|
||||
public void setReferralOrderNo(String referralOrderNo)
|
||||
{
|
||||
this.referralOrderNo = referralOrderNo;
|
||||
}
|
||||
|
||||
public String getReferralOrderNo()
|
||||
{
|
||||
return referralOrderNo;
|
||||
}
|
||||
public void setDelFlag(String delFlag)
|
||||
{
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getDelFlag()
|
||||
{
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("userId", getUserId())
|
||||
.append("changeType", getChangeType())
|
||||
.append("payType", getPayType())
|
||||
.append("changeTime", getChangeTime())
|
||||
.append("changeAmount", getChangeAmount())
|
||||
.append("referralOrderNo", getReferralOrderNo())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUserFeedback;
|
||||
|
||||
/**
|
||||
* 用户反馈Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public interface ZcBaseUserFeedbackMapper
|
||||
{
|
||||
/**
|
||||
* 查询用户反馈
|
||||
*
|
||||
* @param id 用户反馈主键
|
||||
* @return 用户反馈
|
||||
*/
|
||||
public ZcBaseUserFeedback selectZcBaseUserFeedbackById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户反馈列表
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 用户反馈集合
|
||||
*/
|
||||
public List<ZcBaseUserFeedback> selectZcBaseUserFeedbackList(ZcBaseUserFeedback zcBaseUserFeedback);
|
||||
|
||||
/**
|
||||
* 新增用户反馈
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseUserFeedback(ZcBaseUserFeedback zcBaseUserFeedback);
|
||||
|
||||
/**
|
||||
* 修改用户反馈
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseUserFeedback(ZcBaseUserFeedback zcBaseUserFeedback);
|
||||
|
||||
/**
|
||||
* 删除用户反馈
|
||||
*
|
||||
* @param id 用户反馈主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserFeedbackById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除用户反馈
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserFeedbackByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,87 @@
|
||||
package com.ruoyi.baseUser.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWallet;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWalletChange;
|
||||
|
||||
/**
|
||||
* 钱包信息Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public interface ZcBaseWalletMapper
|
||||
{
|
||||
/**
|
||||
* 查询钱包信息
|
||||
*
|
||||
* @param userId 钱包信息主键
|
||||
* @return 钱包信息
|
||||
*/
|
||||
public ZcBaseWallet selectZcBaseWalletByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询钱包信息列表
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 钱包信息集合
|
||||
*/
|
||||
public List<ZcBaseWallet> selectZcBaseWalletList(ZcBaseWallet zcBaseWallet);
|
||||
|
||||
/**
|
||||
* 新增钱包信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseWallet(ZcBaseWallet zcBaseWallet);
|
||||
|
||||
/**
|
||||
* 修改钱包信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseWallet(ZcBaseWallet zcBaseWallet);
|
||||
|
||||
/**
|
||||
* 删除钱包信息
|
||||
*
|
||||
* @param userId 钱包信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 批量删除钱包信息
|
||||
*
|
||||
* @param userIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletByUserIds(String[] userIds);
|
||||
|
||||
/**
|
||||
* 批量删除钱包变更记录
|
||||
*
|
||||
* @param userIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletChangeByUserIds(String[] userIds);
|
||||
|
||||
/**
|
||||
* 批量新增钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChangeList 钱包变更记录列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchZcBaseWalletChange(List<ZcBaseWalletChange> zcBaseWalletChangeList);
|
||||
|
||||
|
||||
/**
|
||||
* 通过钱包信息主键删除钱包变更记录信息
|
||||
*
|
||||
* @param userId 钱包信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletChangeByUserId(Long userId);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUserFeedback;
|
||||
|
||||
/**
|
||||
* 用户反馈Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public interface IZcBaseUserFeedbackService
|
||||
{
|
||||
/**
|
||||
* 查询用户反馈
|
||||
*
|
||||
* @param id 用户反馈主键
|
||||
* @return 用户反馈
|
||||
*/
|
||||
public ZcBaseUserFeedback selectZcBaseUserFeedbackById(Long id);
|
||||
|
||||
/**
|
||||
* 查询用户反馈列表
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 用户反馈集合
|
||||
*/
|
||||
public List<ZcBaseUserFeedback> selectZcBaseUserFeedbackList(ZcBaseUserFeedback zcBaseUserFeedback);
|
||||
|
||||
/**
|
||||
* 新增用户反馈
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseUserFeedback(ZcBaseUserFeedback zcBaseUserFeedback);
|
||||
|
||||
/**
|
||||
* 修改用户反馈
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseUserFeedback(ZcBaseUserFeedback zcBaseUserFeedback);
|
||||
|
||||
/**
|
||||
* 批量删除用户反馈
|
||||
*
|
||||
* @param ids 需要删除的用户反馈主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserFeedbackByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除用户反馈信息
|
||||
*
|
||||
* @param id 用户反馈主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseUserFeedbackById(Long id);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWallet;
|
||||
|
||||
/**
|
||||
* 钱包信息Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public interface IZcBaseWalletService
|
||||
{
|
||||
/**
|
||||
* 查询钱包信息
|
||||
*
|
||||
* @param userId 钱包信息主键
|
||||
* @return 钱包信息
|
||||
*/
|
||||
public ZcBaseWallet selectZcBaseWalletByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询钱包信息列表
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 钱包信息集合
|
||||
*/
|
||||
public List<ZcBaseWallet> selectZcBaseWalletList(ZcBaseWallet zcBaseWallet);
|
||||
|
||||
/**
|
||||
* 新增钱包信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseWallet(ZcBaseWallet zcBaseWallet);
|
||||
|
||||
/**
|
||||
* 修改钱包信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseWallet(ZcBaseWallet zcBaseWallet);
|
||||
|
||||
/**
|
||||
* 批量删除钱包信息
|
||||
*
|
||||
* @param userIds 需要删除的钱包信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletByUserIds(String userIds);
|
||||
|
||||
/**
|
||||
* 删除钱包信息信息
|
||||
*
|
||||
* @param userId 钱包信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletByUserId(Long userId);
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.baseUser.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.baseUser.mapper.ZcBaseUserFeedbackMapper;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseUserFeedback;
|
||||
import com.ruoyi.baseUser.service.IZcBaseUserFeedbackService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 用户反馈Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
@Service
|
||||
public class ZcBaseUserFeedbackServiceImpl implements IZcBaseUserFeedbackService
|
||||
{
|
||||
@Autowired
|
||||
private ZcBaseUserFeedbackMapper zcBaseUserFeedbackMapper;
|
||||
|
||||
/**
|
||||
* 查询用户反馈
|
||||
*
|
||||
* @param id 用户反馈主键
|
||||
* @return 用户反馈
|
||||
*/
|
||||
@Override
|
||||
public ZcBaseUserFeedback selectZcBaseUserFeedbackById(Long id)
|
||||
{
|
||||
return zcBaseUserFeedbackMapper.selectZcBaseUserFeedbackById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户反馈列表
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 用户反馈
|
||||
*/
|
||||
@Override
|
||||
public List<ZcBaseUserFeedback> selectZcBaseUserFeedbackList(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
return zcBaseUserFeedbackMapper.selectZcBaseUserFeedbackList(zcBaseUserFeedback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户反馈
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZcBaseUserFeedback(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
zcBaseUserFeedback.setCreateTime(DateUtils.getNowDate());
|
||||
return zcBaseUserFeedbackMapper.insertZcBaseUserFeedback(zcBaseUserFeedback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户反馈
|
||||
*
|
||||
* @param zcBaseUserFeedback 用户反馈
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZcBaseUserFeedback(ZcBaseUserFeedback zcBaseUserFeedback)
|
||||
{
|
||||
zcBaseUserFeedback.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcBaseUserFeedbackMapper.updateZcBaseUserFeedback(zcBaseUserFeedback);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除用户反馈
|
||||
*
|
||||
* @param ids 需要删除的用户反馈主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcBaseUserFeedbackByIds(String ids)
|
||||
{
|
||||
return zcBaseUserFeedbackMapper.deleteZcBaseUserFeedbackByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户反馈信息
|
||||
*
|
||||
* @param id 用户反馈主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcBaseUserFeedbackById(Long id)
|
||||
{
|
||||
return zcBaseUserFeedbackMapper.deleteZcBaseUserFeedbackById(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,135 @@
|
||||
package com.ruoyi.baseUser.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.ArrayList;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWalletChange;
|
||||
import com.ruoyi.baseUser.mapper.ZcBaseWalletMapper;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWallet;
|
||||
import com.ruoyi.baseUser.service.IZcBaseWalletService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 钱包信息Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
@Service
|
||||
public class ZcBaseWalletServiceImpl implements IZcBaseWalletService
|
||||
{
|
||||
@Autowired
|
||||
private ZcBaseWalletMapper zcBaseWalletMapper;
|
||||
|
||||
/**
|
||||
* 查询钱包信息
|
||||
*
|
||||
* @param userId 钱包信息主键
|
||||
* @return 钱包信息
|
||||
*/
|
||||
@Override
|
||||
public ZcBaseWallet selectZcBaseWalletByUserId(Long userId)
|
||||
{
|
||||
return zcBaseWalletMapper.selectZcBaseWalletByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包信息列表
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 钱包信息
|
||||
*/
|
||||
@Override
|
||||
public List<ZcBaseWallet> selectZcBaseWalletList(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
return zcBaseWalletMapper.selectZcBaseWalletList(zcBaseWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int insertZcBaseWallet(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
zcBaseWallet.setCreateTime(DateUtils.getNowDate());
|
||||
int rows = zcBaseWalletMapper.insertZcBaseWallet(zcBaseWallet);
|
||||
insertZcBaseWalletChange(zcBaseWallet);
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int updateZcBaseWallet(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
zcBaseWallet.setUpdateTime(DateUtils.getNowDate());
|
||||
zcBaseWalletMapper.deleteZcBaseWalletChangeByUserId(zcBaseWallet.getUserId());
|
||||
insertZcBaseWalletChange(zcBaseWallet);
|
||||
return zcBaseWalletMapper.updateZcBaseWallet(zcBaseWallet);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除钱包信息
|
||||
*
|
||||
* @param userIds 需要删除的钱包信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteZcBaseWalletByUserIds(String userIds)
|
||||
{
|
||||
zcBaseWalletMapper.deleteZcBaseWalletChangeByUserIds(Convert.toStrArray(userIds));
|
||||
return zcBaseWalletMapper.deleteZcBaseWalletByUserIds(Convert.toStrArray(userIds));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包信息信息
|
||||
*
|
||||
* @param userId 钱包信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional
|
||||
@Override
|
||||
public int deleteZcBaseWalletByUserId(Long userId)
|
||||
{
|
||||
zcBaseWalletMapper.deleteZcBaseWalletChangeByUserId(userId);
|
||||
return zcBaseWalletMapper.deleteZcBaseWalletByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包变更记录信息
|
||||
*
|
||||
* @param zcBaseWallet 钱包信息对象
|
||||
*/
|
||||
public void insertZcBaseWalletChange(ZcBaseWallet zcBaseWallet)
|
||||
{
|
||||
List<ZcBaseWalletChange> zcBaseWalletChangeList = zcBaseWallet.getZcBaseWalletChangeList();
|
||||
Long userId = zcBaseWallet.getUserId();
|
||||
if (StringUtils.isNotNull(zcBaseWalletChangeList))
|
||||
{
|
||||
List<ZcBaseWalletChange> list = new ArrayList<ZcBaseWalletChange>();
|
||||
for (ZcBaseWalletChange zcBaseWalletChange : zcBaseWalletChangeList)
|
||||
{
|
||||
zcBaseWalletChange.setUserId(userId);
|
||||
list.add(zcBaseWalletChange);
|
||||
}
|
||||
if (list.size() > 0)
|
||||
{
|
||||
zcBaseWalletMapper.batchZcBaseWalletChange(list);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.baseUser.mapper.ZcBaseUserFeedbackMapper">
|
||||
|
||||
<resultMap type="ZcBaseUserFeedback" id="ZcBaseUserFeedbackResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="phoneNumber" column="phone_number" />
|
||||
<result property="feedbackContent" column="feedback_content" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcBaseUserFeedbackVo">
|
||||
select id, user_id, user_name, phone_number, feedback_content, del_flag, create_time, update_time from zc_base_user_feedback
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseUserFeedbackList" parameterType="ZcBaseUserFeedback" resultMap="ZcBaseUserFeedbackResult">
|
||||
<include refid="selectZcBaseUserFeedbackVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''"> and feedback_content = #{feedbackContent}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseUserFeedbackById" parameterType="Long" resultMap="ZcBaseUserFeedbackResult">
|
||||
<include refid="selectZcBaseUserFeedbackVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcBaseUserFeedback" parameterType="ZcBaseUserFeedback" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zc_base_user_feedback
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number,</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''">feedback_content,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''">#{feedbackContent},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcBaseUserFeedback" parameterType="ZcBaseUserFeedback">
|
||||
update zc_base_user_feedback
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number = #{phoneNumber},</if>
|
||||
<if test="feedbackContent != null and feedbackContent != ''">feedback_content = #{feedbackContent},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcBaseUserFeedbackById" parameterType="Long">
|
||||
delete from zc_base_user_feedback where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseUserFeedbackByIds" parameterType="String">
|
||||
delete from zc_base_user_feedback where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.baseUser.mapper.ZcBaseWalletMapper">
|
||||
|
||||
<resultMap type="ZcBaseWallet" id="ZcBaseWalletResult">
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="phoneNumber" column="phone_number" />
|
||||
<result property="balance" column="balance" />
|
||||
<result property="availableAmount" column="available_amount" />
|
||||
<result property="freezeAmount" column="freeze_amount" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ZcBaseWalletZcBaseWalletChangeResult" type="ZcBaseWallet" extends="ZcBaseWalletResult">
|
||||
<collection property="zcBaseWalletChangeList" notNullColumn="sub_id" javaType="java.util.List" resultMap="ZcBaseWalletChangeResult" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="ZcBaseWalletChange" id="ZcBaseWalletChangeResult">
|
||||
<result property="id" column="sub_id" />
|
||||
<result property="userId" column="sub_user_id" />
|
||||
<result property="changeType" column="sub_change_type" />
|
||||
<result property="payType" column="sub_pay_type" />
|
||||
<result property="changeTime" column="sub_change_time" />
|
||||
<result property="changeAmount" column="sub_change_amount" />
|
||||
<result property="referralOrderNo" column="sub_referral_order_no" />
|
||||
<result property="delFlag" column="sub_del_flag" />
|
||||
<result property="createTime" column="sub_create_time" />
|
||||
<result property="updateTime" column="sub_update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcBaseWalletVo">
|
||||
select user_id, user_name, phone_number, balance, available_amount, freeze_amount, del_flag, create_time, update_time from zc_base_wallet
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseWalletList" parameterType="ZcBaseWallet" resultMap="ZcBaseWalletResult">
|
||||
<include refid="selectZcBaseWalletVo"/>
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''"> and phone_number = #{phoneNumber}</if>
|
||||
<if test="balance != null "> and balance = #{balance}</if>
|
||||
<if test="availableAmount != null "> and available_amount = #{availableAmount}</if>
|
||||
<if test="freezeAmount != null "> and freeze_amount = #{freezeAmount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseWalletByUserId" parameterType="Long" resultMap="ZcBaseWalletZcBaseWalletChangeResult">
|
||||
select a.user_id, a.user_name, a.phone_number, a.balance, a.available_amount, a.freeze_amount, a.del_flag, a.create_time, a.update_time,
|
||||
b.id as sub_id, b.user_id as sub_user_id, b.change_type as sub_change_type, b.pay_type as sub_pay_type, b.change_time as sub_change_time, b.change_amount as sub_change_amount, b.referral_order_no as sub_referral_order_no, b.del_flag as sub_del_flag, b.create_time as sub_create_time, b.update_time as sub_update_time
|
||||
from zc_base_wallet a
|
||||
left join zc_base_wallet_change b on b.user_id = a.user_id
|
||||
where a.user_id = #{userId}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcBaseWallet" parameterType="ZcBaseWallet" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into zc_base_wallet
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number,</if>
|
||||
<if test="balance != null">balance,</if>
|
||||
<if test="availableAmount != null">available_amount,</if>
|
||||
<if test="freezeAmount != null">freeze_amount,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">#{phoneNumber},</if>
|
||||
<if test="balance != null">#{balance},</if>
|
||||
<if test="availableAmount != null">#{availableAmount},</if>
|
||||
<if test="freezeAmount != null">#{freezeAmount},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcBaseWallet" parameterType="ZcBaseWallet">
|
||||
update zc_base_wallet
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="phoneNumber != null and phoneNumber != ''">phone_number = #{phoneNumber},</if>
|
||||
<if test="balance != null">balance = #{balance},</if>
|
||||
<if test="availableAmount != null">available_amount = #{availableAmount},</if>
|
||||
<if test="freezeAmount != null">freeze_amount = #{freezeAmount},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZcBaseWalletByUserId" parameterType="Long">
|
||||
delete from zc_base_wallet where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletByUserIds" parameterType="String">
|
||||
delete from zc_base_wallet where user_id in
|
||||
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletChangeByUserIds" parameterType="String">
|
||||
delete from zc_base_wallet_change where user_id in
|
||||
<foreach item="userId" collection="array" open="(" separator="," close=")">
|
||||
#{userId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletChangeByUserId" parameterType="Long">
|
||||
delete from zc_base_wallet_change where user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
<insert id="batchZcBaseWalletChange">
|
||||
insert into zc_base_wallet_change( id, user_id, change_type, pay_type, change_time, change_amount, referral_order_no, del_flag, create_time, update_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.id}, #{item.userId}, #{item.changeType}, #{item.payType}, #{item.changeTime}, #{item.changeAmount}, #{item.referralOrderNo}, #{item.delFlag}, #{item.createTime}, #{item.updateTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增用户反馈')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-feedback-add">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userId" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">反馈内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" name="feedbackContent">
|
||||
<div class="summernote" id="feedbackContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/feedback"
|
||||
$("#form-feedback-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-feedback-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('.summernote').summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改用户反馈')" />
|
||||
<th:block th:include="include :: summernote-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-feedback-edit" th:object="${zcBaseUserFeedback}">
|
||||
<input name="id" th:field="*{id}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户id:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userId" th:field="*{userId}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" th:field="*{userName}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" th:field="*{phoneNumber}" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">反馈内容:</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="hidden" class="form-control" th:field="*{feedbackContent}">
|
||||
<div class="summernote" id="feedbackContent"></div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: summernote-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/feedback";
|
||||
$("#form-feedback-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-feedback-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
$('.summernote').each(function(i) {
|
||||
$('#' + this.id).summernote({
|
||||
lang: 'zh-CN',
|
||||
dialogsInBody: true,
|
||||
callbacks: {
|
||||
onChange: function(contents, $edittable) {
|
||||
$("input[name='" + this.id + "']").val(contents);
|
||||
},
|
||||
onImageUpload: function(files) {
|
||||
var obj = this;
|
||||
var data = new FormData();
|
||||
data.append("file", files[0]);
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: ctx + "common/upload",
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
dataType: 'json',
|
||||
success: function(result) {
|
||||
if (result.code == web_status.SUCCESS) {
|
||||
$('#' + obj.id).summernote('insertImage', result.url);
|
||||
} else {
|
||||
$.modal.alertError(result.msg);
|
||||
}
|
||||
},
|
||||
error: function(error) {
|
||||
$.modal.alertWarning("图片上传失败。");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var content = $("input[name='" + this.id + "']").val();
|
||||
$('#' + this.id).summernote('code', content);
|
||||
})
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,98 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('用户反馈列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
<input type="text" name="userName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>手机号:</label>
|
||||
<input type="text" name="phoneNumber"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseUser:feedback:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:feedback:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:feedback:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:feedback:export">
|
||||
<i class="fa fa-download"></i> 导出
|
||||
</a>
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseUser:feedback:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseUser:feedback:remove')}]];
|
||||
var prefix = ctx + "baseUser/feedback";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "用户反馈",
|
||||
columns: [
|
||||
{
|
||||
field: 'id',
|
||||
title: 'id主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名',
|
||||
width: '260'
|
||||
},
|
||||
{
|
||||
field: 'phoneNumber',
|
||||
title: '手机号',
|
||||
width: '260'
|
||||
},
|
||||
{
|
||||
field: 'feedbackContent',
|
||||
title: '反馈内容'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '100',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -66,9 +66,7 @@
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "用户引荐",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
field: 'id',
|
||||
title: 'id主键',
|
||||
|
||||
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增钱包信息')" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-wallet-add">
|
||||
<h4 class="form-header h4">钱包信息信息</h4>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="userName" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="phoneNumber" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">余额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="balance" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">可用金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="availableAmount" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">冻结金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="freezeAmount" class="form-control" type="text" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">删除标志:</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="delFlag" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="form-header h4">钱包变更记录信息</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="addRow()"><i class="fa fa-plus"> 增加</i></button>
|
||||
<button type="button" class="btn btn-white btn-sm" onclick="sub.delRow()"><i class="fa fa-minus"> 删除</i></button>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/wallet"
|
||||
$("#form-wallet-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-wallet-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeType',
|
||||
align: 'center',
|
||||
title: '变更类型',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].changeType' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'payType',
|
||||
align: 'center',
|
||||
title: '支付类型',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].payType' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeTime',
|
||||
align: 'center',
|
||||
title: '变更时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].changeTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeAmount',
|
||||
align: 'center',
|
||||
title: '变更金额(元)',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].changeAmount' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'referralOrderNo',
|
||||
align: 'center',
|
||||
title: '引荐订单',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].referralOrderNo' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'delFlag',
|
||||
align: 'center',
|
||||
title: '删除标志',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].delFlag' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '创建时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].createTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间',
|
||||
formatter: function(value, row, index) {
|
||||
var html = $.common.sprintf("<input class='form-control' type='text' name='zcBaseWalletChangeList[%s].updateTime' value='%s'>", index, value);
|
||||
return html;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var value = $.common.isNotEmpty(row.index) ? row.index : $.table.serialNumber(index);
|
||||
return '<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="sub.delRowByIndex(\'' + value + '\')"><i class="fa fa-remove"></i>删除</a>';
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
changeType: "",
|
||||
payType: "",
|
||||
changeTime: "",
|
||||
changeAmount: "",
|
||||
referralOrderNo: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,162 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('钱包信息')" />
|
||||
<style>
|
||||
.search-collapse, .select-table {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
border-radius: 6px;
|
||||
margin-top: 0px;
|
||||
padding-top: 0px;
|
||||
padding-bottom: 13px;
|
||||
box-shadow: 1px 1px 3px rgba(0, 0, 0, .2);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-wallet-edit" th:object="${zcBaseWallet}">
|
||||
<h4 class="form-header h4">钱包信息</h4>
|
||||
<input name="userId" th:field="*{userId}" type="hidden">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">用户名:</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{userName}"></div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-required">手机号:</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{phoneNumber}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">余额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{balance}"></div>
|
||||
</div>
|
||||
<label class="col-sm-2 control-label is-required">可用金额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{availableAmount}"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label is-required">冻结金额(元):</label>
|
||||
<div class="col-sm-4">
|
||||
<div class="form-control-static" th:text="*{freezeAmount}"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h4 class="form-header h4">钱包变更记录</h4>
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/wallet";
|
||||
var changeTypeDatas = [[${@dict.getType('key_wallet_change_type')}]];
|
||||
var payTypeDatas = [[${@dict.getType('key_wallet_pay_type')}]];
|
||||
$("#form-wallet-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-wallet-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
data: [[${zcBaseWallet.zcBaseWalletChangeList}]],
|
||||
pagination: false,
|
||||
showSearch: false,
|
||||
showRefresh: false,
|
||||
showToggle: false,
|
||||
showColumns: false,
|
||||
sidePagination: "client",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'index',
|
||||
align: 'center',
|
||||
title: "序号",
|
||||
formatter: function (value, row, index) {
|
||||
var columnIndex = $.common.sprintf("<input type='hidden' name='index' value='%s'>", $.table.serialNumber(index));
|
||||
return columnIndex + $.table.serialNumber(index);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeType',
|
||||
align: 'center',
|
||||
title: '变更类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(changeTypeDatas, value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'payType',
|
||||
align: 'center',
|
||||
title: '支付类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(payTypeDatas, value);
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'changeTime',
|
||||
align: 'center',
|
||||
title: '变更时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'changeAmount',
|
||||
align: 'center',
|
||||
title: '变更金额(元)'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'referralOrderNo',
|
||||
align: 'center',
|
||||
title: '引荐订单'
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
align: 'center',
|
||||
title: '操作时间'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
function addRow() {
|
||||
var count = $("#" + table.options.id).bootstrapTable('getData').length;
|
||||
var row = {
|
||||
index: $.table.serialNumber(count),
|
||||
changeType: "",
|
||||
payType: "",
|
||||
changeTime: "",
|
||||
changeAmount: "",
|
||||
referralOrderNo: "",
|
||||
delFlag: "",
|
||||
createTime: "",
|
||||
updateTime: "",
|
||||
}
|
||||
sub.addRow(row);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,107 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('钱包信息列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label>用户名:</label>
|
||||
<input type="text" name="userName"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>手机号:</label>
|
||||
<input type="text" name="phoneNumber"/>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
<!-- <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="baseUser:wallet:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:wallet:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:wallet:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:wallet:export">-->
|
||||
<!-- <i class="fa fa-download"></i> 导出-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var editFlag = [[${@permission.hasPermi('baseUser:wallet:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseUser:wallet:remove')}]];
|
||||
var prefix = ctx + "baseUser/wallet";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
detailUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "钱包信息",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'userId',
|
||||
title: '用户id主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户名'
|
||||
},
|
||||
{
|
||||
field: 'phoneNumber',
|
||||
title: '手机号'
|
||||
},
|
||||
{
|
||||
field: 'balance',
|
||||
title: '余额(元)'
|
||||
},
|
||||
{
|
||||
field: 'availableAmount',
|
||||
title: '可用金额(元)'
|
||||
},
|
||||
{
|
||||
field: 'freezeAmount',
|
||||
title: '冻结金额(元)'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs ' + editFlag + ' btnOption" href="javascript:void(0)" onClick="$.operate.detail(\''+row.userId+'\', 1300, 800)"><i class="fa fa-edit"></i>钱包明细</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user