You've already forked FrameTour-BE
修改bug
This commit is contained in:
@ -81,4 +81,10 @@ public class AppMemberController {
|
||||
|
||||
return ApiResponse.success("");
|
||||
}
|
||||
|
||||
@GetMapping("新增或修改景区服务通知状态")
|
||||
public ApiResponse updateScenicServiceNoticeStatus(Long scenicId) {
|
||||
return memberService.updateScenicServiceNoticeStatus(scenicId);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3,7 +3,9 @@ package com.ycwl.basic.mapper.pc;
|
||||
import com.ycwl.basic.model.pc.member.entity.MemberEntity;
|
||||
import com.ycwl.basic.model.pc.member.req.MemberReqQuery;
|
||||
import com.ycwl.basic.model.pc.member.resp.MemberRespVO;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -19,4 +21,28 @@ public interface MemberMapper {
|
||||
int add(MemberEntity member);
|
||||
int deleteById(Long id);
|
||||
int update(MemberEntity member);
|
||||
|
||||
/**
|
||||
* 修改景区服务通知状态
|
||||
* @param scenicId 景区id
|
||||
* @param memberId 用户id
|
||||
* @return
|
||||
*/
|
||||
int updateScenicServiceNoticeStatus(@Param("scenicId") Long scenicId,@Param("memberId") Long memberId);
|
||||
|
||||
/**
|
||||
* 查询用户当前景区服务通知状态
|
||||
* @param scenicId 景区id
|
||||
* @param memberId 用户id
|
||||
* @return
|
||||
*/
|
||||
Integer getScenicServiceNoticeStatus(@Param("scenicId") Long scenicId,@Param("memberId") Long memberId);
|
||||
|
||||
/**
|
||||
* 添加景区服务通知状态
|
||||
* @param scenicId
|
||||
* @param memberId
|
||||
* @return
|
||||
*/
|
||||
int addScenicServiceNoticeStatus(@Param("scenicId") Long scenicId,@Param("memberId") Long memberId);
|
||||
}
|
||||
|
@ -75,4 +75,6 @@ public class MemberRespVO {
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateAt;
|
||||
private Integer orderCount;
|
||||
@ApiModelProperty("是否开启服务通知 0关闭 1开启")
|
||||
private Integer isServiceNotification;
|
||||
}
|
||||
|
@ -139,4 +139,27 @@ public class AppMemberServiceImpl implements AppMemberService {
|
||||
memberEntity.setAgreement(AgreementEnum.AGREE.getType());
|
||||
return ApiResponse.success(memberMapper.update(memberEntity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse updateScenicServiceNoticeStatus(Long scenicId) {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
Integer scenicServiceNoticeStatus = memberMapper.getScenicServiceNoticeStatus(scenicId, worker.getUserId());
|
||||
//没有就初始化为开启
|
||||
if(scenicServiceNoticeStatus==null){
|
||||
int i = memberMapper.addScenicServiceNoticeStatus(scenicId, worker.getUserId());
|
||||
if(i>0){
|
||||
return ApiResponse.success("成功");
|
||||
}else {
|
||||
return ApiResponse.fail("失败");
|
||||
}
|
||||
}else {
|
||||
// 有就修改
|
||||
int i = memberMapper.updateScenicServiceNoticeStatus(scenicId, worker.getUserId());
|
||||
if (i == 0) {
|
||||
return ApiResponse.fail("失败");
|
||||
}
|
||||
return ApiResponse.success("成功");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -184,7 +184,8 @@ public class GoodsServiceImpl implements GoodsService {
|
||||
goodsDetailVO.setVideoUrl(videoRespVO.getVideoUrl());
|
||||
goodsDetailVO.setTemplateCoverUrl(videoRespVO.getTemplateCoverUrl());
|
||||
goodsDetailVO.setCreateTime(videoRespVO.getCreateTime());
|
||||
goodsDetailVO.setPrice(videoRespVO.getTemplatePrice());
|
||||
BigDecimal templatePrice = videoRespVO.getTemplatePrice();
|
||||
goodsDetailVO.setPrice(templatePrice==null ? null : templatePrice.setScale(2));
|
||||
goodsDetailVO.setIsBuy(videoRespVO.getIsBuy());
|
||||
ScenicDeviceCountVO scenicDeviceCountVO = deviceMapper.deviceCountByScenicId(videoRespVO.getScenicId(), -1L);
|
||||
goodsDetailVO.setLensNum(scenicDeviceCountVO.getTotalDeviceCount());
|
||||
|
@ -51,5 +51,5 @@ public interface AppMemberService {
|
||||
ApiResponse<?> agreement();
|
||||
|
||||
|
||||
|
||||
ApiResponse updateScenicServiceNoticeStatus(Long scenicId);
|
||||
}
|
||||
|
Reference in New Issue
Block a user