飞手开启聊天功能优惠

上级 8929225e
流水线 #8508 已通过 于阶段
in 2 分 28 秒
...@@ -160,7 +160,7 @@ public class MessageController extends BaseController{ ...@@ -160,7 +160,7 @@ public class MessageController extends BaseController{
@ApiOperation(value = "根据类型ID返回聊天时长选购类型") @ApiOperation(value = "根据类型ID返回聊天时长选购类型")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/timeTypeById") @GetMapping("/timeTypeById")
public Integer timeTypeById(@ApiParam(value = "购买聊天时长的类型id,唯一识别id", required = true) Integer typeId){ public Integer timeTypeById(@ApiParam(value = "购买聊天时长的类型id,唯一识别id", required = true) Integer typeId,HttpServletRequest request){
return messageService.timeTypeById(typeId); return messageService.timeTypeById(typeId,this.getUserLoginInfoFromRedis(request).getUserAccountId());
} }
} }
...@@ -93,5 +93,5 @@ public interface MessageService { ...@@ -93,5 +93,5 @@ public interface MessageService {
ResultBody insertTimeType(MessageTimeVO messageTimeVO); ResultBody insertTimeType(MessageTimeVO messageTimeVO);
Integer timeTypeById(Integer id); Integer timeTypeById(Integer id,Integer userId);
} }
...@@ -384,7 +384,12 @@ public class MessageServiceImpl implements MessageService { ...@@ -384,7 +384,12 @@ public class MessageServiceImpl implements MessageService {
} }
@Override @Override
public Integer timeTypeById(Integer id) { public Integer timeTypeById(Integer id,Integer userId) {
boolean isPilot = pilotCertificationDao.pilotAuditStatus(userId)==1;
if(isPilot) {
id = 4;
}
MessageTimeVO messageTimeVO1 = messageDao.selectUserMessageTimeType(id); MessageTimeVO messageTimeVO1 = messageDao.selectUserMessageTimeType(id);
BigDecimal money = messageTimeVO1.getMoney(); BigDecimal money = messageTimeVO1.getMoney();
BigDecimal amountInFen = money.multiply(new BigDecimal("100")).setScale(0, RoundingMode.DOWN); BigDecimal amountInFen = money.multiply(new BigDecimal("100")).setScale(0, RoundingMode.DOWN);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论