活动更改

main
rong.liu 12 months ago
parent 757cf777a5
commit 8cdbb5fa2b
  1. 1
      competition/src/main/java/com/huoran/competition/controller/CompetitionContentController.java
  2. 4
      competition/src/main/java/com/huoran/competition/entity/vo/CompetitionVO.java
  3. 12
      competition/src/main/java/com/huoran/competition/mapper/xml/CompetitionMapper.xml
  4. 7
      competition/src/main/java/com/huoran/competition/service/impl/CompetitionServiceImpl.java

@ -27,6 +27,7 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("/competition/content") @RequestMapping("/competition/content")
public class CompetitionContentController { public class CompetitionContentController {
@Autowired @Autowired
private CompetitionContentService competitionContentService; private CompetitionContentService competitionContentService;
@NoRepeatSubmit @NoRepeatSubmit

@ -44,8 +44,8 @@ public class CompetitionVO implements Serializable {
@ApiModelProperty(value = "发布状态(0未发布,1已发布)") @ApiModelProperty(value = "发布状态(0未发布,1已发布)")
private Integer publishStatus; private Integer publishStatus;
@ApiModelProperty(value = "中台是否开启(0开启 1未开启 默认0)", example = "0") /* @ApiModelProperty(value = "中台是否开启(0开启 1未开启 默认0)", example = "0")
private Integer ztOpen; private Integer ztOpen;*/
@ApiModelProperty(value = "是否开启(0开启 1未开启 默认0)", example = "0") @ApiModelProperty(value = "是否开启(0开启 1未开启 默认0)", example = "0")
private Integer isOpen; private Integer isOpen;

@ -641,6 +641,7 @@
<select id="foregroundAppletActivityList" resultType="com.huoran.competition.entity.vo.CompetitionVO"> <select id="foregroundAppletActivityList" resultType="com.huoran.competition.entity.vo.CompetitionVO">
SELECT SELECT
c.id, c.id,
c.cover_url,
c.NAME AS competitionName, c.NAME AS competitionName,
c.founder_name, c.founder_name,
c.competition_scope, c.competition_scope,
@ -649,13 +650,20 @@
c.play_start_time, c.play_start_time,
c.play_end_time, c.play_end_time,
c.create_time, c.create_time,
c.sponsor,
IFNULL( IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ), ( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ),
0 0
) AS applicant_num, ) AS applicant_num,
c.is_open, c.is_open,
create_source, create_source,
( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' end) as createSource ( CASE create_source WHEN 0 THEN '平台创建' WHEN 1 THEN '组织创建' ELSE '无' end) as createSource,
IF
(
( SELECT r.id FROM c_competition_registration r WHERE r.competition_id = c.id AND r.account_id = #{req.accountId} ) IS NULL,
1,
0
) AS whetherToSignUp
FROM FROM
c_competition c c_competition c
WHERE WHERE
@ -691,12 +699,14 @@
c.id, c.id,
c.NAME AS competitionName, c.NAME AS competitionName,
c.founder_name, c.founder_name,
c.cover_url,
c.competition_scope, c.competition_scope,
c.platform_source, c.platform_source,
c.publish_status, c.publish_status,
c.play_start_time, c.play_start_time,
c.play_end_time, c.play_end_time,
c.create_time, c.create_time,
c.sponsor,
IFNULL( IFNULL(
( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ), ( SELECT count( 1 ) FROM c_competition_registration WHERE competition_id = c.id GROUP BY competition_id HAVING count( 1 ) > 0 ),
0 0

@ -10,7 +10,6 @@ import com.huoran.common.response.R;
import com.huoran.competition.entity.*; import com.huoran.competition.entity.*;
import com.huoran.competition.entity.req.*; import com.huoran.competition.entity.req.*;
import com.huoran.competition.entity.resp.ListOfStageResultsResp; import com.huoran.competition.entity.resp.ListOfStageResultsResp;
import com.huoran.competition.entity.vo.CompetitionDetailsVO;
import com.huoran.competition.entity.vo.CompetitionVO; import com.huoran.competition.entity.vo.CompetitionVO;
import com.huoran.competition.mapper.*; import com.huoran.competition.mapper.*;
import com.huoran.competition.service.CompetitionService; import com.huoran.competition.service.CompetitionService;
@ -217,8 +216,6 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe
} }
// @Override // @Override
// public R competitionAfterLogin1(AfterLoginPageCompetitionListReq pageCompetitionListReq) { // public R competitionAfterLogin1(AfterLoginPageCompetitionListReq pageCompetitionListReq) {
// Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize()); // Page<CompetitionVO> page = new Page<>(pageCompetitionListReq.getPageNum(), pageCompetitionListReq.getPageSize());
@ -267,11 +264,11 @@ public class CompetitionServiceImpl extends ServiceImpl<CompetitionMapper, Compe
switch (pageCompetitionListReq.getListType()) { switch (pageCompetitionListReq.getListType()) {
case 0: case 0:
//查询未删除且启用发布状态为发布后的 //查询未删除且启用发布状态为发布后的
baseMapper.foregroundAppletActivityList(page, pageCompetitionListReq); pageList = baseMapper.foregroundAppletActivityList(page, pageCompetitionListReq);
break; break;
case 1: case 1:
//查询我报名的列表 //查询我报名的列表
baseMapper.postRegistrationList(page, pageCompetitionListReq); pageList = baseMapper.postRegistrationList(page, pageCompetitionListReq);
break; break;
} }

Loading…
Cancel
Save