套餐相关
This commit is contained in:
parent
2ad61c071d
commit
32daf27287
|
@ -0,0 +1,55 @@
|
|||
package com.ruoyi.bst.changeRecord.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 爆灯次数变化对象 bst_change_record
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@Data
|
||||
public class ChangeRecord extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long recordId;
|
||||
|
||||
@Excel(name = "用户id")
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "店铺id")
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long storeId;
|
||||
|
||||
@Excel(name = "变动次数")
|
||||
@ApiModelProperty("变动次数")
|
||||
private Long number;
|
||||
|
||||
@Excel(name = "变动前次数")
|
||||
@ApiModelProperty("变动前次数")
|
||||
private Long beforeNum;
|
||||
|
||||
@Excel(name = "变动后次数")
|
||||
@ApiModelProperty("变动后次数")
|
||||
private Long afterNum;
|
||||
|
||||
@Excel(name = "业务类型")
|
||||
@ApiModelProperty("业务类型")
|
||||
private String bstType;
|
||||
|
||||
@Excel(name = "业务ID")
|
||||
@ApiModelProperty("业务ID")
|
||||
private Long bstId;
|
||||
|
||||
@Excel(name = "原因")
|
||||
@ApiModelProperty("原因")
|
||||
private String reason;
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.ruoyi.bst.changeRecord.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChangeRecordQuery extends ChangeRecordVO{
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.ruoyi.bst.changeRecord.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ChangeRecordVO extends ChangeRecord{
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.ruoyi.bst.changeRecord.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecord;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordVO;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordQuery;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 爆灯次数变化Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
public interface ChangeRecordMapper
|
||||
{
|
||||
/**
|
||||
* 查询爆灯次数变化
|
||||
*
|
||||
* @param recordId 爆灯次数变化主键
|
||||
* @return 爆灯次数变化
|
||||
*/
|
||||
ChangeRecordVO selectChangeRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询爆灯次数变化列表
|
||||
*
|
||||
* @param query 爆灯次数变化
|
||||
* @return 爆灯次数变化集合
|
||||
*/
|
||||
List<ChangeRecordVO> selectChangeRecordList(@Param("query")ChangeRecordQuery query);
|
||||
|
||||
/**
|
||||
* 新增爆灯次数变化
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 结果
|
||||
*/
|
||||
int insertChangeRecord(ChangeRecord changeRecord);
|
||||
|
||||
/**
|
||||
* 批量新增爆灯次数变化
|
||||
*/
|
||||
int batchInsert(@Param("list") List<? extends ChangeRecord> list);
|
||||
|
||||
/**
|
||||
* 批量修改爆灯次数变化
|
||||
*/
|
||||
int batchUpdate(@Param("list") List<? extends ChangeRecord> list);
|
||||
|
||||
/**
|
||||
* 修改爆灯次数变化
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateChangeRecord(@Param("data") ChangeRecord changeRecord);
|
||||
|
||||
/**
|
||||
* 删除爆灯次数变化
|
||||
*
|
||||
* @param recordId 爆灯次数变化主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteChangeRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 批量删除爆灯次数变化
|
||||
*
|
||||
* @param recordIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteChangeRecordByRecordIds(Long[] recordIds);
|
||||
}
|
|
@ -0,0 +1,253 @@
|
|||
<?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.bst.changeRecord.mapper.ChangeRecordMapper">
|
||||
|
||||
<resultMap type="ChangeRecordVO" id="ChangeRecordResult" autoMapping="true">
|
||||
<result property="recordId" column="record_id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="number" column="number" />
|
||||
<result property="beforeNum" column="before_num" />
|
||||
<result property="afterNum" column="after_num" />
|
||||
<result property="bstType" column="bst_type" />
|
||||
<result property="bstId" column="bst_id" />
|
||||
<result property="reason" column="reason" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectChangeRecordVo">
|
||||
select
|
||||
record_id,
|
||||
user_id,
|
||||
store_id,
|
||||
number,
|
||||
before_num,
|
||||
after_num,
|
||||
bst_type,
|
||||
bst_id,
|
||||
reason,
|
||||
create_time
|
||||
from bst_change_record
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
<if test="query.userId != null "> and user_id = #{query.userId}</if>
|
||||
<if test="query.storeId != null "> and store_id = #{query.storeId}</if>
|
||||
<if test="query.number != null "> and number = #{query.number}</if>
|
||||
<if test="query.beforeNum != null "> and before_num = #{query.beforeNum}</if>
|
||||
<if test="query.afterNum != null "> and after_num = #{query.afterNum}</if>
|
||||
<if test="query.bstType != null and query.bstType != ''"> and bst_type = #{query.bstType}</if>
|
||||
<if test="query.bstId != null "> and bst_id = #{query.bstId}</if>
|
||||
<if test="query.reason != null and query.reason != ''"> and reason = #{query.reason}</if>
|
||||
${query.params.dataScope}
|
||||
</sql>
|
||||
|
||||
<select id="selectChangeRecordList" parameterType="ChangeRecordQuery" resultMap="ChangeRecordResult">
|
||||
<include refid="selectChangeRecordVo"/>
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectChangeRecordByRecordId" parameterType="Long" resultMap="ChangeRecordResult">
|
||||
<include refid="selectChangeRecordVo"/>
|
||||
where record_id = #{recordId}
|
||||
</select>
|
||||
|
||||
<insert id="insertChangeRecord" parameterType="ChangeRecord" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into bst_change_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="storeId != null">store_id,</if>
|
||||
<if test="number != null">number,</if>
|
||||
<if test="beforeNum != null">before_num,</if>
|
||||
<if test="afterNum != null">after_num,</if>
|
||||
<if test="bstType != null">bst_type,</if>
|
||||
<if test="bstId != null">bst_id,</if>
|
||||
<if test="reason != null">reason,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="storeId != null">#{storeId},</if>
|
||||
<if test="number != null">#{number},</if>
|
||||
<if test="beforeNum != null">#{beforeNum},</if>
|
||||
<if test="afterNum != null">#{afterNum},</if>
|
||||
<if test="bstType != null">#{bstType},</if>
|
||||
<if test="bstId != null">#{bstId},</if>
|
||||
<if test="reason != null">#{reason},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" parameterType="ChangeRecord" useGeneratedKeys="true" keyProperty="recordId">
|
||||
insert into bst_change_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
user_id,
|
||||
store_id,
|
||||
number,
|
||||
before_num,
|
||||
after_num,
|
||||
bst_type,
|
||||
bst_id,
|
||||
reason,
|
||||
create_time,
|
||||
</trim>
|
||||
values
|
||||
<foreach collection="list" item="i" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="i.userId != null ">#{i.userId},</if>
|
||||
<if test="i.userId == null ">default,</if>
|
||||
<if test="i.storeId != null ">#{i.storeId},</if>
|
||||
<if test="i.storeId == null ">default,</if>
|
||||
<if test="i.number != null ">#{i.number},</if>
|
||||
<if test="i.number == null ">default,</if>
|
||||
<if test="i.beforeNum != null ">#{i.beforeNum},</if>
|
||||
<if test="i.beforeNum == null ">default,</if>
|
||||
<if test="i.afterNum != null ">#{i.afterNum},</if>
|
||||
<if test="i.afterNum == null ">default,</if>
|
||||
<if test="i.bstType != null ">#{i.bstType},</if>
|
||||
<if test="i.bstType == null ">default,</if>
|
||||
<if test="i.bstId != null ">#{i.bstId},</if>
|
||||
<if test="i.bstId == null ">default,</if>
|
||||
<if test="i.reason != null ">#{i.reason},</if>
|
||||
<if test="i.reason == null ">default,</if>
|
||||
<if test="i.createTime != null ">#{i.createTime},</if>
|
||||
<if test="i.createTime == null ">default,</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="batchUpdate">
|
||||
update bst_change_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<foreach open="user_id = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.userId != null ">
|
||||
WHEN #{item.record_id} THEN #{item.userId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `user_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="store_id = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.storeId != null ">
|
||||
WHEN #{item.record_id} THEN #{item.storeId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `store_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="number = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.number != null ">
|
||||
WHEN #{item.record_id} THEN #{item.number}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `number`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="before_num = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.beforeNum != null ">
|
||||
WHEN #{item.record_id} THEN #{item.beforeNum}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `before_num`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="after_num = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.afterNum != null ">
|
||||
WHEN #{item.record_id} THEN #{item.afterNum}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `after_num`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="bst_type = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.bstType != null ">
|
||||
WHEN #{item.record_id} THEN #{item.bstType}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `bst_type`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="bst_id = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.bstId != null ">
|
||||
WHEN #{item.record_id} THEN #{item.bstId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `bst_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="reason = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.reason != null ">
|
||||
WHEN #{item.record_id} THEN #{item.reason}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `reason`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="create_time = CASE record_id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.createTime != null ">
|
||||
WHEN #{item.record_id} THEN #{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.record_id} THEN `create_time`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
where record_id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item.recordId}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateChangeRecord" parameterType="ChangeRecord">
|
||||
update bst_change_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<include refid="updateColumns"/>
|
||||
</trim>
|
||||
where record_id = #{data.recordId}
|
||||
</update>
|
||||
|
||||
<sql id="updateColumns">
|
||||
<if test="data.userId != null">user_id = #{data.userId},</if>
|
||||
<if test="data.storeId != null">store_id = #{data.storeId},</if>
|
||||
<if test="data.number != null">number = #{data.number},</if>
|
||||
<if test="data.beforeNum != null">before_num = #{data.beforeNum},</if>
|
||||
<if test="data.afterNum != null">after_num = #{data.afterNum},</if>
|
||||
<if test="data.bstType != null">bst_type = #{data.bstType},</if>
|
||||
<if test="data.bstId != null">bst_id = #{data.bstId},</if>
|
||||
<if test="data.reason != null">reason = #{data.reason},</if>
|
||||
<if test="data.createTime != null">create_time = #{data.createTime},</if>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteChangeRecordByRecordId" parameterType="Long">
|
||||
delete from bst_change_record where record_id = #{recordId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteChangeRecordByRecordIds" parameterType="String">
|
||||
delete from bst_change_record where record_id in
|
||||
<foreach item="recordId" collection="array" open="(" separator="," close=")">
|
||||
#{recordId}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.bst.changeRecord.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecord;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordVO;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordQuery;
|
||||
|
||||
/**
|
||||
* 爆灯次数变化Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
public interface ChangeRecordService
|
||||
{
|
||||
/**
|
||||
* 查询爆灯次数变化
|
||||
*
|
||||
* @param recordId 爆灯次数变化主键
|
||||
* @return 爆灯次数变化
|
||||
*/
|
||||
public ChangeRecordVO selectChangeRecordByRecordId(Long recordId);
|
||||
|
||||
/**
|
||||
* 查询爆灯次数变化列表
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 爆灯次数变化集合
|
||||
*/
|
||||
public List<ChangeRecordVO> selectChangeRecordList(ChangeRecordQuery changeRecord);
|
||||
|
||||
/**
|
||||
* 新增爆灯次数变化
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertChangeRecord(ChangeRecord changeRecord);
|
||||
|
||||
/**
|
||||
* 修改爆灯次数变化
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateChangeRecord(ChangeRecord changeRecord);
|
||||
|
||||
/**
|
||||
* 批量删除爆灯次数变化
|
||||
*
|
||||
* @param recordIds 需要删除的爆灯次数变化主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteChangeRecordByRecordIds(Long[] recordIds);
|
||||
|
||||
/**
|
||||
* 删除爆灯次数变化信息
|
||||
*
|
||||
* @param recordId 爆灯次数变化主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteChangeRecordByRecordId(Long recordId);
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.bst.changeRecord.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.bst.changeRecord.mapper.ChangeRecordMapper;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecord;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordVO;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordQuery;
|
||||
import com.ruoyi.bst.changeRecord.service.ChangeRecordService;
|
||||
|
||||
/**
|
||||
* 爆灯次数变化Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@Service
|
||||
public class ChangeRecordServiceImpl implements ChangeRecordService
|
||||
{
|
||||
@Autowired
|
||||
private ChangeRecordMapper changeRecordMapper;
|
||||
|
||||
/**
|
||||
* 查询爆灯次数变化
|
||||
*
|
||||
* @param recordId 爆灯次数变化主键
|
||||
* @return 爆灯次数变化
|
||||
*/
|
||||
@Override
|
||||
public ChangeRecordVO selectChangeRecordByRecordId(Long recordId)
|
||||
{
|
||||
return changeRecordMapper.selectChangeRecordByRecordId(recordId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询爆灯次数变化列表
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 爆灯次数变化
|
||||
*/
|
||||
@Override
|
||||
public List<ChangeRecordVO> selectChangeRecordList(ChangeRecordQuery changeRecord)
|
||||
{
|
||||
return changeRecordMapper.selectChangeRecordList(changeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增爆灯次数变化
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertChangeRecord(ChangeRecord changeRecord)
|
||||
{
|
||||
changeRecord.setCreateTime(DateUtils.getNowDate());
|
||||
return changeRecordMapper.insertChangeRecord(changeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改爆灯次数变化
|
||||
*
|
||||
* @param changeRecord 爆灯次数变化
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateChangeRecord(ChangeRecord changeRecord)
|
||||
{
|
||||
return changeRecordMapper.updateChangeRecord(changeRecord);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除爆灯次数变化
|
||||
*
|
||||
* @param recordIds 需要删除的爆灯次数变化主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteChangeRecordByRecordIds(Long[] recordIds)
|
||||
{
|
||||
return changeRecordMapper.deleteChangeRecordByRecordIds(recordIds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除爆灯次数变化信息
|
||||
*
|
||||
* @param recordId 爆灯次数变化主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteChangeRecordByRecordId(Long recordId)
|
||||
{
|
||||
return changeRecordMapper.deleteChangeRecordByRecordId(recordId);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.ruoyi.bst.lightingNum.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 爆灯次数列表对象 bst_lighting_num
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@Data
|
||||
public class LightingNum extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "用户id")
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "店铺id")
|
||||
@ApiModelProperty("店铺id")
|
||||
private Long storeId;
|
||||
|
||||
@Excel(name = "爆灯次数")
|
||||
@ApiModelProperty("爆灯次数")
|
||||
private Long number;
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.ruoyi.bst.lightingNum.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LightingNumQuery extends LightingNumVO{
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.ruoyi.bst.lightingNum.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class LightingNumVO extends LightingNum{
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.ruoyi.bst.lightingNum.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNum;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumVO;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumQuery;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 爆灯次数列表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
public interface LightingNumMapper
|
||||
{
|
||||
/**
|
||||
* 查询爆灯次数列表
|
||||
*
|
||||
* @param id 爆灯次数列表主键
|
||||
* @return 爆灯次数列表
|
||||
*/
|
||||
LightingNumVO selectLightingNumById(Long id);
|
||||
|
||||
/**
|
||||
* 查询爆灯次数列表列表
|
||||
*
|
||||
* @param query 爆灯次数列表
|
||||
* @return 爆灯次数列表集合
|
||||
*/
|
||||
List<LightingNumVO> selectLightingNumList(@Param("query")LightingNumQuery query);
|
||||
|
||||
/**
|
||||
* 新增爆灯次数列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 结果
|
||||
*/
|
||||
int insertLightingNum(LightingNum lightingNum);
|
||||
|
||||
/**
|
||||
* 批量新增爆灯次数列表
|
||||
*/
|
||||
int batchInsert(@Param("list") List<? extends LightingNum> list);
|
||||
|
||||
/**
|
||||
* 批量修改爆灯次数列表
|
||||
*/
|
||||
int batchUpdate(@Param("list") List<? extends LightingNum> list);
|
||||
|
||||
/**
|
||||
* 修改爆灯次数列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLightingNum(@Param("data") LightingNum lightingNum);
|
||||
|
||||
/**
|
||||
* 删除爆灯次数列表
|
||||
*
|
||||
* @param id 爆灯次数列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteLightingNumById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除爆灯次数列表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLightingNumByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,158 @@
|
|||
<?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.bst.lightingNum.mapper.LightingNumMapper">
|
||||
|
||||
<resultMap type="LightingNumVO" id="LightingNumResult" autoMapping="true">
|
||||
<result property="id" column="id" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="number" column="number" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectLightingNumVo">
|
||||
select
|
||||
id,
|
||||
user_id,
|
||||
store_id,
|
||||
number,
|
||||
create_time
|
||||
from bst_lighting_num
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
<if test="query.userId != null "> and user_id = #{query.userId}</if>
|
||||
<if test="query.storeId != null "> and store_id = #{query.storeId}</if>
|
||||
<if test="query.number != null "> and number = #{query.number}</if>
|
||||
${query.params.dataScope}
|
||||
</sql>
|
||||
|
||||
<select id="selectLightingNumList" parameterType="LightingNumQuery" resultMap="LightingNumResult">
|
||||
<include refid="selectLightingNumVo"/>
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectLightingNumById" parameterType="Long" resultMap="LightingNumResult">
|
||||
<include refid="selectLightingNumVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertLightingNum" parameterType="LightingNum" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bst_lighting_num
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="storeId != null">store_id,</if>
|
||||
<if test="number != null">number,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="storeId != null">#{storeId},</if>
|
||||
<if test="number != null">#{number},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" parameterType="LightingNum" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bst_lighting_num
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
user_id,
|
||||
store_id,
|
||||
number,
|
||||
create_time,
|
||||
</trim>
|
||||
values
|
||||
<foreach collection="list" item="i" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="i.userId != null ">#{i.userId},</if>
|
||||
<if test="i.userId == null ">default,</if>
|
||||
<if test="i.storeId != null ">#{i.storeId},</if>
|
||||
<if test="i.storeId == null ">default,</if>
|
||||
<if test="i.number != null ">#{i.number},</if>
|
||||
<if test="i.number == null ">default,</if>
|
||||
<if test="i.createTime != null ">#{i.createTime},</if>
|
||||
<if test="i.createTime == null ">default,</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="batchUpdate">
|
||||
update bst_lighting_num
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<foreach open="user_id = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.userId != null ">
|
||||
WHEN #{item.id} THEN #{item.userId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `user_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="store_id = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.storeId != null ">
|
||||
WHEN #{item.id} THEN #{item.storeId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `store_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="number = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.number != null ">
|
||||
WHEN #{item.id} THEN #{item.number}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `number`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="create_time = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.createTime != null ">
|
||||
WHEN #{item.id} THEN #{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `create_time`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateLightingNum" parameterType="LightingNum">
|
||||
update bst_lighting_num
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<include refid="updateColumns"/>
|
||||
</trim>
|
||||
where id = #{data.id}
|
||||
</update>
|
||||
|
||||
<sql id="updateColumns">
|
||||
<if test="data.userId != null">user_id = #{data.userId},</if>
|
||||
<if test="data.storeId != null">store_id = #{data.storeId},</if>
|
||||
<if test="data.number != null">number = #{data.number},</if>
|
||||
<if test="data.createTime != null">create_time = #{data.createTime},</if>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteLightingNumById" parameterType="Long">
|
||||
delete from bst_lighting_num where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteLightingNumByIds" parameterType="String">
|
||||
delete from bst_lighting_num where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.bst.lightingNum.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNum;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumVO;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumQuery;
|
||||
|
||||
/**
|
||||
* 爆灯次数列表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
public interface LightingNumService
|
||||
{
|
||||
/**
|
||||
* 查询爆灯次数列表
|
||||
*
|
||||
* @param id 爆灯次数列表主键
|
||||
* @return 爆灯次数列表
|
||||
*/
|
||||
public LightingNumVO selectLightingNumById(Long id);
|
||||
|
||||
/**
|
||||
* 查询爆灯次数列表列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 爆灯次数列表集合
|
||||
*/
|
||||
public List<LightingNumVO> selectLightingNumList(LightingNumQuery lightingNum);
|
||||
|
||||
/**
|
||||
* 新增爆灯次数列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertLightingNum(LightingNum lightingNum);
|
||||
|
||||
/**
|
||||
* 修改爆灯次数列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateLightingNum(LightingNum lightingNum);
|
||||
|
||||
/**
|
||||
* 批量删除爆灯次数列表
|
||||
*
|
||||
* @param ids 需要删除的爆灯次数列表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLightingNumByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除爆灯次数列表信息
|
||||
*
|
||||
* @param id 爆灯次数列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteLightingNumById(Long id);
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.bst.lightingNum.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.bst.lightingNum.mapper.LightingNumMapper;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNum;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumVO;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumQuery;
|
||||
import com.ruoyi.bst.lightingNum.service.LightingNumService;
|
||||
|
||||
/**
|
||||
* 爆灯次数列表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@Service
|
||||
public class LightingNumServiceImpl implements LightingNumService
|
||||
{
|
||||
@Autowired
|
||||
private LightingNumMapper lightingNumMapper;
|
||||
|
||||
/**
|
||||
* 查询爆灯次数列表
|
||||
*
|
||||
* @param id 爆灯次数列表主键
|
||||
* @return 爆灯次数列表
|
||||
*/
|
||||
@Override
|
||||
public LightingNumVO selectLightingNumById(Long id)
|
||||
{
|
||||
return lightingNumMapper.selectLightingNumById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询爆灯次数列表列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 爆灯次数列表
|
||||
*/
|
||||
@Override
|
||||
public List<LightingNumVO> selectLightingNumList(LightingNumQuery lightingNum)
|
||||
{
|
||||
return lightingNumMapper.selectLightingNumList(lightingNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增爆灯次数列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertLightingNum(LightingNum lightingNum)
|
||||
{
|
||||
lightingNum.setCreateTime(DateUtils.getNowDate());
|
||||
return lightingNumMapper.insertLightingNum(lightingNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改爆灯次数列表
|
||||
*
|
||||
* @param lightingNum 爆灯次数列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateLightingNum(LightingNum lightingNum)
|
||||
{
|
||||
return lightingNumMapper.updateLightingNum(lightingNum);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除爆灯次数列表
|
||||
*
|
||||
* @param ids 需要删除的爆灯次数列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLightingNumByIds(Long[] ids)
|
||||
{
|
||||
return lightingNumMapper.deleteLightingNumByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除爆灯次数列表信息
|
||||
*
|
||||
* @param id 爆灯次数列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteLightingNumById(Long id)
|
||||
{
|
||||
return lightingNumMapper.deleteLightingNumById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,83 @@
|
|||
package com.ruoyi.bst.order.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 订单列表对象 bst_order
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@Data
|
||||
public class Order extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "订单号")
|
||||
@ApiModelProperty("订单号")
|
||||
private String orderNo;
|
||||
|
||||
@Excel(name = "店铺ID")
|
||||
@ApiModelProperty("店铺ID")
|
||||
private Long storeId;
|
||||
|
||||
@Excel(name = "店铺名称")
|
||||
@ApiModelProperty("店铺名称")
|
||||
private String storeName;
|
||||
|
||||
@Excel(name = "用户ID")
|
||||
@ApiModelProperty("用户ID")
|
||||
private Long userId;
|
||||
|
||||
@Excel(name = "支付成功的支付单ID")
|
||||
@ApiModelProperty("支付成功的支付单ID")
|
||||
private Long payId;
|
||||
|
||||
@Excel(name = "支付金额")
|
||||
@ApiModelProperty("支付金额")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty("备注")
|
||||
private String mark;
|
||||
|
||||
@Excel(name = "状态", readConverterExp = "W=AIT_PAY待支付,P=ROCESSING进行中,F=INISHED已结束,C=ANCELED已取消")
|
||||
@ApiModelProperty("状态")
|
||||
private String status;
|
||||
|
||||
@Excel(name = "套餐ID")
|
||||
@ApiModelProperty("套餐ID")
|
||||
private Long suitId;
|
||||
|
||||
@Excel(name = "套餐名称")
|
||||
@ApiModelProperty("套餐名称")
|
||||
private String suitName;
|
||||
|
||||
@Excel(name = "套餐次数")
|
||||
@ApiModelProperty("套餐次数")
|
||||
private Long suitNum;
|
||||
|
||||
@Excel(name = "套餐金额", readConverterExp = "单=位:元")
|
||||
@ApiModelProperty("套餐金额")
|
||||
private BigDecimal suitAmount;
|
||||
|
||||
@Excel(name = "订单取消备注")
|
||||
@ApiModelProperty("订单取消备注")
|
||||
private String cancelRemark;
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "支付超时时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("支付超时时间")
|
||||
private Date payExpireTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.ruoyi.bst.order.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderQuery extends OrderVO{
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package com.ruoyi.bst.order.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderVO extends Order{
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.ruoyi.bst.order.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bst.order.domain.Order;
|
||||
import com.ruoyi.bst.order.domain.OrderVO;
|
||||
import com.ruoyi.bst.order.domain.OrderQuery;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 订单列表Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
public interface OrderMapper
|
||||
{
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param id 订单列表主键
|
||||
* @return 订单列表
|
||||
*/
|
||||
OrderVO selectOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单列表列表
|
||||
*
|
||||
* @param query 订单列表
|
||||
* @return 订单列表集合
|
||||
*/
|
||||
List<OrderVO> selectOrderList(@Param("query")OrderQuery query);
|
||||
|
||||
/**
|
||||
* 新增订单列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 结果
|
||||
*/
|
||||
int insertOrder(Order order);
|
||||
|
||||
/**
|
||||
* 批量新增订单列表
|
||||
*/
|
||||
int batchInsert(@Param("list") List<? extends Order> list);
|
||||
|
||||
/**
|
||||
* 批量修改订单列表
|
||||
*/
|
||||
int batchUpdate(@Param("list") List<? extends Order> list);
|
||||
|
||||
/**
|
||||
* 修改订单列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrder(@Param("data") Order order);
|
||||
|
||||
/**
|
||||
* 删除订单列表
|
||||
*
|
||||
* @param id 订单列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除订单列表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,367 @@
|
|||
<?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.bst.order.mapper.OrderMapper">
|
||||
|
||||
<resultMap type="OrderVO" id="OrderResult" autoMapping="true">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderNo" column="order_no" />
|
||||
<result property="storeId" column="store_id" />
|
||||
<result property="storeName" column="store_name" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="payId" column="pay_id" />
|
||||
<result property="payAmount" column="pay_amount" />
|
||||
<result property="mark" column="mark" />
|
||||
<result property="status" column="status" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="suitId" column="suit_id" />
|
||||
<result property="suitName" column="suit_name" />
|
||||
<result property="suitNum" column="suit_num" />
|
||||
<result property="suitAmount" column="suit_amount" />
|
||||
<result property="cancelRemark" column="cancel_remark" />
|
||||
<result property="payExpireTime" column="pay_expire_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectOrderVo">
|
||||
select
|
||||
id,
|
||||
order_no,
|
||||
store_id,
|
||||
store_name,
|
||||
user_id,
|
||||
pay_id,
|
||||
pay_amount,
|
||||
mark,
|
||||
status,
|
||||
create_time,
|
||||
suit_id,
|
||||
suit_name,
|
||||
suit_num,
|
||||
suit_amount,
|
||||
cancel_remark,
|
||||
pay_expire_time
|
||||
from bst_order
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
<if test="query.orderNo != null and query.orderNo != ''"> and order_no = #{query.orderNo}</if>
|
||||
<if test="query.storeId != null "> and store_id = #{query.storeId}</if>
|
||||
<if test="query.storeName != null and query.storeName != ''"> and store_name like concat('%', #{query.storeName}, '%')</if>
|
||||
<if test="query.userId != null "> and user_id = #{query.userId}</if>
|
||||
<if test="query.payId != null "> and pay_id = #{query.payId}</if>
|
||||
<if test="query.payAmount != null "> and pay_amount = #{query.payAmount}</if>
|
||||
<if test="query.mark != null and query.mark != ''"> and mark = #{query.mark}</if>
|
||||
<if test="query.status != null and query.status != ''"> and status = #{query.status}</if>
|
||||
<if test="query.suitId != null "> and suit_id = #{query.suitId}</if>
|
||||
<if test="query.suitName != null and query.suitName != ''"> and suit_name like concat('%', #{query.suitName}, '%')</if>
|
||||
<if test="query.suitNum != null "> and suit_num = #{query.suitNum}</if>
|
||||
<if test="query.suitAmount != null "> and suit_amount = #{query.suitAmount}</if>
|
||||
<if test="query.cancelRemark != null and query.cancelRemark != ''"> and cancel_remark = #{query.cancelRemark}</if>
|
||||
<if test="query.payExpireTime != null "> and pay_expire_time = #{query.payExpireTime}</if>
|
||||
${query.params.dataScope}
|
||||
</sql>
|
||||
|
||||
<select id="selectOrderList" parameterType="OrderQuery" resultMap="OrderResult">
|
||||
<include refid="selectOrderVo"/>
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectOrderById" parameterType="Long" resultMap="OrderResult">
|
||||
<include refid="selectOrderVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertOrder" parameterType="Order" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bst_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">order_no,</if>
|
||||
<if test="storeId != null">store_id,</if>
|
||||
<if test="storeName != null">store_name,</if>
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="payId != null">pay_id,</if>
|
||||
<if test="payAmount != null">pay_amount,</if>
|
||||
<if test="mark != null">mark,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="suitId != null">suit_id,</if>
|
||||
<if test="suitName != null">suit_name,</if>
|
||||
<if test="suitNum != null">suit_num,</if>
|
||||
<if test="suitAmount != null">suit_amount,</if>
|
||||
<if test="cancelRemark != null">cancel_remark,</if>
|
||||
<if test="payExpireTime != null">pay_expire_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="orderNo != null and orderNo != ''">#{orderNo},</if>
|
||||
<if test="storeId != null">#{storeId},</if>
|
||||
<if test="storeName != null">#{storeName},</if>
|
||||
<if test="userId != null">#{userId},</if>
|
||||
<if test="payId != null">#{payId},</if>
|
||||
<if test="payAmount != null">#{payAmount},</if>
|
||||
<if test="mark != null">#{mark},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="suitId != null">#{suitId},</if>
|
||||
<if test="suitName != null">#{suitName},</if>
|
||||
<if test="suitNum != null">#{suitNum},</if>
|
||||
<if test="suitAmount != null">#{suitAmount},</if>
|
||||
<if test="cancelRemark != null">#{cancelRemark},</if>
|
||||
<if test="payExpireTime != null">#{payExpireTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="batchInsert" parameterType="Order" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into bst_order
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
order_no,
|
||||
store_id,
|
||||
store_name,
|
||||
user_id,
|
||||
pay_id,
|
||||
pay_amount,
|
||||
mark,
|
||||
status,
|
||||
create_time,
|
||||
suit_id,
|
||||
suit_name,
|
||||
suit_num,
|
||||
suit_amount,
|
||||
cancel_remark,
|
||||
pay_expire_time,
|
||||
</trim>
|
||||
values
|
||||
<foreach collection="list" item="i" separator=",">
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="i.orderNo != null and i.orderNo != ''">#{i.orderNo},</if>
|
||||
<if test="i.orderNo == null or i.orderNo == ''">default,</if>
|
||||
<if test="i.storeId != null ">#{i.storeId},</if>
|
||||
<if test="i.storeId == null ">default,</if>
|
||||
<if test="i.storeName != null ">#{i.storeName},</if>
|
||||
<if test="i.storeName == null ">default,</if>
|
||||
<if test="i.userId != null ">#{i.userId},</if>
|
||||
<if test="i.userId == null ">default,</if>
|
||||
<if test="i.payId != null ">#{i.payId},</if>
|
||||
<if test="i.payId == null ">default,</if>
|
||||
<if test="i.payAmount != null ">#{i.payAmount},</if>
|
||||
<if test="i.payAmount == null ">default,</if>
|
||||
<if test="i.mark != null ">#{i.mark},</if>
|
||||
<if test="i.mark == null ">default,</if>
|
||||
<if test="i.status != null ">#{i.status},</if>
|
||||
<if test="i.status == null ">default,</if>
|
||||
<if test="i.createTime != null ">#{i.createTime},</if>
|
||||
<if test="i.createTime == null ">default,</if>
|
||||
<if test="i.suitId != null ">#{i.suitId},</if>
|
||||
<if test="i.suitId == null ">default,</if>
|
||||
<if test="i.suitName != null ">#{i.suitName},</if>
|
||||
<if test="i.suitName == null ">default,</if>
|
||||
<if test="i.suitNum != null ">#{i.suitNum},</if>
|
||||
<if test="i.suitNum == null ">default,</if>
|
||||
<if test="i.suitAmount != null ">#{i.suitAmount},</if>
|
||||
<if test="i.suitAmount == null ">default,</if>
|
||||
<if test="i.cancelRemark != null ">#{i.cancelRemark},</if>
|
||||
<if test="i.cancelRemark == null ">default,</if>
|
||||
<if test="i.payExpireTime != null ">#{i.payExpireTime},</if>
|
||||
<if test="i.payExpireTime == null ">default,</if>
|
||||
</trim>
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
<update id="batchUpdate">
|
||||
update bst_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<foreach open="order_no = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.orderNo != null and item.orderNo != ''">
|
||||
WHEN #{item.id} THEN #{item.orderNo}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `order_no`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="store_id = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.storeId != null ">
|
||||
WHEN #{item.id} THEN #{item.storeId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `store_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="store_name = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.storeName != null ">
|
||||
WHEN #{item.id} THEN #{item.storeName}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `store_name`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="user_id = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.userId != null ">
|
||||
WHEN #{item.id} THEN #{item.userId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `user_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="pay_id = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.payId != null ">
|
||||
WHEN #{item.id} THEN #{item.payId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `pay_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="pay_amount = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.payAmount != null ">
|
||||
WHEN #{item.id} THEN #{item.payAmount}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `pay_amount`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="mark = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.mark != null ">
|
||||
WHEN #{item.id} THEN #{item.mark}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `mark`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="status = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.status != null ">
|
||||
WHEN #{item.id} THEN #{item.status}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `status`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="create_time = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.createTime != null ">
|
||||
WHEN #{item.id} THEN #{item.createTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `create_time`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="suit_id = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.suitId != null ">
|
||||
WHEN #{item.id} THEN #{item.suitId}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `suit_id`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="suit_name = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.suitName != null ">
|
||||
WHEN #{item.id} THEN #{item.suitName}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `suit_name`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="suit_num = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.suitNum != null ">
|
||||
WHEN #{item.id} THEN #{item.suitNum}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `suit_num`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="suit_amount = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.suitAmount != null ">
|
||||
WHEN #{item.id} THEN #{item.suitAmount}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `suit_amount`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="cancel_remark = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.cancelRemark != null ">
|
||||
WHEN #{item.id} THEN #{item.cancelRemark}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `cancel_remark`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
<foreach open="pay_expire_time = CASE id" collection="list" item="item" close="END,">
|
||||
<choose>
|
||||
<when test="item.payExpireTime != null ">
|
||||
WHEN #{item.id} THEN #{item.payExpireTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
WHEN #{item.id} THEN `pay_expire_time`
|
||||
</otherwise>
|
||||
</choose>
|
||||
</foreach>
|
||||
</trim>
|
||||
where id in
|
||||
<foreach item="item" collection="list" open="(" separator="," close=")">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
<update id="updateOrder" parameterType="Order">
|
||||
update bst_order
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<include refid="updateColumns"/>
|
||||
</trim>
|
||||
where id = #{data.id}
|
||||
</update>
|
||||
|
||||
<sql id="updateColumns">
|
||||
<if test="data.orderNo != null and data.orderNo != ''">order_no = #{data.orderNo},</if>
|
||||
<if test="data.storeId != null">store_id = #{data.storeId},</if>
|
||||
<if test="data.storeName != null">store_name = #{data.storeName},</if>
|
||||
<if test="data.userId != null">user_id = #{data.userId},</if>
|
||||
<if test="data.payId != null">pay_id = #{data.payId},</if>
|
||||
<if test="data.payAmount != null">pay_amount = #{data.payAmount},</if>
|
||||
<if test="data.mark != null">mark = #{data.mark},</if>
|
||||
<if test="data.status != null">status = #{data.status},</if>
|
||||
<if test="data.createTime != null">create_time = #{data.createTime},</if>
|
||||
<if test="data.suitId != null">suit_id = #{data.suitId},</if>
|
||||
<if test="data.suitName != null">suit_name = #{data.suitName},</if>
|
||||
<if test="data.suitNum != null">suit_num = #{data.suitNum},</if>
|
||||
<if test="data.suitAmount != null">suit_amount = #{data.suitAmount},</if>
|
||||
<if test="data.cancelRemark != null">cancel_remark = #{data.cancelRemark},</if>
|
||||
<if test="data.payExpireTime != null">pay_expire_time = #{data.payExpireTime},</if>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteOrderById" parameterType="Long">
|
||||
delete from bst_order where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteOrderByIds" parameterType="String">
|
||||
delete from bst_order where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,63 @@
|
|||
package com.ruoyi.bst.order.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.bst.order.domain.Order;
|
||||
import com.ruoyi.bst.order.domain.OrderVO;
|
||||
import com.ruoyi.bst.order.domain.OrderQuery;
|
||||
|
||||
/**
|
||||
* 订单列表Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
public interface OrderService
|
||||
{
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param id 订单列表主键
|
||||
* @return 订单列表
|
||||
*/
|
||||
public OrderVO selectOrderById(Long id);
|
||||
|
||||
/**
|
||||
* 查询订单列表列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 订单列表集合
|
||||
*/
|
||||
public List<OrderVO> selectOrderList(OrderQuery order);
|
||||
|
||||
/**
|
||||
* 新增订单列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertOrder(Order order);
|
||||
|
||||
/**
|
||||
* 修改订单列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateOrder(Order order);
|
||||
|
||||
/**
|
||||
* 批量删除订单列表
|
||||
*
|
||||
* @param ids 需要删除的订单列表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除订单列表信息
|
||||
*
|
||||
* @param id 订单列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteOrderById(Long id);
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
package com.ruoyi.bst.order.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.bst.order.mapper.OrderMapper;
|
||||
import com.ruoyi.bst.order.domain.Order;
|
||||
import com.ruoyi.bst.order.domain.OrderVO;
|
||||
import com.ruoyi.bst.order.domain.OrderQuery;
|
||||
import com.ruoyi.bst.order.service.OrderService;
|
||||
|
||||
/**
|
||||
* 订单列表Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@Service
|
||||
public class OrderServiceImpl implements OrderService
|
||||
{
|
||||
@Autowired
|
||||
private OrderMapper orderMapper;
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*
|
||||
* @param id 订单列表主键
|
||||
* @return 订单列表
|
||||
*/
|
||||
@Override
|
||||
public OrderVO selectOrderById(Long id)
|
||||
{
|
||||
return orderMapper.selectOrderById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 订单列表
|
||||
*/
|
||||
@Override
|
||||
public List<OrderVO> selectOrderList(OrderQuery order)
|
||||
{
|
||||
return orderMapper.selectOrderList(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertOrder(Order order)
|
||||
{
|
||||
order.setCreateTime(DateUtils.getNowDate());
|
||||
return orderMapper.insertOrder(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单列表
|
||||
*
|
||||
* @param order 订单列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateOrder(Order order)
|
||||
{
|
||||
return orderMapper.updateOrder(order);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除订单列表
|
||||
*
|
||||
* @param ids 需要删除的订单列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderByIds(Long[] ids)
|
||||
{
|
||||
return orderMapper.deleteOrderByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单列表信息
|
||||
*
|
||||
* @param id 订单列表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteOrderById(Long id)
|
||||
{
|
||||
return orderMapper.deleteOrderById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.ruoyi.web.app;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/order")
|
||||
public class AppOrderController {
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package com.ruoyi.web.bst;
|
||||
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecord;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordQuery;
|
||||
import com.ruoyi.bst.changeRecord.domain.ChangeRecordVO;
|
||||
import com.ruoyi.bst.changeRecord.service.ChangeRecordService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 爆灯次数变化Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bst/changeRecord")
|
||||
public class ChangeRecordController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ChangeRecordService changeRecordService;
|
||||
|
||||
/**
|
||||
* 查询爆灯次数变化列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:changeRecord:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ChangeRecordQuery query)
|
||||
{
|
||||
startPage();
|
||||
startOrderBy();
|
||||
List<ChangeRecordVO> list = changeRecordService.selectChangeRecordList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出爆灯次数变化列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:changeRecord:export')")
|
||||
@Log(title = "爆灯次数变化", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ChangeRecordQuery query)
|
||||
{
|
||||
List<ChangeRecordVO> list = changeRecordService.selectChangeRecordList(query);
|
||||
ExcelUtil<ChangeRecordVO> util = new ExcelUtil<ChangeRecordVO>(ChangeRecordVO.class);
|
||||
util.exportExcel(response, list, "爆灯次数变化数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取爆灯次数变化详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:changeRecord:query')")
|
||||
@GetMapping(value = "/{recordId}")
|
||||
public AjaxResult getInfo(@PathVariable("recordId") Long recordId)
|
||||
{
|
||||
return success(changeRecordService.selectChangeRecordByRecordId(recordId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增爆灯次数变化
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:changeRecord:add')")
|
||||
@Log(title = "爆灯次数变化", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ChangeRecord changeRecord)
|
||||
{
|
||||
return toAjax(changeRecordService.insertChangeRecord(changeRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改爆灯次数变化
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:changeRecord:edit')")
|
||||
@Log(title = "爆灯次数变化", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ChangeRecord changeRecord)
|
||||
{
|
||||
return toAjax(changeRecordService.updateChangeRecord(changeRecord));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除爆灯次数变化
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:changeRecord:remove')")
|
||||
@Log(title = "爆灯次数变化", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{recordIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] recordIds)
|
||||
{
|
||||
return toAjax(changeRecordService.deleteChangeRecordByRecordIds(recordIds));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
package com.ruoyi.web.bst;
|
||||
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNum;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumQuery;
|
||||
import com.ruoyi.bst.lightingNum.domain.LightingNumVO;
|
||||
import com.ruoyi.bst.lightingNum.service.LightingNumService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 爆灯次数列表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bst/lightingNum")
|
||||
public class LightingNumController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private LightingNumService lightingNumService;
|
||||
|
||||
/**
|
||||
* 查询爆灯次数列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:lightingNum:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LightingNumQuery query)
|
||||
{
|
||||
startPage();
|
||||
startOrderBy();
|
||||
List<LightingNumVO> list = lightingNumService.selectLightingNumList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出爆灯次数列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:lightingNum:export')")
|
||||
@Log(title = "爆灯次数列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, LightingNumQuery query)
|
||||
{
|
||||
List<LightingNumVO> list = lightingNumService.selectLightingNumList(query);
|
||||
ExcelUtil<LightingNumVO> util = new ExcelUtil<LightingNumVO>(LightingNumVO.class);
|
||||
util.exportExcel(response, list, "爆灯次数列表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取爆灯次数列表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:lightingNum:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(lightingNumService.selectLightingNumById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增爆灯次数列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:lightingNum:add')")
|
||||
@Log(title = "爆灯次数列表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody LightingNum lightingNum)
|
||||
{
|
||||
return toAjax(lightingNumService.insertLightingNum(lightingNum));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改爆灯次数列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:lightingNum:edit')")
|
||||
@Log(title = "爆灯次数列表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody LightingNum lightingNum)
|
||||
{
|
||||
return toAjax(lightingNumService.updateLightingNum(lightingNum));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除爆灯次数列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:lightingNum:remove')")
|
||||
@Log(title = "爆灯次数列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(lightingNumService.deleteLightingNumByIds(ids));
|
||||
}
|
||||
}
|
101
ruoyi-web/src/main/java/com/ruoyi/web/bst/OrderController.java
Normal file
101
ruoyi-web/src/main/java/com/ruoyi/web/bst/OrderController.java
Normal file
|
@ -0,0 +1,101 @@
|
|||
package com.ruoyi.web.bst;
|
||||
|
||||
import com.ruoyi.bst.order.domain.Order;
|
||||
import com.ruoyi.bst.order.domain.OrderQuery;
|
||||
import com.ruoyi.bst.order.domain.OrderVO;
|
||||
import com.ruoyi.bst.order.service.OrderService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单列表Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-04-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/bst/order")
|
||||
public class OrderController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
/**
|
||||
* 查询订单列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:order:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(OrderQuery query)
|
||||
{
|
||||
startPage();
|
||||
startOrderBy();
|
||||
List<OrderVO> list = orderService.selectOrderList(query);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:order:export')")
|
||||
@Log(title = "订单列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, OrderQuery query)
|
||||
{
|
||||
List<OrderVO> list = orderService.selectOrderList(query);
|
||||
ExcelUtil<OrderVO> util = new ExcelUtil<OrderVO>(OrderVO.class);
|
||||
util.exportExcel(response, list, "订单列表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单列表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:order:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(orderService.selectOrderById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:order:add')")
|
||||
@Log(title = "订单列表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody Order order)
|
||||
{
|
||||
return toAjax(orderService.insertOrder(order));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:order:edit')")
|
||||
@Log(title = "订单列表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody Order order)
|
||||
{
|
||||
return toAjax(orderService.updateOrder(order));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('bst:order:remove')")
|
||||
@Log(title = "订单列表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(orderService.deleteOrderByIds(ids));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user