Commit a93ad8d7 authored by 周健威's avatar 周健威

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

parents 1eb7b306 9d0ed535
...@@ -16,13 +16,31 @@ ...@@ -16,13 +16,31 @@
</select> </select>
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics"> <select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
SELECT -- SELECT
-- IFNULL(sum(gmv),0) as totalGmv
-- FROM
-- daily_members_order_statistics
-- WHERE
-- branch_company_id =#{companyId}
-- -- and
-- -- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
SELECT
IFNULL(sum(gmv),0) as totalGmv IFNULL(sum(gmv),0) as totalGmv
FROM FROM
daily_members_order_statistics (
SELECT
ANY_VALUE(id) AS id ,
ANY_VALUE(branch_company_id) AS branch_company_id,
ANY_VALUE(one_day) AS one_day,
ANY_VALUE(gmv) AS gmv,
ANY_VALUE(crt_time) AS crt_time
FROM
daily_members_order_statistics
GROUP BY
one_day,branch_company_id
) m
WHERE WHERE
branch_company_id =#{companyId} branch_company_id =#{companyId}
-- and
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -50,15 +50,35 @@ ...@@ -50,15 +50,35 @@
</select> </select>
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics"> <select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
-- SELECT
--
-- IFNULL(sum(gmv),0) as totalGmv,
-- IFNULL(sum(penal_sum) ,0) as totalPenalSum
-- FROM
-- daily_travel_order_statistics
-- WHERE
-- branch_company_id =#{branchCompanyId}
-- AND
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%c')
SELECT SELECT
IFNULL(sum(gmv),0) as totalGmv, IFNULL(sum(gmv),0) as totalGmv,
IFNULL(sum(penal_sum) ,0) as totalPenalSum IFNULL(sum(penal_sum) ,0) as totalPenalSum
FROM FROM
daily_travel_order_statistics (
SELECT
ANY_VALUE(id) AS id,
ANY_VALUE(branch_company_id) AS branch_company_id,
ANY_VALUE(one_day) AS one_day,
ANY_VALUE(gmv) AS gmv,
ANY_VALUE(penal_sum) AS penal_sum,
ANY_VALUE(crt_time) AS crt_time
FROM daily_travel_order_statistics
GROUP BY
one_day,branch_company_id
) o
WHERE WHERE
branch_company_id =#{branchCompanyId} branch_company_id =#{companyId}
-- AND
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),INTERVAL 1 DAY),'%Y-%c')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -138,7 +138,23 @@ ...@@ -138,7 +138,23 @@
<select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics"> <select id="monthOrderTotal" resultType="com.xxfc.platform.order.entity.OrderStatistics">
SELECT -- SELECT
-- IFNULL(sum(gmv),0) as totalGmv,
-- (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,
-- IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,
-- IFNULL(sum(compensation) ,0) as totalCompensation,
-- IFNULL(sum(forfeit) ,0) as totalForfeit,
-- IFNULL(sum(penal_sum) ,0) as totalPenalSum,
-- IFNULL(sum(postpone) ,0) as totalPostpone
-- FROM
-- daily_vehicle_order_statistics
-- WHERE
-- branch_company_id =#{companyId}
-- and
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
SELECT
IFNULL(sum(gmv),0) as totalGmv, IFNULL(sum(gmv),0) as totalGmv,
(IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit, (IFNULL(sum(security_deposit),0)-IFNULL(sum(refund_security_deposit) ,0)) as totalSecurityDeposit,
IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit, IFNULL(sum(refund_security_deposit) ,0) as totalRefundSecurityDeposit,
...@@ -147,10 +163,23 @@ ...@@ -147,10 +163,23 @@
IFNULL(sum(penal_sum) ,0) as totalPenalSum, IFNULL(sum(penal_sum) ,0) as totalPenalSum,
IFNULL(sum(postpone) ,0) as totalPostpone IFNULL(sum(postpone) ,0) as totalPostpone
FROM FROM
daily_vehicle_order_statistics (
SELECT
ANY_VALUE(id) as id,
one_day,
branch_company_id,
ANY_VALUE(gmv) AS gmv,
ANY_VALUE(security_deposit) AS security_deposit,
ANY_VALUE(refund_security_deposit) AS refund_security_deposit,
ANY_VALUE(forfeit) AS forfeit,ANY_VALUE(penal_sum) AS penal_sum,
ANY_VALUE(postpone) AS postpone,ANY_VALUE(crt_time) AS crt_time,
ANY_VALUE(compensation) AS compensation
FROM
`daily_vehicle_order_statistics`
GROUP BY
one_day,branch_company_id
) a
WHERE WHERE
branch_company_id =#{companyId} branch_company_id =#{companyId}
-- and
-- DATE_FORMAT(one_day,'%Y-%c')=DATE_FORMAT(DATE_SUB(NOW(),interval 1 day),'%Y-%c')
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -4,6 +4,7 @@ package com.xxfc.platform.universal.service; ...@@ -4,6 +4,7 @@ package com.xxfc.platform.universal.service;
import cn.hutool.core.map.MapUtil; import cn.hutool.core.map.MapUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.wxiaoqi.security.admin.feign.UserFeign; import com.github.wxiaoqi.security.admin.feign.UserFeign;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.universal.entity.IdInformation; import com.xxfc.platform.universal.entity.IdInformation;
...@@ -333,16 +334,17 @@ public class CertificationService { ...@@ -333,16 +334,17 @@ public class CertificationService {
Example exa = new Example(IdInformation.class); Example exa = new Example(IdInformation.class);
Example.Criteria criteria = exa.createCriteria(); Example.Criteria criteria = exa.createCriteria();
criteria.andEqualTo("idNumber",idInformation.getIdNumber()); criteria.andEqualTo("idNumber",idInformation.getIdNumber());
criteria.andEqualTo("userLoginId",idInformation.getUserLoginId()); // criteria.andEqualTo("userLoginId",idInformation.getUserLoginId());
List<IdInformation> idInformations = idInformationMapper.selectByExample(exa); List<IdInformation> idInformatics = idInformationMapper.selectByExample(exa);
if (CollectionUtils.isEmpty(idInformations)) { if (CollectionUtils.isEmpty(idInformatics)) {
idInformation.setCrtTime(new Date()); idInformation.setCrtTime(new Date());
idInformationMapper.insertSelective(idInformation); idInformationMapper.insertSelective(idInformation);
}else { }else {
IdInformation idInformation1 = idInformations.get(0); // IdInformation idInformation1 = idInformatics.get(0);
idInformation.setId(idInformation1.getId()); // idInformation.setId(idInformation1.getId());
idInformation.setUpdTime(new Date()); // idInformation.setUpdTime(new Date());
idInformationMapper.updateByPrimaryKeySelective(idInformation); // idInformationMapper.updateByPrimaryKeySelective(idInformation);
throw new BaseException("该身份证已存在,不要重复认证!");
} }
log.info("----addIdInformation---userid==="+idInformation.getUserLoginId()+"----name====" + idInformation.getName()+"---IdNumber==="+idInformation.getIdNumber()); log.info("----addIdInformation---userid==="+idInformation.getUserLoginId()+"----name====" + idInformation.getName()+"---IdNumber==="+idInformation.getIdNumber());
//认证成功后修改用户,用户认证状态 //认证成功后修改用户,用户认证状态
......
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