Commit 5dd26480 by 吴博

feat: [1003255] 进一步优化入群路径,立享权益社群板块加头图

parent ed1c3cb0
...@@ -76,11 +76,11 @@ import com.pcloud.book.rightsSetting.mapper.RightsSettingTitleMapper; ...@@ -76,11 +76,11 @@ import com.pcloud.book.rightsSetting.mapper.RightsSettingTitleMapper;
import com.pcloud.book.skill.biz.PcloudGroupActivityBiz; import com.pcloud.book.skill.biz.PcloudGroupActivityBiz;
import com.pcloud.book.skill.dao.PcloudGroupActivityDao; import com.pcloud.book.skill.dao.PcloudGroupActivityDao;
import com.pcloud.book.skill.dto.GroupActivity4AppletDTO; import com.pcloud.book.skill.dto.GroupActivity4AppletDTO;
import com.pcloud.book.util.common.YesOrNoEnums;
import com.pcloud.channelcenter.wechat.dto.AccountSettingDto; import com.pcloud.channelcenter.wechat.dto.AccountSettingDto;
import com.pcloud.common.core.aspect.ParamLog; import com.pcloud.common.core.aspect.ParamLog;
import com.pcloud.common.page.PageBeanNew; import com.pcloud.common.page.PageBeanNew;
import com.pcloud.common.page.PageParam; import com.pcloud.common.page.PageParam;
import com.pcloud.common.utils.BeanUtils;
import com.pcloud.common.utils.ListUtils; import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.NumberUtil; import com.pcloud.common.utils.NumberUtil;
import com.pcloud.common.utils.cache.redis.JedisClusterUtils; import com.pcloud.common.utils.cache.redis.JedisClusterUtils;
...@@ -92,12 +92,12 @@ import lombok.extern.slf4j.Slf4j; ...@@ -92,12 +92,12 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils; import org.apache.commons.collections.MapUtils;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.Date; import java.util.Date;
...@@ -107,6 +107,8 @@ import java.util.List; ...@@ -107,6 +107,8 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Random; import java.util.Random;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function; import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -284,6 +286,29 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -284,6 +286,29 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
@ParamLog("更新权益设置") @ParamLog("更新权益设置")
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void updateRightsSetting(RightsSetting rightsSetting) { public void updateRightsSetting(RightsSetting rightsSetting) {
//处理前端传过来的数据
handleRightsSetting4Sort(rightsSetting);
rightsSettingCheck.rightsSettingCheck(rightsSetting);
if (null == rightsSetting.getId()) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "缺少id!");
}
Long rightsSettingId = rightsSetting.getId();
if (Objects.equals(RightsTypeEnum.BASE.code, rightsSetting.getStepType())) {
//更新基本信息
updateRightsSettingBase(rightsSetting, rightsSettingId);
} else if (Objects.equals(RightsTypeEnum.NOW.code, rightsSetting.getStepType())) {
//更新即享权益
updateRightNowItemByRightId(rightsSetting);
} else if (Objects.equals(RightsTypeEnum.WEEK.code, rightsSetting.getStepType())) {
// 更新每周、长期权益
updateRightsWeek(rightsSetting);
} else if (Objects.equals(RightsTypeEnum.LONG_TERM.code, rightsSetting.getStepType())) {
// 更新每周、长期权益
updateRightsLongTerm(rightsSetting);
}
}
private void handleRightsSetting4Sort(RightsSetting rightsSetting) {
RightsSettingNow rightsSettingNow = rightsSetting.getRightsSettingNow(); RightsSettingNow rightsSettingNow = rightsSetting.getRightsSettingNow();
if(null != rightsSettingNow && !ListUtils.isEmpty(rightsSettingNow.getNewRightsSettingTitles())){ if(null != rightsSettingNow && !ListUtils.isEmpty(rightsSettingNow.getNewRightsSettingTitles())){
List<RightsSettingTitle> newRightsSettingTitles= rightsSettingNow.getNewRightsSettingTitles(); List<RightsSettingTitle> newRightsSettingTitles= rightsSettingNow.getNewRightsSettingTitles();
...@@ -303,25 +328,6 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -303,25 +328,6 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
} }
rightsSettingNow.setRightsSettingTitles(rightsSettingTitles); rightsSettingNow.setRightsSettingTitles(rightsSettingTitles);
} }
rightsSettingCheck.rightsSettingCheck(rightsSetting);
if (null == rightsSetting.getId()) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "缺少id!");
}
Long rightsSettingId = rightsSetting.getId();
if (Objects.equals(RightsTypeEnum.BASE.code, rightsSetting.getStepType())) {
//更新基本信息
updateRightsSettingBase(rightsSetting, rightsSettingId);
} else if (Objects.equals(RightsTypeEnum.NOW.code, rightsSetting.getStepType())) {
//更新即享权益
updateRightNowItemByRightId(rightsSetting);
} else if (Objects.equals(RightsTypeEnum.WEEK.code, rightsSetting.getStepType())) {
// 更新每周、长期权益
updateRightsWeek(rightsSetting);
} else if (Objects.equals(RightsTypeEnum.LONG_TERM.code, rightsSetting.getStepType())) {
// 更新每周、长期权益
updateRightsLongTerm(rightsSetting);
}
} }
private void updateRightsSettingBase(RightsSetting rightsSetting, Long rightsSettingId) { private void updateRightsSettingBase(RightsSetting rightsSetting, Long rightsSettingId) {
...@@ -620,6 +626,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -620,6 +626,8 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
if (rightsSettingTitle.getServeType() == null) { if (rightsSettingTitle.getServeType() == null) {
return; return;
} }
//增加社群头图校验
AtomicInteger showCount = new AtomicInteger(0);
rightsNowItemList.forEach(rightsNowItem -> { rightsNowItemList.forEach(rightsNowItem -> {
if (rightsSettingTitle.getServeType().equalsIgnoreCase(rightsNowItem.getServeType()) || ( if (rightsSettingTitle.getServeType().equalsIgnoreCase(rightsNowItem.getServeType()) || (
Objects.equals(BookConstant.APP_PRODUCT, rightsSettingTitle.getServeType()) && ArrayUtils Objects.equals(BookConstant.APP_PRODUCT, rightsSettingTitle.getServeType()) && ArrayUtils
...@@ -627,9 +635,15 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -627,9 +635,15 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
rightsNowItem.setRightsSettingId(rightsSettingId); rightsNowItem.setRightsSettingId(rightsSettingId);
rightsNowItem.setRightsSettingTitleId(rightsSettingTitle.getId()); rightsNowItem.setRightsSettingTitleId(rightsSettingTitle.getId());
rightsNowItem.setType(rightsSettingTitle.getRightsSettingNowType()); rightsNowItem.setType(rightsSettingTitle.getRightsSettingNowType());
if (YesOrNoEnums.YES.getValue().equals(rightsNowItem.getIsShow())) {
showCount.set(showCount.get() + 1);
}
items.add(rightsNowItem); items.add(rightsNowItem);
} }
}); });
if (showCount.intValue() > 1) {
throw new BookBizException(BookBizException.ERROR, "最多只能有一个社群头图可以被开启");
}
}); });
} }
......
...@@ -107,5 +107,9 @@ public class RightsNowItem extends BaseEntity { ...@@ -107,5 +107,9 @@ public class RightsNowItem extends BaseEntity {
private String pic3; private String pic3;
@ApiModelProperty("内容摘要") @ApiModelProperty("内容摘要")
private String digest; private String digest;
@ApiModelProperty("社群是否展示头图")
private Integer isShow;
@ApiModelProperty("社群头图地址")
private String showUrl;
} }
...@@ -6,9 +6,10 @@ import java.util.List; ...@@ -6,9 +6,10 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.ibatis.annotations.MapKey; import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Mapper @Component
public interface RightsReadTypeMapper { public interface RightsReadTypeMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
...@@ -28,6 +29,5 @@ public interface RightsReadTypeMapper { ...@@ -28,6 +29,5 @@ public interface RightsReadTypeMapper {
List<RightsReadType> getByRightsSettingId(Long rightsSettingId); List<RightsReadType> getByRightsSettingId(Long rightsSettingId);
@MapKey("readType")
Map<Integer, ReadTypeCountDTO> getCounMapt4Title(Long rightsSettingId);
} }
\ No newline at end of file
...@@ -3,8 +3,10 @@ package com.pcloud.book.rightsSetting.mapper; ...@@ -3,8 +3,10 @@ package com.pcloud.book.rightsSetting.mapper;
import com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation; import com.pcloud.book.rightsSetting.entity.RightsSettingBookRelation;
import java.util.List; import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
@Mapper
@Component
public interface RightsSettingBookRelationMapper { public interface RightsSettingBookRelationMapper {
int deleteByPrimaryKey(Long id); int deleteByPrimaryKey(Long id);
......
...@@ -7,7 +7,6 @@ import com.pcloud.book.skill.dto.UpdateActivityShowStateDTO; ...@@ -7,7 +7,6 @@ import com.pcloud.book.skill.dto.UpdateActivityShowStateDTO;
import com.pcloud.book.skill.facade.request.GroupActivityClassifyVO; import com.pcloud.book.skill.facade.request.GroupActivityClassifyVO;
import com.pcloud.book.skill.facade.request.GroupActivityShowStateVO; import com.pcloud.book.skill.facade.request.GroupActivityShowStateVO;
import com.pcloud.book.skill.entity.PcloudGroupActivity; import com.pcloud.book.skill.entity.PcloudGroupActivity;
import com.pcloud.book.skill.entity.PcloudGroupActivity;
import com.pcloud.book.skill.facade.request.SaveGroupActivityRequestVO; import com.pcloud.book.skill.facade.request.SaveGroupActivityRequestVO;
import com.pcloud.book.skill.facade.request.UpdateGroupActivityRequestVO; import com.pcloud.book.skill.facade.request.UpdateGroupActivityRequestVO;
import com.pcloud.book.skill.facade.response.ListGroupActivityResponseVO; import com.pcloud.book.skill.facade.response.ListGroupActivityResponseVO;
...@@ -64,10 +63,10 @@ public interface PcloudGroupActivityBiz { ...@@ -64,10 +63,10 @@ public interface PcloudGroupActivityBiz {
/** /**
* 获取共读活动列表(分页) * 获取共读活动列表(分页)
*/ */
PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity(String name, Long proLabelId, Long purLabelId, Long depLabelId, Integer joinType,Long firstClassify, PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity(String name, Long proLabelId, Long purLabelId, Long depLabelId, Integer joinType, Long firstClassify,
Long secondClassify, Long secondClassify,
Long gradeLabelId, Long gradeLabelId,
Long subjectLabelId ,Integer numPerPage, Integer currentPage); Long subjectLabelId, Integer numPerPage, Integer currentPage, String cityCode);
/** /**
* 获取共读活动列表(弹窗) * 获取共读活动列表(弹窗)
......
...@@ -21,8 +21,9 @@ import com.pcloud.book.group.biz.GroupQrcodeBiz; ...@@ -21,8 +21,9 @@ import com.pcloud.book.group.biz.GroupQrcodeBiz;
import com.pcloud.book.group.dao.BookClassifyBuyRecordDao; import com.pcloud.book.group.dao.BookClassifyBuyRecordDao;
import com.pcloud.book.group.dao.BookQrcodeUserDao; import com.pcloud.book.group.dao.BookQrcodeUserDao;
import com.pcloud.book.group.vo.ClassifyQrcodeVO; import com.pcloud.book.group.vo.ClassifyQrcodeVO;
import com.pcloud.book.group.vo.GroupQrcode4ClassifyVO;
import com.pcloud.book.reading.biz.ReadingActivityBiz; import com.pcloud.book.reading.biz.ReadingActivityBiz;
import com.pcloud.book.record.biz.BookBrowseRecordBiz;
import com.pcloud.book.record.entity.RegionMap;
import com.pcloud.book.rightsSetting.biz.RightsSettingBiz; import com.pcloud.book.rightsSetting.biz.RightsSettingBiz;
import com.pcloud.book.rightsSetting.dao.RightsNowItemDao; import com.pcloud.book.rightsSetting.dao.RightsNowItemDao;
import com.pcloud.book.rightsSetting.dao.RightsSettingItemDetailDao; import com.pcloud.book.rightsSetting.dao.RightsSettingItemDetailDao;
...@@ -52,9 +53,7 @@ import com.pcloud.common.utils.ListUtils; ...@@ -52,9 +53,7 @@ import com.pcloud.common.utils.ListUtils;
import com.pcloud.common.utils.NumberUtil; import com.pcloud.common.utils.NumberUtil;
import com.pcloud.common.utils.httpclient.UrlUtils; import com.pcloud.common.utils.httpclient.UrlUtils;
import com.pcloud.common.utils.string.StringUtil; import com.pcloud.common.utils.string.StringUtil;
import com.pcloud.common.utils.ResponseHandleUtil;
import com.pcloud.common.utils.string.StringUtilParent; import com.pcloud.common.utils.string.StringUtilParent;
import com.pcloud.usercenter.party.adviser.entity.Adviser;
import com.pcloud.usercenter.party.adviser.service.AdviserService; import com.pcloud.usercenter.party.adviser.service.AdviserService;
import com.pcloud.usercenter.party.agent.service.AgentService; import com.pcloud.usercenter.party.agent.service.AgentService;
import com.sdk.wxgroup.RobotProcessTypeEnum; import com.sdk.wxgroup.RobotProcessTypeEnum;
...@@ -78,6 +77,7 @@ import java.util.Map; ...@@ -78,6 +77,7 @@ import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Optional; import java.util.Optional;
import java.util.UUID; import java.util.UUID;
import java.util.stream.Collectors;
@Slf4j @Slf4j
@Service @Service
...@@ -124,6 +124,8 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz { ...@@ -124,6 +124,8 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
private RightsNowItemDao rightsNowItemDao; private RightsNowItemDao rightsNowItemDao;
@Autowired @Autowired
private RightsSettingItemDetailDao rightsSettingItemDetailDao; private RightsSettingItemDetailDao rightsSettingItemDetailDao;
@Autowired
private BookBrowseRecordBiz bookBrowseRecordBiz;
@ParamLog("批量分类") @ParamLog("批量分类")
@Override @Override
...@@ -258,10 +260,10 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz { ...@@ -258,10 +260,10 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
} }
@Override @Override
public PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity(String name, Long proLabelId, Long purLabelId, Long depLabelId, Integer joinType,Long firstClassify, public PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity(String name, Long proLabelId, Long purLabelId, Long depLabelId, Integer joinType, Long firstClassify,
Long secondClassify, Long secondClassify,
Long gradeLabelId, Long gradeLabelId,
Long subjectLabelId, Integer numPerPage, Integer currentPage) { Long subjectLabelId, Integer numPerPage, Integer currentPage, String cityCode) {
PageParam pageParam = new PageParam(currentPage, numPerPage); PageParam pageParam = new PageParam(currentPage, numPerPage);
BaseTempletClassify baseTempletClassify =new BaseTempletClassify(); BaseTempletClassify baseTempletClassify =new BaseTempletClassify();
...@@ -282,6 +284,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz { ...@@ -282,6 +284,7 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
paraMap.put("secondClassify", baseTempletClassify.getSecondClassify()); paraMap.put("secondClassify", baseTempletClassify.getSecondClassify());
paraMap.put("gradeLabelId", baseTempletClassify.getGradeLabelId()); paraMap.put("gradeLabelId", baseTempletClassify.getGradeLabelId());
paraMap.put("subjectLabelId", baseTempletClassify.getSubjectLabelId()); paraMap.put("subjectLabelId", baseTempletClassify.getSubjectLabelId());
paraMap.put("cityCode", cityCode);
PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity = pcloudGroupActivityDao.listPageNew(pageParam, paraMap, "queryGroupActivity"); PageBeanNew<QueryGroupActivityResponseVO> queryGroupActivity = pcloudGroupActivityDao.listPageNew(pageParam, paraMap, "queryGroupActivity");
if (null == queryGroupActivity || CollectionUtils.isEmpty(queryGroupActivity.getRecordList())) { if (null == queryGroupActivity || CollectionUtils.isEmpty(queryGroupActivity.getRecordList())) {
return queryGroupActivity; return queryGroupActivity;
...@@ -308,9 +311,31 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz { ...@@ -308,9 +311,31 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
String subStr = filterStr.length() > 60 ? filterStr.substring(0, 60) + "..." : filterStr; String subStr = filterStr.length() > 60 ? filterStr.substring(0, 60) + "..." : filterStr;
vo.setCutDesc(subStr); vo.setCutDesc(subStr);
} }
//设置城市名称
setCityNames(queryGroupActivity.getRecordList());
return queryGroupActivity; return queryGroupActivity;
} }
private void setCityNames(List<QueryGroupActivityResponseVO> recordList) {
if (ListUtils.isEmpty(recordList)) {
return;
}
List<String> cityCodes = recordList.stream().map(e -> e.getCityCode()).collect(Collectors.toList());
if (ListUtils.isEmpty(cityCodes)) {
return;
}
Map<String, RegionMap> regionMapMap = bookBrowseRecordBiz.getCitysByCodes(cityCodes);
if (MapUtils.isEmpty(regionMapMap)) {
return;
}
recordList.stream().forEach(queryGroupActivityResponseVO -> {
RegionMap regionMap = regionMapMap.get(queryGroupActivityResponseVO.getCityCode());
if (null != regionMap) {
queryGroupActivityResponseVO.setCityName(regionMap.getRegionName());
}
});
}
private void setLabelContent(List<QueryGroupActivityResponseVO> rightsSettingDtos) { private void setLabelContent(List<QueryGroupActivityResponseVO> rightsSettingDtos) {
log.info("权益设置标签具体内容"); log.info("权益设置标签具体内容");
if (ListUtils.isEmpty(rightsSettingDtos)){ if (ListUtils.isEmpty(rightsSettingDtos)){
......
...@@ -102,9 +102,10 @@ public class PcloudGroupActivityFacade { ...@@ -102,9 +102,10 @@ public class PcloudGroupActivityFacade {
@RequestParam(value = "secondClassify", required = false) Long secondClassify, @RequestParam(value = "secondClassify", required = false) Long secondClassify,
@RequestParam(value = "gradeLabelId", required = false) Long gradeLabelId, @RequestParam(value = "gradeLabelId", required = false) Long gradeLabelId,
@RequestParam(value = "subjectLabelId", required = false) Long subjectLabelId, @RequestParam(value = "subjectLabelId", required = false) Long subjectLabelId,
@RequestParam(value = "cityCode", required = false) String cityCode,
@RequestParam("numPerPage") Integer numPerPage, @RequestParam("numPerPage") Integer numPerPage,
@RequestParam("currentPage") Integer currentPage){ @RequestParam("currentPage") Integer currentPage){
return new ResponseDto<>(pcloudGroupActivityBiz.queryGroupActivity(name, proLabelId, purLabelId, depLabelId, joinType,firstClassify,secondClassify, gradeLabelId,subjectLabelId,numPerPage, currentPage)); return new ResponseDto<>(pcloudGroupActivityBiz.queryGroupActivity(name, proLabelId, purLabelId, depLabelId, joinType,firstClassify,secondClassify, gradeLabelId,subjectLabelId,numPerPage, currentPage, cityCode));
} }
@ApiOperation("获取共读活动列表(弹窗)") @ApiOperation("获取共读活动列表(弹窗)")
......
...@@ -59,8 +59,7 @@ public class SaveGroupActivityRequestVO extends BaseTempletClassify { ...@@ -59,8 +59,7 @@ public class SaveGroupActivityRequestVO extends BaseTempletClassify {
if (StringUtil.isBlank(this.getName()) if (StringUtil.isBlank(this.getName())
|| null == this.getProLabelId() || null == this.getDepLabelId() || null == this.getProLabelId() || null == this.getDepLabelId()
|| null == this.getPurLabelId() || null == this.getPurLabelId()
|| null == this.getGroupType() || null == this.getGroupType()) {
|| null == this.getNumber()) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "请求参数缺失"); throw new BookBizException(BookBizException.PARAM_IS_NULL, "请求参数缺失");
} }
if("0".equals(this.getGroupType())){ if("0".equals(this.getGroupType())){
......
...@@ -66,8 +66,7 @@ public class UpdateGroupActivityRequestVO extends BaseTempletClassify { ...@@ -66,8 +66,7 @@ public class UpdateGroupActivityRequestVO extends BaseTempletClassify {
if (null == id || StringUtil.isBlank(this.getName()) if (null == id || StringUtil.isBlank(this.getName())
|| null == this.getProLabelId() || null == this.getDepLabelId() || null == this.getProLabelId() || null == this.getDepLabelId()
|| null == this.getPurLabelId() || null == this.getPurLabelId()
|| null == this.getGroupType() || null == this.getGroupType()) {
|| null == this.getNumber()) {
throw new BookBizException(BookBizException.PARAM_IS_NULL, "请求参数缺失"); throw new BookBizException(BookBizException.PARAM_IS_NULL, "请求参数缺失");
} }
if("0".equals(this.getGroupType())){ if("0".equals(this.getGroupType())){
......
...@@ -91,5 +91,10 @@ public class QueryGroupActivityResponseVO { ...@@ -91,5 +91,10 @@ public class QueryGroupActivityResponseVO {
private String adviserName; private String adviserName;
@ApiModelProperty("电话") @ApiModelProperty("电话")
private String phone; private String phone;
@ApiModelProperty("城市名称")
private String cityName;
@ApiModelProperty("城市名称")
private String cityCode;
} }
...@@ -14,11 +14,13 @@ ...@@ -14,11 +14,13 @@
<result property="rightsItemGroupId" column="rights_item_group_id" jdbcType="BIGINT"/> <result property="rightsItemGroupId" column="rights_item_group_id" jdbcType="BIGINT"/>
<result property="rightsSettingTitleId" column="rights_setting_title_id" jdbcType="BIGINT"/> <result property="rightsSettingTitleId" column="rights_setting_title_id" jdbcType="BIGINT"/>
<result property="groupType" column="group_type" jdbcType="VARCHAR"/> <result property="groupType" column="group_type" jdbcType="VARCHAR"/>
<result property="isShow" column="is_show" jdbcType="TINYINT"/>
<result property="showUrl" column="show_url" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, rights_setting_id, serve_id, serve_type, link_url, type, gift_coupon_package_id, create_time, id, rights_setting_id, serve_id, serve_type, link_url, type, gift_coupon_package_id, create_time,
rights_item_group_id,rights_setting_title_id,group_type rights_item_group_id,rights_setting_title_id,group_type, is_show, show_url
</sql> </sql>
<select id="getById" resultMap="BaseResultMap" parameterType="java.lang.Long"> <select id="getById" resultMap="BaseResultMap" parameterType="java.lang.Long">
...@@ -36,7 +38,7 @@ ...@@ -36,7 +38,7 @@
<insert id="insert" parameterType="com.pcloud.book.rightsSetting.entity.RightsNowItem" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="com.pcloud.book.rightsSetting.entity.RightsNowItem" useGeneratedKeys="true" keyProperty="id">
insert into rights_now_item insert into rights_now_item
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
rights_setting_id, serve_id, serve_type, link_url, type, gift_coupon_package_id, create_time, rights_item_group_id rights_setting_id, serve_id, serve_type, link_url, type, gift_coupon_package_id, create_time, rights_item_group_id, is_show, show_url
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
#{rightsSettingId,jdbcType=BIGINT}, #{rightsSettingId,jdbcType=BIGINT},
...@@ -46,14 +48,16 @@ ...@@ -46,14 +48,16 @@
#{type,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{giftCouponPackageId,jdbcType=BIGINT}, #{giftCouponPackageId,jdbcType=BIGINT},
NOW(), NOW(),
#{rightsItemGroupId,jdbcType=BIGINT} #{rightsItemGroupId,jdbcType=BIGINT},
#{isShow},
#{showUrl}
</trim> </trim>
</insert> </insert>
<insert id="batchInsert" parameterType="com.pcloud.book.rightsSetting.entity.RightsNowItem" useGeneratedKeys="true" keyProperty="id"> <insert id="batchInsert" parameterType="com.pcloud.book.rightsSetting.entity.RightsNowItem" useGeneratedKeys="true" keyProperty="id">
insert into rights_now_item ( insert into rights_now_item (
rights_setting_id, serve_id, serve_type, link_url, type, gift_coupon_package_id, create_time, rights_item_group_id, rights_setting_id, serve_id, serve_type, link_url, type, gift_coupon_package_id, create_time, rights_item_group_id,
rights_setting_title_id,group_type rights_setting_title_id,group_type, is_show, show_url
) values ) values
<foreach collection="list" item="item" index="index" separator=","> <foreach collection="list" item="item" index="index" separator=",">
( (
...@@ -66,7 +70,9 @@ ...@@ -66,7 +70,9 @@
NOW(), NOW(),
#{item.rightsItemGroupId,jdbcType=BIGINT}, #{item.rightsItemGroupId,jdbcType=BIGINT},
#{item.rightsSettingTitleId}, #{item.rightsSettingTitleId},
#{item.groupType,jdbcType=VARCHAR} #{item.groupType,jdbcType=VARCHAR},
#{item.isShow},
#{item.showUrl}
) )
</foreach> </foreach>
</insert> </insert>
......
...@@ -114,7 +114,8 @@ ...@@ -114,7 +114,8 @@
a.number, a.number,
a.group_extLink as groupExtLink, a.group_extLink as groupExtLink,
a.group_type as groupType, a.group_type as groupType,
is_show AS isShow is_show AS isShow,
b.city_code cityCode
FROM FROM
pcloud_group_activity a left join book_group_classify b on a.book_group_classify_id = b.id pcloud_group_activity a left join book_group_classify b on a.book_group_classify_id = b.id
WHERE WHERE
...@@ -146,6 +147,9 @@ ...@@ -146,6 +147,9 @@
<if test="subjectLabelId != null"> <if test="subjectLabelId != null">
and a.subject_label_id = #{subjectLabelId} and a.subject_label_id = #{subjectLabelId}
</if> </if>
<if test="cityCode != null">
and b.city_code = #{cityCode}
</if>
order by a.id desc order by a.id desc
</select> </select>
......
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