订单管理界面
This commit is contained in:
@ -1,114 +0,0 @@
|
||||
package com.ruoyi.system.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 销售订单对象 sys_order
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-23
|
||||
*/
|
||||
public class SysOrder extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long orderId;
|
||||
|
||||
/** 业务员 */
|
||||
private Long userId;
|
||||
|
||||
/** 用户昵称 */
|
||||
@Excel(name = "用户昵称")
|
||||
private String nickName;
|
||||
|
||||
/** 金额 */
|
||||
@Excel(name = "金额")
|
||||
private Long amount;
|
||||
|
||||
/** 成交日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "成交日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date saleTime;
|
||||
|
||||
/** 销售渠道 */
|
||||
@Excel(name = "销售渠道")
|
||||
private Long channelId;
|
||||
|
||||
public void setOrderId(Long orderId)
|
||||
{
|
||||
this.orderId = orderId;
|
||||
}
|
||||
|
||||
public Long getOrderId()
|
||||
{
|
||||
return orderId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
public void setNickName(String nickName)
|
||||
{
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getNickName()
|
||||
{
|
||||
return nickName;
|
||||
}
|
||||
public void setAmount(Long amount)
|
||||
{
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
public Long getAmount()
|
||||
{
|
||||
return amount;
|
||||
}
|
||||
public void setSaleTime(Date saleTime)
|
||||
{
|
||||
this.saleTime = saleTime;
|
||||
}
|
||||
|
||||
public Date getSaleTime()
|
||||
{
|
||||
return saleTime;
|
||||
}
|
||||
public void setChannelId(Long channelId)
|
||||
{
|
||||
this.channelId = channelId;
|
||||
}
|
||||
|
||||
public Long getChannelId()
|
||||
{
|
||||
return channelId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("orderId", getOrderId())
|
||||
.append("userId", getUserId())
|
||||
.append("nickName", getNickName())
|
||||
.append("amount", getAmount())
|
||||
.append("saleTime", getSaleTime())
|
||||
.append("channelId", getChannelId())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysOrder;
|
||||
|
||||
/**
|
||||
* 销售订单Mapper接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-23
|
||||
*/
|
||||
public interface SysOrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询销售订单
|
||||
*
|
||||
* @param orderId 销售订单ID
|
||||
* @return 销售订单
|
||||
*/
|
||||
public SysOrder selectSysOrderById(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询销售订单列表
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 销售订单集合
|
||||
*/
|
||||
public List<SysOrder> selectSysOrderList(SysOrder sysOrder);
|
||||
|
||||
/**
|
||||
* 新增销售订单
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysOrder(SysOrder sysOrder);
|
||||
|
||||
/**
|
||||
* 修改销售订单
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysOrder(SysOrder sysOrder);
|
||||
|
||||
/**
|
||||
* 删除销售订单
|
||||
*
|
||||
* @param orderId 销售订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderById(Long orderId);
|
||||
|
||||
/**
|
||||
* 批量删除销售订单
|
||||
*
|
||||
* @param orderIds 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderByIds(Long[] orderIds);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.ruoyi.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.system.domain.SysOrder;
|
||||
|
||||
/**
|
||||
* 销售订单Service接口
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-23
|
||||
*/
|
||||
public interface ISysOrderService
|
||||
{
|
||||
/**
|
||||
* 查询销售订单
|
||||
*
|
||||
* @param orderId 销售订单ID
|
||||
* @return 销售订单
|
||||
*/
|
||||
public SysOrder selectSysOrderById(Long orderId);
|
||||
|
||||
/**
|
||||
* 查询销售订单列表
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 销售订单集合
|
||||
*/
|
||||
public List<SysOrder> selectSysOrderList(SysOrder sysOrder);
|
||||
|
||||
/**
|
||||
* 新增销售订单
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertSysOrder(SysOrder sysOrder);
|
||||
|
||||
/**
|
||||
* 修改销售订单
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateSysOrder(SysOrder sysOrder);
|
||||
|
||||
/**
|
||||
* 批量删除销售订单
|
||||
*
|
||||
* @param orderIds 需要删除的销售订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderByIds(Long[] orderIds);
|
||||
|
||||
/**
|
||||
* 删除销售订单信息
|
||||
*
|
||||
* @param orderId 销售订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteSysOrderById(Long orderId);
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
package com.ruoyi.system.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.system.mapper.SysOrderMapper;
|
||||
import com.ruoyi.system.domain.SysOrder;
|
||||
import com.ruoyi.system.service.ISysOrderService;
|
||||
|
||||
/**
|
||||
* 销售订单Service业务层处理
|
||||
*
|
||||
* @author wonder
|
||||
* @date 2020-09-23
|
||||
*/
|
||||
@Service
|
||||
public class SysOrderServiceImpl implements ISysOrderService
|
||||
{
|
||||
@Autowired
|
||||
private SysOrderMapper sysOrderMapper;
|
||||
|
||||
/**
|
||||
* 查询销售订单
|
||||
*
|
||||
* @param orderId 销售订单ID
|
||||
* @return 销售订单
|
||||
*/
|
||||
@Override
|
||||
public SysOrder selectSysOrderById(Long orderId)
|
||||
{
|
||||
return sysOrderMapper.selectSysOrderById(orderId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询销售订单列表
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 销售订单
|
||||
*/
|
||||
@Override
|
||||
public List<SysOrder> selectSysOrderList(SysOrder sysOrder)
|
||||
{
|
||||
return sysOrderMapper.selectSysOrderList(sysOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增销售订单
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertSysOrder(SysOrder sysOrder)
|
||||
{
|
||||
sysOrder.setCreateTime(DateUtils.getNowDate());
|
||||
return sysOrderMapper.insertSysOrder(sysOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改销售订单
|
||||
*
|
||||
* @param sysOrder 销售订单
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateSysOrder(SysOrder sysOrder)
|
||||
{
|
||||
sysOrder.setUpdateTime(DateUtils.getNowDate());
|
||||
return sysOrderMapper.updateSysOrder(sysOrder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除销售订单
|
||||
*
|
||||
* @param orderIds 需要删除的销售订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysOrderByIds(Long[] orderIds)
|
||||
{
|
||||
return sysOrderMapper.deleteSysOrderByIds(orderIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除销售订单信息
|
||||
*
|
||||
* @param orderId 销售订单ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteSysOrderById(Long orderId)
|
||||
{
|
||||
return sysOrderMapper.deleteSysOrderById(orderId);
|
||||
}
|
||||
}
|
@ -1,97 +0,0 @@
|
||||
<?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.system.mapper.SysOrderMapper">
|
||||
|
||||
<resultMap type="SysOrder" id="SysOrderResult">
|
||||
<result property="orderId" column="order_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="nickName" column="nick_name" />
|
||||
<result property="amount" column="amount" />
|
||||
<result property="saleTime" column="sale_time" />
|
||||
<result property="channelId" column="channel_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" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysOrderVo">
|
||||
select order_id, user_id, nick_name, amount, sale_time, channel_id, create_by, create_time, update_by, update_time, remark from sys_order
|
||||
</sql>
|
||||
|
||||
<select id="selectSysOrderList" parameterType="SysOrder" resultMap="SysOrderResult">
|
||||
<include refid="selectSysOrderVo"/>
|
||||
<where>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
<if test="nickName != null and nickName != ''"> and nick_name like concat('%', #{nickName}, '%')</if>
|
||||
<if test="amount != null "> and amount = #{amount}</if>
|
||||
<if test="saleTime != null "> and sale_time = #{saleTime}</if>
|
||||
<if test="channelId != null "> and channel_id = #{channelId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSysOrderById" parameterType="Long" resultMap="SysOrderResult">
|
||||
<include refid="selectSysOrderVo"/>
|
||||
where order_id = #{orderId}
|
||||
</select>
|
||||
|
||||
<insert id="insertSysOrder" parameterType="SysOrder" useGeneratedKeys="true" keyProperty="orderId">
|
||||
insert into sys_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name,</if>
|
||||
<if test="amount != null">amount,</if>
|
||||
<if test="saleTime != null">sale_time,</if>
|
||||
<if test="channelId != null">channel_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>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="nickName != null and nickName != ''">#{nickName},</if>
|
||||
<if test="amount != null">#{amount},</if>
|
||||
<if test="saleTime != null">#{saleTime},</if>
|
||||
<if test="channelId != null">#{channelId},</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>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateSysOrder" parameterType="SysOrder">
|
||||
update sys_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
|
||||
<if test="amount != null">amount = #{amount},</if>
|
||||
<if test="saleTime != null">sale_time = #{saleTime},</if>
|
||||
<if test="channelId != null">channel_id = #{channelId},</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>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where order_id = #{orderId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteSysOrderById" parameterType="Long">
|
||||
delete from sys_order where order_id = #{orderId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteSysOrderByIds" parameterType="String">
|
||||
delete from sys_order where order_id in
|
||||
<foreach item="orderId" collection="array" open="(" separator="," close=")">
|
||||
#{orderId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user