Commit 33462341 authored by suhuiguang's avatar suhuiguang

1.修改依赖 及bug

parent dafb0d48
......@@ -279,7 +279,7 @@ public interface CheckMapper extends BaseMapper {
long getCheckCount(HashMap<String, Object> params);
List<HashMap<String, Object>> getChecks(HashMap<String, Object> params);
List<Map<String, Object>> getChecks(HashMap<String, Object> params);
Map<String, Object> getCheckDetail(@Param(value = "id") String id);
......
......@@ -1090,8 +1090,8 @@ public class CheckServiceImpl implements ICheckService {
}
@Override
public Page<HashMap<String, Object>> getCheckPage(HashMap<String, Object> params, CommonPageable page) {
List<HashMap<String, Object>> content = Lists.newArrayList();
public Page<Map<String, Object>> getCheckPage(HashMap<String, Object> params, CommonPageable page) {
List<Map<String, Object>> content = Lists.newArrayList();
long total = checkMapper.getCheckCount(params);
if (total == 0) {
return new PageImpl<>(content, page, total);
......@@ -1100,7 +1100,7 @@ public class CheckServiceImpl implements ICheckService {
params.put("pageSize", page.getPageSize());
content = checkMapper.getChecks(params);
if (0 < content.size()) {
for (HashMap<String, Object> map : content) {
for (Map<String, Object> map : content) {
if (map.containsKey("isOk")) {
map.put("status", CheckStatusEnum.getEnum(String.valueOf(map.get("isOk"))).getName());
}
......
......@@ -258,7 +258,7 @@ public interface ICheckService {
*/
Map<String,CheckRecordDto> obtainLastCheckRecord(String[] relationId);
Page<HashMap<String, Object>> getCheckPage(HashMap<String, Object> map, CommonPageable pageable);
Page<Map<String, Object>> getCheckPage(HashMap<String, Object> map, CommonPageable pageable);
Map<String, Object> getCheckDetail(String id);
/**
......
package com.yeejoin.amos.maintenance.jpush;
import cn.jpush.api.JPushClient;
import cn.jpush.api.push.model.PushPayload;
import com.yeejoin.amos.maintenance.business.constants.XJConstant;
import com.yeejoin.amos.maintenance.business.param.PushMsgParam;
import com.yeejoin.amos.maintenance.business.util.CommonResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -7,23 +11,17 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import com.yeejoin.amos.maintenance.business.constants.XJConstant;
import com.yeejoin.amos.maintenance.business.param.PushMsgParam;
import cn.jpush.api.JPushClient;
import cn.jpush.api.push.model.PushPayload;
@Service
public class AppMessagePushService {
protected static final Logger log = LoggerFactory
.getLogger(AppMessagePushService.class);
@Autowired
private com.yeejoin.amos.maintenance.feign.PushFeign PushFeign;
protected static final Logger log = LoggerFactory
.getLogger(AppMessagePushService.class);
@Autowired
private com.yeejoin.amos.maintenance.feign.PushFeign PushFeign;
// private static String APP_KEY;
//
// private static String MASTER_SECRET;
......@@ -36,20 +34,21 @@ public class AppMessagePushService {
// public void setMasterSecret(String masterSecret) {
// this.MASTER_SECRET = masterSecret;
// }
@Value("${params.isPush}")
private String isPush;
protected static final String APP_KEY = "1b3f7b961200f4b236811dfe";
protected static final String MASTER_SECRET = "8b650e645fb3a43c96be02b2";
//
private static JPushClient jpushClient = new JPushClient(MASTER_SECRET,
APP_KEY);
public static String buildJpushUserKey(String userId) {
return XJConstant.JPUSH_USER_KEY + "_" + userId;
}
@Value("${params.isPush}")
private String isPush;
protected static final String APP_KEY = "1b3f7b961200f4b236811dfe";
protected static final String MASTER_SECRET = "8b650e645fb3a43c96be02b2";
//
private static JPushClient jpushClient = new JPushClient(MASTER_SECRET,
APP_KEY);
public static String buildJpushUserKey(String userId) {
return XJConstant.JPUSH_USER_KEY + "_" + userId;
}
// private static JPushClient jpushClient = null;
//
// public static JPushClient getJPushClient(String APP_KEY, String MASTER_SECRET) {
......@@ -61,29 +60,29 @@ public class AppMessagePushService {
// }
/*public void sendMessage(List<PushMsgParam> responses)
{
PushFeign.sendMessage(responses);
try
{
if(responses!=null && "true".equals(isPush))
{
for(PushMsgParam response:responses)
{
PushPayload payload = buildPushPayload(response);
jpushClient.sendPush(payload);
}
}
}
catch (Exception e){
log.error(e.getMessage(),e);
e.printStackTrace();
}
}
/*public void sendMessage(List<PushMsgParam> responses)
{
PushFeign.sendMessage(responses);
try
{
if(responses!=null && "true".equals(isPush))
{
for(PushMsgParam response:responses)
{
PushPayload payload = buildPushPayload(response);
jpushClient.sendPush(payload);
}
}
}
catch (Exception e){
log.error(e.getMessage(),e);
e.printStackTrace();
}
}
*/
private PushPayload buildPushPayload(PushMsgParam response) {
CommonResponse commonResponse = PushFeign.buildPushPayload(response);
return (PushPayload)commonResponse.getDataList();
private PushPayload buildPushPayload(PushMsgParam response) {
CommonResponse commonResponse = PushFeign.buildPushPayload(response);
return (PushPayload) commonResponse.getDataList();
/*if(JPushTypeEnum.ALL.getCode().equals(response.getType())){
return PushPayload.newBuilder()
.setPlatform(Platform.android())
......@@ -102,19 +101,19 @@ public class AppMessagePushService {
.build();
}*/
}
public void sendMessage(PushMsgParam response){
try {
if(null!=response && "true".equals(isPush)){
CommonResponse commonResponse = PushFeign.sendMessageone(response);
}
} catch (Exception e) {
log.error(e.getMessage(),e);
e.printStackTrace();
}
}
}
public void sendMessage(PushMsgParam response) {
try {
if (null != response && "true".equals(isPush)) {
CommonResponse commonResponse = PushFeign.sendMessageone(response);
}
} catch (Exception e) {
log.error(e.getMessage(), e);
e.printStackTrace();
}
}
}
......@@ -1912,12 +1912,13 @@
pp.belong_system_name systemName,
pp.address address,
pp.original_id equipId,
CONCAT(pp.address, pp.building_name) buildingName,
CONCAT_WS('',pp.building_name,pp.address) buildingName,
pc.org_code AS orgCode
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
) a
<include refid="mobile-check-record-where" />
order by checkDate
limit #{offset},#{pageSize}
</select>
......@@ -1947,20 +1948,20 @@
<if test="beginTime != null and beginTime != '' and endTime != null and endTime != '' ">
AND (
(
a.beginTime <![CDATA[>=]]> #{beginTime}
AND a.endTime <![CDATA[<=]]> #{endTime}
a.checkDate <![CDATA[>=]]> #{beginTime}
AND a.checkDate <![CDATA[<=]]> #{endTime}
)
OR (
a.beginTime <![CDATA[<=]]> #{endTime}
AND a.endTime <![CDATA[>=]]> #{endTime}
a.checkDate <![CDATA[<=]]> #{endTime}
AND a.checkDate <![CDATA[>=]]> #{endTime}
)
OR (
a.beginTime <![CDATA[<=]]> #{beginTime}
AND a.endTime <![CDATA[>]]> #{beginTime}
a.checkDate <![CDATA[<=]]> #{beginTime}
AND a.checkDate <![CDATA[>]]> #{beginTime}
)
OR (
a.beginTime <![CDATA[<=]]> #{beginTime}
AND a.endTime <![CDATA[>=]]> #{endTime}
a.checkDate <![CDATA[<=]]> #{beginTime}
AND a.checkDate <![CDATA[>=]]> #{endTime}
)
)
</if>
......@@ -2013,7 +2014,7 @@
pp.belong_system_id systemId,
pp.belong_system_name systemName,
pp.address address,
CONCAT(pp.address, pp.building_name) buildingName,
CONCAT_WS('',pp.building_name,pp.address) buildingName,
pc.org_code AS orgCode
FROM p_check pc
LEFT JOIN p_point pp ON pp.id = pc.point_id
......
......@@ -26,7 +26,7 @@
<springboot.version>2.3.11.RELEASE</springboot.version>
<springcloud.version>Hoxton.SR8</springcloud.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
<tyboot-version>1.1.20Ty-SNAPSHOT</tyboot-version>
<tyboot-version>1.1.20</tyboot-version>
<amos.version>1.6.0</amos.version>
<itext.version>7.1.1</itext.version>
</properties>
......
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