Commit 210b1074 authored by codezwjava's avatar codezwjava

bug修改

parent b50207fc
......@@ -58,4 +58,6 @@ public interface OrderMapper extends BaseMapper<OrderInfo> {
List<OrderInfo> getByCreateTime(@Param("created") Date created);
List<OrderInfo> getByLevelStatus(int levelStatus);
List<OrderInfo> getByMonthOrderStatus(int monthOrderStatus);
}
......@@ -165,4 +165,13 @@
</where>
</select>
<select id="getByMonthOrderStatus" resultType="cn.wisenergy.model.app.OrderInfo">
select
<include refid="cols_all"/>
from
<include refid="table"/>
where
month_order_status = #{monthOrderStatus}
</select>
</mapper>
\ No newline at end of file
......@@ -13,6 +13,7 @@ import org.bouncycastle.pqc.crypto.newhope.NHOtherInfoGenerator;
import org.bytedeco.javacpp.presets.opencv_core;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -79,6 +80,7 @@ public class AerialDeliveryUserServiceImpl implements AerialDeliveryUserService
}
@Override
@Transactional
public void userSetBeinviteCode(String userId, String userInvitedId){
//3、上级用户的直推表数据维护
recommendInfoDataPreserve(userId,userInvitedId);
......
......@@ -17,18 +17,24 @@ public class LastMonthUserInfoServiceImpl implements LastMonthUserInfoService {
@Override
public void userInfoMirrorImage() {
//把用户表user_info备份
log.info("user_info表进行镜像开始");
lastAccountMapper.copyTable("user_info","user_info_image");
lastAccountMapper.deleteTable("user_info_backup");
lastAccountMapper.updateTableName("user_info_image","user_info_backup");
log.info("user_info表进行镜像成功");
//recommend_user表备份
log.info("user_info表进行镜像开始");
lastAccountMapper.copyTable("recommend_user","recommend_user_image");
lastAccountMapper.deleteTable("recommend_user_backup");
lastAccountMapper.updateTableName("recommend_user_image","recommend_user_backup");
log.info("user_info表进行镜像成功");
//team_user_info表备份
log.info("user_info表进行镜像开始");
lastAccountMapper.copyTable("team_user_info","team_user_info_image");
lastAccountMapper.deleteTable("team_user_info_backup");
lastAccountMapper.updateTableName("team_user_info_image","team_user_info_backup");
log.info("user_info表进行镜像成功");
}
}
......@@ -323,12 +323,12 @@ public class UserServiceImpl extends ServiceImpl<UsersMapper, User> implements U
return R.error("推荐人不能是自己!");
}
//更新推荐用户的等级或者直推人数
aerialDeliveryUserService.userSetBeinviteCode(userId, userCode.getUserId());
//5、设置用户被邀请码
user.setBeInvitedCode(inviteCode);
int count = usersMapper.edit(user);
//更新推荐用户的等级或者直推人数
aerialDeliveryUserService.userSetBeinviteCode(userId, userCode.getUserId());
if (count == 0) {
return R.ok(1, false);
}
......
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