Просмотр исходного кода

[审批流][添加][账单审批]

release_toaliyun_real
luozukai 7 лет назад
Родитель
Сommit
629f1ffa30
13 измененных файлов: 192 добавлений и 59 удалений
  1. +2
    -2
      mallinkAdmin/src/main/resources/db/migration/V201903300958__CHANGE_USER_LEN.sql
  2. +11
    -0
      mallinkAdmin/src/main/resources/db/migration/V201904011435__ADD_FLOW.sql
  3. +20
    -0
      mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java
  4. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/MallUserInfo.java
  5. +11
    -0
      mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
  6. +12
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxShop.java
  7. +40
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumMailMsgModel.java
  8. +12
    -0
      mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java
  9. +2
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java
  10. +10
    -4
      mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml
  11. +39
    -40
      mallinkService/src/main/resources/mapper/WxBillAllMapper.xml
  12. +7
    -3
      mallinkService/src/main/resources/mapper/WxMerchantMapper.xml
  13. +15
    -8
      mallinkService/src/main/resources/mapper/WxShopMapper.xml

+ 2
- 2
mallinkAdmin/src/main/resources/db/migration/V201903300958__CHANGE_USER_LEN.sql Просмотреть файл

@@ -4,7 +4,7 @@ ADD COLUMN `mp_open_id` VARCHAR(28) NULL AFTER `open_app_id`,
ADD COLUMN `mp_app_id` VARCHAR(18) NULL AFTER `mp_open_id`,
ADD COLUMN `mp_subscribe` TINYINT(2) NULL AFTER `mp_app_id`,
ADD COLUMN `mp_subscribe_time` datetime NULL AFTER `mp_subscribe`,
ADD COLUMN `mp_subscribe_scene` VARCHAR(20) NULL AFTER `mp_subscribe_time`,
NULL DEFAULT NULL COMMENT '经度' ;ADD COLUMN `mp_subscribe_scene` VARCHAR(20) NULL AFTER `mp_subscribe_time`,
ADD COLUMN `subs_open_id` VARCHAR(28) NULL AFTER `mp_subscribe_scene`,
ADD COLUMN `subs_app_id` VARCHAR(18) NULL AFTER `subs_open_id`,
ADD COLUMN `subs_subscribe` TINYINT(2) NULL AFTER `subs_app_id`,
@@ -16,4 +16,4 @@ CHANGE COLUMN `phone` `phone` VARCHAR(20) NULL DEFAULT NULL COMMENT '用户绑
CHANGE COLUMN `register_ip` `register_ip` VARCHAR(20) NULL DEFAULT NULL COMMENT '用户注册IP' ,
CHANGE COLUMN `app_id` `app_id` VARCHAR(20) NULL DEFAULT NULL COMMENT '小程序的appId' ,
CHANGE COLUMN `latitude` `latitude` DECIMAL(10,5) NULL DEFAULT NULL COMMENT '维度' ,
CHANGE COLUMN `longitude` `longitude` DECIMAL(10,5) NULL DEFAULT NULL COMMENT '经度' ;
CHANGE COLUMN `longitude` `longitude` DECIMAL(10,5)

+ 11
- 0
mallinkAdmin/src/main/resources/db/migration/V201904011435__ADD_FLOW.sql Просмотреть файл

@@ -9,3 +9,14 @@ ADD COLUMN `apply_status` SMALLINT(1) DEFAULT 1 COMMENT '审核状态0未审核1

ALTER TABLE `wx_bill_other`
ADD COLUMN `apply_status` SMALLINT(1) DEFAULT 1 COMMENT '审核状态0未审核1审核中2审核完成3驳回4合同作废5撤回';

alter table wx_msg_model modify column content text;

ALTER TABLE `wx_shop`
ADD COLUMN `email` varchar(100) DEFAULT NULL COMMENT '邮箱';

ALTER TABLE `mall_user_info`
ADD COLUMN `email` varchar(100) DEFAULT NULL COMMENT '邮箱';

ALTER TABLE `wx_merchant`
ADD COLUMN `email` varchar(100) DEFAULT NULL COMMENT '邮箱';

+ 20
- 0
mallinkSchedule/src/main/java/com/iformall/schedule/BillNotificationSchedule.java Просмотреть файл

@@ -6,6 +6,7 @@ import com.iformall.enums.*;
import com.iformall.mapper.*;
import com.iformall.mq.MqBaseProducer;
import org.apache.commons.collections.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -90,6 +91,8 @@ public class BillNotificationSchedule {
BigDecimal price = needPay.divide(new BigDecimal(100)).setScale(2, RoundingMode.HALF_EVEN);
String phone = bill.get("linkPhone").toString();
String appname = bill.get("appname").toString();
String email = bill.get("email").toString();
String billType = bill.get("billType").toString();
logger.info("待缴账单检验短信配置信息");

// WxMsgConfig wxMsgConfig = checkMsgConfig(tenantId);
@@ -121,6 +124,23 @@ public class BillNotificationSchedule {
map.put("date",receiveDate);
wxMsgRecord.setDynamicContentMap(map);
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode());

//发邮件
if(StringUtils.isNotBlank(email)) {
String billListStr = "<div style=\"margin: 0 5%;width:90%;box-sizing: content-box; border: 1px solid #DEDEDE;background: #FFFFFF;\"><div style=\"overflow: hidden;height: auto;width: 100%;\">";
billListStr += "<div style=\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\">"+billType+"</div>";
billListStr += "<div style=\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\">"+price+"</div>";
billListStr += "<div style=\"width: 33.3%;float: left;height: 60px;line-height: 60px;text-align: center;font-family:MicrosoftYaHei;color:rgba(85,85,85,1);\">"+receiveDate+"</div>";
billListStr += "</div></div>";
map.put("billList",billListStr);
MailMsg mailMsg = new MailMsg();
mailMsg.setMsgType(EnumMsgRecordType.EMAIL.getCode());
mailMsg.setModelId(EnumMailMsgModel.MAIL_BILL_WAIT_PAY.getCode());
mailMsg.setReceiver(email);
mailMsg.setTenantId(tenantId);
mailMsg.setDynamicContentMap(map);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
}
}

}


+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/MallUserInfo.java Просмотреть файл

@@ -108,6 +108,17 @@ public class MallUserInfo implements Serializable {
@io.swagger.annotations.ApiModelProperty(value="1合同审批 2账单审批",name="flowPermission")
private String flowPermission;

@io.swagger.annotations.ApiModelProperty(value = "邮箱", name = "email")
private String email;

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getFlowPermission() {
return flowPermission;
}


+ 11
- 0
mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java Просмотреть файл

@@ -143,6 +143,17 @@ public class WxMerchant implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "是否显示在C端", name = "isPublic")
private Integer isPublic;

@io.swagger.annotations.ApiModelProperty(value = "邮件", name = "email")
private String email;

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public List<WxLevelConfig> getLevelConfigList() {
return levelConfigList;
}


+ 12
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxShop.java Просмотреть файл

@@ -11,7 +11,7 @@ import java.util.List;
@Table(name = "wx_shop")
public class WxShop implements Serializable {
private static final long serialVersionUID = 1L;
@Id
protected Long id;
@@ -113,6 +113,17 @@ public class WxShop implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "备注", name = "comments")
private String comments;

@io.swagger.annotations.ApiModelProperty(value = "邮箱", name = "email")
private String email;

public String getEmail() {
return email;
}

public void setEmail(String email) {
this.email = email;
}

public String getTenantId() {
return tenantId;
}


+ 40
- 0
mallinkService/src/main/java/com/iformall/enums/EnumMailMsgModel.java Просмотреть файл

@@ -0,0 +1,40 @@
package com.iformall.enums;

