Skip to content

Commit

Permalink
Merge pull request #310 from cheng521521/main
Browse files Browse the repository at this point in the history
feat: add outline for updating share
  • Loading branch information
cheng521521 authored Dec 17, 2024
2 parents 5edc159 + e17a0d2 commit 29c1d71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
11 changes: 1 addition & 10 deletions src/main/java/com/dl/officialsite/sharing/SharingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.persistence.criteria.Predicate;
import javax.servlet.http.HttpServletRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
Expand All @@ -58,9 +57,6 @@ public class SharingService {
@Autowired
private ServerConfigRepository serverConfigRepository;

@Autowired(required = true)
private HttpServletRequest request;

@Autowired
TeamService teamService;

Expand Down Expand Up @@ -164,14 +160,9 @@ public void updateSharing(UpdateSharingReq req, String address) {
sharing.setYoutubeLink(req.getYoutubeLink());
sharing.setTag(req.getTag());
sharing.setCourseId(req.getCourseId());
sharing.setOutline(req.getOutline());

this.sharingRepository.save(sharing);
/* SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
String formatDate = format.format(req.getDate());
applicationContext.publishEvent(new EventNotify(Member.class, BotEnum.TELEGRAM,
ChannelEnum.SHARING,
NotifyMessageFactory.sharingMessage("‼️‼️Edit Share Info‼️‼️", member.getNickName(), req.getTheme(),
formatDate)));*/
} else {
throw new BizException(CodeEnums.SHARING_NOT_OWNER_OR_ADMIN);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
import java.util.Date;
import lombok.Data;

import javax.persistence.Column;

@Data
public class UpdateSharingReq {

Expand Down Expand Up @@ -85,4 +83,7 @@ public class UpdateSharingReq {
* 课程Id
*/
private Long courseId;

@ApiModelProperty("课程大纲")
private String outline;
}

0 comments on commit 29c1d71

Please sign in to comment.