Browse Source

志愿者活动标题修改

feature/syp_points
songyunpeng 5 years ago
parent
commit
70786c9e4f
  1. 5
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppActInfoController.java
  2. 2
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java
  3. 2
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java
  4. 37
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/logback-spring.xml
  5. 16
      esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml

5
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiAppActInfoController.java

@ -68,14 +68,15 @@ public class ApiAppActInfoController {
* @Author: lipengfei * @Author: lipengfei
* @Date: 2019/11/19 16:34 * @Date: 2019/11/19 16:34
*/ */
@GetMapping("detail/{id}") @GetMapping("detail")
public Result<ActInfoDetailAppResultDTO> detail(@PathVariable String id, @LoginUser TokenDto tokenDto) { public Result<ActInfoDetailAppResultDTO> detail(String id,String actType, @LoginUser TokenDto tokenDto) {
if (StringUtils.isBlank(id)) { if (StringUtils.isBlank(id)) {
return new Result<ActInfoDetailAppResultDTO>().error("id不能为空"); return new Result<ActInfoDetailAppResultDTO>().error("id不能为空");
} }
ActInfoAppFormDTO formDto = new ActInfoAppFormDTO(); ActInfoAppFormDTO formDto = new ActInfoAppFormDTO();
formDto.setId(id); formDto.setId(id);
formDto.setUserId(tokenDto.getUserId()); formDto.setUserId(tokenDto.getUserId());
formDto.setActType(actType);
return actInfoService.getDetail(formDto); return actInfoService.getDetail(formDto);
} }

2
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/dao/ActInfoDao.java

@ -94,7 +94,7 @@ public interface ActInfoDao extends BaseDao<ActInfoEntity> {
* @Description 活动详情 * @Description 活动详情
* @Date 2020/2/5 16:31 * @Date 2020/2/5 16:31
**/ **/
ActInfoDetailResultDTO selectActInfoDetailResultDTO(String actId); ActInfoDetailResultDTO selectActInfoDetailResultDTO(ActInfoAppFormDTO formDto);
/** /**
* @param actId * @param actId

2
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/java/com/elink/esua/epdc/modules/activity/service/impl/ActInfoServiceImpl.java

@ -392,7 +392,7 @@ public class ActInfoServiceImpl extends BaseServiceImpl<ActInfoDao, ActInfoEntit
**/ **/
@Override @Override
public Result<ActInfoDetailAppResultDTO> queryActInfoDetail(ActInfoAppFormDTO formDto) { public Result<ActInfoDetailAppResultDTO> queryActInfoDetail(ActInfoAppFormDTO formDto) {
ActInfoDetailResultDTO detailResultDTO = baseDao.selectActInfoDetailResultDTO(formDto.getId()); ActInfoDetailResultDTO detailResultDTO = baseDao.selectActInfoDetailResultDTO(formDto);
// 获取用户报名状态 // 获取用户报名状态
String currentUserStatus = getCurrentUserStatus(formDto.getId(), formDto.getUserId()); String currentUserStatus = getCurrentUserStatus(formDto.getId(), formDto.getUserId());

37
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/logback-spring.xml

@ -127,33 +127,16 @@
<onMismatch>DENY</onMismatch> <onMismatch>DENY</onMismatch>
</filter> </filter>
</appender> </appender>
<!-- 开发、测试环境 -->
<springProfile name="dev,test">
<logger name="org.springframework.web" level="INFO"/>
<logger name="org.springboot.sample" level="INFO"/>
<logger name="com.elink.esua.epdc" level="INFO"/>
<logger name="com.elink.esua.epdc.dao" level="DEBUG"/>
<root level="INFO">
<appender-ref ref="DEBUG_FILE"/>
<appender-ref ref="INFO_FILE"/>
<appender-ref ref="WARN_FILE"/>
<appender-ref ref="ERROR_FILE"/>
</root>
</springProfile>
<!-- 生产环境 --> <!-- 生产环境 -->
<springProfile name="prod"> <logger name="org.springframework.web" level="INFO"/>
<logger name="org.springframework.web" level="ERROR"/> <logger name="org.springboot.sample" level="INFO"/>
<logger name="org.springboot.sample" level="ERROR"/> <logger name="com.elink.esua.epdc" level="INFO"/>
<logger name="com.elink.esua.epdc" level="ERROR"/> <root level="INFO">
<root level="ERROR"> <appender-ref ref="CONSOLE"/>
<appender-ref ref="CONSOLE"/> <appender-ref ref="DEBUG_FILE"/>
<appender-ref ref="DEBUG_FILE"/> <appender-ref ref="INFO_FILE"/>
<appender-ref ref="INFO_FILE"/> <appender-ref ref="WARN_FILE"/>
<appender-ref ref="WARN_FILE"/> <appender-ref ref="ERROR_FILE"/>
<appender-ref ref="ERROR_FILE"/> </root>
</root>
</springProfile>
</configuration> </configuration>

16
esua-epdc/epdc-module/epdc-heart/epdc-heart-server/src/main/resources/mapper/activity/ActInfoDao.xml

@ -145,7 +145,10 @@
<select id="listItemsByApp" resultMap="actAppResultMap"> <select id="listItemsByApp" resultMap="actAppResultMap">
select * from ( select * from (
SELECT SELECT
actInfo.ID, actInfo.TITLE, actInfo.HEAD_PIC, actInfo.ID,
<if test='actType != null and actType != "" and actType == "0"'>CONCAT(actInfo.TITLE,'招募令') as TITLE,</if>
<if test='actType != null and actType != "" and actType == "1"'>CONCAT(actInfo.TITLE,'集锦') as TITLE,</if>
actInfo.HEAD_PIC,
DATE_FORMAT(actInfo.ACT_START_TIME,'%Y-%m-%d %H:%i') ACT_START_TIME, DATE_FORMAT(actInfo.ACT_START_TIME,'%Y-%m-%d %H:%i') ACT_START_TIME,
DATE_FORMAT(actInfo.ACT_END_TIME,'%Y-%m-%d %H:%i') ACT_END_TIME, DATE_FORMAT(actInfo.ACT_END_TIME,'%Y-%m-%d %H:%i') ACT_END_TIME,
actInfo.PUBLISH_TIME,actInfo.ACT_ADDRESS, actInfo.ACT_QUOTA_CATEGORY, actInfo.ACT_QUOTA, actInfo.PUBLISH_TIME,actInfo.ACT_ADDRESS, actInfo.ACT_QUOTA_CATEGORY, actInfo.ACT_QUOTA,
@ -467,13 +470,13 @@
id = #{actId} id = #{actId}
AND DEL_FLAG = 0 AND DEL_FLAG = 0
</select> </select>
<!-- 活动详情 --> <!-- 活动详情 -->
<select id="selectActInfoDetailResultDTO" parameterType="java.lang.String" <select id="selectActInfoDetailResultDTO"
resultType="com.elink.esua.epdc.activity.result.ActInfoDetailResultDTO"> resultType="com.elink.esua.epdc.activity.result.ActInfoDetailResultDTO">
select eai.ID, select eai.ID,
eai.TITLE, <if test='actType != null and actType != "" and actType == "0"'>CONCAT(eai.TITLE,'招募令') as TITLE,</if>
<if test='actType != null and actType != "" and actType == "1"'>CONCAT(eai.TITLE,'集锦') as TITLE,</if>
<if test='actType == null or actType == ""'>eai.TITLE,</if>
eai.CONTACTS, eai.CONTACTS,
eai.TEL, eai.TEL,
eai.SIGNUP_START_TIME as signupStartTime, eai.SIGNUP_START_TIME as signupStartTime,
@ -491,9 +494,10 @@
ACT_NEWS_CONTENT as actNewsContent ACT_NEWS_CONTENT as actNewsContent
from epdc_act_info eai from epdc_act_info eai
where eai.DEL_FLAG='0' where eai.DEL_FLAG='0'
and eai.id=#{actId} and eai.id= #{id}
</select> </select>
<!-- 活动打卡人数+1 --> <!-- 活动打卡人数+1 -->
<update id="addClockNum" parameterType="java.lang.String"> <update id="addClockNum" parameterType="java.lang.String">
update epdc_act_info eai update epdc_act_info eai

Loading…
Cancel
Save