Commit bbd2eb54 by xugaojun

Merge remote-tracking branch 'origin/developer' into developer

parents c314aced 2841e0ee
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.gic</groupId> <groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId> <artifactId>gic-commons</artifactId>
<version>${haoban-common}</version> <version>${gic-commons}</version>
</dependency> </dependency>
</dependencies> </dependencies>
......
...@@ -19,6 +19,12 @@ public interface NoticeMessageApiService { ...@@ -19,6 +19,12 @@ public interface NoticeMessageApiService {
public void noticeMessageMq(String json); public void noticeMessageMq(String json);
/** /**
* 冗余
* @param json
*/
public void run(String json);
/**
* 消息分页 * 消息分页
*1 *1
* @param enterpriseId * @param enterpriseId
......
...@@ -39,6 +39,11 @@ ...@@ -39,6 +39,11 @@
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId>
<version>${haoban-common}</version>
</dependency>
<dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.11</version> <version>4.11</version>
...@@ -107,11 +112,6 @@ ...@@ -107,11 +112,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.gic</groupId> <groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId>
<version>${haoban-common}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>haoban-auth-api</artifactId> <artifactId>haoban-auth-api</artifactId>
<version>${haoban-auth-api}</version> <version>${haoban-auth-api}</version>
</dependency> </dependency>
......
...@@ -81,5 +81,19 @@ public interface PendingTaskService { ...@@ -81,5 +81,19 @@ public interface PendingTaskService {
*/ */
public boolean updateInvalidTimeByBusinessId(String businessId, Date time); public boolean updateInvalidTimeByBusinessId(String businessId, Date time);
/**
* 完成
* @param relationId
* @return
*/
public boolean updateFinish(String relationId);
/**
* 完成
* @param task
* @return
*/
public boolean changeByRelationId(PendingTaskBO task);
} }
...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.notify.impl; ...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.notify.impl;
import com.gic.api.base.commons.BasePageInfo; import com.gic.api.base.commons.BasePageInfo;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.commons.util.PageHelperUtils; import com.gic.commons.util.PageHelperUtils;
import com.gic.commons.util.StringUtil;
import com.gic.haoban.common.utils.EntityUtil; import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.manage.service.dao.mapper.PendingTaskMapper; import com.gic.haoban.manage.service.dao.mapper.PendingTaskMapper;
import com.gic.haoban.manage.service.entity.TabPendingTask; import com.gic.haoban.manage.service.entity.TabPendingTask;
...@@ -10,6 +11,7 @@ import com.gic.haoban.manage.service.pojo.bo.PendingTaskBO; ...@@ -10,6 +11,7 @@ import com.gic.haoban.manage.service.pojo.bo.PendingTaskBO;
import com.gic.haoban.manage.service.service.notify.PendingTaskService; import com.gic.haoban.manage.service.service.notify.PendingTaskService;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -111,4 +113,33 @@ public class PendingTaskServiceImpl implements PendingTaskService { ...@@ -111,4 +113,33 @@ public class PendingTaskServiceImpl implements PendingTaskService {
pendingTaskMapper.updateInvalidTimeByBusinessId(businessId, time); pendingTaskMapper.updateInvalidTimeByBusinessId(businessId, time);
return true; return true;
} }
@Override
public boolean updateFinish(String relationId) {
TabPendingTask pendingTask = pendingTaskMapper.getByRelationId(relationId);
if (null == pendingTask) {
return true;
}
pendingTask.setFinishFlag(1);
pendingTask.setFinishTime(new Date());
pendingTask.setUpdateTime(new Date());
pendingTaskMapper.updateByPrimaryKeySelective(pendingTask);
return true;
}
@Override
public boolean changeByRelationId(PendingTaskBO task) {
if (StringUtils.isBlank(task.getRelationId())) {
return false;
}
TabPendingTask pendingTask = pendingTaskMapper.getByRelationId(task.getRelationId());
if (null == pendingTask) {
return true;
}
TabPendingTask tabPendingTask = EntityUtil.changeEntityByJSON(TabPendingTask.class, task);
tabPendingTask.setId(pendingTask.getId());
tabPendingTask.setUpdateTime(new Date());
pendingTaskMapper.updateByPrimaryKeySelective(tabPendingTask);
return true;
}
} }
...@@ -139,6 +139,10 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService { ...@@ -139,6 +139,10 @@ public class NoticeMessageApiServiceImpl implements NoticeMessageApiService {
sendMessage(contentList, wxEnterpriseId, wxUserId, messageTypeEnum, noticeMessageBO.getMessageContent()); sendMessage(contentList, wxEnterpriseId, wxUserId, messageTypeEnum, noticeMessageBO.getMessageContent());
} }
@Override
public void run(String json) {
this.noticeMessageMq(json);
}
@Override @Override
public ServiceResponse<Page<NoticeMessageInfoDTO>> pageNoticeMessage(String enterpriseId, String storeId, String clerkId, int categoryType, BasePageInfo pageInfo) { public ServiceResponse<Page<NoticeMessageInfoDTO>> pageNoticeMessage(String enterpriseId, String storeId, String clerkId, int categoryType, BasePageInfo pageInfo) {
......
...@@ -128,10 +128,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -128,10 +128,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
@Override @Override
public ServiceResponse<Boolean> finishPending(String relationId) { public ServiceResponse<Boolean> finishPending(String relationId) {
PendingTaskBO pendingTaskBO = new PendingTaskBO(); boolean b = pendingTaskService.updateFinish(relationId);
pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setFinishFlag(1);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
...@@ -140,7 +137,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -140,7 +137,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
PendingTaskBO pendingTaskBO = new PendingTaskBO(); PendingTaskBO pendingTaskBO = new PendingTaskBO();
pendingTaskBO.setRelationId(relationId); pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setClerkId(newExeutiveClerkId); pendingTaskBO.setClerkId(newExeutiveClerkId);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO); boolean b = pendingTaskService.changeByRelationId(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
...@@ -150,7 +147,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -150,7 +147,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
pendingTaskBO.setRelationId(relationId); pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setClerkId(newExeutiveClerkId); pendingTaskBO.setClerkId(newExeutiveClerkId);
pendingTaskBO.setFinishFlag(1); pendingTaskBO.setFinishFlag(1);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO); boolean b = pendingTaskService.changeByRelationId(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
...@@ -182,7 +179,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService { ...@@ -182,7 +179,7 @@ public class PendingTaskApiServiceImpl implements PendingTaskApiService {
PendingTaskBO pendingTaskBO = new PendingTaskBO(); PendingTaskBO pendingTaskBO = new PendingTaskBO();
pendingTaskBO.setRelationId(relationId); pendingTaskBO.setRelationId(relationId);
pendingTaskBO.setInvalidTime(endTime); pendingTaskBO.setInvalidTime(endTime);
boolean b = pendingTaskService.addOrUpdatePendingTask(pendingTaskBO); boolean b = pendingTaskService.changeByRelationId(pendingTaskBO);
return ServiceResponse.success(b); return ServiceResponse.success(b);
} }
......
...@@ -37,6 +37,11 @@ ...@@ -37,6 +37,11 @@
</dependencyManagement> </dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId>
<version>${haoban-common}</version>
</dependency>
<dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.11</version> <version>4.11</version>
...@@ -86,6 +91,12 @@ ...@@ -86,6 +91,12 @@
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>3.9</version> <version>3.9</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
...@@ -120,11 +131,6 @@ ...@@ -120,11 +131,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.gic</groupId> <groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId>
<version>${haoban-common}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>haoban-auth-api</artifactId> <artifactId>haoban-auth-api</artifactId>
<version>${haoban-auth-api}</version> <version>${haoban-auth-api}</version>
</dependency> </dependency>
......
...@@ -8,6 +8,8 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode; ...@@ -8,6 +8,8 @@ import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.qcloud.BucketNameEnum; import com.gic.qcloud.BucketNameEnum;
import com.gic.qcloud.FileUploadUtil; import com.gic.qcloud.FileUploadUtil;
import org.apache.commons.io.FileUtils; import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
...@@ -22,7 +24,7 @@ import java.util.Set; ...@@ -22,7 +24,7 @@ import java.util.Set;
@RestController @RestController
public class UploadController extends WebBaseController{ public class UploadController extends WebBaseController{
private static Logger logger= LoggerFactory.getLogger(UploadController.class);
private static Set<String> FILE_TYPE = new HashSet<>( ); private static Set<String> FILE_TYPE = new HashSet<>( );
static { static {
for(BucketNameEnum value: BucketNameEnum.values()){ for(BucketNameEnum value: BucketNameEnum.values()){
...@@ -56,20 +58,26 @@ public class UploadController extends WebBaseController{ ...@@ -56,20 +58,26 @@ public class UploadController extends WebBaseController{
String key = "haoban/"+dayFilePath+"/"+name; String key = "haoban/"+dayFilePath+"/"+name;
fileType = FILE_TYPE.contains( fileType )?fileType:BucketNameEnum.OTHER_90000.getName(); fileType = FILE_TYPE.contains( fileType )?fileType:BucketNameEnum.OTHER_90000.getName();
String url = FileUploadUtil.simpleUploadFileFromLocal( templateFile,key,fileType); try {
String url = FileUploadUtil.simpleUploadFileFromLocal(templateFile, key, fileType);
if(templateFile != null){ if (templateFile != null) {
templateFile.delete(); templateFile.delete();
} }
JSONObject res = new JSONObject( ); JSONObject res = new JSONObject();
res.put( "name",name ); res.put("name", name);
res.put( "mediaName",mediaName ); res.put("mediaName", mediaName);
res.put( "ext", suffix ); res.put("ext", suffix);
res.put( "size",len ); res.put("size", len);
res.put( "key",key ); res.put("key", key);
res.put( "url", "https://"+url ); res.put("url", "https://" + url);
return resultResponse(HaoBanErrCode.ERR_1, res); return resultResponse(HaoBanErrCode.ERR_1, res);
}catch (Exception e) {
e.printStackTrace();
logger.info("异常:{}",e);
return resultResponse(HaoBanErrCode.ERR_0);
}
} }
} }
...@@ -48,6 +48,11 @@ ...@@ -48,6 +48,11 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.gic</groupId> <groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId>
<version>${haoban-common}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-wechat-api</artifactId> <artifactId>gic-wechat-api</artifactId>
<version>${gic-wechat-api}</version> <version>${gic-wechat-api}</version>
</dependency> </dependency>
...@@ -113,11 +118,6 @@ ...@@ -113,11 +118,6 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.gic</groupId> <groupId>com.gic</groupId>
<artifactId>haoban-common</artifactId>
<version>${haoban-common}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>haoban-auth-api</artifactId> <artifactId>haoban-auth-api</artifactId>
<version>${haoban-auth-api}</version> <version>${haoban-auth-api}</version>
</dependency> </dependency>
......
...@@ -664,7 +664,7 @@ public class ClerkController extends WebBaseController { ...@@ -664,7 +664,7 @@ public class ClerkController extends WebBaseController {
//精确查,根据手机号或者code,查找 //精确查,根据手机号或者code,查找
@RequestMapping("query-clerk-list-by-code") @RequestMapping("query-clerk-list-by-code")
public HaobanResponse queryClerkListByCode(String keyword, String wxEnterpriseId, String staffId) { public HaobanResponse queryClerkListByCode(String keyword, String wxEnterpriseId, String staffId) {
if (StringUtils.isAnyBlank(staffId, wxEnterpriseId)) { if (StringUtils.isAnyBlank(staffId, wxEnterpriseId,keyword)) {
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(wxEnterpriseId); List<EnterpriseDetailDTO> list = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(wxEnterpriseId);
......
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