Commit d7fbd133 authored by hezhen's avatar hezhen

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

parents ca4473ce 96183dd5
......@@ -236,6 +236,12 @@
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.xxfc.platform</groupId>
<artifactId>xx-app-api</artifactId>
<version>2.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>ace-admin</finalName>
......
package com.github.wxiaoqi.security.admin.jobhandler;
import com.github.wxiaoqi.security.common.util.IntervalUtil;
import com.xxfc.platform.order.contant.enumerate.OrderStatusEnum;
import com.xxfc.platform.order.contant.enumerate.OrderTypeEnum;
import com.xxfc.platform.order.contant.enumerate.RefundStatusEnum;
import com.xxfc.platform.order.entity.BaseOrder;
import com.xxfc.platform.order.entity.OrderRentVehicleDetail;
import com.xxfc.platform.order.entity.OrderViolation;
import com.xxfc.platform.universal.constant.DictionaryKey;
import com.xxfc.platform.universal.entity.Dictionary;
import com.xxfc.platform.universal.feign.ThirdFeign;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import tk.mybatis.mapper.entity.Example;
import tk.mybatis.mapper.weekend.WeekendSqls;
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
import static com.xxfc.platform.universal.constant.DictionaryKey.APP_ORDER;
/**
* 跨平台Http任务
......@@ -51,7 +32,6 @@ public class RentDepositJobHandler extends IJobHandler {
XxlJobLogger.log(e);
return FAIL;
} finally {
;
}
}
......
package com.xxfc.platform.app.entity;
import java.io.Serializable;
import java.math.BigInteger;
import javax.persistence.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -94,7 +95,7 @@ public class AppVersion implements Serializable {
*/
@Column(name = "crt_time")
@ApiModelProperty(value = "版本上传时间", hidden = true )
private Long crtTime;
private BigInteger crtTime;
/**
* 是否删除;0-正常;1-删除
......
......@@ -5,12 +5,15 @@ import com.github.pagehelper.PageInfo;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.constant.RestCode;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.EntityUtils;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.util.process.SystemConfig;
import com.xxfc.platform.app.vo.appVersionQuery;
import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.constant.RedisKey;
import io.swagger.annotations.ApiOperation;
import lombok.extern.log4j.Log4j;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.session.RowBounds;
......@@ -38,6 +41,7 @@ import tk.mybatis.mapper.weekend.WeekendSqls;
import java.io.File;
import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import java.util.concurrent.TimeUnit;
......@@ -49,6 +53,7 @@ import java.util.concurrent.TimeUnit;
* @date 2019-06-24 10:34:00
*/
@Service
@Slf4j
public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
@Value("${app.uploadPath}")
......@@ -59,6 +64,7 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
private RedisTemplate redisTemplate;
public static final DateTimeFormatter DEFAULT_DATE_TIME_FORMATTER = DateTimeFormat.forPattern("yyyy-MM-dd");
private AppVersion entity;
public ObjectRestResponse getVersion(String version,Integer type){
......@@ -125,9 +131,12 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
*/
public ResponseEntity<byte[]> downloadInstallationPackage(String realFileRelPath) throws Exception{
String filePath = uploadPath + realFileRelPath;
File file = new File(filePath);//新建一个文件
HttpHeaders headers = new HttpHeaders();//http头信息
String downloadFileName = new String(file.getName());//设置编码
//新建一个文件
File file = new File(filePath);
//http头信息
HttpHeaders headers = new HttpHeaders();
//设置编码
String downloadFileName = new String(file.getName());
headers.setContentDispositionFormData("attachment", downloadFileName);
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
......@@ -137,11 +146,14 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
* 添加版本信息
* @param appVersion
*/
@Transactional
@Transactional(rollbackFor = Exception.class)
public void insertAppVersion(AppVersion appVersion) {
appVersion.setDownloadSwitch(0);
if ( appVersion.getDownloadSwitch()==null){
appVersion.setDownloadSwitch(1);
}
insertSelective(appVersion);
}
public AppVersion get(Integer id) {
if (id==null) {
throw new IllegalArgumentException("Parameter is null");
......@@ -164,17 +176,21 @@ public class AppVersionBiz extends BaseBiz<AppVersionMapper,AppVersion> {
*/
public void remove(Integer id) {
AppVersion appVersion = new AppVersion();
appVersion.setId(id);
appVersion.setIsDel(1);
Example example = Example.builder(AppVersion.class)
.where(WeekendSqls.<AppVersion>custom().andEqualTo(AppVersion::getId,id))
.build();
mapper.updateByExampleSelective(appVersion,example);
mapper.updateByPrimaryKeySelective(appVersion);
// mapper.updateByExampleSelective(appVersion,example);
}
public PageInfo<AppVersion> getAll(appVersionQuery query) {
PageHelper.startPage(query.getPage(),query.getLimit());
List<AppVersion> appVersionList = mapper.getAllByquery(query);
return PageInfo.of(appVersionList);
}
@Override
public int insertSelectiveRe(AppVersion entity) {
entity.setCrtTime(BigInteger.valueOf(System.currentTimeMillis()));
return mapper.insertSelective(entity);
}
}
\ No newline at end of file
......@@ -7,7 +7,7 @@
<select id="getAllByquery" parameterType="com.xxfc.platform.app.vo.appVersionQuery"
resultType="com.xxfc.platform.app.entity.AppVersion">
select * from app_version
where 1=1
where is_del=0
<if test="versionName !=null and versionName != ''">
and version_name like concat('%',#{versionName},'%')
</if>
......@@ -19,6 +19,6 @@
<if test="content != null and content != ''">
and content like concat('%',#{content},'%')
</if>
order by crt_time desc
</select>
</mapper>
\ No newline at end of file
......@@ -37,7 +37,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.jexl2.MapContext;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......
......@@ -48,9 +48,12 @@ public class CertificationController {
MQServiceBiZ mqServiceBiZ;
/**
* 实名认证
* @param idInformation
* @param request
* @return
*/
@PostMapping("/app/certificate")
public ObjectRestResponse certificate(@RequestBody IdInformation idInformation, HttpServletRequest request) {
......
......@@ -289,10 +289,8 @@ public class CertificationService {
try {
expirationDate = formatter.parse(endDate);
} catch (ParseException e) {
e.printStackTrace();
return ObjectRestResponse.createDefaultFail();
}
}
idInformation.setExpirationDate(expirationDate);
......@@ -406,6 +404,7 @@ public class CertificationService {
Example exa = new Example(IdInformation.class);
Example.Criteria criteria = exa.createCriteria();
criteria.andEqualTo("idNumber",idInformation.getIdNumber());
criteria.andEqualTo("userLonginId",idInformation.getUserLonginId());
List<IdInformation> idInformations = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isEmpty(idInformations)) {
idInformation.setCrtTime(new Date());
......
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