查询签到人数 bug
This commit is contained in:
@@ -99,10 +99,13 @@ public class AppInviteController {
|
||||
@ApiOperation("我的收益")
|
||||
@ResponseBody
|
||||
public Result selectInviteMoney(@RequestAttribute("userId") Long userId) {
|
||||
UserEntity userEntity = userService.selectUserById(userId);
|
||||
if (userEntity == null) {
|
||||
return Result.error("用户不存在");
|
||||
}
|
||||
InviteMoney inviteMoney = inviteMoneyService.selectInviteMoneyByUserId(userId);
|
||||
Integer inviteCount = inviteService.selectInviteCount(-1, userId);
|
||||
// Integer inviteSignCount = inviteService.selectInviteCount(1, userId);
|
||||
Integer inviteSignCount = inviteService.selectInviteSignCount(userId);
|
||||
Integer inviteSignCount = inviteService.selectInviteSignCount(userEntity.getInvitationCode());
|
||||
Map<String, Double> earningMap = userMoneyDetailsService.queryUserTotalEarning(userId);
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("inviteMoney", inviteMoney);
|
||||
|
||||
@@ -20,7 +20,7 @@ public interface InviteDao extends BaseMapper<Invite> {
|
||||
IPage<Invite> selectInviteList(Page<Map<String,Object>> page, @Param("state") Integer state, @Param("userId") Long userId);
|
||||
|
||||
Integer selectInviteCount(@Param("state") Integer state, @Param("userId") Long userId);
|
||||
Integer selectInviteSignCount(@Param("userId") Long userId);
|
||||
Integer selectInviteSignCount(@Param("code") String code);
|
||||
|
||||
Double selectInviteSum(@Param("state") Integer state, @Param("userId") Long userId);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface InviteService {
|
||||
PageUtils selectInviteList(int page, int limit, Integer state, Long userId);
|
||||
|
||||
Integer selectInviteCount(Integer state,Long userId);
|
||||
Integer selectInviteSignCount(Long userId);
|
||||
Integer selectInviteSignCount(String code);
|
||||
|
||||
Double selectInviteSum(Integer state,Long userId);
|
||||
|
||||
|
||||
@@ -113,8 +113,8 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer selectInviteSignCount(Long userId) {
|
||||
return inviteDao.selectInviteSignCount(userId);
|
||||
public Integer selectInviteSignCount(String code) {
|
||||
return inviteDao.selectInviteSignCount(code);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -215,7 +215,7 @@ public class WuyouController {
|
||||
}
|
||||
|
||||
if (payDetails.getState() == 1) {
|
||||
log.info("订单表信息丢失!");
|
||||
log.info("重复回调!参数: {}", JSONObject.toJSONString(notifyDto));
|
||||
return "success";
|
||||
}
|
||||
|
||||
|
||||
@@ -720,8 +720,6 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
||||
sumQuery.groupBy("user_id");
|
||||
List<Map<String, Object>> sumList = baseMapper.selectMaps(sumQuery);
|
||||
|
||||
System.out.println("sumList = " + sumList);
|
||||
|
||||
for (Map<String, Object> objectMap : sumList) {
|
||||
Double totalMoney = Convert.toDouble(objectMap.get("money"));
|
||||
Integer total = Convert.toInt(objectMap.get("total"));
|
||||
|
||||
@@ -52,10 +52,19 @@
|
||||
</select>
|
||||
|
||||
<select id="selectInviteSignCount" resultType="Integer">
|
||||
select count(*)
|
||||
from invite
|
||||
inner join user_sign_record record on invite.invitee_user_id = record.user_id
|
||||
where invite.user_id=#{userId}
|
||||
SELECT
|
||||
count(*)
|
||||
FROM
|
||||
tb_user tu
|
||||
LEFT JOIN
|
||||
(SELECT user_id
|
||||
FROM orders
|
||||
WHERE pay_way = 9
|
||||
AND `status` = 1
|
||||
GROUP BY user_id
|
||||
HAVING COUNT(*) >= 3) sub_orders ON tu.user_id = sub_orders.user_id
|
||||
WHERE
|
||||
tu.inviter_code = #{code};
|
||||
</select>
|
||||
|
||||
<select id="selectInviteSum" resultType="Double">
|
||||
@@ -114,4 +123,4 @@
|
||||
left join tb_user u on u.user_id=b.userId
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user