/**
* Created by luozukai
* 短信模板
*/
public enum EnumMailMsgModel {
MAIL_PASS_NODIFY(345, "审批通过通知"),
MAIL_BILL_WAIT_PAY(345, "代缴账单通知"),
MAIL_APPLY_NODIFY(347, "审批通知"),
MAIL_BILL_OWE(348, "欠缴账单通知"),
MAIL_ASSIGNEE_NODIFY(349, "代办通知"),
MAIL_REJECT_NODIFY(350, "驳回通知"),
;

public static EnumMailMsgModel getEnum(Integer code) {
for (EnumMailMsgModel value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumMailMsgModel(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 12
- 0
mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java Просмотреть файл

@@ -518,6 +518,18 @@ public class WxFlowServiceImpl implements WxFlowService {
wxMsgRecord.setTenantId(tenantId);
wxMsgRecord.setDynamicContentMap(msgReplaceMap);
mqBaseProducer.sendMessage(wxMsgRecord, EnumMsgMqTopic.DEFAULT.getCode(),EnumMsgMqTag.DEFAULT.getCode(),EnumMsgMqKey.DEFAULT.getCode());

//发邮件
String email = (String)userMap.get("email");
if(StringUtils.isNotBlank(email)) {
MailMsg mailMsg = new MailMsg();
mailMsg.setMsgType(EnumMsgRecordType.EMAIL.getCode());
mailMsg.setModelId(EnumMailMsgModel.MAIL_PASS_NODIFY.getCode());
mailMsg.setReceiver(email);
mailMsg.setTenantId(tenantId);
mailMsg.setDynamicContentMap(msgReplaceMap);
mqBaseProducer.sendMessage(mailMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());
}
return true;
}
}


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxTopicServiceImpl.java Просмотреть файл

@@ -15,7 +15,6 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import com.iformall.common.ResultData;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
@@ -85,6 +84,8 @@ public class WxTopicServiceImpl implements WxTopicService {
couponTopic.setBusId(couponArray[1]);
couponTopic.setTenantId(record.getTenantId());
couponTopic.setTopicId(record.getId());
final IdWorker idWorker = IdWorker.get();
couponTopic.setId(idWorker.nextId());
wxCouponTopicMapper.insertSelective(couponTopic);
}
}


+ 10
- 4
mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml Просмотреть файл

@@ -16,15 +16,16 @@
<result column="bopen_id" jdbcType="VARCHAR" property="bopenId"/>
<result column="web_open_id" jdbcType="VARCHAR" property="webOpenId"/>
<result column="flow_permission" property="flowPermission"/>
<result column="email" property="email"/>
</resultMap>

<sql id="allSafeColumns">
`id`,`tenant_id`,`username`,`name`,`password`,`create_time`,`last_login_time`,`status`,`is_admin`,`nick_name`,`phone`,`flow_permission`,`web_open_id`
`id`,`tenant_id`,`username`,`name`,`password`,`create_time`,`last_login_time`,`status`,`is_admin`,`nick_name`,`phone`,`flow_permission`,`web_open_id`,email
</sql>

<sql id="allColumns">
`id`,`tenant_id`,`username`,`name`,`password`,`create_time`,`last_login_time`,`status`,`is_admin`,`nick_name`,`phone`,`flow_permission`,
`bopen_id`,`web_open_id`
`bopen_id`,`web_open_id`,email
</sql>

<sql id="dynamicWhereConditions">
@@ -80,6 +81,10 @@
<if test=" null != flowPermission ">
and JSON_CONTAINS(flow_permission->'$[*]', #{flowPermission}, '$')
</if>
<if test=" null != email ">
and `email` = #{email}
</if>


<if test=" null != ids ">
and id in
@@ -220,6 +225,7 @@
<result column="bopen_id" jdbcType="VARCHAR" property="bopenId"/>
<result column="web_open_id" jdbcType="VARCHAR" property="webOpenId"/>
<result column="flow_permission" property="flowPermission"/>
<result column="email" property="email"/>

<result column="mall_name" jdbcType="VARCHAR" property="mallName"/>
<result column="mall_group" jdbcType="VARCHAR" property="mallGroup"/>
@@ -229,13 +235,13 @@

<sql id="allSafeVColumns">
u.`id`,u.`tenant_id`,u.`username`,u.`name`,u.`password`,u.`create_time`,u.`last_login_time`,u.`status`,u.`is_admin`,u.`nick_name`,u.`phone`,u.`flow_permission`,
m.`name` as mall_name, m.`group` as mall_group, m.`img_url`, m.`img_url_h`
m.`name` as mall_name, m.`group` as mall_group, m.`img_url`, m.`img_url_h`,email
</sql>

<sql id="allVColumns">
u.`id`,u.`tenant_id`,u.`username`,u.`name`,u.`password`,u.`create_time`,u.`last_login_time`,u.`status`,u.`is_admin`,u.`nick_name`,u.`phone`,u.`flow_permission`,
u.`bopen_id`,u.`web_open_id`,
m.`name` as mall_name, m.`group` as mall_group, m.`img_url`, m.`img_url_h`
m.`name` as mall_name, m.`group` as mall_group, m.`img_url`, m.`img_url_h`,email
</sql>




+ 39
- 40
mallinkService/src/main/resources/mapper/WxBillAllMapper.xml Просмотреть файл

@@ -233,47 +233,46 @@
<select id="getWaitPayBill" resultType="hashmap">
select bill.tenant_id tenantId,bill.merchant_id merchantId,bill.receive_date receiveDate,
bill.need_pay needPay,m.link_phone linkPhone,app.appname from (
select bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0) need_pay from (
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where is_preview = 0
union
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit
union
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where is_preview = 0
union
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property_deposit
union
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1
union
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
) bill
where DATEDIFF(bill.receive_date,now())=3 and bill.status not in(3,5,6)
group by bill.tenant_id,bill.merchant_id,bill.receive_date) bill
left join wx_merchant m on bill.merchant_id=m.id
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id
where m.status=1
bill.need_pay needPay,m.link_phone linkPhone,app.appname,m.email,bill.bill_type billType from (
select bill.bill_type,bill.tenant_id,bill.merchant_id,bill.receive_date,ifnull(sum(need_pay),0) need_pay from (
select id,merchant_id,shop_id,tenant_id,'租金' name,1 bill_type_value,'租金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent where is_preview = 0
union
select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_rent_deposit
union
select id,merchant_id,shop_id,tenant_id,'物业费' name,3 bill_type_value,'物业费'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property where is_preview = 0
union
select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金'
bill_type,need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,''
endtime,rent_shop_type from wx_bill_property_deposit
union
select id,merchant_id,shop_id,tenant_id,'水费' name,5 bill_type_value,'水费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=1
union
select id,merchant_id,shop_id,tenant_id,'电费' name,6 bill_type_value,'电费' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_daily where type=2
union
select id,merchant_id,shop_id,tenant_id,name,7 bill_type_value,'其他' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other
union
select id,merchant_id,shop_id,tenant_id,name,8 bill_type_value,'其他押金' bill_type,0 as
need_pay,receive_pay,pay,owe,DATE_FORMAT(receive_date,'%Y-%m-%d') receive_date,pay_date,expired_day,status,'' starttime,'' endtime,rent_shop_type
from wx_bill_other_deposit
) bill
where DATEDIFF(bill.receive_date,now())=3 and bill.status not in(3,5,6)
group by bill.tenant_id,bill.merchant_id,bill.receive_date) bill
left join wx_merchant m on bill.merchant_id=m.id
left join (select tenant_id,`name` appname from wx_appinfo app where type=1) app on bill.tenant_id=app.tenant_id
where m.status=1
</select>


+ 7
- 3
mallinkService/src/main/resources/mapper/WxMerchantMapper.xml Просмотреть файл

@@ -18,12 +18,13 @@
<result column="brand" jdbcType="VARCHAR" property="brand"/>
<result column="type" jdbcType="SMALLINT" property="type"/>
<result column="is_public" jdbcType="SMALLINT" property="isPublic"/>
<result column="email" property="email"/>

</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`img_url`,`name`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`,
`business_id`,`shop_type`,`brand`,`type`,`is_public`
`business_id`,`shop_type`,`brand`,`type`,`is_public`,email
</sql>

<sql id="dynamicWhereConditions">
@@ -80,6 +81,9 @@
<if test=" null != isPublic ">
and `is_public` = #{isPublic}
</if>
<if test=" null != email ">
and `email` = #{email}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -100,7 +104,7 @@
m.id,
m.img_url,m.name,m.link_phone,m.status,m.business_id,
s.addr,s.shop_number,s.baidu_poi,
mb.building_name,mf.floor_name,m.is_public
mb.building_name,mf.floor_name,m.is_public,m.email
</sql>

<resultMap id="MerchantVoResultMap" type="com.iformall.domain.vo.WxMerchantVo">
@@ -116,7 +120,7 @@
<result column="floor_name" jdbcType="VARCHAR" property="floorName"/>
<result column="baidu_poi" jdbcType="VARCHAR" property="baiduPoi"/>
<result column="is_public" jdbcType="SMALLINT" property="isPublic"/>
<result column="email" property="email"/>
</resultMap>




+ 15
- 8
mallinkService/src/main/resources/mapper/WxShopMapper.xml Просмотреть файл

@@ -24,13 +24,13 @@
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="point_type" jdbcType="INTEGER" property="pointType"/>
<result column="comments" jdbcType="VARCHAR" property="comments"/>
<result column="email" property="email"/>
</resultMap>

<sql id="allColumns">
`id`,`tenant_id`,`shop_number`,`build_area`,`operation_area`,`building`,
`floor`,`status`,`x`,`y`,`addr`,`baidu_poi`,`longitude`,`latitude`,`create_date`,
`update_date`,`img_url`,`manager`,`manager_phone`,`type`,`point_type`,`comments`
`update_date`,`img_url`,`manager`,`manager_phone`,`type`,`point_type`,`comments`,email
</sql>

<sql id="dynamicWhereConditions">
@@ -129,7 +129,9 @@
<if test=" null != pointType ">
and `point_type` = #{pointType}
</if>
<if test=" null != email ">
and `email` = #{email}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -152,7 +154,7 @@
s.img_url imgUrl,s.operation_area operationArea,
s.status,b.building_name building,f.floor_name floor,m.`name` merchantName,m.id merchantId,
m.link_person linkPerson,m.link_phone linkPhone,s.manager,s.manager_phone managerPhone,
s.type,s.point_type pointType,s.addr
s.type,s.point_type pointType,s.addr,s.email
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id and ms.is_del=0
left join wx_merchant m on ms.merchant_id=m.id
left join wx_mall_building b on s.building=b.id
@@ -251,6 +253,9 @@
<if test=" null != pointType ">
and s.`point_type` = #{pointType}
</if>
<if test=" null != email ">
and s.`email`= #{email}
</if>
<if test=" null != ids ">
and s.id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">
@@ -266,7 +271,7 @@
s.img_url imgUrl,s.operation_area operationArea,
s.status,b.building_name building,f.floor_name floor,m.`name` merchantName,m.id merchantId,
m.link_person linkPerson,m.link_phone linkPhone,s.manager,s.manager_phone managerPhone,
s.type,s.point_type pointType,s.addr,
s.type,s.point_type pointType,s.addr,s.email,
brand.name brand,m.link_person,m.link_phone,bus.title
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id and ms.is_del=0
left join wx_merchant m on ms.merchant_id=m.id
@@ -364,7 +369,9 @@
<if test=" null != type ">
and s.`type` = #{type}
</if>

<if test=" null != email ">
and s.`email` = #{email}
</if>
<if test=" null != pointType ">
and s.`point_type` = #{pointType}
</if>
@@ -388,7 +395,7 @@
<select id="getMerchantShopByShopId" resultType="hashmap" parameterType="hashmap">
select m.`name` merchantName,s.build_area buildArea,s.operation_area operationArea,
c.price,c.receive_period receivePeriod,s.shop_number shopNumber,m.link_person linkPerson,
m.link_phone linkPhone
m.link_phone linkPhone,s.email
from wx_merchant_shop ms inner join wx_merchant m on ms.merchant_id=m.id
inner join wx_shop s on ms.shop_id=s.id
inner join wx_rent_contract c on ms.merchant_id=c.merchant_id
@@ -405,7 +412,7 @@
s.img_url imgUrl,s.operation_area operationArea,
s.status,b.building_name building,f.floor_name floor,m.`name` merchantName,m.id merchantId,
m.link_person linkPerson,m.link_phone linkPhone,s.manager,s.manager_phone managerPhone,
m.brand,m.business_id businessId,m.shop_type shopType
m.brand,m.business_id businessId,m.shop_type shopType,s.email
from wx_shop s left join wx_merchant_shop ms on ms.shop_id=s.id
left join wx_merchant m on ms.merchant_id=m.id
left join wx_mall_building b on s.building=b.id


Загрузка…
Отмена
Сохранить