70 changed files with 2303 additions and 89 deletions
@ -0,0 +1,27 @@ |
|||
package com.epmet.dataaggre.dto.app.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 查询底部footBar信息(两端通用) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 18:54 |
|||
*/ |
|||
@Data |
|||
public class AppFootBarFormDTO implements Serializable { |
|||
public interface AddUserInternalGroup {} |
|||
/** |
|||
* 产品配置:default; 客户定制化里面就传客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空",groups = AddUserInternalGroup.class) |
|||
private String customerId; |
|||
/** |
|||
* 工作端:gov;居民端resi |
|||
*/ |
|||
@NotBlank(message = "appType不能为空",groups = AddUserInternalGroup.class) |
|||
private String appType; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.dataaggre.dto.app.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 查询底部footBar信息(两端通用) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 19:00 |
|||
*/ |
|||
@Data |
|||
public class AppFootBarResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -2219461245919203814L; |
|||
|
|||
/** |
|||
* 水平:flat;浮起:float |
|||
*/ |
|||
private String pattern; |
|||
/** |
|||
* 默认返回0,如果是浮起模式且是奇数,返回是footBarList的索引 |
|||
*/ |
|||
private Integer highLightNum; |
|||
|
|||
|
|||
private List<CustomerFootBarDTO> footBarList; |
|||
|
|||
/** |
|||
* 是否是奇数,true:是奇数 |
|||
*/ |
|||
private Boolean isOddNum; |
|||
|
|||
/** |
|||
* 是否都上传了图标,true:都上传了 |
|||
*/ |
|||
// private Boolean bothUploaded;
|
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.dataaggre.dto.app.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 查询底部footBar信息(两端通用) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 19:01 |
|||
*/ |
|||
@Data |
|||
public class CustomerFootBarDTO implements Serializable { |
|||
/** |
|||
* KEY |
|||
*/ |
|||
private String barKey; |
|||
|
|||
/** |
|||
* bar名称 |
|||
*/ |
|||
private String barName; |
|||
|
|||
/** |
|||
* 页面标题 |
|||
*/ |
|||
private String pageTitle; |
|||
|
|||
/** |
|||
* 图标路径 |
|||
*/ |
|||
private String iconPath; |
|||
|
|||
/** |
|||
* 选中页面图标路径 |
|||
*/ |
|||
private String selectedIconPath; |
|||
|
|||
/** |
|||
* 凸起时图标路径 |
|||
*/ |
|||
private String floatIconPath; |
|||
|
|||
/** |
|||
* 客户id |
|||
*/ |
|||
private String customerId; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.dataaggre.controller; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dataaggre.dto.app.form.AppFootBarFormDTO; |
|||
import com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO; |
|||
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService; |
|||
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; |
|||
|
|||
/** |
|||
* 小程序相关配置,可以放在这,目前只放了footbar |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 18:36 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("app") |
|||
public class AppController { |
|||
@Autowired |
|||
private CustomerFootBarService customerFootBarService; |
|||
|
|||
/** |
|||
* 查询底部footBar信息(两端通用) |
|||
* |
|||
* @param footBarFormDTO |
|||
* @return com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO |
|||
* @author yinzuomei |
|||
* @date 2021/7/27 18:59 |
|||
*/ |
|||
@PostMapping("footbars") |
|||
public Result<AppFootBarResultDTO> queryAppFootBars(@RequestBody AppFootBarFormDTO footBarFormDTO){ |
|||
ValidatorUtils.validateEntity(footBarFormDTO,AppFootBarFormDTO.AddUserInternalGroup.class); |
|||
AppFootBarResultDTO resultDTO=customerFootBarService.queryAppFootBars(footBarFormDTO); |
|||
return new Result<AppFootBarResultDTO>().ok(resultDTO); |
|||
} |
|||
} |
@ -0,0 +1,43 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.dao.opercrm; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* 客户配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
@Mapper |
|||
public interface CustomerParameterDao extends BaseDao<CustomerParameterEntity> { |
|||
/** |
|||
* 根据参数key查询 |
|||
* |
|||
* @param parameterKey |
|||
* @param customerId |
|||
* @return java.lang.String |
|||
* @author yinzuomei |
|||
* @date 2021/7/27 17:07 |
|||
*/ |
|||
CustomerParameterEntity selectByParameterKey(@Param("parameterKey")String parameterKey, @Param("customerId")String customerId); |
|||
} |
@ -0,0 +1,59 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.dao.opercustomize; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO; |
|||
import com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* APP底部菜单栏信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
@Mapper |
|||
public interface CustomerFootBarDao extends BaseDao<CustomerFootBarEntity> { |
|||
|
|||
/** |
|||
* 查询客户工作端或者居民端,footbar列表 |
|||
* |
|||
* @param customerId |
|||
* @param appType |
|||
* @return java.util.List<com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO> |
|||
* @author yinzuomei |
|||
* @date 2021/7/28 10:56 |
|||
*/ |
|||
List<CustomerFootBarDTO> selectAppFootBars(@Param("customerId") String customerId, @Param("appType") String appType); |
|||
|
|||
/** |
|||
* 查询某个footbar信息 |
|||
* |
|||
* @param customerId |
|||
* @param appType |
|||
* @param barKey |
|||
* @return com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity |
|||
* @author yinzuomei |
|||
* @date 2021/7/28 10:56 |
|||
*/ |
|||
CustomerFootBarEntity selectDefaultIcon(@Param("customerId") String customerId, @Param("appType")String appType, @Param("barKey")String barKey); |
|||
} |
@ -0,0 +1,68 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.entity.opercrm; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* 客户配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("customer_parameter") |
|||
public class CustomerParameterEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 参数KEY值(发短信:send_msg;) |
|||
*/ |
|||
private String parameterKey; |
|||
|
|||
/** |
|||
* 参数名称(短信) |
|||
*/ |
|||
private String parameterName; |
|||
|
|||
/** |
|||
* 参数开关:开启:on,关闭:off |
|||
*/ |
|||
private String parameterSwitch; |
|||
|
|||
/** |
|||
* 参数VALUE值 |
|||
*/ |
|||
private String parameterValue; |
|||
|
|||
/** |
|||
* 说明 |
|||
*/ |
|||
private String description; |
|||
|
|||
} |
@ -0,0 +1,88 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.entity.opercustomize; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
/** |
|||
* APP底部菜单栏信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("customer_foot_bar") |
|||
public class CustomerFootBarEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 工作端:gov居民端:resi |
|||
*/ |
|||
private String appType; |
|||
|
|||
/** |
|||
* KEY |
|||
*/ |
|||
private String barKey; |
|||
|
|||
/** |
|||
* bar名称 |
|||
*/ |
|||
private String barName; |
|||
|
|||
/** |
|||
* 页面标题 |
|||
*/ |
|||
private String pageTitle; |
|||
|
|||
/** |
|||
* 图标路径 |
|||
*/ |
|||
private String iconPath; |
|||
|
|||
/** |
|||
* 选中页面图标路径 |
|||
*/ |
|||
private String selectedIconPath; |
|||
|
|||
/** |
|||
* 凸起时图标路径 |
|||
*/ |
|||
private String floatIconPath; |
|||
|
|||
/** |
|||
* 是否显示。1:显示,0:隐藏 |
|||
*/ |
|||
private Integer display; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer orderIndex; |
|||
|
|||
} |
@ -0,0 +1,34 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.service.opercrm; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity; |
|||
|
|||
/** |
|||
* 客户配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
public interface CustomerParameterService extends BaseService<CustomerParameterEntity> { |
|||
|
|||
CustomerParameterEntity queryFootBarPattern(String customerId, String appType); |
|||
|
|||
CustomerParameterEntity queryFootBarHighLightNum(String customerId, String appType); |
|||
} |
@ -0,0 +1,60 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.service.opercrm.impl; |
|||
|
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import com.epmet.dataaggre.constant.DataSourceConstant; |
|||
import com.epmet.dataaggre.dao.opercrm.CustomerParameterDao; |
|||
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity; |
|||
import com.epmet.dataaggre.service.opercrm.CustomerParameterService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* 客户配置表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
@DataSource(DataSourceConstant.OPER_CRM) |
|||
@Slf4j |
|||
@Service |
|||
public class CustomerParameterServiceImpl extends BaseServiceImpl<CustomerParameterDao, CustomerParameterEntity> implements CustomerParameterService { |
|||
|
|||
@Override |
|||
public CustomerParameterEntity queryFootBarPattern(String customerId, String appType) { |
|||
String parameterKey=appType.concat(Constant.FOOTBAR_PATTERN_KEY_SUFFIX); |
|||
CustomerParameterEntity pattern=baseDao.selectByParameterKey(parameterKey,customerId); |
|||
if(null ==pattern){ |
|||
pattern=baseDao.selectByParameterKey(parameterKey, Constant.DEFAULT_CUSTOMER); |
|||
} |
|||
return pattern; |
|||
} |
|||
|
|||
@Override |
|||
public CustomerParameterEntity queryFootBarHighLightNum(String customerId, String appType) { |
|||
String parameterKey=appType.concat(Constant.FOOTBAR_HIGHLIGHT_NUM); |
|||
CustomerParameterEntity entity=baseDao.selectByParameterKey(parameterKey,customerId); |
|||
if(null ==entity){ |
|||
entity=baseDao.selectByParameterKey(parameterKey, Constant.DEFAULT_CUSTOMER); |
|||
} |
|||
return entity; |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.service.opercustomize; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.dataaggre.dto.app.form.AppFootBarFormDTO; |
|||
import com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO; |
|||
import com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity; |
|||
|
|||
/** |
|||
* APP底部菜单栏信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
public interface CustomerFootBarService extends BaseService<CustomerFootBarEntity> { |
|||
|
|||
/** |
|||
* 查询底部footBar信息(两端通用) |
|||
* |
|||
* @param footBarFormDTO |
|||
* @return com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO |
|||
* @author yinzuomei |
|||
* @date 2021/7/27 18:59 |
|||
*/ |
|||
AppFootBarResultDTO queryAppFootBars(AppFootBarFormDTO footBarFormDTO); |
|||
} |
@ -0,0 +1,115 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dataaggre.service.opercustomize.impl; |
|||
|
|||
import com.epmet.commons.dynamic.datasource.annotation.DataSource; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.constant.Constant; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.constant.StrConstant; |
|||
import com.epmet.dataaggre.constant.DataSourceConstant; |
|||
import com.epmet.dataaggre.dao.opercustomize.CustomerFootBarDao; |
|||
import com.epmet.dataaggre.dto.app.form.AppFootBarFormDTO; |
|||
import com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO; |
|||
import com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO; |
|||
import com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity; |
|||
import com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity; |
|||
import com.epmet.dataaggre.service.opercrm.CustomerParameterService; |
|||
import com.epmet.dataaggre.service.opercustomize.CustomerFootBarService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.util.CollectionUtils; |
|||
|
|||
import java.util.List; |
|||
|
|||
|
|||
/** |
|||
* APP底部菜单栏信息 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2021-07-27 |
|||
*/ |
|||
@DataSource(DataSourceConstant.OPERCUSTOMIZE) |
|||
@Slf4j |
|||
@Service |
|||
public class CustomerFootBarServiceImpl extends BaseServiceImpl<CustomerFootBarDao, CustomerFootBarEntity> implements CustomerFootBarService { |
|||
|
|||
@Autowired |
|||
private CustomerParameterService customerParameterService; |
|||
|
|||
/** |
|||
* 查询底部footBar信息(两端通用) |
|||
* |
|||
* @param footBarFormDTO |
|||
* @return com.epmet.dataaggre.dto.app.result.AppFootBarResultDTO |
|||
* @author yinzuomei |
|||
* @date 2021/7/27 18:59 |
|||
*/ |
|||
@Override |
|||
public AppFootBarResultDTO queryAppFootBars(AppFootBarFormDTO footBarFormDTO) { |
|||
AppFootBarResultDTO resultDTO = new AppFootBarResultDTO(); |
|||
resultDTO.setPattern(Constant.FOOT_BAR_FLAT); |
|||
resultDTO.setHighLightNum(NumConstant.ZERO); |
|||
// 1、查询客户的模式,没有返回产品默认的;*水平:flat;浮起:float
|
|||
CustomerParameterEntity patternEntity = customerParameterService.queryFootBarPattern(footBarFormDTO.getCustomerId(), footBarFormDTO.getAppType()); |
|||
// 2、查询客户设置的第几个,没有默认返回0,
|
|||
CustomerParameterEntity highLightNumEntity = customerParameterService.queryFootBarHighLightNum(footBarFormDTO.getCustomerId(), footBarFormDTO.getAppType()); |
|||
List<CustomerFootBarDTO> footBarList = baseDao.selectAppFootBars(footBarFormDTO.getCustomerId(), footBarFormDTO.getAppType()); |
|||
if (CollectionUtils.isEmpty(footBarList)) { |
|||
footBarList = baseDao.selectAppFootBars(Constant.DEFAULT_CUSTOMER, footBarFormDTO.getAppType()); |
|||
}else{ |
|||
//如果客户没有上传图标,返回产品默认的图标
|
|||
for (CustomerFootBarDTO dto : footBarList) { |
|||
if (StringUtils.isBlank(dto.getIconPath()) |
|||
|| StringUtils.isBlank(dto.getSelectedIconPath()) |
|||
|| StringUtils.isBlank(dto.getFloatIconPath())) { |
|||
CustomerFootBarEntity defaultEntity = baseDao.selectDefaultIcon(Constant.DEFAULT_CUSTOMER, footBarFormDTO.getAppType(), dto.getBarKey()); |
|||
if (StringUtils.isBlank(dto.getIconPath())) { |
|||
dto.setIconPath(null == defaultEntity ? StrConstant.EPMETY_STR : defaultEntity.getIconPath()); |
|||
} |
|||
if (StringUtils.isBlank(dto.getSelectedIconPath())) { |
|||
dto.setSelectedIconPath(null == defaultEntity ? StrConstant.EPMETY_STR : defaultEntity.getSelectedIconPath()); |
|||
} |
|||
if (StringUtils.isBlank(dto.getFloatIconPath())) { |
|||
dto.setFloatIconPath(null == defaultEntity ? StrConstant.EPMETY_STR : defaultEntity.getFloatIconPath()); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
if (footBarList.size() % NumConstant.TWO == 0) { |
|||
resultDTO.setIsOddNum(false); |
|||
} else { |
|||
resultDTO.setIsOddNum(true); |
|||
} |
|||
//只有客户选择的浮起+奇数+全部上传了图标才返回pattern=flat
|
|||
if (resultDTO.getIsOddNum() && Constant.FOOT_BAR_FLOAT.equals(patternEntity.getParameterValue())) { |
|||
resultDTO.setPattern(Constant.FOOT_BAR_FLOAT); |
|||
//返回
|
|||
resultDTO.setHighLightNum(footBarList.size() / NumConstant.TWO); |
|||
} else { |
|||
resultDTO.setPattern(Constant.FOOT_BAR_FLAT); |
|||
resultDTO.setHighLightNum(Integer.valueOf(highLightNumEntity.getParameterValue())); |
|||
} |
|||
//如果是浮起模式且是奇数,返回是footBarList的索引
|
|||
resultDTO.setFootBarList(footBarList); |
|||
return resultDTO; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,15 @@ |
|||
<?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.epmet.dataaggre.dao.opercrm.CustomerParameterDao"> |
|||
<select id="selectByParameterKey" parameterType="map" resultType="com.epmet.dataaggre.entity.opercrm.CustomerParameterEntity"> |
|||
select |
|||
cp.* |
|||
from customer_parameter cp |
|||
where cp.DEL_FLAG='0' |
|||
and cp.CUSTOMER_ID=#{customerId} |
|||
and cp.PARAMETER_KEY=#{parameterKey} |
|||
</select> |
|||
|
|||
|
|||
</mapper> |
@ -0,0 +1,41 @@ |
|||
<?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.epmet.dataaggre.dao.opercustomize.CustomerFootBarDao"> |
|||
|
|||
<!-- 查询客户工作端或者居民端,footbar列表 --> |
|||
<select id="selectAppFootBars" parameterType="map" resultType="com.epmet.dataaggre.dto.app.result.CustomerFootBarDTO"> |
|||
SELECT |
|||
c.BAR_KEY as barKey, |
|||
c.BAR_NAME as barName, |
|||
IFNULL(c.PAGE_TITLE,'') as pageTitle, |
|||
IFNULL(c.ICON_PATH,'') as iconPath, |
|||
IFNULL(c.SELECTED_ICON_PATH,'') as selectedIconPath, |
|||
IFNULL(c.FLOAT_ICON_PATH,'') AS floatIconPath, |
|||
c.CUSTOMER_ID as customerId |
|||
FROM |
|||
customer_foot_bar c |
|||
WHERE |
|||
c.del_flag = '0' |
|||
AND c.customer_id = #{customerId} |
|||
AND c.app_type = #{appType} |
|||
AND C.DISPLAY='1' |
|||
order by c.ORDER_INDEX asc |
|||
</select> |
|||
|
|||
<!-- 查询某个footbar信息 --> |
|||
<select id="selectDefaultIcon" parameterType="map" resultType="com.epmet.dataaggre.entity.opercustomize.CustomerFootBarEntity"> |
|||
SELECT |
|||
IFNULL(c.ICON_PATH,'') as iconPath, |
|||
IFNULL(c.SELECTED_ICON_PATH,'') as selectedIconPath, |
|||
IFNULL(c.FLOAT_ICON_PATH,'') as floatIconPath |
|||
FROM |
|||
customer_foot_bar c |
|||
WHERE |
|||
c.del_flag = '0' |
|||
AND c.customer_id = #{customerId} |
|||
AND c.app_type = #{appType} |
|||
and c.BAR_KEY=#{barKey} |
|||
AND C.DISPLAY='1' |
|||
</select> |
|||
</mapper> |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/7/27 10:47 |
|||
*/ |
|||
|
|||
@NoArgsConstructor |
|||
@Data |
|||
public class PendingResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 2545519820222637112L; |
|||
private String issueId; |
|||
private String issueTitle; |
|||
private Long issueShiftedTime; |
|||
private String topicContent; |
|||
private List<String> currentHandleDepartMent; |
|||
private List<String> topicVoices; |
|||
private List<String> topicImgs; |
|||
private String sourceId; |
|||
@JsonIgnore |
|||
private String projectId; |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/7/27 13:55 |
|||
*/ |
|||
@Data |
|||
public class ResolvedResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -6670213622289052352L; |
|||
/** |
|||
* 议题Id |
|||
*/ |
|||
private String issueId; |
|||
/** |
|||
* 议题标题 |
|||
*/ |
|||
private String issueTitle; |
|||
/** |
|||
* 转成项目时间 |
|||
*/ |
|||
private Long closedTime; |
|||
|
|||
/** |
|||
* 结案说明 |
|||
*/ |
|||
private String publicReply; |
|||
|
|||
/** |
|||
* 来源id |
|||
*/ |
|||
private String sourceId; |
|||
|
|||
/** |
|||
* 话题图片 |
|||
*/ |
|||
private List<String> topicImgs; |
|||
|
|||
/** |
|||
* 话题语音 |
|||
*/ |
|||
private List<String> topicVoices; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2021/7/27 10:31 |
|||
*/ |
|||
@Data |
|||
public class UnResolvedResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 3654271828450408782L; |
|||
/** |
|||
* 议题Id |
|||
*/ |
|||
private String issueId; |
|||
/** |
|||
* 议题标题 |
|||
*/ |
|||
private String issueTitle; |
|||
/** |
|||
* 转成项目时间 |
|||
*/ |
|||
private Long closedTime; |
|||
|
|||
/** |
|||
* 结案说明 |
|||
*/ |
|||
private String solution; |
|||
|
|||
/** |
|||
* 来源id |
|||
*/ |
|||
private String sourceId; |
|||
|
|||
/** |
|||
* 话题图片 |
|||
*/ |
|||
private List<String> topicImgs; |
|||
|
|||
/** |
|||
* 话题语音 |
|||
*/ |
|||
private List<String> topicVoices; |
|||
|
|||
/** |
|||
* 话题内容 |
|||
*/ |
|||
private String topicContent; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 描述一下 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 17:21 |
|||
*/ |
|||
@Data |
|||
public class FootBarPatternFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8607183484805804359L; |
|||
/** |
|||
* 产品配置:default; 客户定制化里面就传客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空") |
|||
private String customerId; |
|||
/** |
|||
* 工作端:gov;居民端resi |
|||
*/ |
|||
@NotBlank(message = "appType不能为空") |
|||
private String appType; |
|||
|
|||
/** |
|||
* 参数值含义:flat:水平模式;float:浮起某个菜单 |
|||
*/ |
|||
@NotBlank(message = "pattern不能为空,参数值含义:flat:水平模式;float:浮起某个菜单") |
|||
private String pattern; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 查询FootBar显示模式(产品配置+客户定制化通用) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 16:40 |
|||
*/ |
|||
@Data |
|||
public class FootBarPatternQueryFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 2928030075406974562L; |
|||
/** |
|||
* 产品配置:default; 客户定制化里面就传客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空") |
|||
private String customerId; |
|||
/** |
|||
* 工作端:gov;居民端resi |
|||
*/ |
|||
@NotBlank(message = "appType不能为空") |
|||
private String appType; |
|||
|
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 查询FootBar显示模式(产品配置+客户定制化通用) |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 16:49 |
|||
*/ |
|||
@Data |
|||
public class FootBarPatternQueryResultDTO implements Serializable { |
|||
private static final long serialVersionUID = -3185762444171339921L; |
|||
|
|||
/** |
|||
* 参数值含义:flat:水平模式;float:浮起某个菜单 |
|||
*/ |
|||
private String pattern; |
|||
|
|||
private String customerId; |
|||
} |
@ -0,0 +1,4 @@ |
|||
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('cf4ea9c6eeb011eb89b70050568f8cf7', 'default', 'gov_footbar_pattern', '工作端footbar显示样式', 'on', 'flat', '参数值含义:flat:水平模式;float:浮起某个菜单', 0, 0, 'yinzuomei', '2021-07-27 16:04:53', 'yinzuomei', '2021-07-27 16:04:56'); |
|||
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('1e398325eeb111eb89b70050568f8cf7', 'default', 'resi_footbar_pattern', '居民端footbar显示样式', 'on', 'flat', '参数值含义: flat:水平模式;float:浮起某个菜单。', 0, 0, 'yinzuomei', '2021-07-27 16:05:46', 'yinzuomei', '2021-07-27 16:05:51'); |
|||
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('c7baa378eeb111eb89b70050568f8cf7', 'default', 'gov_footbar_highlight_num', '工作端footbar为水平模式时,第几个凸起?现在默认是0', 'on', '0', '工作端footbar为水平模式时,第几个凸起?现在默认是0', 0, 0, 'yinzuomei', '2021-07-27 16:12:46', 'yinzuomei', '2021-07-27 16:12:51'); |
|||
INSERT INTO `epmet_oper_crm`.`customer_parameter`(`ID`, `CUSTOMER_ID`, `PARAMETER_KEY`, `PARAMETER_NAME`, `PARAMETER_SWITCH`, `PARAMETER_VALUE`, `DESCRIPTION`, `DEL_FLAG`, `REVISION`, `CREATED_BY`, `CREATED_TIME`, `UPDATED_BY`, `UPDATED_TIME`) VALUES ('35d14ac1eeb211eb89b70050568f8cf7', 'default', 'resi_footbar_highlight_num', '居民端footbar为水平模式时,第几个凸起?现在默认是0', 'on', '0', '居民端footbar为水平模式时,第几个凸起?现在默认是0', 0, 0, 'yinzuomei', '2021-07-27 16:14:43', 'yinzuomei', '2021-07-27 16:14:49'); |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 校验当前客户是否可以选择浮起footbar模式 |
|||
* 只有奇数并且3个图标都上传的才可以 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 17:56 |
|||
*/ |
|||
@Data |
|||
public class CheckFloatFootBarFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 3202974977135976455L; |
|||
/** |
|||
* 传客户id |
|||
*/ |
|||
@NotBlank(message = "customerId不能为空") |
|||
private String customerId; |
|||
/** |
|||
* 工作端:gov;居民端resi |
|||
*/ |
|||
@NotBlank(message = "appType不能为空") |
|||
private String appType; |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 客户定制化-FootBar配置,获取当前客户未上线的 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/28 9:39 |
|||
*/ |
|||
@Data |
|||
public class NotOnlineFootBarFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -4103181048360051521L; |
|||
@NotBlank(message = "客户id不能为空") |
|||
private String customerId; |
|||
@NotBlank(message = "appType不能为空") |
|||
private String appType; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 客户定制化-同步footbar |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/28 15:21 |
|||
*/ |
|||
@Data |
|||
public class SyncFootBar4CustomerFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 8879950597580438204L; |
|||
@NotBlank(message = "customerId不能为空") |
|||
private String customerId; |
|||
@NotBlank(message = "appType不能为空") |
|||
private String appType; |
|||
private List<String> syncBarKeyList; |
|||
private List<String> addBarKeyList; |
|||
|
|||
@NotBlank(message = "操作用户不能为空") |
|||
private String userId; |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* 校验当前客户是否可以选择浮起footbar模式 |
|||
* 只有奇数并且3个图标都上传的才可以 |
|||
* |
|||
* @author yinzuomei@elink-cn.com |
|||
* @date 2021/7/27 17:56 |
|||
*/ |
|||
@Data |
|||
public class CheckFloatFootBarResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 8205326079938200511L; |
|||
|
|||
/** |
|||
* 是否是奇数,true:是奇数 |
|||
*/ |
|||
private Boolean isOddNum; |
|||
|
|||
/** |
|||
* 是否都上传了图标,true:都上传了 |
|||
*/ |
|||
private Boolean bothUploaded; |
|||
} |
@ -0,0 +1 @@ |
|||
alter table customer_foot_bar add COLUMN FLOAT_ICON_PATH VARCHAR(255) COMMENT '凸起时图标路径' AFTER SELECTED_ICON_PATH; |
Loading…
Reference in new issue