Commit b936ff67 authored by gaoyingwei's avatar gaoyingwei

修改 小程序首页接口问题(排序,实名

parent 45d90a3f
......@@ -84,7 +84,7 @@ public class AppMemInfoController extends CyPaginationController<MemInfo> {
@CyOpeLogAnno(title = "system-会员表管理-查询会员表", businessType = CyLogTypeEnum.QUERY)
@Operation(summary="查询单一会员表", description="查询单一会员表")
@Parameters({@Parameter(name = "businessId", description = "businessId", required = true, schema = @Schema(type = "string"))})
@GetMapping("/open/memInfo/detail/{businessId:\\w+}")
@GetMapping("/memInfo/detail/{businessId:\\w+}")
public CyResult detail(@PathVariable int businessId) {
MemInfo info = memInfoServiceImpl.findById(businessId);
info.setMemWxCode(null);
......
......@@ -593,6 +593,11 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
@Transactional(propagation = Propagation.REQUIRED,isolation = Isolation.DEFAULT)
@Override
public MemFollowDTO isFollow(MemFollowDTO followDTO){
//添加实名判断
String userId = CyUserUtil.getAuthenBusinessId();
MemInfo memInfo = memInfoRepository.getInfoByUserId(userId);
if (!"1".equals(memInfo.getMemRealAuthen()))
throw new CyServiceException("请先进行实名认证");
return baseMapper.getIsFollow(followDTO);
}
/**
......@@ -614,6 +619,10 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
@Override
public CyPersistModel addLike(MemLikeDTO likeDTO) {
String userId = CyUserUtil.getAuthenBusinessId();
//添加实名判断
MemInfo info = memInfoRepository.getInfoByUserId(userId);
if (!"1".equals(info.getMemRealAuthen()))
throw new CyServiceException("请先进行实名认证");
//获取留言每天限制条数
List<DictData> userLikeConfig = dictionaryService.selectByTypes("user_like_config");
DictData dictData1 = userLikeConfig.stream().filter(item -> item.getDictLabel().equals("like_limit_count")).findFirst().orElse(null);
......
......@@ -70,7 +70,11 @@ public class MemLeaveMessageServiceImpl extends ServiceImpl<MemLeaveMessageRepos
@Override
@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.DEFAULT)
public CyPersistModel leaveMessage(MemLeaveMessage memLeaveMessage) {
//添加实名判断
String userId = CyUserUtil.getAuthenBusinessId();
MemInfo info = memInfoRepository.getInfoByUserId(userId);
if (!"1".equals(info.getMemRealAuthen()))
throw new CyServiceException("请先进行实名认证");
//获取留言每天限制条数
List<DictData> leaveMessageConfig = dictionaryService.selectByTypes("user_leave_message_config");
DictData dictData1 = leaveMessageConfig.stream().filter(item -> item.getDictLabel().equals("leave_message_limit_count")).findFirst().orElse(null);
......
......@@ -631,6 +631,7 @@
WHERE 1=1
and ouf.user_id = #{entity.loginUserId}
and su.del_flag = '0'
ORDER BY mi.mem_level desc,mi.mem_real_authen desc,mi.is_recommended desc,mi.sort,mi.mem_code desc,mi.business_id DESC
</select>
<select id="queryFollowMePaged" resultType="org.rcisoft.business.memInfo.entity.MemInfo">
SELECT mi.*
......@@ -640,6 +641,7 @@
WHERE 1=1
and ouf.target_id = #{entity.loginUserId}
and su.del_flag = '0'
ORDER BY mi.mem_level desc,mi.mem_real_authen desc,mi.is_recommended desc,mi.sort,mi.mem_code desc,mi.business_id DESC
</select>
<select id="queryEachFollowPaged" resultType="org.rcisoft.business.memInfo.entity.MemInfo">
SELECT mi.*
......@@ -648,6 +650,7 @@
LEFT JOIN mem_info mi ON mi.user_id = b.user_id
WHERE 1=1
and b.target_id = #{entity.loginUserId}
ORDER BY mi.mem_level desc,mi.mem_real_authen desc,mi.is_recommended desc,mi.sort,mi.mem_code desc,mi.business_id DESC
</select>
<delete id="deleteFollow" parameterType="org.rcisoft.business.memInfo.entity.MemFollowDTO">
delete from opm_user_follow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment