Commit 60378a9d by 墨竹

Merge branch 'feature/login-token' into developer

parents 415f0e8a e582517b
......@@ -35,11 +35,6 @@ public class WelcomeDTO implements Serializable {
private String welcomeContent;
/**
* 图片
*/
private String welcomeImg;
/**
* 0删除 1正常
*/
private Integer openFlag;
......@@ -90,14 +85,6 @@ public class WelcomeDTO implements Serializable {
this.welcomeContent = welcomeContent;
}
public String getWelcomeImg() {
return welcomeImg;
}
public void setWelcomeImg(String welcomeImg) {
this.welcomeImg = welcomeImg;
}
public Integer getOpenFlag() {
return openFlag;
}
......
......@@ -15,7 +15,7 @@ public interface DictApiService {
DictDTO findOneDict(String dictId);
Page<DictDTO> pageList(BasePageInfo pageInfo);
void deleteOne(String dictId);
/**
......@@ -25,4 +25,14 @@ public interface DictApiService {
* @return
*/
List<DictDTO> queryList(List<String> dictKeys);
/**
* 根据key 获取一条
*
* @param dictKey dict关键
* @return {@link DictDTO }
* @author mozhu
* @date 2021-12-15 19:47:51
*/
DictDTO findOneDictByKey(String dictKey);
}
......@@ -26,5 +26,4 @@ public interface DictMapper {
TabHaobanDict selectByDictKey(String dictKey);
TabHaobanDict selectByDictName(String dictKey);
}
\ No newline at end of file
......@@ -4,7 +4,6 @@ import java.io.Serializable;
import java.util.Date;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 欢迎语配置表
*
......@@ -34,11 +33,6 @@ public class TabWelcome implements Serializable {
private String welcomeContent;
/**
* 图片
*/
private String welcomeImg;
/**
* 0删除 1正常
*/
private Integer openFlag;
......@@ -90,14 +84,6 @@ public class TabWelcome implements Serializable {
this.welcomeContent = welcomeContent;
}
public String getWelcomeImg() {
return welcomeImg;
}
public void setWelcomeImg(String welcomeImg) {
this.welcomeImg = welcomeImg;
}
public Integer getOpenFlag() {
return openFlag;
}
......
......@@ -6,7 +6,6 @@ import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -15,10 +14,9 @@ import java.util.List;
@Service
public class WxEnterpriseServiceImpl implements WxEnterpriseService {
@Autowired
private WxEnterpriseMapper mapper;
@Autowired
private QywxUserApiService qywxUserApiService;
@Override
public String add(WxEnterpriseDTO wxDTO) {
......@@ -31,7 +29,6 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
tabHaobanWxEnterprise.setBindFlag(1);
mapper.insertSelective(tabHaobanWxEnterprise);
return wxDTO.getWxEnterpriseId();
}
@Override
......
package com.gic.haoban.manage.service.service.out.impl;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.common.utils.UuidUtil;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.DictDTO;
import com.gic.haoban.manage.api.service.DictApiService;
import com.gic.haoban.manage.service.dao.mapper.DictMapper;
import com.gic.haoban.manage.service.entity.TabHaobanDict;
import com.github.pagehelper.PageHelper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
......@@ -65,7 +63,7 @@ public class DictApiServiceImpl implements DictApiService{
@Override
public void deleteOne(String dictId) {
dictMapper.deleteByPrimaryKey(dictId);
dictMapper.deleteByPrimaryKey(dictId);
}
@Override
......@@ -73,4 +71,9 @@ public class DictApiServiceImpl implements DictApiService{
List<TabHaobanDict> list = dictMapper.queryList(dictKeys);
return EntityUtil.changeEntityListByJSON(DictDTO.class, list);
}
@Override
public DictDTO findOneDictByKey(String dictKey) {
return EntityUtil.changeEntity(DictDTO.class, dictMapper.selectByDictKey(dictKey));
}
}
......@@ -1053,52 +1053,6 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
return PageUtil.changePageHelperToCurrentPage(memberUnionRelatedService.pageMemberUnionByParams(userIdList, sendMemberIds, enterpriseId), MemberUnionidRelatedDTO.class);
}
// @Override
// public String sendMessage(String wxEnterpriseId,String userId,List<String> extendUserList,String materialId){
// WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId);
// MaterialDTO material = materialApiService.selectMaterialById(materialId);
// if(material == null){
// return "";
// }
// JSONResponse jp = null;
// if(material.getMaterialType() == 2 || material.getMaterialType() == 4 || material.getMaterialType() == 5){
// Date wxLastTime = material.getWxLastUploadTime();
// String maerialId = material.getMediaId();
// if(DateUtil.addDay(wxLastTime, 3).getTime() < System.currentTimeMillis()){
// maerialId = materialApiService.reUpdalodMetail(materialId);
// }
// QywxImageExternalMessageDTO dto = new QywxImageExternalMessageDTO();
// dto.setMediaId(maerialId);
// dto.setChatType("single");
// dto.setExternalUserid(extendUserList);
// dto.setSenderUserId(userId);
// log.info("【发送消息】dto = {}",JSON.toJSONString(dto));
// jp = qywxSuiteApiService.sendExternalMessage(enterprise.getCorpid(), config.getWxSuiteid(), dto);
// }else if(material.getMaterialType() == 1){
// QywxTextExternalMessageDTO dto = new QywxTextExternalMessageDTO();
// dto.setChatType("single");
// dto.setExternalUserid(extendUserList);
// dto.setSenderUserId(userId);
// dto.setText(material.getMaterialContent());
// log.info("【发送消息】dto = {}",JSON.toJSONString(dto));
// jp = qywxSuiteApiService.sendExternalMessage(enterprise.getCorpid(), config.getWxSuiteid(), dto);
// }else if(material.getMaterialType() == 3){
// QywxIinkExternalMessageDTO dto = new QywxIinkExternalMessageDTO();
// dto.setChatType("single");
// dto.setExternalUserid(extendUserList);
// dto.setSenderUserId(userId);
// dto.setDesc(material.getMaterialDesc());
// dto.setPicurl(material.getWxImgUrl());
// dto.setTitle(material.getMaterialTitle());
// dto.setUrl(material.getLink());
// log.info("【发送消息】dto = {}",JSON.toJSONString(dto));
// jp = qywxSuiteApiService.sendExternalMessage(enterprise.getCorpid(), config.getWxSuiteid(), dto);
// }
// log.info("【发送消息】jp = {}",JSON.toJSONString(jp));
// Map<String,Object> returnMap = jp.getReturnMap();
// return returnMap.get("msgid") == null?"":returnMap.get("msgid").toString();
// }
/**
* 老的单个素材群发的api
*
......
......@@ -69,7 +69,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
String wxEnterpriseId = "";
//授权好办小程序
if (isCustomizedApp == null || isCustomizedApp != 1) {
//只需要插入好办小程序企业
//只需要插入好办小程序企业,代开发 企业表不插入
TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpIdNoStatus(corpid);
if (enterprise != null) {
wxEnterpriseId = enterprise.getWxEnterpriseId();
......
......@@ -139,14 +139,14 @@
select
<include refid="Base_Column_List" />
from tab_haoban_dict
where dict_key = #{dictKey,jdbcType=VARCHAR}
and status_flag = 1
where dict_key = #{dictKey,jdbcType=VARCHAR}
and status_flag = 1 limit 1
</select>
<select id="selectByDictName" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
<select id="selectByDictName" resultMap="BaseResultMap" parameterType="java.lang.String">
select
<include refid="Base_Column_List"/>
from tab_haoban_dict
where dict_name = #{dictName,jdbcType=VARCHAR}
and status_flag = 1
where dict_name = #{dictName,jdbcType=VARCHAR}
and status_flag = 1 limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -6,7 +6,6 @@
<result column="wx_enterprise_id" jdbcType="VARCHAR" property="wxEnterpriseId"/>
<result column="title" jdbcType="VARCHAR" property="title"/>
<result column="welcome_content" jdbcType="VARCHAR" property="welcomeContent"/>
<result column="welcome_img" jdbcType="VARCHAR" property="welcomeImg"/>
<result column="status_flag" jdbcType="INTEGER" property="statusFlag"/>
<result column="open_flag" jdbcType="INTEGER" property="openFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
......@@ -14,7 +13,7 @@
</resultMap>
<sql id="Base_Column_List">
welcome_id, wx_enterprise_id, title, welcome_content,welcome_img,open_flag, status_flag, create_time, update_time
welcome_id, wx_enterprise_id, title, welcome_content,open_flag, status_flag, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
......@@ -32,10 +31,10 @@
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabWelcome">
insert into tab_haoban_welcome (welcome_id, wx_enterprise_id, title,
welcome_content, welcome_img, open_flag, status_flag, create_time,
welcome_content, open_flag, status_flag, create_time,
update_time)
values (#{welcomeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{welcomeContent,jdbcType=VARCHAR}, #{welcomeImg,jdbcType=VARCHAR}, #{openFlag},
#{welcomeContent,jdbcType=VARCHAR}, #{openFlag},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
......@@ -52,9 +51,6 @@
<if test="welcomeContent != null">
welcome_content = #{welcomeContent,jdbcType=VARCHAR},
</if>
<if test="welcomeImg != null">
welcome_img = #{welcomeImg,jdbcType=VARCHAR},
</if>
<if test="openFlag != null">
open_flag = #{openFlag,jdbcType=INTEGER},
</if>
......
......@@ -36,4 +36,19 @@ public class DictController extends WebBaseController {
List<DictDTO> ret = dictApiService.queryList(Arrays.asList(split));
return resultResponse(HaoBanErrCode.ERR_1, EntityUtil.changeEntityListByOrika(DictVo.class, ret));
}
/**
* 根据key查询一条数据
*
* @param dictKey
* @return
*/
@RequestMapping("/find-dict-key")
@ResponseBody
public HaobanResponse queryDictByKey(String dictKey) {
if (StringUtils.isBlank(dictKey)) {
return resultResponse(HaoBanErrCode.ERR_5);
}
return resultResponse(HaoBanErrCode.ERR_1, dictApiService.findOneDictByKey(dictKey));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment