小程序活动显示修改
This commit is contained in:
parent
7f17f879a4
commit
dda61f71b5
@ -18,11 +18,12 @@
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="applet_activity_name" jdbcType="VARCHAR" property="appletActivityName" />
|
||||
</resultMap>
|
||||
<sql id="Base_Column_List">
|
||||
activity_template_id, template_name, discount_type, discount_rate, start_time, end_time,
|
||||
discount_count, mini_display, background_url, `status`, del_flag, tenant_id, create_by,
|
||||
create_time, update_by, update_time
|
||||
create_time, update_by, update_time,applet_activity_name
|
||||
</sql>
|
||||
|
||||
|
||||
|
||||
@ -765,8 +765,6 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
//检查是否有用户登录
|
||||
LoginUser loginUser = tokenService.getLoginUser();
|
||||
|
||||
|
||||
|
||||
List<String> stringList = new ArrayList<>();
|
||||
if (serviceFacilities != null && serviceFacilities != "") {
|
||||
String[] split = serviceFacilities.split(",");
|
||||
@ -780,7 +778,6 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
|
||||
BigDecimal serviceFee =new BigDecimal(map.get("serviceFee").toString());
|
||||
BigDecimal powerFee =new BigDecimal(map.get("powerFee").toString());
|
||||
|
||||
if(loginUser !=null){
|
||||
//判断是否享受活动
|
||||
Map<String, Object> objectMap = activityDiscountTime(loginUser.getUserid(), new Date(), loginUser.getUserType(), Long.valueOf(map.get("chargingStationId").toString()), loginUser.getTenantId());
|
||||
@ -804,9 +801,12 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
}else{
|
||||
map.put("appletActivityName", "");
|
||||
}
|
||||
map.put("activityState", 1);
|
||||
}else{
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
}else{
|
||||
logger.info("==========loginUser========是空");
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
//桩(空闲和使用从redis获取)
|
||||
Map<String, Object> map1 =new HashMap<>();
|
||||
@ -881,7 +881,17 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}
|
||||
if(objectMap.get("appletActivityName") !=null && !"".equals(objectMap.get("appletActivityName").toString())){
|
||||
map.put("appletActivityName", objectMap.get("appletActivityName").toString());
|
||||
}else{
|
||||
map.put("appletActivityName", "");
|
||||
}
|
||||
map.put("activityState", 1);
|
||||
}else{
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
}else{
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
map.putAll(xhpcRateTime);
|
||||
}
|
||||
@ -914,7 +924,12 @@ public class XhpcChargingStationServiceImpl extends BaseService implements IXhpc
|
||||
map.put("activityPowerFee", powerFee);
|
||||
map.put("activityMoney", serviceFee.add(powerFee));
|
||||
}
|
||||
map.put("activityState", 1);
|
||||
}else{
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
}else{
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
|
||||
@ -157,7 +157,10 @@ public class XhpcTerminalServiceImpl extends BaseService implements IXhpcTermina
|
||||
}else{
|
||||
map.put("appletActivityName", "");
|
||||
}
|
||||
map.put("activityState", 1);
|
||||
}
|
||||
}else{
|
||||
map.put("activityState", 0);
|
||||
}
|
||||
map.putAll(xhpcRateTime);
|
||||
}
|
||||
|
||||
@ -297,50 +297,18 @@
|
||||
cs.service_facilities as serviceFacilities,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag =0 and
|
||||
charging_station_id=cs.charging_station_id) as common,
|
||||
(select GROUP_CONCAT(serial_number) from xhpc_terminal where status=0 and del_flag =0 and
|
||||
charging_station_id=cs.charging_station_id) as serialNumbers,
|
||||
(select (ra.service_fee) as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.status = 0
|
||||
and ra.del_flag = 0
|
||||
and ra.rate_id = (
|
||||
select rate_id from xhpc_rate_time
|
||||
where charging_station_id = cs.charging_station_id
|
||||
and cs.rate_model_id = rate_model_id
|
||||
and start_time <= #{date}
|
||||
and replace(end_time, '00:00:00', '24:00:00') >= #{date}
|
||||
and status = 0
|
||||
and del_flag = 0)) serviceFee,
|
||||
(select (ra.power_fee) as powerFee
|
||||
from xhpc_rate as ra
|
||||
where ra.status = 0
|
||||
and ra.del_flag = 0
|
||||
and ra.rate_id = (
|
||||
select rate_id from xhpc_rate_time
|
||||
where charging_station_id = cs.charging_station_id
|
||||
and cs.rate_model_id = rate_model_id
|
||||
and start_time <= #{date}
|
||||
and replace(end_time, '00:00:00', '24:00:00') >= #{date}
|
||||
and status = 0
|
||||
and del_flag = 0)) powerFee,
|
||||
(select (ra.power_fee+ra.service_fee) as serviceFee
|
||||
from xhpc_rate as ra
|
||||
where ra.status = 0
|
||||
and ra.del_flag = 0
|
||||
and ra.rate_id = (
|
||||
select rate_id from xhpc_rate_time
|
||||
where charging_station_id = cs.charging_station_id
|
||||
and cs.rate_model_id = rate_model_id
|
||||
and start_time <= #{date}
|
||||
and replace(end_time, '00:00:00', '24:00:00') >= #{date}
|
||||
and status = 0
|
||||
and del_flag = 0)) money,
|
||||
ra.service_fee as serviceFee,
|
||||
ra.power_fee as powerFee,
|
||||
(ra.power_fee+ra.service_fee) as money,
|
||||
(select GROUP_CONCAT(dict_value) from xhpc_dict_biz where FIND_IN_SET(dict_key,cs.service_facilities ) and code
|
||||
= 'service_facilities' and parent_id > 0 and del_flag = 0) as serviceFacilitiesName,
|
||||
ROUND(ACOS(SIN((#{latitude} * 3.141593) / 180 ) *SIN((cs.latitude * 3.141593) / 180 ) +
|
||||
COS((#{latitude} * 3.141593) / 180 ) * COS((cs.latitude * 3.141593) / 180 ) *
|
||||
COS((#{longitude} * 3.141593) / 180 - (cs.longitude * 3.141593) / 180 ) ) * 6370.9968,2)AS distance
|
||||
from xhpc_charging_station as cs
|
||||
left JOIN xhpc_rate_time as xrt on xrt.charging_station_id =cs.charging_station_id and cs.rate_model_id = xrt.rate_model_id and xrt.start_time <= #{date} and replace(xrt.end_time, '00:00:00', '24:00:00') >= #{date} and xrt.status = 0 and xrt.del_flag = 0
|
||||
LEFT JOIN xhpc_rate as ra on ra.rate_id =xrt.rate_id
|
||||
|
||||
where cs.del_flag =0 and cs.status =0
|
||||
and FIND_IN_SET(#{clientVisible},cs.client_visible)>0
|
||||
<if test="name !=null and name !=''">
|
||||
@ -379,7 +347,6 @@
|
||||
and del_flag = 0
|
||||
and status = 0 limit 1) as type,
|
||||
(select count(terminal_id) from xhpc_terminal where status=0 and del_flag =0 and charging_station_id=#{chargingStationId}) as common,
|
||||
(select GROUP_CONCAT(serial_number) from xhpc_terminal where status=0 and del_flag =0 and charging_station_id=charging_station_id) as serialNumbers,
|
||||
(select GROUP_CONCAT(dict_value) from xhpc_dict_biz where FIND_IN_SET(dict_key,service_facilities ) and code= 'service_facilities' and parent_id > 0 and del_flag = 0) as serviceFacilitiesName,
|
||||
name as name,
|
||||
reminder_instructions as reminderInstructions,
|
||||
|
||||
@ -219,7 +219,7 @@ public class XhpcAppUserServiceImpl extends BaseService implements IXhpcAppUserU
|
||||
}
|
||||
String captcha = redisService.getCacheObject("pvToken:" + phone);
|
||||
if(null ==captcha || "".equals(captcha)){
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误!");
|
||||
}
|
||||
if (!code.equalsIgnoreCase(captcha)) {
|
||||
return R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user