|
|
|
@ -10,6 +10,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper; |
|
|
|
import com.google.gson.Gson; |
|
|
|
import lombok.extern.log4j.Log4j2; |
|
|
|
import org.apache.commons.fileupload.FileItem; |
|
|
|
import org.apache.commons.fileupload.disk.DiskFileItemFactory; |
|
|
|
import org.apache.commons.lang.StringUtils; |
|
|
|
@ -24,6 +25,7 @@ import org.jeecg.common.api.vo.Result; |
|
|
|
import org.jeecg.common.system.vo.LoginUser; |
|
|
|
import org.jeecg.common.util.RedisUtil; |
|
|
|
import org.jeecg.config.shiro.ShiroRealm; |
|
|
|
import org.jeecg.modules.api.Final.CommitTypeFinal; |
|
|
|
import org.jeecg.modules.api.bean.HttpClientUtil; |
|
|
|
import org.jeecg.modules.api.bean.PageBean; |
|
|
|
import org.jeecg.modules.api.bean.WxQrCodeVo; |
|
|
|
@ -31,6 +33,7 @@ import org.jeecg.modules.api.service.YaoDuApiService; |
|
|
|
import org.jeecg.modules.api.utils.WxTemplateUtil; |
|
|
|
import org.jeecg.modules.appletBrowseRecord.entity.AppletBrowseRecord; |
|
|
|
import org.jeecg.modules.appletBrowseRecord.service.IAppletBrowseRecordService; |
|
|
|
import org.jeecg.modules.homeGroup.service.IHomeGroupService; |
|
|
|
import org.jeecg.modules.message.handle.impl.EmailSendMsgHandle; |
|
|
|
import org.jeecg.modules.api.utils.CommentNotificationUtil; |
|
|
|
import org.jeecg.modules.citiyClass.entity.CitiyClass; |
|
|
|
@ -113,6 +116,7 @@ import java.time.LocalTime; |
|
|
|
import java.time.ZoneId; |
|
|
|
import java.util.*; |
|
|
|
|
|
|
|
@Log4j2 |
|
|
|
@Service |
|
|
|
public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
|
|
|
|
@ -143,6 +147,9 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
//获取兼职信息列表 |
|
|
|
@Resource |
|
|
|
private ICityJobService cityJobService; |
|
|
|
//获取兼职信息列表 |
|
|
|
@Resource |
|
|
|
private IHomeGroupService homeGroupService; |
|
|
|
//获取门店信息列表 |
|
|
|
@Resource |
|
|
|
private ICityShopService cityShopService; |
|
|
|
@ -1171,7 +1178,14 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
} |
|
|
|
|
|
|
|
// 使用评论通知工具类发送通知 |
|
|
|
commentNotificationUtil.sendCommentNotification(member, hanHaiMember, content, ""); |
|
|
|
commentNotificationUtil.sendCommentNotification(member, hanHaiMember, content, CommitTypeFinal.getPageParams(cityComment), cityComment.getType()); |
|
|
|
|
|
|
|
//发布评论给作者 |
|
|
|
try { |
|
|
|
commentNotificationUtil.sendCommentNotification(getUserByCommit(cityComment), hanHaiMember, content, CommitTypeFinal.getPageParams(cityComment), cityComment.getType()); |
|
|
|
}catch (Exception e){ |
|
|
|
log.error("发布评论给作者失败 {}", e); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
@ -1202,6 +1216,31 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
return Result.OK("评论成功"); |
|
|
|
} |
|
|
|
|
|
|
|
public HanHaiMember getUserByCommit(CityComment comment){ |
|
|
|
String userId = null; |
|
|
|
//type-0帖子-1租房-2工作-3景点-4美食-5活动-6人找车-7车找人-8文章 |
|
|
|
if ("0".equals(comment.getType())){ |
|
|
|
userId = cityTrendsService.getById(comment.getOrderId()).getUserId(); |
|
|
|
}else if ("1".equals(comment.getType())){ |
|
|
|
userId = cityHomeService.getById(comment.getOrderId()).getUserId(); |
|
|
|
}else if ("2".equals(comment.getType())){ |
|
|
|
userId = cityJobService.getById(comment.getOrderId()).getUserId(); |
|
|
|
}else if ("3".equals(comment.getType())){ |
|
|
|
return null; |
|
|
|
}else if ("4".equals(comment.getType())){ |
|
|
|
return null; |
|
|
|
}else if ("5".equals(comment.getType())){ |
|
|
|
return null; |
|
|
|
} else if ("6".equals(comment.getType())) { |
|
|
|
return null; |
|
|
|
} else if ("7".equals(comment.getType())) { |
|
|
|
return null; |
|
|
|
} else if ("8".equals(comment.getType())) { |
|
|
|
userId = homeGroupService.getById(comment.getOrderId()).getUserId(); |
|
|
|
} |
|
|
|
return hanHaiMemberService.getById(userId); |
|
|
|
} |
|
|
|
|
|
|
|
//删除评论 |
|
|
|
public Result<?> deleteComment(String token,String id) { |
|
|
|
HanHaiMember hanHaiMember = shiroRealm.checkUserTokenIsEffectHanHaiOpenId(token); |
|
|
|
@ -1682,6 +1721,8 @@ public class YaoDuApiServiceImpl implements YaoDuApiService { |
|
|
|
.lambdaQuery() |
|
|
|
.eq(CityConf::getKeyIcon, "withdraw_money") |
|
|
|
.one(); |
|
|
|
|
|
|
|
|
|
|
|
//得到提现手续费 |
|
|
|
BigDecimal money = cityConf.getKeyMoney(); |
|
|
|
money = money.multiply(bean.getPrice()); |
|
|
|
|