细节优化
This commit is contained in:
parent
16e2ead7e6
commit
2188a27e0b
|
@ -225,4 +225,9 @@ public class Device extends BaseEntity
|
||||||
@Excel(name = "服务模式:1-直营模式,2-代理模式")
|
@Excel(name = "服务模式:1-直营模式,2-代理模式")
|
||||||
@ApiModelProperty("服务模式")
|
@ApiModelProperty("服务模式")
|
||||||
private String serviceMode;
|
private String serviceMode;
|
||||||
|
|
||||||
|
@Excel(name = "月费", readConverterExp = "元=")
|
||||||
|
@ApiModelProperty("月费")
|
||||||
|
@Min(value = 0, message = "月费不允许小于0")
|
||||||
|
private BigDecimal monthFee;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class DeviceBO extends Device {
|
||||||
bo.setServiceMode(getServiceMode());
|
bo.setServiceMode(getServiceMode());
|
||||||
bo.setAgentServiceRate(getAgentServiceRate());
|
bo.setAgentServiceRate(getAgentServiceRate());
|
||||||
bo.setAgentId(getAgentId());
|
bo.setAgentId(getAgentId());
|
||||||
|
bo.setMonthFee(getMonthFee());
|
||||||
return bo;
|
return bo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +69,7 @@ public class DeviceBO extends Device {
|
||||||
bo.setServiceMode(getServiceMode());
|
bo.setServiceMode(getServiceMode());
|
||||||
bo.setAgentServiceRate(getAgentServiceRate());
|
bo.setAgentServiceRate(getAgentServiceRate());
|
||||||
bo.setAgentId(getAgentId());
|
bo.setAgentId(getAgentId());
|
||||||
|
bo.setMonthFee(getMonthFee());
|
||||||
return bo;
|
return bo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,4 +79,7 @@ public class DeviceQuery extends Device {
|
||||||
|
|
||||||
@ApiModelProperty("模糊查询任意MAC")
|
@ApiModelProperty("模糊查询任意MAC")
|
||||||
private String likeAnyMac;
|
private String likeAnyMac;
|
||||||
|
|
||||||
|
@ApiModelProperty("代理名称")
|
||||||
|
private String agentName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,6 +81,9 @@ public class DeviceVO extends Device implements IotDevice {
|
||||||
@ApiModelProperty("最终生效的服务费率")
|
@ApiModelProperty("最终生效的服务费率")
|
||||||
private BigDecimal realServiceRate;
|
private BigDecimal realServiceRate;
|
||||||
|
|
||||||
|
@ApiModelProperty("代理名称")
|
||||||
|
private String agentName;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String iotMac1() {
|
public String iotMac1() {
|
||||||
return getMac();
|
return getMac();
|
||||||
|
|
|
@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="deviceNo != null"> and sd.device_no like concat('%', #{deviceNo}, '%')</if>
|
<if test="deviceNo != null"> and sd.device_no like concat('%', #{deviceNo}, '%')</if>
|
||||||
<if test="lockUserId != null"> and sd.lock_user_id = #{lockUserId}</if>
|
<if test="lockUserId != null"> and sd.lock_user_id = #{lockUserId}</if>
|
||||||
<if test="agentId != null "> and agent_id = #{agentId}</if>
|
<if test="agentId != null "> and agent_id = #{agentId}</if>
|
||||||
|
<if test="agentName != null and agentName != ''"> and sua.user_name like concat('%', #{agentName}, '%')</if>
|
||||||
<if test="serviceMode != null and serviceMode != ''"> and service_mode = #{serviceMode}</if>
|
<if test="serviceMode != null and serviceMode != ''"> and service_mode = #{serviceMode}</if>
|
||||||
<if test="isArrears != null">
|
<if test="isArrears != null">
|
||||||
<if test="isArrears">
|
<if test="isArrears">
|
||||||
|
@ -145,6 +146,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
sd.agent_service_rate,
|
sd.agent_service_rate,
|
||||||
sd.agent_id,
|
sd.agent_id,
|
||||||
sd.service_mode,
|
sd.service_mode,
|
||||||
|
sd.month_fee,
|
||||||
sm.model_name as model,
|
sm.model_name as model,
|
||||||
sm.picture as picture,
|
sm.picture as picture,
|
||||||
sm.tags as model_tags,
|
sm.tags as model_tags,
|
||||||
|
@ -154,11 +156,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ss.contact_mobile as store_contact_mobile,
|
ss.contact_mobile as store_contact_mobile,
|
||||||
su.phonenumber as user_mobile,
|
su.phonenumber as user_mobile,
|
||||||
su.user_name as user_name,
|
su.user_name as user_name,
|
||||||
su.service_rate as user_service_rate
|
su.service_rate as user_service_rate,
|
||||||
|
sua.user_name as agent_name
|
||||||
from sm_device sd
|
from sm_device sd
|
||||||
left join sm_model sm on sm.model_id = sd.model_id
|
left join sm_model sm on sm.model_id = sd.model_id
|
||||||
left join sm_store ss on ss.store_id = sd.store_id
|
left join sm_store ss on ss.store_id = sd.store_id
|
||||||
left join sm_user su on su.user_id = sd.user_id
|
left join sm_user su on su.user_id = sd.user_id
|
||||||
|
left join sm_user sua on sua.user_id = sd.agent_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectSmDeviceList" parameterType="DeviceQuery" resultMap="SmDeviceResult">
|
<select id="selectSmDeviceList" parameterType="DeviceQuery" resultMap="SmDeviceResult">
|
||||||
|
@ -322,6 +326,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="agentServiceRate != null">agent_service_rate,</if>
|
<if test="agentServiceRate != null">agent_service_rate,</if>
|
||||||
<if test="agentId != null">agent_id,</if>
|
<if test="agentId != null">agent_id,</if>
|
||||||
<if test="serviceMode != null">service_mode,</if>
|
<if test="serviceMode != null">service_mode,</if>
|
||||||
|
<if test="monthFee != null">month_fee,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="storeId != null">#{storeId},</if>
|
<if test="storeId != null">#{storeId},</if>
|
||||||
|
@ -369,6 +374,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="agentServiceRate != null">#{agentServiceRate},</if>
|
<if test="agentServiceRate != null">#{agentServiceRate},</if>
|
||||||
<if test="agentId != null">#{agentId},</if>
|
<if test="agentId != null">#{agentId},</if>
|
||||||
<if test="serviceMode != null">#{serviceMode},</if>
|
<if test="serviceMode != null">#{serviceMode},</if>
|
||||||
|
<if test="monthFee != null">#{monthFee},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -437,6 +443,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="agentServiceRate != null">agent_service_rate = #{agentServiceRate},</if>
|
<if test="agentServiceRate != null">agent_service_rate = #{agentServiceRate},</if>
|
||||||
<if test="agentId != null">agent_id = #{agentId},</if>
|
<if test="agentId != null">agent_id = #{agentId},</if>
|
||||||
<if test="serviceMode != null">service_mode = #{serviceMode},</if>
|
<if test="serviceMode != null">service_mode = #{serviceMode},</if>
|
||||||
|
<if test="monthFee != null">month_fee = #{monthFee},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where device_id = #{deviceId}
|
where device_id = #{deviceId}
|
||||||
</update>
|
</update>
|
||||||
|
|
|
@ -492,7 +492,7 @@ public class TransactionBillServiceImpl implements TransactionBillService, After
|
||||||
LocalDateTime limitWithdrawTime = user.getLimitWithdrawTime();
|
LocalDateTime limitWithdrawTime = user.getLimitWithdrawTime();
|
||||||
if (limitWithdrawTime == null) {
|
if (limitWithdrawTime == null) {
|
||||||
throw new ServiceException("您被永久限制提现:" + user.getLimitWithdrawReason());
|
throw new ServiceException("您被永久限制提现:" + user.getLimitWithdrawReason());
|
||||||
} else {
|
} else if (limitWithdrawTime.isAfter(LocalDateTime.now())){
|
||||||
throw new ServiceException("您被限制提现至" + DateUtils.format(limitWithdrawTime, DateUtils.YYYY_MM_DD_HH_MM_SS) + ":" + user.getLimitWithdrawReason() );
|
throw new ServiceException("您被限制提现至" + DateUtils.format(limitWithdrawTime, DateUtils.YYYY_MM_DD_HH_MM_SS) + ":" + user.getLimitWithdrawReason() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -254,7 +254,7 @@ public class AppTransactionBillController extends BaseController
|
||||||
LocalDateTime limitRefundTime = user.getLimitRefundTime();
|
LocalDateTime limitRefundTime = user.getLimitRefundTime();
|
||||||
if (limitRefundTime == null) {
|
if (limitRefundTime == null) {
|
||||||
throw new ServiceException("您被永久限制退款:" + user.getLimitRefundReason());
|
throw new ServiceException("您被永久限制退款:" + user.getLimitRefundReason());
|
||||||
} else {
|
} else if (limitRefundTime.isAfter(LocalDateTime.now())){
|
||||||
throw new ServiceException("您被限制退款至" + DateUtils.format(limitRefundTime, DateUtils.YYYY_MM_DD_HH_MM_SS) + ":" + user.getLimitRefundReason() );
|
throw new ServiceException("您被限制退款至" + DateUtils.format(limitRefundTime, DateUtils.YYYY_MM_DD_HH_MM_SS) + ":" + user.getLimitRefundReason() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user