通告功能
This commit is contained in:
parent
9ca4197363
commit
004696ef2d
@ -76,15 +76,13 @@ public class BusiEvaluateController extends BaseController
|
||||
return success(busiEvaluateService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增评价
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('busi:evaluate:add')")
|
||||
|
||||
@Log(title = "评价", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusiEvaluate busiEvaluate)
|
||||
{
|
||||
return toAjax(busiEvaluateService.save(busiEvaluate));
|
||||
busiEvaluateService.saveVo(busiEvaluate);
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -115,8 +115,7 @@ public class BusiNoticeController extends BaseController
|
||||
|
||||
@Log(title = "通告", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusiNotice busiNotice)
|
||||
{
|
||||
public AjaxResult add(@RequestBody BusiNotice busiNotice) throws Exception {
|
||||
busiNoticeService.saveVo(busiNotice);
|
||||
return success();
|
||||
}
|
||||
|
||||
@ -54,5 +54,13 @@ public class BusiEvaluate extends DlBaseEntity
|
||||
/** 评价内容 */
|
||||
@Excel(name = "评价内容")
|
||||
private String evaluate;
|
||||
/**
|
||||
* 打分
|
||||
*/
|
||||
private String score;
|
||||
/**
|
||||
* 是否匿名评价0否1是
|
||||
*/
|
||||
private String isAnonymous;
|
||||
|
||||
}
|
||||
|
||||
@ -97,6 +97,8 @@ public class BusiNoticeSign extends DlBaseEntity
|
||||
private String accountName;
|
||||
@TableField(exist = false)
|
||||
private Long fansNum;
|
||||
@TableField(exist = false)
|
||||
private String indexUrl;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -26,4 +26,5 @@ public interface IBusiEvaluateService extends IService<BusiEvaluate> {
|
||||
* @date 14:16 2025/3/21
|
||||
**/
|
||||
List<BusiEvaluateVO> listByToUserId(Long userId);
|
||||
void saveVo(BusiEvaluate busiEvaluate);
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ public interface IBusiNoticeService extends IService<BusiNotice>
|
||||
* 保存
|
||||
* @param data 保存参数
|
||||
*/
|
||||
void saveVo(BusiNotice data);
|
||||
void saveVo(BusiNotice data) throws Exception;
|
||||
/**
|
||||
* 更新
|
||||
* @param data 保存参数
|
||||
|
||||
@ -8,6 +8,9 @@ import com.ruoyi.busi.domain.BusiEvaluate;
|
||||
import com.ruoyi.busi.mapper.BusiEvaluateMapper;
|
||||
import com.ruoyi.busi.service.IBusiEvaluateService;
|
||||
import com.ruoyi.busi.vo.BusiEvaluateVO;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.service.ISysUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -24,6 +27,8 @@ public class BusiEvaluateServiceImpl extends ServiceImpl<BusiEvaluateMapper,Busi
|
||||
{
|
||||
@Autowired
|
||||
private BusiEvaluateMapper busiEvaluateMapper;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
@Override
|
||||
public IPage<BusiEvaluate> queryListPage(BusiEvaluate pageReqVO, Page<BusiEvaluate> page) {
|
||||
@ -42,4 +47,13 @@ public class BusiEvaluateServiceImpl extends ServiceImpl<BusiEvaluateMapper,Busi
|
||||
public List<BusiEvaluateVO> listByToUserId(Long userId) {
|
||||
return busiEvaluateMapper.listByToUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveVo(BusiEvaluate busiEvaluate) {
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
SysUser sysUser = sysUserService.selectUserById(userId);
|
||||
busiEvaluate.setToUserId(sysUser.getUserId());
|
||||
busiEvaluate.setNickname(sysUser.getNickName());
|
||||
this.save(busiEvaluate);
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveVo(BusiNotice data) {
|
||||
public void saveVo(BusiNotice data) throws Exception {
|
||||
//获取当前登录用户
|
||||
data.setUserId(SecurityUtils.getUserId());
|
||||
if (StringUtils.isNotEmpty(data.getApprovalStatus())&&data.getApprovalStatus().equals("8")){
|
||||
@ -140,8 +140,18 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
memberPoints.setTitle("用户签到,送积分");
|
||||
memberPoints.setFromCode("fbgg");
|
||||
memberPointsService.savePoints(memberPoints);
|
||||
|
||||
}
|
||||
this.save(data);
|
||||
try {
|
||||
cardService.dealMemberRights(data.getUserId(),null,"add_notice",1);
|
||||
}catch (Exception e){
|
||||
memberCouponService.saveCoupon( data.getUserId(), "2", data.getId(), 1);
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(data.getCustomForm())) {
|
||||
cardService.dealMemberRights(data.getUserId(),null,"report_info_collect",1);
|
||||
}
|
||||
}
|
||||
//保存表单数据
|
||||
if (CollectionUtil.isNotEmpty(data.getCustomForm())){
|
||||
@ -232,15 +242,6 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
}else {
|
||||
this.saveVo(data);
|
||||
}
|
||||
try {
|
||||
cardService.dealMemberRights(userId,null,"add_notice",1);
|
||||
}catch (Exception e){
|
||||
memberCouponService.saveCoupon( userId, "2", data.getId(), 1);
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(data.getCustomForm())) {
|
||||
cardService.dealMemberRights(userId,null,"report_info_collect",1);
|
||||
}
|
||||
return data.getId();
|
||||
}
|
||||
|
||||
|
||||
@ -54,6 +54,10 @@ public class MemberBusiCard extends DlBaseEntity
|
||||
/** 账号昵称 */
|
||||
@Excel(name = "账号昵称")
|
||||
private String accountName;
|
||||
/**
|
||||
* 平台主页链接
|
||||
*/
|
||||
private String indexUrl;
|
||||
|
||||
/** 粉丝数量 */
|
||||
@Excel(name = "粉丝数量")
|
||||
|
||||
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="reportList" resultType="com.ruoyi.busi.domain.BusiNoticeSign">
|
||||
select sign.*,card.platform_name as platformName,
|
||||
card.account_name as accountName,card.fans_num as fansNum
|
||||
,card.platform_code as platformCode
|
||||
,card.platform_code as platformCode,card.index_url
|
||||
from dl_busi_notice_sign sign
|
||||
inner join dl_member_busi_card card on sign.card_id = card.id
|
||||
<where>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user