提交 deda8f8d 作者: han

优化

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