Commit 18dd4be2 by 墨竹

fix:授权优化

parent d1458414
...@@ -31,7 +31,6 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -31,7 +31,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
@Service @Service
public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...@@ -71,8 +70,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -71,8 +70,13 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
Integer isCustomizedApp = dto.getIsCustomizedApp(); Integer isCustomizedApp = dto.getIsCustomizedApp();
WxEnterpriseDTO wxDTO = EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, dto); WxEnterpriseDTO wxDTO = EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, dto);
String wxEnterpriseId = ""; String wxEnterpriseId = "";
TabHaobanWxEnterprise wxEnterprise = null;
//获取授权好办小程序 //获取授权好办小程序
TabHaobanWxEnterprise wxEnterprise = this.wxEnterpriseService.getEnterpriseByCorpName(corpName); wxEnterprise = this.wxEnterpriseService.getEnterpriseBycorpId(corpid);
if (wxEnterprise == null) {
wxEnterprise = this.wxEnterpriseService.getEnterpriseByCorpName(corpName);
}
if (wxEnterprise != null) { if (wxEnterprise != null) {
wxEnterpriseId = wxEnterprise.getWxEnterpriseId(); wxEnterpriseId = wxEnterprise.getWxEnterpriseId();
WxEnterpriseDTO wxEnterpriseDTO = new WxEnterpriseDTO(); WxEnterpriseDTO wxEnterpriseDTO = new WxEnterpriseDTO();
......
...@@ -456,14 +456,14 @@ ...@@ -456,14 +456,14 @@
<if test="statusFlag != null"> <if test="statusFlag != null">
and status_flag = #{statusFlag} and status_flag = #{statusFlag}
</if> </if>
limit 1 order by create_time desc limit 1
</select> </select>
<select id="getEnterpriseByCorpName" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="getEnterpriseByCorpName" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_wx_enterprise from tab_haoban_wx_enterprise
where (corp_name = #{corpName} or corpid= #{corpName}) where corp_name = #{corpName} and status_flag = 1
order by create_time desc limit 1 order by create_time desc limit 1
</select> </select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment