硬件升级功能
This commit is contained in:
parent
5f50bdc043
commit
7c0ab2be96
|
@ -4,10 +4,13 @@ import java.io.Serializable;
|
|||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
|
@ -29,6 +32,7 @@ public class BaseEntity implements Serializable
|
|||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonView(JsonViewProfile.Base.class)
|
||||
@Excel(name = "创建时间", dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
/** 更新者 */
|
||||
|
|
|
@ -27,4 +27,8 @@ public class DictTypeConstants {
|
|||
public static final String VIP_LEVEL_STATUS = "vip_level_status";
|
||||
// 会员等级限制类型
|
||||
public static final String VIP_LEVEL_LIMIT_TYPE = "vip_level_limit_type";
|
||||
// 交易订单状态
|
||||
public static final String TRANSACTION_BILL_STATUS = "sm_transaction_bill_status";
|
||||
// 充值商户是否显示手机号状态
|
||||
public static final String RECHARGE_MCH_SHOW_MOBILE_STATUS = "recharge_mch_show_mobile_status";
|
||||
}
|
||||
|
|
|
@ -35,4 +35,10 @@ public class MchRevenueVO {
|
|||
|
||||
@ApiModelProperty("使用中设备数")
|
||||
private Integer usingDeviceCount;
|
||||
|
||||
@ApiModelProperty("待结算金额")
|
||||
private BigDecimal waitBonusAmount;
|
||||
|
||||
@ApiModelProperty("待结算订单数")
|
||||
private Integer waitBonusOrderCount;
|
||||
}
|
||||
|
|
|
@ -409,6 +409,16 @@ public class DashboardService {
|
|||
int usingDeviceCount = deviceService.selectCount(deviceQuery);
|
||||
vo.setUsingDeviceCount(usingDeviceCount);
|
||||
|
||||
// 待结算分成
|
||||
BonusQuery waitBonusQuery = new BonusQuery();
|
||||
waitBonusQuery.setArrivalId(mchId);
|
||||
waitBonusQuery.setStatus(BonusStatus.WAIT_DIVIDE.getStatus());
|
||||
BigDecimal waitBonusAmount = bonusService.selectSumOfWaitAmount(waitBonusQuery);
|
||||
vo.setWaitBonusAmount(waitBonusAmount);
|
||||
// 待结算分成的订单数
|
||||
int waitBonusOrderCount = bonusService.selectBillCount(waitBonusQuery);
|
||||
vo.setWaitBonusOrderCount(waitBonusOrderCount);
|
||||
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,4 +173,14 @@ public interface BonusMapper
|
|||
* 预支付
|
||||
*/
|
||||
int prePay(@Param("list") List<? extends Bonus> bonusList);
|
||||
|
||||
/**
|
||||
* 查询待分成金额
|
||||
*/
|
||||
BigDecimal selectSumOfWaitAmount(@Param("query") BonusQuery query);
|
||||
|
||||
/**
|
||||
* 查询订单数量(去重)
|
||||
*/
|
||||
int selectBillCount(@Param("query") BonusQuery query);
|
||||
}
|
||||
|
|
|
@ -539,4 +539,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectSumOfWaitAmount" resultType="java.math.BigDecimal">
|
||||
select sum(sb.wait_amount) as `value`
|
||||
from ss_bonus sb
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBillCount" resultType="java.lang.Integer">
|
||||
select count(distinct sb.bill_no) as `value`
|
||||
from ss_bonus sb
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -158,4 +158,15 @@ public interface BonusService
|
|||
* 查询总金额
|
||||
*/
|
||||
BigDecimal selectSumOfAmount(BonusQuery bonusQuery);
|
||||
|
||||
/**
|
||||
* 查询待分成金额
|
||||
*/
|
||||
BigDecimal selectSumOfWaitAmount(BonusQuery query);
|
||||
|
||||
/**
|
||||
* 查询订单数量(去重)
|
||||
*/
|
||||
int selectBillCount(BonusQuery query);
|
||||
|
||||
}
|
||||
|
|
|
@ -370,4 +370,14 @@ public class BonusServiceImpl implements BonusService
|
|||
public BigDecimal selectSumOfAmount(BonusQuery query) {
|
||||
return bonusMapper.selectSumOfAmount(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BigDecimal selectSumOfWaitAmount(BonusQuery query) {
|
||||
return bonusMapper.selectSumOfWaitAmount(query);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectBillCount(BonusQuery query) {
|
||||
return bonusMapper.selectBillCount(query);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.ruoyi.ss.hardVersion.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.Size;
|
||||
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 硬件版本对象 ss_hard_version
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Data
|
||||
public class HardVersion extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private Long id;
|
||||
|
||||
@Excel(name = "版本代码")
|
||||
@ApiModelProperty("版本代码")
|
||||
@NotBlank(message = "版本代码不能为空")
|
||||
@Size(max = 64, message = "版本代码长度不能超过64个字符")
|
||||
private String code;
|
||||
|
||||
@Excel(name = "适用型号列表")
|
||||
@ApiModelProperty("适用型号列表")
|
||||
private List<Long> modelIds;
|
||||
|
||||
@Excel(name = "文件链接")
|
||||
@ApiModelProperty("文件链接")
|
||||
private String fileUrl;
|
||||
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package com.ruoyi.ss.hardVersion.domain;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardVersionQuery extends HardVersionVO {
|
||||
|
||||
@ApiModelProperty("适用型号ID")
|
||||
private Long modelId;
|
||||
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package com.ruoyi.ss.hardVersion.domain;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.ss.model.domain.SmModelVO;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HardVersionVO extends HardVersion{
|
||||
|
||||
@ApiModelProperty("型号列表")
|
||||
private List<SmModelVO> modelList;
|
||||
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
package com.ruoyi.ss.hardVersion.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersion;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 硬件版本Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface HardVersionMapper
|
||||
{
|
||||
/**
|
||||
* 查询硬件版本
|
||||
*
|
||||
* @param id 硬件版本主键
|
||||
* @return 硬件版本
|
||||
*/
|
||||
HardVersionVO selectHardVersionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询硬件版本列表
|
||||
*
|
||||
* @param query 硬件版本
|
||||
* @return 硬件版本集合
|
||||
*/
|
||||
List<HardVersionVO> selectHardVersionList(@Param("query")HardVersionQuery query);
|
||||
|
||||
/**
|
||||
* 新增硬件版本
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 结果
|
||||
*/
|
||||
int insertHardVersion(HardVersion hardVersion);
|
||||
|
||||
/**
|
||||
* 批量新增硬件版本
|
||||
*/
|
||||
int batchInsert(@Param("list") List<? extends HardVersion> list);
|
||||
|
||||
/**
|
||||
* 批量修改硬件版本
|
||||
*/
|
||||
int batchUpdate(@Param("list") List<? extends HardVersion> list);
|
||||
|
||||
/**
|
||||
* 修改硬件版本
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHardVersion(@Param("data") HardVersion hardVersion);
|
||||
|
||||
/**
|
||||
* 删除硬件版本
|
||||
*
|
||||
* @param id 硬件版本主键
|
||||
* @return 结果
|
||||
*/
|
||||
int deleteHardVersionById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除硬件版本
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHardVersionByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,86 @@
|
|||
<?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.ss.hardVersion.mapper.HardVersionMapper">
|
||||
|
||||
<resultMap type="HardVersionVO" id="HardVersionResult" autoMapping="true">
|
||||
<result property="modelIds" column="model_ids" typeHandler="com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHardVersionVo">
|
||||
select
|
||||
shv.id,
|
||||
shv.code,
|
||||
shv.model_ids,
|
||||
shv.file_url,
|
||||
shv.remark,
|
||||
shv.create_time
|
||||
from ss_hard_version shv
|
||||
</sql>
|
||||
|
||||
<sql id="searchCondition">
|
||||
<if test="query.id != null "> and shv.id = #{query.id}</if>
|
||||
<if test="query.code != null and query.code != ''"> and shv.code like concat('%', #{query.code}, '%')</if>
|
||||
<if test="query.remark != null and query.remark != ''"> and shv.remark like concat('%', #{query.remark}, '%')</if>
|
||||
<if test="query.modelId != null"> and find_in_set(#{query.modelId}, shv.model_ids)</if>
|
||||
${query.params.dataScope}
|
||||
</sql>
|
||||
|
||||
<select id="selectHardVersionList" parameterType="HardVersionQuery" resultMap="HardVersionResult">
|
||||
<include refid="selectHardVersionVo"/>
|
||||
<where>
|
||||
<include refid="searchCondition"/>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHardVersionById" parameterType="Long" resultMap="HardVersionResult">
|
||||
<include refid="selectHardVersionVo"/>
|
||||
where shv.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHardVersion" parameterType="HardVersion" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ss_hard_version
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">code,</if>
|
||||
<if test="modelIds != null">model_ids,</if>
|
||||
<if test="fileUrl != null">file_url,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="code != null and code != ''">#{code},</if>
|
||||
<if test="modelIds != null">#{modelIds, typeHandler=com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler},</if>
|
||||
<if test="fileUrl != null">#{fileUrl},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHardVersion" parameterType="HardVersion">
|
||||
update ss_hard_version
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<include refid="updateColumns"/>
|
||||
</trim>
|
||||
where id = #{data.id}
|
||||
</update>
|
||||
|
||||
<sql id="updateColumns">
|
||||
<if test="data.code != null and data.code != ''">code = #{data.code},</if>
|
||||
<if test="data.modelIds != null">model_ids = #{data.modelIds, typeHandler=com.ruoyi.system.mapper.typehandler.LongSplitListTypeHandler},</if>
|
||||
<if test="data.fileUrl != null">file_url = #{data.fileUrl},</if>
|
||||
<if test="data.remark != null">remark = #{data.remark},</if>
|
||||
<if test="data.createTime != null">create_time = #{data.createTime},</if>
|
||||
</sql>
|
||||
|
||||
<delete id="deleteHardVersionById" parameterType="Long">
|
||||
delete from ss_hard_version where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHardVersionByIds" parameterType="String">
|
||||
delete from ss_hard_version where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,16 @@
|
|||
package com.ruoyi.ss.hardVersion.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
|
||||
public interface HardVersionAssembler {
|
||||
|
||||
/**
|
||||
* 组装型号列表
|
||||
*
|
||||
* @param list 硬件版本列表
|
||||
*/
|
||||
void assembleModelList(List<HardVersionVO> list);
|
||||
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
package com.ruoyi.ss.hardVersion.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersion;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
|
||||
/**
|
||||
* 硬件版本Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
public interface HardVersionService
|
||||
{
|
||||
/**
|
||||
* 查询硬件版本
|
||||
*
|
||||
* @param id 硬件版本主键
|
||||
* @return 硬件版本
|
||||
*/
|
||||
public HardVersionVO selectHardVersionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询硬件版本列表
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 硬件版本集合
|
||||
*/
|
||||
public List<HardVersionVO> selectHardVersionList(HardVersionQuery hardVersion);
|
||||
|
||||
/**
|
||||
* 新增硬件版本
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHardVersion(HardVersion hardVersion);
|
||||
|
||||
/**
|
||||
* 修改硬件版本
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHardVersion(HardVersion hardVersion);
|
||||
|
||||
/**
|
||||
* 批量删除硬件版本
|
||||
*
|
||||
* @param ids 需要删除的硬件版本主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHardVersionByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除硬件版本信息
|
||||
*
|
||||
* @param id 硬件版本主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHardVersionById(Long id);
|
||||
|
||||
/**
|
||||
* 查询一个
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return 硬件版本
|
||||
*/
|
||||
public HardVersionVO selectOne(HardVersionQuery query);
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package com.ruoyi.ss.hardVersion.service.impl;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.common.utils.collection.CollectionUtils;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersion;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
import com.ruoyi.ss.hardVersion.service.HardVersionAssembler;
|
||||
import com.ruoyi.ss.model.domain.SmModelVO;
|
||||
import com.ruoyi.ss.model.service.ModelService;
|
||||
|
||||
@Service
|
||||
public class HardVersionAssemblerImpl implements HardVersionAssembler {
|
||||
|
||||
@Autowired
|
||||
private ModelService modelService;
|
||||
|
||||
@Override
|
||||
public void assembleModelList(List<HardVersionVO> list) {
|
||||
if (CollectionUtils.isEmptyElement(list)) {
|
||||
return;
|
||||
}
|
||||
|
||||
List<Long> modelIds = list.stream().map(HardVersion::getModelIds).flatMap(Collection::stream).distinct().collect(Collectors.toList());
|
||||
List<SmModelVO> modelList = modelService.selectSmModelListByIds(modelIds);
|
||||
|
||||
for (HardVersionVO hardVersion : list) {
|
||||
List<SmModelVO> versionModelList = modelList.stream()
|
||||
.filter(model -> hardVersion.getModelIds().contains(model.getModelId()))
|
||||
.collect(Collectors.toList());
|
||||
hardVersion.setModelList(versionModelList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,115 @@
|
|||
package com.ruoyi.ss.hardVersion.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.collection.CollectionUtils;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersion;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
import com.ruoyi.ss.hardVersion.mapper.HardVersionMapper;
|
||||
import com.ruoyi.ss.hardVersion.service.HardVersionService;
|
||||
|
||||
/**
|
||||
* 硬件版本Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@Service
|
||||
public class HardVersionServiceImpl implements HardVersionService
|
||||
{
|
||||
@Autowired
|
||||
private HardVersionMapper hardVersionMapper;
|
||||
|
||||
/**
|
||||
* 查询硬件版本
|
||||
*
|
||||
* @param id 硬件版本主键
|
||||
* @return 硬件版本
|
||||
*/
|
||||
@Override
|
||||
public HardVersionVO selectHardVersionById(Long id)
|
||||
{
|
||||
return hardVersionMapper.selectHardVersionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询硬件版本列表
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 硬件版本
|
||||
*/
|
||||
@Override
|
||||
public List<HardVersionVO> selectHardVersionList(HardVersionQuery hardVersion)
|
||||
{
|
||||
return hardVersionMapper.selectHardVersionList(hardVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增硬件版本
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertHardVersion(HardVersion hardVersion)
|
||||
{
|
||||
hardVersion.setCreateTime(DateUtils.getNowDate());
|
||||
return hardVersionMapper.insertHardVersion(hardVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改硬件版本
|
||||
*
|
||||
* @param hardVersion 硬件版本
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateHardVersion(HardVersion hardVersion)
|
||||
{
|
||||
return hardVersionMapper.updateHardVersion(hardVersion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除硬件版本
|
||||
*
|
||||
* @param ids 需要删除的硬件版本主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHardVersionByIds(Long[] ids)
|
||||
{
|
||||
return hardVersionMapper.deleteHardVersionByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除硬件版本信息
|
||||
*
|
||||
* @param id 硬件版本主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteHardVersionById(Long id)
|
||||
{
|
||||
return hardVersionMapper.deleteHardVersionById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询一个
|
||||
*
|
||||
* @param query 查询条件
|
||||
* @return 硬件版本
|
||||
*/
|
||||
@Override
|
||||
public HardVersionVO selectOne(HardVersionQuery query) {
|
||||
List<HardVersionVO> list = selectHardVersionList(query);
|
||||
if (CollectionUtils.isEmpty(list)) {
|
||||
return null;
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
}
|
|
@ -39,6 +39,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="productId != null and productId != ''"> and sm.product_id = #{productId}</if>
|
||||
<if test="deleted == null">and sm.deleted = false</if>
|
||||
<if test="deleted != null">and sm.deleted = #{deleted}</if>
|
||||
<if test="modelIds != null and modelIds.size() > 0">
|
||||
and sm.model_id in
|
||||
<foreach item="item" collection="modelIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="keyword != null">
|
||||
and (
|
||||
sm.model_name like concat('%', #{keyword}, '%')
|
||||
|
|
|
@ -90,4 +90,9 @@ public interface ModelService
|
|||
* 查询单个型号
|
||||
*/
|
||||
SmModelVO selectOne(SmModelQuery query);
|
||||
|
||||
/**
|
||||
* 根据ids查询型号列表
|
||||
*/
|
||||
List<SmModelVO> selectSmModelListByIds(List<Long> ids);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
package com.ruoyi.ss.model.service.impl;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ServiceUtil;
|
||||
|
@ -15,13 +23,6 @@ import com.ruoyi.ss.model.domain.SmModelVO;
|
|||
import com.ruoyi.ss.model.mapper.SmModelMapper;
|
||||
import com.ruoyi.ss.model.service.ModelService;
|
||||
import com.ruoyi.ss.model.service.ModelValidator;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 型号列表Service业务层处理
|
||||
|
@ -165,6 +166,16 @@ public class ModelServiceImpl implements ModelService
|
|||
return list.get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SmModelVO> selectSmModelListByIds(List<Long> ids) {
|
||||
if (CollectionUtils.isEmptyElement(ids)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
SmModelQuery query = new SmModelQuery();
|
||||
query.setModelIds(ids);
|
||||
return modelMapper.selectSmModelList(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 逻辑删除前校验
|
||||
*/
|
||||
|
|
|
@ -38,12 +38,12 @@ public class TransactionBill extends BaseEntity
|
|||
private Long billId;
|
||||
|
||||
/** 订单编号 */
|
||||
@Excel(name = "订单编号", sort = 5)
|
||||
@ApiModelProperty("订单编号")
|
||||
@JsonView(JsonViewProfile.Base.class)
|
||||
private String billNo;
|
||||
|
||||
/** 用户 */
|
||||
@Excel(name = "用户")
|
||||
@ApiModelProperty("用户id")
|
||||
private Long userId;
|
||||
|
||||
|
@ -53,24 +53,23 @@ public class TransactionBill extends BaseEntity
|
|||
private String type;
|
||||
|
||||
/** 设备 */
|
||||
@Excel(name = "设备")
|
||||
@ApiModelProperty("设备id")
|
||||
@JsonView(JsonViewProfile.Base.class)
|
||||
private Long deviceId;
|
||||
|
||||
@ApiModelProperty("设备编号")
|
||||
@NotNull(message = "设备编号不允许为空", groups = {ValidGroup.Recharge.class})
|
||||
@Excel(name = "设备SN", sort = 20)
|
||||
@ApiModelProperty("设备SN")
|
||||
@NotNull(message = "设备SN不允许为空", groups = {ValidGroup.Recharge.class})
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String deviceNo;
|
||||
|
||||
/** 商户(到账用户) */
|
||||
@Excel(name = "商户(到账用户)")
|
||||
@ApiModelProperty("商户(到账用户)id")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private Long mchId;
|
||||
|
||||
/** 交易金额 */
|
||||
@Excel(name = "交易金额")
|
||||
@Excel(name = "交易金额", sort = 11)
|
||||
@ApiModelProperty("交易金额")
|
||||
@NotNull(message = "交易金额不允许为空", groups = {ValidGroup.Recharge.class})
|
||||
@Min(value = 0, message = "交易金额不允许小于0", groups = {ValidGroup.Recharge.class})
|
||||
|
@ -79,19 +78,18 @@ public class TransactionBill extends BaseEntity
|
|||
private BigDecimal money;
|
||||
|
||||
/** 实际到账金额 */
|
||||
@Excel(name = "商户实际到账金额")
|
||||
@ApiModelProperty("商户实际到账金额")
|
||||
@JsonView(JsonViewProfile.AppMch.class)
|
||||
private BigDecimal arrivalAmount;
|
||||
|
||||
/** 手续费 */
|
||||
@Excel(name = "手续费")
|
||||
@ApiModelProperty("手续费")
|
||||
@Min(value = 0, message = "手续费不允许小于0", groups = { ValidGroup.Withdraw.class})
|
||||
@JsonView(JsonViewProfile.AppMch.class)
|
||||
private BigDecimal serviceCharge;
|
||||
|
||||
@ApiModelProperty("订单状态:1未支付,2支付成功,3已退款,4已取消")
|
||||
@Excel(name = "订单状态", dictType = DictTypeConstants.TRANSACTION_BILL_STATUS, sort = 10)
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String status;
|
||||
|
||||
|
@ -106,6 +104,7 @@ public class TransactionBill extends BaseEntity
|
|||
@ApiModelProperty("支付成功的时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
@Excel(name = "支付时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 15)
|
||||
private Date payTime;
|
||||
|
||||
@ApiModelProperty("支付过期时间")
|
||||
|
@ -135,61 +134,64 @@ public class TransactionBill extends BaseEntity
|
|||
@JsonView(JsonViewProfile.App.class)
|
||||
private Long suitId;
|
||||
|
||||
@Excel(name = "套餐时长/电量(秒/度)", sort = 80)
|
||||
@ApiModelProperty("套餐时长(秒)")
|
||||
@NotNull(message = "套餐时长不允许为空", groups = {ValidGroup.Recharge.class})
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private Integer suitTime;
|
||||
|
||||
@Excel(name = "套餐时长单位", dictType = DictTypeConstants.TIME_UNIT, sort = 90)
|
||||
@ApiModelProperty("套餐时长单位")
|
||||
@NotBlank(message = "套餐时长单位不允许为空", groups = {ValidGroup.Recharge.class})
|
||||
@DictValid(type = DictTypeConstants.TIME_UNIT, message = "非法的套餐时长单位", groups = {ValidGroup.Recharge.class})
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String suitTimeUnit;
|
||||
|
||||
@Excel(name = "套餐开始使用时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 100)
|
||||
@ApiModelProperty("套餐开始使用时间")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private LocalDateTime suitStartTime;
|
||||
|
||||
@Excel(name = "套餐结束使用时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 110)
|
||||
@ApiModelProperty("套餐结束使用时间")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private LocalDateTime suitEndTime;
|
||||
|
||||
@Excel(name = "套餐到期时间", dateFormat = "yyyy-MM-dd HH:mm:ss", sort = 120)
|
||||
@ApiModelProperty("套餐到期时间")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private LocalDateTime suitExpireTime;
|
||||
|
||||
@Excel(name = "套餐开始使用的电量")
|
||||
@Excel(name = "套餐开始使用的电量(度)", sort = 130)
|
||||
@ApiModelProperty("套餐开始使用的电量")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal suitStartEle;
|
||||
|
||||
@Excel(name = "套餐结束使用的电量")
|
||||
@Excel(name = "套餐结束使用的电量(度)", sort = 140)
|
||||
@ApiModelProperty("套餐结束使用的电量")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal suitEndEle;
|
||||
|
||||
@Excel(name = "套餐收费模式")
|
||||
@Excel(name = "套餐收费模式", dictType = DictTypeConstants.SUIT_FEE_MODE, sort = 150)
|
||||
@ApiModelProperty("套餐收费模式")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String suitFeeMode;
|
||||
|
||||
@Excel(name = "套餐收费类型")
|
||||
@Excel(name = "套餐收费类型", dictType = DictTypeConstants.SUIT_FEE_TYPE, sort = 160)
|
||||
@ApiModelProperty("套餐收费类型")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String suitFeeType;
|
||||
|
||||
@Excel(name = "套餐档位金额列表")
|
||||
@ApiModelProperty("套餐档位金额列表")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private List<BigDecimal> suitGearAmount;
|
||||
|
||||
@Excel(name = "套餐时段档位列表")
|
||||
@ApiModelProperty("套餐时段档位列表")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private List<Integer> suitGearTime;
|
||||
|
||||
@Excel(name = "套餐金额/押金", readConverterExp = "元=")
|
||||
@ApiModelProperty("套餐金额/押金")
|
||||
@Excel(name = "套餐价格", sort = 170)
|
||||
@ApiModelProperty("套餐价格")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal suitPrice;
|
||||
|
||||
|
@ -197,18 +199,22 @@ public class TransactionBill extends BaseEntity
|
|||
@JsonView(JsonViewProfile.App.class)
|
||||
private Long storeId;
|
||||
|
||||
@Excel(name = "店铺名称", sort = 180)
|
||||
@ApiModelProperty("店铺名称")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String storeName;
|
||||
|
||||
@Excel(name = "店铺地址", sort = 190)
|
||||
@ApiModelProperty("店铺地址")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String storeAddress;
|
||||
|
||||
@Excel(name = "设备名称", sort = 21)
|
||||
@ApiModelProperty("设备名称")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String deviceName;
|
||||
|
||||
@Excel(name = "套餐名称", sort = 70)
|
||||
@ApiModelProperty("套餐名称")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String suitName;
|
||||
|
@ -217,20 +223,18 @@ public class TransactionBill extends BaseEntity
|
|||
@JsonView(JsonViewProfile.App.class)
|
||||
private String deviceMac;
|
||||
|
||||
@Excel(name = "设备MAC2")
|
||||
@ApiModelProperty("设备MAC2")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String deviceMac2;
|
||||
|
||||
@Excel(name = "设备产品ID")
|
||||
@ApiModelProperty("设备产品ID")
|
||||
private String deviceProductId;
|
||||
|
||||
@Excel(name = "设备服务费模式", readConverterExp = "1=-直营模式,2-代理模式")
|
||||
@ApiModelProperty("设备服务费模式")
|
||||
private String deviceServiceMode;
|
||||
|
||||
@ApiModelProperty("总计退款金额")
|
||||
@Excel(name = "退款金额", sort = 12)
|
||||
@ApiModelProperty("退款金额")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
|
@ -253,120 +257,106 @@ public class TransactionBill extends BaseEntity
|
|||
@ApiModelProperty("提现审核时的二维码")
|
||||
private String offlineImage;
|
||||
|
||||
@Excel(name = "押金支付成功的支付订单ID")
|
||||
@ApiModelProperty("押金支付成功的支付订单ID")
|
||||
private Long depositPayId;
|
||||
|
||||
@Excel(name = "支付成功的支付订单ID")
|
||||
@ApiModelProperty("支付成功的支付订单ID")
|
||||
private Long payId;
|
||||
|
||||
@Excel(name = "订单是否开启低功率自动关闭")
|
||||
@Excel(name = "低功率自动关闭", readConverterExp = "true=开启,false=关闭", sort = 200)
|
||||
@ApiModelProperty("订单是否开启低功率自动关闭")
|
||||
private Boolean suitEnableLowPowerClose;
|
||||
|
||||
@Excel(name = "订单低功率自动关闭值", readConverterExp = "瓦=")
|
||||
@ApiModelProperty("订单低功率自动关闭值")
|
||||
@Excel(name = "自动关闭阈值(瓦)", sort = 210)
|
||||
@ApiModelProperty("自动关闭阈值")
|
||||
private BigDecimal suitLowPower;
|
||||
|
||||
@Excel(name = "版本号")
|
||||
@ApiModelProperty("版本号")
|
||||
private Integer version;
|
||||
|
||||
@Excel(name = "设备关闭状态(1-已关闭,2-未关闭)")
|
||||
@ApiModelProperty("设备关闭状态(1-已关闭,2-未关闭)")
|
||||
private String closeStatus;
|
||||
|
||||
@Excel(name = "设备关闭状态描述")
|
||||
@ApiModelProperty("设备关闭状态描述")
|
||||
private String closeResult;
|
||||
|
||||
@Excel(name = "代理商ID")
|
||||
@ApiModelProperty("代理商ID")
|
||||
private Long agentId;
|
||||
|
||||
@Excel(name = "代理商手机号")
|
||||
@ApiModelProperty("代理商手机号")
|
||||
private String agentMobile;
|
||||
|
||||
@Excel(name = "套餐是否开启语音播报")
|
||||
@ApiModelProperty("套餐是否开启语音播报")
|
||||
@Excel(name = "语音播报", readConverterExp = "true=开启,false=关闭", sort = 220)
|
||||
@ApiModelProperty("语音播报")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private Boolean suitEnabledVoid;
|
||||
|
||||
@Excel(name = "套餐语音播报阈值", readConverterExp = "分=钟")
|
||||
@ApiModelProperty("套餐语音播报阈值")
|
||||
@Excel(name = "语音播报阈值(分钟)", sort = 230)
|
||||
@ApiModelProperty("语音播报阈值")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal suitVoidMinute;
|
||||
|
||||
@Excel(name = "套餐语音播报设置结果", readConverterExp = "1=-成功,2-失败")
|
||||
@ApiModelProperty("套餐语音播报设置结果")
|
||||
private String suitVoidResult;
|
||||
|
||||
@Excel(name = "套餐语音播报设置结果描述")
|
||||
@ApiModelProperty("套餐语音播报设置结果描述")
|
||||
private String suitVoidMsg;
|
||||
|
||||
@Excel(name = "套餐押金", readConverterExp = "元=")
|
||||
@Excel(name = "套餐押金(元)", sort = 71)
|
||||
@ApiModelProperty("套餐押金")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal suitDeposit;
|
||||
|
||||
@Excel(name = "设备开启状态描述")
|
||||
@ApiModelProperty("设备开启状态描述")
|
||||
private String openMsg;
|
||||
|
||||
@Excel(name = "用户手机号")
|
||||
@Excel(name = "用户手机号", sort = 240)
|
||||
@ApiModelProperty("用户手机号")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String userMobile;
|
||||
|
||||
@Excel(name = "商户是否展示用户手机号")
|
||||
@ApiModelProperty("商户是否展示用户手机号")
|
||||
@Excel(name = "展示用户手机号", readConverterExp = "true=展示,false=不展示", sort = 250)
|
||||
@ApiModelProperty("展示用户手机号")
|
||||
private Boolean mchShowMobile;
|
||||
|
||||
@Excel(name = "商户展示手机号价格")
|
||||
@ApiModelProperty("商户展示手机号价格")
|
||||
@Excel(name = "手机号价格", sort = 260)
|
||||
@ApiModelProperty("手机号价格")
|
||||
private BigDecimal mchShowMobilePrice;
|
||||
|
||||
@Excel(name = "商户展示手机号缴费状态", readConverterExp = "1=-待缴费,2-已缴费")
|
||||
@ApiModelProperty("商户展示手机号缴费状态")
|
||||
@Excel(name = "展示手机号缴费状态", dictType = DictTypeConstants.RECHARGE_MCH_SHOW_MOBILE_STATUS, sort = 270)
|
||||
@ApiModelProperty("展示手机号缴费状态")
|
||||
private String mchShowMobileStatus;
|
||||
|
||||
@Excel(name = "渠道类型", dictType = DictTypeConstants.RECHARGE_CHANNEL_TYPE)
|
||||
@ApiModelProperty("渠道类型")
|
||||
private String channelType;
|
||||
|
||||
@Excel(name = "使用vip的ID")
|
||||
@ApiModelProperty("使用vip的ID")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private Long vipId;
|
||||
|
||||
@Excel(name = "会员折扣")
|
||||
@Excel(name = "会员折扣", sort = 56)
|
||||
@ApiModelProperty("会员折扣")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal vipDiscount;
|
||||
|
||||
@Excel(name = "会员名称")
|
||||
@Excel(name = "会员名称", sort = 55)
|
||||
@ApiModelProperty("会员名称")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String vipName;
|
||||
|
||||
@Excel(name = "优惠金额")
|
||||
@Excel(name = "优惠金额", sort = 13)
|
||||
@ApiModelProperty("优惠金额")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal discountAmount;
|
||||
|
||||
@Excel(name = "优惠金额退款")
|
||||
@Excel(name = "优惠金额退款", sort = 14)
|
||||
@ApiModelProperty("优惠金额退款")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private BigDecimal discountRefundAmount;
|
||||
|
||||
@Excel(name = "提现账户")
|
||||
@ApiModelProperty("提现账户")
|
||||
private AccountVO withdrawAccount;
|
||||
|
||||
@Excel(name = "是否已经处理过结束流程")
|
||||
@ApiModelProperty("是否已经处理过结束流程")
|
||||
private Boolean finished;
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import java.util.List;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
import com.fasterxml.jackson.annotation.JsonView;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.annotation.Sensitive;
|
||||
import com.ruoyi.common.core.domain.JsonViewProfile;
|
||||
import com.ruoyi.common.enums.DesensitizedType;
|
||||
|
@ -26,21 +27,24 @@ import lombok.Data;
|
|||
@ApiModel
|
||||
@Data
|
||||
public class TransactionBillVO extends TransactionBill implements IotDevice {
|
||||
@Excel(name = "用户", sort = 22)
|
||||
@ApiModelProperty("用户名称")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
@Sensitive(desensitizedType = DesensitizedType.USERNAME)
|
||||
private String userName;
|
||||
|
||||
@ApiModelProperty("商户(到账用户)名称")
|
||||
@Excel(name = "商户", sort = 23)
|
||||
@ApiModelProperty("商户")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
@Sensitive(desensitizedType = DesensitizedType.COMMON)
|
||||
private String mchName;
|
||||
|
||||
@ApiModelProperty("支付渠道名称")
|
||||
@Excel(name = "支付渠道", sort = 24)
|
||||
@ApiModelProperty("支付渠道")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String channelName;
|
||||
|
||||
@ApiModelProperty("商户手机号")
|
||||
@ApiModelProperty("商户手机")
|
||||
@JsonView(JsonViewProfile.App.class)
|
||||
private String mchMobile;
|
||||
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
package com.ruoyi.web.controller.app;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
import com.ruoyi.ss.hardVersion.service.HardVersionService;
|
||||
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/app/hardVersion")
|
||||
public class AppHardVersionController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private HardVersionService hardVersionService;
|
||||
|
||||
@ApiOperation("获取最新一个硬件版本")
|
||||
@GetMapping("/lastOne")
|
||||
public AjaxResult getLastOne(HardVersionQuery query) {
|
||||
PageHelper.orderBy("create_time desc");
|
||||
HardVersionVO hardVersion = hardVersionService.selectOne(query);
|
||||
return success(hardVersion);
|
||||
}
|
||||
|
||||
}
|
|
@ -7,6 +7,8 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
@ -31,6 +33,7 @@ import com.ruoyi.common.enums.BusinessType;
|
|||
import com.ruoyi.common.enums.OperatorType;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.ServiceUtil;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.dashboard.index.domain.vo.BillCountVo;
|
||||
import com.ruoyi.ss.device.service.DeviceService;
|
||||
import com.ruoyi.ss.device.service.DeviceValidator;
|
||||
|
@ -154,6 +157,22 @@ public class AppTransactionBillController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 导出订单列表
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TransactionBillQuery query) {
|
||||
startPage();
|
||||
query.setIncomeUserId(getUserId());
|
||||
query.setType(TransactionBillType.RECHARGE.getType());
|
||||
List<TransactionBillVO> list = transactionBillService.selectSmTransactionBillList(query);
|
||||
transactionAssembler.assembleChannelName(list);
|
||||
transactionAssembler.handleMchUserMobile(list);
|
||||
ExcelUtil<TransactionBillVO> util = new ExcelUtil<TransactionBillVO>(TransactionBillVO.class);
|
||||
util.exportExcel(response, list, "充值订单数据");
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单详情")
|
||||
@GetMapping("/{billId}")
|
||||
@JsonView(JsonViewProfile.AppUser.class)
|
||||
|
|
|
@ -0,0 +1,115 @@
|
|||
package com.ruoyi.web.controller.ss;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
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 com.ruoyi.ss.hardVersion.domain.HardVersion;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionQuery;
|
||||
import com.ruoyi.ss.hardVersion.domain.HardVersionVO;
|
||||
import com.ruoyi.ss.hardVersion.service.HardVersionAssembler;
|
||||
import com.ruoyi.ss.hardVersion.service.HardVersionService;
|
||||
|
||||
/**
|
||||
* 硬件版本Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-03-11
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ss/hardVersion")
|
||||
public class HardVersionController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private HardVersionService hardVersionService;
|
||||
|
||||
@Autowired
|
||||
private HardVersionAssembler hardVersionAssembler;
|
||||
|
||||
/**
|
||||
* 查询硬件版本列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ss:hardVersion:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(HardVersionQuery query)
|
||||
{
|
||||
startPage();
|
||||
startOrderBy();
|
||||
List<HardVersionVO> list = hardVersionService.selectHardVersionList(query);
|
||||
hardVersionAssembler.assembleModelList(list);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出硬件版本列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ss:hardVersion:export')")
|
||||
@Log(title = "硬件版本", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, HardVersionQuery query)
|
||||
{
|
||||
List<HardVersionVO> list = hardVersionService.selectHardVersionList(query);
|
||||
ExcelUtil<HardVersionVO> util = new ExcelUtil<HardVersionVO>(HardVersionVO.class);
|
||||
util.exportExcel(response, list, "硬件版本数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取硬件版本详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ss:hardVersion:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(hardVersionService.selectHardVersionById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增硬件版本
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ss:hardVersion:add')")
|
||||
@Log(title = "硬件版本", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody HardVersion hardVersion)
|
||||
{
|
||||
return toAjax(hardVersionService.insertHardVersion(hardVersion));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改硬件版本
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ss:hardVersion:edit')")
|
||||
@Log(title = "硬件版本", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody HardVersion hardVersion)
|
||||
{
|
||||
return toAjax(hardVersionService.updateHardVersion(hardVersion));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除硬件版本
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('ss:hardVersion:remove')")
|
||||
@Log(title = "硬件版本", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(hardVersionService.deleteHardVersionByIds(ids));
|
||||
}
|
||||
}
|
|
@ -2,31 +2,33 @@ package com.ruoyi.web.controller.ss;
|
|||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.domain.ValidGroup;
|
||||
import com.ruoyi.ss.model.domain.SmModelBO;
|
||||
import com.ruoyi.ss.model.domain.SmModelQuery;
|
||||
import com.ruoyi.ss.model.domain.SmModelVO;
|
||||
import com.ruoyi.ss.model.service.ModelValidator;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.ss.model.service.ModelService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.domain.ValidGroup;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.ss.model.domain.SmModelBO;
|
||||
import com.ruoyi.ss.model.domain.SmModelQuery;
|
||||
import com.ruoyi.ss.model.domain.SmModelVO;
|
||||
import com.ruoyi.ss.model.service.ModelService;
|
||||
import com.ruoyi.ss.model.service.ModelValidator;
|
||||
|
||||
/**
|
||||
* 型号列表Controller
|
||||
|
@ -55,6 +57,16 @@ public class SmModelController extends BaseController
|
|||
return getDataTable(smModelService.selectSmModelList(smModel));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询型号列表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:model:list')")
|
||||
@GetMapping("/listByIds/{ids}")
|
||||
public AjaxResult listByIds(@PathVariable List<Long> ids)
|
||||
{
|
||||
return success(smModelService.selectSmModelListByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出型号列表列表
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue
Block a user