多语言-BusiStatus整合

This commit is contained in:
khalil
2024-04-10 16:10:21 +08:00
parent 3819931303
commit b9afd3fbe7
199 changed files with 704 additions and 8099 deletions

View File

@@ -121,7 +121,7 @@ public class AppBottomBarAdminService extends BaseService {
public void saveResource(AppBottomBarParam param) throws ServerException {
String lockKey = RedisKey.app_bottom_bar_lock.getKey();
String lockVal = jedisLockService.lock(lockKey);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVER_BUSY);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVERBUSY);
String timeSectionConflict = "与[%s]存在时段冲突,请调整后再保存";
try {

View File

@@ -7,11 +7,11 @@ import com.accompany.admin.dto.channel.ChannelContentPartitionDto;
import com.accompany.admin.dto.channel.ChannelQueryDto;
import com.accompany.admin.vo.channel.ChannelContentVo;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.BusinessException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.common.utils.StringUtils;
import com.accompany.core.enumeration.ChannelUserTypeEnum;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.core.model.Users;
import com.accompany.core.model.channel.ChannelContentPartition;
import com.accompany.core.model.channel.ChannelContentPartitionExample;
@@ -105,30 +105,30 @@ public class ChannelContentPartitionAdminService extends BaseService {
sampleList = sampleList.stream().filter(channel -> !channel.getId().equals(channelContentPartitionDto.getId())).collect(Collectors.toList());
}
if (!CollectionUtils.isEmpty(sampleList)) throw new BusinessException("渠道+用户类型的组合不能重复存在!");
if (!CollectionUtils.isEmpty(sampleList)) throw new AdminServiceException("渠道+用户类型的组合不能重复存在!");
}
//检查房主大鹅号
String roomErbanNo = channelContentPartitionDto.getRoomErbanNo();
if (StringUtils.isBlank(roomErbanNo)) throw new BusinessException("房主平台号不能为空");
if (StringUtils.isBlank(roomErbanNo)) throw new AdminServiceException("房主平台号不能为空");
List<String> roomErbanList =Arrays.stream(roomErbanNo.split(StrUtil.COMMA)).collect(Collectors.toList());
List<String> roomUidList = usersBaseService.getUidByErbanNo(roomErbanList);
String errRoomErban = checkErban(roomErbanList, roomUidList);
if (!StringUtils.isEmpty(errRoomErban)) {
throw new BusinessException("以下房主平台号:" + errRoomErban + "不正确!");
throw new AdminServiceException("以下房主平台号:" + errRoomErban + "不正确!");
}
//检查用户平台号
if (Constant.ChannelUserType.point_user.equals(channelContentPartitionDto.getUserType())) {
String userErbanNo = channelContentPartitionDto.getUserErbanNo();
if (StringUtils.isBlank(userErbanNo)) throw new BusinessException("用户平台号不能为空");
if (StringUtils.isBlank(userErbanNo)) throw new AdminServiceException("用户平台号不能为空");
//校验输入的用户平台号
List<String> erbanList = Arrays.stream(userErbanNo.split(StrUtil.COMMA)).collect(Collectors.toList());
List<String> uidStrList = usersBaseService.getUidByErbanNo(erbanList);
String errUserErban = checkErban(erbanList, uidStrList);
if (!StringUtils.isEmpty(errUserErban)) {
throw new BusinessException("以下用户平台号:" + errUserErban + "不正确!");
throw new AdminServiceException("以下用户平台号:" + errUserErban + "不正确!");
}
}
@@ -200,7 +200,7 @@ public class ChannelContentPartitionAdminService extends BaseService {
if (isCross) {
String clashMsg = "当前组合类型存在时段冲突:冲突序号:%s,冲突时段:[%s-%s]";
logger.info(String.format(clashMsg, channelContent.getId(), DateTimeUtil.convertDate(channelContent.getStartTime()), DateTimeUtil.convertDate(channelContent.getEndTime())));
throw new BusinessException(String.format(clashMsg, channelContent.getId(), DateTimeUtil.convertDate(channelContent.getStartTime()), DateTimeUtil.convertDate(channelContent.getEndTime())));
throw new AdminServiceException(String.format(clashMsg, channelContent.getId(), DateTimeUtil.convertDate(channelContent.getStartTime()), DateTimeUtil.convertDate(channelContent.getEndTime())));
}
}
}
@@ -219,7 +219,7 @@ public class ChannelContentPartitionAdminService extends BaseService {
if (isCross) {
String clashMsg = "当前组合类型存在时段冲突:冲突序号:%s,冲突平台号:%s,时段:[%s-%s]";
logger.info(String.format(clashMsg, channelContent.getId(), erban, DateTimeUtil.convertDate(channelContent.getStartTime())), DateTimeUtil.convertDate(channelContent.getStartTime()));
throw new BusinessException(String.format(clashMsg, channelContent.getId(), erban, DateTimeUtil.convertDate(channelContent.getStartTime()), DateTimeUtil.convertDate(channelContent.getStartTime())));
throw new AdminServiceException(String.format(clashMsg, channelContent.getId(), erban, DateTimeUtil.convertDate(channelContent.getStartTime()), DateTimeUtil.convertDate(channelContent.getStartTime())));
}
}
}

View File

@@ -130,7 +130,7 @@ public class ClanAdminServiceImpl implements ClanAdminService {
String lockVal = jedisLockService.lock(lockKey);
if (com.accompany.common.utils.StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {
@@ -181,7 +181,7 @@ public class ClanAdminServiceImpl implements ClanAdminService {
String lockVal = jedisLockService.lock(lockKey);
if (com.accompany.common.utils.StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {

View File

@@ -85,7 +85,7 @@ public class ChatBubbleAdminService {
if (chatBubble.getId() != null) {
ChatBubble chatBubbleById = chatBubbleService.getChatBubbleById(chatBubble.getId());
if (chatBubbleById == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "气泡不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "气泡不存在");
}
if (chatBubbleById.getType().equals(Constant.InfoCardType.VIP) && chatBubble.getType().equals(Constant.InfoCardType.NORMAL)) {
// 贵族装扮切回普通。需要先解除当前装扮与贵族之间的
@@ -111,11 +111,11 @@ public class ChatBubbleAdminService {
}
ChatBubble chatBubbleById = chatBubbleService.getChatBubbleById(bubbleId);
if (null == chatBubbleById) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "装扮不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "装扮不存在");
}
List<String> erbanStrs = Arrays.asList(erbanNos.split(","));
if (erbanStrs.size() > ONE_TIME_SEND_BUBBLE_MAX_NUM) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "单次赠送不得超过" + ONE_TIME_SEND_BUBBLE_MAX_NUM + "人!");
throw new ServiceException(BusiStatus.SERVERBUSY, "单次赠送不得超过" + ONE_TIME_SEND_BUBBLE_MAX_NUM + "人!");
}
List<String> failErbanNos = new ArrayList<>();
Date expireTime;

View File

@@ -87,7 +87,7 @@ public class InfoCardAdminService {
if (infoCard.getId() != null) {
InfoCard infoCardInDB = infoCardService.getInfoCardById(infoCard.getId());
if (infoCardInDB == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "资料卡不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "资料卡不存在");
}
if (infoCardInDB.getType().equals(Constant.InfoCardType.VIP) && infoCard.getType().equals(Constant.InfoCardType.NORMAL)) {
// 贵族装扮切回普通。需要先解除当前装扮与贵族之间的
@@ -109,11 +109,11 @@ public class InfoCardAdminService {
}
InfoCard infoCardById = infoCardService.getInfoCardById(cardId);
if (null == infoCardById) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "装扮不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "装扮不存在");
}
List<String> erbanStrs = Arrays.asList(erbanNos.split(","));
if (erbanStrs.size() > ONE_TIME_SEND_CARD_MAX_NUM) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "单次赠送不得超过" + ONE_TIME_SEND_CARD_MAX_NUM + "人!");
throw new ServiceException(BusiStatus.SERVERBUSY, "单次赠送不得超过" + ONE_TIME_SEND_CARD_MAX_NUM + "人!");
}
List<String> failErbanNos = new ArrayList<>();
Date expireTime;

View File

@@ -108,7 +108,7 @@ public class FlowTeamGroupAdminService {
} else {
FlowTeamGroup group = flowTeamGroupService.getById(groupId);
if (null == group) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "团队不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "团队不存在");
}
group.setGroupName(groupName);
flowTeamGroupService.updateById(group);
@@ -122,7 +122,7 @@ public class FlowTeamGroupAdminService {
}
FlowTeamGroup group = flowTeamGroupService.getById(groupId);
if (null == group) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "团队不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "团队不存在");
}
group.setStatus(status);
flowTeamGroupService.updateById(group);
@@ -165,7 +165,7 @@ public class FlowTeamGroupAdminService {
checkTeamName(teamName, teamId);
FlowTeamInfo team = flowTeamInfoService.getById(teamId);
if (null == team) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组不存在");
}
team.setTeamName(teamName);
flowTeamInfoService.updateById(team);
@@ -179,11 +179,11 @@ public class FlowTeamGroupAdminService {
}
FlowTeamInfo team = flowTeamInfoService.getById(teamId);
if (null == team) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组不存在");
}
// 判断当前组内是否含有团长,有团长的话不可以删除
if (teamContainsGroupLeader(teamId)) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "当前小组内有团长身份成员,无法删除小组。请将团长转移至其他小组后再删除该小组。");
throw new ServiceException(BusiStatus.SERVERBUSY, "当前小组内有团长身份成员,无法删除小组。请将团长转移至其他小组后再删除该小组。");
}
// 删除小组信息
team.setStatus(FlowTeamConstant.MemberStatus.MEMBER_STATUS_DELETED);
@@ -255,7 +255,7 @@ public class FlowTeamGroupAdminService {
Integer teamNum = countGroupValidTeam(groupId);
String maxCount = sysConfService.getDefaultSysConfValueById(Constant.SysConfId.FLOW_TEAM_MAX_TEAM_COUNT, MAX_TEAM_COUNT.toString());
if (teamNum >= Integer.parseInt(maxCount)) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "超过团队小组上限");
throw new ServiceException(BusiStatus.SERVERBUSY, "超过团队小组上限");
}
checkTeamName(teamName, null);
}
@@ -265,10 +265,10 @@ public class FlowTeamGroupAdminService {
queryWrapper.lambda().eq(FlowTeamInfo::getTeamName, teamName).eq(FlowTeamInfo::getStatus, FlowTeamConstant.MemberStatus.MEMBER_STATUS_VALID);
FlowTeamInfo flowTeamInfo = flowTeamInfoService.getOne(queryWrapper);
if (null != teamId && flowTeamInfo != null && !flowTeamInfo.getTeamId().equals(teamId)) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组名称已存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组名称已存在");
}
if (null == teamId && null != flowTeamInfo) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组名称已存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组名称已存在");
}
}
@@ -407,7 +407,7 @@ public class FlowTeamGroupAdminService {
Byte type = params.getOptType();
FlowTeamMemberInviteUser inviteRecord = flowTeamMemberInviteUserService.getByUid(uid);
if (null == inviteRecord) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "该用户没有引流团队的邀请关系");
throw new ServiceException(BusiStatus.SERVERBUSY, "该用户没有引流团队的邀请关系");
}
if (FlowTeamConstant.FlowTeamInviteUserOptType.DEL.equals(type)) {
// 解绑
@@ -443,24 +443,24 @@ public class FlowTeamGroupAdminService {
}
FlowTeamInfo team = flowTeamInfoService.getByTeamId(teamId);
if (team == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组不存在");
}
if (!team.getGroupId().equals(groupId)) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组与团队不对应");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组与团队不对应");
}
FlowTeamMember member = flowTeamMemberService.getById(memberId);
if (member == null || FlowTeamConstant.MemberStatus.MEMBER_STATUS_DELETED.equals(member.getMemberStatus())) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "成员不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "成员不存在");
}
if (!member.getTeamId().equals(teamId)) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "小组与成员不对应");
throw new ServiceException(BusiStatus.SERVERBUSY, "小组与成员不对应");
}
FlowTeamMemberInviteCode memberInviteCode = flowTeamMemberInviteCodeService.getByInviteCode(inviteCode);
if (memberInviteCode == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "邀请码不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "邀请码不存在");
}
if (!memberInviteCode.getMemberId().equals(memberId)) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "邀请码与成员不对应");
throw new ServiceException(BusiStatus.SERVERBUSY, "邀请码与成员不对应");
}
}
}

View File

@@ -278,7 +278,7 @@ public class FlowTeamService {
private void validInviteCods(List<String> inviteCodes, Long memberId, String teamId) {
// 成员邀请码最大上限
if (inviteCodes.size() > TEAM_MAX_INVITECODE_COUNT_ONE_PERSON) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "成员邀请码超过上限");
throw new ServiceException(BusiStatus.SERVERBUSY, "成员邀请码超过上限");
}
List<String> invalidCods = new ArrayList<>(inviteCodes.stream().map(String::toUpperCase).collect(Collectors.toList()));
// 从表中获取邀请码信息

View File

@@ -122,7 +122,7 @@ public class HomeResourceAdminService extends BaseService {
public void saveResource(HomeRecommenResourceParam param) throws ServiceException {
String lockKey = RedisKey.home_resource_lock.getKey();
String lockVal = jedisLockService.lock(lockKey);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVER_BUSY);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVERBUSY);
String timeSectionConflict = "与[%s]存在时段冲突,请调整后再保存";
Date now = new Date();
try {

View File

@@ -30,7 +30,7 @@ import com.google.common.collect.Lists;
import com.google.common.collect.Multimap;
import com.accompany.common.constant.Constant;
import com.accompany.common.constant.OpenBoxKeyTypeEnum;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.status.BusiStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@@ -150,7 +150,7 @@ public class UserCardsAdminService extends BaseService {
Users users = usersMap.get(uidKey);
if (users == null){
logger.error("user not found. uid:{}", uidKey);
throw new ApiException(BusiStatus.USERNOTEXISTS);
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
}
UserCardsListAdminVo listVo = new UserCardsListAdminVo();
listVo.setUid(uidKey);

View File

@@ -53,7 +53,7 @@ public class OfficialGiveKeyService extends BaseService {
try {
lockval = this.jedisLockService.lock(RedisKey.official_give_key.getKey(), 3000);
if (StringUtils.isEmpty(lockval)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
BusiResult busiResult = new BusiResult(BusiStatus.SUCCESS);
String[] arr = ernos.split("\n");

View File

@@ -155,7 +155,7 @@ public class OfficialGoldRecordService extends BaseService {
try {
lockval = this.jedisLockService.lock(RedisKey.lock_official_radish_send.getKey(), 3000);
if (StringUtils.isEmpty(lockval)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
BusiResult busiResult = new BusiResult(BusiStatus.SUCCESS);
@@ -205,7 +205,7 @@ public class OfficialGoldRecordService extends BaseService {
try {
lockval = this.jedisLockService.lock(RedisKey.lock_official_gold_send.getKey(), 3000);
if (StringUtils.isEmpty(lockval)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
BusiResult busiResult = new BusiResult(BusiStatus.SUCCESS);
@@ -286,7 +286,7 @@ public class OfficialGoldRecordService extends BaseService {
try {
lockval = this.jedisLockService.lock(RedisKey.lock_official_gold_send.getKey(), 3000);
if (StringUtils.isEmpty(lockval)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
BusiResult<Void> busiResult = new BusiResult<>(BusiStatus.SUCCESS);

View File

@@ -356,7 +356,7 @@ public class RoomSearchAdminService extends BaseService {
public int resetRoomV2(Long uid, byte permitType) throws Exception {
String lockKey = RedisKey.reset_room_type_lock.getKey(String.valueOf(uid));
String lockVal = jedisLockService.lock(lockKey);
if (com.accompany.common.utils.StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVER_BUSY);
if (com.accompany.common.utils.StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVERBUSY);
try {
Room room = roomService.getRoomByDB(uid);

View File

@@ -386,7 +386,7 @@ public class StatsUserDetailAdminService extends BaseService {
if (StringUtils.isEmpty(lockVal)) {
//拿不到锁暂不考虑
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
StopWatch stw = new StopWatch();

View File

@@ -121,7 +121,7 @@ public class PhoneAuthApplyRecordAdiminService extends BaseService {
String lockeKey = RedisKey.phone_auth_apply_lock.getKey(applyRecord.getPhone());
String lockVal = jedisLockService.lock(lockeKey);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {
if (!Objects.equals(applyRecord.getStatus(), Constant.PhoneAuthApplyStatus.wait_audit)) {

View File

@@ -1,168 +0,0 @@
package com.accompany.admin.service.user;
import com.accompany.admin.common.BusinessException;
import com.accompany.admin.model.AdminUser;
import com.accompany.admin.service.base.BaseService;
import com.accompany.admin.service.system.AdminUserService;
import com.accompany.core.model.Room;
import com.accompany.business.model.UserMuteAdmin;
import com.accompany.business.model.UserMuteAdminExample;
import com.accompany.core.model.Users;
import com.accompany.business.mybatismapper.UserMuteAdminMapper;
import com.accompany.business.service.ErBanNetEaseService;
import com.accompany.core.service.SysConfService;
import com.accompany.business.service.room.RoomService;
import com.accompany.core.service.user.UsersBaseService;
import com.accompany.business.service.user.UsersService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.accompany.common.constant.Constant;
import com.accompany.common.netease.neteaseacc.result.RubbishRet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* {这里添加描述}
*
* @author fangchengyan
* @date 2019-05-08 11:56
*/
@Service
public class UserMuteAdminService extends BaseService {
@Autowired
private UserMuteAdminMapper userMuteAdminMapper;
@Autowired
private AdminUserService adminUserService;
@Autowired
private UsersService usersService;
@Autowired
private UsersBaseService usersBaseService;
@Autowired
private RoomService roomService;
@Autowired
private SysConfService sysConfService;
@Autowired
private ErBanNetEaseService erBanNetEaseService;
private byte enabled = 1;
private byte disabled = 2;
public int save(Long erbanNo, Long roomErbanNo, int adminUserId) throws Exception {
UserMuteAdmin record = new UserMuteAdmin();
//用户信息
Users users = usersBaseService.getUsersByErBanNo(erbanNo);
if(null == users) {
throw new BusinessException("平台号为"+ erbanNo + "的用户不存在!");
}
record.setErbanNo(users.getErbanNo());
record.setUid(users.getUid());
record.setNick(users.getNick());
//房间信息
Long roomId = null;
Long roomUid = null;
if(null != roomErbanNo) {
Users roomUsers = usersBaseService.getUsersByErBanNo(erbanNo);
if(null == roomUsers) {
throw new BusinessException("平台号为"+ erbanNo + "的用户不存在!");
}
Room room = roomService.getRoomCacheByUid(roomUsers.getUid());
if(null == room) {
throw new BusinessException("平台号为"+ erbanNo + "的用户不是房主!");
}
roomId = room.getRoomId();
roomUid = room.getUid();
}
record.setRoomId(roomId);
record.setRoomUid(roomUid);
record.setRoomErbanNo(roomErbanNo);
//查看当前是否存在房主信息
List<UserMuteAdmin> list = queryEnableRecord(record.getUid(), record.getRoomId());
if(null != list && !list.isEmpty()) {
throw new BusinessException("设置失败,当前已存在有效记录!");
}
//操作人信息
AdminUser adminUser = adminUserService.getAdminUserById(adminUserId);
record.setOperatorId(adminUser.getId());
record.setOperator(adminUser.getUsername());
//操作时间
Date now = new Date();
record.setCreateTime(now);
record.setUpdateTime(now);
//处理云信的记录
RubbishRet ret = erBanNetEaseService.setChatRoomMemberRole(roomId, String.valueOf(roomUid),
String.valueOf(record.getUid()), Constant.RoleOpt.admin, "true", null);
if(ret.getCode() == 200 || ret.getCode() == 417) {
return userMuteAdminMapper.insertSelective(record);
} else {
logger.warn("添加禁言管理员失败,平台号:{}房间id{},云信返回值:{}",
record.getErbanNo(), record.getRoomId(), ret.getCode());
}
return 0;
}
public UserMuteAdmin getById(Integer id) {
return userMuteAdminMapper.selectByPrimaryKey(id);
}
public PageInfo<UserMuteAdmin> queryForPages(Long erbanNo, Byte status, Integer pageNumber, Integer pageSize) {
PageHelper.startPage(pageNumber, pageSize);
return new PageInfo<>(queryList(erbanNo, status));
}
public List<UserMuteAdmin> queryList(Long erbanNo, Byte status) {
UserMuteAdminExample example = new UserMuteAdminExample();
UserMuteAdminExample.Criteria criteria = example.createCriteria();
if(null != status) {
criteria.andStatusEqualTo(status);
}
if(null != erbanNo) {
criteria.andErbanNoEqualTo(erbanNo);
}
return userMuteAdminMapper.selectByExample(example);
}
/**
* 查询有效的记录
* @param uid
* @param roomId
* @return
*/
public List<UserMuteAdmin> queryEnableRecord(long uid, long roomId) {
UserMuteAdminExample example = new UserMuteAdminExample();
UserMuteAdminExample.Criteria criteria = example.createCriteria();
criteria.andUidEqualTo(uid).andRoomIdEqualTo(roomId).andStatusEqualTo(enabled);
return userMuteAdminMapper.selectByExample(example);
}
/**
* 逻辑删除
* 先去云信处理,再进行逻辑删除
* @param id
* @return
*/
public int deleteById(Integer id) throws Exception {
UserMuteAdmin record = getById(id);
if(null == record) {
throw new BusinessException("id为" + id + "的记录不存在!");
}
RubbishRet ret = erBanNetEaseService.setChatRoomMemberRole(record.getRoomId(),
String.valueOf(record.getRoomUid()), String.valueOf(record.getUid()),
Constant.RoleOpt.admin, "false", null);
if(ret.getCode() == 200) {
UserMuteAdmin updateRecord = new UserMuteAdmin();
updateRecord.setUpdateTime(new Date());
updateRecord.setId(id);
updateRecord.setStatus(disabled);
return userMuteAdminMapper.updateByPrimaryKeySelective(updateRecord);
} else {
logger.warn("删除禁言管理员失败,平台号:{}房间id{},云信返回值:{}",
record.getErbanNo(), record.getRoomId(), ret.getCode());
}
return 0;
}
}

View File

@@ -1,94 +0,0 @@
package com.accompany.admin.service.user;
import com.accompany.admin.common.BusinessException;
import com.accompany.admin.service.base.BaseService;
import com.accompany.business.model.UserMuteRecord;
import com.accompany.business.model.UserMuteRecordExample;
import com.accompany.business.mybatismapper.UserMuteRecordMapper;
import com.accompany.business.service.ErBanNetEaseService;
import com.accompany.business.service.room.RoomService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.accompany.common.netease.neteaseacc.result.RubbishRet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* {这里添加描述}
*
* @author fangchengyan
* @date 2019-05-08 20:06
*/
@Service
public class UserMuteRecordAdminService extends BaseService {
@Autowired
private UserMuteRecordMapper userMuteRecordMapper;
@Autowired
private ErBanNetEaseService erBanNetEaseService;
@Autowired
private RoomService roomService;
public PageInfo<UserMuteRecord> queryForPages(Long erbanNo, Date startTime, Date endTime, Integer pageNumber, Integer pageSize) {
PageHelper.startPage(pageNumber, pageSize);
return new PageInfo<>(queryList(erbanNo, startTime, endTime));
}
public List<UserMuteRecord> queryList(Long erbanNo, Date startTime, Date endTime) {
UserMuteRecordExample example = new UserMuteRecordExample();
example.setOrderByClause(" create_time desc ");
UserMuteRecordExample.Criteria criteria = example.createCriteria();
if(null != startTime) {
criteria.andCreateTimeGreaterThanOrEqualTo(startTime);
}
if(null != endTime) {
criteria.andCreateTimeLessThan(endTime);
}
if(null != erbanNo) {
criteria.andErbanNoEqualTo(erbanNo);
}
return userMuteRecordMapper.selectByExample(example);
}
/**
* 解除禁言
* @param id
*/
public void release(Integer id, String reason) throws Exception {
UserMuteRecord userMuteRecord = userMuteRecordMapper.selectByPrimaryKey(id);
if(null == userMuteRecord) {
throw new BusinessException("记录不存在!");
}
long now = System.currentTimeMillis();
long createTimestamp = userMuteRecord.getCreateTime().getTime();
//fix bug: muteTime为int类型有溢出bug
if(createTimestamp + ((long)userMuteRecord.getMuteTime()) * 1000 < now) {
logger.info("禁言已过期不必处理记录id:{}", id);
return;
}
Long roomUid = roomService.getroomUidByRoomId(userMuteRecord.getRoomId());
if(roomUid == null) {
throw new BusinessException("找不到房主信息,请确认房间是否已关闭!");
}
RubbishRet ret = erBanNetEaseService.temporaryMuteFromRoom(userMuteRecord.getRoomId(),
String.valueOf(roomUid), String.valueOf(userMuteRecord.getUid()),
0, "true", null);
if(ret.getCode() != 200) {
logger.warn("解除用户禁言记录失败用户id:{}房间id:{}, 云信返回:{}", userMuteRecord.getOperatorId(),
userMuteRecord.getUid(), ret.getCode());
if(ret.getCode() == 403) {
throw new BusinessException("无解禁权限或仅房间创建者可以解禁管理员");
}
}
//更新记录
UserMuteRecord updateRecord = new UserMuteRecord();
updateRecord.setId(id);
updateRecord.setUpdateTime(new Date());
updateRecord.setMuteTime(0);
updateRecord.setReason(reason);
userMuteRecordMapper.updateByPrimaryKeySelective(updateRecord);
}
}

View File

@@ -132,7 +132,7 @@ public class VipAdminService {
@Transactional(rollbackFor = Exception.class, transactionManager = "mybatisplusTransactionManager")
public void updateVip(UpdateVipAdminParams params) {
if (params == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
if (params.getVipLevel() == null) {
throw new ServiceException("贵族等级不能为空");

View File

@@ -84,10 +84,10 @@ public class WithdrawConfigAdminService extends BaseService {
sysConfAdminService.updateConfigValueById(Constant.SysConfId.WITHDRAWAL_CONFIG, configStr);
} catch (JsonProcessingException e) {
log.error("[金币提现] 序列化 config 异常 {}", configDto, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} catch (NacosException e) {
log.error("[金币提现] 保存到 nacos 异常 {}", configDto, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
}
}
@@ -96,14 +96,14 @@ public class WithdrawConfigAdminService extends BaseService {
String configStr = sysConfAdminService.getSysConfValueById(Constant.SysConfId.WITHDRAWAL_CONFIG);
if (!org.springframework.util.StringUtils.hasText(configStr)) {
log.error("[金币提现] 配置为空 {}", Constant.SysConfId.WITHDRAWAL_CONFIG);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
WithdrawConfigDto config = null;
try {
config = objectMapper.readValue(configStr, WithdrawConfigDto.class);
} catch (IOException e) {
log.error("[金币提现] 获取配置异常 {}", Constant.SysConfId.WITHDRAWAL_CONFIG);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
return config;
}

View File

@@ -219,7 +219,7 @@ public class WithdrawUserRecordAdminServiceImpl implements WithdrawUserRecordAdm
UserPurse userPurse = userPurseService.queryUserPurse(uid);
Double currentGolds = userPurse.getGolds();
log.error("[金币提现退回] {} 当前钱包金币数 {} ,加金币数 {} 不成功", uid, currentGolds, goldNum);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
//添加账单记录
billRecordService.insertGeneralBillRecord(uid, uid, record.getId().toString(), BillObjTypeEnum.REJECT_WITHDRAW, goldNum.doubleValue());

View File

@@ -161,7 +161,7 @@ public class WorldAdminService extends BaseService {
String lockKey = RedisKey.world_name_lock.getKey();
String lockVal = jedisLockService.lock(lockKey, 1000, 10 * 1000);
if (StringUtils.isEmpty(lockVal)) {
throw new WorldException(BusiStatus.SERVER_BUSY.getReasonPhrase());
throw new WorldException(BusiStatus.SERVERBUSY.getReasonPhrase());
}
try {
if (iWorldService.hasSameName(record.getName())) {
@@ -241,7 +241,7 @@ public class WorldAdminService extends BaseService {
worldNameChange = true;
nameLockVal = jedisLockService.lock(nameLockKey, 1000, 10 * 1000);
if (StringUtils.isEmpty(nameLockVal)) {
throw new WorldException(BusiStatus.SERVER_BUSY.getReasonPhrase());
throw new WorldException(BusiStatus.SERVERBUSY.getReasonPhrase());
}
}

View File

@@ -87,7 +87,7 @@ public class WorldMemberAdminService {
//批量添加时,耗时会有点久,因此加锁时间略长
String lockVal = jedisLockService.lock(lockKey, 1000, 60 * 1000);
if (StringUtils.isEmpty(lockVal)) {
throw new WorldException(BusiStatus.SERVER_BUSY.getReasonPhrase());
throw new WorldException(BusiStatus.SERVERBUSY.getReasonPhrase());
}
try {
int result = 0;

View File

@@ -316,7 +316,7 @@ public class DynamicDataAdminService extends BaseService {
public void switchSquareTop(Long id, Byte squareTop) {
String lockKey = RedisKey.dynamic_square_top_lock.getKey();
String lockVal = jedisLockService.lock(lockKey);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVER_BUSY);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVERBUSY);
try {
@@ -367,7 +367,7 @@ public class DynamicDataAdminService extends BaseService {
public void switchTopicTop(Long id, Byte topicTop) {
String lockKey = RedisKey.dynamic_topic_top_lock.getKey();
String lockVal = jedisLockService.lock(lockKey);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVER_BUSY);
if (StringUtils.isBlank(lockVal)) throw new ServiceException(BusiStatus.SERVERBUSY);
try {
Dynamic currentDynamic = iDynamicService.getById(id);

View File

@@ -66,7 +66,7 @@ public class InviteCodeUtil {
String lockVal = jedisLockService.lock(RedisKey.flow_team_gen_invite_code_lock.getKey(), 10 * 1000, 30 * 1000);
try {
if (StringUtils.isBlank(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
// 加锁之后重新判断是否需要重置
String newCodeStr = jedisService.get(RedisKey.flow_team_curr_gen_invite_code.getKey());

View File

@@ -80,7 +80,7 @@ public class ErBanNetEaseController extends BaseController {
@RequestParam(value = "reverse", defaultValue = "2") int reverse,
@RequestParam(value = "type", defaultValue = "0,1") String type) {
if (null == from || null == to) {
return BusiResult.fail(BusiStatus.SERVER_BUSY);
return BusiResult.fail(BusiStatus.SERVERBUSY);
}
if (null == endTime) {
endTime = System.currentTimeMillis();
@@ -99,11 +99,11 @@ public class ErBanNetEaseController extends BaseController {
data.put("users", user);
return BusiResult.success(data);
} else {
return BusiResult.fail(BusiStatus.SERVER_BUSY);
return BusiResult.fail(BusiStatus.SERVERBUSY);
}
} catch (Exception e) {
logger.error("获取单聊消息失败from:{}to:{},异常:{}", from, to, ExceptionUtils.getStackTrace(e));
return BusiResult.fail(BusiStatus.SERVER_BUSY);
return BusiResult.fail(BusiStatus.SERVERBUSY);
}
}

View File

@@ -1,6 +1,5 @@
package com.accompany.admin.controller;
import com.accompany.common.status.BusiStatusInterface;
import com.accompany.core.exception.ServiceException;
import com.accompany.common.result.BusiResult;
import com.accompany.common.status.BusiStatus;
@@ -25,26 +24,24 @@ public class ExceptionController {
@ExceptionHandler(ServiceException.class)
@ResponseBody
public BusiResult handleServiceException(HttpServletRequest request, HttpServletResponse response, Exception exception){
public BusiResult<Void> handleServiceException(HttpServletRequest request, HttpServletResponse response, Exception exception){
logger.error("handleServiceException", exception.getMessage());
if (exception instanceof ServiceException){
ServiceException serviceException = (ServiceException) exception;
BusiStatusInterface status = serviceException.getBusiStatus();
BusiStatus status = serviceException.getBusiStatus();
if (status != null){
return new BusiResult(status);
return new BusiResult<>(status);
}
}
return new BusiResult(BusiStatus.SERVERERROR);
return new BusiResult<>(BusiStatus.SERVERERROR);
}
@ExceptionHandler(Exception.class)
@ResponseBody
public BusiResult handleException(HttpServletRequest request, HttpServletResponse response, Exception exception){
public BusiResult<Void> handleException(HttpServletRequest request, HttpServletResponse response, Exception exception){
logger.error("exception occurs ", exception);
return new BusiResult(BusiStatus.SERVERERROR);
return new BusiResult<>(BusiStatus.SERVERERROR);
}
}

View File

@@ -19,7 +19,7 @@ import com.github.pagehelper.PageInfo;
import com.google.common.collect.Maps;
import com.accompany.common.constant.Constant;
import com.accompany.common.constant.OpenBoxKeyTypeEnum;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.result.BusiResult;
import com.accompany.common.status.BusiStatus;
import org.springframework.beans.factory.annotation.Autowired;
@@ -86,7 +86,7 @@ public class UserCardsAdminController extends BaseController {
adminLogService.insertLog(getAdminId(),getClass().getCanonicalName(),"exchangeCard",
"params===>>uid:"+uid+",exchangeType:"+exchangeType+",exchangeRefId:"+exchangeRefId+",exchangeNum:"+exchangeNum+",eliminateCards:"+eliminateCards);
return new BusiResult(BusiStatus.SUCCESS);
} catch (BusinessException | ApiException e){
} catch (BusinessException | AdminServiceException e){
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (ServiceException s){
return new BusiResult(s.getBusiStatus());
@@ -107,7 +107,7 @@ public class UserCardsAdminController extends BaseController {
return new BusiResult(BusiStatus.SUCCESS);
} catch (BusinessException e){
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (ApiException e){
} catch (AdminServiceException e){
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (Exception e){
logger.error(e.getMessage(), e);
@@ -172,7 +172,7 @@ public class UserCardsAdminController extends BaseController {
OpenBoxKeyTypeEnum.DIAMOND.getValue() + ",exchangeNum:" + userBackpack.getCount() + ",eliminateCards:"+eliminateCards);
return new BusiResult(BusiStatus.SUCCESS);
} catch (BusinessException | ApiException e){
} catch (BusinessException | AdminServiceException e){
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (ServiceException s){
return new BusiResult(s.getBusiStatus());

View File

@@ -73,7 +73,7 @@ public class OfficialGoldBusTypeController extends BaseController {
@ResponseBody
public BusiResult edit(OfficialGoldBusType record) {
int result = officialGoldBusTypeAdminService.edit(record);
return result > 0 ? new BusiResult(BusiStatus.SUCCESS) : new BusiResult(BusiStatus.SERVER_BUSY);
return result > 0 ? new BusiResult(BusiStatus.SUCCESS) : new BusiResult(BusiStatus.SERVERBUSY);
}
/**
@@ -86,7 +86,7 @@ public class OfficialGoldBusTypeController extends BaseController {
@ResponseBody
public BusiResult delete(Integer id) {
int result = officialGoldBusTypeAdminService.delete(id);
return result > 0 ? new BusiResult(BusiStatus.SUCCESS) : new BusiResult(BusiStatus.SERVER_BUSY);
return result > 0 ? new BusiResult(BusiStatus.SUCCESS) : new BusiResult(BusiStatus.SERVERBUSY);
}
@RequestMapping("/listByQuery")

View File

@@ -180,7 +180,7 @@ public class RoomAdminController extends BaseController {
logger.error("Failed to resetNewRoom.Cause by {}", e.getMessage(), e);
return BusiResult.fail(e.getMessage());
}
return BusiResult.fail(BusiStatus.SERVER_BUSY);
return BusiResult.fail(BusiStatus.SERVERBUSY);
}
/**
@@ -204,7 +204,7 @@ public class RoomAdminController extends BaseController {
logger.error("Failed to resetNewRoom.Cause by {}", e.getMessage(), e);
return BusiResult.fail(e.getMessage());
}
return BusiResult.fail(BusiStatus.SERVER_BUSY);
return BusiResult.fail(BusiStatus.SERVERBUSY);
}

View File

@@ -1,96 +0,0 @@
package com.accompany.admin.controller.user;
import com.accompany.core.exception.ServiceException;
import com.alibaba.fastjson.JSONObject;
import com.accompany.admin.common.BusinessException;
import com.accompany.admin.controller.BaseController;
import com.accompany.admin.service.system.AdminUserService;
import com.accompany.admin.service.user.UserMuteAdminService;
import com.accompany.business.model.UserMuteAdmin;
import com.github.pagehelper.PageInfo;
import com.accompany.common.result.BusiResult;
import com.accompany.common.status.BusiStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* {这里添加描述}
*
* @author fangchengyan
* @date 2019-04-26 15:54
*/
@RestController
@RequestMapping("/admin/user/mute")
public class UserMuteAdminController extends BaseController {
@Autowired
private UserMuteAdminService userMuteAdminService;
@Autowired
private AdminUserService adminUserService;
@RequestMapping(value = "list", method = RequestMethod.GET)
public void list(Long erbanNo, Byte status){
PageInfo<UserMuteAdmin> pageInfo = userMuteAdminService.queryForPages(erbanNo, status, getPageNumber(), getPageSize());
JSONObject jsonObject = new JSONObject();
jsonObject.put("total", pageInfo.getTotal());
jsonObject.put("rows", pageInfo.getList());
writeJson(jsonObject.toJSONString());
}
@RequestMapping(value = "save", method = RequestMethod.POST)
public BusiResult save(Long erbanNo, Long roomErbanNo){
try {
int result = userMuteAdminService.save(erbanNo, roomErbanNo, getAdminId());
if(result > 0) {
return new BusiResult(BusiStatus.SUCCESS);
} else {
return new BusiResult(BusiStatus.UNKNOWN, "添加失败!",null);
}
} catch (BusinessException e) {
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (Exception e) {
logger.error(e.getMessage(), e);
return new BusiResult(BusiStatus.SERVERERROR);
}
}
@RequestMapping(value = "delete", method = RequestMethod.POST)
public BusiResult delete(Integer id){
if(null == id || id <= 0) {
return new BusiResult(BusiStatus.PARAMERROR);
}
try {
int result = userMuteAdminService.deleteById(id);
if(result > 0) {
return new BusiResult(BusiStatus.SUCCESS);
} else {
return new BusiResult(BusiStatus.UNKNOWN, "添加失败!",null);
}
} catch (BusinessException e){
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (Exception e){
logger.error(e.getMessage(), e);
return new BusiResult(BusiStatus.SERVERERROR);
}
}
@RequestMapping(value = "getById", method = RequestMethod.GET)
public BusiResult getById(Integer id){
if(null == id || id <= 0) {
return new BusiResult(BusiStatus.PARAMERROR);
}
try {
UserMuteAdmin record = userMuteAdminService.getById(id);
return new BusiResult(BusiStatus.SUCCESS, record);
} catch (BusinessException e) {
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (Exception e) {
logger.error(e.getMessage(), e);
return new BusiResult(BusiStatus.SERVERERROR);
}
}
}

View File

@@ -1,62 +0,0 @@
package com.accompany.admin.controller.user;
import com.accompany.core.exception.ServiceException;
import com.alibaba.fastjson.JSONObject;
import com.accompany.admin.common.BusinessException;
import com.accompany.admin.controller.BaseController;
import com.accompany.admin.service.user.UserMuteRecordAdminService;
import com.accompany.business.model.UserMuteRecord;
import com.github.pagehelper.PageInfo;
import com.accompany.common.result.BusiResult;
import com.accompany.common.status.BusiStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
/**
* {这里添加描述}
*
* @author fangchengyan
* @date 2019-05-08 20:04
*/
@RestController
@RequestMapping("/admin/user/mute/record")
public class UserMuteRecordAdminController extends BaseController {
@Autowired
private UserMuteRecordAdminService userMuteRecordAdminService;
@RequestMapping(value = "list", method = RequestMethod.GET)
public void list(Long erbanNo, Date startTime, Date endTime){
PageInfo<UserMuteRecord> pageInfo = userMuteRecordAdminService.queryForPages(erbanNo, startTime, endTime,
getPageNumber(), getPageSize());
JSONObject jsonObject = new JSONObject();
jsonObject.put("total", pageInfo.getTotal());
jsonObject.put("rows", pageInfo.getList());
writeJson(jsonObject.toJSONString());
}
/**
* 解除禁言
* @param id
* @return
*/
@RequestMapping(value="release")
public BusiResult release(Integer id, String reason) {
if(null == id || id <= 0) {
return new BusiResult(BusiStatus.PARAMERROR);
}
try {
userMuteRecordAdminService.release(id, reason);
return new BusiResult(BusiStatus.SUCCESS);
} catch (BusinessException e) {
throw new ServiceException(BusiStatus.SERVERERROR, e.getMessage());
} catch (Exception e) {
logger.error(e.getMessage(), e);
return new BusiResult(BusiStatus.SERVERERROR);
}
}
}

View File

@@ -64,7 +64,7 @@ public class RecommendWorldAdminController extends BaseController {
if (result > 0) {
return new BusiResult(BusiStatus.SUCCESS);
} else {
return new BusiResult(BusiStatus.SERVER_BUSY);
return new BusiResult(BusiStatus.SERVERBUSY);
}
} catch (ServiceException e) {
return new BusiResult(BusiStatus.SERVERERROR, e.getMessage(), null);
@@ -83,7 +83,7 @@ public class RecommendWorldAdminController extends BaseController {
if(result > 0) {
return new BusiResult(BusiStatus.SUCCESS);
} else {
return new BusiResult(BusiStatus.SERVER_BUSY);
return new BusiResult(BusiStatus.SERVERBUSY);
}
}
@@ -119,7 +119,7 @@ public class RecommendWorldAdminController extends BaseController {
if(result > 0) {
return new BusiResult(BusiStatus.SUCCESS);
} else {
return new BusiResult(BusiStatus.SERVER_BUSY);
return new BusiResult(BusiStatus.SERVERBUSY);
}
}
@@ -136,7 +136,7 @@ public class RecommendWorldAdminController extends BaseController {
if(result > 0) {
return new BusiResult(BusiStatus.SUCCESS);
} else {
return new BusiResult(BusiStatus.SERVER_BUSY);
return new BusiResult(BusiStatus.SERVERBUSY);
}
}

View File

@@ -1,601 +0,0 @@
<style>
.input-group-addon {
width: 0;
padding: 5px 12px;
}
.selectBox .combobox-container {
margin-top: 5px;
}
</style>
<section class="content">
<div class="box box-primary">
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<section class="content">
<div id="table"></div>
<div id="toolbar">
<!-- <form action="" id="searchForm" method="POST">
起始时间:<input type="text" name="searchTimeBegin" id="searchTimeBegin" class="input-sm" placeholder="请输入开始时间">
</form>
<button class="btn btn-primary" id="searchBtn">搜索</button> -->
<button class="btn btn-primary" id="addBtn">新增</button>
</div>
</section>
</div>
</section>
<!-- 新增框 -->
<div class="modal fade" id="addModal" rabindex='-1' role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">x</span>
</button>
<div class="modal-title" id="addModalLabel">家族PK活动配置</div>
</div>
<div class="modal-body">
<form action="" id="addForm" class="form-horizontal">
<!-- 起始时间 -->
<div class="form-group">
<div class="col-sm-12" id="attention" style="color:red;">注意:无论选择什么时间都会设置到选择时间所在周的周四</div>
<label for="addTimeBegin" class="col-sm-3 control-label">起始时间:</label>
<div class="col-sm-8">
<input type="text" id="addTimeBegin" name="addTimeBegin" class="validate[required]" placeholder="请输入时间">
</div>
</div>
<!-- 房间ID -->
<div class="form-group">
<label for="roomID" class="col-sm-3 control-label">房主66ID</label>
<div class="col-sm-8">
<input type="text" id="roomID" name="roomID" class="validate[required] input-sm" placeholder="多个房间请用英文,隔开" style="width: 400px; border: 1px solid lightgray">
</div>
</div>
<!-- 荣誉奖励 -->
<div class="form-group">
<label class="col-sm-3 control-label">荣誉奖励:</label>
<div class="col-sm-8 selectBox">
<!-- <div class="prize" style="display: flex;justify-content: flex-start;">
<input type="text" id="hornorPrize1" class="input-sm" name="hornorPrize1" placeholder="" style="border: 1px solid lightgray">
<img src="" alt="" id="imgUrl1" style="width: 70px;height: 70px;margin-left:20px;">
<input type="file" id="uploadFile1" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<input type="hidden" id="alertWinPic1" name="alertWinPic1" class="form-control">
</div>
<div class="prize" style="display: flex;justify-content: flex-start;">
<input type="text" id="hornorPrize2" class="input-sm" name="hornorPrize2" placeholder="" style="border: 1px solid lightgray">
<img src="" alt="" id="imgUrl2" style="width: 70px;height: 70px;margin-left:20px;">
<input type="file" id="uploadFile2" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<input type="hidden" id="alertWinPic2" name="alertWinPic2" class="form-control">
</div>
<div class="prize" style="display: flex;justify-content: flex-start;">
<input type="text" id="hornorPrize3" class="input-sm" name="hornorPrize3" placeholder="" style="border: 1px solid lightgray">
<img src="" alt="" id="imgUrl3" style="width: 70px;height: 70px;margin-left:20px;">
<input type="file" id="uploadFile3" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<input type="hidden" id="alertWinPic3" name="alertWinPic3" class="form-control">
</div>
<div class="prize" style="display: flex;justify-content: flex-start;">
<input type="text" id="hornorPrize4" class="input-sm" name="hornorPrize4" placeholder="" style="border: 1px solid lightgray">
<img src="" alt="" id="imgUrl4" style="width: 70px;height: 70px;margin-left:20px;">
<input type="file" id="uploadFile4" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<input type="hidden" id="alertWinPic4" name="alertWinPic4" class="form-control">
</div>
<div class="prize" style="display: flex;justify-content: flex-start;">
<input type="text" id="hornorPrize5" class="input-sm" name="hornorPrize5" placeholder="" style="border: 1px solid lightgray">
<img src="" alt="" id="imgUrl5" style="width: 70px;height: 70px;margin-left:20px;">
<input type="file" id="uploadFile5" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<input type="hidden" id="alertWinPic5" name="alertWinPic5" class="form-control">
</div>
<div class="prize" style="display: flex;justify-content: flex-start;">
<input type="text" id="hornorPrize6" class="input-sm" name="hornorPrize6" placeholder="" style="border: 1px solid lightgray">
<img src="" alt="" id="imgUrl6" style="width: 70px;height: 70px;margin-left:20px;">
<input type="file" id="uploadFile6" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<input type="hidden" id="alertWinPic6" name="alertWinPic6" class="form-control">
</div> -->
<select name="" id="prize_first" class="combobox">
<!-- <option value="0">请选择</option> -->
</select>
<select name="" id="prize_second" class="combobox">
<!-- <option value="0">请选择</option> -->
</select>
<select name="" id="prize_third" class="combobox">
<!-- <option value="0">请选择</option> -->
</select>
<select name="" id="prize_four" class="combobox">
<!-- <option value="0">请选择</option> -->
</select>
<select name="" id="prize_five" class="combobox">
<!-- <option value="0">请选择</option> -->
</select>
<select name="" id="prize_six" class="combobox">
<!-- <option value="0">请选择</option> -->
</select>
</div>
</div>
<!-- 描述 -->
<div class="form-group">
<label for="introduce" class="col-sm-3 control-label">描述:</label>
<div class="col-sm-8">
<input type="text" id="introduce" name="introduce" class="validate[required]" placeholder="">
</div>
</div>
<!-- 上传图片 -->
<!-- <div class="form-group">
<img src="" alt="" id="imgUrl" style="width: 100px;height: 50px;">
<input type="file" id="uploadFile" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svg">
<button class="btn btn-success">上传</button>
<input type="hidden" id="alertWinPic" name="alertWinPic" class="form-control validate[required]">
</div> -->
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" data-primary="addSaveData" id="addSave">保存</button>
</div>
</div>
</div>
</div>
<div class="modal fade" id="tipModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">提示信息</h4>
</div>
<div class="modal-body" id="tipMsg"></div>
</div>
</div>
</div>
<script>
$(function() {
// var picker1 = $('#searchTimeBegin').datetimepicker({
// format: 'yyyy-mm-dd hh:ii:00',
// autoclose: true,
// endDate: new Date()
// });
var $id = '';
var selectArr = [];
var prizeObj = {};
var picker2 = $('#addTimeBegin').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true,
endDate: new Date()
});
var main = {
init: function() {
this.eventRegister();
this.valueChange();
},
eventRegister: function() {
// 新增按钮点击事件
$('#addBtn').on('click', function() {
$('#addModal').modal('show');
clearModal();
});
// 监听荣誉奖励select框变化
$('.selectBox').on('change','select',function() {
switch($(this).attr('id')) {
case 'prize_first':
selectArr.push($(this).val());
break;
case 'prize_second':
selectArr.push($(this).val());
break;
case 'prize_third':
selectArr.push($(this).val());
break;
case 'prize_four':
selectArr.push($(this).val());
break;
case 'prize_five':
selectArr.push($(this).val());
break;
case 'prize_six':
selectArr.push($(this).val());
break;
}
console.log(selectArr);
});
// 添加保存按钮点击事件
$('#addSave').on('click', function() {
// 获取时间参数
var $time = $('#addTimeBegin').val();
if($time == '' || $time == 'undefined') {
$('#tipMsg').text('时间项不能为空');
$('#tipModal').modal('show');
return;
}
// 获取房间ID参数
var idArr = $('#roomID').val().split(',');
if($roomId == '' || $roomId == 'undefined') {
$('#tipMsg').text('房间ID不能为空');
$('#tipModal').modal('show');
return;
} else if(idArr.length > 6) {
$('#tipMsg').text('参与PK房间数超过6个');
$('#tipModal').modal('show');
return;
}
var $roomId = $('#roomID').val();
// 获取荣耀奖励参数
// var prizeArr = [];
// for(var i = 0 ; i < selectArr.length ; i++) {
// if(prizeArr.indexOf(selectArr[i]) == -1) {
// prizeArr.push(selectArr[i]);
// } else {
// $('#tipMsg').text('您已选择过相同奖品');
// $('#tipModal').modal('show');
// return;
// }
// }
var awardArr = $('.selectBox').find('input[type="hidden"]');
var awardIdArr = [];
var awardObj = {},repeatBol = false;
for(var i = 0;i < awardArr.length;i++){
var awardId = awardArr.eq(i).val();
if(parseInt(awardId)){
console.log(awardId);
if(!awardObj[awardId]){
awardObj[awardId] = 1;
awardIdArr.push(parseInt(awardId));
}else{
repeatBol = true;
break;
}
}
}
// var prizeArr = [];
// for(var i = 0 ; i < $('#addModal').find('.prize').length ; i++) {
// var $prize = $('#addModal').find('.prize').eq(i);
// if($prize.find('input[type=text],input[type=hidden]').val() != '' && $prize.find('img').attr('src') != '') {
// prizeArr.push($prize.find('input[type=text]').val() + '|' + $prize.find('img').attr('src'));
// }else if($prize.find('input[type=text]').val() != '') {
// if($prize.find('img').attr('src') == '') {
// $('#tipMsg').text('奖励'+ (i+1) +'没有对应图片');
// $('#tipModal').modal('show');
// return;
// }
// }else if($prize.find('img').attr('src') != '') {
// if($prize.find('input[type=text]').val() == '' || $prize.find('input[type=text]').val() == 'undefined') {
// $('#tipMsg').text('奖励' + (i+1) + '图片没有对应名称');
// $('#tipModal').modal('show');
// return;
// }
// }
// }
// 获取描述参数
var $introduce = $('#introduce').val();
// id
var id;
if($id == '' || $id == 'undefined') {
id = '';
} else {
id = $id;
}
var $award = awardIdArr.join(',');
if($award == 0) {
$('#tipMsg').text('礼物不能为空,至少设置一个');
$('#tipModal').modal('show');
return;
}
// 保存请求
$.post('/admin/familyPkConfig/save',{
id: id,
startDate: $time,
endDate: $time,
roomErbanNoListStr: $roomId,
description: $introduce,
// award: JSON.stringify(prizeArr)
award: $award
},function(res) {
if(res.code == 200) {
$('#tipMsg').text('保存成功');
$('#tipModal').modal('show');
$('#addModal').modal('hide');
TableHelper.doRefresh('#table');
} else if(res.code == 500) {
$('#tipMsg').text(res.message);
$('#tipModal').modal('show');
}
})
})
// 编辑按钮点击事件
$('#table').on('click','.opt-edit', function() {
$('#addModal').modal('show');
var id = $(this).data('id');
$id = id;
var data = $('#table').bootstrapTable('getRowByUniqueId',id);
clearModal();
console.log(data);
var date = new Date(data.startDate);
$('#addModal').find('#addTimeBegin').val(date.format('yyyy-MM-dd hh:mm:ss'));
$('#addModal').find('#roomId').val(data.roomErbanNoList);
$('#addModal').find('#introduce').val(data.description);
var arr = data.award.split(',');
var $list = $('#addForm').find('.selectBox select');
for(var i = 0 ; i < arr.length ; i++) {
$list.eq(i).val(arr[i]);
var $target = $list.eq(i).find("option:selected");
var awardId = $target.val();
var awardText = $target.text();
$('.combobox-container').eq(i).find('input[type="text"]').val(awardText);
$('.combobox-container').eq(i).find('input[type="hidden"]').val(awardId);
}
});
// 图片选择监听事件
// $('.prize').on('change','input[type=file]',function() {
// console.log($(this).attr('id'));
// var id = $(this).attr('id').substring(10,11);
// console.log(id);
// $.ajaxFileUpload({
// fileElementId: $(this).attr('id'),
// url: '/admin/upload/img',
// type: 'post',
// dataType: 'json',
// secureuri: false,
// async: true,
// success: function(json) {
// if(json.path) {
// if(json.path != ''){
// $('#imgUrl' + id).attr('src',json.path);
// } else {
// console.log('图片上传失败');
// }
// } else {
// $('#tipMsg').text(json.msg);
// $('#tipModal').modal('show');
// }
// },
// error: function(data,status,e) {
// console.log(e);
// }
// })
// });
},
valueChange: function() {
$.get('/admin/activityAward/total',{},function(res) {
if(res.code == 200) {
for(var i = 0 ; i < res.data.length ; i++) {
var str = '<option value="' + res.data[i].id + '">' + res.data[i].prizeName + '</option>';
$('.selectBox').find('select').append(str);
prizeObj[res.data[i].id] = res.data[i].prizeName
}
console.log(prizeObj)
$('.selectBox').find('select').combobox();
}
})
}
};
main.init();
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns:[
{field: 'id', title: '编号', align: 'center', valign: 'middle', width: '10%'},
{field: 'startDate', title: '开始时间', align: 'center', valign: 'middle', width: '15%',formatter: function(val,row,index) {
if(val) {
var date = new Date(val);
return date.format('yyyy-MM-dd hh:mm:ss');
} else {
return '-';
}
}},
{field: 'endDate', title: '结束时间', align: 'center', valign: 'middle', width: '15%',formatter: function(val,row,index) {
if(val) {
var date = new Date(val);
return date.format('yyyy-MM-dd hh:mm:ss');
} else {
return '-';
}
}},
{field: 'award', title: '家族奖励', align: 'center', valign: 'middle', width: '15%',formatter: function(val,row,index) {
if(val) {
var arr = val.split(',')
var value = null;
var content = '';
for(var i = 0 ; i < arr.length ; i++) {
value = arr[i];
if(i < arr.length-1) {
content += (prizeObj[value]+',');
} else {
content += prizeObj[value];
}
}
return content;
}
// console.log(JSON.parse(val));//["狗|图片地址"]
// if(val) {
// var arr = JSON.parse(val);
// var value = null;
// var content = '';
// for(i in arr) {
// value = arr[i].split('|')[0];
// if(i < arr.length-1) {
// content += (value+',');
// } else {
// content += value;
// }
// }
// return content;
// }
}},
{field: 'roomErbanNoList', title: 'PK家族房主平台号', align: 'center', valign: 'middle', width: '10%'},
{field: 'createTime', title: '创建时间', align: 'center', valign: 'middle', width: '15%',formatter: function(val,row,index) {
if(val) {
var date = new Date(val);
return date.format('yyyy-MM-dd hh:mm:ss');
} else {
return '-';
}
}},
{field: 'description', title: '描述', align: 'center', valign: 'middle', width: '10%'},
{field: '', title: '操作', align: 'center', valign: 'middle', width: '10%',formatter: function(val,row,index) {
var key = row.id;
var startDate = new Date(row.startDate);
var endDate = new Date(row.endDate);
var curDate = new Date();
if(curDate.getTime() >= startDate.getTime()){
return '<button class="btn btn-primary btn-sm opt-edit" disabled data-id="' + key + '">不可编辑</button>';
}else{
return '<button class="btn btn-primary btn-sm opt-edit" data-id="' + key + '">编辑</button>';
}
}}
],
cache:false,
striped: true,
showRefresh: false,
pageSize: 10,
pageList: [10,20,30,50],
pagination: true,
sidePagination: 'server',
queryParamsType: 'undefined',
queryParams: function queryParams(params) {
var param = {
pageSize: params.pageSize,
pageNumber: params.pageNumber,
}
},
uniqueId: 'id',
toolbar: '#toolbar',
url: '/admin/familyPkConfig/list',
onLOadSuccess: function() {
console.log('load success');
},
onLoadError: function() {
console.log('load fail');
}
});
})
function clearModal() {
$('#addForm').find('input[type=text],input[type=hidden],input[type=file]').each(function() {
$(this).val('');
})
$('#addForm').find('img').attr('src','');
$('#addForm').find('.combobox-container').removeClass('combobox-selected');
selectArr = [];
// $('#addForm').find('option[value="0"]').attr('selected',true);
}
</script>

View File

@@ -1,736 +0,0 @@
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form id="searchForm" action="/admin/family/export" method="get" target="_blank">
<div class="col-sm-12">
<label for="familyId" class="col-sm-1 control-label">家族ID:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="familyId" id="familyId"></div>
<label for="familyNick" class="col-sm-1 control-label">家族昵称:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="familyNick" id="familyNick"></div>
<label for="leaderId" class="col-sm-1 control-label">族长ID:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="leaderId" id="leaderId"></div>
<label for="leaderNick" class="col-sm-1 control-label">族长昵称:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="leaderNick" id="leaderNick"></div>
</div>
</form>
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>搜索
</button>
<button id="btnAdd" class="btn btn-default opt-apply">
<i class="glyphicon glyphicon-adjust"></i>增加
</button>
<button id="btnExport" class="btn btn-default ">
<i class="glyphicon glyphicon-export"></i>导出
</button>
</div>
</div>
</div>
</div>
</section>
<!--新增家族弹窗-->
<div class="modal fade" id="addFamilyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="modalLabel">新增家族</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="addFamilyForm">
<div class="form-group">
<label for="familyName" class="col-sm-3 control-label">家族名称:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="name" id="familyName" placeholder="请输入家族名称,不超过15个字">
</div>
</div>
<div class="form-group">
<label for="leader" class="col-sm-3 control-label">族长ID:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="leader" id="leader" placeholder="请输入族长ID">
</div>
</div>
<div class="form-group">
<label for="enableMo" class="col-sm-3 control-label">是否开放家族币:</label>
<div class="col-sm-9">
<input type="radio" name="openMoney" id="enableMo" value="true">
<input type="radio" name="openMoney" id="enableMoNo" value="false">
</div>
</div>
<div class="form-group" id="familyMoNameGroup">
<label for="familyMoName" class="col-sm-3 control-label">家族币名称:</label>
<div class="col-sm-9">
<input type="text" class="form-control validate[required]" name="moneyName" id="familyMoName" placeholder="请输入家族币名称不超过3个字">
</div>
</div>
<div class="form-group" id="familyMoAwardGroup">
<label for="familyMoAward" class="col-sm-3 control-label">创建家族币奖励:</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="money" id="familyMoAward" placeholder="请输入创建家族币奖励">
</div>
</div>
<div class="form-group" id="familyGameGroup">
<label for="enableGame" class="col-sm-3 control-label">是否开放家族游戏:</label>
<div class="col-sm-9">
<input type="radio" name="openGame" id="enableGame" value="true">
<input type="radio" name="openGame" id="enableGameNo" value="false">
</div>
</div>
<div class="form-group">
<label for="pic" class="col-sm-3 control-label">家族头像:</label>
<div class="col-sm-9">
<img src="" id="picImage" style="width:250px;height:90px;" alt="">
<input type="file" id="picFile" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svga">
<button class="btn btn-success" type="button" onclick="uploadfile('picFile','picImage','pic','picInfo')">上传</button>
<input type="hidden" id="pic" name="icon" class="form-control"/>
<span id="picInfo" style="color:red;"></span>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="add">提交</button>
</div>
</div>
</div>
</div>
<!-- 编辑家族弹窗 -->
<div class="modal fade" id="editFamilyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="editFamilyLabel">编辑家族</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="editFamilyForm">
<input type="hidden" name="editFamilyId" id="editFamilyId"/>
<div class="form-group">
<label for="editFalilyNick" class="col-sm-3 control-label">家族昵称</label>
<div class="col-sm-9">
<input type="text" name="editFalilyNick" id="editFalilyNick" class="form-control validate[required]">
</div>
</div>
<div class="form-group">
<label for="editLeaderId" class="col-sm-3 control-label">族长ID</label>
<div class="col-sm-9">
<input type="text" name="editLeaderId" id="editLeaderId" readonly="readonly"/>
</div>
</div>
<div class="form-group">
<label for="editYes" class="col-sm-3 control-label">是否开放家族币:</label>
<div class="col-sm-9">
<input type="radio" name="editOpenMoney" id="editYes" value="true">
<input type="radio" name="editOpenMoney" id="editNo" value="false">
</div>
</div>
<div class="form-group" id="editFamilyMoNameGroup">
<label for="editFamilyMoName" class="col-sm-3 control-label">家族币名称:</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="editFamilyMoName" id="editFamilyMoName" readonly="readonly">
</div>
</div>
<div class="form-group" id="editFamilyGameGroup">
<label for="editEnable" class="col-sm-3 control-label">是否开放家族游戏:</label>
<div class="col-sm-9">
<input type="radio" name="editOpenGame" id="editEnable" value="true">
<input type="radio" name="editOpenGame" id="editDisable" value="false">
</div>
</div>
<div class="form-group">
<label for="editPic" class="col-sm-3 control-label">家族头像:</label>
<div class="col-sm-9">
<img src="" id="editPicImage" style="width:250px;height:90px;" alt="">
<input type="file" id="editPicFile" name="uploadFile" accept="image/gif,image/jpeg,image/jpg,image/png,image/svga">
<button class="btn btn-success" type="button" onclick="uploadfile('editPicFile','editPicImage','editPic','editPicInfo')">上传</button>
<input type="hidden" id="editPic" name="icon" class="form-control"/>
<span id="editPicInfo" style="color:red;"></span>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="edit">保存</button>
</div>
</div>
</div>
</div>
<!--禁用家族弹窗-->
<div class="modal fade" id="forbidFamilyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="forbFamilyLabel">禁用家族</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="forbFamilyForm">
<input type="hidden" name="forbFamilyId" id="forbFamilyId"/>
<div class="form-group">
<label for="forbReason" class="col-sm-3 control-label">禁用原因</label>
<div class="col-sm-9">
<input type="text" name="forbReason" id="forbReason" class="form-control validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="forb">保存</button>
</div>
</div>
</div>
</div>
<!--解禁家族弹窗-->
<div class="modal fade" id="recoverFamilyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="recoverFamilyLabel">解禁家族</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="recoverFamilyForm">
<input type="hidden" name="forbFamilyId" id="recoverFamilyId"/>
<div class="form-group">
<label for="forbReason" class="col-sm-3 control-label">解禁原因</label>
<div class="col-sm-9">
<input type="text" name="forbReason" id="recoverReason" class="form-control validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="recover">保存</button>
</div>
</div>
</div>
</div>
<!--解散家族弹窗-->
<div class="modal fade" id="dissFamilyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="dissFamilyLabel">解散家族</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="dissFamilyForm">
<input type="hidden" name="dissFamilyId" id="dissFamilyId"/>
<div class="form-group">
<label for="dissReason" class="col-sm-3 control-label">解散原因</label>
<div class="col-sm-9">
<input type="text" name="dissReason" id="dissReason" class="form-control validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="move">提交</button>
</div>
</div>
</div>
</div>
<script src="../../static/js/ajaxfileupload.js"></script>
<script>
$(function () {
$('#table').bootstrapTable('destroy');
initTable();
// 查询刷新
$('#btnSearch').on('click', function () {
$('#table').bootstrapTable('destroy');
initTable();
})
// 新增家族弹窗
$("#btnAdd").click(function () {
clearForm("addFamilyForm");
//默认开放家族币和家族游戏
$("#enableMo").prop("checked",true);
$("#enableGame").prop("checked",true);
$("#addFamilyModal").modal('show');
});
//选择开放家族币联动
$("#enableMo").on("click", function () {
$("#familyMoNameGroup").show();
$("#familyMoAwardGroup").show();
$("#familyGameGroup").show();
});
$("#editYes").on("click", function () {
$("#editFamilyMoNameGroup").show();
$("#editFamilyGameGroup").show();
});
//不开放家族币联动
$("#enableMoNo").on("click", function () {
$("#familyMoNameGroup").hide();
$("#familyMoAwardGroup").hide();
$("#familyGameGroup").hide();
});
$("#editNo").on("click", function () {
$("#editFamilyMoNameGroup").hide();
$("#editFamilyGameGroup").hide();
});
//新增家族保存
$("#add").on("click", function () {
var familyName = $("#familyName").val();
var leaderId = $("#leader").val();
var enableMo = $("#enableMo").is(":checked");
var familyMoName = $("#familyMoName").val();
var familyMoAward = $("#familyMoAward").val();
var enableGame = $("#enableGame").is(":checked");
var pic = $("#pic").val();
if ($("#addFamilyForm").validationEngine('validate')) {
$.ajax({
type: 'post',
url: '/admin/family/saveOrUpdate.action',
data: {
name: familyName,
leader: leaderId,
openMoney: enableMo,
moneyName: familyMoName,
money: familyMoAward,
openGame: enableGame,
icon: pic
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#addFamilyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
}
;
});
});
//初始化表格数据
function initTable() {
$('#table').bootstrapTable({
columns: [
{field: 'tmp', title: 'familyId', align: 'center', checkbox: true, width: '5%', valign: 'middle'},
//{field: 'seq', title: '编号', align: 'center', width: '5%',valign: 'middle'},
{field: 'familyId', title: '家族ID', align: 'center', width: '5%', valign: 'middle'},
{field: 'familyName', title: '家族昵称', align: 'center', width: '5%', valign: 'middle'},
{
field: 'familyIcon',
title: '家族头像',
align: 'center',
width: '5%',
//valign: 'middle',
formatter: function (val, row, index) {
if (val.indexOf("https") == 0) {
return "<img src='" + val + "' height='106'>";
} else {
return row.value;
}
}
},
{field: 'leader.erbanNo', title: '族长ID', align: 'center', width: '5%', valign: 'middle'},
{field: 'leader.name', title: '族长昵称', align: 'center', width: '5%', valign: 'middle'},
{field: 'memberCount', title: '家族成员(人)', align: 'center', width: '5%', valign: 'middle'},
{field: 'moneyName', title: '家族币昵称', align: 'center', width: '5%', valign: 'middle'},
{field: 'leader.money', title: '家族币数量', align: 'center', width: '5%', valign: 'middle'},
{
field: 'groups',
title: '家族群',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val) {
var count = val.length;
return count;
} else {
return '0';
}
}
},
{
field: 'createTime',
title: '创建时间',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val) {
var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:00");
} else {
return '-';
}
}
},
{
field: 'temp',
title: '操作',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
var key = row.familyId;
var returnStr = '<button id="btnEdit" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id=' + key + '>' +
'<i class="glyphicon glyphicon-edit"></i> 编辑</button>&nbsp;&nbsp;';
if (row.status == 1) {//正在使用
returnStr = returnStr + '<button id="btnStop" name="btnStop" class="btn btn-sm btn-success opt-stop" data-id=' + key + '>' +
'<i class="glyphicon glyphicon-stop"></i> 禁用</button>&nbsp;&nbsp;';
} else if (row.status == 2) {//已禁用
returnStr = returnStr + '<button id="btnRecover" name="btnStop" class="btn btn-sm btn-danger opt-recover" data-id=' + key + '>' +
'<i class="glyphicon glyphicon-stop"></i> 解禁</button>&nbsp;&nbsp;';
}
return returnStr + '<button id="btnMove" name="btnMove" class="btn btn-sm btn-success opt-move" data-id=' + key + '>' +
'<i class="glyphicon glyphicon-move"></i> 解散</button>&nbsp;&nbsp;';
}
}
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
familyId: $('#familyId').val(),
familyNick: $('#familyNick').val(),
leaderId: $('#leaderId').val(),
leaderNick: $('#leaderNick').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/family/list.action',
onLoadSuccess: function () { //加载成功时执行
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'});
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
})
}
$("#table").on("click", '.opt-edit', function () {
clearForm("editFamilyForm");
var id = $(this).attr("data-id");
$.ajax({
type: "get",
url: "/admin/family/getById.action",
data: {familyId: id},
dataType: "json",
success: function (json) {
if (json) {
$("#editFamilyId").val(id);
$("#editFalilyNick").val(json.name);
$("#editLeaderId").val(json.leader);
ComboboxHelper.setDef("#editYes", json.openMoney);
ComboboxHelper.setDef("#editEnable", json.openGame);
// 礼物状态的值跟其他不同, 1为有效 0为无效
if (json.openMoney == true) {
//$("input:radio[name='enable']")[0].checked = true;
$("#editYes").prop("checked", true);
$("#editFamilyMoNameGroup").show();
$("#editFamilyGameGroup").show();
} else {
$("#editNo").prop("checked", true);
$("#editFamilyMoNameGroup").hide();
$("#editFamilyGameGroup").hide();
}
//已经设置过家族币名称
if(json.moneyName!=null&&json.moneyName!=""){
$("#editFamilyMoName").val(json.moneyName);
$("#editFamilyMoName").attr("readonly","readonly");
}else{
$("#editFamilyMoName").removeAttr("readonly");
}
if(json.openGame == true){
$("#editEnable").prop("checked", true);
}else{
$("#editDisable").prop("checked", true);
}
// 设置礼物图片
$('#editPic').val(json.icon);
$('#editPicImage').attr("src", json.icon);
if (json.icon != '') {
$("#editPicInfo").html('已上传');
} else {
$("#editPicInfo").html('未上传');
}
// 打开编辑弹窗
$("#editFamilyModal").modal('show');
} else {
$("#tipMsg").text("获取菜单信息出错");
$("#tipModal").modal('show');
}
}
});
});
//编辑家族保存
$("#edit").on("click", function () {
var familyId = $("#editFamilyId").val();
var familyName = $("#editFalilyNick").val();
var enableMo= $("#editYes").is(":checked");
var familyMoName = $("#editFamilyMoName").val();
var familyMoAward = $("#editFamilyMoAward").val();
var enableGame = $("#editEnable").is(":checked");
var pic = $("#editPic").val();
if ($("#editFamilyForm").validationEngine('validate')) {
$.ajax({
type: 'post',
url: '/admin/family/saveOrUpdate.action',
data: {
id:familyId,
name: familyName,
openMoney: enableMo,
moneyName: familyMoName,
money: familyMoAward,
openGame:enableGame,
icon: pic,
status:1
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#editFamilyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
}
;
});
//打开禁用家族弹窗
$("#table").on('click','.opt-stop',function(){
//清除数据
clearForm("forbidFamilyForm");
//设置数据
var familyId = $(this).attr("data-id");
$('#forbFamilyId').val(familyId);
$('#forbidFamilyModal').modal('show');
});
//禁用家族保存
$("#forb").on("click", function () {
var familyId = $("#forbFamilyId").val();
//TODO 权限教研暂时没做
if ($("#forbFamilyForm").validationEngine('validate')) {
$.ajax({
type: 'post',
url: '/admin/family/saveOrUpdate.action',
data: {
id:familyId,
status: 2,
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#forbidFamilyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
}
;
});
//打开解禁家族弹窗
$("#table").on('click','.opt-recover',function(){
//清除数据
clearForm("recoverFamilyForm");
//设置数据
var familyId = $(this).attr("data-id");
$('#recoverFamilyId').val(familyId);
$('#recoverFamilyModal').modal('show');
});
//禁用家族保存
$("#recover").on("click", function () {
var familyId = $("#recoverFamilyId").val();
//TODO 权限教研暂时没做
if ($("#recoverFamilyForm").validationEngine('validate')) {
$.ajax({
type: 'post',
url: '/admin/family/saveOrUpdate.action',
data: {
id:familyId,
status: 1,
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#recoverFamilyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
}
;
});
//打开解散家族弹窗
$("#table").on('click','.opt-move',function(){
//清除数据
clearForm("dissFamilyForm");
//设置数据
var familyId = $(this).attr("data-id");
$('#dissFamilyId').val(familyId);
$('#dissFamilyModal').modal('show');
});
//解散家族保存
$("#move").on("click", function () {
var familyId = $("#dissFamilyId").val();
//TODO 权限教研暂时没做
$("#tipMsg").text("操作中,请稍后...");
$("#tipModal").modal('show');
if ($("#dissFamilyForm").validationEngine('validate')) {
$.ajax({
type: 'post',
url: '/admin/family/remove.action',
data: {
familyId:familyId
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#dissFamilyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
}
;
});
function uploadfile(file, image, path, info) {
$(this).attr('disabled', "true");
$.ajaxFileUpload({
fileElementId: file, //需要上传的文件域的ID即<input type="file">的ID。
url: '/admin/upload/img', //后台方法的路径
type: 'post', //当要提交自定义参数时这个参数要设置成post
dataType: 'json', //服务器返回的数据类型。可以为xml,script,json,html。如果不填写jQuery会自动判断。
secureuri: false, //是否启用安全提交默认为false。
async: true, //是否是异步
success: function (json) { //提交成功后自动执行的处理函数参数data就是服务器返回的数据。
if (json.path) {
$('#' + path).val(json.path);
$('#' + image).attr("src", json.path);
if (json.path != '') {
$("#" + info).html('已上传成功');
} else {
$("#" + info).html('未上传成功');
}
console.log(json.path);
} else {
$("#tipMsg").text(json.msg);
$("#tipModal").modal('show');
}
},
error: function (data, status, e) { //提交失败自动执行的处理函数。
$(this).removeAttr("disabled");
console.error(e);
}
});
}
function clearForm(formId) {
var $form = $('#'+formId);
debugger;
//清空输入框
$form.find('input').val('');
//清空单选按钮
$form.find('input:radio').attr("checked",false);
//清空文本域
$form.find('textarea').val('');
//清空图片
$form.find('img').attr("src","");
//清空已上传
$form.find('span').html("");
}
/**导出家族列表*/
$("#btnExport").on("click", function () {
$("#searchForm").submit();
})
</script>

View File

@@ -1,182 +0,0 @@
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<form id="searchForm" action="/admin/family/member/export" method="get" target="_blank">
<div class="col-sm-12">
<label for="familyId" class="col-sm-1 control-label">家族ID:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="familyId" id="familyId"></div>
<label for="familyNick" class="col-sm-1 control-label">家族昵称:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="familyNick" id="familyNick"></div>
<label for="memberId" class="col-sm-1 control-label">用户ID:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="memberId" id="memberId"></div>
<label for="memberId" class="col-sm-1 control-label">用户昵称:</label>
<div class="col-sm-2"><input type="text" class="form-control" name="memberNick" id="memberNick"></div>
</div>
</form>
<div class="col-sm-12">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>搜索
</button>
<button id="btnExport" class="btn btn-default ">
<i class="glyphicon glyphicon-export"></i>导出
</button>
<button id="btnBatchDel" class="btn btn-default ">
<i class="glyphicon glyphicon-wrench"></i>批量删除
</button>
</div>
</div>
</div>
</div>
</section>
<script src="../../static/js/ajaxfileupload.js"></script>
<script>
$(function () {
$('#table').bootstrapTable('destroy');
initTable();
// 查询刷新
$('#btnSearch').on('click', function () {
$('#table').bootstrapTable('destroy');
initTable();
});
//批量删除
$("#btnBatchDel").on('click',function () {
var rows = $("#table").bootstrapTable("getSelections");
if (rows.length == 0) {
alert("请先选择要删除的记录");
return;
}
console.log("rows: " + rows.length);
var idArr = [];
var familyIdArr = [];
for (var i = 0; i < rows.length; i++) {
if(rows[i]['position']=='10'){
alert(rows[i]['name']+"是"+rows[i]['familyName']+"家族的族长,不允许删除");
return;
}
idArr.push(rows[i]['uid']);
familyIdArr.push(rows[i]['familyId']);
}
console.log(idArr);
console.log(familyIdArr);
if (confirm("你确认批量删除该记录吗?" +
"\r\n删除后再也不能找回请谨慎操作")) {
$.ajax({
type: 'post',
url: "/admin/family/member/del.action",
data: {
'ids': JSON.stringify(idArr),
'familyIds': JSON.stringify(familyIdArr)
},
dataType: "json",
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("删除成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
} else {
$("#tipMsg").text("删除失败");
$("#tipModal").modal('show');
}
}
});
}
})
});
function initTable(){
//初始化表格数据
$('#table').bootstrapTable({
columns: [
{field: 'tmp', valign: 'middle', title: 'uid', align: 'center', checkbox: true, width: '5%'},
//{field: 'seq', title: '编号', align: 'center', width: '5%',valign: 'middle'},
{field: 'familyId', title: '家族ID', align: 'center', width: '5%',valign: 'middle'},
{field: 'familyName', title: '家族昵称', align: 'center', width: '5%',valign: 'middle'},
{field: 'erbanNo', title: '用户ID', align: 'center', width: '5%',valign: 'middle'},
{field: 'name', title: '用户昵称', align: 'center', width: '5%',valign: 'middle'},
{
field: 'position',
title: '职位',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val=='10') {
return "族长";
} else if(val=='0'){
return '成员';
}else{
return '-';
}
}
},
{field: 'money', title: '家族币余额', align: 'center', width: '5%',valign: 'middle'},
{
field: 'joinTime',
title: '加入时间',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val) {
var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:00");
} else {
return '-';
}
}
}
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
familyId: $('#familyId').val(),
familyNick: $('#familyNick').val(),
memberId: $('#memberId').val(),
memberNick: $('#memberNick').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/family/member/list.action',
onLoadSuccess: function () { //加载成功时执行
//复选框居中
$(".bs-checkbox").css({'text-align':'center','vertical-align':'middle'});
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
}
/**导出功能*/
$("#btnExport").on("click",function(){
$("#searchForm").submit();
})
</script>

View File

@@ -1,451 +0,0 @@
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
家族ID:<input type="text" class="input-sm" name="familyId" id="familyId">
家族昵称:<input type="text" class="input-sm" name="familyNick" id="familyNick">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>搜索
</button>
</div>
</div>
</div>
</section>
<!--分配家族币弹窗-->
<div class="modal fade" id="distriMoneyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
</button>
<h4 class="modal-title" id="distriMoneyLabel">家族币分配</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="distriMoneyForm">
<input type="hidden" name = "distriTargetId" id = "distriTargetId">
<input type="hidden" name = "distriFamilyId" id = "distriFamilyId">
<div class="form-group">
<label for="distriAmount" class="col-sm-3 control-label">家族币分配数量:</label>
<div class="col-sm-9">
<input type="text" class="form-control" name="distriAmount" id="distriAmount">
</div>
</div>
<div class="form-group">
<label for="distriType" class="col-sm-3 control-label">分配方式:</label>
<div class="col-sm-9">
<select name="distriType" id="distriType">
<option value="">-- 请选择 --</option>
<option value="1" >系统奖励</option>
<option value="2">活动奖励</option>
<option value="3">活跃奖励</option>
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="distri">提交</button>
</div>
</div>
</div>
</div>
<!-- 禁用家族币弹窗 -->
<div class="modal fade" id="forbMoneyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="forbMoneyLabel">禁用家族币</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="forbMoneyForm">
<input type="hidden" name="forbFamilyId" id="forbFamilyId"/>
<div class="form-group">
<label for="forbReason" class="col-sm-3 control-label">禁用原因</label>
<div class="col-sm-9">
<input type="text" name="forbReason" id="forbReason" class="form-control validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="forb">保存</button>
</div>
</div>
</div>
</div>
<!-- 解禁家族币弹窗 -->
<div class="modal fade" id="recoverMoneyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="recoverMoneyLabel">解禁家族币</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="recoverMoneyForm">
<input type="hidden" name="recoverFamilyId" id="recoverFamilyId"/>
<div class="form-group">
<label for="forbReason" class="col-sm-3 control-label">解禁原因</label>
<div class="col-sm-9">
<input type="text" name="forbReason" id="recoverReason" class="form-control validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="recover">保存</button>
</div>
</div>
</div>
</div>
<!--扣除家族币弹窗-->
<div class="modal fade" id="discountMoneyModal" tabindex="-1" role="dialog" aria-labelledby="modalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">x</span></button>
<h4 class="modal-title" id="discountMoneyLabel">扣除家族币</h4>
</div>
<div class="modal-body">
<form class="form-horizontal" id="discountMoneyForm">
<input type="hidden" name="dissTargetId" id="dissTargetId"/>
<input type="hidden" name="dissFamilyId" id="dissFamilyId"/>
<div class="form-group">
<label for="discountAmount" class="col-sm-3 control-label">家族币扣除数量</label>
<div class="col-sm-9">
<input type="text" name="discountAmount" id="discountAmount" class="form-control validate[required]">
</div>
</div>
<div class="form-group">
<label for="discountReason" class="col-sm-3 control-label">扣除原因</label>
<div class="col-sm-9">
<input type="text" name="discountReason" id="discountReason" class="form-control validate[required]">
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
<button type="button" class="btn btn-primary" id="discount">提交</button>
</div>
</div>
</div>
</div>
<script src="../../static/js/ajaxfileupload.js"></script>
<script>
$(function () {
$('#table').bootstrapTable('destroy');
initTable();
// 查询刷新
$('#btnSearch').on('click', function () {
$('#table').bootstrapTable('destroy');
initTable();
});
});
//打开家族币分配弹窗
$("#table").on('click','.opt-edit',function(){
clearForm("distriMoneyForm");
var targetId = $(this).attr("data-id-1");
var familyId = $(this).attr("data-id-2");
var openMoney = $(this).attr("data-id-3");
if(openMoney=="false"){
$("#tipMsg").text("该家族家族币已被禁用,无法进行分配操作!");
$("#tipModal").modal('show');
return false;
}
$("#distriTargetId").val(targetId);
$("#distriFamilyId").val(familyId);
$("#distriMoneyModal").modal("show");
})
//家族币分配保存
$("#distri").on("click",function(){
var familyId = $("#distriFamilyId").val();
var targetId = $("#distriTargetId").val();
var changeAmount = $("#distriAmount").val();
var title = $("#distriType").val();
if(!changeAmount||!title){
$("#tipMsg").text("分配数量和分配方式不能为空");
$("#tipModal").modal('show');
return;
}
var titles = "交易";
if("1"==title){
titles = "系统奖励";
}else if("2"==title){
titles = "活动奖励";
}else if("3"==title){
titles = "活跃奖励";
}
var password = $("#distriPassword").val();
//TODO 权限密码校验目前没做
$.ajax({
type: 'post',
url: '/admin/family/money/update.action',
data: {
familyId:familyId,
targetId:targetId,
changeAmount: changeAmount,
titles: titles,
type: 1
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#distriMoneyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
});
//打开家族币扣除弹窗
$("#table").on('click','.opt-move',function(){
clearForm("discountMoneyModal");
var targetId = $(this).attr("data-id-1");
var familyId = $(this).attr("data-id-2");
var openMoney = $(this).attr("data-id-3");
if(openMoney=="false"){
$("#tipMsg").text("该家族家族币已被禁用,无法进行扣除操作!");
$("#tipModal").modal('show');
return;
}
$("#dissTargetId").val(targetId);
$("#dissFamilyId").val(familyId);
$("#discountMoneyModal").modal("show");
})
//家族币扣除保存
$("#discount").on("click",function(){
var familyId = $("#dissFamilyId").val();
var targetId = $("#dissTargetId").val();
var changeAmount = $("#discountAmount").val();
var titles = $("#discountReason").val();
var password = $("#distriPassword").val();
if(!changeAmount||!titles){
$("#tipMsg").text("扣除数量和扣除原因不能为空");
$("#tipModal").modal('show');
return;
}
//TODO 权限密码校验目前没做
$.ajax({
type: 'post',
url: '/admin/family/money/update.action',
data: {
familyId:familyId,
targetId:targetId,
changeAmount: changeAmount,
titles: titles,
type: 2
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#discountMoneyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
});
//打开禁用家族币弹窗
$("#table").on('click','.opt-stop',function(){
//清除数据
clearForm("forbMoneyForm");
//设置数据
var familyId = $(this).attr("data-id-2");
$('#forbFamilyId').val(familyId);
$('#forbMoneyModal').modal('show');
});
//禁用家族币保存
$("#forb").on("click", function () {
var familyId = $("#forbFamilyId").val();
//TODO 权限教研暂时没做
$.ajax({
type: 'post',
url: '/admin/family/saveOrUpdate.action',
data: {
id:familyId,
openMoney: 0,
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#forbMoneyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
});
//打开解禁家族币弹窗
$("#table").on('click','.opt-recover',function(){
//清除数据
clearForm("recoverMoneyForm");
//设置数据
var familyId = $(this).attr("data-id-2");
$('#recoverFamilyId').val(familyId);
$('#recoverMoneyModal').modal('show');
});
//解禁家族币保存
$("#recover").on("click", function () {
var familyId = $("#recoverFamilyId").val();
//TODO 权限教研暂时没做
$.ajax({
type: 'post',
url: '/admin/family/saveOrUpdate.action',
data: {
id:familyId,
openMoney: 1,
},
dataType: 'json',
success: function (json) {
if (json.success == 'true') {
$("#tipMsg").text("保存成功");
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
$("#recoverMoneyModal").modal('hide');
} else {
$("#tipMsg").text("保存失败." + json.msg);
$("#tipModal").modal('show');
TableHelper.doRefresh("#table");
}
}
});
});
function initTable() {
//初始化表格数据
$('#table').bootstrapTable({
columns: [
{field: 'tmp', valign: 'middle', title: 'familyId', align: 'center', checkbox: true, width: '10%'},
//{field: 'seq', title: '编号', align: 'center', width: '5%',valign: 'middle'},
{field: 'familyId', title: '家族ID', align: 'center', width: '10%', valign: 'middle'},
{field: 'familyName', title: '家族昵称', align: 'center', width: '10%', valign: 'middle'},
{field: 'moneyName', title: '家族币名称', align: 'center', width: '10%', valign: 'middle'},
{field: 'income', title: '家族币总收入', align: 'center', width: '10%', valign: 'middle'},
{field: 'cost', title: '家族币总支出', align: 'center', width: '10%', valign: 'middle'},
{field: 'surplus', title: '家族币总剩余', align: 'center', width: '10%', valign: 'middle'},
{field: 'consume', title: '总消耗', align: 'center', width: '10%', valign: 'middle'},
{
field: 'createTime',
title: '创建时间',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
if (val) {
var date = new Date(val);
return date.format("yyyy-MM-dd hh:mm:00");
} else {
return '-';
}
}
},
{
field: 'temp',
title: '操作',
align: 'center',
width: '5%',
valign: 'middle',
formatter: function (val, row, index) {
var familyId = row.familyId;
var leaderId = row.leaderId;
var openMoney= row.openMoney;
var returnStr = '<button id="btnGive" name="btnEdit" class="btn btn-sm btn-success opt-edit" data-id-1="' + leaderId + '" data-id-2="'+familyId+'" data-id-3="'+openMoney+'">' +
'<i class="glyphicon glyphicon-edit"></i> 分配</button>&nbsp;&nbsp;';
if(row.openMoney) {
returnStr = returnStr + '<button id="btnStop" name="btnStop" class="btn btn-sm btn-success opt-stop" data-id-1="' + leaderId + '" data-id-2="' + familyId + '">' +
'<i class="glyphicon glyphicon-stop"></i> 禁用</button>&nbsp;&nbsp;';
}else{
returnStr = returnStr + '<button id="btnRecover" name="btnStop" class="btn btn-sm btn-danger opt-recover" data-id-1="' + leaderId + '" data-id-2="' + familyId + '">' +
'<i class="glyphicon glyphicon-stop"></i> 解禁</button>&nbsp;&nbsp;';
}
return returnStr + '<button id="btnTake" name="btnMove" class="btn btn-sm btn-success opt-move" data-id-1="' + leaderId + '" data-id-2="'+familyId+'" data-id-3="'+openMoney+'">' +
'<i class="glyphicon glyphicon-move"></i> 扣除</button>&nbsp;&nbsp;';
}
}
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumberpageSizesearchTextsortNamesortOrder
//设置为limit可以获取limit, offset, search, sort, order
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
familyId: $('#familyId').val(),
familyNick: $('#familyNick').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/family/money/list.action',
onLoadSuccess: function () { //加载成功时执行
//复选框居中
$(".bs-checkbox").css({'text-align': 'center', 'vertical-align': 'middle'});
$("th[data-field^='income']").attr("title","族长所有收入");
$("th[data-field^='cost']").attr("title","族长所有支出");
$("th[data-field^='consume']").attr("title","家族内所有成员家族币消耗");
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
}
function clearForm(formId) {
var $form = $('#'+formId);
$form.find('input').val('');
$form.find('select').val('');
$form.find('textarea').val('');
}
</script>

View File

@@ -1,130 +0,0 @@
<section class="content">
<div class="box box-primary">
<div class="box-body">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1 id="itemTitle"></h1>
</section>
<!-- .content -->
<div id="table"></div>
<div id="toolbar">
<div class="col-sm-12">
<h3 id="version"></h3>
<div class="pull-left">
<form id="searchForm" class="col-sm-pull-12" action="/admin/family/statistics/export"
method="post" target="_blank">
家族ID :<input type="text" class="input-sm" name="familyId" id="familyId">
<div class="pull-right">
<label for="beginDate" class="col-sm-2 control-label">开始日期:</label>
<div class="col-sm-4"><input type="text" class="form-control" name="beginDate"
id="beginDate">
</div>
<label for="endDate" class="col-sm-2 control-label">结束日期:</label>
<div class="col-sm-4"><input type="text" class="form-control" name="endDate"
id="endDate"
></div>
</div>
</form>
</div>
<div class="pull-right">
<button id="btnSearch" class="btn btn-default">
<i class="glyphicon glyphicon-search"></i>查询
</button>
<button id="btnExport" class="btn btn-default">
<i class="glyphicon glyphicon-export"></i>导出
</button>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
$(function () {
$('#table').bootstrapTable('destroy');
$('#table').bootstrapTable({
columns: [
{field: 'familyId', title: '家族ID', align: 'center', width: '5%'},
{field: 'familyName', title: '家族名', align: 'center', width: '5%'},
{field: 'totalNum', title: '总数', align: 'center', width: '5%'},
// {
// field: 'dateStr',
// title: '日期',
// align: 'center',
// valign: 'middle',
// width: '5%',
// formatter: function (val, row, index) {
// if (val) {
// var date = new Date(val);
// return date.format("yyyy-MM-dd");
// } else {
// return '-';
// }
// }
// }
],
cache: false,
striped: true,
showRefresh: false,
pageSize: 20,
pagination: true,
pageList: [20, 50, 100, 200, 300, 500],
search: false,
sidePagination: "server", //表示服务端请求
queryParamsType: "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
page: params.pageNumber,
pageSize: params.pageSize,
familyId: $('#familyId').val(),
beginDate: $('#beginDate').val(),
endDate: $('#endDate').val(),
};
return param;
},
toolbar: '#toolbar',
url: '/admin/family/statistics/list.action',
onLoadSuccess: function (json) { //加载成功时执行
console.log("load success");
},
onLoadError: function () { //加载失败时执行
console.log("load fail");
}
});
// 导出EXCEL
$('#btnExport').on('click', function () {
if (!$('#beginDate').val() || !$('#endDate').val()) {
$("#tipMsg").text("请选择导出的开始和结束日期");
$("#tipModal").modal('show');
return;
}
var form = $("#searchForm");
form.submit();
});
// 查询刷新
$('#btnSearch').on('click', function () {
TableHelper.doRefresh('#table');
});
var picker1 = $("#beginDate").datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
var picker2 = $('#endDate').datetimepicker({
format: 'yyyy-mm-dd hh:ii:00',
autoclose: true
});
picker1.on('changeDate', function () {
var date = $('#beginDate').datetimepicker('getDate');
picker2.datetimepicker('beginDate', date);
});
picker2.on('changeDate', function () {
var date = $('#endDate').datetimepicker('getDate');
picker1.datetimepicker('setEndDate', date);
});
});
</script>

View File

@@ -88,7 +88,7 @@ public class FlowTeamMemberStatisticsService {
List<Date> dates = DateTimeUtil.getBetweenDates(startTime, endTime, true);
if (dates.size() > FlowTeamAdminConstants.MAX_QUERY_DATES) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "查询时间段不能大于" + FlowTeamAdminConstants.MAX_QUERY_DATES + "");
throw new ServiceException(BusiStatus.SERVERBUSY, "查询时间段不能大于" + FlowTeamAdminConstants.MAX_QUERY_DATES + "");
}
if (dates.size() <= 0) {
throw new ServiceException(BusiStatus.PARAMERROR, "查询时间段必须至少间隔1天");

View File

@@ -1,43 +0,0 @@
package com.accompany.core.vo;
/**
* Created by liuguofu on 2017/6/30.
*/
public class VisitorVo {
private Long uid;
private String netEaseToken;
private String nick;
private Byte gender;
public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public String getNetEaseToken() {
return netEaseToken;
}
public void setNetEaseToken(String netEaseToken) {
this.netEaseToken = netEaseToken;
}
public String getNick() {
return nick;
}
public void setNick(String nick) {
this.nick = nick;
}
public Byte getGender() {
return gender;
}
public void setGender(Byte gender) {
this.gender = gender;
}
}

View File

@@ -312,7 +312,7 @@ public class AccountService extends ServiceImpl<AccountMapper, Account> {
public void delNickPasswordCache(Long erbanNo) {
String key = RedisKey.user_erban_no_uid.getKey(erbanNo.toString());
jedisService.remove(key);
jedisService.del(key);
}
public Account getAccountByUid(Long uid) {

View File

@@ -76,7 +76,7 @@ public class PhoneAuthApplyRecordServiceImpl extends ServiceImpl<PhoneAuthApplyR
String lockeKey = RedisKey.phone_auth_apply_lock.getKey(phone);
String lockVal = jedisLockService.lock(lockeKey);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {
PhoneAuthApplyRecord applyRecord = getAuthApplyRecord(phone, phoneAreaCode);
@@ -123,7 +123,7 @@ public class PhoneAuthApplyRecordServiceImpl extends ServiceImpl<PhoneAuthApplyR
@Transactional(rollbackFor = Exception.class, transactionManager = "mybatisplusTransactionManager")
public void boundAuthCode(Long uid, String authCode, DeviceInfo deviceInfo) {
if (deviceInfo == null || StringUtils.isEmpty(authCode)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Account account = accountService.getAccountByUid(uid);
@@ -152,7 +152,7 @@ public class PhoneAuthApplyRecordServiceImpl extends ServiceImpl<PhoneAuthApplyR
String lockeKey = RedisKey.phone_auth_apply_lock.getKey(realPhone);
String lockVal = jedisLockService.lock(lockeKey);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {
PhoneAuthApplyRecord applyRecord = getAuthApplyRecordByPhone(realPhone);

View File

@@ -1,25 +0,0 @@
package com.accompany.common.exception;
/**
* Created by PaperCut on 2018/2/3.
*/
public class BusinessException extends RuntimeException{
public BusinessException() {
}
public BusinessException(String message) {
super(message);
}
public BusinessException(String message, Throwable cause) {
super(message, cause);
}
public BusinessException(Throwable cause) {
super(cause);
}
public BusinessException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}

View File

@@ -4,204 +4,167 @@ package com.accompany.common.status;
/**
* Created by liuguofu on 2017/4/28.
*/
public enum BusiStatus implements BusiStatusInterface {
SUCCESS(200, "success"),
public enum BusiStatus {
SUCCESS(200,"success"), //成功
//OAuthStatus
ACCESS_DENIED(100,"access denied"), //拒絕訪問
INVALID_REQUEST(101,"invalid request"), //請求不合法
INVALID_CLIENT_ID(104,"invalid client id"), //client id不存在或已刪除
UNAUTHORIZED_CLIENT_ID(106,"unauthorized client id"), //client id未授權
USERNAME_PASSWORD_MISMATCH(107,"用戶名密碼不匹配"), //用戶名密碼不匹配
INVALID_USER(109,"用戶不存在或密碼錯誤"), //用戶不存在或已刪除
INVALID_TOKEN(111,"invalid token"), //token不存在或已被用戶刪除或者用戶修改了密碼
ACCESS_TOKEN_HAS_EXPIRED(113,"access token has expired"), //access_token已過期
INVALID_GRANT(119,"invalid grant type"),
UNSUPPORTED_GRANT_TYPE(120,"unsupported grant type"), //錯誤的grant_type
UNSUPPORTED_RESPONSE_TYPE(121,"unsupported response type"), //錯誤的response_type
CLIENT_SECRET_MISMATCH(122,"client secret mismatch"), //client_secret不匹配
REDIRECT_URI_MISMATCH(123,"redirect uri mismatch"), //redirect_uri不匹配
UNSUPPORTED_TICKET_ISSUE_TYPE(127,"unsupported ticket issue type"),
INVALID_SCOPE(133,"invalid scope"),
INVALID_IDENTIFYING_CODE(150, "短信驗證碼不正確"), //不可用的驗證碼
INVALID_THIRD_TOKEN(162,"invalid third token"), //第三方token不合法
THIRD_ACCOUNT_HAVE_BIND(163,"the third account have bind"), //第三方賬戶已經綁定或之前已使用該賬戶登陸過系統
USER_NOT_EXISTED(167, "用戶不存在"),
SIGN_IP_TO_OFTEN(301,"註冊過於頻繁"),//註冊過於頻繁
SMS_IP_TO_OFTEN(302,"獲取短信過於頻繁"),//獲取短信過於頻繁
ACCOUNT_ERROR(407, "User account abnormality, please contact official customer service"),
DECEIVE_ERROR(408,"User account abnormality, please contact official customer service"),//賬號異常-設備被封
UNKNOWN(999, "Unknown"),
ALREADY_BOUND(1799,"該賬號已經綁定過"), //缺少參數
ALREADY_BOUND_WEIXIN(1811,"該賬號已經綁定微信"),
WEAK_PASSWORD(3001, "密碼必須使用6-16個字符內的數字和英文字母組合哦"),
VERIFY_CODE_ERROR(3002, "SMS verification code verification failed"),
APP_VERSION_TOO_OLD(3004, "This product has been discontinued. Thank you for your support!"),
SUPER_ADMIN_USER_ERROR(136, "超級管理員error:136"),
INVALID_LOGIN_TYPE_ERROR(3004, "該賬號只允許通過ID登錄"),
PHONE_BIND_TOO_MANY_ACCOUNT(3005, "該手機號存在多個ID的綁定關係請聯繫公會運營處理"),
PHONE_BIND_TOO_MANY_ACCOUNT2(25002, "該手機號存在多個ID的綁定關係請輸入用戶ID進行登錄"),
PHONE_BE_INTERCEPTED(3006, "This phone number has violated regulations"),
PASSWORD_ERROR(3007, "手機號或密碼錯誤"),
OLD_PASSWORD_ERROR(3008, "原密碼錯誤"),
ACCOUNT_CANCEL(3009, "該賬號已註銷"),
ACCOUNT_CANCEL_INFO_NOT_EXIST(3010, "獲取不到賬號註銷信息"),
PWD_WRONG_OVER_LIMIT(3011, "密碼錯誤次數過多請10分鐘后重試"),
PHONE_BIND_ERROR(3012, "绑定手机号错误,请重新输入"),
ACCOUNT_NOT_BIND_PHONE(3013, "未绑定手机号"),
NOTEXISTS(404, " Not present "),
IP_REGION_HAD_LIMIT(401, " The area is currently not open for use "),
NOAUTHORITY(401, " No permission "),
FROZEN_USER(402, " The account has been frozen. Please contact official customer service "),
ACCOUNT_ERROR(407, " User account abnormality, please contact official customer service "),
SERVERERROR(500, " Being distracted~Please try again later "),
SERVERBUSY(503, " Being distracted~Please try again later "),
SERVER_BUSY(503, " Being distracted~Please try again later "),
SERVICE_STOP(503, " Service temporarily interrupted, please remain calm "),
ROOM_UNCHANGE(505, " Please contact the official for modification "),
REQUEST_FAST(1000, " Please do not make frequent requests "),
REQUEST_PARAM_ERROR(1000, " Parameter error, please try again "),
ACTIVITYNOTSTART(3100, " The activity has not started yet "),
ACTIVITYNOTEND(3200, " The activity has ended "),
INVALID_SERVICE(199, " Invalid service "),
SERVEXCEPTION(5000, " Service exception "),
UNKNOWN(999, " Unknown "),
BUSIERROR(4000, " Being distracted~Please try again later "),
PARAMETERILLEGAL(1444, " invalid parameter "),
ILLEGAL_OPERATE(408, " Illegal operation or lack of permission "),
ALERT_SUCCESS(1, " Successfully reported "),
ALERT_PARAMETER_ILLEGAL(-1, " The required parameter is empty "),
ALERT_FAIL(-2, " Service exception "),
ALERT_SIGN_FAIL(-3, " Verification failed "),
PHONE_REGISTERED(1402, " Mobile number registered and bound "),
PHONE_UNREGISTERED(1403, " The phone number does not exist, please register first "),
USERNOTEXISTS(1404, " user does not exist "),
USERINFONOTEXISTS(1405, " You can only open a room after completing your personal information! "),
NICK_TOO_LONG(1406, " Nickname too long "),
NEEDLOGIN(1407, " Login required "),
USER_INCORRECT_PAYMENT_PASS(1409, " The payment password is incorrect "),
USER_INCORRECT_LOGIN_PASS(1410, " Incorrect login password "),
USER_LOGIN_PASS_NULL(1411, " User login password is empty "),
PHONE_HAS_MANY_ACCOUNTS(1412, " This phone number has multiple ID binding relationships. Please enter the user ID for operation "),
ILLEGAL_USER(1412, " illegal user "),
USER_NICK_EXISTED(1413, " User nickname already exists "),
USER_NOT_COMPLETE_INFO(1415, " Incomplete user information "),
VIDEONOTEXISTS(1604, " The video does not exist "),
COLLECTEXISTS(1605, " Collect exists "),
NOTLIKEONESELF(1500, " Unable to like oneself "),
WEEKNOTWITHCASHTOWNUMS(1600, " Sorry, withdrawals can only be made up to% s times per week "),
ALIAPYACCOUNTNOTEXISTS(16001, " Please fill in the Alipay account first "),
PRIVATEPHOTOSUPMAX(1700, " More than 8 Albums "),
ROOMRUNNING(1500, " The living room is in operation "),
ROOMRCLOSED(1501, " The living room has been closed "),
ROOMNOTEXIST(1502, " The living room does not exist "),
NOTHAVINGLIST(1600, " no data "),
OPENROOMFALSE(1503, " Failed to create living room "),
AUCTCURDOING(2100, " It's already in the auction "),
AUCTCURLESSTHANMAXMONEY(2101, " The bid is lower than the current highest price "),
AUCTCURYOURSELFERROR(2102, " You can't audit yourself "),
PURSEMONEYNOTENOUGH(2103, " Insufficient account balance, please recharge "),
DIAMONDNUMNOTENOUGH(2104, " Insufficient wallet balance "),
REDPACKETNUMNOTENOUGH(2105, " Insufficient amount of red envelope "),
RED_PACKET_RATE_NOT_ENOUGH(2106, " Insufficient proportion of red envelope sharing "),
SENDGOLDNOTENOUGH(2107, " The transfer amount exceeds the gold coin balance "),
USER_IS_EMPTY(2108, " Please enter your phone number/platform number "),
ORDERNOTEXISTS(3404, " Secret chat does not exist "),
ORDERFINISHED(3100, " The secret conversation has ended "),
SMS_SEND_ERROR(4001, " SMS sending failed "),
SMS_SEND_SUCCESS(200, " SMS sent successfully "),
PHONEINVALID(4002, " Please enter the correct phone number "),
SMSCODEERROR(4003, " SMS verification code error, please re-enter! "),
ILLEGAL_PHONE(4004, " Illegal mobile phone number "),
ORDER_TIME_OUT(4005, " Order timeout, please make a new payment "),
MICRONOTININVIATEDLIST(6000, " You are not in the invited list "),
MICRONUMLIMIT(60001, " Micro number limit "),
GOLODEXCHANGEDIAMONDNOTENOUGH(70001, " Insufficient diamond balance "),
EXCHANGEINPUTERROR(70002, " Input error, please enter an integer multiple of 10 "),
GIFTDOWNORNOTEXISTS(8000, " The gift has been taken off the shelves, please look forward to more gifts~ "),
GIFT_IS_NOT_ALLOWED_TO_BE_SENT(8000, " This gift cannot be given out~ "),
GIFTISEMPTY(8001, " The number of gifts is not enough~ "),
GIFT_AMOUNT_NOT_ENOUGH(8002, " Insufficient gift value "),
GIFTNOAUTHORITY(8401, " The noble level is not enough~ "),
GIFT_IS_NOT_EXIST(8404, " Gift does not exist "),
GIFT_IS_EXIST(8405, " Gift already exists "),
TYPE_IS_EXIST(8406, " Classification already exists "),
NOBLENORECOMCOUNT(3401, " This nobleman has no chance of recommendation "),
NOBLENOAUTH(3402, " This nobleman has this privilege "),
NOBLENOTEXISTS(3404, " Nobility does not exist "),
NOBLEUSEREXIST(3301, " This level of nobility has been activated "),
NOBLEOPENERROR(3500, " Failed to activate nobles "),
NOBLEEXPIRE(3501, " The noble level has expired "),
SMSIPTOOFTEN(302, " Getting text messages too frequently "),
iSPROVING(1400, " Under review "),
PARAMERROR(1900, " Parameter error "),
NORIGHT(1401, " You do not have this privilege "),
ISUNBANGSTATUS(1901, " It is already in unbound state "),
NOMORECHANCE(9000, " There are no promotional opportunities left, just recharge or share to have promotional opportunities! "),
USER_DRAW_TO_MORE(9001, " Frequent promotional activities "),
VERSIONISNULL(80001, " Version is empty, please check the version number "),
VERSIONTOLOW(80002, " This product has been discontinued. Thank you for your support! "),
VERSIONTOOOLD(80002, " This product has been discontinued. Thank you for your support! "),
CANOTUSEAPPLEPAY(7500, " Currently unable to use Apple Pay, please click on the discount to recharge "),
CARPORTHADEXPIRE(6405, " The vehicle has expired "),
CARPORTNOTEXIST(6406, " The vehicle does not exist "),
CARGOODSEXIST(6301, " The user already owns the vehicle "),
CAR_GOODS_NOT_EXISTS(6201, " The vehicle does not exist "),
CAR_GOODS_EXPIRED(6202, " The vehicle has been taken off the shelves "),
CAR_GOODS_LIMIT(6203, " Restricted vehicles are not available for purchase "),
CAR_NOT_GOLD_SALE(6210, " This vehicle does not support coin purchases "),
CAR_NOT_RADISH_SALE(6211, " This vehicle does not support radish purchase "),
MONSTER_NOT_APPEAR(6501, " Monster not appearing during the time period "),
MONSTER_DEFEATED(6502, " The monster has been defeated "),
MONSTER_ESCAPED(6503, " The monster has escaped "),
MONSTER_NOT_EXISTS(6504, " Monsters do not exist "),
WEEK_STAR_CONFIG(8200, " The star ranking configuration for this week already exists "),
ILLEGAL_TRANSFER_REQUEST(1700, " Illegal transfer request "),
TRANSFER_COMPLETED(1701, " Transaction completed, no need for duplicate requests "),
DUPLICATE_TRANSFER_REQUEST(1702, " Repeated transfer request "),
HEADWEAR_NOT_EXISTS(1800, " Headwear does not exist "),
HEADWEAR_SOLD_OUT(1801, " The headwear has been removed from the shelves "),
HEADWEAR_EXPIRED(1802, " The headwear has expired "),
HEADWEAR_LIMIT_NOBLE(1803, " Exclusive products for the nobility "),
HEADWEAR_LIMIT_ACTIVITY(1804, " Event limited products "),
HEADWEAR_LIMIT_WEEK_STAR(1805, " Limited products on the weekly star list "),
HEADWEAR_LIMIT_MONSTER(1806, " Monster Reward Limited Product "),
HEADWEAR_NOT_BUY(1807, " The user did not purchase the headwear "),
HEADWEAR_NOT_GOLD_SALE(1808, " This headwear does not support coin purchases "),
HEADWEAR_NOT_RADISH_SALE(1809, " This headwear does not support radish purchase "),
FAMILY_NOT_EXISTS(7000, " Family does not exist or has been disabled "),
HAVE_JOIN_IN_FAMILY(7001, " You need to exit the current family to join it "),
HAVE_JOIN_IN_THIS_FAMILY(7002, " You have joined the family "),
YOU_HAVE_BEEN_REJECT(7003, " You were rejected by the family "),
FAMILY_HAVE_APPLY(7004, " You have already applied for the family "),
FAMILY_MESSAGE_EXPIRE(7005, " Message has expired "),
FAMILY_PERMISSION_DENIED(7006, " No operation permission "),
FAMILY_LEADER_NOT_ALLOW_QUIT(7007, " The clan leader is not allowed to leave the family "),
FAMILY_QUIT_LIMIT_TIME(7008, " Joining the family for 7 days before exiting the family "),
FAMILY_NOT_JOIN(7009, " Not joined the family "),
FAMILY_TARGET_NOT_JOIN(7010, " The other party did not join the family "),
FAMILY_NOT_SAME(7010, " The other party is not from the same family as you "),
FAMILY_MONEY_NOT_ENOUGH(7011, " Insufficient family coins "),
FAMILY_MONEY_TRADE_IN_FAILED(7011, " Family coin failed to be credited, please continue with official secretary "),
FAMILY_INVITE_FREQUENCY_TO_MUCH(7012, " Too many invitations "),
FAMILY_INVITE_NOT_EXISTS(7013, " Invitation does not exist "),
FAMILY_INVITE_EXPIRE(7013, " Invitation has expired "),
FAMILY_RED_PACKGE_COUNT_ERROR(7014, " The minimum number of red envelopes is 1, and the maximum number of red envelopes is 500 "),
FAMILY_RED_PACKGE_AMOUNT_NOT_ENOUGH(7015, " The total amount of red envelopes is insufficient "),
RED_PACKET_NOT_EXISTS(7017, " The red envelope does not exist "),
RED_PACKET_PARAM_ILLEGAL(7016, " Illegal amount or number of red envelopes "),
RED_PACKET_NOT_EXSIST(7016, " The red envelope does not exist "),
RED_PACKET_NOT_IN_SAME_GROUP(7017, " Unable to receive red envelopes for this group "),
RED_PACKET_HAS_RECEVICED(7018, " The red envelope has already been claimed "),
RED_PACKET_RECEVICED_OVER(7019, " The red envelope has been collected completely "),
FAMILY_NAME_IS_SENSITIVE(7020, " Family names contain sensitive words "),
FAMILY_LEADER_CANT_CONTRIBUTE(7021, " The clan leader cannot contribute family coins "),
RED_PACKET_EXPIRE(7022, " The red envelope has expired "),
MODIFY_FAILD(7023, " Modification failed "),
FAMILY_APPLY_RECORD_NOT_EXISTS(7024, " Family application record does not exist "),
FAMILY_APPLY_AGREED(7025, " Agreed to join the family "),
FAMILY_NAME_REPEAT(7026, " Family name duplication "),
FAMILY_NAME_TOO_LONG(7027, " Family name cannot exceed 15 words "),
FAMILY_MONEY_NAME_REPEAT(7028, " Family coin names are duplicated "),
FAMILY_MONEY_NAME_TOO_LONG(7029, " Family coin names cannot exceed three characters "),
ALREADY_IN_FAMILY(7030, " The user has already joined another family "),
FAMILY_GROUP_REMOVE_FAILED(7031, " Failed to disband group chat "),
KICK_OUT_GROUP_FAILED(7032, " Failed to kick out group chat "),
LEAVE_GROUP_FAILED(7033, " Failed to leave group chat "),
LEAVE_FAMILY_FAILED(7034, " Failed to leave the family "),
LESS_THAN_MINIMUM_AMOUT(7036, " The minimum transaction amount shall not be less than 0.01 yuan "),
FAMILY_REJECT_TOO_MUCH_TIMES(7037, " You were rejected multiple times by the family on that day and cannot apply to join the family "),
GROUP_REJECT_TOO_MUCH_TIMES(7038, " You were rejected multiple times by the group on that day and cannot apply to join the group chat "),
MANAGE_COUNT_TOO_MANY(7039, " The number of administrators cannot exceed 6 "),
GROUP_NAME_IS_SENSITIVE(7040, " The group name contains sensitive words "),
HAS_LEAVED_CHAT(7041, " You have exited the group chat "),
HAS_JOINED_FAMILY(7042, " You have joined the family and need to leave the current family in order to apply to join another family "),
HAS_CLOSE_FAMILY_MONEY(7043, " The family coin function has been disabled "),
GROUP_MEMBER_LIMIT(7044, " The maximum number of group chats has been reached, and we are unable to apply to join the group chat "),
HAS_JOINED_OTHER_FAMILY_GROUP(7045, " You have already joined another family's group chat and cannot join the current group chat "),
USER_DOLL_NOT_EXISTS(6600, " The doll does not exist "),
USER_DOLL_EXISTS(6601, " The doll already exists "),
USER_DOLL_SEX_ERROR(6602, " Baby gender setting error "),
ACCOUNT_INIT_FAILD(6603, " Account initialization failed "),
WEIXIN_USER_NOT_EXITSTS(6618, " WeChat user does not exist "),
CATCH_DOLL_NOT_EXIST(6404, " The claw doll does not exist "),
CUSTOM_DOLL_FAILD(6604, " Custom doll failed "),
CATCH_DOLL_FAILD(6605, " Failed to grab the doll "),
CATCH_DOLL_ERORR(6606, " Crawling doll error "),
CATCH_DOLL_TIMES_NOT_ENOUGH(6607, " Insufficient number of times to grab the doll "),
CATCH_DOLL_DEAL_ERROR(6608, " Processing error in grabbing dolls "),
CATCH_DOLL_DEAL_TYPE_ERROR(6609, " Wrong handling type for grabbing dolls "),
CATCH_DOLL_HAS_DEALED(6610, " The grab doll has been processed "),
SHARD_DOLL_TIMES_ENOUGH(6611, " The number of shares is sufficient "),
SHARD_DOLL_FAILD(6612, " Sharing failed "),
QUERY_FAILD(6613, " Query failed "),
BED_NOT_ENOUGH(6614, " Insufficient beds "),
DOLL_NOT_ENOUGH(6615, " Not enough dolls "),
ACCOUNT_NOT_EXISTS(6616, " Account does not exist "),
NICK_IS_NULL(6617, " Nickname is empty "),
AVATAR_IS_NULL(6618, " Avatar is empty "),
NICK_ILLEGAL(6621, " Illegal nickname "),
LIMIT_MAX_CHAT(7071671, " Exceeded group chat creation limit "),
NOT_FOUND_CHAT(7071672, " The group chat was not found "),
LIMIT_MAX_MEMBER(7071673, " Joining the group failed, the maximum number of group members is 200 "),
ALREADY_EXISTS_MEMBER(7071674, " The user already exists in this group chat "),
NO_PERMIT_OPERATOR(7071675, " No operation permission "),
MEMBER_NOT_IN_CHAT(7071676, " The user does not exist in this group chat "),
MEMBER_ALREADY_MANAGER(7071677, " The user is already the administrator of this group chat "),
@@ -210,58 +173,23 @@ public enum BusiStatus implements BusiStatusInterface {
MEMBER_NOT_DISABLE(7071679, " The user has not been banned from speaking "),
PK_ACT_RECORD_EXIST(9100, " The record already exists "),
PK_ACT_RECORD_TIME_ERROR(9101, " Time interval error "),
PK_ACT_RANK_KEY_NOT_EXIST(9404, " The leaderboard does not exist "),
PK_ACT_RECORD_IP_REPEAT(9501, " IP address duplication "),
ACT_GIFT_NOT_EXITST(9102, " This gift is not a designated gift for the event "),
SEARCH_NOT_SUPPORT(9502, " Currently, only platform number search is supported "),
OPEN_BOX_POOL_NEED_THANKS_PRODUCT(9999, " Default prizes have not been configured yet "),
OPEN_BOX_KEY_NOT_ENOUGH(10000, " Insufficient number of tickets "),
OPEN_BOX_USER_TO_MORE(10001, " There are too many people making wishes, please try again later "),
WHITE_USER_PRIZE_FAILED(10002, " Invalid whitelist for promotional activities "),
OPEN_BOX_BAD_POOL_CONFIG(10003, " The operation swallowed up the prize "),
SMS_NOT_EXPIRED(2001, " The verification code text message has been sent. Please wait for one minute and try again "),
SMS_NOT_EXPIRED3(2001, " The verification code text message has been sent. Please wait for 3 minutes and try again "),
SMS_DEVICE_LIMIT(2002, " The current device has exceeded the SMS limit "),
SMS_PHONE_LIMIT(2003, " The number of times the phone number exceeds the limit "),
ACT_LIKE_WISH_LIMIT(10004, " Can only give each user a like once "),
ACT_LIKE_WISH_FAILED(10004, " Like failed "),
ACT_WISH_NOEXIST(10004, " Cancel like failed, no like relationship exists "),
ACT_WISH_PER_NOEXIST(10004, " The person who likes or is liked cannot be empty "),
ACT_WISH_TO_MYSELF(10004, " Cannot give oneself likes "),
ACT_PRIZE_KEY_LIMIT(10005, " Received on the same day "),
ACT_PRIZE_KEY_LEVEL_LIMIT(10005, " The user's level did not meet the requirements "),
ACT_PRIZE_KEY_FAILED(10005, " Key retrieval failed, please try again later "),
ACT_NATIONAL_HAS_GIVE(10006, " Already gifted, cannot be duplicated as a gift "),
ACT_NATIONAL_GIVE_FAILED(10006, " Already gifted, cannot be duplicated as a gift "),
ACT_NATIONAL_TIME_OUT(10007, " Not within the activity time "),
ACT_SIGN_NOT_IN_TIME(10008, " Not within the scope of registration activities "),
IOS_CHARGE_DEVICE_LIMIT(7062, " Current device recharge times exceed the limit, please recharge on WeChat official account "),
IOS_CHARGE_CLIENTIP_LIMIT(7063, " The current IP recharge count exceeds the limit "),
ROOM_TITLE_IS_SENSITIVE(7060, " The title of the living room contains sensitive words "),
ROOM_TITLE_TOO_LONG(7035, " The title of the living room cannot exceed 15 words "),
NOT_LOST_USER(8005, " This activity is only available to returning old users! "),
HAS_CLAIMED_AWARD(8006, " You have accepted the return gift! "),
INVITE_CODE_ERROR(8007, " Invitation code error "),
SAME_IP_DEVICE(8008, " The same device can only participate once! "),
NOT_INVITE_OWN(8009, " You cannot enter your own invitation code "),
LOST_USER_EXIST(8010, " Returning user already exists "),
DRAW_LIMIT_TIME(8012, " Not within the promotional time frame! "),
RADISH_DRAW_STATUS(8013, " Today's promotional activity has ended, please participate again tomorrow! "),
RADISH_DRAW_PHONE_BIND(8014, " You need to bind your phone to participate in promotional activities! "),
MUSIC_NOT_EXISTS(10100, " The song does not exist "),
ROOM_IS_NOT_KTV(10101, " The current living room is not a KTV room~ "),
ROOM_IS_KTV(10102, " The current living room is already a KTV room~ "),
CHOOSE_MUSIC_STATION_IS_FULL(10103, " The current song platform is full. Let's listen to other Mac performers for a while first~ "),
CHOOSE_MUSIC_RECORD_IS_EMPTY(10104, " The selected song is empty~ "),
MUSIC_IS_CHOOSE_BY_USER(10105, " Cannot select duplicate songs~ "),
MUSIC_IS_SINGING(10106, " The current song is playing and cannot be deleted~ "),
NO_KTV_PRIV(10107, " Baby, you don't have the permission to activate KTV mode. Let's go play in someone else's karaoke room first~ "),
SEND_KEY_NUM_INCORRENT(10009, " The number of free hammers is incorrect "),
KEY_RECEIVE_LIMIT(10010, " The hammer has been sent out today! "),
VKISS_PRIZE_ACTIVITY_ERROR(9588, " Abnormal configuration of vkiss secret code reward collection activity "),
VKISS_API_ERROR(9688, " Vkiss interface exception "),
VKISS_BUSINESS_ERROR(9788, " Error "),
VKISS_BUSINESS_ALREADY_GET(9888, " You have already claimed it, you cannot claim it again "),
PACK_NOT_EXIST(8500, " The gift package does not exist "),
PACK_NOT_OPEN(8501, " The gift package is not yet available for purchase "),
PACK_UNDER_STOCK(8502, " The gift package is sold out~ "),
@@ -272,18 +200,12 @@ public enum BusiStatus implements BusiStatusInterface {
QUEUE_MODEL_CLOSED(1505, " Barge mode has been turned off "),
NEED_CERTIFICATION(10108, " To protect property security, please first perform real name authentication "),
ID_CARD_BIND_LIMIT(10109, " The identity information has exceeded the maximum number of authentication attempts "),
USER_HAS_BIND_ID(10110, " The user has already undergone identity authentication "),
WITHDRAW_NEED_CERTIFICATION(10111, " The withdrawal amount is too large and requires identity authentication "),
MODIFY_BIND_TIMES_LIMITS(10112, " The number of times to modify real name information exceeds the limit "),
CHRISTMAS_TREE_FAMILY_NOT_JOIN(11002, " Please join the family first "),
CHRISTMAS_TREE_ALREADY_RECEIVE(11003, " I have already received the gift "),
CHRISTMAS_TREE_UNMET_RULE(11004, " The Christmas tree has not been lit yet "),
PRETTY_NUMBER_NOT_EXIST(80781, " The beautiful account was not found "),
PRETTY_NUMBER_NOT_VALID(80782, " The beautiful account has been taken down from the shelves "),
PRETTY_NUMBER_ALREADY_USED(80783, " The beautiful account has been used "),
PRETTY_NUMBER_NOT_USED(80784, " This beautiful account is currently not in use "),
PRETTY_NUMBER_ALREADY_BIND(80785, " The user has already bound a beautiful account "),
PRETTY_NUMBER_ALREADY_OCCUPY(80786, " The user is already occupied "),
PRETTY_NUMBER_NOT_OCCUPY(80787, " The user is not occupied "),
PK_USER_NOT_NULL(1506, " There are currently no participants in the PK "),
PK_NOT_EXIST(1507, " PK does not exist "),
@@ -299,12 +221,10 @@ public enum BusiStatus implements BusiStatusInterface {
HALL_NOT_EXIST(90106, " The hall does not exist "),
HAS_ONE_HALL(90107, " You can only join one hall! "),
HALL_ALREADY_APPLY(90108, " You have submitted the application, please wait for approval "),
HALL_QUIT_LIMIT(90109, " You can only rejoin after exiting for 7 days "),
HALL_OWNER_NOT_ALLOW_QUIT(90110, " The hall owner is not allowed to exit "),
HALL_PERMISSION_DENIED(90111, " No operation permission "),
HALL_TARGET_NOT_JOIN(90112, " The other party did not join the hall "),
HAS_QUIT_HALL_APPLY(90113, " You have applied to withdraw, please wait for approval "),
HAVE_JOIN_IN_HALL(90114, " You need to exit the current hall to join it "),
HALL_MANAGER_COUNT_LIMIT(90115, " The number of executives has reached the upper limit "),
HALL_LIMIT_MAX_CHAT(90116, " Exceeded group chat creation limit "),
HALL_GROUP_NAME_IS_SENSITIVE(90117, " The group name contains sensitive words "),
@@ -321,182 +241,82 @@ public enum BusiStatus implements BusiStatusInterface {
HALL_JOIN_PRIVATE_CHAT(90127, " You did not join the hall "),
HALL_HAS_IN_CHAT(90128, " You are already in the group chat "),
HALL_CHAT_MANAGER_TOO_MANY(90129, " The number of administrators has reached the maximum limit "),
CAN_NOT_REMOVE_ELDER(90130, " Cannot remove clan leader "),
HALL_NAME_HAS_EXSIT(90131, " Guild name already exists "),
HALL_MANAGER_NOT_FOUND_MENU_AUTH(80789, " Executive permissions are empty "),
HALL_MANAGER_NOT_FOUND(80790, " There is currently no such executive "),
HALL_MANAGER_NOT_BELONG(80791, " The current executives are not from this department "),
HALL_MEMBER_OWNER_NOT_FOUND(80604, " The hall owner is empty "),
HALL_GIFT_SEND_RECORD_NULL(80601, " Gift giving record is empty "),
HALL_GIFT_SEND_RECORD_DB_NULL(80602, " The gift giving record database query is empty "),
HALL_INCOME_SEL_TIME_ERROR(80603, " Income statistics query time format error "),
ROOM_NOT_EXIST(1601, " I haven't opened a living room yet, go ahead and open a room. Hey, get up~ "),
ROOM_IS_PUBLIC(1602, " The other party is not in the living room~ "),
ROOM_IN_FRIEND_LIMIT(1603, " Dear, this room is only accessible to the homeowner's friends "),
ROOM_IN_INVITE_LIMIT(1604, " Dear, this room is only open for invitation "),
ROOM_IOS_VERSION(1605, " The current version is lower. Please go to the app store to download Planet 66 "),
ONLINE_SENSATION_NOT_EXIST(80604, " The user has no works "),
H5_EXCHANGE_OUT_OF_LIMIT(6619, " The redemption function is not yet open "),
EXCHANGE_NOT_EXIST(6620, " No Easter eggs, cannot be exchanged! "),
LIKE_UID_ERROR(80605, " The likes and likes ID cannot be consistent "),
LIKE_COUNT_OUT_OF_MAX(80606, " Like up to 3 times a day "),
LIKE__OUT_OF_TIME(80607, " Not within the time frame of the like activity "),
RECOMMEND_STOCK_NOT_ENOUGH(7567001, " Insufficient inventory of recommended positions "),
NOT_FOUND_AVAILABLE_RECOMMEND_CARD(7567002, " No available recommendation cards "),
RECOMMEND_ALREADY_APPLY(7567004, " Recommended slots for this time period have been applied for "),
RECOMMEND_APPLY_TIME_ERROR(7567003, " Please apply before the current time "),
RECOMMEND_CRAD_STOCK_NOT_ENOUGH(7567001, " Insufficient inventory of recommended slots for recommendation cards "),
GAME_INVITE_EXPIRED(20001, " Connection has expired "),
GAME_INVITE_INVALID(20002, " The game has expired "),
GAME_INVITE_OVER(20003, " The game has ended "),
GAME_INVITE_BEGUN(20004, " The game has started. Do you want to enter the observation mode "),
EMOJI_CODE_NULL(90130, " Emoji expression does not exist "),
EMOJI_CODE_NOTEXIST(90131, " The password has expired or does not exist "),
USER_ALREADY_IN_HALL(90132, " You are already a member of the hall! "),
OUT_OF_LIMIT(80608, " Exceeded the limit of times "),
ACT_AWARD_HAS_GET(80609, " Rewards have already been claimed "),
ACT_AWARD_NOT_ACCORD(80610, " Claim without meeting the conditions "),
ACT_NOT_ACCORD(80611, " Condition not met "),
PHONE_NO_BIND(30001, " Unbound phone number "),
ADMIN_PHONE_NO_BIND(30001, " You have not bound your phone number. Please contact the administrator "),
USER_NO_CERTIFY(30002, " Unrealized authentication "),
FANS_COUNT_INSUFFICIENT(30003, " The number of fans does not meet the standard "),
SKILL_NO_ACTIVATE(30004, " The current tag is not activated "),
CHOOSE_SKILL(30005, " Please select a skill "),
BANK_CARD_NO_BIND(30006, " Please add your bank card first "),
PAYMENT_PWD_NO_SET(30007, " No payment password set "),
BANK_CARD_BIND_LIMIT(30008, " The number of bank card binding exceeds the limit "),
BANK_CARD_USER_LIMIT(30009, " The maximum number of bank cards that users can bind exceeds the limit "),
BANK_CARD_NOT_MATCH_PHONE(30010, " Non bank card reserved mobile phone number "),
BANK_CARD_HAS_BOUND(30011, " Bank card has been bound, please select another bank card "),
CREDIT_CARD_NOT_SUPPORT(30012, " Credit cards are not currently supported "),
PAYMENT_PROCESSING(30013, " Payment processing in progress, please wait "),
PAYMENT_FAIL(30014, " Payment failed "),
PAYMENT_PWD_NULL(30015, " The payment password cannot be empty "),
PAYMENT_MONEY_INVALID(30016, " The payment amount is illegal "),
PAYMENT_ANCHOR_WHITELIST(30017, " The current user does not have permission "),
SEND_FAIL(30018, " Gift failed "),
SEND_SELF_FAIL(30019, " I cannot give it to myself as a gift "),
PAYMENT_MONEY_MAX(30020, " Transfer amount exceeds the upper limit "),
BAND_CARD_NOT_SUPPORT(30021, " This bank card is currently not supported. Please select another bank card and rebind it "),
WITHDRAW_BANK_CARD_NOT_EXIST(30022, " Please bind the withdrawal bank card first "),
WITHDRAW_ACCOUNT_TYPE_NOT_SUPPORT(30023, " This withdrawal account type is currently not supported. Please select another account for withdrawal "),
WITHDRAW_NEED_BANK_CARD(30024, " Withdrawal amount greater than% s RMB is only supported for withdrawal to bank cards "),
CERTIFY_FAIL(30025, " Failed real name authentication "),
PAYMENT_MONEY_DAILY_MAX(30027, " Exceeded today's transfer limit "),
BANNER_ROOM_NOT_EXISTS(20000, " Room ID does not exist "),
SEND_GIFT_NUM_TOO_LARGE(8005, " The number of gifts sent is too large "),
MISSION_SYS_NOT_COMPLETE(892001, " Task incomplete "),
MISSION_SYS_NOT_EXISTS(892002, " Task does not exist "),
MISSION_SYS_NOT_DEVICEID_LIMIT(892003, " The device has already been claimed today "),
MISSION_SYS_VERSION_LIMIT(892004, " The current version does not support "),
MISSION_SYS_EXPER_LEVEL_LIMIT(892005, " Not reaching the specified level "),
WALLET_AMOUNT_NOT_ENOUGH(881201, " Insufficient wallet balance "),
WALLET_ERROR(881202, " Wallet abnormality "),
GOLD_PRIZE_NOT_FOUND(20001, " The gold coin prize does not exist "),
GOLD_PRIZE_FOUND(20002, " The gold coin prize already exists "),
GOLD_PRIZE_POOL_NOT_FOUND(20003, " The prize in the coin pool does not exist "),
GOLD_PRIZE_POOL_FOUND(20004, " The prize in the coin pool already exists "),
LOCK_FAIL(20005, " The system is busy, please try again later "),
PRIZE_GOLD_POOL_RATIO_EXCEED(20006, " The probability shall not exceed 100 "),
USER_DRAW_STATIS_NOT_FOUND(20007, " Record does not exist "),
DRAW_GOLD_SWITCH_CLOSE(20008, " Too many people are grabbing, please wait "),
DISSATISFY_DRAW(20009, " Not meeting the conditions for division "),
ALREADY_DRAW(20010, " The coins have been divided, please do not click again "),
DRAW_GOLD_TO_MORE(20011, " There are too many people dividing the coins. Please try again later "),
PRIZE_GOLD_POOL_NULL(20012, " The prize pool and prizes are empty "),
PRIZE_GOLD_POOL_DEF_NULL(20013, " The default prize pool is empty "),
GOLD_PRIZE_NULL(20014, " The prize does not exist "),
TODAY_USER_ALREADY_SIGN(20015, " The user has already signed in, please do not sign in again "),
SIGN_DEVICE_ID_LIMIT(20029, " The device has already been signed in today "),
ALREADY_HAS_CONFIG(91000, " There is already a configuration for this activity type! "),
ALREADY_NOTEXISTS_CONFIG(91001, " Missing activity configuration! "),
ADD_GIFT_TYPE_REWARD_RECORD_ERROR(20017, " Error in adding record corresponding to prize type "),
PAY_PASSWORD_LIMIT(20029, " Exceeded input count, please try again in 24 hours "),
PAY_PASSWORD_ERROR(20030, " Password error, there are% s more input opportunities left "),
NOT_ALLOW_OPEN_GIFT_VALUE(20030, " To activate gift value, please turn off KTV mode first "),
DRAW_GOLD_NEED_CERTIFICATION(20031, " Please pass real name authentication first "),
FILE_FORMAT_ERROR(20035, " The file format is incorrect "),
FILE_SIZE_TOO_LARGE(20036, " The file content exceeds 10000 lines "),
ROW_IS_EMPTY(20037, " The row data is empty "),
ETERNAL_HEAR_UID_LIMIT(5201, " Each ID is limited to one purchase! "),
NOT_ENOUGH_REPLENISH_SING_COUNT(21100, " This round has already used up the opportunity for re signing "),
DONATE_ERROR(21200, " Gift failed, please download the latest version "),
NOT_ALLOW_LEAVE_MODE(20032, " Turn off KTV mode first when activating departure mode "),
NOT_ALLOW_OPEN_KTV_MODE(20033, " To start KTV, please turn off the leave mode first "),
VOICE_NOT_ALLOW_OPERATE_1(35600, " To further understand Ta, you need to record a sound first~ "),
VOICE_NOT_ALLOW_OPERATE_2(35601, " To pick up more sound bottles, you need to record a sound first~ "),
ROOM_RECOMMEND_LIMIT(23000, " The room configuration under this label classification has reached the upper limit "),
ROOM_RECOMMEND_SEQ_NO_LIMIT(23001, " The recommended living room has already occupied this sorting within a certain period of time "),
ROOM_RECOMMEND_UID_LIMIT(23002, " The room has been recommended within a certain period of time "),
ROOM_ALRAEDY_EXIST(23003, " The room already exists under this tab "),
ROOM_SEQNO_ALRAEDY_EXIST(23004, " The sorting of rooms under the same tab cannot be the same! "),
MID_YEAR_TASK_TYPE(22001, " Task type does not exist "),
MID_YEAR_DRAW_RECEIVE_MORE(22002, " Rewards have been fully claimed "),
MID_YEAR_PLAY_TEAM_MORE(22003, " You have created a team, please do not create it again "),
MID_YEAR_PLAY_TEAM_NOTEXISTS(22004, " The team does not exist, please verify! "),
MID_YEAR_PLAY_TEAM_ENTRY(22005, " You can only join one team! "),
MID_YEAR_PLAY_TEAM_NOT_JION(22006, " You have not joined any team! "),
MID_YEAR_PLAY_TEAMCODE_NOTEXISTS(22007, " The team code does not exist, please verify! "),
WORLD_WORD_SENSITIVE(7900, " The content contains sensitive words "),
WORLD_WORD_TOO_LONG(7901, " The content cannot exceed 16 words "),
WORLD_NOT_EXIST(7903, " Topic does not exist "),
WORLD_IS_FULL(7904, " The world is full of people "),
QUIZ_WORLD_AGREE(7905, " Application successful, waiting for review "),
QUIZ_WORLD_ALREADY_JOIN(7906, " Join failed, you are already in this world, please do not join again "),
WORLD_MEMBER_NOT_ENOUGH(7907, " A group chat can only be generated when the number of people reaches 3. \\ nGo and invite friends now "),
GROUP_CHAT_IS_FULL(7908, " Oh my, the group chat is full and I can't join at the moment~ "),
MEMBER_NOT_IN_WORLD(7909, " You have been removed from the topic "),
QUIZ_TOPIC_STATUS_LIMIT(24000, " Please configure the questions before listing them "),
QUIZ_OPTION_COUNT_LIMIT(24001, " Option configuration has reached the upper limit "),
QUIZ_TOPIC_RESULT_STATUS_LIMIT(24002, " Please configure the results before listing "),
REGISTER_ERROR(24000, " Registration exception, please try again later! "),
SHUMEI_REGISTER_ERROR(24001, " Registration exception, please try again later "),
REGISTER_ERROR_PHONE(24002, " Registration exception, please use your phone to register! "),
LOGIN_ERROR(25000, " Login exception "),
LOGIN_SHUMEI_ERROR(25001, " Login exception! "),
SMS_SENDING_FREQUENCY_TOO_HIGH(200390, " The SMS sending frequency is too high. Please try again later "),
CHARGE_LIMIT(25000, " Recharge exceeds limit "),
OPER_NOT_OPEN(10960, " The function is not yet open "),
FORBID_IN_ROOM(30000, " According to the rules of youth mode, you are unable to use the voice room between 00:00 and 06:00 every day. Please arrange your entertainment time reasonably. "),
NOT_SUPER_USER(18004, " Non super administrator "),
SUPER_USER_DISALLOW_OPEN_ROOM(18005, " Super administrators are not allowed to open rooms "),
SUPER_ROOM_LIMIT_WAIT(18006, " The system has detected suspected violations, and entry restrictions cannot be set within% s minutes "),
SUPER_CLOSE_ROOM_WAIT(18007, " System detected suspected violation, unable to open room for% s minutes "),
SUPER_LIMIT_OPERATE(18008, " Work hard and don't play games "),
DIAMOND_BOX_NOT_OPEN(10005, " Please make a wish during the event and look forward to your participation "),
OVER_GIVE_KEY_LIMIT(10006, " Exceeded the maximum number of gifts! "),
OVER_DRAW_NUM_LIMIT(21111, " The maximum number of games played today has been reached~ "),
PACK_NOT_OPEN_TIME(21112, " Oh, the promotion is over~ "),
DEVICE_ID_NOT_EXISTS(21113, " The device ID cannot be empty! "),
SHARE_EXISTS(31000, " This update has already been shared! "),
ACTION_REPEAT(31001, " Please do not repeat the operation! "),
DYNAMIC_NOT_EXIST(31002, " Dynamic does not exist! "),
DYNAMIC_NOT_SELF_ACTION(31003, " Cannot perform operation! "),
DYNAMIC_COMMENT_NOT_EXIST(310024, " Comment does not exist! "),
DYNAMIC_NOT_OWNER_ACTION(31003, " Not the founder can perform the operation! "),
AMOUNT_PARAM_ERROR(31004, " Wallet operation parameter abnormality "),
PURSE_MONEY_NOT_ENOUGH(31005, " Insufficient wallet balance "),
NOT_ENOUGH_PIECE(31006, " Insufficient props "),
COUPLE_MATCH_EXISTS(21114, " The user has been paired! Please do not repeat the operation! "),
COUPLE_SIGN_NOT_ACCORD(21115, " You guys haven't known each other for two days yet~ "),
COUPLE_SIGN_ALREADY(21116, " Checked in, please do not repeat the operation~ "),
COUPLE_ANSWER_NOT_ACCORD(21117, " You haven't known each other for three days yet~ "),
COUPLE_MATCH_POOL_EXISTS(21118, " The user has entered the matching pool! Please do not repeat the operation! "),
COUPLE_ANSWER_ALREADY(211169, " Answered question, please do not repeat the operation~ "),
ONE_CLICK_LOGIN_ERROR(211170, " One click login failed "),
ERBAN_NO_NOT_EXIST(211171, " Account does not exist "),
PASSWORD_ERROR(211172, " Password error "),
PHONE_INVALID(211173, " Illegal mobile phone number "),
VERIFY_CODE_ERROR(211174, " SMS verification code verification failed "),
RECORD_NOT_EXIST(211175, " Record does not exist "),
CHARGE_PROD_NOT_EXIST(211176, " Recharged product does not exist "),
IOS_PAY_LIMIT(211177, " Exceeded today's internal purchase recharge limit "),
IOS_PAY_LIMIT_DAILY(211177, " Recharge failed, please contact customer service for assistance "),
UNKNOWN_PAYCHANNEL(211177, " Payment failed. The correct payment channel was not found "),
CODE_DUPLICATE(5207, " Code duplication "),
WITHDRAW_PROD_NOT_EXIST(211178, " Withdrawal product does not exist "),
CHARGE_AMOUNT_INCORRECT(211179, " Incorrect recharge amount "),
RECORD_ALREADY_EXIST(211180, " Record already exists "),
WEEK_STAR_HAS_NO_AWARD(211181, " No prizes configured on the weekly star list "),
WEEK_STAR_HAS_NO_GIFT(211182, " No gifts configured on the weekly star list "),
@@ -504,43 +324,24 @@ public enum BusiStatus implements BusiStatusInterface {
INVITE_CODE_INVALID(211184, " Invitation code does not exist "),
INVITE_CODE_DEVICE_DUPLICATED(211185, " The device has already filled out an invitation code "),
TIME_OUT_TO_REFILL_INVITE_CODE(211186, " Exceeding the deadline for not filling in the invitation code, unable to fill in the invitation code "),
PHONE_BE_INTERCEPTED(211187, " This phone number has violated regulations "),
PIECE_NOT_ENOUGH(211188, " There are currently not enough fragments available, purchase avatar decorations to obtain fragments "),
JOIN_GAME_USER_TOO_MORE(211189, " Too many participants in the game, please try again later "),
NOT_ENOUGH_LEVEL(5246, " The level does not meet the requirements "),
NOT_HAVE_BLIND_DATE_ROOM_PERMISSION(211190, " No permission for blind date gameplay "),
BLIND_DATE_ROOM_VERSIONTOLOW(80002, " You need to upgrade to the latest version before entering "),
NOT_BIND_GAME_ACCOUNT(220001, " Please bind your game account first "),
NOT_ENOUGH_GAME_TICKET(220002, " Insufficient tickets "),
GAME_USER_PURSE_MONEY_NOT_ENOUGH(220003, " Insufficient wallet balance "),
GAME_NOT_EXSIT(220004, " The competition does not exist "),
UNDER_AGE_WITHDRAWAL(25006, " Underage users (<18 years old) "),
USER_NOT_EXIST(230003, " User not registered "),
PHONE_HAS_RECEIVE_TICKET(230004, " The phone number has already collected tickets "),
HAS_CLOSED(230006, " Connection has failed "),
HAS_OVER_TIME(230007, " The collection time has expired "),
STOCK_NOT_ENOUGH(230008, " Insufficient inventory "),
USER_HAS_RECEIVE_TICKET(230009, " The user has already claimed the ticket "),
OVER_MAX_COUNT(2300011, " Reached the upper limit of guild super management setting. If you need to set it, please remove the existing super management first. "),
NOT_CLAN_MEMBER(2300012, " Non guild members cannot be set as super management "),
NOT_SUPER_MANAGE(2300013, " Non super tubes do not need to be removed "),
EXPORT_DATA_BEYOND_LIMIT(8513, " Exceeded the time limit! "),
CLAN_ASSOCIATE_ACCOUNT(8515, " Withdrawal of family head association number is prohibited! "),
ROOM_TYPE_NOT_ALLOW(8516, " Room type not allowed! "),
current_room_cross_pking(8517, " Your room is currently in a PK! "),
invited_room_cross_pking(8518, " The room you invited is currently in a PK! "),
ROOM_PKING_NOT_ALLOW_MIC(8519, " Changing the microphone mode is not allowed in the bedroom PK! "),
KEY_NUM_ERR(8511, " The number of keys cannot be less than 0! "),
KEY_NUM_BEYOND_NUM(8512, " Single time limit of 200! "),
MINI_GAME_CLOSED(8520, " The current game is closed, you can switch to other game experiences~! "),
FAST_PICK_FAIL_MSG(8521, " There is currently no suitable room available, please try again later~ "),
FIND_ROOM_FAIL(8522, " I haven't found a suitable living room yet. Let's take a look elsewhere~ "),
FIND_MINIGAME_ROOM_FAIL(8523, " The mini game currently has no living room status and is waiting for others\\ "),
MINI_GAME_CLOSE(8524, " The game room is closed! "),
MINI_GAME_TYPE_CLOSE(8525, " The current game has been closed. Choose another game instead~ "),
VERSION_TOO_LOW(8526, " The current version is too low, please upgrade to the latest version! "),
QUERY_ROOM_MINI_GAME(8527, " Failed to search for room game! "),
ALREADY_VIP(8534, " Currently holding noble status, unable to open again "),
VIP_GIFT_SENDER_LOWER_LEVEL(8535, " Insufficient noble level "),
BROAD_IS_NO_HOMEOWNER(8528, " Insufficient permissions, only homeowners can send broadcasts! "),
BROAD_WORD_NUM_IS_ERROR(8529, " The actual word count of the broadcast content sent does not meet the requirements! "),
@@ -566,7 +367,6 @@ public enum BusiStatus implements BusiStatusInterface {
CP_INVITE_DECLARATION_NOT_ALLOW_EXISTS(8704, " The relationship oath cannot be empty! "),
CP_INVITE_DECLARATION_LEN_ERR(8705, " The oath of relationship is 5-20 words! "),
USER_SELF_MAKE_INVITE_ERR(8706, " You can only form a CP with others~ "),
DECLARATION_SENSITIVE(8707, " The relationship oath contains sensitive words! "),
CP_MP_REPEAT_APPLY_ERR(8708, " Cannot apply for CP nameplate again! "),
VIP_LEVEL_NOT_ENOUGH(8710, " The noble level did not meet the requirements "),
SEEK_ELFIN_LIMIT(8801, " You can only choose up to 9 cards "),
@@ -582,7 +382,6 @@ public enum BusiStatus implements BusiStatusInterface {
GIFT_COMPOUND_LIMIT_NOT_OPEN(26001, " Limited time gift synthesis not opened "),
GIFT_COMPOUND_LIMIT_IN_COOLING(26002, " Limited time gift synthesis cooling down "),
LINEARLY_POOL_USER_TO_MORE(11001, " Too many participants, please try again later "),
ACT_MID_AUTUMU_TICKET_NOT_ENOUGH(30001, " Insufficient mooncake vouchers "),
GOLD_EXCHANGE_DIAMOND_CLOSE(405, " Suspend redemption "),
CLAN_GOLD_SETTLEMENT(405, " The current system settlement is in progress and this operation cannot be performed. Please try again later "),
GOLD_EXCHANGE_DIAMOND_NUM_LESS(405, " At least% d diamonds need to be exchanged "),
@@ -597,15 +396,9 @@ public enum BusiStatus implements BusiStatusInterface {
WITHDRAW_NUM_MORE(405, " Withdrawal cannot exceed% d coins "),
WITHDRAW_NOT_ENOUGH_GOLD(405, " Insufficient gold coins "),
WITHDRAW_SUCCESS(200, " The withdrawal application for gold coins has been successful. Please be patient and wait for the review to be received "),
NEW_YEAR_FIREWORK_NOT_IN_TIME_RANGE(405, " Not within the activity time "),
USER_AUDIO_CARD_STATUS(405, " The user's sound card status does not allow operation "),
USER_AUDIO_CARD_CONCURRENT(405, " The user's sound card has been manipulated. Please refresh the list and try again "),
VALENTINE_CP_NOT_IN_TIME_RANGE(405, " Not within the activity time "),
VALENTINE_CP_NOT_INVITE(405, " TA did not send you a CP invitation "),
VALENTINE_CP_HAS_CP(405, " CP has been signed with TA "),
VALENTINE_CP_NOT_ENGOUTH_CURRENCY(405, " Insufficient love tokens, please obtain enough love tokens before redeeming them~ "),
SEIZE_TREASURE_NOT_OPEN(33001, " Not within the activity time "),
SEIZE_TREASURE_DRAW_TOO_FAST(33002, " Frequent participation, please wait "),
SEIZE_TREASURE_POOL_CONFIG_ERROR(33003, " Abnormal prize pool configuration "),
SEIZE_TREASURE_DRAW_TOO_BUSY(33004, " There are too many participants in the event, please try again later "),
SEIZE_TREASURE_USER_PROP_NOT_ENOUGH(33005, " Insufficient props "),
@@ -613,7 +406,6 @@ public enum BusiStatus implements BusiStatusInterface {
NOT_FOUNT_REWARD_ITEM(5002, " Unable to find corresponding reward items "),
UNENOUGH_ACT_PROP_ITEM(5003, " Insufficient activity props "),
CHARGE_ERROR(50000, " Storage failed, please contact customer service for assistance "),
NOT_ENOUGH_GOLD(405, " Insufficient gold coins "),
NOT_ENOUGH_DIAMOND(405, " Insufficient diamonds "),
ROOM_NOT_EXISTS(500, "房間不存在"),
@@ -653,11 +445,6 @@ public enum BusiStatus implements BusiStatusInterface {
private final String reasonPhrase;
/**
* 格式化reasonPhrase參數
*/
private Object[] formatArgs;
BusiStatus(int value, String reasonPhrase) {
this.value = value;
this.reasonPhrase = reasonPhrase;
@@ -669,9 +456,6 @@ public enum BusiStatus implements BusiStatusInterface {
}
public String getReasonPhrase() {
if (formatArgs != null && formatArgs.length > 0) {
return String.format(reasonPhrase, formatArgs);
}
return reasonPhrase;
}
@@ -680,22 +464,14 @@ public enum BusiStatus implements BusiStatusInterface {
return Integer.toString(value);
}
public BusiStatus build(Object... formatArgs) {
this.formatArgs = formatArgs;
return this;
}
@Override
public String getName() {
return name();
}
@Override
public int getCode() {
return value();
}
@Override
public String getMessage() {
return getReasonPhrase();
}

View File

@@ -1,11 +0,0 @@
package com.accompany.common.status;
public interface BusiStatusInterface {
String getName();
int getCode();
String getMessage();
}

View File

@@ -4,7 +4,7 @@ import cn.hutool.core.util.StrUtil;
import com.accompany.common.annotation.AppVersion;
import com.accompany.common.constant.Constant;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.utils.AppVersionUtil;
import com.accompany.core.base.DeviceInfoContextHolder;
import lombok.extern.slf4j.Slf4j;
@@ -13,7 +13,6 @@ import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import java.lang.reflect.Method;
@@ -60,10 +59,10 @@ public class AppVersionAspect {
return;
}
if (os.equalsIgnoreCase(Constant.OsType.IOS) && AppVersionUtil.compareVersion(appVersion, iosVersion) < 0) {
throw new ApiException(message);
throw new AdminServiceException(message);
}
if (os.equalsIgnoreCase(Constant.OsType.ANDROID) && AppVersionUtil.compareVersion(appVersion, androidVersion) < 0) {
throw new ApiException(message);
throw new AdminServiceException(message);
}
}

View File

@@ -411,8 +411,6 @@ public enum RedisKey {
h5loginjwtoken, // h5登录token
h5_login_code, // h5授权登录授权码
h5_login_token, // h5授权成功后有效票据
h5_exchange_cumulative, // h5当天累计兑换额
web_config, // 网页配置

View File

@@ -1,7 +1,6 @@
package com.accompany.common.result;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.status.BusiStatusInterface;
import com.accompany.core.annotation.I18nPartition;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
@@ -33,37 +32,37 @@ public class BusiResult<T> {
@ApiModelProperty("时间戳")
private long timestamp;
public BusiResult(BusiStatusInterface status) {
this(status, (status != null ? status.getMessage() : null), null);
public BusiResult(BusiStatus status) {
this(status, (status != null ? status.getReasonPhrase() : null), null);
}
public BusiResult(BusiStatusInterface status, T data) {
public BusiResult(BusiStatus status, T data) {
if (status == null) {
status = BusiStatus.SERVER_BUSY;
status = BusiStatus.SERVERBUSY;
}
this.code = status.getCode();
this.codeName = status.getName();
this.message = status.getMessage();
this.code = status.value();
this.codeName = status.name();
this.message = status.getReasonPhrase();
this.data = data;
this.timestamp = System.currentTimeMillis();
}
public BusiResult(BusiStatusInterface status, String message) {
public BusiResult(BusiStatus status, String message) {
if (status == null) {
status = BusiStatus.SERVER_BUSY;
status = BusiStatus.SERVERBUSY;
}
this.code = status.getCode();
this.codeName = status.getName();
this.code = status.value();
this.codeName = status.name();
this.message = message;
this.timestamp = System.currentTimeMillis();
}
public BusiResult(BusiStatusInterface status, String message, T data) {
public BusiResult(BusiStatus status, String message, T data) {
if (status == null) {
status = BusiStatus.SERVER_BUSY;
status = BusiStatus.SERVERBUSY;
}
this.code = status.getCode();
this.codeName = status.getName();
this.code = status.value();
this.codeName = status.getReasonPhrase();
this.message = message;
this.data = data;
this.timestamp = System.currentTimeMillis();
@@ -75,7 +74,7 @@ public class BusiResult<T> {
public void setBusiResult(BusiStatus status) {
if (status == null) {
status = BusiStatus.SERVER_BUSY;
status = BusiStatus.SERVERBUSY;
}
this.code = status.value();
this.message = status.getReasonPhrase();
@@ -101,17 +100,17 @@ public class BusiResult<T> {
return fail(BusiStatus.SERVERERROR, message, null);
}
public static <T> BusiResult<T> fail(BusiStatusInterface status, String message) {
public static <T> BusiResult<T> fail(BusiStatus status, String message) {
return fail(status, message, null);
}
public static <T> BusiResult<T> fail(BusiStatusInterface status, String message, T data) {
public static <T> BusiResult<T> fail(BusiStatus status, String message, T data) {
return build(status, message, data);
}
private static <T> BusiResult<T> build(BusiStatusInterface status, String message, T data) {
private static <T> BusiResult<T> build(BusiStatus status, String message, T data) {
if ((message == null || message.isEmpty()) && status != null) {
message = status.getMessage();
message = status.getReasonPhrase();
}
return new BusiResult<>(status, message, data);
}

View File

@@ -1,27 +1,25 @@
package com.accompany.common.exception;
package com.accompany.core.exception;
import com.accompany.common.status.BusiStatus;
/**
* Created by PaperCut on 2018/3/27.
*/
public class ApiException extends RuntimeException {
public class AdminServiceException extends RuntimeException {
private int responseCode;
public ApiException(BusiStatus status) {
public AdminServiceException(BusiStatus status) {
this(status.value(), status.getReasonPhrase());
}
public ApiException(String message) {
public AdminServiceException(String message) {
this(BusiStatus.SERVERERROR.value(), message);
}
public ApiException(int responseCode, String message) {
public AdminServiceException(int responseCode, String message) {
super(message);
this.responseCode = responseCode;
}
public ApiException(int responseCode, String message, Throwable cause) {
public AdminServiceException(int responseCode, String message, Throwable cause) {
super(message, cause);
this.responseCode = responseCode;
}

View File

@@ -45,7 +45,7 @@ public class GlobalExceptionHandler {
public BusiResult<Void> handle(HttpServletRequest request, ServiceException exception) {
logErrorMessage(request, exception);
return new BusiResult<>(exception.getBusiStatus() == null ?
BusiStatus.SERVER_BUSY : exception.getBusiStatus(), exception.getMessage());
BusiStatus.SERVERBUSY : exception.getBusiStatus(), exception.getMessage());
}
/**
@@ -72,7 +72,11 @@ public class GlobalExceptionHandler {
* @param exception 异常
* @return BusiResult
*/
@ExceptionHandler(MethodArgumentNotValidException.class)
@ExceptionHandler({
HttpMessageNotReadableException.class,
MethodArgumentNotValidException.class,
BindException.class
})
public BusiResult<Void> handle(
HttpServletRequest request, MethodArgumentNotValidException exception) {
logErrorMessage(request, exception);
@@ -90,21 +94,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler({IllegalStateException.class})
public BusiResult<Void> handle(HttpServletRequest request, IllegalStateException exception) {
logErrorMessage(request, exception);
return new BusiResult<>(BusiStatus.SERVER_BUSY, exception.getMessage());
}
/**
* 捕获请求体异常
*
* @param request 请求对象
* @param exception 异常
* @return BusiResult
*/
@ExceptionHandler(HttpMessageNotReadableException.class)
public BusiResult<Void> handle(
HttpServletRequest request, HttpMessageNotReadableException exception) {
logErrorMessage(request, exception);
return new BusiResult<>(BusiStatus.PARAMERROR, "請求體錯誤");
return new BusiResult<>(BusiStatus.SERVERBUSY, exception.getMessage());
}
/**
@@ -130,7 +120,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler(Exception.class)
public BusiResult<Void> handle(HttpServletRequest request, Exception exception) {
logErrorMessage(request, exception);
return new BusiResult<>(BusiStatus.SERVER_BUSY);
return new BusiResult<>(BusiStatus.SERVERERROR);
}
/**

View File

@@ -1,16 +0,0 @@
package com.accompany.core.exception;
import org.springframework.dao.DataAccessException;
/**
*/
public class RedisDataAccessException extends DataAccessException{
public RedisDataAccessException(String message) {
super(message);
}
public RedisDataAccessException(String message, Throwable cause) {
super(message, cause);
}
}

View File

@@ -1,7 +1,6 @@
package com.accompany.core.exception;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.status.BusiStatusInterface;
/**
* @author yangziwen
@@ -10,14 +9,14 @@ import com.accompany.common.status.BusiStatusInterface;
*/
public class ServiceException extends RuntimeException {
private BusiStatusInterface busiStatus;
private BusiStatus busiStatus;
public ServiceException(BusiStatusInterface busiStatus) {
super(busiStatus.getMessage());
public ServiceException(BusiStatus busiStatus) {
super(busiStatus.getReasonPhrase());
this.busiStatus = busiStatus;
}
public ServiceException(BusiStatusInterface busiStatus, String message) {
public ServiceException(BusiStatus busiStatus, String message) {
super(message);
this.busiStatus = busiStatus;
}
@@ -30,7 +29,7 @@ public class ServiceException extends RuntimeException {
super(message, cause);
}
public BusiStatusInterface getBusiStatus() {
public BusiStatus getBusiStatus() {
return busiStatus;
}

View File

@@ -1,7 +1,7 @@
package com.accompany.core.service.common;
import com.accompany.common.redis.JedisPoolManager;
import com.accompany.core.exception.RedisDataAccessException;
import com.accompany.core.exception.ServiceException;
import com.accompany.core.util.StringUtils;
import com.accompany.core.vo.RedisHashVo;
import com.alibaba.fastjson.JSON;
@@ -78,78 +78,6 @@ public class JedisService {
return Boolean.FALSE;
}
public byte[] readByte(String key) throws RedisDataAccessException {
byte[] ret = null;
Jedis rjedis = null;
try {
rjedis = readJedisPoolManager.getJedis();
byte[] jedisKey = key.getBytes();
byte[] content = rjedis.get(jedisKey);
if (content != null && content.length > 0) {
ret = content;
}
} catch (Exception e) {
log.error("read from jedis error. key:{} msg:{}", key, e);
throw new RedisDataAccessException("redis read error.", e);
} finally {
if (rjedis != null) {
rjedis.close();
}
}
return ret;
}
/**
* 写入redis并指定失效时间点
*
* @param key
* @param content 数据
* @param deadLine 失效时间点
*/
public void write(String key, String content, Date deadLine) {
Jedis wjedis = null;
long now = System.currentTimeMillis();
long dead = deadLine.getTime();
int expireTime = (int) (dead - now) / (1000 * 60);//转换为分钟
if (expireTime <= 0) {
log.warn("request ignored .Date:{} msg:{}", new Object[]{deadLine, " invalid deadLine:The deadLine must be one minute later than currentTime "});
return;
} else {
try {
wjedis = writeJedisPoolManager.getJedis();
byte[] data = null;
if (content != null) {
data = content.getBytes();
}
byte[] jedisKey = key.getBytes();
wjedis.setex(jedisKey, expireTime, data);
} catch (Exception e) {
throw new RedisDataAccessException("redis read error.", e);
} finally {
if (wjedis != null) {
wjedis.close();
}
}
}
}
public void write(String key, byte[] content, int expireTime) throws RedisDataAccessException {
Jedis wjedis = null;
try {
wjedis = writeJedisPoolManager.getJedis();
byte[] data = content;
byte[] jedisKey = key.getBytes();
wjedis.setex(jedisKey, expireTime, data);
} catch (Exception e) {
throw new RedisDataAccessException("Failed to write key " + key, e);
} finally {
if (wjedis != null) {
wjedis.close();
}
}
}
/**
* 写入redis并指定失效时间点
*
@@ -777,21 +705,6 @@ public class JedisService {
}
}
public void remove(String key) throws RedisDataAccessException {
Jedis wjedis = null;
try {
wjedis = writeJedisPoolManager.getJedis();
wjedis.del(key);
} catch (Exception e) {
log.error("remove error. key:{} msg:{}", key, e);
throw new RedisDataAccessException("Failed to remove key " + key, e);
} finally {
if (wjedis != null) {
wjedis.close();
}
}
}
public void hincrbyfloat(String key, String property, double value) {
Jedis wjedis = null;
try {
@@ -1563,9 +1476,8 @@ public class JedisService {
/**
* 批量删除redisKey
* @param key
* @throws RedisDataAccessException
*/
public void batchRemove(String key) throws RedisDataAccessException {
public void batchRemove(String key) {
Jedis wjedis = null;
try {
wjedis = writeJedisPoolManager.getJedis();
@@ -1578,33 +1490,7 @@ public class JedisService {
}
} catch (Exception e) {
log.error("batchRemove error. key:{} msg:{}", key, e);
throw new RedisDataAccessException("Failed to batchRemove key " + key, e);
} finally {
if (wjedis != null) {
wjedis.close();
}
}
}
/**
* 批量删除key
* @param keys
* @throws RedisDataAccessException
*/
public void batchRemoveKey(String... keys) throws RedisDataAccessException {
Jedis wjedis = null;
try {
if(keys.length>0) {
wjedis = writeJedisPoolManager.getJedis();
Pipeline p = wjedis.pipelined();
for (String key : keys) {
p.del(key);
}
p.sync();
}
} catch (Exception e) {
log.error("batchRemoveKey error. key:{}", keys);
throw new RedisDataAccessException("Failed to batchRemoveKey key " + keys);
throw new ServiceException("Failed to batchRemove key " + key, e);
} finally {
if (wjedis != null) {
wjedis.close();

View File

@@ -149,7 +149,7 @@ public class IOSPayPlaService extends BaseService {
return recordIdVo;
} catch (Exception e) {
logger.error("applyCharge Exception:" + e.getMessage() + " uid=" + params.getUid() + ",chargeProdId=" + chargeRecord.getChargeRecordId(), e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
}

View File

@@ -1,7 +1,7 @@
package com.accompany.payment.mycard;
import cn.hutool.core.util.StrUtil;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.utils.EnvComponent;
import com.accompany.core.dto.HttpForm;
import com.accompany.core.util.OkHttpUtils;
@@ -89,7 +89,7 @@ public class MyCardService {
checkResponseBody(response);
return response;
} catch (Exception e) {
throw new ApiException(e.getMessage());
throw new AdminServiceException(e.getMessage());
}
}
@@ -104,7 +104,7 @@ public class MyCardService {
checkResponseBody(response);
return response;
} catch (Exception e) {
throw new ApiException(e.getMessage());
throw new AdminServiceException(e.getMessage());
}
}
@@ -119,7 +119,7 @@ public class MyCardService {
checkResponseBody(response);
return response;
} catch (Exception e) {
throw new ApiException(e.getMessage());
throw new AdminServiceException(e.getMessage());
}
}
@@ -134,7 +134,7 @@ public class MyCardService {
checkResponseBody(response);
return response;
} catch (Exception e) {
throw new ApiException(e.getMessage());
throw new AdminServiceException(e.getMessage());
}
}
@@ -176,19 +176,19 @@ public class MyCardService {
//參數有誤
break;
case "MBP001":
throw new ApiException("參數有誤");
throw new AdminServiceException("參數有誤");
case "MBP002":
throw new ApiException("查詢資料失敗");
throw new AdminServiceException("查詢資料失敗");
case "MBP003":
throw new ApiException("Hash 值不正確");
throw new AdminServiceException("Hash 值不正確");
case "MBP004":
throw new ApiException(returnMsg);
throw new AdminServiceException(returnMsg);
case "MBP005":
throw new ApiException("查詢失敗");
throw new AdminServiceException("查詢失敗");
case "MBP098":
throw new ApiException("授權碼有誤");
throw new AdminServiceException("授權碼有誤");
case "MBP099":
throw new ApiException("授權失敗");
throw new AdminServiceException("授權失敗");
}
}

View File

@@ -1,6 +1,7 @@
package com.accompany.payment.service;
import com.accompany.common.exception.BusinessException;
import com.accompany.common.status.BusiStatus;
import com.accompany.core.exception.ServiceException;
import com.accompany.core.service.base.BaseService;
import com.accompany.payment.mapper.LuckyTarotRecordMapper;
import com.accompany.payment.mapper.LuckyTarotRecordMapperExpand;
@@ -47,7 +48,7 @@ public class LuckyTarotRecordService extends BaseService {
criteria.andUidEqualTo(uid).andChargeRecordIdEqualTo(outTradeNo);
List<LuckyTarotRecord> records = luckyTarotRecordMapper.selectByExample(example);
if (CollectionUtils.isEmpty(records)){
throw new BusinessException("没有塔罗占卜充值记录");
throw new ServiceException("没有塔罗占卜充值记录");
}
return records.get(0);
}

View File

@@ -2,7 +2,7 @@ package com.accompany.payment.service;
import com.accompany.common.constant.Constant;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.EnvComponent;
@@ -205,7 +205,7 @@ public class PayCenterService {
PayContext payContext = buildPayContext(null, null, successUrlSb.toString(), chargeProd, chargeRecord, realName, idCardNum, deviceInfo);
PayStrategy strategy = payStrategyFactory.getStrategy(channel);
if (strategy == null) {
throw new ApiException("支付失败.未找到正确的支付渠道");
throw new AdminServiceException("支付失败.未找到正确的支付渠道");
}
TarotChargeRetVo retVo = new TarotChargeRetVo();
Object ret = strategy.pay(payContext);
@@ -252,14 +252,14 @@ public class PayCenterService {
PayContext payContext = buildPayContext(null, null, successUrl, facReturnUrl, chargeProd, chargeRecord, realName, idCardNum, deviceInfo);
PayStrategy strategy = payStrategyFactory.getStrategy(channel);
if (strategy == null) {
throw new ApiException(500, "支付失败.未找到正确的支付渠道");
throw new AdminServiceException(500, "支付失败.未找到正确的支付渠道");
}
Object ret = null;
try {
ret = strategy.pay(payContext);
} catch (Exception e) {
log.error("开通贵族创建订单出现异常, uid :" + uid, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
log.info("Completed charge uid:{} channelProdId:{} channel:{}, ret:{}", uid, chargeProd.getChargeProdId(),
channel, JSON.toJSONString(ret));

View File

@@ -3,7 +3,7 @@ package com.accompany.payment.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.status.BusiStatus;
import com.accompany.core.service.SysConfService;
import com.accompany.payment.dto.ChargeGuideConfig;
@@ -46,7 +46,7 @@ public class ChargeUserLimitServiceImpl extends ServiceImpl<ChargeUserLimitMappe
@Override
public void chargeLimitCheck(Long uid, Integer limitType) {
if (isLimit(uid, limitType)) {
throw new ApiException(BusiStatus.SERVER_BUSY.value(), BusiStatus.CHARGE_ERROR.getReasonPhrase());
throw new AdminServiceException(BusiStatus.SERVERBUSY.value(), BusiStatus.CHARGE_ERROR.getReasonPhrase());
}
}
@@ -65,7 +65,7 @@ public class ChargeUserLimitServiceImpl extends ServiceImpl<ChargeUserLimitMappe
log.error(e.getMessage(), e);
}
if (isAlert) {
throw new ApiException(BusiStatus.CHARGE_ERROR);
throw new AdminServiceException(BusiStatus.CHARGE_ERROR);
}
}

View File

@@ -3,7 +3,7 @@ package com.accompany.payment.strategy;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.core.base.UidContextHolder;
import com.accompany.payment.annotation.PayChannelSupport;
import com.accompany.payment.constant.ChargeUserLimitConstant;
@@ -71,7 +71,7 @@ public class MyCardStrategy extends AbstractPayStrategy {
.eq(ChargeChannel::getPayChannel, payChannel)
.eq(ChargeChannel::getPaymentType, chargeProd.getPaymentType()));
if (CollectionUtil.isEmpty(chargeChannels)) {
throw new ApiException("缺少支付配置");
throw new AdminServiceException("缺少支付配置");
}
String[] paymentArray = chargeProd.getPaymentType().split(StrUtil.UNDERLINE);
String paymentType = StrUtil.EMPTY;

View File

@@ -3,7 +3,7 @@ package com.accompany.sms.service.impl;
import cn.hutool.core.collection.CollectionUtil;
import com.accompany.common.constant.Constant;
import com.accompany.common.constant.SmsConstant;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.StringUtils;
import com.accompany.sms.config.TencentSmsConfig;
@@ -145,10 +145,10 @@ public class TencentSmsServiceImpl implements TencentSmsService {
return;
}
if (StringUtils.isNotEmpty(resCode) && resCode.startsWith(SmsConstant.ResCode.LimitExceeded)) {
throw new ApiException(BusiStatus.SMS_SENDING_FREQUENCY_TOO_HIGH);
throw new AdminServiceException(BusiStatus.SMS_SENDING_FREQUENCY_TOO_HIGH);
}
throw new ApiException(BusiStatus.SMS_SEND_ERROR);
throw new AdminServiceException(BusiStatus.SMS_SEND_ERROR);
}
}

View File

@@ -108,13 +108,13 @@ public class AnnualCpDao implements InitializingBean {
isLocked = lock.tryLock(3, TimeUnit.SECONDS);
if (!isLocked){
log.error("[2023年度盛典活动] {} 获取 {} 锁超时", uid, lockKey);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Map<String, CpRankActCpProp> propMap = userCpPropMap.getOrDefault(uid, new HashMap<>());
return function.apply(propMap);
} catch (InterruptedException e) {
log.error("[2023年度盛典活动] {} 获取 {} 锁异常", uid, lockKey, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (isLocked){
lock.unlock();
@@ -176,7 +176,7 @@ public class AnnualCpDao implements InitializingBean {
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
cpProp = getCpPropByCpUid(cpUid);

View File

@@ -108,13 +108,13 @@ public class AnnualTaskDao implements InitializingBean {
isLocked = lock.tryLock(3, TimeUnit.SECONDS);
if (!isLocked){
log.error("[2023年度盛典]-年度任务 {} 获取 {} 锁超时", uid, lockKey);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Map<String, Integer> userRedBagMap = userTaskStatusMap.getOrDefault(uid, new HashMap<>());
return function.apply(userRedBagMap);
} catch (Exception e) {
log.error("[2023年度盛典]-年度任务 {} 获取 {} 锁异常", uid, lockKey, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (isLocked){
lock.unlock();

View File

@@ -119,13 +119,13 @@ public class ChristmasCpDao implements InitializingBean {
isLocked = lock.tryLock(3, TimeUnit.SECONDS);
if (!isLocked){
log.error("[2023圣诞节活动] {} 获取 {} 锁超时", uid, lockKey);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Map<String, ChristmasCpUserProp> propMap = userCpPropMap.getOrDefault(uid, new HashMap<>());
return function.apply(propMap);
} catch (InterruptedException e) {
log.error("[2023圣诞节活动] {} 获取 {} 锁异常", uid, lockKey, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (isLocked){
lock.unlock();
@@ -232,7 +232,7 @@ public class ChristmasCpDao implements InitializingBean {
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
cpProp = getCpPropByCpUid(cpUid);

View File

@@ -2,11 +2,8 @@ package com.accompany.business.christmas;
import com.accompany.business.christmas.constant.ChristmasConstant;
import com.accompany.business.christmas.dto.ChristmasLetterDto;
import com.accompany.business.qixi.constant.QixiConstant;
import com.accompany.business.qixi.dto.QixiUserRedBagDto;
import com.accompany.common.constant.AppEnum;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.BusinessException;
import com.accompany.common.status.BusiStatus;
import com.accompany.core.base.SpringContextHolder;
import com.accompany.core.exception.ServiceException;
@@ -24,7 +21,6 @@ import org.springframework.util.CollectionUtils;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
@@ -110,12 +106,12 @@ public class ChristmasLetterDao implements InitializingBean {
isLocked = lock.tryLock(3, TimeUnit.SECONDS);
if (!isLocked){
log.error("[2023圣诞活动]-保存情书 {} 获取 {} 锁超时", uid, lockKey);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
return function.get();
} catch (Exception e) {
log.error("[2023圣诞活动]-红线 {} 获取 {} 锁异常", uid, lockKey, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (isLocked){
lock.unlock();

View File

@@ -51,7 +51,7 @@ public class HalloweenBoxLevelDao implements InitializingBean {
locked = lock.tryLock(5, TimeUnit.SECONDS);
if (!locked){
//todo log
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
boxLevel = getUserBoxLevel(uid);
@@ -74,7 +74,7 @@ public class HalloweenBoxLevelDao implements InitializingBean {
} catch (InterruptedException e) {
//todo log
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (locked){
lock.unlock();

View File

@@ -53,7 +53,7 @@ public class HalloweenMapPosDao implements InitializingBean {
locked = lock.tryLock(5, TimeUnit.SECONDS);
if (!locked){
//todo log
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
boxLevel = getUserBoxLevel(uid);
@@ -76,7 +76,7 @@ public class HalloweenMapPosDao implements InitializingBean {
} catch (InterruptedException e) {
//todo log
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (locked){
lock.unlock();

View File

@@ -96,13 +96,13 @@ public class ValentinesCpDao implements InitializingBean {
isLocked = lock.tryLock(3, TimeUnit.SECONDS);
if (!isLocked){
log.error("[2024情人节活动] {} 获取 {} 锁超时", uid, lockKey);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Map<String, CpRankActCpProp> propMap = userCpPropMap.getOrDefault(uid, new HashMap<>());
return function.apply(propMap);
} catch (InterruptedException e) {
log.error("[2024情人节活动] {} 获取 {} 锁异常", uid, lockKey, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (isLocked){
lock.unlock();
@@ -174,7 +174,7 @@ public class ValentinesCpDao implements InitializingBean {
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
cpProp = getCpPropByCpUid(cpUid);

View File

@@ -15,11 +15,10 @@ import com.accompany.business.activity.vo.ActivityReward;
import com.accompany.business.activity.vo.ActivityTask;
import com.accompany.business.mapper.ActUserTaskDao;
import com.accompany.business.model.UserPurse;
import com.accompany.business.model.redenvelope.RedEnvelopeRain;
import com.accompany.business.service.purse.UserPurseService;
import com.accompany.business.service.record.BillRecordService;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.core.base.UidContextHolder;
@@ -97,7 +96,7 @@ public class ActUserTaskServiceImpl extends ServiceImpl<ActUserTaskDao, ActUserT
.le(ActActivity::getStartTime, now)
.ge(ActActivity::getEndTime, now));
if (count == 0) {
throw new ApiException("活动已结束");
throw new AdminServiceException("活动已结束");
}
Long uid = UidContextHolder.get();
List<ActUserTask> actUserTasks = actUserTaskService.list(Wrappers.<ActUserTask>lambdaQuery()
@@ -105,54 +104,54 @@ public class ActUserTaskServiceImpl extends ServiceImpl<ActUserTaskDao, ActUserT
.eq(ActUserTask::getTaskCode, taskCode)
.eq(ActUserTask::getUid, uid));
if (CollectionUtil.isEmpty(actUserTasks)) {
throw new ApiException("未完成任务");
throw new AdminServiceException("未完成任务");
}
List<ActTask> actTasks = actTaskService.list(Wrappers.<ActTask>lambdaQuery()
.eq(ActTask::getActivityCode, activityCode)
.eq(ActTask::getTaskCode, taskCode));
if (CollectionUtil.isEmpty(actTasks)) {
throw new ApiException("任务不存在");
throw new AdminServiceException("任务不存在");
}
ActTask actTask = actTasks.get(0);
Integer taskValue = actTask.getTaskValue();
if (!Objects.equals(diamondNum, taskValue)) {
throw new ApiException("金额不匹配");
throw new AdminServiceException("金额不匹配");
}
List<ActTaskCondition> actTaskConditions = actTaskConditionService.list(Wrappers.<ActTaskCondition>lambdaQuery()
.eq(ActTaskCondition::getActivityCode, activityCode)
.eq(ActTaskCondition::getTaskCode, taskCode)
.eq(ActTaskCondition::getConditionKind, ActConditionKindEnum.GE.name()));
if (CollectionUtil.isEmpty(actTaskConditions)) {
throw new ApiException("任务条件不存在");
throw new AdminServiceException("任务条件不存在");
}
ActTaskCondition actTaskCondition = actTaskConditions.get(0);
Long conditionValue = actTaskCondition.getConditionValue();
long activityValue = actUserTasks.stream().mapToLong(ActUserTask::getActivityValue).sum();
if (conditionValue == 0) {
throw new ApiException("任务值不能为0");
throw new AdminServiceException("任务值不能为0");
}
long validNum = activityValue / conditionValue;
if (num > validNum) {
throw new ApiException("超过可用数量");
throw new AdminServiceException("超过可用数量");
}
List<ActTaskReward> actTaskRewards = actTaskRewardService.list(Wrappers.<ActTaskReward>lambdaQuery()
.eq(ActTaskReward::getActivityCode, activityCode)
.eq(ActTaskReward::getTaskCode, taskCode));
if (CollectionUtil.isEmpty(actTaskRewards)) {
throw new ApiException("缺少奖励配置");
throw new AdminServiceException("缺少奖励配置");
}
//余额校验
UserPurse userPurse = userPurseService.queryUserPurse(uid);
Double currentDiamonds = userPurse.getDiamonds();
if (diamondNum > currentDiamonds) {
throw new ApiException(BusiStatus.PURSE_MONEY_NOT_ENOUGH);
throw new AdminServiceException(BusiStatus.PURSE_MONEY_NOT_ENOUGH);
}
//扣减钱包
if (!userPurseService.subDiamond(uid, diamondNum.doubleValue(), BillObjTypeEnum.ACTIVITY_PACKET.getDesc())) {
userPurse = userPurseService.queryUserPurse(uid);
currentDiamonds = userPurse.getDiamonds();
log.error("[购买活动礼物] {} 当前钱包钻石数 {} ,扣钻石数 {} 不成功", uid, currentDiamonds, diamondNum);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
for (ActTaskReward actTaskReward : actTaskRewards) {
ActRewardContext context = new ActRewardContext();

View File

@@ -1,7 +1,7 @@
package com.accompany.business.activity.strategy;
import cn.hutool.core.collection.CollectionUtil;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.status.BusiStatus;
import com.accompany.core.base.SpringContextHolder;
@@ -21,7 +21,7 @@ public final class ActRewardFactory {
if (ACT_REWARD_MAP.isEmpty()) {
Map<String, IActRewardStrategy> map = SpringContextHolder.getApplicationContext().getBeansOfType(IActRewardStrategy.class);
if (CollectionUtil.isEmpty(map)) {
throw new ApiException(BusiStatus.SERVERERROR);
throw new AdminServiceException(BusiStatus.SERVERERROR);
}
for (Map.Entry<String, IActRewardStrategy> entry : map.entrySet()) {
ACT_REWARD_MAP.put(entry.getValue().getRewardType(), entry.getValue());

View File

@@ -49,7 +49,7 @@ public abstract class BaseLinearDrawActService<TickDao extends BaseTicketActDao,
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
ticketNum = ticketDao.getUserCurTicketNum(uid);

View File

@@ -112,7 +112,7 @@ public abstract class BaseLinearDrawRewardActService implements InitializingBean
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
do {
@@ -123,7 +123,7 @@ public abstract class BaseLinearDrawRewardActService implements InitializingBean
} catch (InterruptedException e) {
//todo log
log.error("", e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (locked){
lock.unlock();

View File

@@ -56,7 +56,7 @@ public abstract class BaseMultiLinearDrawActService<TickDao extends BaseTicketAc
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
ticketNum = ticketDao.getUserCurTicketNum(uid);

View File

@@ -117,7 +117,7 @@ public class MidAutumnJackpotService implements InitializingBean {
try {
locked = lock.tryLock(5, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
userTodayContribution = todayContribution.get(uid);
@@ -217,7 +217,7 @@ public class MidAutumnJackpotService implements InitializingBean {
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Double jackpot = jackpotMap.getOrDefault(dateStr, 0D);

View File

@@ -220,13 +220,13 @@ public class QixiRedLineService {
isLocked = lock.tryLock(3, TimeUnit.SECONDS);
if (!isLocked){
log.error("[2023七夕活动]-红线 {} 获取 {} 锁超时", uid, lockKey);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Map<String, QixiUserRedBagDto> userRedBagMap = qixiRedBagDao.getUserRedBagMap(uid);
return function.apply(userRedBagMap);
} catch (Exception e) {
log.error("[2023七夕活动]-红线 {} 获取 {} 锁异常", uid, lockKey, e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (isLocked){
lock.unlock();

View File

@@ -118,7 +118,7 @@ public class QixiXiqueService {
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
serverNum = qixiXiqueNumDao.getServerCurXiqueNum();
@@ -135,7 +135,7 @@ public class QixiXiqueService {
} catch (InterruptedException e) {
log.error("[2023七夕活动]-喜鹊 投放喜鹊 加锁异常", e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (locked){
lock.unlock();

View File

@@ -64,7 +64,7 @@ public class SnookerRankService extends BaseRoundRankActService<UsersRankObjectP
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Double score = rank.getScore(uid);

View File

@@ -1,125 +0,0 @@
package com.accompany.business.model;
import java.util.Date;
public class UserMuteAdmin {
private Integer id;
private Long uid;
private Long erbanNo;
private String nick;
private Long roomId;
private Long roomUid;
private Long roomErbanNo;
private Integer operatorId;
private String operator;
private Byte status;
private Date createTime;
private Date updateTime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public Long getErbanNo() {
return erbanNo;
}
public void setErbanNo(Long erbanNo) {
this.erbanNo = erbanNo;
}
public String getNick() {
return nick;
}
public void setNick(String nick) {
this.nick = nick == null ? null : nick.trim();
}
public Long getRoomId() {
return roomId;
}
public void setRoomId(Long roomId) {
this.roomId = roomId;
}
public Long getRoomUid() {
return roomUid;
}
public void setRoomUid(Long roomUid) {
this.roomUid = roomUid;
}
public Long getRoomErbanNo() {
return roomErbanNo;
}
public void setRoomErbanNo(Long roomErbanNo) {
this.roomErbanNo = roomErbanNo;
}
public Integer getOperatorId() {
return operatorId;
}
public void setOperatorId(Integer operatorId) {
this.operatorId = operatorId;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator == null ? null : operator.trim();
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}

View File

@@ -1,941 +0,0 @@
package com.accompany.business.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class UserMuteAdminExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public UserMuteAdminExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUidIsNull() {
addCriterion("uid is null");
return (Criteria) this;
}
public Criteria andUidIsNotNull() {
addCriterion("uid is not null");
return (Criteria) this;
}
public Criteria andUidEqualTo(Long value) {
addCriterion("uid =", value, "uid");
return (Criteria) this;
}
public Criteria andUidNotEqualTo(Long value) {
addCriterion("uid <>", value, "uid");
return (Criteria) this;
}
public Criteria andUidGreaterThan(Long value) {
addCriterion("uid >", value, "uid");
return (Criteria) this;
}
public Criteria andUidGreaterThanOrEqualTo(Long value) {
addCriterion("uid >=", value, "uid");
return (Criteria) this;
}
public Criteria andUidLessThan(Long value) {
addCriterion("uid <", value, "uid");
return (Criteria) this;
}
public Criteria andUidLessThanOrEqualTo(Long value) {
addCriterion("uid <=", value, "uid");
return (Criteria) this;
}
public Criteria andUidIn(List<Long> values) {
addCriterion("uid in", values, "uid");
return (Criteria) this;
}
public Criteria andUidNotIn(List<Long> values) {
addCriterion("uid not in", values, "uid");
return (Criteria) this;
}
public Criteria andUidBetween(Long value1, Long value2) {
addCriterion("uid between", value1, value2, "uid");
return (Criteria) this;
}
public Criteria andUidNotBetween(Long value1, Long value2) {
addCriterion("uid not between", value1, value2, "uid");
return (Criteria) this;
}
public Criteria andErbanNoIsNull() {
addCriterion("erban_no is null");
return (Criteria) this;
}
public Criteria andErbanNoIsNotNull() {
addCriterion("erban_no is not null");
return (Criteria) this;
}
public Criteria andErbanNoEqualTo(Long value) {
addCriterion("erban_no =", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoNotEqualTo(Long value) {
addCriterion("erban_no <>", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoGreaterThan(Long value) {
addCriterion("erban_no >", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoGreaterThanOrEqualTo(Long value) {
addCriterion("erban_no >=", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoLessThan(Long value) {
addCriterion("erban_no <", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoLessThanOrEqualTo(Long value) {
addCriterion("erban_no <=", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoIn(List<Long> values) {
addCriterion("erban_no in", values, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoNotIn(List<Long> values) {
addCriterion("erban_no not in", values, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoBetween(Long value1, Long value2) {
addCriterion("erban_no between", value1, value2, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoNotBetween(Long value1, Long value2) {
addCriterion("erban_no not between", value1, value2, "erbanNo");
return (Criteria) this;
}
public Criteria andNickIsNull() {
addCriterion("nick is null");
return (Criteria) this;
}
public Criteria andNickIsNotNull() {
addCriterion("nick is not null");
return (Criteria) this;
}
public Criteria andNickEqualTo(String value) {
addCriterion("nick =", value, "nick");
return (Criteria) this;
}
public Criteria andNickNotEqualTo(String value) {
addCriterion("nick <>", value, "nick");
return (Criteria) this;
}
public Criteria andNickGreaterThan(String value) {
addCriterion("nick >", value, "nick");
return (Criteria) this;
}
public Criteria andNickGreaterThanOrEqualTo(String value) {
addCriterion("nick >=", value, "nick");
return (Criteria) this;
}
public Criteria andNickLessThan(String value) {
addCriterion("nick <", value, "nick");
return (Criteria) this;
}
public Criteria andNickLessThanOrEqualTo(String value) {
addCriterion("nick <=", value, "nick");
return (Criteria) this;
}
public Criteria andNickLike(String value) {
addCriterion("nick like", value, "nick");
return (Criteria) this;
}
public Criteria andNickNotLike(String value) {
addCriterion("nick not like", value, "nick");
return (Criteria) this;
}
public Criteria andNickIn(List<String> values) {
addCriterion("nick in", values, "nick");
return (Criteria) this;
}
public Criteria andNickNotIn(List<String> values) {
addCriterion("nick not in", values, "nick");
return (Criteria) this;
}
public Criteria andNickBetween(String value1, String value2) {
addCriterion("nick between", value1, value2, "nick");
return (Criteria) this;
}
public Criteria andNickNotBetween(String value1, String value2) {
addCriterion("nick not between", value1, value2, "nick");
return (Criteria) this;
}
public Criteria andRoomIdIsNull() {
addCriterion("room_id is null");
return (Criteria) this;
}
public Criteria andRoomIdIsNotNull() {
addCriterion("room_id is not null");
return (Criteria) this;
}
public Criteria andRoomIdEqualTo(Long value) {
addCriterion("room_id =", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdNotEqualTo(Long value) {
addCriterion("room_id <>", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdGreaterThan(Long value) {
addCriterion("room_id >", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdGreaterThanOrEqualTo(Long value) {
addCriterion("room_id >=", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdLessThan(Long value) {
addCriterion("room_id <", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdLessThanOrEqualTo(Long value) {
addCriterion("room_id <=", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdIn(List<Long> values) {
addCriterion("room_id in", values, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdNotIn(List<Long> values) {
addCriterion("room_id not in", values, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdBetween(Long value1, Long value2) {
addCriterion("room_id between", value1, value2, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdNotBetween(Long value1, Long value2) {
addCriterion("room_id not between", value1, value2, "roomId");
return (Criteria) this;
}
public Criteria andRoomUidIsNull() {
addCriterion("room_uid is null");
return (Criteria) this;
}
public Criteria andRoomUidIsNotNull() {
addCriterion("room_uid is not null");
return (Criteria) this;
}
public Criteria andRoomUidEqualTo(Long value) {
addCriterion("room_uid =", value, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidNotEqualTo(Long value) {
addCriterion("room_uid <>", value, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidGreaterThan(Long value) {
addCriterion("room_uid >", value, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidGreaterThanOrEqualTo(Long value) {
addCriterion("room_uid >=", value, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidLessThan(Long value) {
addCriterion("room_uid <", value, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidLessThanOrEqualTo(Long value) {
addCriterion("room_uid <=", value, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidIn(List<Long> values) {
addCriterion("room_uid in", values, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidNotIn(List<Long> values) {
addCriterion("room_uid not in", values, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidBetween(Long value1, Long value2) {
addCriterion("room_uid between", value1, value2, "roomUid");
return (Criteria) this;
}
public Criteria andRoomUidNotBetween(Long value1, Long value2) {
addCriterion("room_uid not between", value1, value2, "roomUid");
return (Criteria) this;
}
public Criteria andRoomErbanNoIsNull() {
addCriterion("room_erban_no is null");
return (Criteria) this;
}
public Criteria andRoomErbanNoIsNotNull() {
addCriterion("room_erban_no is not null");
return (Criteria) this;
}
public Criteria andRoomErbanNoEqualTo(Long value) {
addCriterion("room_erban_no =", value, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoNotEqualTo(Long value) {
addCriterion("room_erban_no <>", value, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoGreaterThan(Long value) {
addCriterion("room_erban_no >", value, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoGreaterThanOrEqualTo(Long value) {
addCriterion("room_erban_no >=", value, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoLessThan(Long value) {
addCriterion("room_erban_no <", value, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoLessThanOrEqualTo(Long value) {
addCriterion("room_erban_no <=", value, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoIn(List<Long> values) {
addCriterion("room_erban_no in", values, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoNotIn(List<Long> values) {
addCriterion("room_erban_no not in", values, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoBetween(Long value1, Long value2) {
addCriterion("room_erban_no between", value1, value2, "roomErbanNo");
return (Criteria) this;
}
public Criteria andRoomErbanNoNotBetween(Long value1, Long value2) {
addCriterion("room_erban_no not between", value1, value2, "roomErbanNo");
return (Criteria) this;
}
public Criteria andOperatorIdIsNull() {
addCriterion("operator_id is null");
return (Criteria) this;
}
public Criteria andOperatorIdIsNotNull() {
addCriterion("operator_id is not null");
return (Criteria) this;
}
public Criteria andOperatorIdEqualTo(Integer value) {
addCriterion("operator_id =", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotEqualTo(Integer value) {
addCriterion("operator_id <>", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdGreaterThan(Integer value) {
addCriterion("operator_id >", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdGreaterThanOrEqualTo(Integer value) {
addCriterion("operator_id >=", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdLessThan(Integer value) {
addCriterion("operator_id <", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdLessThanOrEqualTo(Integer value) {
addCriterion("operator_id <=", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdIn(List<Integer> values) {
addCriterion("operator_id in", values, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotIn(List<Integer> values) {
addCriterion("operator_id not in", values, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdBetween(Integer value1, Integer value2) {
addCriterion("operator_id between", value1, value2, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotBetween(Integer value1, Integer value2) {
addCriterion("operator_id not between", value1, value2, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(String value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(String value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(String value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(String value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(String value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(String value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLike(String value) {
addCriterion("operator like", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotLike(String value) {
addCriterion("operator not like", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<String> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<String> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(String value1, String value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(String value1, String value2) {
addCriterion("operator not between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Byte value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Byte value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Byte value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Byte value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Byte value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Byte> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Byte> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Byte value1, Byte value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Byte value1, Byte value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@@ -1,125 +0,0 @@
package com.accompany.business.model;
import java.util.Date;
public class UserMuteRecord {
private Integer id;
private Long uid;
private Long erbanNo;
private String nick;
private Long roomId;
private Long operatorId;
private String operator;
private String reason;
private Integer muteTime;
private Date createTime;
private Date updateTime;
private Byte status;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public Long getErbanNo() {
return erbanNo;
}
public void setErbanNo(Long erbanNo) {
this.erbanNo = erbanNo;
}
public String getNick() {
return nick;
}
public void setNick(String nick) {
this.nick = nick == null ? null : nick.trim();
}
public Long getRoomId() {
return roomId;
}
public void setRoomId(Long roomId) {
this.roomId = roomId;
}
public Long getOperatorId() {
return operatorId;
}
public void setOperatorId(Long operatorId) {
this.operatorId = operatorId;
}
public String getOperator() {
return operator;
}
public void setOperator(String operator) {
this.operator = operator == null ? null : operator.trim();
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason == null ? null : reason.trim();
}
public Integer getMuteTime() {
return muteTime;
}
public void setMuteTime(Integer muteTime) {
this.muteTime = muteTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Byte getStatus() {
return status;
}
public void setStatus(Byte status) {
this.status = status;
}
}

View File

@@ -1,951 +0,0 @@
package com.accompany.business.model;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class UserMuteRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public UserMuteRecordExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUidIsNull() {
addCriterion("uid is null");
return (Criteria) this;
}
public Criteria andUidIsNotNull() {
addCriterion("uid is not null");
return (Criteria) this;
}
public Criteria andUidEqualTo(Long value) {
addCriterion("uid =", value, "uid");
return (Criteria) this;
}
public Criteria andUidNotEqualTo(Long value) {
addCriterion("uid <>", value, "uid");
return (Criteria) this;
}
public Criteria andUidGreaterThan(Long value) {
addCriterion("uid >", value, "uid");
return (Criteria) this;
}
public Criteria andUidGreaterThanOrEqualTo(Long value) {
addCriterion("uid >=", value, "uid");
return (Criteria) this;
}
public Criteria andUidLessThan(Long value) {
addCriterion("uid <", value, "uid");
return (Criteria) this;
}
public Criteria andUidLessThanOrEqualTo(Long value) {
addCriterion("uid <=", value, "uid");
return (Criteria) this;
}
public Criteria andUidIn(List<Long> values) {
addCriterion("uid in", values, "uid");
return (Criteria) this;
}
public Criteria andUidNotIn(List<Long> values) {
addCriterion("uid not in", values, "uid");
return (Criteria) this;
}
public Criteria andUidBetween(Long value1, Long value2) {
addCriterion("uid between", value1, value2, "uid");
return (Criteria) this;
}
public Criteria andUidNotBetween(Long value1, Long value2) {
addCriterion("uid not between", value1, value2, "uid");
return (Criteria) this;
}
public Criteria andErbanNoIsNull() {
addCriterion("erban_no is null");
return (Criteria) this;
}
public Criteria andErbanNoIsNotNull() {
addCriterion("erban_no is not null");
return (Criteria) this;
}
public Criteria andErbanNoEqualTo(Long value) {
addCriterion("erban_no =", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoNotEqualTo(Long value) {
addCriterion("erban_no <>", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoGreaterThan(Long value) {
addCriterion("erban_no >", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoGreaterThanOrEqualTo(Long value) {
addCriterion("erban_no >=", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoLessThan(Long value) {
addCriterion("erban_no <", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoLessThanOrEqualTo(Long value) {
addCriterion("erban_no <=", value, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoIn(List<Long> values) {
addCriterion("erban_no in", values, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoNotIn(List<Long> values) {
addCriterion("erban_no not in", values, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoBetween(Long value1, Long value2) {
addCriterion("erban_no between", value1, value2, "erbanNo");
return (Criteria) this;
}
public Criteria andErbanNoNotBetween(Long value1, Long value2) {
addCriterion("erban_no not between", value1, value2, "erbanNo");
return (Criteria) this;
}
public Criteria andNickIsNull() {
addCriterion("nick is null");
return (Criteria) this;
}
public Criteria andNickIsNotNull() {
addCriterion("nick is not null");
return (Criteria) this;
}
public Criteria andNickEqualTo(String value) {
addCriterion("nick =", value, "nick");
return (Criteria) this;
}
public Criteria andNickNotEqualTo(String value) {
addCriterion("nick <>", value, "nick");
return (Criteria) this;
}
public Criteria andNickGreaterThan(String value) {
addCriterion("nick >", value, "nick");
return (Criteria) this;
}
public Criteria andNickGreaterThanOrEqualTo(String value) {
addCriterion("nick >=", value, "nick");
return (Criteria) this;
}
public Criteria andNickLessThan(String value) {
addCriterion("nick <", value, "nick");
return (Criteria) this;
}
public Criteria andNickLessThanOrEqualTo(String value) {
addCriterion("nick <=", value, "nick");
return (Criteria) this;
}
public Criteria andNickLike(String value) {
addCriterion("nick like", value, "nick");
return (Criteria) this;
}
public Criteria andNickNotLike(String value) {
addCriterion("nick not like", value, "nick");
return (Criteria) this;
}
public Criteria andNickIn(List<String> values) {
addCriterion("nick in", values, "nick");
return (Criteria) this;
}
public Criteria andNickNotIn(List<String> values) {
addCriterion("nick not in", values, "nick");
return (Criteria) this;
}
public Criteria andNickBetween(String value1, String value2) {
addCriterion("nick between", value1, value2, "nick");
return (Criteria) this;
}
public Criteria andNickNotBetween(String value1, String value2) {
addCriterion("nick not between", value1, value2, "nick");
return (Criteria) this;
}
public Criteria andRoomIdIsNull() {
addCriterion("room_id is null");
return (Criteria) this;
}
public Criteria andRoomIdIsNotNull() {
addCriterion("room_id is not null");
return (Criteria) this;
}
public Criteria andRoomIdEqualTo(Long value) {
addCriterion("room_id =", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdNotEqualTo(Long value) {
addCriterion("room_id <>", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdGreaterThan(Long value) {
addCriterion("room_id >", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdGreaterThanOrEqualTo(Long value) {
addCriterion("room_id >=", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdLessThan(Long value) {
addCriterion("room_id <", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdLessThanOrEqualTo(Long value) {
addCriterion("room_id <=", value, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdIn(List<Long> values) {
addCriterion("room_id in", values, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdNotIn(List<Long> values) {
addCriterion("room_id not in", values, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdBetween(Long value1, Long value2) {
addCriterion("room_id between", value1, value2, "roomId");
return (Criteria) this;
}
public Criteria andRoomIdNotBetween(Long value1, Long value2) {
addCriterion("room_id not between", value1, value2, "roomId");
return (Criteria) this;
}
public Criteria andOperatorIdIsNull() {
addCriterion("operator_id is null");
return (Criteria) this;
}
public Criteria andOperatorIdIsNotNull() {
addCriterion("operator_id is not null");
return (Criteria) this;
}
public Criteria andOperatorIdEqualTo(Long value) {
addCriterion("operator_id =", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotEqualTo(Long value) {
addCriterion("operator_id <>", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdGreaterThan(Long value) {
addCriterion("operator_id >", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdGreaterThanOrEqualTo(Long value) {
addCriterion("operator_id >=", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdLessThan(Long value) {
addCriterion("operator_id <", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdLessThanOrEqualTo(Long value) {
addCriterion("operator_id <=", value, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdIn(List<Long> values) {
addCriterion("operator_id in", values, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotIn(List<Long> values) {
addCriterion("operator_id not in", values, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdBetween(Long value1, Long value2) {
addCriterion("operator_id between", value1, value2, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIdNotBetween(Long value1, Long value2) {
addCriterion("operator_id not between", value1, value2, "operatorId");
return (Criteria) this;
}
public Criteria andOperatorIsNull() {
addCriterion("operator is null");
return (Criteria) this;
}
public Criteria andOperatorIsNotNull() {
addCriterion("operator is not null");
return (Criteria) this;
}
public Criteria andOperatorEqualTo(String value) {
addCriterion("operator =", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotEqualTo(String value) {
addCriterion("operator <>", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThan(String value) {
addCriterion("operator >", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorGreaterThanOrEqualTo(String value) {
addCriterion("operator >=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThan(String value) {
addCriterion("operator <", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLessThanOrEqualTo(String value) {
addCriterion("operator <=", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorLike(String value) {
addCriterion("operator like", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotLike(String value) {
addCriterion("operator not like", value, "operator");
return (Criteria) this;
}
public Criteria andOperatorIn(List<String> values) {
addCriterion("operator in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotIn(List<String> values) {
addCriterion("operator not in", values, "operator");
return (Criteria) this;
}
public Criteria andOperatorBetween(String value1, String value2) {
addCriterion("operator between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andOperatorNotBetween(String value1, String value2) {
addCriterion("operator not between", value1, value2, "operator");
return (Criteria) this;
}
public Criteria andReasonIsNull() {
addCriterion("reason is null");
return (Criteria) this;
}
public Criteria andReasonIsNotNull() {
addCriterion("reason is not null");
return (Criteria) this;
}
public Criteria andReasonEqualTo(String value) {
addCriterion("reason =", value, "reason");
return (Criteria) this;
}
public Criteria andReasonNotEqualTo(String value) {
addCriterion("reason <>", value, "reason");
return (Criteria) this;
}
public Criteria andReasonGreaterThan(String value) {
addCriterion("reason >", value, "reason");
return (Criteria) this;
}
public Criteria andReasonGreaterThanOrEqualTo(String value) {
addCriterion("reason >=", value, "reason");
return (Criteria) this;
}
public Criteria andReasonLessThan(String value) {
addCriterion("reason <", value, "reason");
return (Criteria) this;
}
public Criteria andReasonLessThanOrEqualTo(String value) {
addCriterion("reason <=", value, "reason");
return (Criteria) this;
}
public Criteria andReasonLike(String value) {
addCriterion("reason like", value, "reason");
return (Criteria) this;
}
public Criteria andReasonNotLike(String value) {
addCriterion("reason not like", value, "reason");
return (Criteria) this;
}
public Criteria andReasonIn(List<String> values) {
addCriterion("reason in", values, "reason");
return (Criteria) this;
}
public Criteria andReasonNotIn(List<String> values) {
addCriterion("reason not in", values, "reason");
return (Criteria) this;
}
public Criteria andReasonBetween(String value1, String value2) {
addCriterion("reason between", value1, value2, "reason");
return (Criteria) this;
}
public Criteria andReasonNotBetween(String value1, String value2) {
addCriterion("reason not between", value1, value2, "reason");
return (Criteria) this;
}
public Criteria andMuteTimeIsNull() {
addCriterion("mute_time is null");
return (Criteria) this;
}
public Criteria andMuteTimeIsNotNull() {
addCriterion("mute_time is not null");
return (Criteria) this;
}
public Criteria andMuteTimeEqualTo(Integer value) {
addCriterion("mute_time =", value, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeNotEqualTo(Integer value) {
addCriterion("mute_time <>", value, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeGreaterThan(Integer value) {
addCriterion("mute_time >", value, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("mute_time >=", value, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeLessThan(Integer value) {
addCriterion("mute_time <", value, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeLessThanOrEqualTo(Integer value) {
addCriterion("mute_time <=", value, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeIn(List<Integer> values) {
addCriterion("mute_time in", values, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeNotIn(List<Integer> values) {
addCriterion("mute_time not in", values, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeBetween(Integer value1, Integer value2) {
addCriterion("mute_time between", value1, value2, "muteTime");
return (Criteria) this;
}
public Criteria andMuteTimeNotBetween(Integer value1, Integer value2) {
addCriterion("mute_time not between", value1, value2, "muteTime");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNull() {
addCriterion("update_time is null");
return (Criteria) this;
}
public Criteria andUpdateTimeIsNotNull() {
addCriterion("update_time is not null");
return (Criteria) this;
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("status is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("status is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Byte value) {
addCriterion("status =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Byte value) {
addCriterion("status <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Byte value) {
addCriterion("status >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("status >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Byte value) {
addCriterion("status <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Byte value) {
addCriterion("status <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Byte> values) {
addCriterion("status in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Byte> values) {
addCriterion("status not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Byte value1, Byte value2) {
addCriterion("status between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Byte value1, Byte value2) {
addCriterion("status not between", value1, value2, "status");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

View File

@@ -1,574 +0,0 @@
package com.accompany.business.vo.message;
public class FamilyMessage {
/**
* 退出家族通知族長 {時間} {用戶昵稱}
*/
public static final MessageLayout QUIT_FAMILY_NOTIFY_LEADER = new MessageLayout().
titleContent("退出家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("已退出家族").contentsFontColor("#FF6565").contentsFontSize(28 / 2);
/**
* 退出家族通知用戶 {時間} {用戶昵稱} {家族名稱}
*/
public static final MessageLayout QUIT_FAMILY_NOTIFY_USER = new MessageLayout().
titleContent("退出家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("您已退出家族:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族幣將不可使用,重新加入可還原家族幣").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 踢出家族通知其他成員 {時間} {用戶昵稱} {族長昵稱}
*/
public static final MessageLayout CLICK_OUT_FAMILY_NOTIFY_LEADER = new MessageLayout().
titleContent("移出家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("已被移出家族").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 踢出家族通知用戶 {時間} {用戶昵稱} {家族昵稱} {族長昵稱}
*/
public static final MessageLayout CLICK_OUT_FAMILY_NOTIFY_USER = new MessageLayout().
titleContent("移出家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("您已被移出家族:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族幣將不可使用,重新加入家族可還原家族幣").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 創建家族 族長家族幣獎勵通知 {時間} {獎勵金額-帶小數點} {家族幣} {訂單編號} {獎勵方式} {獎勵時間}
*/
public static final MessageLayout FAMILY_MONEY_REWARD_NOTIFY_LEADER = new MessageLayout().
titleContent("家族幣獎勵通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("獎勵金額:+").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("獎勵方式:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("創建家族獎勵").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 家族幣轉讓通知族長 {時間} {轉讓金額-帶小數點} {接受者用戶名} {訂單編號} {轉讓時間}
*/
public static final MessageLayout FAMILY_TRANSFER_MONEY_NOTIFY_LEADER = new MessageLayout().
titleContent("家族幣轉讓通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("轉讓金額:-").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("接收人:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 家族幣轉讓通知成員 {時間} {轉讓金額-帶小數點} {轉讓方式} {訂單編號} {轉讓時間}
*/
public static final MessageLayout FAMILY_TRANSFER_MONEY_NOTIFY_MEMBER = new MessageLayout().
titleContent("家族幣轉讓通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("轉讓金額:+").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("轉讓方式:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("感謝您對家族的付出").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 家族幣貢獻通知 族長 {時間} {貢獻金額-帶小數點} {貢獻者} {訂單編號} {轉讓時間}
*/
public static final MessageLayout FAMILY_CONTRIBUTE_MONEY_NOTIFY_LEADER = new MessageLayout().
titleContent("家族幣貢獻通知").titleFontColor("#333333").titleFontSzie(15).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("貢獻金額:+").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(14)
.contengBr()
.contentsNextContent("貢獻者:").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(14)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(14)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(14);
/**
* 家族幣貢獻通知 {時間} {貢獻金額-帶小數點} {訂單編號} {轉讓時間}
*/
public static final MessageLayout FAMILY_CONTRIBUTE_MONEY_NOTIFY_MEMBER = new MessageLayout().
titleContent("家族幣貢獻通知").titleFontColor("#333333").titleFontSzie(15).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("貢獻金額:-").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(14)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(14)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(14)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(14)
.contengBr()
.contentsNextContent("感謝您對家族的貢獻").contentsFontColor("#333333").contentsFontSize(14);
/**
* 解散家族通知 族長
*/
public static final MessageLayout FAMILY_DISS_NOTIFY_LEADER = new MessageLayout().
titleContent("家族解散通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("家族解散申請已經通過。所有家族成員將被移出家族且退出群聊").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 家族解散通知 成員 {時間} {族長昵稱} {家族名稱}
*/
public static final MessageLayout FAMILY_DISS_NOTIFY_MEMBER = new MessageLayout().
titleContent("家族解散通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("操作人:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族已解散,家族幣清空").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 解散家族群通知 群主 {時間} {群聊名稱}
*/
public static final MessageLayout FAMILY_GROUP_DISS_NOTIFY_LEADER = new MessageLayout().
titleContent("家族群解散通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("群聊已解散,所有群成員已被移出群聊").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 同意加入家族通知 {時間} {用戶昵稱}
*/
public static final MessageLayout JOIN_FAMILY_SUCCESS_FOR_LEADER = new MessageLayout().
titleContent("加入家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("%s已通過申請成功加入家族").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 同意加入家族通知 用戶 {時間} {家族名稱} {驗證信息} {家族族長}
*/
public static final MessageLayout JOIN_FAMILY_SUCCESS = new MessageLayout().
titleContent("加入家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已通過申請,成功加入家族").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("驗證信息:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 拒絕加入家族通知 用戶 {時間} {家族名稱} {驗證信息} {家族族長}
*/
public static final MessageLayout JOIN_FAMILY_FAILD = new MessageLayout().
titleContent("加入家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你的申請被拒絕").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("驗證信息:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 同意家族邀請通知 族長 {時間} {邀請的用戶昵稱}
*/
public static final MessageLayout FAMILY_AGREE_REPONSE_INVITE_NOTIFY_LEADER = new MessageLayout().
titleContent("家族邀請通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你邀請的%s接受了你的邀請並加入家族").contentsFontColor("#999999").contentsFontSize(24 / 2);
/**
* 同意家族邀請通知 用戶 {時間} {家族名稱}
*/
public static final MessageLayout FAMILY_AGREE_REPONSE_INVITE_NOTIFY_MEMBER = new MessageLayout().
titleContent("家族邀請通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已接受邀請並成功加入家族").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 拒絕家族邀請通知 族長 {時間} {邀請的用戶昵稱} {家族名稱}
*/
public static final MessageLayout FAMILY_REJECT_REPONSE_INVITE_NOTIFY_LEADER = new MessageLayout().
titleContent("家族邀請通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你邀請的%s拒絕了你的家族邀請").contentsFontColor("#FF6565").contentsFontSize(28 / 2);
/**
* 加入群聊並加入家族通知 通知成員 {時間} {家族名稱} {群聊名稱} {家族族長}
*/
public static final MessageLayout FAMILY_AGREE_FAMILY_WITH_GROUP = new MessageLayout().
titleContent("加入家族並加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已通過申請加入家族並加入群聊").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 加入家族 加入群聊失敗 {時間} {家族名稱} {群聊名稱} {族長}
*/
public static final MessageLayout FAMILY_AGREE_FAMILY_WITH_GROUP_FAILD = new MessageLayout().
titleContent("加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已通過申請但入群失敗").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 加入家族失敗導致群聊失敗 {時間} {家族名稱} {群聊名稱} {族長}
*/
public static final MessageLayout FAMILY_REJCT_FAMILY_WITH_GROUP_FAILD = new MessageLayout().
titleContent("加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你未通過申請無法加入群聊").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 加入群聊通知 成員 {時間} {群聊名稱} {族長昵稱}
*/
public static final MessageLayout FAMILY_AGREE_GROUOP_APPLICATION = new MessageLayout().
titleContent("加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已通過申請並加入群聊").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 加入家族並加入群聊通知 族長 {時間} {用戶} {家族名稱} {群聊名稱}
*/
public static final MessageLayout FAMILY_GROUOP_AGREE_FOR_LEADER = new MessageLayout().
titleContent("加入家族並加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("已成功加入家族並加入群聊").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2);
/**
* 加入群聊通知 族長 {時間} {用戶} {群聊名稱}
*/
public static final MessageLayout GROUOP_AGREE_FOR_LEADER = new MessageLayout().
titleContent("加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("已成功加入群聊").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2);
/**
* 加入 群聊失敗 通知 成員 {時間} {家族名稱} {群聊名稱} {族長昵稱}
*/
public static final MessageLayout FAMILY_REJECT_GROUOP_APPLICATION = new MessageLayout().
titleContent("加入群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你未通過群聊申請").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 退出群通知 族長 {時間} {家族名稱} {群聊名稱}
*/
public static final MessageLayout a1 = new MessageLayout().
titleContent("退出群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("已退出群:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2);
/**
* 退出群通知 成員 {時間} {家族名稱} {群聊名稱}
*/
public static final MessageLayout LEAVE_CHAT = new MessageLayout().
titleContent("退出群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("已退出群:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2);
/**
* 踢出群聊通知 成員 {時間} {用戶昵稱} {群聊名稱} {群主昵稱}
*/
public static final MessageLayout KICKOUT_CHAT = new MessageLayout().
titleContent("移出群聊通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("已被移出群聊:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 創建家族 通知族長 {時間}
*/
public static final MessageLayout CREATE_FAMILY = new MessageLayout().
titleContent("創建家族通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("家族創建申請已通過。點擊前往查看>>").contentsFontColor("#999999").contentsFontSize(28 / 2);
/**
* 加入家族申請 通知族長 {時間} {申請人昵稱} {驗證信息} {成員被踢信息}
*/
public static final MessageLayout APPLY_JOIN_FAMILY_TO_LEADER = new MessageLayout().
titleContent("加入家族申請").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("申請加入家族").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("驗證信息:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("%s").contentsFontColor("#FF6565").contentsFontSize(28 / 2);
/**
* 加入家族群申請 通知族長 {時間} {申請人昵稱} {群名稱} {驗證信息}
*/
public static final MessageLayout APPLY_JOIN_GROUP = new MessageLayout().
titleContent("加入家族群申請").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("用戶名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("申請加入家族群:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("驗證信息:").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr();
/**
* 家族邀請通知 通知 {時間} {邀請人昵稱} {家族名稱}
*/
public static final MessageLayout FAMILY_INVITE_NOTIFY = new MessageLayout().
titleContent("家族邀請通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你的好友%s邀請你加入家族 ").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2);
/**
* 設為管理員通知 {時間} {家族名稱} {群聊名稱} {操作者}
*/
public static final MessageLayout SET_ADMIN = new MessageLayout().
titleContent("群通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已被設置為管理員").contentsFontColor("#67CD44").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 取消管理員通知 {時間} {家族名稱} {群聊名稱} {操作者}
*/
public static final MessageLayout CANCEL_ADMIN = new MessageLayout().
titleContent("群通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你已被取消群管理員").contentsFontColor("#FF6565").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱: ").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("操作者:%s").contentsFontColor("#67CD44").contentsFontSize(28 / 2);
/**
* 族長家族幣獎勵通知 {時間} {獎勵金額-帶小數點} {家族幣名稱} {訂單編號} {獎勵時間}
*/
public static final MessageLayout SYSTEM_FAMILY_MONEY_REWARD = new MessageLayout().
titleContent("家族幣獎勵通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("獎勵金額:+").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("獎勵方式:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("系統獎勵").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 族長家族幣扣除通知 {時間} {獎勵金額-帶小數點} {家族幣名稱} {訂單編號} {獎勵時間}
*/
public static final MessageLayout SYSTEM_FAMILY_MONEY_DEDUCT = new MessageLayout().
titleContent("家族幣扣除通知").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("扣除金額:-").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%.2f").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("訂單編號:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%d").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("扣除方式:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("系統扣除").contentsFontColor("#333333").contentsFontSize(24 / 2)
.contengBr()
.contentsNextContent("到賬時間:").contentsFontColor("#999999").contentsFontSize(24 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(24 / 2);
/**
* 申請過期提醒 通知用戶 {時間} {} {驗證信息} {成員被踢信息}
*/
public static final MessageLayout FAMILY_APPLY_EXPIRED_NOTIFY = new MessageLayout().
titleContent("申請過期提醒").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你的申請未處理,已經過期").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("申請時間:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("家族名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("驗證信息:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("請重新申請加入家族").contentsFontColor("#999999").contentsFontSize(28 / 2);
/**
* 申請過期提醒 通知用戶 {時間} {} {驗證信息} {成員被踢信息}
*/
public static final MessageLayout GROUP_APPLY_EXPIRED_NOTIFY = new MessageLayout().
titleContent("申請過期提醒").titleFontColor("#333333").titleFontSzie(30 / 2).titleFontBold(true)
.timeContent("%s").timeFontSize(24 / 2).timeFontColor("#999999")
.contentsNextContent("你的申請未處理,已經過期").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("申請時間:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("群聊名稱:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("驗證信息:").contentsFontColor("#999999").contentsFontSize(28 / 2)
.contentsNextContent("%s").contentsFontColor("#333333").contentsFontSize(28 / 2)
.contengBr()
.contentsNextContent("請重新申請加入群聊").contentsFontColor("#999999").contentsFontSize(28 / 2);
}

View File

@@ -1,28 +0,0 @@
package com.accompany.business.mybatismapper;
import com.accompany.business.model.UserMuteAdmin;
import com.accompany.business.model.UserMuteAdminExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface UserMuteAdminMapper {
int countByExample(UserMuteAdminExample example);
int deleteByPrimaryKey(Integer id);
int insert(UserMuteAdmin record);
int insertSelective(UserMuteAdmin record);
List<UserMuteAdmin> selectByExample(UserMuteAdminExample example);
UserMuteAdmin selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") UserMuteAdmin record, @Param("example") UserMuteAdminExample example);
int updateByExample(@Param("record") UserMuteAdmin record, @Param("example") UserMuteAdminExample example);
int updateByPrimaryKeySelective(UserMuteAdmin record);
int updateByPrimaryKey(UserMuteAdmin record);
}

View File

@@ -1,29 +0,0 @@
package com.accompany.business.mybatismapper;
import com.accompany.business.model.UserMuteRecord;
import com.accompany.business.model.UserMuteRecordExample;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface UserMuteRecordMapper {
int countByExample(UserMuteRecordExample example);
int deleteByPrimaryKey(Integer id);
int insert(UserMuteRecord record);
int insertSelective(UserMuteRecord record);
List<UserMuteRecord> selectByExample(UserMuteRecordExample example);
UserMuteRecord selectByPrimaryKey(Integer id);
int updateByExampleSelective(@Param("record") UserMuteRecord record, @Param("example") UserMuteRecordExample example);
int updateByExample(@Param("record") UserMuteRecord record, @Param("example") UserMuteRecordExample example);
int updateByPrimaryKeySelective(UserMuteRecord record);
int updateByPrimaryKey(UserMuteRecord record);
}

View File

@@ -1,38 +0,0 @@
package com.accompany.business.mybatismapper;
import com.accompany.business.model.UserMuteRecord;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
import java.util.List;
public interface UserMuteRecordMapperExpand {
/**
* 统计有效记录的数量
* @param uid
* @param roomId
* @param date
* @return
*/
int countEnabledRecord(@Param("uid") Long uid, @Param("roomId") Long roomId, @Param("date") Date date);
/**
* 查询有效记录列表
* @param uid
* @param roomId
* @param date
* @return
*/
List<UserMuteRecord> queryEnabledRecord(@Param("uid") Long uid, @Param("roomId") Long roomId, @Param("date") Date date);
/**
* 将有效记录设置为无效记录
* @param uid
* @param roomId
* @param date
* @return
*/
int disableEnabledRecord(@Param("uid") Long uid, @Param("roomId") Long roomId, @Param("date") Date date);
}

View File

@@ -5,28 +5,22 @@ import com.accompany.business.model.AppVersionExample;
import com.accompany.business.mybatismapper.AppVersionMapper;
import com.accompany.business.vo.AppVersionVo;
import com.accompany.business.vo.ComponentContrlVo;
import com.accompany.business.vo.EditVersionVo;
import com.accompany.business.vo.UploadFileInfoVo;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.BusinessException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.result.BusiResult;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.AppVersionUtil;
import com.accompany.common.utils.BlankUtil;
import com.accompany.common.utils.GsonUtil;
import com.accompany.core.exception.ServiceException;
import com.accompany.core.service.SysConfService;
import com.accompany.core.service.base.BaseService;
import com.accompany.core.util.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import java.util.function.Predicate;
@@ -34,11 +28,10 @@ import java.util.function.Predicate;
/**
* Created by liuguofu on 2017/7/10.
*/
@Slf4j
@Service
public class AppVersionService extends BaseService {
private static final Logger logger = LoggerFactory.getLogger(AppVersionService.class);
@Autowired
private AppVersionMapper appVersionMapper;
@Autowired
@@ -168,7 +161,7 @@ public class AppVersionService extends BaseService {
AppVersion newestVersion = getNewestAppVersion(appVersion.getOs(),appVersion.getPlatform());
if (newestVersion == null) {
logger.error("Not found newestVersion. The version: " + appVersion.getVersion() + ", os: " + appVersion.getOs());
throw new BusinessException("Not found newestVersion.");
throw new ServiceException("Not found newestVersion.");
}
// 将最新的版本及描述加入Vo
@@ -261,11 +254,6 @@ public class AppVersionService extends BaseService {
jedisService.hwrite(RedisKey.app_version.getKey(), key, GsonUtil.getGson().toJson(appVersion));
}
private void deleteAppVersionCache(String version, String os, String channel) {
String key = getAppVersionKey(version, os, channel);
jedisService.hdel(RedisKey.app_version.getKey(), key);
}
private void batchSaveAppVersion(List<AppVersion> appVersionList) {
if (CollectionUtils.isEmpty(appVersionList)) {
return;
@@ -369,136 +357,4 @@ public class AppVersionService extends BaseService {
return toVo(newestVersion);
}
@Transactional(rollbackFor = Exception.class)
public int batchSave(EditVersionVo versionVo, String operator) {
int result = 0;
List<UploadFileInfoVo> fileInfoVoList = versionVo.getFileInfoList();
if(versionVo.getVersionId()==null){
// 新增 根据平台可能多个
String[] platformList = versionVo.getPlatform().split(",");
for(String platform : platformList){
AppVersion saveAppVersion = new AppVersion();
BeanUtils.copyProperties(versionVo,saveAppVersion);
saveAppVersion.setPlatform(platform);
saveAppVersion.setCreateTime(new Date());
convertProperties(saveAppVersion,fileInfoVoList);
result += saveAppVersion(saveAppVersion, operator);
}
}else{
if (fileInfoVoList.size()>1){
throw new BusinessException("只能上传一个文件");
}
AppVersion appVersion = versionVo.getAppVersion();
convertProperties(appVersion,fileInfoVoList);
result += saveAppVersion(appVersion, operator);
String key = this.getAppVersionKey(versionVo.getVersion(), versionVo.getOs(), versionVo.getPlatform());
jedisService.hdel(RedisKey.app_version.getKey(), key);
}
return result;
}
/**
* 替换相关属性
* @param appVersion
* @param fileInfoVoList
*/
private void convertProperties(AppVersion appVersion,List<UploadFileInfoVo> fileInfoVoList){
if(StringUtils.isBlank(appVersion.getPlatform())){
return;
}
appVersion.setDownloadLink(null);
appVersion.setFileMd5(null);
for(UploadFileInfoVo infoVo : fileInfoVoList){
if(infoVo.isSuccess()){
String[] infoArray = infoVo.getPath().split("-");
// 获取最后一个
String lastFlag = infoArray[infoArray.length-1];
// 去掉文件扩展名
String platform = lastFlag.split("\\.")[0];
if(appVersion.getPlatform().equals(platform)){
appVersion.setDownloadLink(infoVo.getPath());
appVersion.setFileMd5(infoVo.getMd5());
break;
}
}
}
}
private int saveAppVersion(AppVersion entity, String operator) {
int result = 0;
if(Constant.AppVersion.audit.equals(entity.getStatus())) {
if(checkHasAudit(entity.getVersionId(),entity.getPlatform())) {
throw new BusinessException("已存在审核状态中的版本记录.请修改后再试");
}
}
// 如果之前版本是审核中版本,则去除当前审核版本
AppVersion beforeVersion = this.appVersionMapper.selectByPrimaryKey(entity.getVersionId());
if(beforeVersion != null && Constant.AppVersion.audit.equals(beforeVersion.getStatus())) {
//sysConfService.setConfValueById(this.getAuditingVersionKey(entity.getPlatform()), "", operator);
}
AppVersion appVersion = this.queryAppVersionBy(entity.getVersion(),entity.getOs(),entity.getPlatform());
if((entity.getVersionId()==null && appVersion!=null)
|| (entity.getVersionId()!=null && appVersion!=null && !appVersion.getVersionId().equals(entity.getVersionId()))){
throw new BusinessException("已存在版本:"+entity.getOs()+"+"+entity.getVersion()+"+"+entity.getPlatform());
}
if(entity.getVersionId()==null){
result += appVersionMapper.insert(entity);
}else{
entity.setCreateTime(beforeVersion.getCreateTime());
result += appVersionMapper.updateByPrimaryKeyWithBLOBs(entity);
}
// 更新配置中的审核版本
if(Constant.AppVersion.audit.equals(entity.getStatus())) {
//sysConfService.setConfValueById(this.getAuditingVersionKey(entity.getPlatform()), entity.getVersion(), operator);
}
return result;
}
/**
* 统计是否有审核状态中的记录
* @return
*/
private boolean checkHasAudit(Integer id,String platform) {
if(id == null) {
int count = countByStatus(Constant.AppVersion.audit, platform);
if (count > 0) {
return true;
}
} else {
AppVersion auditingVersion = getVersionByStatus(Constant.AppVersion.audit, platform);
// 判断审核版本的记录是否跟当前id一致
if(auditingVersion != null && !id.equals(auditingVersion.getVersionId())) {
return true;
}
}
return false;
}
/**
* 通过状态统计版本记录
* @param status
* @return
*/
public int countByStatus(byte status, String platform)
{
AppVersionExample example = new AppVersionExample();
example.createCriteria().andStatusEqualTo(status).andPlatformEqualTo(platform);
return appVersionMapper.countByExample(example);
}
/**
* 根据状态获取版本
* @param status
* @return
*/
public AppVersion getVersionByStatus(byte status, String platform) {
AppVersionExample example = new AppVersionExample();
example.createCriteria().andStatusEqualTo(status).andPlatformEqualTo(platform);
List<AppVersion> list = appVersionMapper.selectByExampleWithBLOBs(example);
return list.size()>0?list.get(0):null;
}
}

View File

@@ -16,8 +16,7 @@ import com.accompany.business.service.vip.VipMessageService;
import com.accompany.business.util.VipUtil;
import com.accompany.common.constant.Constant;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.common.exception.BusinessException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.UUIDUtil;
@@ -161,11 +160,11 @@ public class ChargeService extends BaseService {
log.error("applyCharge3() error,uid={},chargeProdId={},channel={},clientIp={},successUrl={},openId={}", uid, chargeProdId, channel, clientIp, successUrl, openId);
log.error("applyCharge3() errorMsg={}", e.getMessage());
int status = BusiStatus.SERVERBUSY.value();
if (e instanceof ApiException) {
ApiException exception = (ApiException) e;
if (e instanceof AdminServiceException) {
AdminServiceException exception = (AdminServiceException) e;
status = exception.getResponseCode();
}
throw new ApiException(status, e.getMessage());
throw new AdminServiceException(status, e.getMessage());
} finally {
jedisLockService.unlock(RedisKey.lock_apply_charge.getKey(uid.toString()), lockVal);
}
@@ -206,12 +205,12 @@ public class ChargeService extends BaseService {
Long uid = chargeRecord.getUid();
String chargeRecordId = chargeRecord.getChargeRecordId();
if (null == chargeRecordId) {
throw new BusinessException("支付訂單號異常");
throw new ServiceException("支付訂單號異常");
}
String chargeProdId = chargeRecord.getChargeProdId();
ChargeProd chargeProd = chargeProdService.getChargeProdById(chargeProdId);
if (chargeProd == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY, "檔位不存在");
throw new ServiceException(BusiStatus.SERVERBUSY, "檔位不存在");
}
int vipLevel = 1;
String prodDesc = chargeProd.getProdDesc();
@@ -231,7 +230,7 @@ public class ChargeService extends BaseService {
}
UserVipRecord userVipRecord = userVipRecordService.getByChargeRecordId(chargeRecordId);
if (null == userVipRecord) {
throw new BusinessException("支付訂單號異常");
throw new ServiceException("支付訂單號異常");
}
final Date expireTime = VipUtil.genVipExpireTime(new Date());
updateUserRecord(chargeRecord, userVipRecord, expireTime);
@@ -294,7 +293,7 @@ public class ChargeService extends BaseService {
int result = completedOrder(chargeRecord);
if (result <= 0) {
log.info("重複請求chargeRecordId: " + chargeRecord.getChargeRecordId());
throw new ApiException(BusiStatus.DUPLICATE_TRANSFER_REQUEST);
throw new AdminServiceException(BusiStatus.DUPLICATE_TRANSFER_REQUEST);
}
// 更新用戶vip記錄
userVipRecord.setLastVipLevel(lastVipLevel);
@@ -424,7 +423,7 @@ public class ChargeService extends BaseService {
String chargeRecordId = chargeRecord.getChargeRecordId();
String tradeNo = chargeRecord.getPingxxChargeId();
if (chargeRecordId == null || tradeNo == null) {
throw new BusinessException("支付訂單號或商戶訂單號異常");
throw new ServiceException("支付訂單號或商戶訂單號異常");
}
Long chargeUid = chargeRecord.getUid();
int outTradeNum = getLastNumFromOrder(chargeRecordId);
@@ -513,7 +512,7 @@ public class ChargeService extends BaseService {
int result = completedOrder(chargeRecord);
if (result <= 0) {
log.info("重复请求chargeRecordId: " + chargeRecord.getChargeRecordId());
throw new ApiException(BusiStatus.DUPLICATE_TRANSFER_REQUEST);
throw new AdminServiceException(BusiStatus.DUPLICATE_TRANSFER_REQUEST);
}
// 更新塔羅充值記錄
luckyTarotRecord.setDrawStatus(drawStatus);

View File

@@ -3,13 +3,12 @@ package com.accompany.business.service.account;
import com.accompany.business.service.AccountLoginRecordService;
import com.accompany.business.service.room.RoomService;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.BusinessException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.core.constant.BlockSourceEnum;
import com.accompany.core.constant.BlockStatusEnum;
import com.accompany.core.constant.BlockTypeEnum;
import com.accompany.core.exception.ServiceException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.core.model.AccountBlock;
import com.accompany.core.model.AccountLoginRecord;
import com.accompany.core.model.Users;
@@ -148,13 +147,13 @@ public class AccountBlockService extends ServiceImpl<AccountBlockMapper,AccountB
String blockDesc, Integer source, String adminName,Boolean wallStatus) throws Exception {
Users users = usersBaseService.getUsersByErBanNo(erbanNo);
if (users == null) {
throw new BusinessException("该平台号不存在!");
throw new AdminServiceException("该平台号不存在!");
}
AccountBlock accountBlock = getById(erbanNo.toString());
Date startBlockTime = DateTimeUtil.convertStrToDate(startBlockTimeStr);
Date endBlockTime = DateTimeUtil.convertStrToDate(endBlockTimeStr);
if(accountBlock != null && accountBlock.getSource() == BlockSourceEnum.SYSTEM.getValue()) {
throw new ServiceException("该用户已被系统封禁");
throw new AdminServiceException("该用户已被系统封禁");
}
if(accountBlock == null) {
accountBlock = new AccountBlock();

View File

@@ -1,34 +1,26 @@
package com.accompany.business.service.activities;
import com.accompany.business.constant.PrizeLevelEnum;
import com.accompany.business.constant.PrizePoolItemTypeEnum;
import com.accompany.business.constant.activities.ActivitesPackTypeEnum;
import com.accompany.business.constant.activities.ActivitiesDrawTypeEnum;
import com.accompany.business.constant.activities.ActivitiesTicketRuleEnum;
import com.accompany.business.model.*;
import com.accompany.business.mybatismapper.DrawLotteryRecordMapperWebExpand;
import com.accompany.business.mybatismapper.PrizeMapper;
import com.accompany.business.mybatismapper.PrizePoolItemMapper;
import com.accompany.business.service.activities.vo.RunawayPoolVo;
import com.accompany.business.service.activities.vo.RunawayValueVo;
import com.accompany.business.service.activity.ActivityPackService;
import com.accompany.business.service.box.OpenNormalBoxService;
import com.accompany.business.service.box.UserPrizeKeyService;
import com.accompany.business.service.purse.UserPurseService;
import com.accompany.business.service.user.UsersService;
import com.accompany.business.vo.UserPurseVo;
import com.accompany.business.vo.activities.RunawayRedisMsgSubVo;
import com.accompany.business.vo.activity.ActivitiesDrawPrizeInfoVo;
import com.accompany.business.vo.activity.ActivitiesDrawPrizeMsgVo;
import com.accompany.business.vo.activity.ActivityPackVo;
import com.accompany.business.vo.openbox.DrawPrizeItemVo;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.result.BusiResult;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.BlankUtil;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.core.base.BeanMapper;
import com.accompany.core.model.Users;
import com.accompany.core.service.SysConfService;
@@ -93,7 +85,7 @@ public class ActivitiesDrawService {
try {
lock = jedisLockService.lock(RedisKey.lock_draw_update_ticket.getKey(uid.toString()), 10 * 1000);
if (BlankUtil.isBlank(lock)){
throw new ApiException(BusiStatus.REQUEST_FAST);
throw new AdminServiceException(BusiStatus.REQUEST_FAST);
}
ActivityPack pack = activityPackService.getPackById(packId);
userPrizeKeyService.updateTicket(uid, pack.getTicketNum() * packNum);
@@ -114,7 +106,7 @@ public class ActivitiesDrawService {
log.info("queryTicketNum, uid = {}", uid);
Users users = usersService.getUsersByUid(uid);
if (users == null){
throw new ApiException(BusiStatus.USERNOTEXISTS);
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
}
Map map = new HashMap();
BusiResult result = new BusiResult(BusiStatus.SUCCESS);
@@ -137,7 +129,7 @@ public class ActivitiesDrawService {
BusiResult result = new BusiResult(BusiStatus.SUCCESS);
String str = jedisService.hget(RedisKey.draw_ticket_rule.getKey(), drawType.name().toLowerCase());
if (StringUtils.isEmpty(str)){
throw new ApiException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
throw new AdminServiceException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
}
result.setData(gson.fromJson(str,new TypeToken<Map<String,String>>(){}.getType()));
return result;
@@ -165,7 +157,7 @@ public class ActivitiesDrawService {
public Integer getTicketNum(ActivitiesTicketRuleEnum ruleType, ActivitiesDrawTypeEnum drawType){
String numStr = getRedisMapValue(drawType.name().toLowerCase(), ruleType.name().toLowerCase(), RedisKey.draw_ticket_rule.getKey());
if (StringUtils.isEmpty(numStr)){
throw new ApiException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
throw new AdminServiceException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
}
return Integer.valueOf(numStr);
}
@@ -179,7 +171,7 @@ public class ActivitiesDrawService {
public Integer getUserNum(ActivitiesTicketRuleEnum ruleType, ActivitiesDrawTypeEnum drawType){
String numStr = getRedisMapValue(drawType.name().toLowerCase(), ruleType.name().toLowerCase(), RedisKey.draw_user_num_rule.getKey());
if (StringUtils.isEmpty(numStr)){
throw new ApiException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
throw new AdminServiceException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
}
return Integer.valueOf(numStr);
}
@@ -255,7 +247,7 @@ public class ActivitiesDrawService {
}else if (typeEnum.equals(ActivitiesDrawTypeEnum.turntable2)){
poolType = PrizePoolItemTypeEnum.diamond_prize_pool.getValue();
}else{
throw new ApiException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
throw new AdminServiceException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
}
List<PrizePoolItem> items = prizePgetListByPool(poolType);
if (CollectionUtils.isEmpty(items)){

View File

@@ -96,7 +96,7 @@ public class ActivitiesLuckySeaServiceImpl implements ActivitiesLuckySeaService
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
ActivityPack pack = activityPackService.getPackById(packId);
@@ -108,7 +108,7 @@ public class ActivitiesLuckySeaServiceImpl implements ActivitiesLuckySeaService
log.info("updateTicketNum, num = {}",pieceNum);
} catch (InterruptedException e) {
log.error("[春日游园]", e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (locked){
lock.unlock();

View File

@@ -98,7 +98,7 @@ public class LuckySeaDrawServiceImpl implements LuckySeaDrawService {
Long roomUid = userInOutRoomRecordService.getUserCurrentRoomUid(uid);
if (!drawRecordService.updateUserDrawRecord(uid, roomUid, roundId, item, num)){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
billRecordService.insertGeneralBillRecord(uid, null, null, BillObjTypeEnum.ACTIVITY_LUCKY_SEA_DRAW, num.doubleValue());
@@ -107,7 +107,7 @@ public class LuckySeaDrawServiceImpl implements LuckySeaDrawService {
applicationContext.publishEvent(new LuckySeaDrawMessageEvent(message));
} catch (InterruptedException e) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
if (StringUtils.isNoneBlank(roundId)){
RAtomicLong atomic = redissonClient.getAtomicLong(RedisKey.lucky_sea_curr_write_data_user_count.getKey(roundId));

View File

@@ -234,7 +234,7 @@ public class ActivityPackService implements InitializingBean, BeanSelfAware {
try {
boolean result = userPurseService.subDiamond(uid, totalPriceD, BillObjTypeEnum.ACTIVITY_PACKET.getDesc());
if (!result) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
userPurseService.sendSysMsgByModifyGold(userPurseService.queryUserPurse(uid));
//购买礼包记录

View File

@@ -99,7 +99,7 @@ public class AnchorFansTeamAudioRecordServiceImpl extends ServiceImpl<AnchorFans
String lockKey = RedisKey.anchor_fans_team_mp_apply_lock.getKey(teamId.toString());
String lockVal = jedisLockService.lock(lockKey,10 * 1000);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try{
if(status == 1){
@@ -144,10 +144,10 @@ public class AnchorFansTeamAudioRecordServiceImpl extends ServiceImpl<AnchorFans
sendOpenFansTeamMessage(record.getUid(),vo,status);
} catch (ServiceException e1) {
log.error("审核通过粉丝团铭牌生成失败,teamUid:{},mpTx:{},",team.getUid(),mpTx,e1);
throw new ServiceException(BusiStatus.SERVER_BUSY,e1.getMessage());
throw new ServiceException(BusiStatus.SERVERBUSY,e1.getMessage());
} catch (Exception e){
log.error("审核通过粉丝团铭牌生成失败,teamUid:{},mpTx:{},",team.getUid(),mpTx,e);
throw new ServiceException(BusiStatus.SERVER_BUSY,e.getMessage());
throw new ServiceException(BusiStatus.SERVERBUSY,e.getMessage());
}finally {
jedisLockService.unlock(lockKey, lockVal);
}
@@ -198,7 +198,7 @@ public class AnchorFansTeamAudioRecordServiceImpl extends ServiceImpl<AnchorFans
String lockKey = RedisKey.anchor_fans_team_mp_apply_lock.getKey(team.getId().toString());
String lockVal = jedisLockService.lock(lockKey,10 * 1000);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try{
// 更新粉丝团名称+缓存
@@ -239,10 +239,10 @@ public class AnchorFansTeamAudioRecordServiceImpl extends ServiceImpl<AnchorFans
}
} catch (ServiceException e1) {
log.error("审核通过粉丝团铭牌生成失败,teamUid:{},mpTx:{},",team.getUid(),mpTx,e1);
throw new ServiceException(BusiStatus.SERVER_BUSY,e1.getMessage());
throw new ServiceException(BusiStatus.SERVERBUSY,e1.getMessage());
} catch (Exception e){
log.error("审核通过粉丝团铭牌生成失败,teamUid:{},mpTx:{},",team.getUid(),mpTx,e);
throw new ServiceException(BusiStatus.SERVER_BUSY,e.getMessage());
throw new ServiceException(BusiStatus.SERVERBUSY,e.getMessage());
}finally {
jedisLockService.unlock(lockKey, lockVal);
}

View File

@@ -185,7 +185,7 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
String key = RedisKey.anchor_fans_team_mp_apply_lock.getKey(uid.toString());
String lockVal = jedisLockService.lock(key, 10 * 1000);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {
// 主播粉丝团创建
@@ -853,13 +853,13 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
String sendJoinGiftSignKey = RedisKey.anchor_fans_send_join_gift_sign.getKey(team.getUid() + StrUtil.UNDERLINE + sendUid);
String sendJoinGiftSignVal = jedisService.get(sendJoinGiftSignKey);
if (StringUtils.isNotBlank(sendJoinGiftSignVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
String key = RedisKey.anchor_fans_send_join_gift_lock.getKey(sendUid + StrUtil.UNDERLINE + receiveUid);
String lockVal = jedisLockService.lock(key, 10 * 1000);
if (StringUtils.isEmpty(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
try {
// 再次校验, 避免送入团礼时亲密值增加先处理,导致此时数据库先生成了对应的成员记录
@@ -877,7 +877,7 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
String sendJoinGiftSignValDoubleVal = jedisService.get(sendJoinGiftSignKey);
// 设置加入粉丝团的缓存锁 避免监听器还未处理结束对应的入团操作
if (StringUtils.isNotBlank(sendJoinGiftSignValDoubleVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Object object = giftSendService.sendGiftAllowNotPutOn(sendUid, receiveUids, roomUid, giftId, giftNum, msg, giftSource, sendType);
@@ -1161,7 +1161,7 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
String lockVal = jedisLockService.lock(key, 10 * 1000);
if (StringUtils.isEmpty(lockVal)) {
log.error("加入粉丝团获取不到对应的锁....sendUid {} teamUid {}", memberUid, team.getUid());
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
String sendJoinGiftSignKey = RedisKey.anchor_fans_send_join_gift_sign.getKey(team.getUid() + StrUtil.UNDERLINE + memberUid);
try {
@@ -1254,7 +1254,7 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
} catch (Exception e) {
log.error("加入粉丝团出现异常。。。memberUid {} teamUid {}", memberUid, team.getUid(), e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} finally {
this.jedisService.del(sendJoinGiftSignKey);
this.jedisLockService.unlock(key, lockVal);
@@ -1424,7 +1424,7 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
Integer levelSeq = member.getLevelSeq();
AnchorFansLevelExperience currentLevel = anchorFansLevelExperienceService.getAnchorFansLevelExperienceBySeq(levelSeq);
if (currentLevel == null) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
Long amount = currentLevel.getAmount();
if (amount == null) {
@@ -1438,7 +1438,7 @@ public class AnchorFansTeamServiceImpl extends ServiceImpl<AnchorFansTeamMapper,
vo.setNextLevelExper(currentLevel.getAmount());
} else {
AnchorFansLevelExperience nextLevel = anchorFansLevelExperienceService.getAnchorFansLevelExperienceBySeq(levelSeq + 1);
if (nextLevel == null) throw new ServiceException(BusiStatus.SERVER_BUSY);
if (nextLevel == null) throw new ServiceException(BusiStatus.SERVERBUSY);
vo.setNextLevelExper(nextLevel.getAmount());
}
Long teamId = team.getId();

View File

@@ -55,7 +55,7 @@ public class IOSStoreKitV2Service {
try {
locked = lock.tryLock(3, TimeUnit.SECONDS);
if (!locked){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
log.info("[verifyOrder] 参数 {} {} {} {} {}", uid, chargeRecordId, transcationId, clientIp, deviceInfo.getDeviceId());
@@ -105,7 +105,7 @@ public class IOSStoreKitV2Service {
} catch (InterruptedException e) {
log.error("[verifyOrder] 锁异常", e);
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
} catch (NotfoundException e) {
log.error("[verifyOrder] 订单号 {} 无 apple iap transaction记录", transcationId, e);
throw new ServiceException(BusiStatus.SERVERERROR);

View File

@@ -12,7 +12,6 @@ package com.accompany.business.service.callbattle.impl;
import com.accompany.business.dto.activity.callbattle.ActCallBattleConfig;
import com.accompany.business.constant.activities.ActivitesPackTypeEnum;
import com.accompany.business.dto.callbattle.ActCallBattleTicketConfig;
import com.accompany.business.dto.callbattle.ActCallBattleUserDrawResultDto;
import com.accompany.business.dto.callbattle.ActCallBattleUserRoundStatDTO;
import com.accompany.business.model.ActivityPack;
@@ -32,12 +31,11 @@ import com.accompany.business.service.user.UserActPropertyInfoV2Service;
import com.accompany.business.service.user.UsersService;
import com.accompany.business.vo.callbattle.*;
import com.accompany.common.constant.Constant;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.BlankUtil;
import com.accompany.common.utils.DateTimeUtil;
import com.accompany.common.utils.RandomUtil;
import com.accompany.core.enumeration.BillObjTypeEnum;
import com.accompany.core.exception.ServiceException;
import com.accompany.core.model.Users;
@@ -60,7 +58,6 @@ import org.springframework.util.CollectionUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;
import java.util.stream.Collectors;
/**
@@ -156,7 +153,7 @@ public class ActCallBattleBizServiceImpl implements ActCallBattleBizService {
try {
lock = jedisLockService.lock(RedisKey.CALL_BATTLE_UPDATE_PIECE_LOCK.getKey(uid.toString()), 10 * 1000);
if (BlankUtil.isBlank(lock)){
throw new ApiException(BusiStatus.REQUEST_FAST);
throw new AdminServiceException(BusiStatus.REQUEST_FAST);
}
ActivityPack pack = activityPackService.getPackById(packId);
if (null == pack) {
@@ -366,7 +363,7 @@ public class ActCallBattleBizServiceImpl implements ActCallBattleBizService {
ActCallBattleInfo actInfo = actCallBattleInfoService.getByCurrTime();
if (actInfo == null) {
log.error("选择失败当前时段不存在活动。actInfo:" + JSON.toJSONString(actInfo));
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
roundId = actInfo.getRoundId();

View File

@@ -148,7 +148,7 @@ public class CarPayService extends BaseService {
try {
lockVal = jedisLockService.lock(RedisKey.lock_buy_car.getKey(uid.toString()), 10 * 1000, 12 * 1000);
if (BlankUtil.isBlank(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
CarCarport carCarport = null;
Long carPrice = this.getCarPrice(carGoods, currencyType, optType, expireTime);
@@ -555,7 +555,7 @@ public class CarPayService extends BaseService {
try {
lockVal = jedisLockService.lock(RedisKey.lock_buy_car.getKey(uid.toString()), 10 * 1000, 12 * 1000);
if (BlankUtil.isBlank(lockVal)) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
if(null == carDay){
throw new ServiceException(BusiStatus.PARAMETERILLEGAL,"购买天数为空");

View File

@@ -5,7 +5,6 @@ import cn.hutool.core.util.StrUtil;
import com.accompany.business.constant.withdraw.WithdrawAccountTypeConstant;
import com.accompany.business.model.UserCertifyRecord;
import com.accompany.business.model.UserCertifyRecordExample;
import com.accompany.business.model.withdraw.WithdrawUser;
import com.accompany.business.model.withdraw.WithdrawUserAccount;
import com.accompany.business.mybatismapper.UserCertifyRecordMapper;
import com.accompany.business.mybatismapper.UserCertifyRecordMapperExpand;
@@ -14,7 +13,7 @@ import com.accompany.business.service.user.UsersService;
import com.accompany.common.constant.Constant;
import com.accompany.common.constant.SmsTypeEnum;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.DateTimeUtil;
@@ -36,7 +35,6 @@ import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
public abstract class AbstractCertifyService {
@@ -127,16 +125,16 @@ public abstract class AbstractCertifyService {
.eq(WithdrawUserAccount::getUid, uid)
.eq(WithdrawUserAccount::getAccountType, WithdrawAccountTypeConstant.CHINA_UNION_PAY));
if (CollectionUtil.isEmpty(withdrawUserAccounts)) {
throw new ApiException("请绑定大陆银联提现账户");
throw new AdminServiceException("请绑定大陆银联提现账户");
}
WithdrawUserAccount withdrawUserAccount = withdrawUserAccounts.get(0);
String name = withdrawUserAccount.getName();
String idCardNo = withdrawUserAccount.getIdCardNo();
if (StrUtil.isEmpty(name) || StrUtil.isEmpty(idCardNo)) {
throw new ApiException("认证身份信息与绑定的提现账户身份信息不同");
throw new AdminServiceException("认证身份信息与绑定的提现账户身份信息不同");
}
if (!name.equals(username) || !idCardNo.equals(identityNumber)) {
throw new ApiException("认证身份信息与绑定的提现账户身份信息不同");
throw new AdminServiceException("认证身份信息与绑定的提现账户身份信息不同");
}
String userCountStr = jedisService.hget(RedisKey.certify_user_count.getKey(DateTimeUtil.convertDate(new Date(), DateTimeUtil.DEFAULT_DATE_PATTERN)), String.valueOf(uid));
int certificationCount = sysConfService.getIntValueById(Constant.SysConfId.CERTIFICATION_COUNT);
@@ -144,7 +142,7 @@ public abstract class AbstractCertifyService {
certificationCount = 5;
}
if (StrUtil.isNotEmpty(userCountStr) && Integer.parseInt(userCountStr) >= certificationCount) {
throw new ApiException("超过当日最大认证次数,请明天再试");
throw new AdminServiceException("超过当日最大认证次数,请明天再试");
}
verify(usersService.getUsersByUid(uid), phone, code, identityNumber);
}
@@ -160,21 +158,21 @@ public abstract class AbstractCertifyService {
*/
protected void verify(Users users, String phone, String code, String identityNumber) {
if (users == null) {
throw new ApiException(BusiStatus.USERNOTEXISTS);
throw new AdminServiceException(BusiStatus.USERNOTEXISTS);
}
//验证码验证
boolean verify = smsService.verifySmsCode(phone, code);
if (!verify) {
throw new ApiException(BusiStatus.SMSCODEERROR);
throw new AdminServiceException(BusiStatus.SMSCODEERROR);
}
//身份证绑定账号验证
String bindAccount = jedisService.hget(RedisKey.id_card_bind_user_count.getKey(), identityNumber);
if (StrUtil.isNotEmpty(bindAccount) && Integer.parseInt(bindAccount) >= Constant.usersCertification.ID_CARD_BIND_USER_LIMIT) {
throw new ApiException(BusiStatus.ID_CARD_BIND_LIMIT);
throw new AdminServiceException(BusiStatus.ID_CARD_BIND_LIMIT);
}
// 2020-03-04 实名认证修改次数超过限制,实名认证后,用户有一次修改认证信息的机会
if (users.getCertifyModifyTimes() != null && users.getCertifyModifyTimes() >= 1) {
throw new ApiException(BusiStatus.MODIFY_BIND_TIMES_LIMITS);
throw new AdminServiceException(BusiStatus.MODIFY_BIND_TIMES_LIMITS);
}
}
@@ -230,7 +228,7 @@ public abstract class AbstractCertifyService {
example.createCriteria().andUidEqualTo(uid).andTokenEqualTo(token);
List<UserCertifyRecord> records = userCertifyRecordMapper.selectByExample(example);
if (CollectionUtil.isEmpty(records)) {
throw new ApiException(BusiStatus.NOTEXISTS);
throw new AdminServiceException(BusiStatus.NOTEXISTS);
}
return records.get(0);
}

View File

@@ -10,7 +10,7 @@ import com.accompany.business.mybatismapper.withdraw.WithdrawUserAccountMapper;
import com.accompany.business.service.certification.aliyun.FinancialFaceVerify;
import com.accompany.common.constant.Constant;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.utils.DESUtils;
import com.accompany.common.utils.DateTimeUtil;
@@ -57,7 +57,7 @@ public class FinancialFaceVerifyService extends AbstractCertifyService {
log.info("username : {}, identityNumber : {}, phone : {}", username, identityNumber, phone);
} catch (Exception e) {
log.error("解密信息时出现异常", e);
throw new ApiException("解密異常");
throw new AdminServiceException("解密異常");
}
DeviceInfo deviceInfo = DeviceInfoContextHolder.get();
String deviceId = deviceInfo.getDeviceId();
@@ -68,7 +68,7 @@ public class FinancialFaceVerifyService extends AbstractCertifyService {
String ticket = record.getTicket();
InitFaceVerifyResponse.InitFaceVerifyResponseResultObject result = financialFaceVerify.initFaceVerify(ticket, username, identityNumber, returnUrl, metaInfo, phone, ipAddress, uid, certType, deviceId);
if (result == null) {
throw new ApiException("认证失败");
throw new AdminServiceException("认证失败");
}
String certifyId = result.getCertifyId();
record.setToken(certifyId);
@@ -84,7 +84,7 @@ public class FinancialFaceVerifyService extends AbstractCertifyService {
DescribeFaceVerifyResponse.DescribeFaceVerifyResponseResultObject responseResultObject = financialFaceVerify.describeFaceVerify(certifyId);
if (responseResultObject == null) {
log.error("callback responseResultObject is null, uid : {}, certifyId : {}, certType : {}, deviceId : {}", uid, certifyId, certType, deviceId);
throw new ApiException("认证失败");
throw new AdminServiceException("认证失败");
}
String passed = responseResultObject.getPassed();
updateCertifyResult(uid, certifyId, certType, passed.getBytes()[0], CERTIFY_RESULT_FOR_SUCCESS.equals(passed));

View File

@@ -1,7 +1,7 @@
package com.accompany.business.service.certification.aliyun;
import com.accompany.common.config.AliYunFinancialFaceConfig;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.aliyun.cloudauth20190307.models.DescribeFaceVerifyRequest;
@@ -49,7 +49,7 @@ public class FinancialFaceVerify {
if (String.valueOf(HttpStatus.OK.value()).equals(response.getCode())) {
return response.getResultObject();
} else {
throw new ApiException(Integer.parseInt(response.getCode()), response.getMessage());
throw new AdminServiceException(Integer.parseInt(response.getCode()), response.getMessage());
}
}

View File

@@ -30,7 +30,7 @@ import com.accompany.common.config.SystemConfig;
import com.accompany.common.constant.Attach;
import com.accompany.common.constant.Constant;
import com.accompany.common.device.DeviceInfo;
import com.accompany.common.exception.ApiException;
import com.accompany.core.exception.AdminServiceException;
import com.accompany.common.redis.RedisKey;
import com.accompany.common.status.BusiStatus;
import com.accompany.common.utils.DateTimeUtil;
@@ -187,7 +187,7 @@ public class FirstChargeRewardService extends BaseService {
private LimitFirstChargeConfig getLimitFirstChargeRewardConfig() {
String result = sysConfService.getSysConfValueById(Constant.SysConfId.LIMIT_FIRST_CHARGE_REWARD);
if (StringUtils.isBlank(result)) {
throw new ApiException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
throw new AdminServiceException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
}
LimitFirstChargeConfig config = JSONObject.parseObject(result, LimitFirstChargeConfig.class);
return config;
@@ -196,7 +196,7 @@ public class FirstChargeRewardService extends BaseService {
public FirstChargeRewardConfigVo getFirstChargeRewardConfig() {
String result = sysConfService.getSysConfValueById(Constant.SysConfId.FIRST_CHARGE_REWARD);
if (StringUtils.isBlank(result)) {
throw new ApiException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
throw new AdminServiceException(BusiStatus.ALREADY_NOTEXISTS_CONFIG);
}
return JSONObject.parseObject(result, FirstChargeRewardConfigVo.class);
}

View File

@@ -63,7 +63,7 @@ public class RedeemCodeService extends BaseService {
try {
// 加分布式锁,防止
if(StringUtils.isEmpty(lockVal)){
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
redeemCode = redeemCodeMapper.selectByPrimaryKey(code);

View File

@@ -83,7 +83,7 @@ public class VipChargeService {
}
ChargeProd chargeProd = params.getChargeProd();
if (null == chargeProd) {
throw new ServiceException(BusiStatus.SERVER_BUSY);
throw new ServiceException(BusiStatus.SERVERBUSY);
}
DeviceInfo deviceInfo = params.getDeviceInfo();
if (null == deviceInfo) {

Some files were not shown because too many files have changed in this diff Show More