bug修复
This commit is contained in:
parent
d7474209c0
commit
7f0bcc9c2a
@ -116,8 +116,7 @@ public class BusiNoticeController extends BaseController
|
|||||||
@Log(title = "通告", businessType = BusinessType.INSERT)
|
@Log(title = "通告", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody BusiNotice busiNotice) throws Exception {
|
public AjaxResult add(@RequestBody BusiNotice busiNotice) throws Exception {
|
||||||
busiNoticeService.saveVo(busiNotice);
|
return success( busiNoticeService.saveVo(busiNotice));
|
||||||
return success();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -41,7 +41,7 @@ public interface IBusiNoticeService extends IService<BusiNotice>
|
|||||||
* 保存
|
* 保存
|
||||||
* @param data 保存参数
|
* @param data 保存参数
|
||||||
*/
|
*/
|
||||||
void saveVo(BusiNotice data) throws Exception;
|
JSONObject saveVo(BusiNotice data) throws Exception;
|
||||||
/**
|
/**
|
||||||
* 更新
|
* 更新
|
||||||
* @param data 保存参数
|
* @param data 保存参数
|
||||||
|
@ -114,12 +114,17 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
* @param data 通告对象
|
* @param data 通告对象
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void saveVo(BusiNotice data) throws Exception {
|
public JSONObject saveVo(BusiNotice data) throws Exception {
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
result.put("code",0);
|
||||||
|
result.put("msg","自动审核通过,发布成功");
|
||||||
//获取当前登录用户
|
//获取当前登录用户
|
||||||
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")){
|
||||||
//草稿数据直接保存
|
//草稿数据直接保存
|
||||||
this.save(data);
|
this.save(data);
|
||||||
|
result.put("code",100);
|
||||||
|
result.put("msg","草稿数据暂存成功");
|
||||||
}else {
|
}else {
|
||||||
//判断 内容重复度 是否大于70%
|
//判断 内容重复度 是否大于70%
|
||||||
//先获取 当前系统中截止日期之前的
|
//先获取 当前系统中截止日期之前的
|
||||||
@ -143,6 +148,8 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
data.setApprovalStatus("0");
|
data.setApprovalStatus("0");
|
||||||
data.setApprovalTime(null);
|
data.setApprovalTime(null);
|
||||||
data.setSimilarityIds(Optional.ofNullable(data.getSimilarityIds()).orElse("")+busiNotice.getId()+",");
|
data.setSimilarityIds(Optional.ofNullable(data.getSimilarityIds()).orElse("")+busiNotice.getId()+",");
|
||||||
|
result.put("code",500);
|
||||||
|
result.put("msg","该通告已被人抢先一步上传,等待平台审核");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotEmpty(data.getSimilarityIds())){
|
if (StringUtils.isNotEmpty(data.getSimilarityIds())){
|
||||||
@ -187,8 +194,8 @@ public class BusiNoticeServiceImpl extends ServiceImpl<BusiNoticeMapper,BusiNoti
|
|||||||
//进行模版消息通知
|
//进行模版消息通知
|
||||||
sendNoticeMsg(data);
|
sendNoticeMsg(data);
|
||||||
}
|
}
|
||||||
|
result.put("noticeId",data.getId());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,4 +168,14 @@ public class MemberUserController extends BaseController {
|
|||||||
memberUserService.sendNewGift();
|
memberUserService.sendNewGift();
|
||||||
return success();
|
return success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否领取过新人好礼
|
||||||
|
*/
|
||||||
|
@Log(title = "判断是否领取过新人好礼", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/isGetGift")
|
||||||
|
public AjaxResult isGetGift() {
|
||||||
|
|
||||||
|
return success(memberUserService.isGetGift());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,6 +76,10 @@ public class MemberUser extends DlBaseEntity
|
|||||||
* 博主剩余报名次数
|
* 博主剩余报名次数
|
||||||
*/
|
*/
|
||||||
private Long sendReportNum;
|
private Long sendReportNum;
|
||||||
|
/**
|
||||||
|
* 判断是否领过0否1是
|
||||||
|
*/
|
||||||
|
private String isGetGift;
|
||||||
|
|
||||||
|
|
||||||
public MemberUser (String userType, SysUser user,Integer addNotice){
|
public MemberUser (String userType, SysUser user,Integer addNotice){
|
||||||
|
@ -88,5 +88,9 @@ public interface IMemberUserService extends IService<MemberUser> {
|
|||||||
**/
|
**/
|
||||||
String gzhLogin(String wxOpenId, JSONObject userInfo);
|
String gzhLogin(String wxOpenId, JSONObject userInfo);
|
||||||
void sendNewGift();
|
void sendNewGift();
|
||||||
|
/**
|
||||||
|
* 判断是否领取过新人好礼
|
||||||
|
*/
|
||||||
|
Object isGetGift();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -330,7 +330,17 @@ public class MemberUserServiceImpl extends ServiceImpl<MemberUserMapper, MemberU
|
|||||||
//博主,通告主基本信息
|
//博主,通告主基本信息
|
||||||
MemberUserVO result = memberUserMapper.queryByUserId(userId, "02");
|
MemberUserVO result = memberUserMapper.queryByUserId(userId, "02");
|
||||||
result.setSendReportNum(result.getSendReportNum()+sendReportNum);
|
result.setSendReportNum(result.getSendReportNum()+sendReportNum);
|
||||||
|
result.setIsGetGift("1");
|
||||||
memberUserMapper.updateById(result);
|
memberUserMapper.updateById(result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* 判断是否领取过新人好礼
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Object isGetGift() {
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
MemberUserVO result = memberUserMapper.queryByUserId(userId, "02");
|
||||||
|
return result.getIsGetGift();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user