Commit 5e076d76 authored by shiyu's avatar shiyu

下架商品取消最新的一条签到记录

parent 87f44acf
......@@ -628,14 +628,14 @@ public class SysSupplierItemServiceImpl implements SysSupplierItemService {
supplierItemRequestDto.setEndCreateTime(endDate);
supplierItemRequestDto.setCreatorId(oldItem.getCreatorId());
if (!supplierItemDao.isUploadItem(supplierItemRequestDto)) {
//没有其它发布的商品,如果用户今天签到了,则取消签到记录
UserSignIn todaySignIn = userSignInDao.findTodayRecord(oldItem.getCreatorId());
if (todaySignIn != null) {
//没有其它发布的商品,则取消用户最新的签到记录
UserSignIn lastedRecord = userSignInDao.findLastedRecord(oldItem.getCreatorId());
if (lastedRecord != null) {
UserSignIn updateDto = new UserSignIn();
updateDto.setId(todaySignIn.getId());
updateDto.setId(lastedRecord.getId());
updateDto.setIsValid(false);
userSignInDao.updateByPrimaryKey(updateDto);
msg = "您发布的" + oldItem.getName() + ",内容涉嫌违反平台规定,已被平台下架,并取消了今天的签到记录,请前往"+ url + "查看";
msg = "您发布的" + oldItem.getName() + ",因质量过差无法达到平台要求,已被平台下架,并作废最新的签到记录,请前往"+ url + "查看";
}
aliSmsSender.sendSms(oldItem.getCreatorId(), msg);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment