Commit 6e790cab by zhiwj

审核员 添加openid查询

parent 54d89912
......@@ -95,4 +95,14 @@ public interface AuditorApiService {
*/
ServiceResponse<List<AuditorDTO>> listAuditorByProject(Integer projectItemId, Integer userId, Integer enterpriseId);
/**
* 通过openid查询审核员
* @Title: getAuditorByOpenid
* @Description:
* @author zhiwj
* @param openid
* @return com.gic.api.base.commons.ServiceResponse<com.gic.auth.dto.AuditorDTO>
* @throws
*/
ServiceResponse<AuditorDTO> getAuditorByOpenid(String openid);
}
......@@ -60,4 +60,6 @@ public interface TabAuditorMapper {
Integer delAuditor(@Param("auditorId") Integer auditorId);
Page<TabAuditor> listAuditor(AuditorListQO auditorListQO);
TabAuditor getAuditorByOpenid(@Param("openid") String openid);
}
\ No newline at end of file
......@@ -33,4 +33,6 @@ public interface AuditorService {
List<TabAuditor> listAuditor(AuditorListQO auditorListQO);
TabAuditor getAuditorByUserId(Integer enterpriseId, Integer userId);
TabAuditor getAuditorByOpenid(String openid);
}
......@@ -133,4 +133,9 @@ public class AuditorServiceImpl implements AuditorService {
auditorDTO.setUserId(userId);
return tabAuditorMapper.getFirstAuditor(auditorDTO);
}
@Override
public TabAuditor getAuditorByOpenid(String openid) {
return tabAuditorMapper.getAuditorByOpenid(openid);
}
}
......@@ -248,6 +248,16 @@ public class AuditorApiServiceImpl implements AuditorApiService {
}
}
@Override
public ServiceResponse<AuditorDTO> getAuditorByOpenid(String openid) {
TabAuditor auditor = this.auditorService.getAuditorByOpenid(openid);
if (auditor != null) {
return EnterpriseServiceResponse.success(EntityUtil.changeEntityByJSON(AuditorDTO.class, auditor));
} else {
return EnterpriseServiceResponse.failure(ErrorCode.NOTEXISTS);
}
}
private String getTempQrCodeUrl(Integer auditorId) {
logger.info("生成临时带参二维码 auditorId:{}", auditorId);
ServiceResponse<String> serviceResponse = weixinBaseFunService.getTemporaryQRcodeURL(APPKEY, "auditor_" + auditorId, 300);
......@@ -276,8 +286,4 @@ public class AuditorApiServiceImpl implements AuditorApiService {
return EntityUtil.changeEntityByJSON(AuditorDTO.class, auditor);
}
}
public static void main(String[] args) {
System.out.println(1);
}
}
......@@ -202,4 +202,14 @@
</foreach>
</if>
</select>
<select id="getAuditorByOpenid" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_auditor
where status = 1
and is_use = 1
<if test="openid != null and openid != '' ">
and openid = #{openid}
</if>
</select>
</mapper>
\ No newline at end of file
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