update 工单系统,客服回复空格丢失问题 。挖矿账户钱包总余额展示
This commit is contained in:
parent
a51771db2e
commit
0857913e54
|
@ -22,6 +22,7 @@ import com.m2pool.system.api.RemoteUserService;
|
|||
import com.m2pool.system.api.entity.SysUser;
|
||||
import io.jsonwebtoken.lang.Collections;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.messaging.simp.user.SimpUser;
|
||||
import org.springframework.messaging.simp.user.SimpUserRegistry;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
@ -95,8 +96,8 @@ public class ChatRoomServiceImpl extends ServiceImpl<ChatRoomMapper, ChatRoom> i
|
|||
int i = random.nextInt(customerEmails.size());
|
||||
String email = customerEmails.get(i);
|
||||
customerEmails.removeIf(email1 -> !checkOnline(email1));
|
||||
System.out.println("bby-在线的客服"+customerEmails + "初始化分配的客服"+email+"聊天室信息"+roomByUserEmail);
|
||||
if(roomByUserEmail != null){
|
||||
System.out.println("bby-在线的客服"+customerEmails + "初始化分配的客服"+email+"聊天室信息"+roomByUserEmail);
|
||||
//1.1 客服在线,并且在客服列表
|
||||
if (checkOnline(roomByUserEmail.getUserEmail()) && customerEmails.contains(roomByUserEmail.getUserEmail())) {
|
||||
roomByUserEmail.setCustomerIsOnline(true);
|
||||
|
@ -127,6 +128,7 @@ public class ChatRoomServiceImpl extends ServiceImpl<ChatRoomMapper, ChatRoom> i
|
|||
List<SysUser> data = remoteUserService.getCSList().getData();
|
||||
List<String> emails = data.stream().map(SysUser::getEmail).collect(Collectors.toList());
|
||||
emails.removeIf(email1 -> !checkOnline(email1));
|
||||
|
||||
//如果当前没有客服角色账号,使用nacos 默认配置中的客服角色
|
||||
if(Collections.isEmpty(emails)){
|
||||
emails = customerEmails;
|
||||
|
@ -135,8 +137,8 @@ public class ChatRoomServiceImpl extends ServiceImpl<ChatRoomMapper, ChatRoom> i
|
|||
return R.fail("您作为管理员无法创建与自己的连接");
|
||||
}
|
||||
}
|
||||
System.out.println("bby-在线的客服-创建聊天室emails"+emails);
|
||||
boolean customerIsOnline = false;
|
||||
|
||||
//有在线客服,再次分配给在线的客服
|
||||
if (!emails.isEmpty()){
|
||||
customerIsOnline = true;
|
||||
|
|
|
@ -91,5 +91,9 @@ public interface ManageBroadcastMapper extends BaseMapper<ManageBroadcast> {
|
|||
|
||||
|
||||
@DistributionDB
|
||||
BigDecimal getAccountBalance(@Param("user") String user, @Param("coin") String coin);
|
||||
BigDecimal getAccountIncome(@Param("user") String user, @Param("coin") String coin);
|
||||
|
||||
|
||||
@DistributionDB
|
||||
BigDecimal getAccountExpend(@Param("user") String user, @Param("coin") String coin);
|
||||
}
|
||||
|
|
|
@ -97,8 +97,11 @@ public class ManageUserServiceImpl implements ManageUserService {
|
|||
|
||||
@Override
|
||||
public R<WalletEarningsInfoDto> getUserInfo(ManageUserInfoVo manageUserInfoVo) {
|
||||
//获取账户余额
|
||||
BigDecimal accountBalance = manageBroadcastMapper.getAccountBalance(manageUserInfoVo.getMinerUser(), manageUserInfoVo.getCoin());
|
||||
//获取账户余额 = 收入 - 支出
|
||||
BigDecimal accountIncome = manageBroadcastMapper.getAccountIncome(manageUserInfoVo.getMinerUser(), manageUserInfoVo.getCoin());
|
||||
BigDecimal accountExpend = manageBroadcastMapper.getAccountExpend(manageUserInfoVo.getMinerUser(), manageUserInfoVo.getCoin());
|
||||
BigDecimal accountBalance = accountIncome.subtract(accountExpend);
|
||||
|
||||
//获取挖矿账户历史收益记录
|
||||
List<ManageUserInfoDto> walletInInfo = manageBroadcastMapper.getUserInfo(manageUserInfoVo.getMinerUser(), manageUserInfoVo.getCoin(), manageUserInfoVo.getStartDate(), manageUserInfoVo.getEndDate());
|
||||
//获取挖矿账户历史地址
|
||||
|
|
|
@ -12,10 +12,10 @@ import lombok.Data;
|
|||
@Data
|
||||
@ApiModel(value = "分页请求对象")
|
||||
public class PageVo {
|
||||
@ApiModelProperty(value = "当前页码",example = "1")
|
||||
private Integer pageNum;
|
||||
@ApiModelProperty(value = "当前页码 (默认为1)",example = "1")
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页条数",example = "20")
|
||||
private Integer pageSize;
|
||||
@ApiModelProperty(value = "每页条数(默认为20)",example = "20")
|
||||
private Integer pageSize = 20;
|
||||
|
||||
}
|
||||
|
|
|
@ -132,13 +132,21 @@
|
|||
manage_broadcast
|
||||
where del =false
|
||||
</select>
|
||||
<select id="getAccountBalance" resultType="java.math.BigDecimal">
|
||||
<select id="getAccountIncome" resultType="java.math.BigDecimal">
|
||||
SELECT
|
||||
SUM(amount)
|
||||
COALESCE(SUM(amount), 0)
|
||||
FROM
|
||||
wallet_in
|
||||
where
|
||||
coin = #{coin} AND `user` = #{user} AND state = 0
|
||||
coin = #{coin} AND `user` = #{user}
|
||||
</select>
|
||||
<select id="getAccountExpend" resultType="java.math.BigDecimal">
|
||||
SELECT
|
||||
COALESCE(SUM(amount), 0)
|
||||
FROM
|
||||
wallet_outv2
|
||||
where
|
||||
coin = #{coin} AND `user` = #{user}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -528,7 +528,7 @@ public class TicketServiceImpl implements TicketService {
|
|||
}
|
||||
|
||||
vo.setFiles(StringUtils.clean(vo.getFiles()));
|
||||
vo.setRespon(StringUtils.clean(vo.getRespon()));
|
||||
vo.setRespon(vo.getRespon());
|
||||
|
||||
String video="";
|
||||
String audio="";
|
||||
|
|
Loading…
Reference in New Issue