提交 deda8f8d 作者: han

优化

上级 3bf25a5f
......@@ -15,16 +15,16 @@ import java.math.BigDecimal;
public class MessageTimeVO implements Serializable {
private static final long serialVersionUID = -1481188328848093579L;
@ApiModelProperty(value = "购买聊天时长的类型", example = "1")
@NotNull(message = "类型不能为空")
@ApiModelProperty(value = "购买聊天时长的类型id,唯一识别id", example = "1")
@NotNull(message = "类型id不能为空")
private Integer id;
@ApiModelProperty(value = "微信支付金额", example = "5")
@ApiModelProperty(value = "微信支付金额,单位(元)", example = "5")
private BigDecimal money;
@ApiModelProperty(value = "购买的积分数额", example = "200")
private Integer points;
@ApiModelProperty(value = "聊天时长", example = "7")
@ApiModelProperty(value = "聊天时长,单位(天)", example = "7")
private Integer chatDuration;
}
......@@ -114,7 +114,7 @@ public class MessageController extends BaseController{
return messageService.purchaseTime(userAccountId,messageTimeVO,token);
}
@ApiOperation(value = "返回聊天时长选购类型")
@ApiOperation(value = "返回给小程序端聊天时长选购类型")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("/listTimeType")
public ResultBody listTimeType(){
......
......@@ -276,7 +276,7 @@ public class MessageServiceImpl implements MessageService {
}else if(messageTimeVO.getPoints() > 0){
ChangeUserPointVO changeUserPointVO = new ChangeUserPointVO();
changeUserPointVO.setUserAccountId(userAccountId);
changeUserPointVO.setChangePoint(messageTimeVO1.getPoints());
changeUserPointVO.setChangePoint(-messageTimeVO1.getPoints());
changeUserPointVO.setChangeType(8);
ResultBody resultBody = userPointsService.change(changeUserPointVO);
if (!"200".equals(resultBody.getCode())) {
......
......@@ -28,7 +28,7 @@
where user_account_id = #{userAccountId}
</update>
<update id="updateBuyPointsType">
update user_message_time_type
update user_points_buy
<set>
<if test="money != null">
money = #{money},
......@@ -36,7 +36,7 @@
<if test="points != null">
points = #{points},
</if>
create_time = NOW()
update_time = NOW()
</set>
where id = #{id}
</update>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论