Merge branch 'master' of http://192.168.1.26:3000/dianliang/dl_admin
This commit is contained in:
commit
047ec6797d
@ -28,7 +28,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 评价Controller
|
||||
*
|
||||
*
|
||||
* @author 朱春云
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
@ -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();
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public class BusiNoticeSignController extends BaseController
|
||||
Page<BusiNoticeSign> page = new Page<>(1, 5000);
|
||||
List<BusiNoticeSign> records = noticeService.reportList(query, page).getRecords();
|
||||
ExcelUtil<BusiNoticeSign> util = new ExcelUtil<BusiNoticeSign>(BusiNoticeSign.class);
|
||||
util.exportExcel(response, records, "通告:"+notice.getTitle()+"报名名称");
|
||||
util.exportExcel(response, records, "通告-"+notice.getTitle()+"报名名称");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,7 +9,7 @@ import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 评价对象 dl_busi_evaluate
|
||||
*
|
||||
*
|
||||
* @author 朱春云
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
@ -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;
|
||||
|
||||
|
||||
|
||||
|
@ -37,6 +37,9 @@ public class BusiNoticeQuery {
|
||||
//审核备注
|
||||
private String approvalRemark;
|
||||
private String bloggerTypes;
|
||||
/** 是否急招(0 否 | 1是) */
|
||||
private String isUrgent;
|
||||
private String isPlatformFree;
|
||||
/** 查询条件 */
|
||||
private JSONObject params =new JSONObject();
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
@ -15,7 +18,7 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 评价Service业务层处理
|
||||
*
|
||||
*
|
||||
* @author 朱春云
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -100,8 +100,8 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
* @param data 通告对象
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public void saveVo(BusiNotice data) {
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
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())){
|
||||
@ -211,7 +221,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String saveOrUpdateVo(BusiNotice data) throws Exception {
|
||||
//获取当前登录用户id
|
||||
Long userId = SecurityUtils.getUserId();
|
||||
@ -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();
|
||||
}
|
||||
|
||||
@ -473,7 +474,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
||||
}
|
||||
|
||||
//当前用户是否已通过当前报名
|
||||
if(busiNoticeSignMapper.selectOne(new LambdaQueryWrapper<BusiNoticeSign>().eq(BusiNoticeSign::getNoticeId, noticeId).eq(BusiNoticeSign::getUserId, userId).eq(BusiNoticeSign::getStatus,"1").last("limit 1"))!=null){
|
||||
if(busiNoticeSignMapper.selectOne(new LambdaQueryWrapper<BusiNoticeSign>().eq(BusiNoticeSign::getNoticeId, noticeId).eq(BusiNoticeSign::getUserId, userId).eq(BusiNoticeSign::getStatus,"02").last("limit 1"))!=null){
|
||||
res.put("passSign",true);
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ import com.ruoyi.common.core.domain.DlBaseEntity;
|
||||
|
||||
/**
|
||||
* 博主名片对象 dl_member_busi_card
|
||||
*
|
||||
*
|
||||
* @author pqz
|
||||
* @date 2025-03-17
|
||||
*/
|
||||
@ -54,6 +54,10 @@ public class MemberBusiCard extends DlBaseEntity
|
||||
/** 账号昵称 */
|
||||
@Excel(name = "账号昵称")
|
||||
private String accountName;
|
||||
/**
|
||||
* 平台主页链接
|
||||
*/
|
||||
private String indexUrl;
|
||||
|
||||
/** 粉丝数量 */
|
||||
@Excel(name = "粉丝数量")
|
||||
|
@ -299,9 +299,9 @@ order by dbns.create_time desc
|
||||
count(sign.id) as reportNum,
|
||||
mySign.create_time as signTime,
|
||||
CASE
|
||||
WHEN mySign.status = '0' AND dbn.end_date >= CURDATE() THEN '审核中'
|
||||
WHEN mySign.status = '1' THEN '已通过'
|
||||
WHEN mySign.status = '0' AND dbn.end_date < CURDATE() THEN '未合作'
|
||||
WHEN mySign.status = '01' AND dbn.end_date >= CURDATE() THEN '审核中'
|
||||
WHEN mySign.status = '02' THEN '已通过'
|
||||
WHEN mySign.status = '01' AND dbn.end_date < CURDATE() THEN '未合作'
|
||||
ELSE '已过期'
|
||||
END AS signStatus
|
||||
FROM
|
||||
@ -309,20 +309,20 @@ order by dbns.create_time desc
|
||||
LEFT JOIN dl_busi_notice_view dbnv ON dbn.id = dbnv.id
|
||||
LEFT JOIN sys_user su ON dbn.user_id = su.user_id
|
||||
LEFT join dl_busi_notice_sign sign on sign.notice_id = dbn.id and sign.del_flag = 0
|
||||
inner join dl_busi_notice_sign mySign on sign.notice_id = dbn.id and sign.del_flag = 0 and sign.user_id = #{entity.userId}
|
||||
inner join dl_busi_notice_sign mySign on dbn.id = mySign.notice_id and dbn.del_flag = 0 and mySign.user_id = #{entity.userId}
|
||||
WHERE
|
||||
dbn.del_flag = 0
|
||||
AND (dbn.approval_status = '1')
|
||||
<if test="entity.reportStatus!=null and entity.reportStatus!='' ">
|
||||
<choose>
|
||||
<when test="entity.reportStatus=='审核中'">
|
||||
and mySign.status ='0' and dbn.end_date >= CURDATE()
|
||||
and mySign.status ='01' and dbn.end_date >= CURDATE()
|
||||
</when>
|
||||
<when test="entity.reportStatus=='已通过'">
|
||||
and mySign.status ='1'
|
||||
and mySign.status ='02'
|
||||
</when>
|
||||
<when test="entity.reportStatus=='未合作'">
|
||||
and mySign.status ='0' and dbn.end_date < CURDATE()
|
||||
and mySign.status ='01' and dbn.end_date < CURDATE()
|
||||
</when>
|
||||
|
||||
</choose>
|
||||
|
@ -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>
|
||||
|
@ -23,7 +23,7 @@ import com.ruoyi.framework.security.handle.LogoutSuccessHandlerImpl;
|
||||
|
||||
/**
|
||||
* spring security配置
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@EnableMethodSecurity(prePostEnabled = true, securedEnabled = true)
|
||||
@ -35,7 +35,7 @@ public class SecurityConfig
|
||||
*/
|
||||
@Autowired
|
||||
private UserDetailsService userDetailsService;
|
||||
|
||||
|
||||
/**
|
||||
* 认证失败处理类
|
||||
*/
|
||||
@ -53,7 +53,7 @@ public class SecurityConfig
|
||||
*/
|
||||
@Autowired
|
||||
private JwtAuthenticationTokenFilter authenticationTokenFilter;
|
||||
|
||||
|
||||
/**
|
||||
* 跨域过滤器
|
||||
*/
|
||||
@ -118,6 +118,7 @@ public class SecurityConfig
|
||||
// 静态资源,可匿名访问
|
||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||
.antMatchers("/cos/sts").permitAll()
|
||||
// 除上面外的所有请求全部需要鉴权认证
|
||||
.anyRequest().authenticated();
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user