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