租电订单
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.ZcBaseWalletChange;
|
||||
import com.ruoyi.baseUser.service.IZcBaseWalletChangeService;
|
||||
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/walletChange")
|
||||
public class ZcBaseWalletChangeController extends BaseController
|
||||
{
|
||||
private String prefix = "baseUser/walletChange";
|
||||
|
||||
@Autowired
|
||||
private IZcBaseWalletChangeService zcBaseWalletChangeService;
|
||||
|
||||
@RequiresPermissions("baseUser:walletChange:view")
|
||||
@GetMapping()
|
||||
public String walletChange()
|
||||
{
|
||||
return prefix + "/walletChange";
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包变更记录列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:walletChange:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
startPage();
|
||||
List<ZcBaseWalletChange> list = zcBaseWalletChangeService.selectZcBaseWalletChangeList(zcBaseWalletChange);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出钱包变更记录列表
|
||||
*/
|
||||
@RequiresPermissions("baseUser:walletChange:export")
|
||||
@Log(title = "钱包变更记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
@ResponseBody
|
||||
public AjaxResult export(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
List<ZcBaseWalletChange> list = zcBaseWalletChangeService.selectZcBaseWalletChangeList(zcBaseWalletChange);
|
||||
ExcelUtil<ZcBaseWalletChange> util = new ExcelUtil<ZcBaseWalletChange>(ZcBaseWalletChange.class);
|
||||
return util.exportExcel(list, "钱包变更记录数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包变更记录
|
||||
*/
|
||||
@GetMapping("/add")
|
||||
public String add()
|
||||
{
|
||||
return prefix + "/add";
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增保存钱包变更记录
|
||||
*/
|
||||
@RequiresPermissions("baseUser:walletChange:add")
|
||||
@Log(title = "钱包变更记录", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/add")
|
||||
@ResponseBody
|
||||
public AjaxResult addSave(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
return toAjax(zcBaseWalletChangeService.insertZcBaseWalletChange(zcBaseWalletChange));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包变更记录
|
||||
*/
|
||||
@RequiresPermissions("baseUser:walletChange:edit")
|
||||
@GetMapping("/edit/{id}")
|
||||
public String edit(@PathVariable("id") Long id, ModelMap mmap)
|
||||
{
|
||||
ZcBaseWalletChange zcBaseWalletChange = zcBaseWalletChangeService.selectZcBaseWalletChangeById(id);
|
||||
mmap.put("zcBaseWalletChange", zcBaseWalletChange);
|
||||
return prefix + "/edit";
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改保存钱包变更记录
|
||||
*/
|
||||
@RequiresPermissions("baseUser:walletChange:edit")
|
||||
@Log(title = "钱包变更记录", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult editSave(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
return toAjax(zcBaseWalletChangeService.updateZcBaseWalletChange(zcBaseWalletChange));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包变更记录
|
||||
*/
|
||||
@RequiresPermissions("baseUser:walletChange:remove")
|
||||
@Log(title = "钱包变更记录", businessType = BusinessType.DELETE)
|
||||
@PostMapping( "/remove")
|
||||
@ResponseBody
|
||||
public AjaxResult remove(String ids)
|
||||
{
|
||||
return toAjax(zcBaseWalletChangeService.deleteZcBaseWalletChangeByIds(ids));
|
||||
}
|
||||
}
|
||||
@ -7,6 +7,7 @@ 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;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
/**
|
||||
* 钱包变更记录对象 zc_base_wallet_change
|
||||
@ -22,15 +23,19 @@ public class ZcBaseWalletChange extends BaseEntity
|
||||
private Long id;
|
||||
|
||||
/** 用户id */
|
||||
@Excel(name = "用户id")
|
||||
|
||||
private Long userId;
|
||||
|
||||
@Transient
|
||||
@Excel(name = "用户")
|
||||
private String userName;
|
||||
|
||||
/** 变更类型 */
|
||||
@Excel(name = "变更类型")
|
||||
@Excel(name = "变更类型", dictType = "key_wallet_change_type")
|
||||
private String changeType;
|
||||
|
||||
/** 支付类型 */
|
||||
@Excel(name = "支付类型")
|
||||
@Excel(name = "支付类型", dictType = "key_wallet_pay_type")
|
||||
private String payType;
|
||||
|
||||
/** 变更时间 */
|
||||
@ -72,7 +77,15 @@ public class ZcBaseWalletChange extends BaseEntity
|
||||
this.changeType = changeType;
|
||||
}
|
||||
|
||||
public String getChangeType()
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getChangeType()
|
||||
{
|
||||
return changeType;
|
||||
}
|
||||
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWalletChange;
|
||||
|
||||
/**
|
||||
* 钱包变更记录Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public interface ZcBaseWalletChangeMapper
|
||||
{
|
||||
/**
|
||||
* 查询钱包变更记录
|
||||
*
|
||||
* @param id 钱包变更记录主键
|
||||
* @return 钱包变更记录
|
||||
*/
|
||||
public ZcBaseWalletChange selectZcBaseWalletChangeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询钱包变更记录列表
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 钱包变更记录集合
|
||||
*/
|
||||
public List<ZcBaseWalletChange> selectZcBaseWalletChangeList(ZcBaseWalletChange zcBaseWalletChange);
|
||||
|
||||
/**
|
||||
* 新增钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseWalletChange(ZcBaseWalletChange zcBaseWalletChange);
|
||||
|
||||
/**
|
||||
* 修改钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseWalletChange(ZcBaseWalletChange zcBaseWalletChange);
|
||||
|
||||
/**
|
||||
* 删除钱包变更记录
|
||||
*
|
||||
* @param id 钱包变更记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletChangeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除钱包变更记录
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletChangeByIds(String[] ids);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.baseUser.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWalletChange;
|
||||
|
||||
/**
|
||||
* 钱包变更记录Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
public interface IZcBaseWalletChangeService
|
||||
{
|
||||
/**
|
||||
* 查询钱包变更记录
|
||||
*
|
||||
* @param id 钱包变更记录主键
|
||||
* @return 钱包变更记录
|
||||
*/
|
||||
public ZcBaseWalletChange selectZcBaseWalletChangeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询钱包变更记录列表
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 钱包变更记录集合
|
||||
*/
|
||||
public List<ZcBaseWalletChange> selectZcBaseWalletChangeList(ZcBaseWalletChange zcBaseWalletChange);
|
||||
|
||||
/**
|
||||
* 新增钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZcBaseWalletChange(ZcBaseWalletChange zcBaseWalletChange);
|
||||
|
||||
/**
|
||||
* 修改钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZcBaseWalletChange(ZcBaseWalletChange zcBaseWalletChange);
|
||||
|
||||
/**
|
||||
* 批量删除钱包变更记录
|
||||
*
|
||||
* @param ids 需要删除的钱包变更记录主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletChangeByIds(String ids);
|
||||
|
||||
/**
|
||||
* 删除钱包变更记录信息
|
||||
*
|
||||
* @param id 钱包变更记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZcBaseWalletChangeById(Long id);
|
||||
}
|
||||
@ -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.ZcBaseWalletChangeMapper;
|
||||
import com.ruoyi.baseUser.domain.ZcBaseWalletChange;
|
||||
import com.ruoyi.baseUser.service.IZcBaseWalletChangeService;
|
||||
import com.ruoyi.common.core.text.Convert;
|
||||
|
||||
/**
|
||||
* 钱包变更记录Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-08-16
|
||||
*/
|
||||
@Service
|
||||
public class ZcBaseWalletChangeServiceImpl implements IZcBaseWalletChangeService
|
||||
{
|
||||
@Autowired
|
||||
private ZcBaseWalletChangeMapper zcBaseWalletChangeMapper;
|
||||
|
||||
/**
|
||||
* 查询钱包变更记录
|
||||
*
|
||||
* @param id 钱包变更记录主键
|
||||
* @return 钱包变更记录
|
||||
*/
|
||||
@Override
|
||||
public ZcBaseWalletChange selectZcBaseWalletChangeById(Long id)
|
||||
{
|
||||
return zcBaseWalletChangeMapper.selectZcBaseWalletChangeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询钱包变更记录列表
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 钱包变更记录
|
||||
*/
|
||||
@Override
|
||||
public List<ZcBaseWalletChange> selectZcBaseWalletChangeList(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
return zcBaseWalletChangeMapper.selectZcBaseWalletChangeList(zcBaseWalletChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZcBaseWalletChange(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
zcBaseWalletChange.setCreateTime(DateUtils.getNowDate());
|
||||
return zcBaseWalletChangeMapper.insertZcBaseWalletChange(zcBaseWalletChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改钱包变更记录
|
||||
*
|
||||
* @param zcBaseWalletChange 钱包变更记录
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZcBaseWalletChange(ZcBaseWalletChange zcBaseWalletChange)
|
||||
{
|
||||
zcBaseWalletChange.setUpdateTime(DateUtils.getNowDate());
|
||||
return zcBaseWalletChangeMapper.updateZcBaseWalletChange(zcBaseWalletChange);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除钱包变更记录
|
||||
*
|
||||
* @param ids 需要删除的钱包变更记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcBaseWalletChangeByIds(String ids)
|
||||
{
|
||||
return zcBaseWalletChangeMapper.deleteZcBaseWalletChangeByIds(Convert.toStrArray(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除钱包变更记录信息
|
||||
*
|
||||
* @param id 钱包变更记录主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZcBaseWalletChangeById(Long id)
|
||||
{
|
||||
return zcBaseWalletChangeMapper.deleteZcBaseWalletChangeById(id);
|
||||
}
|
||||
}
|
||||
@ -36,8 +36,9 @@ public class ZcOrderSubController extends BaseController
|
||||
|
||||
@RequiresPermissions("orders:orderSub:view")
|
||||
@GetMapping()
|
||||
public String orderSub()
|
||||
public String orderSub(ModelMap mmap, ZcOrderSub zcOrderSub)
|
||||
{
|
||||
mmap.put("zcOrderSub", zcOrderSub);
|
||||
return prefix + "/orderSub";
|
||||
}
|
||||
|
||||
|
||||
@ -22,15 +22,14 @@ public class ZcOrderSub extends BaseEntity
|
||||
private Long suborderId;
|
||||
|
||||
/** 关联的订单ID(外键) */
|
||||
@Excel(name = "关联的订单ID", readConverterExp = "外=键")
|
||||
private Long orderId;
|
||||
|
||||
/** 子订单编号 */
|
||||
@Excel(name = "子订单编号")
|
||||
@Excel(name = "订单编号")
|
||||
private String suborderNo;
|
||||
|
||||
/** 子订单类型(首租、续租、逾期、押金、租电等) */
|
||||
@Excel(name = "子订单类型", readConverterExp = "首=租、续租、逾期、押金、租电等")
|
||||
@Excel(name = "订单类型", dictType = "key_order_suborder_type")
|
||||
private String suborderType;
|
||||
|
||||
/** 订单金额 */
|
||||
@ -38,7 +37,7 @@ public class ZcOrderSub extends BaseEntity
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 支付方式 */
|
||||
@Excel(name = "支付方式")
|
||||
@Excel(name = "支付方式",dictType = "key_order_payment_method")
|
||||
private String paymentMethod;
|
||||
|
||||
/** 车架/电池编号 */
|
||||
@ -46,8 +45,8 @@ public class ZcOrderSub extends BaseEntity
|
||||
private String vinBatteryNo;
|
||||
|
||||
/** 订单产生时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "订单产生时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "订单产生时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createdAt;
|
||||
|
||||
/** 支付ID */
|
||||
@ -55,8 +54,8 @@ public class ZcOrderSub extends BaseEntity
|
||||
private String paymentId;
|
||||
|
||||
/** 实际支付时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "实际支付时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "实际支付时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date paidAt;
|
||||
|
||||
/** 删除标志(0代表存在 2代表删除) */
|
||||
|
||||
@ -0,0 +1,99 @@
|
||||
<?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.ZcBaseWalletChangeMapper">
|
||||
|
||||
<resultMap type="ZcBaseWalletChange" id="ZcBaseWalletChangeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="changeType" column="change_type" />
|
||||
<result property="payType" column="pay_type" />
|
||||
<result property="changeTime" column="change_time" />
|
||||
<result property="changeAmount" column="change_amount" />
|
||||
<result property="referralOrderNo" column="referral_order_no" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="userName" column="userName" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZcBaseWalletChangeVo">
|
||||
select id, user_id, change_type, pay_type, change_time, change_amount, referral_order_no, del_flag, create_time, update_time from zc_base_wallet_change
|
||||
</sql>
|
||||
|
||||
<select id="selectZcBaseWalletChangeList" parameterType="ZcBaseWalletChange" resultMap="ZcBaseWalletChangeResult">
|
||||
select a.id, a.user_id, a.change_type, a.pay_type, a.change_time, a.change_amount, a.referral_order_no, a.del_flag, a.create_time, a.update_time,
|
||||
b.user_name as userName
|
||||
from zc_base_wallet_change a
|
||||
left join zc_base_user b on a.user_id = b.id
|
||||
<where>
|
||||
<if test="userId != null "> and a.user_id = #{userId}</if>
|
||||
<if test="changeType != null and changeType != ''"> and a.change_type = #{changeType}</if>
|
||||
<if test="payType != null and payType != ''"> and a.pay_type = #{payType}</if>
|
||||
<if test="changeTime != null "> and a.change_time = #{changeTime}</if>
|
||||
<if test="changeAmount != null "> and a.change_amount = #{changeAmount}</if>
|
||||
<if test="referralOrderNo != null and referralOrderNo != ''"> and a.referral_order_no = #{referralOrderNo}</if>
|
||||
<if test="userName != null and userName != ''"> and b.user_name = #{userName}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZcBaseWalletChangeById" parameterType="Long" resultMap="ZcBaseWalletChangeResult">
|
||||
<include refid="selectZcBaseWalletChangeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZcBaseWalletChange" parameterType="ZcBaseWalletChange" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zc_base_wallet_change
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="changeType != null and changeType != ''">change_type,</if>
|
||||
<if test="payType != null and payType != ''">pay_type,</if>
|
||||
<if test="changeTime != null">change_time,</if>
|
||||
<if test="changeAmount != null">change_amount,</if>
|
||||
<if test="referralOrderNo != null">referral_order_no,</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="changeType != null and changeType != ''">#{changeType},</if>
|
||||
<if test="payType != null and payType != ''">#{payType},</if>
|
||||
<if test="changeTime != null">#{changeTime},</if>
|
||||
<if test="changeAmount != null">#{changeAmount},</if>
|
||||
<if test="referralOrderNo != null">#{referralOrderNo},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZcBaseWalletChange" parameterType="ZcBaseWalletChange">
|
||||
update zc_base_wallet_change
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="changeType != null and changeType != ''">change_type = #{changeType},</if>
|
||||
<if test="payType != null and payType != ''">pay_type = #{payType},</if>
|
||||
<if test="changeTime != null">change_time = #{changeTime},</if>
|
||||
<if test="changeAmount != null">change_amount = #{changeAmount},</if>
|
||||
<if test="referralOrderNo != null">referral_order_no = #{referralOrderNo},</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="deleteZcBaseWalletChangeById" parameterType="Long">
|
||||
delete from zc_base_wallet_change where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZcBaseWalletChangeByIds" parameterType="String">
|
||||
delete from zc_base_wallet_change where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
@ -111,7 +111,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="overdueFee != null "> and a.overdue_fee = #{overdueFee}</if>
|
||||
<if test="isDepositFree != null "> and a.is_deposit_free = #{isDepositFree}</if>
|
||||
<if test="isAutoDeduct != null "> and a.is_auto_deduct = #{isAutoDeduct}</if>
|
||||
<if test="firstOrderTime != null "> and a.first_order_time = #{firstOrderTime}</if>
|
||||
<if test="startRentTime != null "> and a.start_rent_time = #{startRentTime}</if>
|
||||
<if test="overdueDays != null "> and a.overdue_days = #{overdueDays}</if>
|
||||
<if test="renewalTimes != null "> and a.renewal_times = #{renewalTimes}</if>
|
||||
@ -121,6 +120,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<if test="storeName != null and storeName!= '' "> and s.name = #{storeName}</if>
|
||||
<if test="licensePlate != null and licensePlate!= '' "> and zc.license_plate = #{licensePlate}</if>
|
||||
<if test="params.beginFirstOrderTime != null and params.beginFirstOrderTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(a.first_order_time,'%y%m%d') >= date_format(#{params.beginFirstOrderTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endFirstOrderTime != null and params.endFirstOrderTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(a.first_order_time,'%y%m%d') <= date_format(#{params.endFirstOrderTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
order by a.update_time desc
|
||||
</select>
|
||||
|
||||
@ -37,6 +37,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="paymentId != null and paymentId != ''"> and payment_id = #{paymentId}</if>
|
||||
<if test="paidAt != null "> and paid_at = #{paidAt}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 -->
|
||||
and date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('新增钱包变更记录')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-walletChange-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">
|
||||
<div class="input-group date">
|
||||
<input name="changeTime" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">变更金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="changeAmount" 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="referralOrderNo" class="form-control" type="text">
|
||||
</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 :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/walletChange"
|
||||
$("#form-walletChange-add").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/add", $('#form-walletChange-add').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='changeTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,61 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
|
||||
<head>
|
||||
<th:block th:include="include :: header('修改钱包变更记录')" />
|
||||
<th:block th:include="include :: datetimepicker-css" />
|
||||
</head>
|
||||
<body class="white-bg">
|
||||
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
|
||||
<form class="form-horizontal m" id="form-walletChange-edit" th:object="${zcBaseWalletChange}">
|
||||
<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">
|
||||
<div class="input-group date">
|
||||
<input name="changeTime" th:value="${#dates.format(zcBaseWalletChange.changeTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
|
||||
<span class="input-group-addon"><i class="fa fa-calendar"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label is-required">变更金额(元):</label>
|
||||
<div class="col-sm-8">
|
||||
<input name="changeAmount" th:field="*{changeAmount}" 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="referralOrderNo" th:field="*{referralOrderNo}" class="form-control" type="text">
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<th:block th:include="include :: datetimepicker-js" />
|
||||
<script th:inline="javascript">
|
||||
var prefix = ctx + "baseUser/walletChange";
|
||||
$("#form-walletChange-edit").validate({
|
||||
focusCleanup: true
|
||||
});
|
||||
|
||||
function submitHandler() {
|
||||
if ($.validate.form()) {
|
||||
$.operate.save(prefix + "/edit", $('#form-walletChange-edit').serialize());
|
||||
}
|
||||
}
|
||||
|
||||
$("input[name='changeTime']").datetimepicker({
|
||||
format: "yyyy-mm-dd",
|
||||
minView: "month",
|
||||
autoclose: true
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,114 @@
|
||||
<!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>
|
||||
<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:walletChange:add">-->
|
||||
<!-- <i class="fa fa-plus"></i> 添加-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="baseUser:walletChange:edit">-->
|
||||
<!-- <i class="fa fa-edit"></i> 修改-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="baseUser:walletChange:remove">-->
|
||||
<!-- <i class="fa fa-remove"></i> 删除-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="baseUser:walletChange: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:walletChange:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('baseUser:walletChange:remove')}]];
|
||||
var changeTypeDatas = [[${@dict.getType('key_wallet_change_type')}]];
|
||||
var payTypeDatas = [[${@dict.getType('key_wallet_pay_type')}]];
|
||||
var prefix = ctx + "baseUser/walletChange";
|
||||
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
createUrl: prefix + "/add",
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "钱包变更记录",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'id',
|
||||
title: 'id主键',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'userName',
|
||||
title: '用户'
|
||||
},
|
||||
{
|
||||
field: 'changeType',
|
||||
title: '变更类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(changeTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'payType',
|
||||
title: '支付类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(payTypeDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'changeTime',
|
||||
title: '变更时间'
|
||||
},
|
||||
{
|
||||
field: 'changeAmount',
|
||||
title: '变更金额(元)'
|
||||
},
|
||||
{
|
||||
field: 'referralOrderNo',
|
||||
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.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改</a> ');
|
||||
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>
|
||||
@ -60,7 +60,12 @@
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
|
||||
<li class="select-time">
|
||||
<label>下单时间: </label>
|
||||
<input type="text" class="time-input" id="beginFirstOrderTime" placeholder="开始时间" name="params[beginFirstOrderTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endFirstOrderTime" placeholder="结束时间" name="params[endFirstOrderTime]"/>
|
||||
</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>
|
||||
|
||||
@ -9,40 +9,37 @@
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
|
||||
<input type="hidden" name="suborderType" th:field="*{zcOrderSub.suborderType}"/>
|
||||
<ul>
|
||||
<!-- <li>-->
|
||||
<!-- <label>订单号:</label>-->
|
||||
<!-- <input type="text" name="orderId"/>-->
|
||||
<!-- </li>-->
|
||||
<li>
|
||||
<label>订单号:</label>
|
||||
<input type="text" name="orderId"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>子订单编号:</label>
|
||||
<label>订单编号:</label>
|
||||
<input type="text" name="suborderNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>子订单类型:</label>
|
||||
<select name="suborderType" th:with="type=${@dict.getType('key_order_suborder_type')}">
|
||||
<option value="">所有</option>
|
||||
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
|
||||
</select>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单金额:</label>
|
||||
<input type="text" name="amount"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>支付方式:</label>
|
||||
<input type="text" name="paymentMethod"/>
|
||||
</li>
|
||||
<!-- <li>-->
|
||||
<!-- <label>子订单类型:</label>-->
|
||||
<!-- <select name="suborderType" th:with="type=${@dict.getType('key_order_suborder_type')}">-->
|
||||
<!-- <option value="">所有</option>-->
|
||||
<!-- <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>-->
|
||||
<!-- </select>-->
|
||||
<!-- </li>-->
|
||||
|
||||
|
||||
<li>
|
||||
<label>车架/电池编号:</label>
|
||||
<input type="text" name="vinBatteryNo"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>订单产生时间:</label>
|
||||
<input type="text" class="time-input" placeholder="请选择订单产生时间" name="createdAt"/>
|
||||
<li class="select-time">
|
||||
<label>创建时间: </label>
|
||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]"/>
|
||||
<span>-</span>
|
||||
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]"/>
|
||||
</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>
|
||||
@ -76,6 +73,7 @@
|
||||
var editFlag = [[${@permission.hasPermi('orders:orderSub:edit')}]];
|
||||
var removeFlag = [[${@permission.hasPermi('orders:orderSub:remove')}]];
|
||||
var suborderTypeDatas = [[${@dict.getType('key_order_suborder_type')}]];
|
||||
var paymentMethodDatas = [[${@dict.getType('key_order_payment_method')}]];
|
||||
var prefix = ctx + "orders/orderSub";
|
||||
|
||||
$(function() {
|
||||
@ -85,26 +83,17 @@
|
||||
updateUrl: prefix + "/edit/{id}",
|
||||
removeUrl: prefix + "/remove",
|
||||
exportUrl: prefix + "/export",
|
||||
modalName: "租车子订单",
|
||||
modalName: "租电订单",
|
||||
columns: [{
|
||||
checkbox: true
|
||||
},
|
||||
{
|
||||
field: 'suborderId',
|
||||
title: '子订单',
|
||||
visible: false
|
||||
},
|
||||
{
|
||||
field: 'orderId',
|
||||
title: '订单号'
|
||||
},
|
||||
{
|
||||
field: 'suborderNo',
|
||||
title: '子订单编号'
|
||||
title: '订单编号'
|
||||
},
|
||||
{
|
||||
field: 'suborderType',
|
||||
title: '子订单类型',
|
||||
title: '订单类型',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(suborderTypeDatas, value);
|
||||
}
|
||||
@ -115,7 +104,10 @@
|
||||
},
|
||||
{
|
||||
field: 'paymentMethod',
|
||||
title: '支付方式'
|
||||
title: '支付方式',
|
||||
formatter: function(value, row, index) {
|
||||
return $.table.selectDictLabel(paymentMethodDatas, value);
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'vinBatteryNo',
|
||||
@ -134,14 +126,14 @@
|
||||
title: '实际支付时间'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
field: 'createTime',
|
||||
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.edit(\'' + row.suborderId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
|
||||
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + ' btnOption" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.suborderId + '\')"><i class="fa fa-remove"></i>删除</a>');
|
||||
return actions.join('');
|
||||
}
|
||||
title: '创建时间'
|
||||
},
|
||||
{
|
||||
field: 'updateTime',
|
||||
align: 'center',
|
||||
title: '更新时间'
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
|
||||
Reference in New Issue
Block a user