Merge branch 'master' of http://192.168.1.26:3000/dianliang/dl_admin
This commit is contained in:
commit
047ec6797d
@ -76,15 +76,13 @@ public class BusiEvaluateController extends BaseController
|
|||||||
return success(busiEvaluateService.getById(id));
|
return success(busiEvaluateService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 新增评价
|
|
||||||
*/
|
|
||||||
@PreAuthorize("@ss.hasPermi('busi:evaluate:add')")
|
|
||||||
@Log(title = "评价", businessType = BusinessType.INSERT)
|
@Log(title = "评价", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody BusiEvaluate busiEvaluate)
|
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)
|
@Log(title = "通告", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody BusiNotice busiNotice)
|
public AjaxResult add(@RequestBody BusiNotice busiNotice) throws Exception {
|
||||||
{
|
|
||||||
busiNoticeService.saveVo(busiNotice);
|
busiNoticeService.saveVo(busiNotice);
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -76,7 +76,7 @@ public class BusiNoticeSignController extends BaseController
|
|||||||
Page<BusiNoticeSign> page = new Page<>(1, 5000);
|
Page<BusiNoticeSign> page = new Page<>(1, 5000);
|
||||||
List<BusiNoticeSign> records = noticeService.reportList(query, page).getRecords();
|
List<BusiNoticeSign> records = noticeService.reportList(query, page).getRecords();
|
||||||
ExcelUtil<BusiNoticeSign> util = new ExcelUtil<BusiNoticeSign>(BusiNoticeSign.class);
|
ExcelUtil<BusiNoticeSign> util = new ExcelUtil<BusiNoticeSign>(BusiNoticeSign.class);
|
||||||
util.exportExcel(response, records, "通告:"+notice.getTitle()+"报名名称");
|
util.exportExcel(response, records, "通告-"+notice.getTitle()+"报名名称");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -54,5 +54,13 @@ public class BusiEvaluate extends DlBaseEntity
|
|||||||
/** 评价内容 */
|
/** 评价内容 */
|
||||||
@Excel(name = "评价内容")
|
@Excel(name = "评价内容")
|
||||||
private String evaluate;
|
private String evaluate;
|
||||||
|
/**
|
||||||
|
* 打分
|
||||||
|
*/
|
||||||
|
private String score;
|
||||||
|
/**
|
||||||
|
* 是否匿名评价0否1是
|
||||||
|
*/
|
||||||
|
private String isAnonymous;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -97,6 +97,8 @@ public class BusiNoticeSign extends DlBaseEntity
|
|||||||
private String accountName;
|
private String accountName;
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Long fansNum;
|
private Long fansNum;
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String indexUrl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -37,6 +37,9 @@ public class BusiNoticeQuery {
|
|||||||
//审核备注
|
//审核备注
|
||||||
private String approvalRemark;
|
private String approvalRemark;
|
||||||
private String bloggerTypes;
|
private String bloggerTypes;
|
||||||
|
/** 是否急招(0 否 | 1是) */
|
||||||
|
private String isUrgent;
|
||||||
|
private String isPlatformFree;
|
||||||
/** 查询条件 */
|
/** 查询条件 */
|
||||||
private JSONObject params =new JSONObject();
|
private JSONObject params =new JSONObject();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,4 +26,5 @@ public interface IBusiEvaluateService extends IService<BusiEvaluate> {
|
|||||||
* @date 14:16 2025/3/21
|
* @date 14:16 2025/3/21
|
||||||
**/
|
**/
|
||||||
List<BusiEvaluateVO> listByToUserId(Long userId);
|
List<BusiEvaluateVO> listByToUserId(Long userId);
|
||||||
|
void saveVo(BusiEvaluate busiEvaluate);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,7 +41,7 @@ public interface IBusiNoticeService extends IService<BusiNotice>
|
|||||||
* 保存
|
* 保存
|
||||||
* @param data 保存参数
|
* @param data 保存参数
|
||||||
*/
|
*/
|
||||||
void saveVo(BusiNotice data);
|
void saveVo(BusiNotice data) throws Exception;
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
* @param data 保存参数
|
* @param data 保存参数
|
||||||
|
|||||||
@ -8,6 +8,9 @@ import com.ruoyi.busi.domain.BusiEvaluate;
|
|||||||
import com.ruoyi.busi.mapper.BusiEvaluateMapper;
|
import com.ruoyi.busi.mapper.BusiEvaluateMapper;
|
||||||
import com.ruoyi.busi.service.IBusiEvaluateService;
|
import com.ruoyi.busi.service.IBusiEvaluateService;
|
||||||
import com.ruoyi.busi.vo.BusiEvaluateVO;
|
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.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -24,6 +27,8 @@ public class BusiEvaluateServiceImpl extends ServiceImpl<BusiEvaluateMapper,Busi
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private BusiEvaluateMapper busiEvaluateMapper;
|
private BusiEvaluateMapper busiEvaluateMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage<BusiEvaluate> queryListPage(BusiEvaluate pageReqVO, Page<BusiEvaluate> page) {
|
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) {
|
public List<BusiEvaluateVO> listByToUserId(Long userId) {
|
||||||
return busiEvaluateMapper.listByToUserId(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 通告对象
|
* @param data 通告对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void saveVo(BusiNotice data) {
|
public void saveVo(BusiNotice data) throws Exception {
|
||||||
//获取当前登录用户
|
//获取当前登录用户
|
||||||
data.setUserId(SecurityUtils.getUserId());
|
data.setUserId(SecurityUtils.getUserId());
|
||||||
if (StringUtils.isNotEmpty(data.getApprovalStatus())&&data.getApprovalStatus().equals("8")){
|
if (StringUtils.isNotEmpty(data.getApprovalStatus())&&data.getApprovalStatus().equals("8")){
|
||||||
@ -140,8 +140,18 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
memberPoints.setTitle("用户签到,送积分");
|
memberPoints.setTitle("用户签到,送积分");
|
||||||
memberPoints.setFromCode("fbgg");
|
memberPoints.setFromCode("fbgg");
|
||||||
memberPointsService.savePoints(memberPoints);
|
memberPointsService.savePoints(memberPoints);
|
||||||
|
|
||||||
}
|
}
|
||||||
this.save(data);
|
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())){
|
if (CollectionUtil.isNotEmpty(data.getCustomForm())){
|
||||||
@ -211,7 +221,7 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public String saveOrUpdateVo(BusiNotice data) throws Exception {
|
public String saveOrUpdateVo(BusiNotice data) throws Exception {
|
||||||
//获取当前登录用户id
|
//获取当前登录用户id
|
||||||
Long userId = SecurityUtils.getUserId();
|
Long userId = SecurityUtils.getUserId();
|
||||||
@ -232,15 +242,6 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
}else {
|
}else {
|
||||||
this.saveVo(data);
|
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();
|
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);
|
res.put("passSign",true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -54,6 +54,10 @@ public class MemberBusiCard extends DlBaseEntity
|
|||||||
/** 账号昵称 */
|
/** 账号昵称 */
|
||||||
@Excel(name = "账号昵称")
|
@Excel(name = "账号昵称")
|
||||||
private String accountName;
|
private String accountName;
|
||||||
|
/**
|
||||||
|
* 平台主页链接
|
||||||
|
*/
|
||||||
|
private String indexUrl;
|
||||||
|
|
||||||
/** 粉丝数量 */
|
/** 粉丝数量 */
|
||||||
@Excel(name = "粉丝数量")
|
@Excel(name = "粉丝数量")
|
||||||
|
|||||||
@ -299,9 +299,9 @@ order by dbns.create_time desc
|
|||||||
count(sign.id) as reportNum,
|
count(sign.id) as reportNum,
|
||||||
mySign.create_time as signTime,
|
mySign.create_time as signTime,
|
||||||
CASE
|
CASE
|
||||||
WHEN mySign.status = '0' AND dbn.end_date >= CURDATE() THEN '审核中'
|
WHEN mySign.status = '01' AND dbn.end_date >= CURDATE() THEN '审核中'
|
||||||
WHEN mySign.status = '1' THEN '已通过'
|
WHEN mySign.status = '02' THEN '已通过'
|
||||||
WHEN mySign.status = '0' AND dbn.end_date < CURDATE() THEN '未合作'
|
WHEN mySign.status = '01' AND dbn.end_date < CURDATE() THEN '未合作'
|
||||||
ELSE '已过期'
|
ELSE '已过期'
|
||||||
END AS signStatus
|
END AS signStatus
|
||||||
FROM
|
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 dl_busi_notice_view dbnv ON dbn.id = dbnv.id
|
||||||
LEFT JOIN sys_user su ON dbn.user_id = su.user_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
|
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
|
WHERE
|
||||||
dbn.del_flag = 0
|
dbn.del_flag = 0
|
||||||
AND (dbn.approval_status = '1')
|
AND (dbn.approval_status = '1')
|
||||||
<if test="entity.reportStatus!=null and entity.reportStatus!='' ">
|
<if test="entity.reportStatus!=null and entity.reportStatus!='' ">
|
||||||
<choose>
|
<choose>
|
||||||
<when test="entity.reportStatus=='审核中'">
|
<when test="entity.reportStatus=='审核中'">
|
||||||
and mySign.status ='0' and dbn.end_date >= CURDATE()
|
and mySign.status ='01' and dbn.end_date >= CURDATE()
|
||||||
</when>
|
</when>
|
||||||
<when test="entity.reportStatus=='已通过'">
|
<when test="entity.reportStatus=='已通过'">
|
||||||
and mySign.status ='1'
|
and mySign.status ='02'
|
||||||
</when>
|
</when>
|
||||||
<when test="entity.reportStatus=='未合作'">
|
<when test="entity.reportStatus=='未合作'">
|
||||||
and mySign.status ='0' and dbn.end_date < CURDATE()
|
and mySign.status ='01' and dbn.end_date < CURDATE()
|
||||||
</when>
|
</when>
|
||||||
|
|
||||||
</choose>
|
</choose>
|
||||||
|
|||||||
@ -58,7 +58,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<select id="reportList" resultType="com.ruoyi.busi.domain.BusiNoticeSign">
|
<select id="reportList" resultType="com.ruoyi.busi.domain.BusiNoticeSign">
|
||||||
select sign.*,card.platform_name as platformName,
|
select sign.*,card.platform_name as platformName,
|
||||||
card.account_name as accountName,card.fans_num as fansNum
|
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
|
from dl_busi_notice_sign sign
|
||||||
inner join dl_member_busi_card card on sign.card_id = card.id
|
inner join dl_member_busi_card card on sign.card_id = card.id
|
||||||
<where>
|
<where>
|
||||||
|
|||||||
@ -118,6 +118,7 @@ public class SecurityConfig
|
|||||||
// 静态资源,可匿名访问
|
// 静态资源,可匿名访问
|
||||||
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
|
||||||
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
|
||||||
|
.antMatchers("/cos/sts").permitAll()
|
||||||
// 除上面外的所有请求全部需要鉴权认证
|
// 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated();
|
.anyRequest().authenticated();
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user