Commit 7621d26a authored by chenhao's avatar chenhao

修改联系人的方法,以及获取地址方法,删除对于的定时器

parent 7c1fe64d
...@@ -87,5 +87,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> { ...@@ -87,5 +87,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
void updatelistByParentId(String codex, String code); void updatelistByParentId(String codex, String code);
List< Map<String,String>> getPersonSimpleDetail();
} }
...@@ -633,5 +633,30 @@ GROUP BY ...@@ -633,5 +633,30 @@ GROUP BY
</update> </update>
<select id ='getPersonSimpleDetail' resultType='Map'>
SELECT
person.biz_org_name as name,
cdf.field_value as phone
FROM
(
SELECT
sequence_nbr,
biz_org_name
FROM
cb_org_usr
WHERE
biz_org_type = 'PERSON'
AND is_delete = 0
) person
LEFT JOIN (
SELECT
field_value,
instance_id
FROM
cb_dynamic_form_instance
WHERE
group_code = '246'
AND field_code = 'telephone'
) cdf ON person.sequence_nbr = cdf.instance_id
</select>
</mapper> </mapper>
package com.yeejoin.amos.boot.module.jcs.biz.service.impl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.yeejoin.amos.boot.biz.common.utils.RedisKey;
import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
@Component
public class GetContactNameSchedulerJob {
@Autowired
RedisUtils redisUtils;
@Autowired
AlertCalledServiceImpl alertCalledServiceImpl;
@Value("${redis.cache.failure.time}")
private long time;
/**
* 每天凌晨12:01执行方法,更新联系人在缓存中的数据
*/
@Scheduled(cron = "0 01 00 ? * *")
public void excuteJob() {
List<Map<String, String>> contactName = alertCalledServiceImpl.getContactName();
redisUtils.set(RedisKey.CONTACT_USER, contactName, time);
}
}
...@@ -19,7 +19,6 @@ import org.springframework.core.env.Environment; ...@@ -19,7 +19,6 @@ import org.springframework.core.env.Environment;
import org.springframework.data.redis.connection.RedisConnection; import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler; import org.typroject.tyboot.core.restful.exception.GlobalExceptionHandler;
...@@ -39,7 +38,6 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils; ...@@ -39,7 +38,6 @@ import com.yeejoin.amos.boot.biz.common.utils.oConvertUtils;
@EnableFeignClients @EnableFeignClients
@EnableAsync @EnableAsync
@EnableEurekaClient @EnableEurekaClient
@EnableScheduling
@MapperScan({ "org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*", @MapperScan({ "org.typroject.tyboot.demo.face.orm.dao*", "org.typroject.tyboot.face.*.orm.dao*",
"org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*", "org.typroject.tyboot.core.auth.face.orm.dao*", "org.typroject.tyboot.component.*.face.orm.dao*",
"com.yeejoin.amos.boot.module.*.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper" }) "com.yeejoin.amos.boot.module.*.api.mapper", "com.yeejoin.amos.boot.biz.common.dao.mapper" })
......
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