招商 基础
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.cool.store.dto.content.ContentAddDto;
|
||||
import com.cool.store.dto.content.ContentQueryListDto;
|
||||
import com.cool.store.dto.content.ContentUpdateDto;
|
||||
import com.cool.store.entity.HyContentInfoDO;
|
||||
import com.cool.store.mapper.HyContentInfoMapper;
|
||||
import com.cool.store.vo.HyContentInfoVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author su'zh
|
||||
*/
|
||||
@Repository
|
||||
@Deprecated
|
||||
public class ContentDAO {
|
||||
|
||||
@Autowired
|
||||
private HyContentInfoMapper contentInfoMapper;
|
||||
|
||||
public String addContentInfo(ContentAddDto dto) {
|
||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
||||
hyContentInfoDO.setUpdateUserId(dto.getCreateUserId());
|
||||
return Integer.toString(contentInfoMapper.insertSelective(hyContentInfoDO));
|
||||
}
|
||||
|
||||
public void deleteContent(String contentId) {
|
||||
contentInfoMapper.deleteSelective(contentId);
|
||||
}
|
||||
|
||||
public void updateContent(ContentUpdateDto dto) {
|
||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
||||
hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));
|
||||
contentInfoMapper.updateByPrimaryKeySelective(hyContentInfoDO);
|
||||
}
|
||||
|
||||
public List<HyContentInfoVO> queryContentList(ContentQueryListDto dto) {
|
||||
return contentInfoMapper.queryContentList(dto);
|
||||
}
|
||||
|
||||
public HyContentInfoDO queryContentInfo(String contentId) {
|
||||
return contentInfoMapper.queryContentInfo(contentId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.utils.StringUtil;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.collections4.ListUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/6 14:32
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Repository
|
||||
public class HyOpenAreaInfoDAO {
|
||||
|
||||
@Resource
|
||||
HyOpenAreaInfoMapper hyOpenAreaInfoMapper;
|
||||
|
||||
public List<HyOpenAreaInfoDO> queryKeyOpenArea(){
|
||||
return hyOpenAreaInfoMapper.queryKeyOpenArea();
|
||||
}
|
||||
|
||||
public List<HyOpenAreaInfoDO> queryByKeyword(String keyword,Boolean applyFlag,String areaStatus,Boolean filterData){
|
||||
return hyOpenAreaInfoMapper.queryByKeyword(keyword,applyFlag,areaStatus,filterData);
|
||||
}
|
||||
|
||||
public List<HyOpenAreaInfoDO> queryFirstLevel(){
|
||||
return hyOpenAreaInfoMapper.queryFirstLevel();
|
||||
}
|
||||
|
||||
public List<HyOpenAreaInfoDO> queryByIdsExcludeFirstLevel(List<Long> ids){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyOpenAreaInfoMapper.queryByIdsExcludeFirstLevel(ids);
|
||||
}
|
||||
|
||||
|
||||
public List<HyOpenAreaInfoDO> getChildrenList(String type ,Long parentId){
|
||||
if (parentId==null){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return hyOpenAreaInfoMapper.getChildrenList(type,parentId);
|
||||
}
|
||||
|
||||
public Integer getChildrenCount(String type ,Long parentId){
|
||||
if (parentId==null){
|
||||
return 0;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.getChildrenCount(type,parentId);
|
||||
}
|
||||
|
||||
|
||||
public int batchUpdateById(String backgroundBanner,String detailBanner,String areaStatus,String updateUserId,List<Long> ids){
|
||||
if (StringUtils.isEmpty(areaStatus)){
|
||||
return 0;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.batchUpdateById(backgroundBanner,detailBanner,areaStatus,updateUserId,ids);
|
||||
}
|
||||
|
||||
public int batchUpdateByParentId(String backgroundBanner,String detailBanner,String areaStatus,String updateUserId,List<Long> ids){
|
||||
if (StringUtils.isEmpty(areaStatus)){
|
||||
return 0;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.batchUpdateByParentId(backgroundBanner,detailBanner,areaStatus,updateUserId,ids);
|
||||
}
|
||||
|
||||
|
||||
public List<HyOpenAreaInfoDO> selectByIds(List<Long> ids){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return hyOpenAreaInfoMapper.selectByIds(ids);
|
||||
}
|
||||
|
||||
public Map<Long, String> getNameMapByIds(List<Long> ids){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
|
||||
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->k.getId(), v->v.getAreaName(), (k1, k2)->k1));
|
||||
}
|
||||
|
||||
public Map<String, String> selectNameMapByIds(List<Long> ids){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return Maps.newHashMap();
|
||||
}
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoMapper.selectByIds(ids);
|
||||
return ListUtils.emptyIfNull(hyOpenAreaInfoDOS).stream().collect(Collectors.toMap(k->String.valueOf(k.getId()), v->v.getAreaPath().replace("/"," ")));
|
||||
}
|
||||
|
||||
|
||||
public HyOpenAreaInfoDO selectById(Long id){
|
||||
if (id==null){
|
||||
return null;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.selectById(id);
|
||||
}
|
||||
|
||||
public List<HyOpenAreaInfoDO> getAllOpenArea(){
|
||||
return hyOpenAreaInfoMapper.getAllOpenArea();
|
||||
}
|
||||
|
||||
|
||||
public List<HyOpenAreaInfoDO> selectAllCity(){
|
||||
return hyOpenAreaInfoMapper.selectAllCity();
|
||||
}
|
||||
|
||||
/**
|
||||
* 过滤叶子节点
|
||||
* @param openAreaIds
|
||||
* @return 叶子节点id
|
||||
*/
|
||||
public List<Long> filterLeafNode(List<Long> openAreaIds){
|
||||
if(CollectionUtils.isEmpty(openAreaIds)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
return hyOpenAreaInfoMapper.filterLeafNode(openAreaIds);
|
||||
}
|
||||
|
||||
public List<HyOpenAreaInfoDO> getAllAreaCode(String id) {
|
||||
if (StringUtils.isEmpty(id)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
//获取省下所有数据
|
||||
List<HyOpenAreaInfoDO> provinceCodeList= hyOpenAreaInfoMapper.getProvinceAllCode(id);
|
||||
if(CollectionUtils.isEmpty(provinceCodeList)){
|
||||
//获取市区下所有数据
|
||||
List<HyOpenAreaInfoDO> cityCodeList= hyOpenAreaInfoMapper.getSonArea(id);
|
||||
if(CollectionUtils.isEmpty(cityCodeList)){
|
||||
return new ArrayList<HyOpenAreaInfoDO>(){{ add(hyOpenAreaInfoMapper.selectById(Convert.toLong(id)));}};
|
||||
}else {
|
||||
return cityCodeList;
|
||||
}
|
||||
}else {
|
||||
return provinceCodeList;
|
||||
}
|
||||
}
|
||||
|
||||
public HyOpenAreaInfoDO selectByAreaPath(String areaPath) {
|
||||
if (StringUtil.isEmpty(areaPath)) {
|
||||
return null;
|
||||
}
|
||||
return hyOpenAreaInfoMapper.selectByAreaPath(areaPath);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.content.ContentQueryListDto;
|
||||
import com.cool.store.entity.HyContentInfoDO;
|
||||
import com.cool.store.vo.HyContentInfoVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-05-29 03:50
|
||||
*/
|
||||
public interface HyContentInfoMapper {
|
||||
/**
|
||||
*
|
||||
* 默认插入方法,只会给有值的字段赋值
|
||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
||||
* dateTime:2023-05-29 03:50
|
||||
*/
|
||||
int insertSelective(@Param("record") HyContentInfoDO record);
|
||||
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
||||
* dateTime:2023-05-29 03:50
|
||||
*/
|
||||
int updateByPrimaryKeySelective(@Param("record") HyContentInfoDO record);
|
||||
|
||||
/**
|
||||
* 删除方法
|
||||
* @param contentId
|
||||
*/
|
||||
void deleteSelective(@Param("contentId") String contentId);
|
||||
|
||||
/**
|
||||
* 分页查询动态列表
|
||||
* 根据传入参数匹配
|
||||
*/
|
||||
List<HyContentInfoVO> queryContentList(ContentQueryListDto dto);
|
||||
|
||||
|
||||
/**
|
||||
* C 端使用的动态查询
|
||||
*/
|
||||
List<HyContentInfoVO> queryContentListForC(ContentQueryListDto dto);
|
||||
|
||||
/**
|
||||
* 根据contentId查询动态详情
|
||||
*/
|
||||
HyContentInfoDO queryContentInfo(@Param("contentId") String contentId);
|
||||
|
||||
/**
|
||||
* 标题是否重复
|
||||
*/
|
||||
Boolean whetherTitleDuplicated(@Param("contentTitle") String contentTitle);
|
||||
|
||||
/**
|
||||
* 查询动态标题
|
||||
*/
|
||||
List<String> queryTitles();
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-05-29 03:51
|
||||
*/
|
||||
public interface HyOpenAreaInfoMapper {
|
||||
/**
|
||||
*
|
||||
* 默认插入方法,只会给有值的字段赋值
|
||||
* 会对传进来的字段做判空处理,如果字段为空,则使用数据库默认字段或者null
|
||||
* dateTime:2023-05-29 03:51
|
||||
*/
|
||||
int insertSelective(@Param("record") HyOpenAreaInfoDO record);
|
||||
|
||||
/**
|
||||
*
|
||||
* 默认更新方法,根据主键更新,不会把null值更新到数据库,避免覆盖之前有值的
|
||||
* dateTime:2023-05-29 03:51
|
||||
*/
|
||||
int updateByPrimaryKeySelective(@Param("record") HyOpenAreaInfoDO record);
|
||||
|
||||
/**
|
||||
* 查询重点城市
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> queryKeyOpenArea();
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> queryByKeyword(@Param("keyword") String keyword,
|
||||
@Param("applyFlag") Boolean applyFlag,
|
||||
@Param("areaStatus") String areaStatus,
|
||||
@Param("filterData") Boolean filterData);
|
||||
|
||||
/**
|
||||
* 查询所有一级城市 (所有省份+直辖市)
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> queryFirstLevel();
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有一级城市 (所有省份+直辖市)
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> queryByIdsExcludeFirstLevel(@Param("ids") List<Long> ids);
|
||||
|
||||
|
||||
/**
|
||||
* 查询子列表
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> getChildrenList(@Param("type") String type ,
|
||||
@Param("parentId") Long parentId);
|
||||
|
||||
Integer getChildrenCount(@Param("type") String type ,
|
||||
@Param("parentId") Long parentId);
|
||||
|
||||
|
||||
/**
|
||||
* 更新城市昨天
|
||||
* @param backgroundBanner
|
||||
* @param detailBanner
|
||||
* @param areaStatus
|
||||
* @param updateUserId
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
int batchUpdateById(@Param("backgroundBanner") String backgroundBanner,
|
||||
@Param("detailBanner") String detailBanner,
|
||||
@Param("areaStatus") String areaStatus,
|
||||
@Param("updateUserId") String updateUserId,
|
||||
@Param("ids") List<Long> ids);
|
||||
|
||||
int batchUpdateByParentId(@Param("backgroundBanner") String backgroundBanner,
|
||||
@Param("detailBanner") String detailBanner,
|
||||
@Param("areaStatus") String areaStatus,
|
||||
@Param("updateUserId") String updateUserId,
|
||||
@Param("parentIdList") List<Long> parentIdList);
|
||||
|
||||
/**
|
||||
* 根据idList查询数据
|
||||
* @param idList
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> selectByIds(@Param("idList") List<Long> idList);
|
||||
|
||||
HyOpenAreaInfoDO selectById(@Param("id") Long id);
|
||||
|
||||
/**
|
||||
* 获取所有的区域
|
||||
* @return
|
||||
*/
|
||||
List<HyOpenAreaInfoDO> getAllOpenArea();
|
||||
|
||||
/**
|
||||
* 过滤叶子节点
|
||||
* @param openAreaIds
|
||||
* @return
|
||||
*/
|
||||
List<Long> filterLeafNode(@Param("openAreaIds") List<Long> openAreaIds);
|
||||
|
||||
List<HyOpenAreaInfoDO> getSonArea(@Param("id") String id);
|
||||
|
||||
List<HyOpenAreaInfoDO> getProvinceAllCode(@Param("id") String id);
|
||||
|
||||
HyOpenAreaInfoDO selectByAreaPath(@Param("areaPath") String areaPath);
|
||||
|
||||
List<HyOpenAreaInfoDO> selectAllCity();
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:25
|
||||
* @version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface HyPartnerLabelGroupMapper {
|
||||
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(HyPartnerLabelGroupDO record);
|
||||
|
||||
int insertSelective(HyPartnerLabelGroupDO record);
|
||||
|
||||
HyPartnerLabelGroupDO selectByPrimaryKey(Long id);
|
||||
|
||||
List<HyPartnerLabelGroupDO> selectSelective(HyPartnerLabelGroupDO record);
|
||||
|
||||
List<LabelGroupListVo> getLabelGroupList(HyPartnerLabelGroupDO record);
|
||||
|
||||
List<LabelGroupListVo> getLabelGroupListOrder(HyPartnerLabelGroupDO record);
|
||||
|
||||
int updateByPrimaryKeySelective(HyPartnerLabelGroupDO record);
|
||||
|
||||
int updateByPrimaryKey(HyPartnerLabelGroupDO record);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li
|
||||
* @date 2023-08-10
|
||||
*/
|
||||
public interface HyPartnerLabelMapper {
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
int insert(HyPartnerLabelDO record);
|
||||
|
||||
int insertSelective(HyPartnerLabelDO record);
|
||||
|
||||
HyPartnerLabelDO selectByPrimaryKey(Long id);
|
||||
|
||||
List<HyPartnerLabelDO> selectSelective(HyPartnerLabelDO labelDO);
|
||||
|
||||
int updateByPrimaryKeySelective(HyPartnerLabelDO record);
|
||||
|
||||
int updateByPrimaryKey(HyPartnerLabelDO record);
|
||||
|
||||
List<LabelListVo> getLabelList(LabelListDTO dto);
|
||||
|
||||
/**
|
||||
* 某个标签组内是否有未删除的标签
|
||||
* @param labelGroupId 标签组 id
|
||||
*/
|
||||
Boolean whetherGroupInUse(@Param("labelGroupId") Long labelGroupId);
|
||||
|
||||
List<HyPartnerLabelDO> getLabelListByIds(@Param("labelIds") List<Long> labelIds);
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyContentInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyContentInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="content_title" jdbcType="VARCHAR" property="contentTitle" />
|
||||
<result column="subject" jdbcType="VARCHAR" property="subject" />
|
||||
<result column="content_type" jdbcType="VARCHAR" property="contentType" />
|
||||
<result column="cover" jdbcType="VARCHAR" property="cover" />
|
||||
<result column="status" jdbcType="TINYINT" property="status" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
</resultMap>
|
||||
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.cool.store.entity.HyContentInfoDO">
|
||||
<result column="content" jdbcType="LONGVARCHAR" property="content" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="HyContentInfoVOList" type="com.cool.store.vo.HyContentInfoVO">
|
||||
<association property="updateUserName" column="update_user_id" select="getUpdateUserName"></association>
|
||||
<association property="updateUserPhone" column="update_user_id" select="getUpdateUserPhone"></association>
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, content_title, `subject`, content_type, cover, content, `status`, deleted, create_time, update_time,
|
||||
create_user_id, update_user_id
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
content
|
||||
</sql>
|
||||
<insert id="insertSelective" keyColumn="id" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_content_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.contentTitle != null">
|
||||
content_title,
|
||||
</if>
|
||||
<if test="record.subject != null">
|
||||
subject,
|
||||
</if>
|
||||
<if test="record.contentType != null">
|
||||
content_type,
|
||||
</if>
|
||||
<if test="record.cover != null">
|
||||
cover,
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
status,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.createUserId != null">
|
||||
create_user_id,
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.contentTitle != null">
|
||||
#{record.contentTitle},
|
||||
</if>
|
||||
<if test="record.subject != null">
|
||||
#{record.subject},
|
||||
</if>
|
||||
<if test="record.contentType != null">
|
||||
#{record.contentType},
|
||||
</if>
|
||||
<if test="record.cover != null">
|
||||
#{record.cover},
|
||||
</if>
|
||||
<if test="record.status != null">
|
||||
#{record.status},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
#{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.createUserId != null">
|
||||
#{record.createUserId},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
#{record.updateUserId},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
#{record.content},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update hy_content_info
|
||||
<set>
|
||||
<if test="record.contentTitle != null and record.contentTitle != ''">
|
||||
content_title = #{record.contentTitle},
|
||||
</if>
|
||||
<if test="record.subject != null">
|
||||
subject = #{record.subject},
|
||||
</if>
|
||||
<if test="record.contentType != null">
|
||||
content_type = #{record.contentType},
|
||||
</if>
|
||||
<if test="record.cover != null and record.cover != ''">
|
||||
cover = #{record.cover},
|
||||
</if>
|
||||
<if test="record.status != null and record.status != null">
|
||||
status = #{record.status},
|
||||
</if>
|
||||
<if test="record.deleted != null and record.deleted != ''">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null and record.createTime != ''">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null and record.updateTime != ''">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.createUserId != null and record.createUserId != ''">
|
||||
create_user_id = #{record.createUserId},
|
||||
</if>
|
||||
<if test="record.updateUserId != null and record.updateUserId != ''">
|
||||
update_user_id = #{record.updateUserId},
|
||||
</if>
|
||||
<if test="record.content != null and record.content != ''">
|
||||
content = #{record.content},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
<update id="deleteSelective">
|
||||
update hy_content_info
|
||||
<set>
|
||||
deleted = 1
|
||||
</set>
|
||||
where id = #{contentId}
|
||||
</update>
|
||||
<select id="queryContentList" resultMap="HyContentInfoVOList">
|
||||
select <include refid="Base_Column_List"></include>, update_user_id updateUserId
|
||||
from hy_content_info
|
||||
where deleted = 0
|
||||
<if test="contentTitle != null and contentTitle != ''">
|
||||
and content_title like concat('%', #{contentTitle}, '%')
|
||||
</if>
|
||||
<if test="subject != null">
|
||||
and subject = #{subject}
|
||||
</if>
|
||||
<if test="contentType != null">
|
||||
and content_type = #{contentType}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and update_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and update_time <= #{endTime}
|
||||
</if>
|
||||
order by update_time desc
|
||||
</select>
|
||||
<select id="getUpdateUserName" resultType="string">
|
||||
select name
|
||||
from enterprise_user
|
||||
where deleted = 0
|
||||
and user_id = #{updateUserId}
|
||||
</select>
|
||||
<select id="getUpdateUserPhone" resultType="string">
|
||||
select mobile
|
||||
from enterprise_user
|
||||
where deleted = 0
|
||||
and user_id = #{updateUserId}
|
||||
</select>
|
||||
|
||||
<!-- C 端使用的动态查询 -->
|
||||
<select id="queryContentListForC" resultType="com.cool.store.vo.HyContentInfoVO">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from hy_content_info
|
||||
where deleted = 0
|
||||
and status = 0
|
||||
<if test="contentTitle != null and contentTitle != ''">
|
||||
and content_title like concat('%', #{contentTitle}, '%')
|
||||
</if>
|
||||
<if test="subject != null">
|
||||
and subject = #{subject}
|
||||
</if>
|
||||
<if test="contentType != null">
|
||||
and content_type = #{contentType}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
and update_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null and endTime != ''">
|
||||
and update_time <= #{endTime}
|
||||
</if>
|
||||
order by update_time desc
|
||||
</select>
|
||||
|
||||
<!-- 查询动态详情 -->
|
||||
<select id="queryContentInfo" resultType="com.cool.store.entity.HyContentInfoDO">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from hy_content_info
|
||||
where deleted = 0
|
||||
and id = #{contentId}
|
||||
</select>
|
||||
|
||||
<!-- 标题是否重复 -->
|
||||
<select id="whetherTitleDuplicated" resultType="java.lang.Boolean">
|
||||
SELECT COUNT(*)
|
||||
FROM hy_content_info
|
||||
WHERE deleted = 0
|
||||
AND content_title = #{contentTitle}
|
||||
</select>
|
||||
|
||||
<!-- 获取所有标题 -->
|
||||
<select id="queryTitles" resultType="java.lang.String">
|
||||
SELECT content_title
|
||||
FROM hy_content_info
|
||||
WHERE deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,311 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyOpenAreaInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyOpenAreaInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||
<result column="area_name" jdbcType="VARCHAR" property="areaName" />
|
||||
<result column="area_path" jdbcType="VARCHAR" property="areaPath" />
|
||||
<result column="background_banner" jdbcType="VARCHAR" property="backgroundBanner" />
|
||||
<result column="detail_banner" jdbcType="VARCHAR" property="detailBanner" />
|
||||
<result column="area_status" jdbcType="VARCHAR" property="areaStatus" />
|
||||
<result column="deleted" jdbcType="TINYINT" property="deleted" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, parent_id, area_name, area_path, background_banner, detail_banner, area_status,
|
||||
deleted, create_time, update_time, update_user_id
|
||||
</sql>
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_open_area_info where id = #{id}
|
||||
</select>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyOpenAreaInfoDO" keyProperty="record.id" useGeneratedKeys="true">
|
||||
insert into hy_open_area_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="record.parentId != null">
|
||||
parent_id,
|
||||
</if>
|
||||
<if test="record.areaName != null">
|
||||
area_name,
|
||||
</if>
|
||||
<if test="record.areaPath != null">
|
||||
area_path,
|
||||
</if>
|
||||
<if test="record.backgroundBanner != null">
|
||||
background_banner,
|
||||
</if>
|
||||
<if test="record.detailBanner != null">
|
||||
detail_banner,
|
||||
</if>
|
||||
<if test="record.areaStatus != null">
|
||||
area_status,
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="record.parentId != null">
|
||||
#{record.parentId},
|
||||
</if>
|
||||
<if test="record.areaName != null">
|
||||
#{record.areaName},
|
||||
</if>
|
||||
<if test="record.areaPath != null">
|
||||
#{record.areaPath},
|
||||
</if>
|
||||
<if test="record.backgroundBanner != null">
|
||||
#{record.backgroundBanner},
|
||||
</if>
|
||||
<if test="record.detailBanner != null">
|
||||
#{record.detailBanner},
|
||||
</if>
|
||||
<if test="record.areaStatus != null">
|
||||
#{record.areaStatus},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
#{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
#{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
#{record.updateTime},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
#{record.updateUserId},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective">
|
||||
update hy_open_area_info
|
||||
<set>
|
||||
<if test="record.parentId != null">
|
||||
parent_id = #{record.parentId},
|
||||
</if>
|
||||
<if test="record.areaName != null">
|
||||
area_name = #{record.areaName},
|
||||
</if>
|
||||
<if test="record.areaPath != null">
|
||||
area_path = #{record.areaPath},
|
||||
</if>
|
||||
<if test="record.backgroundBanner != null">
|
||||
background_banner = #{record.backgroundBanner},
|
||||
</if>
|
||||
<if test="record.detailBanner != null">
|
||||
detail_banner = #{record.detailBanner},
|
||||
</if>
|
||||
<if test="record.areaStatus != null">
|
||||
area_status = #{record.areaStatus},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted},
|
||||
</if>
|
||||
<if test="record.createTime != null">
|
||||
create_time = #{record.createTime},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime},
|
||||
</if>
|
||||
<if test="record.updateUserId != null">
|
||||
update_user_id = #{record.updateUserId},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{record.id}
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<update id="batchUpdateById">
|
||||
update hy_open_area_info
|
||||
<set>
|
||||
<if test="backgroundBanner != null">
|
||||
background_banner = #{backgroundBanner},
|
||||
</if>
|
||||
<if test="detailBanner != null">
|
||||
detail_banner = #{detailBanner},
|
||||
</if>
|
||||
<if test="areaStatus != null">
|
||||
area_status = #{areaStatus},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="ids !=null and ids.size>0">
|
||||
<foreach collection="ids" item="id" open="and id in (" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
|
||||
<update id="batchUpdateByParentId">
|
||||
update hy_open_area_info
|
||||
<set>
|
||||
<if test="backgroundBanner != null">
|
||||
background_banner = #{backgroundBanner},
|
||||
</if>
|
||||
<if test="detailBanner != null">
|
||||
detail_banner = #{detailBanner},
|
||||
</if>
|
||||
<if test="areaStatus != null">
|
||||
area_status = #{areaStatus},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
</set>
|
||||
<where>
|
||||
<if test="parentIdList !=null and parentIdList.size>0">
|
||||
<foreach collection="parentIdList" item="parentId" open="and parent_id in (" close=")" separator=",">
|
||||
#{parentId}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</update>
|
||||
|
||||
<select id="queryKeyOpenArea" resultMap="BaseResultMap">
|
||||
select * from
|
||||
hy_open_area_info
|
||||
where area_status = 'keyOpen'
|
||||
and province_city_flag = 1
|
||||
and parent_id is not null
|
||||
</select>
|
||||
|
||||
<select id="queryByKeyword" resultMap="BaseResultMap">
|
||||
select * from
|
||||
hy_open_area_info
|
||||
<where>
|
||||
<if test="keyword!=null and keyword!=''">
|
||||
and area_path like concat('%',#{keyword},'%')
|
||||
</if>
|
||||
<if test="applyFlag!=null and applyFlag==true">
|
||||
and (area_status = 'open' or area_status = 'keyOpen')
|
||||
</if>
|
||||
<if test="areaStatus!=null and areaStatus!=''">
|
||||
and area_status = #{areaStatus}
|
||||
</if>
|
||||
<if test="filterData!=null and filterData==true">
|
||||
and province_city_flag = 1
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryFirstLevel" resultMap="BaseResultMap">
|
||||
select * from
|
||||
hy_open_area_info where parent_id is null
|
||||
</select>
|
||||
|
||||
|
||||
<select id="queryByIdsExcludeFirstLevel" resultMap="BaseResultMap">
|
||||
select * from
|
||||
hy_open_area_info where parent_id is not null
|
||||
<if test="ids !=null and ids.size>0">
|
||||
<foreach collection="ids" item="id" open="and id in (" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<select id="getChildrenList" resultMap="BaseResultMap">
|
||||
select * from
|
||||
hy_open_area_info
|
||||
<where>
|
||||
<if test="parentId!=null">
|
||||
and parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="type!=null and type == 'apply'">
|
||||
and (area_status = 'open' or area_status = 'keyOpen')
|
||||
</if>
|
||||
<if test="type!=null and type == 'reservation'">
|
||||
and (area_status='notOpen' or area_status = 'saturated')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getChildrenCount" resultType="java.lang.Integer">
|
||||
select count(1) from
|
||||
hy_open_area_info
|
||||
<where>
|
||||
<if test="parentId!=null">
|
||||
and parent_id = #{parentId}
|
||||
</if>
|
||||
<if test="type!=null and type == 'apply'">
|
||||
and (area_status = 'open' or area_status = 'keyOpen')
|
||||
</if>
|
||||
<if test="type!=null and type == 'reservation'">
|
||||
and (area_status='notOpen' or area_status = 'saturated')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByIds" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"></include>
|
||||
from hy_open_area_info
|
||||
<where>
|
||||
<if test="idList !=null and idList.size>0">
|
||||
<foreach collection="idList" item="id" open="and id in (" close=")" separator=",">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="getAllOpenArea" resultMap="BaseResultMap">
|
||||
select <include refid="Base_Column_List"/> from hy_open_area_info
|
||||
</select>
|
||||
|
||||
<select id="filterLeafNode" resultType="long">
|
||||
select
|
||||
id
|
||||
from
|
||||
hy_open_area_info
|
||||
where
|
||||
deleted = '0' and province_city_flag = '0' and id in <foreach collection="openAreaIds" item="openAreaId" separator="," open="(" close=")">#{openAreaId}</foreach>
|
||||
</select>
|
||||
<select id="getSonArea" resultType="com.cool.store.entity.HyOpenAreaInfoDO">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"></include>
|
||||
FROM hy_open_area_info
|
||||
WHERE parent_id = #{id}
|
||||
</select>
|
||||
<select id="getProvinceAllCode" resultMap="BaseResultMap">
|
||||
SELECT b.* FROM `hy_open_area_info` a inner join hy_open_area_info b on a.`id`=b.`parent_id`
|
||||
WHERE a.parent_id=#{id} ORDER BY b.id desc
|
||||
</select>
|
||||
<select id="selectByAreaPath" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"></include>
|
||||
FROM `hy_open_area_info`
|
||||
WHERE area_path= concat('/',#{areaPath},'/') and deleted=0 and province_city_flag=0
|
||||
</select>
|
||||
|
||||
<select id="selectAllCity" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"></include>
|
||||
FROM `hy_open_area_info`
|
||||
WHERE deleted=0 and province_city_flag = 1 and parent_id is not null
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,237 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyPartnerLabelGroupMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
<id column="id" property="id" />
|
||||
<result column="label_group_name" property="labelGroupName" />
|
||||
<result column="deleted" property="deleted" />
|
||||
<result column="edit_user_id" property="editUserId" />
|
||||
<result column="edit_date" property="editDate" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="create_user_id" property="createUserId" />
|
||||
<result column="update_user_id" property="updateUserId" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, label_group_name, deleted, edit_user_id, edit_date, create_time, update_time,
|
||||
create_user_id, update_user_id, remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_label_group
|
||||
where id = #{id}
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
<select id="selectSelective" resultType="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from hy_partner_label_group
|
||||
where deleted = 0
|
||||
<if test="labelGroupName != null and labelGroupName != ''">
|
||||
and label_group_name = #{labelGroupName}
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
and edit_user_id = #{editUserId}
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
and edit_date = #{editDate}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time =#{updateTime}
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
and create_user_id = #{createUserId}
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
and update_user_id = #{updateUserId}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
order by create_time
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_partner_label_group
|
||||
where id = #{id}
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="labelGroupName != null and labelGroupName != ''">
|
||||
and label_group_name like concat('%', #{labelGroupName}, '%')
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
and edit_user_id = #{editUserId}
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
and edit_date = #{editDate}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time =#{updateTime}
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
and create_user_id = #{createUserId}
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
and update_user_id = #{updateUserId}
|
||||
</if>
|
||||
<if test="remark != null and remark != ''">
|
||||
and remark like concat('%', #{remark}, '%')
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
insert into hy_partner_label_group (id, label_group_name, deleted,
|
||||
edit_user_id, edit_date, create_time,
|
||||
update_time, create_user_id, update_user_id,
|
||||
remark)
|
||||
values (#{id}, #{labelGroupName}, #{deleted},
|
||||
#{editUserId}, #{editDate}, #{createTime},
|
||||
#{updateTime}, #{createUserId}, #{updateUserId},
|
||||
#{remark})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
insert into hy_partner_label_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="labelGroupName != null and labelGroupName != ''">
|
||||
label_group_name,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
edit_user_id,
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
edit_date,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="labelGroupName != null">
|
||||
#{labelGroupName},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
#{deleted},
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
#{editUserId},
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
#{editDate},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
#{createUserId},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
update hy_partner_label_group
|
||||
<set>
|
||||
<if test="labelGroupName != null">
|
||||
label_group_name = #{labelGroupName},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
edit_user_id = #{editUserId},
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
edit_date = #{editDate},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id = #{createUserId},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerLabelGroupDO">
|
||||
update hy_partner_label_group
|
||||
set label_group_name = #{labelGroupName},
|
||||
deleted = #{deleted},
|
||||
edit_user_id = #{editUserId},
|
||||
edit_date = #{editDate},
|
||||
create_time = #{createTime},
|
||||
update_time = #{updateTime},
|
||||
create_user_id = #{createUserId},
|
||||
update_user_id = #{updateUserId},
|
||||
remark = #{remark}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<!-- 获取标签分组信息列表 -->
|
||||
<select id="getLabelGroupList" resultType="com.cool.store.vo.LabelGroupListVo">
|
||||
SELECT t1.id, t1.label_group_name, t2.`name` AS editName, t2.mobile AS editMobile, t1.edit_date
|
||||
FROM hy_partner_label_group t1
|
||||
LEFT JOIN enterprise_user t2 ON t1.edit_user_id = t2.user_id
|
||||
WHERE t1.deleted = 0
|
||||
<if test="labelGroupName != null and labelGroupName != ''">
|
||||
AND t1.label_group_name LIKE CONCAT('%', #{labelGroupName}, '%')
|
||||
</if>
|
||||
ORDER BY t1.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getLabelGroupListOrder" resultType="com.cool.store.vo.LabelGroupListVo">
|
||||
SELECT t1.id, t1.label_group_name, t2.`name` AS editName, t2.mobile AS editMobile, t1.edit_date
|
||||
FROM hy_partner_label_group t1
|
||||
LEFT JOIN enterprise_user t2 ON t1.edit_user_id = t2.user_id
|
||||
WHERE t1.deleted = 0
|
||||
<if test="labelGroupName != null and labelGroupName != ''">
|
||||
AND t1.label_group_name LIKE CONCAT('%', #{labelGroupName}, '%')
|
||||
</if>
|
||||
ORDER BY t1.create_time,t1.id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,234 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.HyPartnerLabelMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.HyPartnerLabelDO">
|
||||
<id column="id" property="id" />
|
||||
<result column="label_group_id" property="labelGroupId" />
|
||||
<result column="label_name" property="labelName" />
|
||||
<result column="edit_user_id" property="editUserId" />
|
||||
<result column="edit_date" property="editDate" />
|
||||
<result column="deleted" property="deleted" />
|
||||
<result column="create_time" property="createTime" />
|
||||
<result column="update_time" property="updateTime" />
|
||||
<result column="create_user_id" property="createUserId" />
|
||||
<result column="update_user_id" property="updateUserId" />
|
||||
<result column="remark" property="remark" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
id, label_group_id, label_name, edit_user_id, edit_date, deleted, create_time, update_time,
|
||||
create_user_id, update_user_id, remark
|
||||
</sql>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from hy_partner_label
|
||||
where deleted = 0
|
||||
and id = #{id}
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectSelective" resultType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
select <include refid="Base_Column_List"></include>
|
||||
from hy_partner_label
|
||||
where deleted = 0
|
||||
<if test="labelGroupId != null">
|
||||
and label_group_id = #{labelGroupId}
|
||||
</if>
|
||||
<if test="labelName != null and labelName != ''">
|
||||
and label_name = #{labelName}
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
and edit_user_id = #{editUserId}
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
and edit_date = #{editDate}
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
and create_time = #{createTime}
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
and update_time = #{updateTime}
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
and create_user_id = #{createUserId}
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
and update_user_id = #{updateUserId}
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
and remark = #{remark}
|
||||
</if>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||
delete from hy_partner_label
|
||||
where id = #{id}
|
||||
</delete>
|
||||
<insert id="insert" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
insert into hy_partner_label (id, label_group_id, label_name,
|
||||
edit_user_id, edit_date, deleted,
|
||||
create_time, update_time, create_user_id,
|
||||
update_user_id, remark)
|
||||
values (#{id}, #{labelGroupId}, #{labelName},
|
||||
#{editUserId}, #{editDate}, #{deleted},
|
||||
#{createTime}, #{updateTime}, #{createUserId},
|
||||
#{updateUserId}, #{remark})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
insert into hy_partner_label
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
id,
|
||||
</if>
|
||||
<if test="labelGroupId != null">
|
||||
label_group_id,
|
||||
</if>
|
||||
<if test="labelName != null">
|
||||
label_name,
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
edit_user_id,
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
edit_date,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id,
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id,
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">
|
||||
#{id},
|
||||
</if>
|
||||
<if test="labelGroupId != null">
|
||||
#{labelGroupId},
|
||||
</if>
|
||||
<if test="labelName != null">
|
||||
#{labelName},
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
#{editUserId},
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
#{editDate},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
#{deleted},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
#{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
#{createUserId},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
#{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
#{remark},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
update hy_partner_label
|
||||
<set>
|
||||
<if test="labelGroupId != null">
|
||||
label_group_id = #{labelGroupId},
|
||||
</if>
|
||||
<if test="labelName != null and labelName != ''">
|
||||
label_name = #{labelName},
|
||||
</if>
|
||||
<if test="editUserId != null">
|
||||
edit_user_id = #{editUserId},
|
||||
</if>
|
||||
<if test="editDate != null">
|
||||
edit_date = #{editDate},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted},
|
||||
</if>
|
||||
<if test="createTime != null">
|
||||
create_time = #{createTime},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime},
|
||||
</if>
|
||||
<if test="createUserId != null">
|
||||
create_user_id = #{createUserId},
|
||||
</if>
|
||||
<if test="updateUserId != null">
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark}
|
||||
</if>
|
||||
</set>
|
||||
where deleted = 0
|
||||
and id = #{id}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="com.cool.store.entity.HyPartnerLabelDO">
|
||||
update hy_partner_label
|
||||
set label_group_id = #{labelGroupId},
|
||||
label_name = #{labelName},
|
||||
edit_user_id = #{editUserId},
|
||||
edit_date = #{editDate},
|
||||
deleted = #{deleted},
|
||||
create_time = #{createTime},
|
||||
update_time = #{updateTime},
|
||||
create_user_id = #{createUserId},
|
||||
update_user_id = #{updateUserId},
|
||||
remark = #{remark}
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getLabelList" resultType="com.cool.store.vo.LabelListVo">
|
||||
SELECT t1.id, t2.id AS labelGroupId, t1.label_name, t2.label_group_name, t3.`name` AS editName, t3.mobile AS editMobile, t1.edit_date,t1.create_time as labelCreateTime,t2.create_time AS groupCreateTime
|
||||
FROM hy_partner_label t1
|
||||
LEFT JOIN hy_partner_label_group t2 ON t1.label_group_id = t2.id
|
||||
LEFT JOIN enterprise_user t3 ON t1.edit_user_id = t3.user_id
|
||||
WHERE t1.deleted = 0 AND t2.deleted = 0
|
||||
<if test="labelName != null and labelName != ''">
|
||||
AND t1.label_name LIKE CONCAT('%', #{labelName} ,'%')
|
||||
</if>
|
||||
<if test="labelGroupId != null">
|
||||
AND t2.id = #{labelGroupId}
|
||||
</if>
|
||||
ORDER BY t2.create_time asc ,t2.id asc
|
||||
</select>
|
||||
|
||||
<select id="whetherGroupInUse" resultType="java.lang.Boolean">
|
||||
SELECT COUNT(*)
|
||||
FROM hy_partner_label
|
||||
WHERE deleted = 0
|
||||
AND label_group_id = #{labelGroupId}
|
||||
</select>
|
||||
|
||||
<select id="getLabelListByIds" resultMap="BaseResultMap">
|
||||
select * from hy_partner_label where deleted = 0
|
||||
<if test="labelIds!=null and labelIds.size>0">
|
||||
<foreach collection="labelIds" item="labelId" open="and id in (" close=")" separator=",">
|
||||
#{labelId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContentAddDto {
|
||||
|
||||
@ApiModelProperty(value = "标题", required = true)
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty(value = "状态,0.启用1.禁用", required = true)
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty(value = "栏目code", required = true)
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty(value = "类型", required = true)
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty(value = "封面地址", required = true)
|
||||
private String cover;
|
||||
|
||||
@ApiModelProperty(value = "内容(文字信息或视频地址)", required = true)
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "创建用户id", required = true)
|
||||
private String createUserId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContentDelDto {
|
||||
|
||||
@ApiModelProperty("动态id")
|
||||
private String contentId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContentQueryDetailDto {
|
||||
|
||||
@ApiModelProperty("动态id")
|
||||
private String contentId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class ContentQueryListDto extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("栏目Code")
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型,默认选中全部时不传值")
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("筛选开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty("筛选结束时间")
|
||||
private String endTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContentQueryTitlesDto {
|
||||
|
||||
@ApiModelProperty("用户输入标题")
|
||||
private String title;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.cool.store.dto.content;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ContentUpdateDto {
|
||||
|
||||
@ApiModelProperty(value = "动态id", required = true)
|
||||
private String contentId;
|
||||
|
||||
@ApiModelProperty("标题")
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("状态,0.启用1.禁用")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("栏目code")
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型")
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("封面地址")
|
||||
private String cover;
|
||||
|
||||
@ApiModelProperty("内容(文字信息或视频地址)")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty(value = "更新用户id", required = true)
|
||||
private String updateUserId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 15:55
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelAddDTO {
|
||||
|
||||
@ApiModelProperty(value = "标签名称", required = true)
|
||||
private String labelName;
|
||||
|
||||
@ApiModelProperty(value = "标签组id", required = true)
|
||||
private Long labelGroupId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 16:43
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelDeleteDTO {
|
||||
|
||||
@ApiModelProperty(value = "标签id", required = true)
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:28
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelGroupAddDTO {
|
||||
|
||||
@ApiModelProperty(value = "标签组名称", required = true)
|
||||
private @NotBlank(message = "镖标签组名称不能为空")
|
||||
String labelGroupName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:29
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelGroupDeleteDTO {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:29
|
||||
* @version 1.0
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class LabelGroupListDTO extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty(value = "标签组名称", required = false)
|
||||
private String labelGroupName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:30
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelGroupUpdateDTO {
|
||||
|
||||
@ApiModelProperty(value = "id", required = true)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "标签组名称", required = true)
|
||||
private @NotBlank(message = "标签组名称不能为空")
|
||||
String labelGroupName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import com.cool.store.common.PageBasicInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:46
|
||||
* @version 1.0
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class LabelListDTO extends PageBasicInfo {
|
||||
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private String labelName;
|
||||
|
||||
@ApiModelProperty(value = "标签组id")
|
||||
private Long labelGroupId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.cool.store.dto.label;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 16:03
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelUpdateDTO {
|
||||
|
||||
@ApiModelProperty(value = "标签id", required = true)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "标签名称", required = true)
|
||||
private String labelName;
|
||||
|
||||
@ApiModelProperty(value = "标签组id", required = true)
|
||||
private Long labelGroupId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zhangchenbiao
|
||||
* @date 2023-05-29 03:50
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HyContentInfoDO implements Serializable {
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("内容标题")
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("栏目CODE")
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型 image-图文 video-视频")
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("封面URL")
|
||||
private String cover;
|
||||
|
||||
@ApiModelProperty("状态 0-启用 1-禁用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("删除标志 0-正常 1-删除")
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private String updateTime;
|
||||
|
||||
@ApiModelProperty("新建人ID")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("更新人ID")
|
||||
private String updateUserId;
|
||||
|
||||
@ApiModelProperty("图文内容或者视频文件URL")
|
||||
private String content;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author zhangchenbiao
|
||||
* @date 2024-05-29 03:51
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class HyOpenAreaInfoDO implements Serializable {
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("parent.id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("区域路径")
|
||||
private String areaPath;
|
||||
|
||||
@ApiModelProperty("背景图URL 重点区域时候必填")
|
||||
private String backgroundBanner;
|
||||
|
||||
@ApiModelProperty("详情banner URL 重点区域时候必填")
|
||||
private String detailBanner;
|
||||
|
||||
@ApiModelProperty("状态 open-开放 keyOpen-重点开放 notOpen-未开放 saturated-已饱和")
|
||||
private String areaStatus;
|
||||
|
||||
@ApiModelProperty("删除标志 0-正常 1-删除")
|
||||
private Integer deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUserId;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Fun Li
|
||||
* @date 2023/08/10
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class HyPartnerLabelDO {
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("标签组id hy_partner_label_group.id")
|
||||
private Long labelGroupId;
|
||||
|
||||
@ApiModelProperty("标签名")
|
||||
private String labelName;
|
||||
|
||||
@ApiModelProperty("编辑人user_id(enterprise_user.user_id)")
|
||||
private String editUserId;
|
||||
|
||||
@ApiModelProperty("编辑时间")
|
||||
private Date editDate;
|
||||
|
||||
@ApiModelProperty("删除标识")
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("创建人")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUserId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:31
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class HyPartnerLabelGroupDO {
|
||||
|
||||
@ApiModelProperty("id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("标签组名称")
|
||||
|
||||
private String labelGroupName;
|
||||
|
||||
@ApiModelProperty("删除标识")
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("编辑人user_id(enterprise_user.user_id)")
|
||||
private String editUserId;
|
||||
|
||||
@ApiModelProperty("编辑时间")
|
||||
private Date editDate;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("创建人(enterprise_user.user_id)")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("更新人(enterprise_user.user_id)")
|
||||
private String updateUserId;
|
||||
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/31 14:27
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class OpenAreaRequest {
|
||||
|
||||
@ApiModelProperty("开发区域ID集合")
|
||||
private List<Long> idList;
|
||||
|
||||
@ApiModelProperty("开放区域状态")
|
||||
private String status;
|
||||
|
||||
@ApiModelProperty("背景banner")
|
||||
private String backgroundBanner;
|
||||
|
||||
@ApiModelProperty("详细Banner")
|
||||
private String detailBanner;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.enums.ContentSubjectEnum;
|
||||
import com.cool.store.enums.ContentTypeEnum;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class HyContentInfoVO {
|
||||
|
||||
@ApiModelProperty("")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("内容标题")
|
||||
private String contentTitle;
|
||||
|
||||
@ApiModelProperty("栏目CODE")
|
||||
private ContentSubjectEnum subject;
|
||||
|
||||
@ApiModelProperty("类型 image-图文 video-视频")
|
||||
private ContentTypeEnum contentType;
|
||||
|
||||
@ApiModelProperty("封面URL")
|
||||
private String cover;
|
||||
|
||||
@ApiModelProperty("状态 0-启用 1-禁用")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private String createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private String updateTime;
|
||||
|
||||
@ApiModelProperty("新建人ID")
|
||||
private String createUserId;
|
||||
|
||||
@ApiModelProperty("更新人ID")
|
||||
private String updateUserId;
|
||||
|
||||
@ApiModelProperty("更新人姓名")
|
||||
private String updateUserName;
|
||||
|
||||
@ApiModelProperty("更新人电话")
|
||||
private String updateUserPhone;
|
||||
|
||||
@ApiModelProperty("图文内容或者视频文件URL")
|
||||
private String content;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:33
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelGroupListVo {
|
||||
|
||||
@ApiModelProperty("标签组id")
|
||||
private long id;
|
||||
|
||||
@ApiModelProperty("标签组名称")
|
||||
private String labelGroupName;
|
||||
|
||||
@ApiModelProperty("编辑人姓名")
|
||||
private String editName;
|
||||
|
||||
@ApiModelProperty("编辑人电话")
|
||||
private String editMobile;
|
||||
|
||||
@ApiModelProperty("编辑时间")
|
||||
private Date editDate;
|
||||
|
||||
@ApiModelProperty("标签列表")
|
||||
private List<LabelListVo> labelList;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class LabelGroupVO {
|
||||
@ApiModelProperty(value = "标签组ID")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "标签组名称")
|
||||
private String labelGroupName;
|
||||
@ApiModelProperty(value = "标签组创建时间")
|
||||
private Date groupCreateTime;
|
||||
@ApiModelProperty(value = "标签列表")
|
||||
private List<LabelVO> labelList;
|
||||
@Data
|
||||
public static class LabelVO {
|
||||
@ApiModelProperty(value = "标签ID")
|
||||
private Long id;
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private String labelName;
|
||||
@ApiModelProperty(value = "标签创建时间")
|
||||
private Date labelCreateTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:42
|
||||
* @version 1.0
|
||||
*/
|
||||
@Data
|
||||
public class LabelListVo {
|
||||
|
||||
@ApiModelProperty(value = "标签名称")
|
||||
private String labelName;
|
||||
|
||||
@ApiModelProperty(value = "标签组名称")
|
||||
private String labelGroupName;
|
||||
|
||||
@ApiModelProperty(value = "编辑人姓名")
|
||||
private String editName;
|
||||
|
||||
@ApiModelProperty(value = "编辑人电话")
|
||||
private String editMobile;
|
||||
|
||||
@ApiModelProperty(value = "编辑时间")
|
||||
private Date editDate;
|
||||
|
||||
@ApiModelProperty(value = "标签id")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "标签分组id")
|
||||
private Long labelGroupId;
|
||||
|
||||
@ApiModelProperty(value = "标签创建时间")
|
||||
private Date labelCreateTime;
|
||||
|
||||
@ApiModelProperty(value = "标签组创建时间")
|
||||
private Date groupCreateTime;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/14 11:28
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class OpenAreaSingleVO {
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("parent.id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.enums.AreaStatusEnum;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/2 10:55
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
@Slf4j
|
||||
public class OpenAreaTreeVO {
|
||||
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("parent.id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("区域路径")
|
||||
private String areaPath;
|
||||
|
||||
@ApiModelProperty("状态 open-开放 keyOpen-重点开放 notOpen-未开放 saturated-已饱和")
|
||||
private String areaStatus;
|
||||
|
||||
private String backgroundBanner;
|
||||
|
||||
private String detailBanner;
|
||||
|
||||
@ApiModelProperty("子区域")
|
||||
private List<OpenAreaTreeVO> childNode;
|
||||
|
||||
|
||||
public static List<OpenAreaTreeVO> convertTree(List<HyOpenAreaInfoDO> allOpenArea, String keyword, Boolean applyFlag){
|
||||
long startTime = System.currentTimeMillis();
|
||||
List<HyOpenAreaInfoDO> firstArea = allOpenArea.stream().filter(o -> Objects.isNull(o.getParentId())).collect(Collectors.toList());
|
||||
Map<Long, List<HyOpenAreaInfoDO>> openAreaParentMap = allOpenArea.stream().distinct().filter(o->Objects.nonNull(o.getParentId())).collect(Collectors.groupingBy(k -> k.getParentId()));
|
||||
List<OpenAreaTreeVO> allTree = new ArrayList<>();
|
||||
for (HyOpenAreaInfoDO openAreaInfo : firstArea) {
|
||||
OpenAreaTreeVO node = copyProperties(openAreaInfo);
|
||||
List<OpenAreaTreeVO> childList = dealChild(openAreaInfo, openAreaParentMap);
|
||||
node.setChildNode(childList);
|
||||
allTree.add(node);
|
||||
}
|
||||
//不需要过滤 直接返回
|
||||
if(StringUtils.isBlank(keyword) && (Objects.isNull(applyFlag) || !applyFlag)){
|
||||
return allTree;
|
||||
}
|
||||
log.info("1#耗时:{}", System.currentTimeMillis() - startTime);
|
||||
Map<Long, List<OpenAreaTreeVO>> childMap = allTree.stream().collect(Collectors.toMap(k -> k.getId(), v -> v.getChildNode()));
|
||||
List<HyOpenAreaInfoDO> filterList = allOpenArea.stream().filter(o -> (StringUtils.isBlank(keyword) || o.getAreaPath().contains(keyword))
|
||||
&& (Objects.isNull(applyFlag) || AreaStatusEnum.OPEN.getCode().equals(o.getAreaStatus()) || AreaStatusEnum.OPEN.getCode().equals(o.getAreaStatus())))
|
||||
.collect(Collectors.toList());
|
||||
Map<Long, HyOpenAreaInfoDO> openAreaMap = allOpenArea.stream().collect(Collectors.toMap(k -> k.getId(), Function.identity()));
|
||||
List<HyOpenAreaInfoDO> filterAndParentList = new ArrayList<>();
|
||||
//向上处理节点
|
||||
for (HyOpenAreaInfoDO openAreaInfo : filterList) {
|
||||
filterAndParentList.add(openAreaInfo);
|
||||
while (Objects.nonNull(openAreaInfo) && Objects.nonNull(openAreaInfo.getParentId())){
|
||||
openAreaInfo = openAreaMap.get(openAreaInfo.getParentId());
|
||||
if(Objects.nonNull(openAreaInfo) && !filterAndParentList.contains(openAreaInfo)){
|
||||
filterAndParentList.add(openAreaInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
log.info("2#耗时:{}", System.currentTimeMillis() - startTime);
|
||||
List<OpenAreaTreeVO> resultList = new ArrayList<>();
|
||||
List<HyOpenAreaInfoDO> filterFirstArea = filterAndParentList.stream().filter(o -> Objects.isNull(o.getParentId())).collect(Collectors.toList());
|
||||
Map<Long, List<HyOpenAreaInfoDO>> filterOpenAreaParentMap = filterAndParentList.stream().filter(Objects::nonNull).filter(o->Objects.nonNull(o.getParentId())).collect(Collectors.groupingBy(k -> k.getParentId()));
|
||||
for (HyOpenAreaInfoDO openAreaInfo : filterFirstArea) {
|
||||
Long id = openAreaInfo.getId();
|
||||
OpenAreaTreeVO node = copyProperties(openAreaInfo);
|
||||
List<OpenAreaTreeVO> childList = dealChild(openAreaInfo, filterOpenAreaParentMap);
|
||||
if(CollectionUtils.isEmpty(childList)){
|
||||
childList = childMap.get(node.getId());
|
||||
}
|
||||
node.setChildNode(childList);
|
||||
resultList.add(node);
|
||||
}
|
||||
log.info("2#耗时:{}", System.currentTimeMillis() - startTime);
|
||||
return resultList;
|
||||
}
|
||||
|
||||
public static List<OpenAreaTreeVO> dealChild(HyOpenAreaInfoDO areaInfo, Map<Long, List<HyOpenAreaInfoDO>> openAreaParentMap){
|
||||
List<HyOpenAreaInfoDO> childList = openAreaParentMap.get(areaInfo.getId());
|
||||
if(CollectionUtils.isEmpty(childList)){
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<OpenAreaTreeVO> resultList = new ArrayList<>();
|
||||
for (HyOpenAreaInfoDO hyOpenAreaInfo : childList) {
|
||||
OpenAreaTreeVO openAreaTree = copyProperties(hyOpenAreaInfo);
|
||||
openAreaTree.setChildNode(dealChild(hyOpenAreaInfo, openAreaParentMap));
|
||||
resultList.add(openAreaTree);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性处理
|
||||
* @param area
|
||||
* @return
|
||||
*/
|
||||
public static OpenAreaTreeVO copyProperties(HyOpenAreaInfoDO area){
|
||||
OpenAreaTreeVO result = new OpenAreaTreeVO();
|
||||
result.setId(area.getId());
|
||||
result.setParentId(area.getParentId());
|
||||
result.setAreaName(area.getAreaName());
|
||||
result.setAreaPath(area.getAreaPath());
|
||||
result.setAreaStatus(area.getAreaStatus());
|
||||
result.setBackgroundBanner(area.getBackgroundBanner());
|
||||
result.setDetailBanner(area.getDetailBanner());
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 开放城市VO
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/29 16:27
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class OpenAreaVO {
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("parent.id")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty("区域名称")
|
||||
private String areaName;
|
||||
|
||||
@ApiModelProperty("区域路径")
|
||||
private String areaPath;
|
||||
|
||||
@ApiModelProperty("背景图URL 重点区域时候必填")
|
||||
private String backgroundBanner;
|
||||
|
||||
@ApiModelProperty("详情banner URL 重点区域时候必填")
|
||||
private String detailBanner;
|
||||
|
||||
@ApiModelProperty("状态 open-开放 keyOpen-重点开放 notOpen-未开放 saturated-已饱和")
|
||||
private String areaStatus;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private Date updateTime;
|
||||
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUserId;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/5/29 19:46
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class OpenProvinceVO {
|
||||
|
||||
@ApiModelProperty("可申请省份")
|
||||
List<OpenAreaVO> applyProvinceList;
|
||||
|
||||
@ApiModelProperty("可预约省份")
|
||||
List<OpenAreaVO> reservationProvinceList;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.cool.store.enums.LineStatusEnum;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/2 10:29
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel
|
||||
public class PartnerUserInfoVO {
|
||||
|
||||
@ApiModelProperty("ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty("hy_partner_user_info.partner_id")
|
||||
private String partnerId;
|
||||
|
||||
@ApiModelProperty("手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty("申请人姓名")
|
||||
private String username;
|
||||
|
||||
@ApiModelProperty("常驻区域")
|
||||
private String liveArea;
|
||||
|
||||
@ApiModelProperty("意向开店区域ID")
|
||||
private String wantShopArea;
|
||||
|
||||
@ApiModelProperty("意向开店区域名称")
|
||||
private String wantShopAreaName;
|
||||
|
||||
@ApiModelProperty("0不接受调剂、1全国调剂、2省内调剂、3市内调剂")
|
||||
private Integer acceptAdjustType;
|
||||
|
||||
@ApiModelProperty("邀请码")
|
||||
private String inviteCode;
|
||||
|
||||
@ApiModelProperty("是否填写加盟需知")
|
||||
private Integer isWritePartnerKnow;
|
||||
|
||||
@ApiModelProperty("openid")
|
||||
private String openid;
|
||||
|
||||
@ApiModelProperty("unionid")
|
||||
private String unionId;
|
||||
|
||||
@ApiModelProperty("是否需要提交意向信息")
|
||||
private Boolean needSubmitWantInfo;
|
||||
|
||||
@ApiModelProperty("线索id")
|
||||
private Long partnerLineId;
|
||||
|
||||
private Integer lineStatus;
|
||||
|
||||
public Boolean getNeedSubmitWantInfo() {
|
||||
//如果是私海 且liveArea与acceptAdjustType是空 说明通过会销进入 返回false
|
||||
if (LineStatusEnum.PRIVATE_SEAS.getCode().equals(lineStatus)&&StringUtils.isBlank(liveArea)
|
||||
&& Objects.isNull(acceptAdjustType)){
|
||||
return false;
|
||||
}
|
||||
if((StringUtils.isBlank(username)
|
||||
|| StringUtils.isBlank(mobile)
|
||||
|| StringUtils.isBlank(liveArea)
|
||||
|| StringUtils.isBlank(wantShopArea)
|
||||
|| Objects.isNull(acceptAdjustType))){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -14,35 +14,35 @@ public class CurrentUserHolder {
|
||||
|
||||
private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();
|
||||
|
||||
// public static LoginUserInfo getUser() {
|
||||
// String userStr = contextHolder.get();
|
||||
// if (StringUtils.isNotBlank(userStr)) {
|
||||
// return JSON.parseObject(userStr, LoginUserInfo.class);
|
||||
// }
|
||||
// return new LoginUserInfo();
|
||||
// }
|
||||
//
|
||||
// public static void setUser(String user) {
|
||||
// contextHolder.set(user);
|
||||
// }
|
||||
//
|
||||
// public static void removeUser(){
|
||||
// contextHolder.remove();
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 仅登录态可获取
|
||||
// * @return
|
||||
// */
|
||||
// public static String getUserId(){
|
||||
// LoginUserInfo user = getUser();
|
||||
// return Optional.ofNullable(user).map(o->o.getUserId()).orElseThrow(()->new ServiceException(ErrorCodeEnum.ACCESS_TOKEN_INVALID));
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 仅登录态可获取
|
||||
// * @return
|
||||
// */
|
||||
public static LoginUserInfo getUser() {
|
||||
String userStr = contextHolder.get();
|
||||
if (StringUtils.isNotBlank(userStr)) {
|
||||
return JSON.parseObject(userStr, LoginUserInfo.class);
|
||||
}
|
||||
return new LoginUserInfo();
|
||||
}
|
||||
|
||||
public static void setUser(String user) {
|
||||
contextHolder.set(user);
|
||||
}
|
||||
|
||||
public static void removeUser(){
|
||||
contextHolder.remove();
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅登录态可获取
|
||||
* @return
|
||||
*/
|
||||
public static String getUserId(){
|
||||
LoginUserInfo user = getUser();
|
||||
return Optional.ofNullable(user).map(o->o.getUserId()).orElseThrow(()->new ServiceException(ErrorCodeEnum.ACCESS_TOKEN_INVALID));
|
||||
}
|
||||
|
||||
/**
|
||||
* 仅登录态可获取
|
||||
* @return
|
||||
*/
|
||||
// public static String getRoleId(){
|
||||
// LoginUserInfo user = getUser();
|
||||
// return Optional.ofNullable(user).map(LoginUserInfo::getSysRole).map(SysRoleDO::getRoleId).orElse(null);
|
||||
|
||||
@@ -5,30 +5,30 @@ import lombok.Data;
|
||||
@Data
|
||||
public class LoginUserInfo {
|
||||
|
||||
// private String userId;
|
||||
//
|
||||
// private String name;
|
||||
//
|
||||
// private String mobile;
|
||||
//
|
||||
// private String accessToken;
|
||||
//
|
||||
// /**
|
||||
// * 员工角色
|
||||
// */
|
||||
// private String roleIds;
|
||||
//
|
||||
// /**
|
||||
// * 钉钉管理员和数智门店无关
|
||||
// */
|
||||
// private Boolean isAdmin;
|
||||
//
|
||||
// /**
|
||||
// * 头像
|
||||
// */
|
||||
// private String avatar;
|
||||
//
|
||||
private String userId;
|
||||
|
||||
private String name;
|
||||
|
||||
private String mobile;
|
||||
|
||||
private String accessToken;
|
||||
|
||||
/**
|
||||
* 员工角色
|
||||
*/
|
||||
private String roleIds;
|
||||
|
||||
/**
|
||||
* 钉钉管理员和数智门店无关
|
||||
*/
|
||||
private Boolean isAdmin;
|
||||
|
||||
/**
|
||||
* 头像
|
||||
*/
|
||||
private String avatar;
|
||||
|
||||
// private SysRoleDO sysRole;
|
||||
//
|
||||
// private Integer onlineStatus;
|
||||
|
||||
private Integer onlineStatus;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.context;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
@@ -8,23 +9,23 @@ import org.apache.commons.lang3.StringUtils;
|
||||
*/
|
||||
public class PartnerUserHolder {
|
||||
|
||||
// private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();
|
||||
//
|
||||
// public static PartnerUserInfoVO getUser() {
|
||||
// String userStr = contextHolder.get();
|
||||
// if (StringUtils.isNotBlank(userStr)) {
|
||||
// return JSON.parseObject(userStr, PartnerUserInfoVO.class);
|
||||
// }
|
||||
// return new PartnerUserInfoVO();
|
||||
// }
|
||||
//
|
||||
// public static void setUser(String user) {
|
||||
// contextHolder.set(user);
|
||||
// }
|
||||
//
|
||||
// public static void removeUser(){
|
||||
// contextHolder.remove();
|
||||
// }
|
||||
private static final ThreadLocal<String> contextHolder = new ThreadLocal<String>();
|
||||
|
||||
public static PartnerUserInfoVO getUser() {
|
||||
String userStr = contextHolder.get();
|
||||
if (StringUtils.isNotBlank(userStr)) {
|
||||
return JSON.parseObject(userStr, PartnerUserInfoVO.class);
|
||||
}
|
||||
return new PartnerUserInfoVO();
|
||||
}
|
||||
|
||||
public static void setUser(String user) {
|
||||
contextHolder.set(user);
|
||||
}
|
||||
|
||||
public static void removeUser(){
|
||||
contextHolder.remove();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.content.ContentAddDto;
|
||||
import com.cool.store.dto.content.ContentQueryListDto;
|
||||
import com.cool.store.dto.content.ContentUpdateDto;
|
||||
import com.cool.store.entity.HyContentInfoDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.HyContentInfoVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ContentService {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dto
|
||||
* @return contentId 新增动态id
|
||||
*/
|
||||
String addNews(ContentAddDto dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 删除动态
|
||||
* @param contentId
|
||||
*/
|
||||
void deleteContent(String contentId);
|
||||
|
||||
/**
|
||||
* 更新动态信息
|
||||
* @param dto
|
||||
*/
|
||||
void updateContent(ContentUpdateDto dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 查询动态列表
|
||||
*/
|
||||
List<HyContentInfoVO> queryContentList(ContentQueryListDto dto);
|
||||
|
||||
/**
|
||||
* 查询动态列表 C 端用
|
||||
*/
|
||||
List<HyContentInfoVO> queryContentListToC(ContentQueryListDto dto);
|
||||
|
||||
/**
|
||||
* 查询动态详情
|
||||
* @param contentId
|
||||
* @return
|
||||
*/
|
||||
HyContentInfoDO queryContentInfo(String contentId);
|
||||
|
||||
/**
|
||||
* 标题是否重复
|
||||
*/
|
||||
Boolean queryTitles(String title);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.label.LabelGroupAddDTO;
|
||||
import com.cool.store.dto.label.LabelGroupDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelGroupListDTO;
|
||||
import com.cool.store.dto.label.LabelGroupUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:34
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface LabelGroupService {
|
||||
|
||||
/**
|
||||
* 查询标签组信息列表
|
||||
* @param dto 查询条件
|
||||
*/
|
||||
List<LabelGroupListVo> getLabelGroupList(LabelGroupListDTO dto);
|
||||
|
||||
/**
|
||||
* 添加标签组
|
||||
* @param dto 新增标签组信息
|
||||
*/
|
||||
void addLabelGroup(LabelGroupAddDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 修改标签组信息
|
||||
* @param dto 修改内容
|
||||
*/
|
||||
void updateLabelGroup(LabelGroupUpdateDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 删除标签组
|
||||
* @param dto 待删除标签组信息
|
||||
*/
|
||||
void deleteLabelGroup(LabelGroupDeleteDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 获取所有标签组
|
||||
*/
|
||||
List<LabelGroupListVo> getAllLabelGroupList();
|
||||
|
||||
/**
|
||||
* 添加ec标签组
|
||||
* @param hyPartnerLabelGroupDO
|
||||
*/
|
||||
void addEcLabelGroup(HyPartnerLabelGroupDO hyPartnerLabelGroupDO);
|
||||
|
||||
HyPartnerLabelGroupDO selectByPrimaryKey(Long id);
|
||||
|
||||
List<LabelGroupListVo> getLabelGroupListOrder();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.dto.label.LabelAddDTO;
|
||||
import com.cool.store.dto.label.LabelDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.dto.label.LabelUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.vo.LabelGroupVO;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:23
|
||||
* @version 1.0
|
||||
*/
|
||||
public interface LabelService {
|
||||
|
||||
/**
|
||||
* 获取数组列表
|
||||
*
|
||||
* @param dto 查询条件
|
||||
*/
|
||||
List<LabelListVo> getLabelList(LabelListDTO dto);
|
||||
|
||||
/**
|
||||
* 添加标签组
|
||||
* @param dto 新增标签组信息
|
||||
*/
|
||||
void addLabel(LabelAddDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 标签MAP
|
||||
* @param userPortraitStrList
|
||||
* @return
|
||||
*/
|
||||
Map<Long,String> getUserPortraitMap(List<String> userPortraitStrList);
|
||||
|
||||
/**
|
||||
* 查询标签中文名称集合
|
||||
* @param userPortraitMap
|
||||
* @param userPortraitStr
|
||||
* @return
|
||||
*/
|
||||
List<String> getUserPortraitList(Map<Long,String> userPortraitMap,String userPortraitStr);
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
* @param dto 新标签信息
|
||||
*/
|
||||
void updateLabel(LabelUpdateDTO dto) throws ApiException;
|
||||
|
||||
/**
|
||||
* 删除标签
|
||||
* @param dto
|
||||
*/
|
||||
void deleteLabel(LabelDeleteDTO dto);
|
||||
|
||||
HyPartnerLabelDO selectByPrimaryKey(Long classId);
|
||||
|
||||
void addEcLabel(HyPartnerLabelDO hyPartnerLabelDO);
|
||||
|
||||
List<LabelGroupVO> getAllGroupAndLabelList();
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.request.OpenAreaRequest;
|
||||
import com.cool.store.vo.OpenAreaTreeVO;
|
||||
import com.cool.store.vo.OpenAreaVO;
|
||||
import com.cool.store.vo.OpenProvinceVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/3/13 22:11
|
||||
* @Version 1.0
|
||||
*/
|
||||
public interface OpenAreaService {
|
||||
|
||||
|
||||
/**
|
||||
* 根据关键字搜索
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<OpenAreaTreeVO> queryByKeyword(String keyword,String areaStatus,Boolean flag);
|
||||
|
||||
|
||||
/**
|
||||
* 查询所有的开放区域 城市树
|
||||
* @param keyword
|
||||
* @param flag
|
||||
* @return
|
||||
*/
|
||||
List<OpenAreaTreeVO> queryAllOpenAreaByKeyword(String keyword,Boolean applyFlag,Boolean flag);
|
||||
|
||||
|
||||
/**
|
||||
* 查询字列表
|
||||
* @param type
|
||||
* @param parentId
|
||||
* @return
|
||||
*/
|
||||
List<OpenAreaVO> getChildrenList(String type, Long parentId);
|
||||
|
||||
/**
|
||||
*
|
||||
* @param userId
|
||||
* @param openAreaRequest
|
||||
* @return
|
||||
*/
|
||||
Boolean batchUpdate(String userId, OpenAreaRequest openAreaRequest);
|
||||
|
||||
|
||||
PageInfo<OpenAreaVO> queryKeyOpenAreaList(Integer pageSize, Integer pageNumber);
|
||||
|
||||
/**
|
||||
* V1.4
|
||||
* 意向区域添加不限
|
||||
* 每个市下面添加一个不限
|
||||
*/
|
||||
Boolean addOpenArea();
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: WechatMiniAppService
|
||||
* @Description:
|
||||
* @date 2023-05-29 14:28
|
||||
*/
|
||||
public interface WechatMiniAppService {
|
||||
|
||||
// PartnerUserInfoVO miniProgramLogin(MiniProgramLoginDTO param);
|
||||
//
|
||||
// String getUserPhoneNumber(String mobileCode);
|
||||
//
|
||||
// String updateUserPhoneNumber(MobileUpdateRequest request, PartnerUserInfoVO userInfoVO);
|
||||
//
|
||||
PartnerUserInfoVO getUserInfo(String mobile, String openId);
|
||||
//
|
||||
// String getMiniAppUrl();
|
||||
//
|
||||
// String getMiniAppUrlLink(MiniAppUrlLinkReqDTO miniAppUrlLinkReqDTO);
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.RedisConstant;
|
||||
import com.cool.store.dao.ContentDAO;
|
||||
import com.cool.store.dto.content.ContentAddDto;
|
||||
import com.cool.store.dto.content.ContentQueryListDto;
|
||||
import com.cool.store.dto.content.ContentUpdateDto;
|
||||
import com.cool.store.entity.HyContentInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyContentInfoMapper;
|
||||
import com.cool.store.service.ContentService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.HyContentInfoVO;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ContentServiceImpl implements ContentService {
|
||||
|
||||
@Autowired
|
||||
private ContentDAO contentDAO;
|
||||
|
||||
@Autowired
|
||||
private HyContentInfoMapper contentInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private RedisUtilPool redisUtilPool;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param dto
|
||||
* @return contentId 新增动态id
|
||||
*/
|
||||
@Override
|
||||
public String addNews(ContentAddDto dto) throws ApiException {
|
||||
//增加不允许重复标题的逻辑
|
||||
Boolean isDuplicated = contentInfoMapper.whetherTitleDuplicated(dto.getContentTitle());
|
||||
if (isDuplicated) {
|
||||
throw new ApiException(ErrorCodeEnum.CONTENT_DUPLICATED);
|
||||
}
|
||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
||||
hyContentInfoDO.setUpdateUserId(dto.getCreateUserId());
|
||||
return Integer.toString(contentInfoMapper.insertSelective(hyContentInfoDO));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除动态
|
||||
* @param contentId
|
||||
*/
|
||||
@Override
|
||||
public void deleteContent(String contentId) {
|
||||
contentInfoMapper.deleteSelective(contentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新动态信息
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public void updateContent(ContentUpdateDto dto) throws ApiException {
|
||||
HyContentInfoDO hyContentInfoDO = new HyContentInfoDO();
|
||||
BeanUtil.copyProperties(dto, hyContentInfoDO);
|
||||
hyContentInfoDO.setId(Long.parseLong(dto.getContentId()));
|
||||
contentInfoMapper.updateByPrimaryKeySelective(hyContentInfoDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询动态列表
|
||||
*/
|
||||
@Override
|
||||
public List<HyContentInfoVO> queryContentList(ContentQueryListDto dto) {
|
||||
return contentInfoMapper.queryContentList(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询动态列表 C 端用
|
||||
*/
|
||||
@Override
|
||||
public List<HyContentInfoVO> queryContentListToC(ContentQueryListDto dto) {
|
||||
return contentInfoMapper.queryContentListForC(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询动态详情
|
||||
* @param contentId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public HyContentInfoDO queryContentInfo(String contentId) {
|
||||
return contentInfoMapper.queryContentInfo(contentId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 标题是否重复
|
||||
*/
|
||||
@Override
|
||||
public Boolean queryTitles(String title) {
|
||||
List<String> titles = (List<String>) JSONObject.parseObject(redisUtilPool.getString(RedisConstant.CONTENT_TITLES), List.class);
|
||||
if (titles != null && titles.size() != 0) {
|
||||
return titles.contains(title);
|
||||
}
|
||||
titles = contentInfoMapper.queryTitles();
|
||||
redisUtilPool.setString(RedisConstant.CONTENT_TITLES, JSONObject.toJSONString(titles), 60);
|
||||
return titles.contains(title);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,161 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.label.LabelGroupAddDTO;
|
||||
import com.cool.store.dto.label.LabelGroupDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelGroupListDTO;
|
||||
import com.cool.store.dto.label.LabelGroupUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyPartnerLabelGroupMapper;
|
||||
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||
import com.cool.store.service.LabelGroupService;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 13:35
|
||||
* @version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class LabelGroupServiceImpl implements LabelGroupService {
|
||||
|
||||
@Autowired
|
||||
private HyPartnerLabelGroupMapper labelGroupMapper;
|
||||
|
||||
@Autowired
|
||||
private HyPartnerLabelMapper labelMapper;
|
||||
|
||||
|
||||
@Value("${ec.sync.createUserId:null}")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 查询标签组信息列表
|
||||
* @param dto 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<LabelGroupListVo> getLabelGroupList(LabelGroupListDTO dto) {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
|
||||
return labelGroupMapper.getLabelGroupList(labelGroupDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加标签组
|
||||
* @param dto 新增标签组信息
|
||||
*/
|
||||
@Override
|
||||
public void addLabelGroup(LabelGroupAddDTO dto) throws ApiException {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
|
||||
if (whetherGroupDuplicated(labelGroupDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelGroupDO.setEditUserId(userId);
|
||||
labelGroupDO.setEditDate(new Date());
|
||||
labelGroupDO.setCreateUserId(userId);
|
||||
labelGroupDO.setUpdateUserId(userId);
|
||||
labelGroupMapper.insertSelective(labelGroupDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改标签组信息
|
||||
* @param dto 修改内容
|
||||
*/
|
||||
@Override
|
||||
public void updateLabelGroup(LabelGroupUpdateDTO dto) throws ApiException {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
|
||||
labelGroupDO.setId(dto.getId());
|
||||
if (whetherGroupDuplicated(labelGroupDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelGroupDO.setId(dto.getId());
|
||||
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
|
||||
labelGroupDO.setEditUserId(userId);
|
||||
labelGroupDO.setEditDate(new Date());
|
||||
labelGroupDO.setUpdateUserId(userId);
|
||||
labelGroupMapper.updateByPrimaryKeySelective(labelGroupDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签组
|
||||
* @param dto 待删除标签组信息
|
||||
*/
|
||||
@Override
|
||||
public void deleteLabelGroup(LabelGroupDeleteDTO dto) throws ApiException {
|
||||
if (whetherGroupInUse(dto.getId())) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_IN_USE);
|
||||
}
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelGroupDO.setId(dto.getId());
|
||||
labelGroupDO.setDeleted(Boolean.TRUE);
|
||||
labelGroupDO.setUpdateUserId(userId);
|
||||
labelGroupMapper.updateByPrimaryKeySelective(labelGroupDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取所有标签组
|
||||
*/
|
||||
@Override
|
||||
public List<LabelGroupListVo> getAllLabelGroupList() {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
return labelGroupMapper.getLabelGroupList(labelGroupDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HyPartnerLabelGroupDO selectByPrimaryKey(Long id){
|
||||
return labelGroupMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEcLabelGroup(HyPartnerLabelGroupDO hyPartnerLabelGroupDO) {
|
||||
hyPartnerLabelGroupDO.setCreateTime(new Date()).setCreateUserId(createUserId).setEditDate(new Date())
|
||||
.setEditUserId(createUserId);
|
||||
labelGroupMapper.insertSelective(hyPartnerLabelGroupDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询标签组信息列表正序
|
||||
*/
|
||||
@Override
|
||||
public List<LabelGroupListVo> getLabelGroupListOrder() {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
return labelGroupMapper.getLabelGroupListOrder(labelGroupDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 某个标签组内是否有未删除的标签
|
||||
* @param id 标签组 id
|
||||
*/
|
||||
private Boolean whetherGroupInUse(Long id) {
|
||||
return labelMapper.whetherGroupInUse(id);
|
||||
}
|
||||
|
||||
private Boolean whetherGroupDuplicated(HyPartnerLabelGroupDO labelGroupDO) {
|
||||
Long id = labelGroupDO.getId();
|
||||
labelGroupDO.setId(null);
|
||||
List<HyPartnerLabelGroupDO> hyPartnerLabelGroupDOS = labelGroupMapper.selectSelective(labelGroupDO);
|
||||
labelGroupDO.setId(id);
|
||||
//如果修改后的标签组名与原标签组名一致也不算重复,但是要记录更新人
|
||||
if (hyPartnerLabelGroupDOS != null && hyPartnerLabelGroupDOS.size() > 0) {
|
||||
//更新操作还要检查是否与原标签组信息相同,相同的话也不算重复
|
||||
if (hyPartnerLabelGroupDOS.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.dto.label.LabelAddDTO;
|
||||
import com.cool.store.dto.label.LabelDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.dto.label.LabelUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyPartnerLabelMapper;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.vo.LabelGroupVO;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:24
|
||||
* @version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class LabelServiceImpl implements LabelService {
|
||||
|
||||
@Autowired
|
||||
private HyPartnerLabelMapper labelMapper;
|
||||
|
||||
|
||||
|
||||
@Value("${ec.sync.createUserId:null}")
|
||||
private String createUserId;
|
||||
|
||||
/**
|
||||
* 获取数组列表
|
||||
*
|
||||
* @param dto 查询条件
|
||||
*/
|
||||
@Override
|
||||
public List<LabelListVo> getLabelList(LabelListDTO dto) {
|
||||
return labelMapper.getLabelList(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加标签组
|
||||
* @param dto 新增标签组信息
|
||||
*/
|
||||
@Override
|
||||
public void addLabel(LabelAddDTO dto) throws ApiException {
|
||||
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
|
||||
labelDO.setLabelName(dto.getLabelName());
|
||||
if (whetherLabelRepeat(labelDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelDO.setLabelGroupId(dto.getLabelGroupId());
|
||||
labelDO.setEditUserId(userId);
|
||||
labelDO.setEditDate(new Date());
|
||||
labelDO.setCreateUserId(userId);
|
||||
labelDO.setUpdateUserId(userId);
|
||||
labelMapper.insertSelective(labelDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改标签信息
|
||||
* @param dto 新标签信息
|
||||
*/
|
||||
@Override
|
||||
public void updateLabel(LabelUpdateDTO dto) throws ApiException {
|
||||
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
|
||||
labelDO.setId(dto.getId());
|
||||
labelDO.setLabelName(dto.getLabelName());
|
||||
if (whetherLabelRepeat(labelDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelDO.setLabelGroupId(dto.getLabelGroupId());
|
||||
labelDO.setEditUserId(userId);
|
||||
labelDO.setEditDate(new Date());
|
||||
labelDO.setUpdateUserId(userId);
|
||||
labelMapper.updateByPrimaryKeySelective(labelDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除标签
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public void deleteLabel(LabelDeleteDTO dto) {
|
||||
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelDO.setId(dto.getId());
|
||||
labelDO.setEditUserId(userId);
|
||||
labelDO.setEditDate(new Date());
|
||||
labelDO.setUpdateUserId(userId);
|
||||
labelDO.setDeleted(Boolean.TRUE);
|
||||
labelMapper.updateByPrimaryKeySelective(labelDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HyPartnerLabelDO selectByPrimaryKey(Long classId) {
|
||||
return labelMapper.selectByPrimaryKey(classId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addEcLabel(HyPartnerLabelDO hyPartnerLabelDO) {
|
||||
hyPartnerLabelDO.setEditDate(new Date()).setCreateTime(new Date()).setEditUserId(createUserId).setCreateUserId(createUserId)
|
||||
.setUpdateUserId(createUserId);
|
||||
labelMapper.insertSelective(hyPartnerLabelDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<LabelGroupVO> getAllGroupAndLabelList() {
|
||||
List<LabelListVo> labelList = labelMapper.getLabelList(new LabelListDTO());
|
||||
if (CollectionUtils.isEmpty(labelList)) {
|
||||
log.info("标签列表为空");
|
||||
return Lists.newArrayList(new LabelGroupVO());
|
||||
}
|
||||
Map<Long, List<LabelListVo>> idForVo = labelList.stream().collect(Collectors.groupingBy(LabelListVo::getLabelGroupId));
|
||||
List<LabelGroupVO> result = idForVo.entrySet().stream().map(entry -> {
|
||||
LabelGroupVO vo = new LabelGroupVO();
|
||||
vo.setId(entry.getKey());
|
||||
vo.setLabelGroupName(entry.getValue().get(0).getLabelGroupName());
|
||||
vo.setGroupCreateTime(entry.getValue().get(0).getGroupCreateTime());
|
||||
List<LabelGroupVO.LabelVO> labelList1 = entry.getValue().stream().map(label -> {
|
||||
LabelGroupVO.LabelVO labelVO = new LabelGroupVO.LabelVO();
|
||||
labelVO.setId(label.getId());
|
||||
labelVO.setLabelName(label.getLabelName());
|
||||
labelVO.setLabelCreateTime(label.getLabelCreateTime());
|
||||
return labelVO;
|
||||
}).sorted(Comparator.comparing(LabelGroupVO.LabelVO::getLabelCreateTime))
|
||||
.collect(Collectors.toList());
|
||||
vo.setLabelList(labelList1);
|
||||
return vo;
|
||||
}).sorted(Comparator.comparing(LabelGroupVO::getGroupCreateTime).thenComparing(LabelGroupVO::getId)).collect(Collectors.toList());
|
||||
return result;
|
||||
}
|
||||
|
||||
private Boolean whetherLabelRepeat(HyPartnerLabelDO label) throws ApiException {
|
||||
Long id = label.getId();
|
||||
label.setId(null);
|
||||
List<HyPartnerLabelDO> hyPartnerLabelDOS = labelMapper.selectSelective(label);
|
||||
label.setId(id);
|
||||
//如果修改后的标签名与原标签名一致也不算重复,但是要记录更新人
|
||||
if (hyPartnerLabelDOS != null && hyPartnerLabelDOS.size() > 0) {
|
||||
//更新操作还要检查是否与原标签信息相同,相同的话也不算重复
|
||||
if (hyPartnerLabelDOS.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<Long,String> getUserPortraitMap(List<String> userPortraitStrList){
|
||||
Set<Long> userPortraitIdList = new HashSet<>();
|
||||
for (String userPortrait:userPortraitStrList) {
|
||||
String[] parts = userPortrait.split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
Long value = Long.parseLong(trimmedPart);
|
||||
userPortraitIdList.add(value);
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
List<HyPartnerLabelDO> labelListByIds = new ArrayList<>();
|
||||
if (CollectionUtils.isNotEmpty(userPortraitIdList)){
|
||||
labelListByIds = labelMapper.getLabelListByIds(new ArrayList<>(userPortraitIdList));
|
||||
}
|
||||
return labelListByIds.stream().collect(Collectors.toMap(HyPartnerLabelDO::getId,HyPartnerLabelDO::getLabelName));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getUserPortraitList(Map<Long, String> userPortraitMap, String userPortraitStr) {
|
||||
List<String> userPortraitList= new ArrayList<>();
|
||||
if(StringUtils.isNotEmpty(userPortraitStr)){
|
||||
String[] parts = userPortraitStr.split(",");
|
||||
for (String part : parts) {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return userPortraitList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,256 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.entity.HyOpenAreaInfoDO;
|
||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||
import com.cool.store.request.OpenAreaRequest;
|
||||
import com.cool.store.service.OpenAreaService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.OpenAreaTreeVO;
|
||||
import com.cool.store.vo.OpenAreaVO;
|
||||
import com.cool.store.vo.OpenProvinceVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/13 22:11
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class OpenAreaServiceImpl implements OpenAreaService {
|
||||
|
||||
@Resource
|
||||
private HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||
@Resource
|
||||
private HyOpenAreaInfoMapper hyOpenAreaInfoMapper;
|
||||
@Resource
|
||||
private RedisUtilPool redisUtilPool;
|
||||
|
||||
|
||||
@Override
|
||||
public List<OpenAreaTreeVO> queryByKeyword(String keyword,String areaStatus,Boolean flag) {
|
||||
//先查出所有的一级菜单
|
||||
List<HyOpenAreaInfoDO> openArea = hyOpenAreaInfoDAO.queryFirstLevel();
|
||||
Map<Long, HyOpenAreaInfoDO> longHyOpenAreaInfoDOMap = openArea.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x));
|
||||
|
||||
//查询关键字下所有的数据 原始的数据
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryByKeyword(keyword,null,areaStatus,flag);
|
||||
Set<Long> longSet = hyOpenAreaInfoDOS.stream().map(HyOpenAreaInfoDO::getId).collect(Collectors.toSet());
|
||||
|
||||
List<HyOpenAreaInfoDO> result = new ArrayList<>();
|
||||
result.addAll(hyOpenAreaInfoDOS);
|
||||
hyOpenAreaInfoDOS.stream().forEach(x->{
|
||||
Long parentId = x.getParentId();
|
||||
|
||||
if (parentId!=null&&!longSet.contains(parentId)){
|
||||
//添加到集合中
|
||||
longSet.add(x.getParentId());
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = longHyOpenAreaInfoDOMap.get(parentId);
|
||||
result.add(hyOpenAreaInfoDO);
|
||||
}
|
||||
});
|
||||
|
||||
JSONArray objects = buildTree(JSONArray.parseArray(JSONObject.toJSONString(result)), "id", "parentId","childNode" );
|
||||
List<OpenAreaTreeVO> openAreaTreeVOS = JSONObject.parseArray(objects.toJSONString(), OpenAreaTreeVO.class);
|
||||
return openAreaTreeVOS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OpenAreaTreeVO> queryAllOpenAreaByKeyword(String keyword,Boolean applyFlag, Boolean flag) {
|
||||
long startTime = System.currentTimeMillis();
|
||||
//先查出所有的一级菜单
|
||||
List<HyOpenAreaInfoDO> openArea = hyOpenAreaInfoDAO.queryFirstLevel();
|
||||
log.info("11耗时:{}", System.currentTimeMillis() - startTime);
|
||||
Map<Long, HyOpenAreaInfoDO> longHyOpenAreaInfoDOMap = openArea.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x));
|
||||
|
||||
//查询关键字下所有的数据 原始的数据
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryByKeyword(keyword,applyFlag,null,flag);
|
||||
log.info("22耗时:{}", System.currentTimeMillis() - startTime);
|
||||
Map<Long, HyOpenAreaInfoDO> hyMap = hyOpenAreaInfoDOS.stream().collect(Collectors.toMap(HyOpenAreaInfoDO::getId, x -> x));
|
||||
|
||||
Set list = new HashSet();
|
||||
hyOpenAreaInfoDOS.stream().forEach(x->{
|
||||
Long parentId = x.getParentId();
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyMap.get(parentId);
|
||||
if (hyOpenAreaInfoDO==null&&parentId!=null){
|
||||
//添加到集合中
|
||||
list.add(x.getParentId());
|
||||
}
|
||||
});
|
||||
log.info("33耗时:{}", System.currentTimeMillis() - startTime);
|
||||
if (CollectionUtils.isNotEmpty(list)){
|
||||
//二级采单
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.queryByIdsExcludeFirstLevel(new ArrayList<>(list));
|
||||
hyOpenAreaInfoDOS.addAll(hyOpenAreaInfoDOList);
|
||||
//如果二级采单是空 说明list全部是一级采单
|
||||
if (CollectionUtils.isEmpty(hyOpenAreaInfoDOList)){
|
||||
list.stream().forEach(x->{
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyMap.get(x);
|
||||
if (hyOpenAreaInfoDO==null){
|
||||
hyOpenAreaInfoDOS.add(longHyOpenAreaInfoDOMap.get(x));
|
||||
}
|
||||
});
|
||||
}
|
||||
hyOpenAreaInfoDOList.stream().forEach(x->{
|
||||
Long parentId = x.getParentId();
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyMap.get(parentId);
|
||||
if (hyOpenAreaInfoDO==null){
|
||||
HyOpenAreaInfoDO infoDO = longHyOpenAreaInfoDOMap.get(parentId);
|
||||
hyOpenAreaInfoDOS.add(infoDO);
|
||||
}
|
||||
});
|
||||
}
|
||||
log.info("44耗时:{}", System.currentTimeMillis() - startTime);
|
||||
JSONArray objects = buildTree(JSONArray.parseArray(JSONObject.toJSONString(hyOpenAreaInfoDOS)), "id", "parentId","childNode" );
|
||||
List<OpenAreaTreeVO> openAreaTreeVOS = JSONObject.parseArray(objects.toJSONString(), OpenAreaTreeVO.class);
|
||||
log.info("55耗时:{}", System.currentTimeMillis() - startTime);
|
||||
return openAreaTreeVOS;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<OpenAreaVO> getChildrenList(String type, Long parentId) {
|
||||
List<HyOpenAreaInfoDO> childrenList = hyOpenAreaInfoDAO.getChildrenList(type, parentId);
|
||||
List<OpenAreaVO> result = new ArrayList<>();
|
||||
childrenList.stream().forEach(x->{
|
||||
OpenAreaVO openAreaVO = convertDoToVo(x);
|
||||
result.add(openAreaVO);
|
||||
});
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean batchUpdate(String userId, OpenAreaRequest request) {
|
||||
//修改选择的区域
|
||||
hyOpenAreaInfoDAO.batchUpdateById(request.getBackgroundBanner(),request.getDetailBanner(),request.getStatus(),userId,request.getIdList());
|
||||
//修改选择区域的子区域
|
||||
hyOpenAreaInfoDAO.batchUpdateByParentId(request.getBackgroundBanner(),request.getDetailBanner(),request.getStatus(),userId,request.getIdList());
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<OpenAreaVO> queryKeyOpenAreaList(Integer pageSize, Integer pageNumber) {
|
||||
PageHelper.startPage(pageNumber,pageSize);
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOS = hyOpenAreaInfoDAO.queryKeyOpenArea();
|
||||
PageInfo hyOpenAreaInfoDOPageInfo = new PageInfo<>(hyOpenAreaInfoDOS);
|
||||
if (hyOpenAreaInfoDOPageInfo==null){
|
||||
return new PageInfo<>();
|
||||
}
|
||||
List<OpenAreaVO> list = new ArrayList<>();
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList = hyOpenAreaInfoDOPageInfo.getList();
|
||||
hyOpenAreaInfoDOList.stream().forEach(x->{
|
||||
list.add(convertDoToVo(x));
|
||||
});
|
||||
hyOpenAreaInfoDOPageInfo.setList(list);
|
||||
return hyOpenAreaInfoDOPageInfo;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Boolean addOpenArea() {
|
||||
//查询出所有的市
|
||||
List<HyOpenAreaInfoDO> openArea = hyOpenAreaInfoDAO.selectAllCity();
|
||||
if (CollectionUtils.isNotEmpty(openArea)){
|
||||
//在每个市下面添加名称为不限的区
|
||||
openArea.forEach(x->{
|
||||
Long id = x.getId();
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = new HyOpenAreaInfoDO();
|
||||
hyOpenAreaInfoDO.setAreaStatus("open");
|
||||
hyOpenAreaInfoDO.setAreaName("不限");
|
||||
hyOpenAreaInfoDO.setParentId(id);
|
||||
hyOpenAreaInfoDO.setAreaPath(x.getAreaPath()+"不限/");
|
||||
hyOpenAreaInfoMapper.insertSelective(hyOpenAreaInfoDO);
|
||||
});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private OpenAreaVO convertDoToVo(HyOpenAreaInfoDO hyOpenAreaInfoDO){
|
||||
OpenAreaVO openAreaVO = new OpenAreaVO();
|
||||
openAreaVO.setId(hyOpenAreaInfoDO.getId());
|
||||
openAreaVO.setAreaName(hyOpenAreaInfoDO.getAreaName());
|
||||
openAreaVO.setParentId(hyOpenAreaInfoDO.getParentId());
|
||||
openAreaVO.setAreaPath(hyOpenAreaInfoDO.getAreaPath());
|
||||
openAreaVO.setAreaStatus(hyOpenAreaInfoDO.getAreaStatus());
|
||||
openAreaVO.setBackgroundBanner(hyOpenAreaInfoDO.getBackgroundBanner());
|
||||
openAreaVO.setDetailBanner(hyOpenAreaInfoDO.getDetailBanner());
|
||||
return openAreaVO;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 构建树
|
||||
* @param arr
|
||||
* @param id
|
||||
* @param pid
|
||||
* @param child
|
||||
* @return
|
||||
*/
|
||||
public static JSONArray buildTree(JSONArray arr, String id, String pid, String child) {
|
||||
//新建一个JSONArray来接收组装成树形结构的返回值
|
||||
JSONArray jsonArray = new JSONArray();
|
||||
//新建一个JSONObject对象
|
||||
JSONObject hash = new JSONObject();
|
||||
//将数组转换为object格式
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
//获取当前的JSON对象
|
||||
JSONObject json = (JSONObject) arr.get(i);
|
||||
//把当前id作为键,当前JSON对象作为值 put回hash这个Object对象中
|
||||
//这里的put方法类似于map的put方法
|
||||
hash.put(json.getString(id), json);
|
||||
}
|
||||
//遍历结果集
|
||||
for (int j = 0; j < arr.size(); j++) {
|
||||
//单条记录
|
||||
JSONObject aVal = (JSONObject) arr.get(j);
|
||||
//在hash中取出key为单条记录中pid的值
|
||||
String pidStr = "";
|
||||
//如果父级id不等于null
|
||||
if (aVal.get(pid) != null) {
|
||||
pidStr = aVal.get(pid).toString();
|
||||
}
|
||||
//从hash这个对象中获取父级对象 parent
|
||||
JSONObject hashParent = (JSONObject) hash.get(pidStr);
|
||||
//如果记录的pid存在,则说明它有父节点,将她添加到孩子节点的集合中
|
||||
if (hashParent != null) {
|
||||
//检查是否有child属性
|
||||
if (hashParent.get(child) != null) {
|
||||
//有子节点 则先将子节点取出
|
||||
JSONArray children = (JSONArray) hashParent.get(child);
|
||||
//然后把当前这个对象放进子节点之中
|
||||
children.add(aVal);
|
||||
//最后把子节点在放回父节点之中
|
||||
hashParent.put(child, children);
|
||||
} else {
|
||||
//无子节点 则新建一个子节点
|
||||
JSONArray children = new JSONArray();
|
||||
//然后再把当前对象放进去
|
||||
children.add(aVal);
|
||||
//最后在放回父节点之中
|
||||
hashParent.put(child, children);
|
||||
}
|
||||
} else {
|
||||
jsonArray.add(aVal);
|
||||
}
|
||||
}
|
||||
return jsonArray;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,247 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.UserChannelEnum;
|
||||
import com.cool.store.enums.UserPlatformTypeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.service.WechatMiniAppService;
|
||||
import com.cool.store.utils.AesUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author zhangchenbiao
|
||||
* @FileName: WechatMiniAppServiceImpl
|
||||
* @Description:
|
||||
* @date 2023-05-29 14:29
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
|
||||
// @Resource
|
||||
// private RedisUtilPool redisUtilPool;
|
||||
// @Resource
|
||||
// private WechatRest wechatRest;
|
||||
// @Resource
|
||||
// private HyPartnerUserInfoDAO hyPartnerUserInfoDAO;
|
||||
// @Resource
|
||||
// private HyPartnerUserPlatformBindDAO hyPartnerUserPlatformBindDAO;
|
||||
// @Resource
|
||||
// private HyPartnerLineInfoDAO hyPartnerLineInfoDAO;
|
||||
// @Resource
|
||||
// HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||
// @Resource
|
||||
// HyPartnerBaseInfoDAO hyPartnerBaseInfoDAO;
|
||||
// @Resource
|
||||
// HyPhoneLocationService hyPhoneLocationService;
|
||||
//
|
||||
// @Autowired
|
||||
// private HyPartnerUserChannelMapper hyPartnerUserChannelMapper;
|
||||
//
|
||||
@Value("${weixin.appId}")
|
||||
private String wxAppId;
|
||||
@Value("${weixin.appSecret}")
|
||||
private String wxAppSecret;
|
||||
@Value("${fixMobileOpenid}")
|
||||
private String fixMobileOpenid;
|
||||
@Value("${exhibition.channel.id}")
|
||||
private Integer exhibition;
|
||||
@Value("${recommended.channel.id}")
|
||||
private Integer recommended;
|
||||
//
|
||||
// @Override
|
||||
// public PartnerUserInfoVO miniProgramLogin(MiniProgramLoginDTO param) {
|
||||
// log.info("miniProgramLogin #param {}", JSONObject.toJSONString(param));
|
||||
// PartnerUserInfoVO userInfoVO = new PartnerUserInfoVO();
|
||||
// String jsCode = param.getJsCode();
|
||||
// String lockKey = "codeSession:" + wxAppId + CommonConstants.MOSAICS + jsCode;
|
||||
// boolean lock = redisUtilPool.lock(lockKey);
|
||||
// if (!lock) {
|
||||
// throw new ServiceException(ErrorCodeEnum.OPERATION_OVER_TIME);
|
||||
// }
|
||||
// CodeSessionDTO codeSession = wechatRest.miniProgramJsCodeSession(wxAppId, wxAppSecret, jsCode);
|
||||
// String openid = codeSession.getOpenid();
|
||||
// String sessionCacheKey = MessageFormat.format(CommonConstants.MINI_PROGRAM_SESSION_KEY, wxAppId, openid);
|
||||
// redisUtilPool.setString(sessionCacheKey, codeSession.getSessionKey(), CommonConstants.THREE_DAY_SECONDS);
|
||||
// String unionId = codeSession.getUnionId();
|
||||
// log.info("小程序登录:{}", unionId);
|
||||
// log.info("sessionKey {}", codeSession.getSessionKey());
|
||||
// /* String decryptUser = AesUtil.decryptWechat(codeSession.getSessionKey(), param.getEncryptedData(), param.getIvStr());
|
||||
// log.info("解密用户信息:{}", decryptUser);
|
||||
// MiniProgramUserVO miniProgramUser = JSON.parseObject(decryptUser, MiniProgramUserVO.class);
|
||||
// if (Objects.isNull(miniProgramUser)) {
|
||||
// throw new ServiceException(ErrorCodeEnum.GET_WECHAT_USER_INFO_FAIL);
|
||||
// }*/
|
||||
// // 获取小程序token
|
||||
// String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||
// // 获取手机号码
|
||||
// PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(param.getMobileCode(), accessToken);
|
||||
// if(phoneInfoDTO != null && phoneInfoDTO.getPhoneInfo() != null && StringUtils.isNotBlank(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
|
||||
//
|
||||
// HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPlatformTypeAndUserId(UserPlatformTypeEnum.WECHAT.getCode(), openid);
|
||||
// HyPartnerUserInfoDO hyPartnerUserInfoDO = null;
|
||||
// // 微信未授权过
|
||||
// if(hyPartnerUserPlatformBindDO == null){
|
||||
// hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||
// if(hyPartnerUserInfoDO != null){
|
||||
// HyPartnerUserPlatformBindDO hy = hyPartnerUserPlatformBindDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
// if (hy!=null){
|
||||
// throw new ServiceException(ErrorCodeEnum.MOBILE_WECHAT_EXIST);
|
||||
// }
|
||||
// }
|
||||
// if(hyPartnerUserInfoDO == null){
|
||||
// hyPartnerUserInfoDO = new HyPartnerUserInfoDO();
|
||||
// hyPartnerUserInfoDO.setMobile(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||
// // hyPartnerUserInfoDO.setUsername(phoneInfoDTO.getPhoneInfo().getPhoneNumber());
|
||||
// hyPartnerUserInfoDO.setPartnerId(UUIDUtils.get32UUID());
|
||||
// hyPartnerUserInfoDO.setIsWritePartnerKnow(0);
|
||||
// Integer channelId = null;
|
||||
// String userChannel = param.getUserChannelEnum();
|
||||
// if(StringUtils.isNotEmpty(userChannel)){
|
||||
// if(UserChannelEnum.EXHIBITION.getCode().equals(userChannel)){
|
||||
// channelId = exhibition;
|
||||
// }else if(UserChannelEnum.RECOMMENDED.getCode().equals(userChannel)){
|
||||
// channelId = recommended;
|
||||
// }else {
|
||||
// if (StringUtils.isNumeric(userChannel)) {
|
||||
// channelId = Integer.valueOf(userChannel);
|
||||
// HyPartnerUserChannelDO hyPartnerUserChannelDO = hyPartnerUserChannelMapper.selectByChannelId(Long.valueOf(channelId));
|
||||
// if (Objects.isNull(hyPartnerUserChannelDO)|| hyPartnerUserChannelDO.getChannelId() == null ) {
|
||||
// //用户渠道不存在
|
||||
// throw new ServiceException(ErrorCodeEnum.USER_CHANNEL_NOT_EXISTS);
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// hyPartnerUserInfoDO.setUserChannelId(channelId);
|
||||
// hyPartnerUserInfoDAO.insertSelective(hyPartnerUserInfoDO);
|
||||
// }
|
||||
// hyPartnerUserPlatformBindDO = new HyPartnerUserPlatformBindDO();
|
||||
// hyPartnerUserPlatformBindDO.setPlatformType(UserPlatformTypeEnum.WECHAT.getCode());
|
||||
// hyPartnerUserPlatformBindDO.setPlatformUserId(openid);
|
||||
// hyPartnerUserPlatformBindDO.setBindTime(new Date());
|
||||
// hyPartnerUserPlatformBindDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
// hyPartnerUserPlatformBindDAO.insertSelective(hyPartnerUserPlatformBindDO);
|
||||
// }else {
|
||||
// hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerUserPlatformBindDO.getPartnerId());
|
||||
// }
|
||||
// if(!hyPartnerUserInfoDO.getMobile().equals(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
|
||||
// throw new ServiceException(ErrorCodeEnum.WECHAT_BIND_OTHER_MOBILE);
|
||||
// }
|
||||
// BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
||||
// HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
// if (lineInfoDO != null){
|
||||
// userInfoVO.setPartnerLineId(lineInfoDO.getId());
|
||||
// userInfoVO.setLineStatus(lineInfoDO.getLineStatus());
|
||||
// }
|
||||
// }
|
||||
// userInfoVO.setOpenid(openid);
|
||||
// userInfoVO.setUnionId(unionId);
|
||||
// return userInfoVO;
|
||||
// }
|
||||
//
|
||||
// public static void main(String[] args) {
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getUserPhoneNumber(String mobileCode) {
|
||||
// // 获取小程序token
|
||||
// String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||
// // 获取手机号码
|
||||
// PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(mobileCode, accessToken);
|
||||
// if(phoneInfoDTO != null && phoneInfoDTO.getPhoneInfo() != null && StringUtils.isNotBlank(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
|
||||
// return phoneInfoDTO.getPhoneInfo().getPhoneNumber();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String updateUserPhoneNumber(MobileUpdateRequest request, PartnerUserInfoVO userInfoVO) {
|
||||
// String newMobile = "";
|
||||
// HyPartnerUserInfoDO oldUserInfo = hyPartnerUserInfoDAO.selectByMobile(userInfoVO.getMobile());
|
||||
// if (oldUserInfo == null) {
|
||||
// throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
|
||||
// }
|
||||
// // 获取小程序token
|
||||
// String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||
// // 获取手机号码
|
||||
// PhoneInfoDTO phoneInfoDTO = wechatRest.getUserPhoneNumber(request.getMobileCode(), accessToken);
|
||||
// if(phoneInfoDTO != null && phoneInfoDTO.getPhoneInfo() != null && StringUtils.isNotBlank(phoneInfoDTO.getPhoneInfo().getPhoneNumber())){
|
||||
// newMobile = phoneInfoDTO.getPhoneInfo().getPhoneNumber();
|
||||
// if(newMobile.equals(oldUserInfo.getMobile())){
|
||||
// return newMobile;
|
||||
// }
|
||||
// HyPartnerUserInfoDO newUserInfo = hyPartnerUserInfoDAO.selectByMobile(newMobile);
|
||||
// if (newUserInfo != null) {
|
||||
// throw new ServiceException(ErrorCodeEnum.NEW_MOBILE_HAS_EXIST);
|
||||
// }
|
||||
// oldUserInfo.setMobile(newMobile);
|
||||
// hyPartnerUserInfoDAO.updateByPrimaryKeySelective(oldUserInfo);
|
||||
// //修改意向申请信息中的手机号
|
||||
// hyPartnerBaseInfoDAO.updateByPartnerId(null, newMobile, oldUserInfo.getPartnerId());
|
||||
// }
|
||||
// return newMobile;
|
||||
// }
|
||||
//
|
||||
@Override
|
||||
public PartnerUserInfoVO getUserInfo(String mobile, String openId) {
|
||||
PartnerUserInfoVO userInfoVO = new PartnerUserInfoVO();
|
||||
if(fixMobileOpenid.equals(mobile)){
|
||||
userInfoVO.setMobile(mobile);
|
||||
userInfoVO.setOpenid(mobile);
|
||||
userInfoVO.setPartnerId("");
|
||||
return userInfoVO;
|
||||
}
|
||||
// HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPlatformTypeAndUserId(UserPlatformTypeEnum.WECHAT.getCode(), openId);
|
||||
// if(hyPartnerUserPlatformBindDO != null){
|
||||
// HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(hyPartnerUserPlatformBindDO.getPartnerId());
|
||||
// BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
||||
// userInfoVO.setOpenid(hyPartnerUserPlatformBindDO.getPlatformUserId());
|
||||
// if(StringUtils.isNotBlank(hyPartnerUserInfoDO.getWantShopArea())){
|
||||
// HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(hyPartnerUserInfoDO.getWantShopArea()));
|
||||
// userInfoVO.setWantShopAreaName(hyOpenAreaInfoDO.getAreaPath().replace("/", " ").trim());
|
||||
// }
|
||||
// HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
// if (lineInfoDO != null){
|
||||
// userInfoVO.setPartnerLineId(lineInfoDO.getId());
|
||||
// }
|
||||
// }
|
||||
return userInfoVO;
|
||||
}
|
||||
//
|
||||
// @Override
|
||||
// public String getMiniAppUrl() {
|
||||
// MiniAppUrlLinkReqDTO miniAppUrlLinkReqDTO = new MiniAppUrlLinkReqDTO();
|
||||
// return getMiniAppUrlLink(miniAppUrlLinkReqDTO);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getMiniAppUrlLink(MiniAppUrlLinkReqDTO miniAppUrlLinkReqDTO) {
|
||||
// String accessToken = wechatRest.getAccessToken(wxAppId, wxAppSecret);
|
||||
// MiniAppUrlLinkDTO miniAppUrlLink = wechatRest.getMiniAppUrlLink(accessToken, miniAppUrlLinkReqDTO);
|
||||
// if (miniAppUrlLink != null){
|
||||
// return miniAppUrlLink.getUrlLink();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
}
|
||||
@@ -34,15 +34,15 @@
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
</dependency>
|
||||
<!-- 服务注册与发现依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <!– SpringCloud Alibaba Nacos Config –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- ELK -->
|
||||
<dependency>
|
||||
<groupId>com.github.danielwegener</groupId>
|
||||
|
||||
@@ -5,7 +5,6 @@ import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.scheduling.annotation.EnableAsync;
|
||||
@@ -19,7 +18,6 @@ import javax.sql.DataSource;
|
||||
* @Description: C端web层
|
||||
* @date 2023-05-17 11:28
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
@EnableAsync
|
||||
@MapperScan("com.cool.store.mapper")
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.content.*;
|
||||
import com.cool.store.entity.HyContentInfoDO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ContentService;
|
||||
import com.cool.store.vo.HyContentInfoVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("news")
|
||||
@Api(tags = "动态")
|
||||
@Slf4j
|
||||
public class ContentController {
|
||||
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
|
||||
@PostMapping("/queryTitles")
|
||||
@ApiOperation("搜索标题是否重复")
|
||||
public ResponseResult<Boolean> queryTitles(@RequestBody ContentQueryTitlesDto title) {
|
||||
return ResponseResult.success(contentService.queryTitles(title.getTitle()));
|
||||
}
|
||||
|
||||
@PostMapping("/add")
|
||||
@ApiOperation("新增动态")
|
||||
public ResponseResult<String> addContent(@RequestBody ContentAddDto dto) throws ApiException {
|
||||
return ResponseResult.success(contentService.addNews(dto));
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
@ApiOperation("删除动态")
|
||||
public ResponseResult deleteContent(@RequestBody ContentDelDto dto) {
|
||||
contentService.deleteContent(dto.getContentId());
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/modify")
|
||||
@ApiOperation("修改动态")
|
||||
public ResponseResult updateContent(@RequestBody ContentUpdateDto dto) throws ApiException {
|
||||
contentService.updateContent(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/queryContentList")
|
||||
@ApiOperation("查询动态列表")
|
||||
public ResponseResult<PageInfo<HyContentInfoVO>> queryContentList(@RequestBody ContentQueryListDto dto) {
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<HyContentInfoVO> list = contentService.queryContentList(dto);
|
||||
PageInfo<HyContentInfoVO> page = new PageInfo<>(list);
|
||||
return ResponseResult.success(page);
|
||||
}
|
||||
|
||||
@PostMapping("/detail")
|
||||
@ApiOperation("动态详情")
|
||||
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody ContentQueryDetailDto dto) {
|
||||
return ResponseResult.success(contentService.queryContentInfo(dto.getContentId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.label.LabelAddDTO;
|
||||
import com.cool.store.dto.label.LabelDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelListDTO;
|
||||
import com.cool.store.dto.label.LabelUpdateDTO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LabelService;
|
||||
import com.cool.store.vo.LabelGroupVO;
|
||||
import com.cool.store.vo.LabelListVo;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 14:20
|
||||
* @version 1.0
|
||||
*/
|
||||
@Api(tags = "标签管理")
|
||||
@RestController
|
||||
@RequestMapping("/label")
|
||||
public class LabelController {
|
||||
|
||||
@Autowired
|
||||
private LabelService labelService;
|
||||
|
||||
@ApiOperation("标签列表查询")
|
||||
@PostMapping("/list")
|
||||
public ResponseResult<PageInfo<LabelListVo>> getLabelList(@RequestBody LabelListDTO dto) {
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<LabelListVo> result = labelService.getLabelList(dto);
|
||||
return ResponseResult.success(new PageInfo<>(result));
|
||||
}
|
||||
|
||||
@ApiOperation("查询标签组及子标签列表")
|
||||
@GetMapping("/labelGroupAndLabelList")
|
||||
public ResponseResult<List<LabelGroupVO>> getAllLabelList() {
|
||||
List<LabelGroupVO> result = labelService.getAllGroupAndLabelList();
|
||||
return ResponseResult.success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("新增标签")
|
||||
@PostMapping("/add")
|
||||
public ResponseResult addLabel(@RequestBody LabelAddDTO dto) throws ApiException {
|
||||
labelService.addLabel(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("修改标签")
|
||||
@PostMapping("/edit")
|
||||
public ResponseResult updateLabel(@RequestBody LabelUpdateDTO dto) throws ApiException {
|
||||
labelService.updateLabel(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("删除标签")
|
||||
@PostMapping("/delete")
|
||||
public ResponseResult deleteLabel(@RequestBody LabelDeleteDTO dto) {
|
||||
labelService.deleteLabel(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.label.LabelGroupAddDTO;
|
||||
import com.cool.store.dto.label.LabelGroupDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelGroupListDTO;
|
||||
import com.cool.store.dto.label.LabelGroupUpdateDTO;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.LabelGroupService;
|
||||
import com.cool.store.vo.LabelGroupListVo;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Fun Li 2023/8/10 10:54
|
||||
* @version 1.0
|
||||
*/
|
||||
@Api(tags = {"标签组管理"})
|
||||
@RestController
|
||||
@RequestMapping({"/labelGroup"})
|
||||
public class LabelGroupController {
|
||||
@Autowired
|
||||
private LabelGroupService labelGroupService;
|
||||
|
||||
@ApiOperation("标签组分页查询")
|
||||
@PostMapping({"/list"})
|
||||
public ResponseResult<PageInfo<LabelGroupListVo>> getLabelGroupList(@RequestBody LabelGroupListDTO dto) {
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<LabelGroupListVo> result = labelGroupService.getLabelGroupList(dto);
|
||||
return ResponseResult.success(new PageInfo<>(result));
|
||||
}
|
||||
|
||||
@ApiOperation("新增标签组")
|
||||
@PostMapping({"/add"})
|
||||
public ResponseResult addLabelGroup(@RequestBody LabelGroupAddDTO dto) throws ApiException {
|
||||
labelGroupService.addLabelGroup(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("修改标签组")
|
||||
@PostMapping({"/edit"})
|
||||
public ResponseResult updateLabelGroup(@RequestBody LabelGroupUpdateDTO dto) throws ApiException {
|
||||
labelGroupService.updateLabelGroup(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("删除标签组")
|
||||
@PostMapping({"/delete"})
|
||||
public ResponseResult deleteLabelGroup(@RequestBody LabelGroupDeleteDTO dto) throws ApiException {
|
||||
labelGroupService.deleteLabelGroup(dto);
|
||||
return ResponseResult.success();
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有标签组")
|
||||
@PostMapping({"/allList"})
|
||||
public ResponseResult<List<LabelGroupListVo>> deleteLabelGroup() {
|
||||
return ResponseResult.success(labelGroupService.getAllLabelGroupList());
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有标签组")
|
||||
@PostMapping({"/allListAsc"})
|
||||
public ResponseResult<List<LabelGroupListVo>> getLabelGroupListOrder() {
|
||||
return ResponseResult.success(labelGroupService.getLabelGroupListOrder());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.request.OpenAreaRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.OpenAreaService;
|
||||
import com.cool.store.vo.OpenAreaTreeVO;
|
||||
import com.cool.store.vo.OpenAreaVO;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2023/6/15 9:49
|
||||
* @Version 1.0
|
||||
*/
|
||||
@RestController
|
||||
public class OpenAreaController {
|
||||
|
||||
@Resource
|
||||
OpenAreaService openAreaService;
|
||||
|
||||
@GetMapping(path = "/getOpenAreaTree")
|
||||
@ApiOperation("开放城市树-搜索城市 到第二节点")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "keyword", value = "搜索关键字", required = false),
|
||||
@ApiImplicitParam(name = "areaStatus", value = "状态 open-开放 keyOpen-重点开放 notOpen-未开放 saturated-已饱和", required = false)
|
||||
})
|
||||
public ResponseResult<List<OpenAreaTreeVO>> getOpenAreaTree(@RequestParam(value = "keyword",required = false)String keyword,
|
||||
@RequestParam(value = "areaStatus",required = false)String areaStatus){
|
||||
return ResponseResult.success(openAreaService.queryByKeyword(keyword,areaStatus,Boolean.TRUE));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(path = "/getAllOpenAreaTree")
|
||||
@ApiOperation("开放城市树-所有节点")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "keyword", value = "搜索关键字", required = false)
|
||||
})
|
||||
public ResponseResult<List<OpenAreaTreeVO>> getAllOpenAreaTree(@RequestParam(value = "keyword",required = false)String keyword){
|
||||
return ResponseResult.success(openAreaService.queryAllOpenAreaByKeyword(keyword,null,Boolean.FALSE));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping(path = "/getOpenAreaList")
|
||||
@ApiOperation("开放城市树-子列表")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "parentId", value = "父区域名称", required = false),
|
||||
@ApiImplicitParam(name = "type", value = "可预约-reservation 可申请-apply ", required = false)
|
||||
})
|
||||
public ResponseResult<List<OpenAreaVO>> getOpenAreaList(@RequestParam(value = "parentId",required = false)Long parentId,
|
||||
@RequestParam(value = "type",required = false)String type){
|
||||
return ResponseResult.success(openAreaService.getChildrenList(type,parentId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@PostMapping(path = "/changeOpenAreaStatus")
|
||||
@ApiOperation("变更开放区域状态")
|
||||
public ResponseResult<Boolean> changeOpenAreaStatus(@RequestBody OpenAreaRequest openAreaRequest){
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
return ResponseResult.success(openAreaService.batchUpdate( userId, openAreaRequest));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses=http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.executor.appname=${spring.application.name}
|
||||
xxl.job.executor.ip=
|
||||
xxl.job.executor.port=31001
|
||||
xxl.job.executor.logpath=logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays=3
|
||||
xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
||||
|
||||
|
||||
hs.mdm.baseUrl=http://36.7.115.86:10112
|
||||
hs.mdm.appkey=HSAYPartner
|
||||
hs.mdm.appsec=ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
|
||||
|
||||
#sms
|
||||
hs.sms.accessKeyId=LTAI5tPWCTeCyngfYLqoSGWk
|
||||
hs.sms.accessKeySecret=jkzIXlvNF17ne5TPPEFP1sQhcfg4Je
|
||||
|
||||
ec.baseUrl=https://oapi-gateway.shpr.top/basic
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
sms.invate.channel.id=46930
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses=http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.executor.appname=${spring.application.name}
|
||||
xxl.job.executor.ip=
|
||||
xxl.job.executor.port=31001
|
||||
xxl.job.executor.logpath=logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays=3
|
||||
xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
||||
|
||||
|
||||
hs.mdm.baseUrl=http://36.7.115.86:10112
|
||||
hs.mdm.appkey=HSAYPartner
|
||||
hs.mdm.appsec=ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
|
||||
|
||||
#sms
|
||||
hs.sms.accessKeyId=LTAI5tPWCTeCyngfYLqoSGWk
|
||||
hs.sms.accessKeySecret=jkzIXlvNF17ne5TPPEFP1sQhcfg4Je
|
||||
|
||||
ec.baseUrl=https://oapi-gateway.shpr.top/basic
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
sms.invate.channel.id=46930
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses=http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.executor.appname=${spring.application.name}
|
||||
xxl.job.executor.ip=
|
||||
xxl.job.executor.port=31001
|
||||
xxl.job.executor.logpath=logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays=3
|
||||
xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
||||
|
||||
|
||||
hs.mdm.baseUrl=http://36.7.115.86:10112
|
||||
hs.mdm.appkey=HSAYPartner
|
||||
hs.mdm.appsec=ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
|
||||
|
||||
#sms
|
||||
hs.sms.accessKeyId=LTAI5tPWCTeCyngfYLqoSGWk
|
||||
hs.sms.accessKeySecret=jkzIXlvNF17ne5TPPEFP1sQhcfg4Je
|
||||
|
||||
ec.baseUrl=https://oapi-gateway.shpr.top/basic
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
sms.invate.channel.id=46930
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses=http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.executor.appname=${spring.application.name}
|
||||
xxl.job.executor.ip=
|
||||
xxl.job.executor.port=31001
|
||||
xxl.job.executor.logpath=logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays=3
|
||||
xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
||||
|
||||
|
||||
hs.mdm.baseUrl=http://36.7.115.86:10112
|
||||
hs.mdm.appkey=HSAYPartner
|
||||
hs.mdm.appsec=ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
|
||||
|
||||
#sms
|
||||
hs.sms.accessKeyId=LTAI5tPWCTeCyngfYLqoSGWk
|
||||
hs.sms.accessKeySecret=jkzIXlvNF17ne5TPPEFP1sQhcfg4Je
|
||||
|
||||
ec.baseUrl=https://oapi-gateway.shpr.top/basic
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
sms.invate.channel.id=46930
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -1,3 +0,0 @@
|
||||
spring.cloud.nacos.discovery.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.file-extension=properties
|
||||
@@ -1,13 +0,0 @@
|
||||
#spring.cloud.nacos.discovery.server-addr=10.0.0.192:8848
|
||||
#spring.cloud.nacos.config.server-addr=10.0.0.192:8848
|
||||
#spring.cloud.nacos.config.file-extension=properties
|
||||
#spring.cloud.nacos.config.namespace=ca99b6a9-b48c-4575-9d07-fc50132b3122
|
||||
#沪上配置
|
||||
#spring.cloud.nacos.discovery.server-addr=192.168.1.137:8848
|
||||
#spring.cloud.nacos.config.server-addr=192.168.1.137:8848
|
||||
#spring.cloud.nacos.config.file-extension=properties
|
||||
#spring.cloud.nacos.config.namespace=ca99b6a9-b48c-4575-9d07-fc50132b3122
|
||||
#酷点掌配置
|
||||
spring.cloud.nacos.discovery.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.file-extension=properties
|
||||
@@ -34,15 +34,15 @@
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
</dependency>
|
||||
<!-- 服务注册与发现依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!-- SpringCloud Alibaba Nacos Config -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <!– SpringCloud Alibaba Nacos Config –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alibaba.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- ELK -->
|
||||
<dependency>
|
||||
<groupId>com.github.danielwegener</groupId>
|
||||
|
||||
@@ -21,7 +21,6 @@ import javax.sql.DataSource;
|
||||
* @Description: B端web层
|
||||
* @date 2023-05-17 11:28
|
||||
*/
|
||||
@EnableDiscoveryClient
|
||||
@SpringBootApplication
|
||||
@MapperScan("com.cool.store.mapper")
|
||||
@EnableAsync
|
||||
|
||||
@@ -6,10 +6,12 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.WechatMiniAppService;
|
||||
import com.cool.store.utils.AESDecryptor;
|
||||
import com.cool.store.utils.Md5Utils;
|
||||
import com.cool.store.utils.Sha1Utils;
|
||||
import com.cool.store.utils.UUIDUtils;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.google.common.collect.Lists;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.MDC;
|
||||
@@ -36,8 +38,8 @@ import java.util.List;
|
||||
@Slf4j
|
||||
public class SignValidateFilter implements Filter {
|
||||
|
||||
// @Resource
|
||||
// private WechatMiniAppService wechatMiniAppService;
|
||||
@Resource
|
||||
private WechatMiniAppService wechatMiniAppService;
|
||||
|
||||
@Value("${signKey}")
|
||||
private String signKey;
|
||||
@@ -75,57 +77,57 @@ public class SignValidateFilter implements Filter {
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
|
||||
// MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||
// HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
// HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
// CustomHttpServletRequestWrapper wrapper = (CustomHttpServletRequestWrapper) request;
|
||||
// String uri = request.getRequestURI();
|
||||
// String method = request.getMethod();
|
||||
// String userStr = "";
|
||||
// boolean isInWhiteList = excludePath(uri);
|
||||
// log.info("url:{}", uri);
|
||||
// if ( !isInWhiteList && !method.equals("OPTIONS")) {
|
||||
// String params = "";
|
||||
// if("GET".equalsIgnoreCase(method)){
|
||||
// params = request.getQueryString();
|
||||
// }else if("POST".equalsIgnoreCase(method)){
|
||||
// params = wrapper.getBody();
|
||||
// }
|
||||
// log.info("params:{}", params);
|
||||
// String sign = request.getHeader("SIGN");
|
||||
// String nonce = request.getHeader("NONCE");
|
||||
// String timestamp = request.getHeader("TIMESTAMP");
|
||||
// String aesPhone = request.getHeader("PHONE");
|
||||
// String openid = request.getHeader("OPENID");
|
||||
// log.info("aesPhone:{}, signKey:{}", aesPhone, signKey);
|
||||
// String phone = AESDecryptor.decrypt(aesPhone, signKey);
|
||||
// String plaintextOpenid = AESDecryptor.decrypt(openid, signKey);
|
||||
// String md5Value = phone + Md5Utils.md5(Md5Utils.md5(plaintextOpenid));
|
||||
// log.info("sign:{}, nonce:{}, timestamp:{},aesPhone:{}, openid:{}, 解密后的手机号:{}, md5Value:{}, 明文plaintextOpenid:{}",
|
||||
// sign, nonce, timestamp, aesPhone, openid, phone, md5Value, plaintextOpenid);
|
||||
// String signStr = timestamp + nonce + params + signKey + md5Value;
|
||||
// String newSign = Sha1Utils.getSha1(signStr.getBytes());
|
||||
// log.info("signStr: {}, newSign: {}", signStr, newSign);
|
||||
// // 前后端验签不等
|
||||
// if (!newSign.equals(sign)) {
|
||||
// response.setStatus(HttpStatus.OK.value());
|
||||
// response.setContentType("application/json;charset=UTF-8");
|
||||
// response.getWriter().write(JSON.toJSONString(ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL)));
|
||||
// return;
|
||||
// }
|
||||
// PartnerUserInfoVO partnerUserInfoVO = wechatMiniAppService.getUserInfo(phone, plaintextOpenid);
|
||||
// if(partnerUserInfoVO != null){
|
||||
// userStr = JSONObject.toJSONString(partnerUserInfoVO);
|
||||
// log.info("url:{}, userStr:{}", uri, userStr);
|
||||
// }
|
||||
// }
|
||||
// try {
|
||||
// PartnerUserHolder.setUser(userStr);
|
||||
// filterChain.doFilter(servletRequest, servletResponse);
|
||||
// } finally {
|
||||
// PartnerUserHolder.removeUser();
|
||||
// MDC.clear();
|
||||
// }
|
||||
MDC.put(CommonConstants.REQUEST_ID, UUIDUtils.get32UUID());
|
||||
HttpServletResponse response = (HttpServletResponse) servletResponse;
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
CustomHttpServletRequestWrapper wrapper = (CustomHttpServletRequestWrapper) request;
|
||||
String uri = request.getRequestURI();
|
||||
String method = request.getMethod();
|
||||
String userStr = "";
|
||||
boolean isInWhiteList = excludePath(uri);
|
||||
log.info("url:{}", uri);
|
||||
if ( !isInWhiteList && !method.equals("OPTIONS")) {
|
||||
String params = "";
|
||||
if("GET".equalsIgnoreCase(method)){
|
||||
params = request.getQueryString();
|
||||
}else if("POST".equalsIgnoreCase(method)){
|
||||
params = wrapper.getBody();
|
||||
}
|
||||
log.info("params:{}", params);
|
||||
String sign = request.getHeader("SIGN");
|
||||
String nonce = request.getHeader("NONCE");
|
||||
String timestamp = request.getHeader("TIMESTAMP");
|
||||
String aesPhone = request.getHeader("PHONE");
|
||||
String openid = request.getHeader("OPENID");
|
||||
log.info("aesPhone:{}, signKey:{}", aesPhone, signKey);
|
||||
String phone = AESDecryptor.decrypt(aesPhone, signKey);
|
||||
String plaintextOpenid = AESDecryptor.decrypt(openid, signKey);
|
||||
String md5Value = phone + Md5Utils.md5(Md5Utils.md5(plaintextOpenid));
|
||||
log.info("sign:{}, nonce:{}, timestamp:{},aesPhone:{}, openid:{}, 解密后的手机号:{}, md5Value:{}, 明文plaintextOpenid:{}",
|
||||
sign, nonce, timestamp, aesPhone, openid, phone, md5Value, plaintextOpenid);
|
||||
String signStr = timestamp + nonce + params + signKey + md5Value;
|
||||
String newSign = Sha1Utils.getSha1(signStr.getBytes());
|
||||
log.info("signStr: {}, newSign: {}", signStr, newSign);
|
||||
// 前后端验签不等
|
||||
if (!newSign.equals(sign)) {
|
||||
response.setStatus(HttpStatus.OK.value());
|
||||
response.setContentType("application/json;charset=UTF-8");
|
||||
response.getWriter().write(JSON.toJSONString(ResponseResult.fail(ErrorCodeEnum.SIGN_FAIL)));
|
||||
return;
|
||||
}
|
||||
PartnerUserInfoVO partnerUserInfoVO = wechatMiniAppService.getUserInfo(phone, plaintextOpenid);
|
||||
if(partnerUserInfoVO != null){
|
||||
userStr = JSONObject.toJSONString(partnerUserInfoVO);
|
||||
log.info("url:{}, userStr:{}", uri, userStr);
|
||||
}
|
||||
}
|
||||
try {
|
||||
PartnerUserHolder.setUser(userStr);
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
} finally {
|
||||
PartnerUserHolder.removeUser();
|
||||
MDC.clear();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
package com.cool.store.controller;
|
||||
|
||||
import com.cool.store.dto.content.ContentQueryDetailDto;
|
||||
import com.cool.store.dto.content.ContentQueryListDto;
|
||||
import com.cool.store.entity.HyContentInfoDO;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.ContentService;
|
||||
import com.cool.store.vo.HyContentInfoVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("news")
|
||||
@Api(tags = "动态")
|
||||
@Slf4j
|
||||
public class ContentController {
|
||||
|
||||
@Autowired
|
||||
private ContentService contentService;
|
||||
|
||||
@PostMapping("/queryContentList")
|
||||
@ApiOperation("查询动态列表")
|
||||
public ResponseResult<PageInfo<HyContentInfoVO>> queryContentList(@RequestBody ContentQueryListDto dto) {
|
||||
PageHelper.startPage(dto.getPageNum(), dto.getPageSize());
|
||||
List<HyContentInfoVO> list = contentService.queryContentListToC(dto);
|
||||
PageInfo<HyContentInfoVO> page = new PageInfo<>(list);
|
||||
return ResponseResult.success(page);
|
||||
}
|
||||
|
||||
@PostMapping("/detail")
|
||||
@ApiOperation("动态详情")
|
||||
public ResponseResult<HyContentInfoDO> queryContentInfo(@RequestBody ContentQueryDetailDto dto) {
|
||||
return ResponseResult.success(contentService.queryContentInfo(dto.getContentId()));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -0,0 +1,108 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
trtc.video.callback.secretKey=1ECEAD34DBD84E838BF07FC7360EA4D8
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
weixin.index.url=pages/index/index
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
#xxljob配置
|
||||
#xxljob配置
|
||||
xxl.job.admin.addresses=http://10.7.53.224:10001/xxl-job-admin
|
||||
xxl.job.executor.appname=${spring.application.name}
|
||||
xxl.job.executor.ip=
|
||||
xxl.job.executor.port=31001
|
||||
xxl.job.executor.logpath=logs/xxl-job/jobhandler
|
||||
xxl.job.executor.logretentiondays=3
|
||||
xxl.job.accessToken=25365115eed84e9ba5e0040abb255a09
|
||||
|
||||
|
||||
hs.mdm.baseUrl=http://36.7.115.86:10112
|
||||
hs.mdm.appkey=HSAYPartner
|
||||
hs.mdm.appsec=ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
|
||||
|
||||
#sms
|
||||
hs.sms.accessKeyId=LTAI5tPWCTeCyngfYLqoSGWk
|
||||
hs.sms.accessKeySecret=jkzIXlvNF17ne5TPPEFP1sQhcfg4Je
|
||||
|
||||
ec.baseUrl=https://oapi-gateway.shpr.top/basic
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
sms.invate.channel.id=46930
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
#mysql config
|
||||
default.datasource.url=jdbc:mysql://dingpushcoolcollege.mysql.rds.aliyuncs.com:3306/coolcollege_intelligent_hy?useSSL=false&useUnicode=true&characterEncoding=utf8&allowMultiQueries=true&autoReconnect=true
|
||||
default.datasource.username=hsay
|
||||
default.datasource.password=Z3J7xBbgouMD
|
||||
|
||||
#redis
|
||||
spring.redis.host=tstore-coolcollege.redis.rds.aliyuncs.com
|
||||
spring.redis.port=6379
|
||||
spring.redis.password=Cx111111
|
||||
spring.redis.database=0
|
||||
spring.redis.timeout=2000ms
|
||||
spring.redis.lettuce.pool.max-wait=100ms
|
||||
spring.redis.lettuce.pool.max-active=1024
|
||||
spring.redis.lettuce.pool.max-idle=200
|
||||
spring.redis.lettuce.pool.min-idle=0
|
||||
spring.redis.lettuce.shutdown-timeout=100ms
|
||||
redis.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/0
|
||||
redis.isv.host.uri=http://userInfo:Cx111111@tstore-coolcollege.redis.rds.aliyuncs.com:6379/2
|
||||
|
||||
#pagehelper
|
||||
pagehelper.helper-dialect=mysql
|
||||
pagehelper.reasonable=false
|
||||
pagehelper.returnPageInfo=check
|
||||
pagehelper.support-methods-arguments=false
|
||||
pagehelper.params=count=countSql
|
||||
pagehelper.page-size-zero=true
|
||||
|
||||
spring.mvc.async.request-timeout=60000
|
||||
|
||||
# mybatis config
|
||||
mybatis.mapper-locations=classpath*:mapper/**/*Mapper.xml
|
||||
|
||||
mybatis.configuration.call-setters-on-nulls=true
|
||||
mybatis.configuration.map-underscore-to-camel-case=true
|
||||
|
||||
isv.domain=https://abstore-isv.coolstore.cn/isv
|
||||
|
||||
#rocketmq \u914D\u7F6E
|
||||
rocketmq.accessKey=zK2oVEz4G1ts23d2
|
||||
rocketmq.secretKey=0UstLCS0mh2ASgBh
|
||||
rocketmq.nameSrvAdder=http://rmq-cn-9lb38l1rx04.cn-hangzhou.rmq.aliyuncs.com:8080
|
||||
rocketmq.topic=simple_message
|
||||
|
||||
#oss配置
|
||||
oss.accessKeyId=LTAI5tRSXy2MrqaaBJ6gReur
|
||||
oss.accessKeySecret=FFsl8d9batprJ0vXr0k4Y8ada40Wm2
|
||||
oss.endpoint=oss-cn-hangzhou.aliyuncs.com
|
||||
oss.bucket=cool-store-hsay
|
||||
oss.file.dir=partner/171cddee76471740/
|
||||
oss.excelFile.dir=lineExcel/
|
||||
|
||||
#企业corpId
|
||||
corp.id=171cddee76471740
|
||||
#cdn地址
|
||||
cdn.url=https://testhsaypic.coolstore.cn
|
||||
|
||||
#TRTC
|
||||
trtc.sdkAppId=1400811820
|
||||
trtc.secretKey=4854bab106c2ca2a2fda16a8c966933e28a078a34e458999d6227e8cd8ab8219
|
||||
|
||||
weixin.appId=wx997f2206e276e513
|
||||
weixin.appSecret=90a51574dde00480316f81a552e6b5cb
|
||||
|
||||
signKey=77fea013c3a6459685b83c21a2fc3411
|
||||
fixMobileOpenid=HSAY5531DA7
|
||||
|
||||
#飞书通知
|
||||
feishu.notice.link.url=https://applink.feishu.cn/client/web_app/open?appId=cli_a4f3e24dc73a100c&lk_target_url=https%3A%2F%2Ftest-hsay-web.coolstore.cn%2F%23%2Fwork%2Fbench
|
||||
feishu.notice.link.url.mobile=https://test-hsay-web.coolstore.cn/#/mobile
|
||||
|
||||
#阿里云ak sk
|
||||
aliyun.accessKeyId=LTAI5t9RaXvABZbHvoXjDFJ1
|
||||
aliyun.accessKeySecret=zhOK7WWo3yGoUWkOMaatty19k25CMd
|
||||
aliyun.authCode=Y81FVZepk6
|
||||
|
||||
exhibition.channel.id=52399
|
||||
recommended.channel.id=52400
|
||||
manual.channel.id=52403
|
||||
|
||||
ec.sync.createUserId=ou_18d7526a527a30a06ee99205ad983f3f
|
||||
|
||||
#沪上阿姨事件中心地址
|
||||
hsay.event.url=https://oapi-gateway.shpr.top/event
|
||||
hsay.event.systemsource=hsay_test
|
||||
@@ -1,7 +1,8 @@
|
||||
spring.application.name=hsay-partner-webc
|
||||
spring.profiles.active=dev
|
||||
server.port=30900
|
||||
server.servlet.context-path=/partner/mini/program
|
||||
spring.application.name=hsay-partner-webb
|
||||
spring.profiles.active=test
|
||||
|
||||
server.port=31000
|
||||
server.servlet.context-path=/partner/pc
|
||||
|
||||
#logback
|
||||
logging.config=classpath:logback-spring.xml
|
||||
@@ -1,3 +0,0 @@
|
||||
spring.cloud.nacos.discovery.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.file-extension=properties
|
||||
@@ -1,11 +0,0 @@
|
||||
#spring.cloud.nacos.discovery.server-addr=10.0.0.192:8848
|
||||
#spring.cloud.nacos.config.server-addr=10.0.0.192:8848
|
||||
#spring.cloud.nacos.config.file-extension=properties
|
||||
#spring.cloud.nacos.config.namespace=ca99b6a9-b48c-4575-9d07-fc50132b3122
|
||||
#spring.cloud.nacos.discovery.server-addr=120.92.151.10:8848
|
||||
#spring.cloud.nacos.config.server-addr=120.92.151.10:8848
|
||||
#spring.cloud.nacos.config.file-extension=properties
|
||||
#spring.cloud.nacos.config.namespace=ca99b6a9-b48c-4575-9d07-fc50132b3122
|
||||
spring.cloud.nacos.discovery.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.server-addr=121.41.41.92
|
||||
spring.cloud.nacos.config.file-extension=properties
|
||||
Reference in New Issue
Block a user