| @@ -104,7 +104,10 @@ public class ImportTemplateTask { | |||
| //3 计失败条数 | |||
| List<WxBillExcelTemplateOther> billSuccessList = new ArrayList<>(); | |||
| successList.parallelStream().forEach(s -> { | |||
| if (StringUtils.isNotEmpty(s.getMerchantName())) { | |||
| if (StringUtils.isNotEmpty(s.getMerchantName()) && null != s.getBillType() | |||
| && StringUtils.isNotEmpty(s.getBillAttr()) && null != s.getStarttime() | |||
| && null != s.getEndtime() && StringUtils.isNotEmpty(s.getPayStr()) | |||
| && null != s.getPayDate() && null != s.getReceiveDate()) { | |||
| WxMerchant wxMerchant = merchantMap.get(s.getMerchantName()); | |||
| if (wxMerchant != null) { | |||
| Long merchantId = wxMerchant.getId(); | |||
| @@ -100,10 +100,6 @@ public class TenantInfoImpl implements TenantInfo { | |||
| return true; | |||
| if ("com.iformall.mapper.WxActivityJoinMapper.updateStatus".equals(ms.getId())) | |||
| return true; | |||
| if ("com.iformall.mapper.WxCouponMapper.findCouponList".equals(ms.getId())) | |||
| return true; | |||
| if ("com.iformall.mapper.WxCouponMapper.findCouponListCount".equals(ms.getId())) | |||
| return true; | |||
| return false; | |||
| } | |||
| } | |||
| @@ -113,8 +113,8 @@ fm: | |||
| exception: false | |||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com | |||
| deploy: 1 | |||
| open: false | |||
| upload_dir: /tmp/ | |||
| open: true | |||
| upload_dir: /home/test/server/uploads/ | |||
| ueditor: | |||
| config: config.json | |||
| @@ -0,0 +1,11 @@ | |||
| alter table wx_bill_daily | |||
| add column starttime datetime default null comment '账单开始时间', | |||
| add column endtime datetime default null comment '账单结束时间'; | |||
| alter table wx_bill_other | |||
| add column starttime datetime default null comment '账单开始时间', | |||
| add column endtime datetime default null comment '账单结束时间'; | |||
| alter table wx_bill_other_deposit | |||
| add column starttime datetime default null comment '账单开始时间', | |||
| add column endtime datetime default null comment '账单结束时间'; | |||
| @@ -0,0 +1,3 @@ | |||
| alter table wx_bill_action | |||
| add index t_b(tenant_id,bill_id), | |||
| add index b(bill_id); | |||
| @@ -0,0 +1 @@ | |||
| update wx_merchant set link_line_phone = link_person where link_line_phone is null; | |||
| @@ -9,24 +9,19 @@ import com.iformall.domain.po.WxMerchantTradeDaily; | |||
| import com.iformall.service.WxMerchantBUserService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxMerchantTradeDailyService; | |||
| import com.iformall.utils.DateUtils; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiImplicitParam; | |||
| import io.swagger.annotations.ApiImplicitParams; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import org.apache.commons.collections.CollectionUtils; | |||
| import org.apache.commons.collections.map.LinkedMap; | |||
| import org.apache.commons.lang3.StringUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.*; | |||
| import java.text.SimpleDateFormat; | |||
| import java.util.ArrayList; | |||
| import java.util.Date; | |||
| import java.util.List; | |||
| import java.util.Map; | |||
| @RestController | |||
| @RequestMapping("/api/wxMerchantTradeDaily") | |||
| @@ -109,7 +104,10 @@ public class WxMerchantTradeDailyController extends BaseController { | |||
| } | |||
| } | |||
| wxMerchantTradeDaily.setbUserId(getUserId()); | |||
| logger.info("1------------------------------------" + wxMerchantTradeDaily.getbUserId()); | |||
| wxMerchantTradeDaily.setBUserId(getUserId()); | |||
| logger.info("2------------------------------------" + wxMerchantTradeDaily.getBUserId()); | |||
| wxMerchantTradeDailyService.saveOrUpdate(wxMerchantTradeDaily); | |||
| return new ResultData(); | |||
| } | |||
| @@ -43,7 +43,6 @@ public class WxBillDaily extends BaseEntity{ | |||
| @io.swagger.annotations.ApiModelProperty(value="账单类型",name="type") | |||
| private Integer type; | |||
| @SortColumn(column = "receivePay") | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | |||
| private Long receivePay; | |||
| @@ -52,18 +51,15 @@ public class WxBillDaily extends BaseEntity{ | |||
| @Excel(name = "缴款截止日期*", orderNum = "5", width = 20, format = "yyyy-MM-dd") | |||
| @NotNull | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| private Date payDate; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| @SortColumn(column = "expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| private Long expiredDay; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | |||
| @@ -94,15 +90,12 @@ public class WxBillDaily extends BaseEntity{ | |||
| private String priceDetail; | |||
| @Transient | |||
| @SortColumn(column = "allPeriod") | |||
| private Integer allPeriod; | |||
| @Transient | |||
| @SortColumn(column = "needPay") | |||
| private Long needPay; | |||
| @Transient | |||
| @SortColumn(column = "latePayPrice") | |||
| private Long latePayPrice; | |||
| @Transient | |||
| @@ -110,12 +103,16 @@ public class WxBillDaily extends BaseEntity{ | |||
| private Integer period; | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| private List<Map<String, Object>> shops; | |||
| @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime") | |||
| private Date starttime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime") | |||
| private Date endtime; | |||
| public static enum Field | |||
| { | |||
| @@ -49,19 +49,16 @@ public class WxBillOther extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="账单备注",name="comments") | |||
| private String comments; | |||
| @SortColumn(column = "receivePay") | |||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | |||
| private Long receivePay; | |||
| @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") | |||
| private Long pay; | |||
| @Excel(name = "缴款截止日期", orderNum = "7", width = 20, format = "yyyy-MM-dd") | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="截止收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", orderNum = "8", width = 20, format = "yyyy-MM-dd") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| private Date payDate; | |||
| @@ -69,7 +66,6 @@ public class WxBillOther extends BaseEntity { | |||
| private Date createtime; | |||
| @Excel(name = "逾期(天)", orderNum = "10", width = 20) | |||
| @SortColumn(column = "expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| private Long expiredDay; | |||
| @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") | |||
| @@ -97,15 +93,12 @@ public class WxBillOther extends BaseEntity { | |||
| private Integer payWay; | |||
| @Transient | |||
| @SortColumn(column = "allPeriod") | |||
| private Integer allPeriod; | |||
| @Transient | |||
| @SortColumn(column = "needPay") | |||
| private Long needPay; | |||
| @Transient | |||
| @SortColumn(column = "latePayPrice") | |||
| private Long latePayPrice; | |||
| @Transient | |||
| @@ -114,7 +107,6 @@ public class WxBillOther extends BaseEntity { | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| @@ -127,6 +119,12 @@ public class WxBillOther extends BaseEntity { | |||
| @Excel(name = "欠缴金额(元)", orderNum = "6", width = 20) | |||
| private String oweStr; | |||
| @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime") | |||
| private Date starttime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime") | |||
| private Date endtime; | |||
| public String getReceivePayStr() { | |||
| return new BigDecimal(receivePay == null ? 0 : receivePay).divide(new BigDecimal(100)).toPlainString(); | |||
| } | |||
| @@ -48,19 +48,16 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "账单备注", name = "comments") | |||
| private String comments; | |||
| @SortColumn(column = "receivePay") | |||
| @io.swagger.annotations.ApiModelProperty(value = "实际应收金额", name = "receivePay") | |||
| private Long receivePay; | |||
| @io.swagger.annotations.ApiModelProperty(value = "实收金额", name = "pay") | |||
| private Long pay; | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value = "截止收款日期", name = "receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", orderNum = "6", width = 20, format = "yyyy-MM-dd") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value = "到账日期", name = "payDate") | |||
| private Date payDate; | |||
| @@ -100,15 +97,12 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| private Integer payWay; | |||
| @Transient | |||
| @SortColumn(column = "allPeriod") | |||
| private Integer allPeriod; | |||
| @Transient | |||
| @SortColumn(column = "needPay") | |||
| private Long needPay; | |||
| @Transient | |||
| @SortColumn(column = "latePayPrice") | |||
| private Long latePayPrice; | |||
| @Transient | |||
| @@ -117,7 +111,6 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @@ -149,6 +142,11 @@ public class WxBillOtherDeposit extends BaseEntity { | |||
| @Transient | |||
| private List<Map<String, Object>> shops; | |||
| @io.swagger.annotations.ApiModelProperty(value = "开始时间", name = "starttime") | |||
| private Date starttime; | |||
| @io.swagger.annotations.ApiModelProperty(value = "结束时间", name = "endtime") | |||
| private Date endtime; | |||
| public static enum Field { | |||
| Id_ASC("`id` ASC"), Id_DESC("`id` DESC") | |||
| @@ -68,19 +68,16 @@ public class WxBillProperty extends BaseEntity { | |||
| private Long pay; | |||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "10") | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @Excel(name = "收款日期", format = "yyyy-MM-dd", width = 20, orderNum = "11") | |||
| @SortColumn(column = "payDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="到账日期",name="payDate") | |||
| private Date payDate; | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createtime") | |||
| private Date createtime; | |||
| @Excel(name = "逾期(天) ", width = 20, orderNum = "13") | |||
| @SortColumn(column = "expiredDay") | |||
| @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") | |||
| private Long expiredDay; | |||
| @@ -103,7 +100,6 @@ public class WxBillProperty extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") | |||
| private Integer isDel; | |||
| @SortColumn(column = "needPay") | |||
| @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") | |||
| private Long needPay; | |||
| @@ -139,7 +135,6 @@ public class WxBillProperty extends BaseEntity { | |||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金时间", name = "latePayTime") | |||
| private Date latePayTime; | |||
| @SortColumn(column = "latePayPrice") | |||
| @io.swagger.annotations.ApiModelProperty(value = "滞纳金总额", name = "latePayPrice") | |||
| private Long latePayPrice; | |||
| @@ -170,12 +165,10 @@ public class WxBillProperty extends BaseEntity { | |||
| private String comments; | |||
| @Transient | |||
| @SortColumn(column = "allPeriod") | |||
| private Integer allPeriod; | |||
| @Excel(name = "商铺号", width = 20, orderNum = "1") | |||
| @Transient | |||
| @SortColumn(column = "shopNumber") | |||
| private String shopNumber; | |||
| @Transient | |||
| private Integer depositStatus; | |||
| @@ -66,7 +66,6 @@ public class WxBillRent extends BaseEntity { | |||
| private Long pay; | |||
| @Excel(name = "缴款截止日期", format = "yyyy-MM-dd", width = 20, orderNum = "10") | |||
| @SortColumn(column = "receiveDate") | |||
| @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") | |||
| private Date receiveDate; | |||
| @@ -28,6 +28,23 @@ public class WxMerchantTradeDaily implements Serializable { | |||
| private String tenantId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "商户id", name = "merchantId") | |||
| private Long merchantId; | |||
| public Long getbUserId() { | |||
| return bUserId; | |||
| } | |||
| public void setbUserId(Long bUserId) { | |||
| this.bUserId = bUserId; | |||
| } | |||
| public Long getBUserId() { | |||
| return bUserId; | |||
| } | |||
| public void setBUserId(Long bUserId) { | |||
| this.bUserId = bUserId; | |||
| } | |||
| @io.swagger.annotations.ApiModelProperty(value = "b用户id", name = "bUserId") | |||
| private Long bUserId; | |||
| @io.swagger.annotations.ApiModelProperty(value = "交易额", name = "tradeAmt") | |||
| @@ -81,7 +81,6 @@ public class WxRentContract extends BaseEntity { | |||
| private Integer owe; | |||
| @Transient | |||
| @SortColumn(column = "receiveDate") | |||
| private String receiveDate; | |||
| @Transient | |||
| @@ -114,7 +114,6 @@ public class WxBillAll extends BaseEntity { | |||
| @SortColumn(column = "owe") | |||
| private Integer owe; | |||
| @Transient | |||
| @SortColumn(column = "receiveDate") | |||
| private String receiveDate; | |||
| @Transient | |||
| @SortColumn(column = "payDate") | |||
| @@ -53,6 +53,7 @@ public class WxBillActionServiceImpl implements WxBillActionService { | |||
| wxBillAction.setUserName(user.getName()); | |||
| wxBillAction.setPhone(user.getPhone()); | |||
| wxBillAction.setTenantId(user.getTenantId()); | |||
| wxBillAction.setPayDate(action.getPayDate()); | |||
| Date date = new Date(); | |||
| wxBillAction.setCreatetime(date); | |||
| wxBillAction.setUpdatetime(date); | |||
| @@ -1061,6 +1061,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| daily.setExpiredDay(0L); | |||
| daily.setOwe(0L); | |||
| daily.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| daily.setStarttime(bill.getStarttime()); | |||
| daily.setEndtime(bill.getEndtime()); | |||
| wxBillDailyMapper.insertSelective(daily); | |||
| addActionImport(daily.getId(), bill.getPayWay(), bill.getPayDate(), user); | |||
| } | |||
| @@ -1070,6 +1072,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| otherQuery.setTenantId(tenantId); | |||
| otherQuery.setMerchantId(bill.getMerchantId()); | |||
| otherQuery.setReceiveDate(bill.getReceiveDate()); | |||
| otherQuery.setName(bill.getBillAttr()); | |||
| otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| WxBillOther other = wxBillOtherMapper.selectOne(otherQuery); | |||
| long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); | |||
| @@ -1114,6 +1117,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| other.setExpiredDay(0L); | |||
| other.setOwe(0L); | |||
| other.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| other.setStarttime(bill.getStarttime()); | |||
| other.setEndtime(bill.getEndtime()); | |||
| wxBillOtherMapper.insertSelective(other); | |||
| addActionImport(other.getId(), bill.getPayWay(), bill.getPayDate(), user); | |||
| } | |||
| @@ -1123,6 +1128,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| otherDepositQuery.setTenantId(tenantId); | |||
| otherDepositQuery.setMerchantId(bill.getMerchantId()); | |||
| otherDepositQuery.setReceiveDate(bill.getReceiveDate()); | |||
| otherDepositQuery.setComments(bill.getBillAttr()); | |||
| otherDepositQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| WxBillOtherDeposit otherDeposit = wxBillOtherDepositMapper.selectOne(otherDepositQuery); | |||
| long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); | |||
| @@ -1166,6 +1172,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||
| otherDeposit.setExpiredDay(0L); | |||
| otherDeposit.setOwe(0L); | |||
| otherDeposit.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| otherDeposit.setStarttime(bill.getStarttime()); | |||
| otherDeposit.setEndtime(bill.getEndtime()); | |||
| wxBillOtherDepositMapper.insertSelective(otherDeposit); | |||
| addActionImport(otherDeposit.getId(), bill.getPayWay(), bill.getPayDate(), user); | |||
| } | |||
| @@ -126,6 +126,7 @@ public class WxBillOtherDepositServiceImpl implements WxBillOtherDepositService | |||
| otherDepositQuery.setTenantId(record.getTenantId()); | |||
| otherDepositQuery.setMerchantId(record.getMerchantId()); | |||
| otherDepositQuery.setReceiveDate(record.getReceiveDate()); | |||
| otherDepositQuery.setComments(record.getComments()); | |||
| otherDepositQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| WxBillOtherDeposit otherDeposit = wxBillOtherDepositMapper.selectOne(otherDepositQuery); | |||
| if (otherDeposit != null) { | |||
| @@ -127,6 +127,7 @@ public class WxBillOtherServiceImpl implements WxBillOtherService { | |||
| otherQuery.setTenantId(record.getTenantId()); | |||
| otherQuery.setMerchantId(record.getMerchantId()); | |||
| otherQuery.setReceiveDate(record.getReceiveDate()); | |||
| otherQuery.setName(record.getName()); | |||
| otherQuery.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||
| WxBillOther other = wxBillOtherMapper.selectOne(otherQuery); | |||
| if (other != null) { | |||
| @@ -114,7 +114,7 @@ public class WxMerchantTradeDailyServiceImpl implements WxMerchantTradeDailyServ | |||
| wxMerchantTradeDaily.setId(idWorker.nextId()); | |||
| wxMerchantTradeDaily.setTenantId(merchant.getTenantId()); | |||
| wxMerchantTradeDaily.setMerchantId(merchant.getId()); | |||
| wxMerchantTradeDaily.setBUserId(userId); | |||
| wxMerchantTradeDaily.setbUserId(userId); | |||
| wxMerchantTradeDaily.setTradeAmt(volume+""); | |||
| wxMerchantTradeDaily.setCreateDate(new Date()); | |||
| wxMerchantTradeDaily.setUpdateDate(new Date()); | |||
| @@ -27,10 +27,6 @@ | |||
| and `id` = #{id} | |||
| </if> | |||
| <if test=" null != tenantId "> | |||
| and `tenant_id` = #{tenantId} | |||
| </if> | |||
| <if test=" null != action "> | |||
| and `action` = #{action} | |||
| </if> | |||
| @@ -23,13 +23,16 @@ | |||
| <result column="price_detail" jdbcType="VARCHAR" property="priceDetail"/> | |||
| <result column="shop_number" jdbcType="VARCHAR" property="shopNumber"/> | |||
| <result column="starttime" property="starttime"/> | |||
| <result column="endtime" property="endtime"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, | |||
| `tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`, | |||
| `rent_shop_type`,`pay_way`,`price_detail` | |||
| `rent_shop_type`,`pay_way`,`price_detail`,`starttime`,`endtime` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -68,9 +71,9 @@ | |||
| <select id="queryBillDailyList" parameterType="com.iformall.domain.po.WxBillDaily" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day` , | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` merchant_name, | |||
| s.shop_number,br.`updatetime`,br.`merchant_id`, | |||
| br.shop_id,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` merchant_name,s.shop_number, | |||
| br.`updatetime`,br.`merchant_id`,br.shop_id,br.type,br.`rent_shop_type`,br.pay_way,br.price_detail, | |||
| br.`starttime`,br.`endtime` | |||
| from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| <where> | |||
| @@ -24,13 +24,16 @@ | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="merchant_name" property="merchantName"/> | |||
| <result column="starttime" property="starttime"/> | |||
| <result column="endtime" property="endtime"/> | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, | |||
| `tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`, | |||
| `rent_shop_type`,`return_price`,`pay_way` | |||
| `rent_shop_type`,`return_price`,`pay_way`,`starttime`,`endtime` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -73,7 +76,7 @@ | |||
| <select id="queryBillList" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="BaseResultMap"> | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`,br.`pay_date`,br.`createtime`,br.`expired_day`, | |||
| br.`owe`,br.`status`,m.`name` merchant_name,s.shop_number,br.`updatetime`,br.`return_price`,br.`merchant_id`, | |||
| br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way | |||
| br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way,br.`starttime`,br.`endtime` | |||
| from wx_bill_other_deposit br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| <where> | |||
| @@ -23,6 +23,9 @@ | |||
| <result column="pay_way" jdbcType="INTEGER" property="payWay"/> | |||
| <result column="merchant_name" property="merchantName"/> | |||
| <result column="starttime" property="starttime"/> | |||
| <result column="endtime" property="endtime"/> | |||
| </resultMap> | |||
| @@ -30,7 +33,7 @@ | |||
| <sql id="allColumns"> | |||
| `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, | |||
| `tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`name`,`comments`, | |||
| `rent_shop_type`,`pay_way` | |||
| `rent_shop_type`,`pay_way`,`starttime`,`endtime` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -72,7 +75,7 @@ | |||
| select br.`id`,br.`receive_pay`,br.`pay`,br.`receive_date`, br.`pay_date`,br.`createtime`,br.`expired_day`, | |||
| case when br.status=1 then br.owe else 0 end owe,br.`status`,m.`name` | |||
| merchant_name,s.shop_number,br.`updatetime`, | |||
| br.`merchant_id`,br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way | |||
| br.`merchant_id`,br.shop_id,br.name,br.comments,br.`rent_shop_type`,br.pay_way,br.`starttime`,br.`endtime` | |||
| from wx_bill_other br left join wx_merchant m on br.merchant_id=m.id | |||
| left join wx_shop s on br.shop_id=s.id | |||
| <where> | |||
| @@ -115,7 +115,8 @@ | |||
| left join wx_shop ws on(mtd.shop_id = ws.id) | |||
| where m.business_id = b.id and m.tenant_id=#{tenantId} ) | |||
| /100,2) rent, | |||
| round( | |||
| round( | |||
| (select sum(mtd.trade_amt) | |||
| from wx_merchant m | |||
| @@ -141,7 +142,9 @@ | |||
| left join wx_merchant_shop mtd on mtd.merchant_id = m.id | |||
| left join wx_shop ws on(mtd.shop_id = ws.id) | |||
| where m.business_id = b.id) | |||
| /100,2) rentSaleRate, | |||
| /100,2) | |||
| ,4) | |||
| rentSaleRate, | |||
| round( | |||
| (select sum(mtd.trade_amt) | |||
| @@ -153,7 +156,6 @@ | |||
| /100,2) comPrice | |||
| from wx_business b | |||
| limit 20 | |||
| </select> | |||
| <select id="devoteList" parameterType="com.iformall.domain.po.WxBusiness" resultType="hashmap"> | |||
| @@ -245,6 +245,7 @@ | |||
| where f.id = #{id} | |||
| and m.tenant_id = #{tenantId} | |||
| and s.is_del = 0 | |||
| and ms.is_del = 0 | |||
| group by m.business_id | |||
| </select> | |||
| @@ -144,7 +144,7 @@ | |||
| </where> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| <if test=" null == sortColumns">order by rc.id desc</if> | |||
| <if test=" null == sortColumns">order by rc.createtime desc,rc.id desc</if> | |||
| </select> | |||
| <select id="queryRentContractWaitSignStatus" resultType="int" | |||
| @@ -151,7 +151,7 @@ | |||
| <if test=" null != operationType ">and `operation_type` = #{operationType}</if> | |||
| </where> | |||
| <if test=" null != sortColumns"> order by ${sortColumns} </if> | |||
| <if test=" null == sortColumns"> order by rc.id desc </if> | |||
| <if test=" null == sortColumns"> order by rc.createtime desc,rc.id desc </if> | |||
| </select> | |||