订单会员

This commit is contained in:
Administrator 2020-09-11 10:14:25 +08:00
parent 82fc38af08
commit a5ea99916c
23 changed files with 1651 additions and 20 deletions

View File

@ -0,0 +1,22 @@
-- 菜单 SQL
insert into sys_menu (menu_name, target, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单管理', 'menuItem', '0', '6', '/business/order', 'C', '0', 'business:order:view', 'fa fa-shopping-cart', 'admin', '2018-03-01', 'ry', '2018-03-01', '订单菜单');
-- 按钮父菜单ID
SELECT @parentId := LAST_INSERT_ID();
-- 按钮 SQL
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单查询', '@parentId', '1', '#', 'F', '0', 'business:order:list', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单新增', '@parentId', '2', '#', 'F', '0', 'business:order:add', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单修改', '@parentId', '3', '#', 'F', '0', 'business:order:edit', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单删除', '@parentId', '4', '#', 'F', '0', 'business:order:remove', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');
insert into sys_menu (menu_name, parent_id, order_num, url, menu_type, visible, perms, icon, create_by, create_time, update_by, update_time, remark)
values('订单导出', '@parentId', '5', '#', 'F', '0', 'business:order:export', '#', 'admin', '2018-03-01', 'ry', '2018-03-01', '');

View File

@ -0,0 +1,126 @@
package com.ruoyi.business.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.business.domain.BizMember;
import com.ruoyi.business.service.IBizMemberService;
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 2020-09-11
*/
@Controller
@RequestMapping("/business/member")
public class BizMemberController extends BaseController
{
private String prefix = "business/member";
@Autowired
private IBizMemberService bizMemberService;
@RequiresPermissions("business:member:view")
@GetMapping()
public String member()
{
return prefix + "/member";
}
/**
* 查询会员列表
*/
@RequiresPermissions("business:member:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BizMember bizMember)
{
startPage();
List<BizMember> list = bizMemberService.selectBizMemberList(bizMember);
return getDataTable(list);
}
/**
* 导出会员列表
*/
@RequiresPermissions("business:member:export")
@Log(title = "会员", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BizMember bizMember)
{
List<BizMember> list = bizMemberService.selectBizMemberList(bizMember);
ExcelUtil<BizMember> util = new ExcelUtil<BizMember>(BizMember.class);
return util.exportExcel(list, "member");
}
/**
* 新增会员
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存会员
*/
@RequiresPermissions("business:member:add")
@Log(title = "会员", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BizMember bizMember)
{
return toAjax(bizMemberService.insertBizMember(bizMember));
}
/**
* 修改会员
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
BizMember bizMember = bizMemberService.selectBizMemberById(id);
mmap.put("bizMember", bizMember);
return prefix + "/edit";
}
/**
* 修改保存会员
*/
@RequiresPermissions("business:member:edit")
@Log(title = "会员", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BizMember bizMember)
{
return toAjax(bizMemberService.updateBizMember(bizMember));
}
/**
* 删除会员
*/
@RequiresPermissions("business:member:remove")
@Log(title = "会员", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(bizMemberService.deleteBizMemberByIds(ids));
}
}

View File

@ -0,0 +1,126 @@
package com.ruoyi.business.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.business.domain.BizOrder;
import com.ruoyi.business.service.IBizOrderService;
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 2020-09-09
*/
@Controller
@RequestMapping("/business/order")
public class BizOrderController extends BaseController
{
private String prefix = "business/order";
@Autowired
private IBizOrderService bizOrderService;
@RequiresPermissions("business:order:view")
@GetMapping()
public String order()
{
return prefix + "/order";
}
/**
* 查询订单列表
*/
@RequiresPermissions("business:order:list")
@PostMapping("/list")
@ResponseBody
public TableDataInfo list(BizOrder bizOrder)
{
startPage();
List<BizOrder> list = bizOrderService.selectBizOrderList(bizOrder);
return getDataTable(list);
}
/**
* 导出订单列表
*/
@RequiresPermissions("business:order:export")
@Log(title = "订单", businessType = BusinessType.EXPORT)
@PostMapping("/export")
@ResponseBody
public AjaxResult export(BizOrder bizOrder)
{
List<BizOrder> list = bizOrderService.selectBizOrderList(bizOrder);
ExcelUtil<BizOrder> util = new ExcelUtil<BizOrder>(BizOrder.class);
return util.exportExcel(list, "order");
}
/**
* 新增订单
*/
@GetMapping("/add")
public String add()
{
return prefix + "/add";
}
/**
* 新增保存订单
*/
@RequiresPermissions("business:order:add")
@Log(title = "订单", businessType = BusinessType.INSERT)
@PostMapping("/add")
@ResponseBody
public AjaxResult addSave(BizOrder bizOrder)
{
return toAjax(bizOrderService.insertBizOrder(bizOrder));
}
/**
* 修改订单
*/
@GetMapping("/edit/{id}")
public String edit(@PathVariable("id") Long id, ModelMap mmap)
{
BizOrder bizOrder = bizOrderService.selectBizOrderById(id);
mmap.put("bizOrder", bizOrder);
return prefix + "/edit";
}
/**
* 修改保存订单
*/
@RequiresPermissions("business:order:edit")
@Log(title = "订单", businessType = BusinessType.UPDATE)
@PostMapping("/edit")
@ResponseBody
public AjaxResult editSave(BizOrder bizOrder)
{
return toAjax(bizOrderService.updateBizOrder(bizOrder));
}
/**
* 删除订单
*/
@RequiresPermissions("business:order:remove")
@Log(title = "订单", businessType = BusinessType.DELETE)
@PostMapping( "/remove")
@ResponseBody
public AjaxResult remove(String ids)
{
return toAjax(bizOrderService.deleteBizOrderByIds(ids));
}
}

View File

@ -0,0 +1,176 @@
package com.ruoyi.business.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;
/**
* 会员对象 biz_member
*
* @author ruoyi
* @date 2020-09-11
*/
public class BizMember extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 会员ID */
private Long id;
/** 手机号码 */
@Excel(name = "手机号码")
private String mobile;
/** 用户姓名 */
@Excel(name = "用户姓名")
private String memberName;
/** 用户密码 */
private String password;
/** 推荐人ID */
@Excel(name = "推荐人ID")
private Long recommendId;
/** 所有上级推荐人ID */
private String recommendAllId;
/** 推荐人手机 */
private String recommendMobile;
/** 推荐人姓名 */
private String recommendName;
/** 会员类型 */
@Excel(name = "会员类型")
private Integer memberType;
/** 是否删除0-否1-是 */
private Integer isDelete;
/** 是否禁用0-否1-是 */
@Excel(name = "是否禁用0-否1-是")
private Integer isEnable;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setMobile(String mobile)
{
this.mobile = mobile;
}
public String getMobile()
{
return mobile;
}
public void setMemberName(String memberName)
{
this.memberName = memberName;
}
public String getMemberName()
{
return memberName;
}
public void setPassword(String password)
{
this.password = password;
}
public String getPassword()
{
return password;
}
public void setRecommendId(Long recommendId)
{
this.recommendId = recommendId;
}
public Long getRecommendId()
{
return recommendId;
}
public void setRecommendAllId(String recommendAllId)
{
this.recommendAllId = recommendAllId;
}
public String getRecommendAllId()
{
return recommendAllId;
}
public void setRecommendMobile(String recommendMobile)
{
this.recommendMobile = recommendMobile;
}
public String getRecommendMobile()
{
return recommendMobile;
}
public void setRecommendName(String recommendName)
{
this.recommendName = recommendName;
}
public String getRecommendName()
{
return recommendName;
}
public void setMemberType(Integer memberType)
{
this.memberType = memberType;
}
public Integer getMemberType()
{
return memberType;
}
public void setIsDelete(Integer isDelete)
{
this.isDelete = isDelete;
}
public Integer getIsDelete()
{
return isDelete;
}
public void setIsEnable(Integer isEnable)
{
this.isEnable = isEnable;
}
public Integer getIsEnable()
{
return isEnable;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("mobile", getMobile())
.append("memberName", getMemberName())
.append("password", getPassword())
.append("recommendId", getRecommendId())
.append("recommendAllId", getRecommendAllId())
.append("recommendMobile", getRecommendMobile())
.append("recommendName", getRecommendName())
.append("memberType", getMemberType())
.append("isDelete", getIsDelete())
.append("isEnable", getIsEnable())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,139 @@
package com.ruoyi.business.domain;
import java.math.BigDecimal;
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;
/**
* 订单对象 biz_order
*
* @author ruoyi
* @date 2020-09-09
*/
public class BizOrder extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 订单ID */
private Long id;
/** 订单编码 */
@Excel(name = "订单编码")
private String orderSn;
/** 会员ID */
private Long memberId;
/** 手机号码 */
@Excel(name = "手机号码")
private String mobile;
/** 用户姓名 */
@Excel(name = "用户姓名")
private String memberName;
/** 订单金额 */
@Excel(name = "订单金额")
private BigDecimal orderAmount;
/** 订单状态0-待支付1-已支付2-已取消 */
@Excel(name = "订单状态0-待支付1-已支付2-已取消")
private Integer orderStatus;
/** 收货人地址ID */
@Excel(name = "收货人地址ID")
private Long addressId;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setOrderSn(String orderSn)
{
this.orderSn = orderSn;
}
public String getOrderSn()
{
return orderSn;
}
public void setMemberId(Long memberId)
{
this.memberId = memberId;
}
public Long getMemberId()
{
return memberId;
}
public void setMobile(String mobile)
{
this.mobile = mobile;
}
public String getMobile()
{
return mobile;
}
public void setMemberName(String memberName)
{
this.memberName = memberName;
}
public String getMemberName()
{
return memberName;
}
public void setOrderAmount(BigDecimal orderAmount)
{
this.orderAmount = orderAmount;
}
public BigDecimal getOrderAmount()
{
return orderAmount;
}
public void setOrderStatus(Integer orderStatus)
{
this.orderStatus = orderStatus;
}
public Integer getOrderStatus()
{
return orderStatus;
}
public void setAddressId(Long addressId)
{
this.addressId = addressId;
}
public Long getAddressId()
{
return addressId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("orderSn", getOrderSn())
.append("memberId", getMemberId())
.append("mobile", getMobile())
.append("memberName", getMemberName())
.append("orderAmount", getOrderAmount())
.append("orderStatus", getOrderStatus())
.append("addressId", getAddressId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -40,8 +40,8 @@ public class BizProduct extends BaseEntity
@Excel(name = "产品单价")
private Long amount;
/** 产品返现 */
@Excel(name = "产品单价")
/** 产品返现金额 */
@Excel(name = "产品返现金额")
private Long cashbackAmount;
/** 排序 */

View File

@ -0,0 +1,61 @@
package com.ruoyi.business.mapper;
import java.util.List;
import com.ruoyi.business.domain.BizMember;
/**
* 会员Mapper接口
*
* @author ruoyi
* @date 2020-09-11
*/
public interface BizMemberMapper
{
/**
* 查询会员
*
* @param id 会员ID
* @return 会员
*/
public BizMember selectBizMemberById(Long id);
/**
* 查询会员列表
*
* @param bizMember 会员
* @return 会员集合
*/
public List<BizMember> selectBizMemberList(BizMember bizMember);
/**
* 新增会员
*
* @param bizMember 会员
* @return 结果
*/
public int insertBizMember(BizMember bizMember);
/**
* 修改会员
*
* @param bizMember 会员
* @return 结果
*/
public int updateBizMember(BizMember bizMember);
/**
* 删除会员
*
* @param id 会员ID
* @return 结果
*/
public int deleteBizMemberById(Long id);
/**
* 批量删除会员
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizMemberByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.business.mapper;
import java.util.List;
import com.ruoyi.business.domain.BizOrder;
/**
* 订单Mapper接口
*
* @author ruoyi
* @date 2020-09-09
*/
public interface BizOrderMapper
{
/**
* 查询订单
*
* @param id 订单ID
* @return 订单
*/
public BizOrder selectBizOrderById(Long id);
/**
* 查询订单列表
*
* @param bizOrder 订单
* @return 订单集合
*/
public List<BizOrder> selectBizOrderList(BizOrder bizOrder);
/**
* 新增订单
*
* @param bizOrder 订单
* @return 结果
*/
public int insertBizOrder(BizOrder bizOrder);
/**
* 修改订单
*
* @param bizOrder 订单
* @return 结果
*/
public int updateBizOrder(BizOrder bizOrder);
/**
* 删除订单
*
* @param id 订单ID
* @return 结果
*/
public int deleteBizOrderById(Long id);
/**
* 批量删除订单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizOrderByIds(String[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.business.service;
import java.util.List;
import com.ruoyi.business.domain.BizMember;
/**
* 会员Service接口
*
* @author ruoyi
* @date 2020-09-11
*/
public interface IBizMemberService
{
/**
* 查询会员
*
* @param id 会员ID
* @return 会员
*/
public BizMember selectBizMemberById(Long id);
/**
* 查询会员列表
*
* @param bizMember 会员
* @return 会员集合
*/
public List<BizMember> selectBizMemberList(BizMember bizMember);
/**
* 新增会员
*
* @param bizMember 会员
* @return 结果
*/
public int insertBizMember(BizMember bizMember);
/**
* 修改会员
*
* @param bizMember 会员
* @return 结果
*/
public int updateBizMember(BizMember bizMember);
/**
* 批量删除会员
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizMemberByIds(String ids);
/**
* 删除会员信息
*
* @param id 会员ID
* @return 结果
*/
public int deleteBizMemberById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.business.service;
import java.util.List;
import com.ruoyi.business.domain.BizOrder;
/**
* 订单Service接口
*
* @author ruoyi
* @date 2020-09-09
*/
public interface IBizOrderService
{
/**
* 查询订单
*
* @param id 订单ID
* @return 订单
*/
public BizOrder selectBizOrderById(Long id);
/**
* 查询订单列表
*
* @param bizOrder 订单
* @return 订单集合
*/
public List<BizOrder> selectBizOrderList(BizOrder bizOrder);
/**
* 新增订单
*
* @param bizOrder 订单
* @return 结果
*/
public int insertBizOrder(BizOrder bizOrder);
/**
* 修改订单
*
* @param bizOrder 订单
* @return 结果
*/
public int updateBizOrder(BizOrder bizOrder);
/**
* 批量删除订单
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteBizOrderByIds(String ids);
/**
* 删除订单信息
*
* @param id 订单ID
* @return 结果
*/
public int deleteBizOrderById(Long id);
}

View File

@ -0,0 +1,97 @@
package com.ruoyi.business.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.business.mapper.BizMemberMapper;
import com.ruoyi.business.domain.BizMember;
import com.ruoyi.business.service.IBizMemberService;
import com.ruoyi.common.core.text.Convert;
/**
* 会员Service业务层处理
*
* @author ruoyi
* @date 2020-09-11
*/
@Service
public class BizMemberServiceImpl implements IBizMemberService
{
@Autowired
private BizMemberMapper bizMemberMapper;
/**
* 查询会员
*
* @param id 会员ID
* @return 会员
*/
@Override
public BizMember selectBizMemberById(Long id)
{
return bizMemberMapper.selectBizMemberById(id);
}
/**
* 查询会员列表
*
* @param bizMember 会员
* @return 会员
*/
@Override
public List<BizMember> selectBizMemberList(BizMember bizMember)
{
return bizMemberMapper.selectBizMemberList(bizMember);
}
/**
* 新增会员
*
* @param bizMember 会员
* @return 结果
*/
@Override
public int insertBizMember(BizMember bizMember)
{
bizMember.setCreateTime(DateUtils.getNowDate());
return bizMemberMapper.insertBizMember(bizMember);
}
/**
* 修改会员
*
* @param bizMember 会员
* @return 结果
*/
@Override
public int updateBizMember(BizMember bizMember)
{
bizMember.setUpdateTime(DateUtils.getNowDate());
return bizMemberMapper.updateBizMember(bizMember);
}
/**
* 删除会员对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteBizMemberByIds(String ids)
{
return bizMemberMapper.deleteBizMemberByIds(Convert.toStrArray(ids));
}
/**
* 删除会员信息
*
* @param id 会员ID
* @return 结果
*/
@Override
public int deleteBizMemberById(Long id)
{
return bizMemberMapper.deleteBizMemberById(id);
}
}

View File

@ -0,0 +1,97 @@
package com.ruoyi.business.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.business.mapper.BizOrderMapper;
import com.ruoyi.business.domain.BizOrder;
import com.ruoyi.business.service.IBizOrderService;
import com.ruoyi.common.core.text.Convert;
/**
* 订单Service业务层处理
*
* @author ruoyi
* @date 2020-09-09
*/
@Service
public class BizOrderServiceImpl implements IBizOrderService
{
@Autowired
private BizOrderMapper bizOrderMapper;
/**
* 查询订单
*
* @param id 订单ID
* @return 订单
*/
@Override
public BizOrder selectBizOrderById(Long id)
{
return bizOrderMapper.selectBizOrderById(id);
}
/**
* 查询订单列表
*
* @param bizOrder 订单
* @return 订单
*/
@Override
public List<BizOrder> selectBizOrderList(BizOrder bizOrder)
{
return bizOrderMapper.selectBizOrderList(bizOrder);
}
/**
* 新增订单
*
* @param bizOrder 订单
* @return 结果
*/
@Override
public int insertBizOrder(BizOrder bizOrder)
{
bizOrder.setCreateTime(DateUtils.getNowDate());
return bizOrderMapper.insertBizOrder(bizOrder);
}
/**
* 修改订单
*
* @param bizOrder 订单
* @return 结果
*/
@Override
public int updateBizOrder(BizOrder bizOrder)
{
bizOrder.setUpdateTime(DateUtils.getNowDate());
return bizOrderMapper.updateBizOrder(bizOrder);
}
/**
* 删除订单对象
*
* @param ids 需要删除的数据ID
* @return 结果
*/
@Override
public int deleteBizOrderByIds(String ids)
{
return bizOrderMapper.deleteBizOrderByIds(Convert.toStrArray(ids));
}
/**
* 删除订单信息
*
* @param id 订单ID
* @return 结果
*/
@Override
public int deleteBizOrderById(Long id)
{
return bizOrderMapper.deleteBizOrderById(id);
}
}

View File

@ -0,0 +1,112 @@
<?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.business.mapper.BizMemberMapper">
<resultMap type="BizMember" id="BizMemberResult">
<result property="id" column="id" />
<result property="mobile" column="mobile" />
<result property="memberName" column="member_name" />
<result property="password" column="password" />
<result property="recommendId" column="recommend_id" />
<result property="recommendAllId" column="recommend_all_id" />
<result property="recommendMobile" column="recommend_mobile" />
<result property="recommendName" column="recommend_name" />
<result property="memberType" column="member_type" />
<result property="isDelete" column="is_delete" />
<result property="isEnable" column="is_enable" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBizMemberVo">
select id, mobile, member_name, password, recommend_id, recommend_all_id, recommend_mobile, recommend_name, member_type, is_delete, is_enable, create_by, create_time, update_by, update_time from biz_member
</sql>
<select id="selectBizMemberList" parameterType="BizMember" resultMap="BizMemberResult">
<include refid="selectBizMemberVo"/>
<where>
<if test="mobile != null and mobile != ''"> and mobile = #{mobile}</if>
<if test="memberName != null and memberName != ''"> and member_name like concat('%', #{memberName}, '%')</if>
<if test="recommendId != null "> and recommend_id = #{recommendId}</if>
<if test="memberType != null "> and member_type = #{memberType}</if>
</where>
</select>
<select id="selectBizMemberById" parameterType="Long" resultMap="BizMemberResult">
<include refid="selectBizMemberVo"/>
where id = #{id}
</select>
<insert id="insertBizMember" parameterType="BizMember" useGeneratedKeys="true" keyProperty="id">
insert into biz_member
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="mobile != null and mobile != ''">mobile,</if>
<if test="memberName != null and memberName != ''">member_name,</if>
<if test="password != null and password != ''">password,</if>
<if test="recommendId != null">recommend_id,</if>
<if test="recommendAllId != null and recommendAllId != ''">recommend_all_id,</if>
<if test="recommendMobile != null and recommendMobile != ''">recommend_mobile,</if>
<if test="recommendName != null and recommendName != ''">recommend_name,</if>
<if test="memberType != null">member_type,</if>
<if test="isDelete != null">is_delete,</if>
<if test="isEnable != null">is_enable,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="mobile != null and mobile != ''">#{mobile},</if>
<if test="memberName != null and memberName != ''">#{memberName},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="recommendId != null">#{recommendId},</if>
<if test="recommendAllId != null and recommendAllId != ''">#{recommendAllId},</if>
<if test="recommendMobile != null and recommendMobile != ''">#{recommendMobile},</if>
<if test="recommendName != null and recommendName != ''">#{recommendName},</if>
<if test="memberType != null">#{memberType},</if>
<if test="isDelete != null">#{isDelete},</if>
<if test="isEnable != null">#{isEnable},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateBizMember" parameterType="BizMember">
update biz_member
<trim prefix="SET" suffixOverrides=",">
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
<if test="memberName != null and memberName != ''">member_name = #{memberName},</if>
<if test="password != null and password != ''">password = #{password},</if>
<if test="recommendId != null">recommend_id = #{recommendId},</if>
<if test="recommendAllId != null and recommendAllId != ''">recommend_all_id = #{recommendAllId},</if>
<if test="recommendMobile != null and recommendMobile != ''">recommend_mobile = #{recommendMobile},</if>
<if test="recommendName != null and recommendName != ''">recommend_name = #{recommendName},</if>
<if test="memberType != null">member_type = #{memberType},</if>
<if test="isDelete != null">is_delete = #{isDelete},</if>
<if test="isEnable != null">is_enable = #{isEnable},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBizMemberById" parameterType="Long">
delete from biz_member where id = #{id}
</delete>
<delete id="deleteBizMemberByIds" parameterType="String">
delete from biz_member where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,97 @@
<?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.business.mapper.BizOrderMapper">
<resultMap type="BizOrder" id="BizOrderResult">
<result property="id" column="id" />
<result property="orderSn" column="order_sn" />
<result property="memberId" column="member_id" />
<result property="mobile" column="mobile" />
<result property="memberName" column="member_name" />
<result property="orderAmount" column="order_amount" />
<result property="orderStatus" column="order_status" />
<result property="addressId" column="address_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBizOrderVo">
select id, order_sn, member_id, mobile, member_name, order_amount, order_status, address_id, create_by, create_time, update_by, update_time from biz_order
</sql>
<select id="selectBizOrderList" parameterType="BizOrder" resultMap="BizOrderResult">
<include refid="selectBizOrderVo"/>
<where>
<if test="memberName != null and memberName != ''"> and member_name like concat('%', #{memberName}, '%')</if>
</where>
</select>
<select id="selectBizOrderById" parameterType="Long" resultMap="BizOrderResult">
<include refid="selectBizOrderVo"/>
where id = #{id}
</select>
<insert id="insertBizOrder" parameterType="BizOrder" useGeneratedKeys="true" keyProperty="id">
insert into biz_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderSn != null and orderSn != ''">order_sn,</if>
<if test="memberId != null">member_id,</if>
<if test="mobile != null and mobile != ''">mobile,</if>
<if test="memberName != null and memberName != ''">member_name,</if>
<if test="orderAmount != null">order_amount,</if>
<if test="orderStatus != null">order_status,</if>
<if test="addressId != null">address_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderSn != null and orderSn != ''">#{orderSn},</if>
<if test="memberId != null">#{memberId},</if>
<if test="mobile != null and mobile != ''">#{mobile},</if>
<if test="memberName != null and memberName != ''">#{memberName},</if>
<if test="orderAmount != null">#{orderAmount},</if>
<if test="orderStatus != null">#{orderStatus},</if>
<if test="addressId != null">#{addressId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateBizOrder" parameterType="BizOrder">
update biz_order
<trim prefix="SET" suffixOverrides=",">
<if test="orderSn != null and orderSn != ''">order_sn = #{orderSn},</if>
<if test="memberId != null">member_id = #{memberId},</if>
<if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
<if test="memberName != null and memberName != ''">member_name = #{memberName},</if>
<if test="orderAmount != null">order_amount = #{orderAmount},</if>
<if test="orderStatus != null">order_status = #{orderStatus},</if>
<if test="addressId != null">address_id = #{addressId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBizOrderById" parameterType="Long">
delete from biz_order where id = #{id}
</delete>
<delete id="deleteBizOrderByIds" parameterType="String">
delete from biz_order where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.business.mapper.BizProductMapper">
<resultMap type="BizProduct" id="BizProductResult">
<result property="productId" column="product_id" />
<result property="productId" column="id" />
<result property="productCode" column="product_code" />
<result property="productName" column="product_name" />
<result property="productTypeId" column="product_type_id" />
@ -24,14 +24,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<resultMap type="BizProductImage" id="BizProductImageResult">
<result property="productImageId" column="product_image_id" />
<result property="productImageId" column="id" />
<result property="productId" column="product_id" />
<result property="imageType" column="image_type" />
<result property="imageUrl" column="image_url" />
</resultMap>
<sql id="selectBizProductVo">
select product_id, product_code, product_name, product_type_id, product_class, amount, cashback_amount, sort, online_status, online_time, offline_time, remark, create_by, create_time, update_by, update_time from biz_product
select id, product_code, product_name, product_type_id, product_class, amount, cashback_amount, sort, online_status, online_time, offline_time, remark, create_by, create_time, update_by, update_time from biz_product
</sql>
<select id="selectBizProductList" parameterType="BizProduct" resultMap="BizProductResult">
@ -41,19 +41,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productTypeId != null "> and product_type_id = #{productTypeId}</if>
<if test="productClass != null "> and product_class = #{productClass}</if>
</where>
order by sort desc, product_id desc
order by sort desc, id desc
</select>
<select id="selectBizProductById" parameterType="Long" resultMap="BizProductResult">
<include refid="selectBizProductVo"/>
where product_id = #{productId}
where id = #{productId}
</select>
<select id="selectBizProductImageList" parameterType="Long" resultMap="BizProductImageResult">
select product_image_id, product_id, image_type, image_url
select id, product_id, image_type, image_url
from biz_product_image
where product_id = #{productId}
order by product_image_id
order by id
</select>
<insert id="insertBizProduct" parameterType="BizProduct" useGeneratedKeys="true" keyProperty="productId">
@ -113,15 +113,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where product_id = #{productId}
where id = #{productId}
</update>
<delete id="deleteBizProductById" parameterType="Long">
delete from biz_product where product_id = #{productId}
delete from biz_product where id = #{productId}
</delete>
<delete id="deleteBizProductByIds" parameterType="String">
delete from biz_product where product_id in
delete from biz_product where id in
<foreach item="productId" collection="array" open="(" separator="," close=")">
#{productId}
</foreach>

View File

@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<mapper namespace="com.ruoyi.business.mapper.BizProductTypeMapper">
<resultMap type="BizProductType" id="BizProductTypeResult">
<result property="productTypeId" column="product_type_id" />
<result property="productTypeId" column="id" />
<result property="productTypeCode" column="product_type_code" />
<result property="productTypeName" column="product_type_name" />
<result property="imageUrl" column="image_url" />
@ -18,7 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBizProductTypeVo">
select product_type_id, product_type_code, product_type_name, image_url, sort, is_enable, create_by, create_time, update_by, update_time from biz_product_type
select id, product_type_code, product_type_name, image_url, sort, is_enable, create_by, create_time, update_by, update_time from biz_product_type
</sql>
<select id="selectBizProductTypeList" parameterType="BizProductType" resultMap="BizProductTypeResult">
@ -27,12 +27,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="productTypeName != null and productTypeName != ''"> and product_type_name like concat('%', #{productTypeName}, '%')</if>
<if test="isEnable != null "> and is_enable = #{isEnable}</if>
</where>
order by sort desc, product_type_id desc
order by sort desc, id desc
</select>
<select id="selectBizProductTypeById" parameterType="Long" resultMap="BizProductTypeResult">
<include refid="selectBizProductTypeVo"/>
where product_type_id = #{productTypeId}
where id = #{productTypeId}
</select>
<insert id="insertBizProductType" parameterType="BizProductType" useGeneratedKeys="true" keyProperty="productTypeId">
@ -74,15 +74,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where product_type_id = #{productTypeId}
where id = #{productTypeId}
</update>
<delete id="deleteBizProductTypeById" parameterType="Long">
delete from biz_product_type where product_type_id = #{productTypeId}
delete from biz_product_type where id = #{productTypeId}
</delete>
<delete id="deleteBizProductTypeByIds" parameterType="String">
delete from biz_product_type where product_type_id in
delete from biz_product_type where id in
<foreach item="productTypeId" collection="array" open="(" separator="," close=")">
#{productTypeId}
</foreach>

View File

@ -0,0 +1,58 @@
<!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-member-add">
<div class="form-group">
<label class="col-sm-3 control-label is-required">手机号码:</label>
<div class="col-sm-8">
<input name="mobile" 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="memberName" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">推荐人ID</label>
<div class="col-sm-8">
<input name="recommendId" 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">
<select name="memberType" class="form-control m-b" required>
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否禁用0-否1-是:</label>
<div class="col-sm-8">
<input name="isEnable" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "business/member"
$("#form-member-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-member-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,59 @@
<!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-member-edit" th:object="${bizMember}">
<input name="id" th:field="*{id}" type="hidden">
<div class="form-group">
<label class="col-sm-3 control-label is-required">手机号码:</label>
<div class="col-sm-8">
<input name="mobile" th:field="*{mobile}" 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="memberName" th:field="*{memberName}" class="form-control" type="text" required>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">推荐人ID</label>
<div class="col-sm-8">
<input name="recommendId" th:field="*{recommendId}" 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">
<select name="memberType" class="form-control m-b" required>
<option value="">所有</option>
</select>
<span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label is-required">是否禁用0-否1-是:</label>
<div class="col-sm-8">
<input name="isEnable" th:field="*{isEnable}" class="form-control" type="text" required>
</div>
</div>
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "business/member";
$("#form-member-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-member-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,117 @@
<!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="mobile"/>
</li>
<li>
<label>用户姓名:</label>
<input type="text" name="memberName"/>
</li>
<li>
<label>推荐人ID</label>
<input type="text" name="recommendId"/>
</li>
<li>
<label>会员类型:</label>
<select name="memberType">
<option value="">所有</option>
<option value="-1">代码生成请选择字典属性</option>
</select>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="business:member:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:member:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:member:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:member: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('business:member:edit')}]];
var removeFlag = [[${@permission.hasPermi('business:member:remove')}]];
var prefix = ctx + "business/member";
$(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: 'mobile',
title: '手机号码'
},
{
field: 'memberName',
title: '用户姓名'
},
{
field: 'recommendId',
title: '推荐人ID'
},
{
field: 'memberType',
title: '会员类型'
},
{
field: 'isEnable',
title: '是否禁用0-否1-是'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" 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 + '" 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>

View File

@ -0,0 +1,25 @@
<!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-order-add">
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "business/order"
$("#form-order-add").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/add", $('#form-order-add').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,26 @@
<!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-order-edit" th:object="${bizOrder}">
<input name="id" th:field="*{id}" type="hidden">
</form>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
var prefix = ctx + "business/order";
$("#form-order-edit").validate({
focusCleanup: true
});
function submitHandler() {
if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-order-edit').serialize());
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,110 @@
<!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="memberName"/>
</li>
<li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</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="business:order:add">
<i class="fa fa-plus"></i> 添加
</a>
<a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="business:order:edit">
<i class="fa fa-edit"></i> 修改
</a>
<a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="business:order:remove">
<i class="fa fa-remove"></i> 删除
</a>
<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="business:order: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('business:order:edit')}]];
var removeFlag = [[${@permission.hasPermi('business:order:remove')}]];
var prefix = ctx + "business/order";
$(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: 'orderSn',
title: '订单编码'
},
{
field: 'mobile',
title: '手机号码'
},
{
field: 'memberName',
title: '用户姓名'
},
{
field: 'orderAmount',
title: '订单金额'
},
{
field: 'orderStatus',
title: '订单状态0-待支付1-已支付2-已取消'
},
{
field: 'addressId',
title: '收货人地址ID'
},
{
field: 'createTime',
title: '创建时间'
},
{
title: '操作',
align: 'center',
formatter: function(value, row, index) {
var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" 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 + '" 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>

View File

@ -4,7 +4,7 @@
<th:block th:include="include :: header('修改产品')" />
<th:block th:include="include :: bootstrap-fileinput-css"/>
</head>
<body class="white-bg">
<body class="white-bg">111
<form class="form-horizontal m" id="form-product-edit" >
<input name="productId" th:field="*{bizProduct.productId}" type="hidden">
<input id="hiddenDetail" th:value="*{bizProduct.detailImages}" type="hidden">