| @@ -44,24 +44,6 @@ public class BaseController { | |||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @Autowired | |||||
| private boolean isFmOpen; | |||||
| @Autowired | |||||
| private WxAppinfoService wxAppinfoService; | |||||
| @Autowired | |||||
| private FmOpenService openService; | |||||
| @Autowired | |||||
| private WxCUserBasicInfoService wxCUserBasicInfoService; | |||||
| @Autowired | |||||
| private WxCUserBasicChildService wxCUserBasicChildService; | |||||
| @Autowired | |||||
| private CUserTokenService cUserTokenService; | |||||
| @Autowired | @Autowired | ||||
| @Qualifier("objectCommonRedisTemplate") | @Qualifier("objectCommonRedisTemplate") | ||||
| RedisTemplate<String, Object> objectCommonRedisTemplate; | RedisTemplate<String, Object> objectCommonRedisTemplate; | ||||
| @@ -74,7 +56,7 @@ public class BaseController { | |||||
| setValue(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(value)); | setValue(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(value)); | ||||
| } catch (ParseException e) { | } catch (ParseException e) { | ||||
| try { | try { | ||||
| setValue(new SimpleDateFormat("yyyy-MM-dd ").parse(value)); | |||||
| setValue(new SimpleDateFormat("yyyy-MM-dd").parse(value)); | |||||
| } catch (ParseException e1) { | } catch (ParseException e1) { | ||||
| setValue(null); | setValue(null); | ||||
| } | } | ||||
| @@ -88,202 +70,7 @@ public class BaseController { | |||||
| }); | }); | ||||
| } | } | ||||
| @Deprecated | |||||
| public String getTenantId() { | |||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||||
| String tenantId = (String) request.getAttribute(Constant.TENANT_ID); | |||||
| return tenantId; | |||||
| } | |||||
| public TenantEntity getTenantInfo() { | |||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||||
| String tenantId = (String) request.getAttribute(Constant.TENANT_ID); | |||||
| String parentTenantId = (String) request.getAttribute(Constant.PARENT_TENANT_ID); | |||||
| TenantEntity tenantEntity = new TenantEntity() ; | |||||
| tenantEntity.setTenantId(tenantId); | |||||
| tenantEntity.setParentTenantId(parentTenantId); | |||||
| return tenantEntity; | |||||
| } | |||||
| public String getFinalTenantId() { | |||||
| TenantEntity tenantEntity = getTenantInfo(); | |||||
| return tenantEntity.getFinalTenantId(); | |||||
| } | |||||
| public Long getMemberId() { | |||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||||
| Long memberId = (Long) request.getAttribute(Constant.LOGIN_MEMBER_KEY); | |||||
| if(memberId == null){ | |||||
| throw new MallinkException(ErrorCode.USER_IS_NOT_MEMBER); | |||||
| } | |||||
| return memberId; | |||||
| } | |||||
| /** | |||||
| * 微信端获取当前用户 wx_c_user,非会员 | |||||
| * 请尽量多用getTenantId, getUserId | |||||
| */ | |||||
| public WxCUser getWxCUser() { | |||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||||
| BaseCUserEntity baseuser = (BaseCUserEntity) request.getAttribute(Constant.REQUEST_C_USER_KEY); | |||||
| if (baseuser == null) { | |||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||||
| } | |||||
| if (baseuser.getRealUser() == null) { | |||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||||
| } | |||||
| WxCUser user = RedisCacheUtils.getFieldObject(baseuser, "realUser", WxCUser.class); | |||||
| TenantEntity tenantEntity = getTenantInfo(); | |||||
| if (user.getTenantId() == null) { | |||||
| user.setTenantId(tenantEntity.getTenantId()); | |||||
| } | |||||
| if (user.getParentTenantId() == null) { | |||||
| user.setParentTenantId(tenantEntity.getParentTenantId()); | |||||
| } | |||||
| return user; | |||||
| } | |||||
| public void removeCacheCUser() { | |||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||||
| BaseCUserEntity baseuser = (BaseCUserEntity) request.getAttribute(Constant.REQUEST_C_USER_KEY); | |||||
| cUserTokenService.removeTokenCache(baseuser.getToken()); | |||||
| } | |||||
| public void updateCacheCUser(String token,Object cuser) { | |||||
| cUserTokenService.updateTokenCache(token, cuser); | |||||
| } | |||||
| private WxCUserBasicInfo getCacheMember(Long memberId,String finalTenantId,String key,long seconds) throws MallinkException { | |||||
| // 缓存 | |||||
| WxCUserBasicInfo member = RedisCacheUtils.getCacheObject(objectCommonRedisTemplate, key, WxCUserBasicInfo.class); | |||||
| if(null == member) { | |||||
| member = wxCUserBasicInfoService.getById(memberId,finalTenantId); | |||||
| if (member == null) { | |||||
| throw new MallinkException(ErrorCode.USER_IS_EMPTY); | |||||
| } | |||||
| setCUserBasicChild(member); | |||||
| RedisCacheUtils.cache(objectCommonRedisTemplate, key, member, seconds); | |||||
| } | |||||
| return member; | |||||
| } | |||||
| public WxCUserBasicInfo getCacheMember() throws MallinkException { | |||||
| Long memberId = getMemberId(); | |||||
| String key = "webapp:member:"+memberId; | |||||
| return getCacheMember(memberId,getFinalTenantId(), key, 3600*24*3); | |||||
| } | |||||
| /*此处缓存短暂时间,因为积分、成长值记录*/ | |||||
| public WxCUserBasicInfo getShortCacheMember(Long memberId,String finalTenantId) throws Exception { | |||||
| String key = "webapp:short:member:"+memberId; | |||||
| return getCacheMember(memberId,finalTenantId, key, 100); | |||||
| } | |||||
| public void removeCacheMember(Long memberId) { | |||||
| String key = "webapp:member:"+memberId; | |||||
| RedisCacheUtils.removeCache(objectCommonRedisTemplate, key); | |||||
| String shortKey = "webapp:short:member:"+memberId; | |||||
| RedisCacheUtils.removeCache(objectCommonRedisTemplate, shortKey); | |||||
| } | |||||
| public WxAppinfo getAppInfo(String appId) { | |||||
| return wxAppinfoService.getByAppId(appId); | |||||
| } | |||||
| public WxMaService getWeappService(String appId) { | |||||
| if(isFmOpen) { | |||||
| return openService.getWxOpenComponentService().getWxMaServiceByAppid(appId); | |||||
| } else { | |||||
| WxAppinfo appinfo = wxAppinfoService.getByAppId(appId); | |||||
| if (appinfo == null) { | |||||
| return null; | |||||
| } | |||||
| WxMaService service = MaUtil.getWeappService(appinfo); | |||||
| return service; | |||||
| } | |||||
| } | |||||
| public WxMaService getWeappServiceByAppInfo(WxAppinfo appinfo) { | |||||
| if(!isFmOpen) { | |||||
| WxMaService service = MaUtil.getWeappService(appinfo); | |||||
| return service; | |||||
| } | |||||
| return null; | |||||
| } | |||||
| public Long saveToBasicInfoByCUser(String userPhone,String userName,String avatarUrl,Integer sex,Long userId) { | |||||
| TenantEntity tenantEntity = getTenantInfo(); | |||||
| if (StringUtils.isBlank(userPhone)) | |||||
| return null; | |||||
| WxCUserBasicInfo byId = null; | |||||
| if (null != userId) { | |||||
| byId = wxCUserBasicInfoService.getById(userId,getFinalTenantId()); | |||||
| } | |||||
| WxCUserBasicInfo basicInfo = wxCUserBasicInfoService.findInfoByPhone(tenantEntity, userPhone); | |||||
| if (basicInfo != null) { | |||||
| if (byId != null) { | |||||
| if (!byId.getId().equals(basicInfo.getId())) { | |||||
| //数据库存在此手机号的会员,并且当前微信存在另一手机号会员 | |||||
| logger.error("会员" + userId + "更换手机号时,当前手机号会员表已存在:" + userPhone); | |||||
| return Long.valueOf(-1); | |||||
| } | |||||
| } | |||||
| if (!basicInfo.getTenantId().contains("," + tenantEntity.getTenantId() + ",")) { | |||||
| basicInfo.setTenantId(basicInfo.getTenantId() + tenantEntity.getTenantId() + ","); | |||||
| } | |||||
| basicInfo.setNickName(userName); | |||||
| basicInfo.setAvatarUrl(avatarUrl); | |||||
| basicInfo.setSex(sex); | |||||
| wxCUserBasicInfoService.update(basicInfo); | |||||
| removeCacheMember(basicInfo.getId()); | |||||
| return basicInfo.getId(); | |||||
| } else { | |||||
| if (byId != null) { | |||||
| if (!byId.getTenantId().contains("," + tenantEntity.getTenantId() + ",")) { | |||||
| byId.setTenantId(byId.getTenantId() + tenantEntity.getTenantId() + ","); | |||||
| } | |||||
| byId.setPhone(userPhone); | |||||
| byId.setNickName(userName); | |||||
| byId.setAvatarUrl(avatarUrl); | |||||
| byId.setSex(sex); | |||||
| wxCUserBasicInfoService.update(byId); | |||||
| removeCacheMember(basicInfo.getId()); | |||||
| return byId.getId(); | |||||
| } else { | |||||
| basicInfo = new WxCUserBasicInfo(); | |||||
| basicInfo.setTenantId("," + tenantEntity.getTenantId() + ","); | |||||
| basicInfo.setFinalTenantId(tenantEntity.getFinalTenantId()); | |||||
| basicInfo.setPhone(userPhone); | |||||
| basicInfo.setNickName(userName); | |||||
| basicInfo.setAvatarUrl(avatarUrl); | |||||
| basicInfo.setSex(sex); | |||||
| wxCUserBasicInfoService.save(basicInfo); | |||||
| removeCacheMember(basicInfo.getId()); | |||||
| return basicInfo.getId(); | |||||
| } | |||||
| } | |||||
| } | |||||
| public String getIpAddr() { | |||||
| HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); | |||||
| String ipaddress = IPUtil.getIpAddr(request); | |||||
| return ipaddress; | |||||
| } | |||||
| private void setCUserBasicChild(WxCUserBasicInfo basicInfo){ | |||||
| WxCUserBasicChild child = new WxCUserBasicChild(); | |||||
| child.setCUserId(basicInfo.getId()); | |||||
| child.setTenantId(basicInfo.getFinalTenantId()); | |||||
| List<WxCUserBasicChild> list = wxCUserBasicChildService.findList(child); | |||||
| basicInfo.setChildrenList(list); | |||||
| } | |||||
| } | } | ||||
| @@ -6,6 +6,8 @@ import com.iformall.common.ResultData; | |||||
| import com.iformall.domain.po.NeuPosOrderMasterExt; | import com.iformall.domain.po.NeuPosOrderMasterExt; | ||||
| import com.iformall.domain.po.WxActivity; | import com.iformall.domain.po.WxActivity; | ||||
| import com.iformall.service.NeuPosOrderService; | import com.iformall.service.NeuPosOrderService; | ||||
| import com.iformall.utils.DateUtils; | |||||
| import io.swagger.annotations.Api; | import io.swagger.annotations.Api; | ||||
| import io.swagger.annotations.ApiImplicitParam; | import io.swagger.annotations.ApiImplicitParam; | ||||
| import io.swagger.annotations.ApiImplicitParams; | import io.swagger.annotations.ApiImplicitParams; | ||||
| @@ -66,6 +68,12 @@ public class NeuPosAdminController extends BaseController { | |||||
| return new ResultData(maplist); | return new ResultData(maplist); | ||||
| } | } | ||||
| private void setDate(NeuPosOrderMasterExt example) { | |||||
| if (null != example.getCreateEnd()) { | |||||
| example.setCreateEnd(DateUtils.stringToDate(DateUtils.date2String(example.getCreateEnd(), "yyyy-MM-dd") +" 23:59:59","yyyy-MM-dd HH:mm:ss")); | |||||
| } | |||||
| } | |||||
| @ApiOperation("集团类型流水") | @ApiOperation("集团类型流水") | ||||
| @GetMapping("payTypeOrderlist") | @GetMapping("payTypeOrderlist") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -76,6 +84,7 @@ public class NeuPosAdminController extends BaseController { | |||||
| if (!tenantValid(tenantId)) { | if (!tenantValid(tenantId)) { | ||||
| return new ResultData(Result.ERROR,"未安装POS系统"); | return new ResultData(Result.ERROR,"未安装POS系统"); | ||||
| } | } | ||||
| setDate(example); | |||||
| example.setOrgId(24); | example.setOrgId(24); | ||||
| PageInfo<Map> maplist = neuPosOrderService.queryShopPayOrderList(example,pageNum,pageSize); | PageInfo<Map> maplist = neuPosOrderService.queryShopPayOrderList(example,pageNum,pageSize); | ||||
| return new ResultData(maplist); | return new ResultData(maplist); | ||||
| @@ -89,6 +98,7 @@ public class NeuPosAdminController extends BaseController { | |||||
| if (!tenantValid(tenantId)) { | if (!tenantValid(tenantId)) { | ||||
| return new ResultData(Result.ERROR,"未安装POS系统"); | return new ResultData(Result.ERROR,"未安装POS系统"); | ||||
| } | } | ||||
| setDate(example); | |||||
| example.setOrgId(24); | example.setOrgId(24); | ||||
| List<Map> maplist = neuPosOrderService.queryShopPayOrderSum(example); | List<Map> maplist = neuPosOrderService.queryShopPayOrderSum(example); | ||||
| return new ResultData(maplist); | return new ResultData(maplist); | ||||
| @@ -104,6 +114,7 @@ public class NeuPosAdminController extends BaseController { | |||||
| if (!tenantValid(tenantId)) { | if (!tenantValid(tenantId)) { | ||||
| return new ResultData(Result.ERROR,"未安装POS系统"); | return new ResultData(Result.ERROR,"未安装POS系统"); | ||||
| } | } | ||||
| setDate(example); | |||||
| example.setOrgId(24); | example.setOrgId(24); | ||||
| PageInfo<Map> maplist = neuPosOrderService.queryShopPayTypeTradeList(example,pageNum,pageSize); | PageInfo<Map> maplist = neuPosOrderService.queryShopPayTypeTradeList(example,pageNum,pageSize); | ||||
| return new ResultData(maplist); | return new ResultData(maplist); | ||||
| @@ -119,6 +130,7 @@ public class NeuPosAdminController extends BaseController { | |||||
| if (!tenantValid(tenantId)) { | if (!tenantValid(tenantId)) { | ||||
| return new ResultData(Result.ERROR,"未安装POS系统"); | return new ResultData(Result.ERROR,"未安装POS系统"); | ||||
| } | } | ||||
| setDate(example); | |||||
| example.setOrgId(24); | example.setOrgId(24); | ||||
| PageInfo<Map> maplist = neuPosOrderService.queryOrderList(example,pageNum,pageSize); | PageInfo<Map> maplist = neuPosOrderService.queryOrderList(example,pageNum,pageSize); | ||||
| return new ResultData(maplist); | return new ResultData(maplist); | ||||
| @@ -1,13 +1,7 @@ | |||||
| package com.iformall.domain.po; | package com.iformall.domain.po; | ||||
| import java.io.Serializable; | |||||
| import java.math.BigDecimal; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import com.baomidou.mybatisplus.annotation.TableField; | |||||
| import com.baomidou.mybatisplus.annotation.TableName; | |||||
| import com.iformall.domain.po.base.BaseEntity; | import com.iformall.domain.po.base.BaseEntity; | ||||
| import lombok.Data; | import lombok.Data; | ||||
| import lombok.EqualsAndHashCode; | import lombok.EqualsAndHashCode; | ||||
| import lombok.ToString; | import lombok.ToString; | ||||
| @@ -16,10 +10,9 @@ import lombok.ToString; | |||||
| @ToString(callSuper = true) | @ToString(callSuper = true) | ||||
| @EqualsAndHashCode(callSuper = true) | @EqualsAndHashCode(callSuper = true) | ||||
| public class NeuPosOrderMasterExt extends BaseEntity{ | public class NeuPosOrderMasterExt extends BaseEntity{ | ||||
| private Integer orgId; | |||||
| private static final long serialVersionUID = 6080005017786775288L; | |||||
| private Integer orgId; | |||||
| private Integer shopId; | private Integer shopId; | ||||
| @TableField(exist = false) | |||||
| private Date createBegin; | private Date createBegin; | ||||
| @TableField(exist = false) | |||||
| private Date createEnd; | private Date createEnd; | ||||
| } | } | ||||
| @@ -6,8 +6,8 @@ | |||||
| SELECT shop_id as shopId, | SELECT shop_id as shopId, | ||||
| sum(real_pay_amount) as payAmount, | sum(real_pay_amount) as payAmount, | ||||
| count(0) as payCount | count(0) as payCount | ||||
| from order_master | |||||
| where order_status = 2 and order_type != '3' | |||||
| from order_master_v2 | |||||
| where order_status = 4 and order_type != '3' | |||||
| <if test=" orgId != null"> | <if test=" orgId != null"> | ||||
| and org_id = #{orgId} | and org_id = #{orgId} | ||||
| </if> | </if> | ||||
| @@ -32,8 +32,8 @@ | |||||
| count(if(order_status=4,true,null)) refundCount, | count(if(order_status=4,true,null)) refundCount, | ||||
| ifnull(sum(if(order_status=2,real_pay_amount,0)),0) as amount, | ifnull(sum(if(order_status=2,real_pay_amount,0)),0) as amount, | ||||
| pay_type as payType | pay_type as payType | ||||
| from order_master | |||||
| where pay_status = 2 and order_type != '3' | |||||
| from order_master_v2 | |||||
| where pay_status = 4 and order_type != '3' | |||||
| <if test=" orgId != null"> | <if test=" orgId != null"> | ||||
| and org_id = #{orgId} | and org_id = #{orgId} | ||||
| </if> | </if> | ||||
| @@ -50,27 +50,75 @@ | |||||
| </select> | </select> | ||||
| <select id="queryShopPayOrderSum" parameterType="com.iformall.domain.po.NeuPosOrderMasterExt" resultType="java.util.Map"> | <select id="queryShopPayOrderSum" parameterType="com.iformall.domain.po.NeuPosOrderMasterExt" resultType="java.util.Map"> | ||||
| select ifnull(sum(order_amount),0) as payAmount, | |||||
| ifnull(sum(discount_amount),0) as discountAmount, | |||||
| count(order_amount) as payCount, | |||||
| ifnull(sum(if(order_status=4,real_pay_amount,0)),0) refundAmount, | |||||
| count(if(order_status=4,true,null)) refundCount, | |||||
| ifnull(sum(if(order_status=2,real_pay_amount,0)),0) as amount, | |||||
| pay_type as payType | |||||
| from order_master | |||||
| where pay_status = 2 and order_type != '3' | |||||
| <if test=" orgId != null"> | |||||
| and org_id = #{orgId} | |||||
| </if> | |||||
| <if test=" shopId != null"> | |||||
| and shop_id = #{shopId} | |||||
| </if> | |||||
| <if test=" createBegin != null"> | |||||
| and created_at >= #{createBegin} | |||||
| </if> | |||||
| <if test=" createEnd != null"> | |||||
| and created_at <= #{createEnd} | |||||
| </if> | |||||
| select _temp.payType as payType, sum(_temp.payAmount) as payAmount, sum(_temp.payCount) as payCount from | |||||
| ( | |||||
| SELECT | |||||
| ifnull( refund.shop_id, paid.shop_id ) AS shopId, | |||||
| pay_type_dict_v2.pay_type AS payType, | |||||
| ifnull( payAmount, 0 ) - ifnull( refundAmount, 0 ) AS payAmount, | |||||
| ifnull( payCount, 0 ) + ifnull( refundCount, 0 ) AS payCount | |||||
| FROM | |||||
| pay_type_dict_v2 | |||||
| LEFT JOIN ( | |||||
| SELECT | |||||
| shop_id, | |||||
| pay_type AS payType, | |||||
| ifnull( sum( pay_order_v2.pay_amount ) / 100, 0 ) AS payAmount, | |||||
| count( 0 ) AS payCount, | |||||
| 0 AS discountAmount | |||||
| FROM | |||||
| pay_order_v2 | |||||
| LEFT JOIN order_master_v2 ON pay_order_v2.m_order_number = order_master_v2.order_number | |||||
| <if test=" orgId != null"> | |||||
| and order_master_v2.org_id = #{orgId} | |||||
| </if> | |||||
| <if test=" shopId != null"> | |||||
| and order_master_v2.shop_id = #{shopId} | |||||
| </if> | |||||
| <if test=" createBegin != null"> | |||||
| and order_master_v2.created_at >= #{createBegin} | |||||
| </if> | |||||
| <if test=" createEnd != null"> | |||||
| and order_master_v2.created_at <= #{createEnd} | |||||
| </if> | |||||
| AND ( pay_order_v2.pay_status = 2 OR pay_order_v2.pay_status = 5 OR pay_order_v2.pay_status = 4 ) | |||||
| GROUP BY | |||||
| pay_type, | |||||
| shop_id | |||||
| ) AS paid ON pay_type_dict_v2.pay_type = paid.payType | |||||
| LEFT JOIN ( | |||||
| SELECT | |||||
| shop_id, | |||||
| pay_type AS payType, | |||||
| ifnull( sum( refunded_amount ) / 100, 0 ) refundAmount, | |||||
| count( 0 ) refundCount | |||||
| FROM | |||||
| pay_refund_order_v2 AS pay_order_v2 | |||||
| LEFT JOIN order_master_v2 ON pay_order_v2.m_order_number = order_master_v2.order_number | |||||
| <if test=" orgId != null"> | |||||
| and order_master_v2.org_id = #{orgId} | |||||
| </if> | |||||
| <if test=" shopId != null"> | |||||
| and order_master_v2.shop_id = #{shopId} | |||||
| </if> | |||||
| <if test=" createBegin != null"> | |||||
| and order_master_v2.created_at >= #{createBegin} | |||||
| </if> | |||||
| <if test=" createEnd != null"> | |||||
| and order_master_v2.created_at <= #{createEnd} | |||||
| </if> | |||||
| AND refund_status = 2 | |||||
| GROUP BY | |||||
| pay_type, | |||||
| shop_id | |||||
| ) AS refund ON pay_type_dict_v2.pay_type = refund.payType | |||||
| AND paid.shop_id = refund.shop_id | |||||
| ORDER BY | |||||
| payType, | |||||
| shopId ASC | |||||
| ) as _temp | |||||
| where _temp.payType in (select pay_type from trade_mch_pay_channel where org_id = #{orgId}) | |||||
| group by _temp.payType | |||||
| </select> | </select> | ||||
| <select id="selectShopList" parameterType="Integer" resultType="java.util.Map"> | <select id="selectShopList" parameterType="Integer" resultType="java.util.Map"> | ||||
| @@ -88,8 +136,8 @@ | |||||
| <select id="queryOrderList" parameterType="com.iformall.domain.po.NeuPosOrderMasterExt" resultType="java.util.Map"> | <select id="queryOrderList" parameterType="com.iformall.domain.po.NeuPosOrderMasterExt" resultType="java.util.Map"> | ||||
| SELECT order_number as orderNumber, serial_no as serialNo, order_amount as orderAmount,real_pay_amount as realPayAmount, | SELECT order_number as orderNumber, serial_no as serialNo, order_amount as orderAmount,real_pay_amount as realPayAmount, | ||||
| discount_amount as discountAmount, pay_type as payType,paid_time as paidTime,order_status as orderStatus | discount_amount as discountAmount, pay_type as payType,paid_time as paidTime,order_status as orderStatus | ||||
| from order_master | |||||
| where order_status = 2 and order_type != '3' | |||||
| from order_master_v2 | |||||
| where order_status = 4 and order_type != '3' | |||||
| <if test=" orgId != null"> | <if test=" orgId != null"> | ||||
| and org_id = #{orgId} | and org_id = #{orgId} | ||||
| </if> | </if> | ||||