Commit 9582f8aa authored by codezwjava's avatar codezwjava

Merge remote-tracking branch 'origin/master'

parents 72371fa9 6950c48d
......@@ -73,4 +73,11 @@ public interface AccountMapper extends BaseMapper<AccountInfo> {
* @return 账户列表
*/
List<AccountInfo> getList(Map<String,Object> map);
/**
* 更新账户表时间为当前月,月收益为0
* @param yearMonth 时间
* @return >1
*/
int updateMoneyAndEarningsMonth(@Param("yearMonth") String yearMonth);
}
......@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
import java.util.Map;
......@@ -41,7 +42,7 @@ public interface UsersMapper extends BaseMapper<User> {
*/
int delById(@Param("id") Integer id);
List<User> getList(Map<String, Object> map);
List<User> getList();
/**
* 获取所有的非普通用户列表
......@@ -105,7 +106,6 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 查询用户
*
*
* @param param
* @return
*/
......@@ -125,7 +125,7 @@ public interface UsersMapper extends BaseMapper<User> {
* @param beInvitedCode
* @param userLevel
*/
Integer insertbyint(@Param("userId") String userId, @Param("inviteCode") String inviteCode, @Param("beInvitedCode") String beInvitedCode, @Param("userLevel") Integer userLevel, @Param("headImage") String headImage,@Param("frozen") Integer frozen);
Integer insertbyint(@Param("userId") String userId, @Param("inviteCode") String inviteCode, @Param("beInvitedCode") String beInvitedCode, @Param("userLevel") Integer userLevel, @Param("headImage") String headImage, @Param("frozen") Integer frozen);
Integer save(@Param("userId") String userId, @Param("beInvitedCode") String beInvitedCode);
......@@ -205,6 +205,7 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 根据邀请码获取所有的下级用户
*
* @param userId
* @return
*/
......@@ -212,6 +213,7 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 根据当前用户的推荐人邀请码获取推荐人的用户信息(上级用户信息)
*
* @param beInvitedCode
* @return
*/
......@@ -219,6 +221,7 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 获取在团队中处于同一位置的用户集合
*
* @param beInvitedCode
* @return
*/
......@@ -226,6 +229,7 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 通过邀请码获取用户信息
*
* @param inviteCode
* @return
*/
......@@ -233,6 +237,7 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 根据用户的userid查询用户对象
*
* @param userId
* @return
*/
......@@ -240,6 +245,7 @@ public interface UsersMapper extends BaseMapper<User> {
/**
* 分页查询所有用户信息
*
* @param map
* @return
*/
......@@ -251,6 +257,6 @@ public interface UsersMapper extends BaseMapper<User> {
* @param map 入参
* @return 结果
*/
int countUser( Map<String, Object> map);
int countUser(Map<String, Object> map);
}
......@@ -134,4 +134,9 @@
</where>
</update>
<update id="updateMoneyAndEarningsMonth">
update <include refid="table"/>
set earnings_month=0,`year_month`=#{yearMonth}
</update>
</mapper>
\ No newline at end of file
......@@ -105,10 +105,6 @@
<include refid="table"/>
<where>
be_invited_code=1
<if test="createTime != null">
and(YEAR(create_time) = YEAR(#{createTime})
AND MONTH(create_time) = MONTH(#{createTime}))
</if>
</where>
order by create_time desc
</select>
......
......@@ -325,6 +325,10 @@ public class MonthTaskServiceImpl implements MonthTaskService {
//5、删除month_account_image DROP table table_2;
lastAccountMapper.deleteTable("month_account_image");
//6、把account_info的月度收益改为0,yearMoney 改为本月
String yearMonth = DateUtil.convertDateToStr(new Date(), "yyyy-MM");
accountMapper.updateMoneyAndEarningsMonth(yearMonth);
}
@XxlJob(value = "runCenterSubsidyMonthTask")
......
......@@ -272,10 +272,8 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
@Override
public R<AerialDeliveryVo> queryAerialDelivery() {
log.info("shop-mall[]UserServiceImpl[]queryAerialDelivery[]input.method");
//获取本月新注册用户
Map<String, Object> map = new HashMap<>(4);
map.put("createTime", new Date());
List<User> list = usersMapper.getList(map);
//获取空投池用户
List<User> list = usersMapper.getList();
if (CollectionUtils.isEmpty(list)) {
return R.ok(new AerialDeliveryVo());
}
......
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