修改权限,增加租户id
This commit is contained in:
parent
2cfb84e681
commit
423b53624c
@ -92,7 +92,7 @@ public class XhpcChargingPileServiceImpl implements IXhpcChargingPileService {
|
|||||||
Map<String, Object> landUser = xhpcChargingStationService.getLandUser(userId);
|
Map<String, Object> landUser = xhpcChargingStationService.getLandUser(userId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long operatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long operatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
list= xhpcChargingPileMapper.selectXhpcChargingPileList(name, type, serialNumber, chargingStationId,operatorId,1,tenantId);
|
list= xhpcChargingPileMapper.selectXhpcChargingPileList(name, type, serialNumber, chargingStationId,operatorId,1,tenantId);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -133,7 +133,7 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
Map<String, Object> landUser = xhpcChargingStationMapper.getLandUser(userId);
|
Map<String, Object> landUser = xhpcChargingStationMapper.getLandUser(userId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long operatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long operatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
list = xhpcChargingStationMapper.selectXhpcChargingStationList(name, operatorName,operatorId,1,tenantId);
|
list = xhpcChargingStationMapper.selectXhpcChargingStationList(name, operatorName,operatorId,1,tenantId);
|
||||||
|
|||||||
@ -33,6 +33,7 @@
|
|||||||
<result property="updateBy" column="update_by"/>
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="remark" column="remark"/>
|
<result property="remark" column="remark"/>
|
||||||
<result property="brandModel" column="brand_model"/>
|
<result property="brandModel" column="brand_model"/>
|
||||||
|
<result property="chargingStationName" column="charging_station_name"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="selectXhpcChargingPileVo">
|
<sql id="selectXhpcChargingPileVo">
|
||||||
select charging_pile_id,
|
select charging_pile_id,
|
||||||
@ -320,42 +321,44 @@
|
|||||||
|
|
||||||
<select id="selectXhpcChargingPileById" resultMap="BaseResultMap">
|
<select id="selectXhpcChargingPileById" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
charging_pile_id,
|
xcp.charging_pile_id,
|
||||||
charging_station_id,
|
xcp.charging_station_id,
|
||||||
name,
|
xcp.name,
|
||||||
national_standard,
|
xcp.national_standard,
|
||||||
power,
|
xcp.power,
|
||||||
auxiliary_power_supply,
|
xcp.auxiliary_power_supply,
|
||||||
input_voltage,
|
xcp.input_voltage,
|
||||||
max_voltage,
|
xcp.max_voltage,
|
||||||
min_voltage,
|
xcp.min_voltage,
|
||||||
max_electric_current,
|
xcp.max_electric_current,
|
||||||
min_electric_current,
|
xcp.min_electric_current,
|
||||||
serial_number,
|
xcp.serial_number,
|
||||||
type,
|
xcp.type,
|
||||||
program_version,
|
xcp.program_version,
|
||||||
network_link_type,
|
xcp.network_link_type,
|
||||||
gun_number,
|
xcp.gun_number,
|
||||||
communication_protocol_version,
|
xcp.communication_protocol_version,
|
||||||
communication_operator,
|
xcp.communication_operator,
|
||||||
sim_card,
|
xcp.sim_card,
|
||||||
rate_model_id,
|
xcp.rate_model_id,
|
||||||
status,
|
xcp.status,
|
||||||
del_flag,
|
xcp.del_flag,
|
||||||
create_time,
|
xcp.create_time,
|
||||||
create_by,
|
xcp.create_by,
|
||||||
update_time,
|
xcp.update_time,
|
||||||
update_by,
|
xcp.update_by,
|
||||||
remark,
|
xcp.remark,
|
||||||
rate_model_id,
|
xcp.rate_model_id,
|
||||||
brand_model,
|
xcp.brand_model,
|
||||||
production_date productionDate,
|
xcp.production_date productionDate,
|
||||||
manufacture_name manufactureName,
|
xcp.manufacture_name manufactureName,
|
||||||
connector_type connectorType,
|
xcp.connector_type connectorType,
|
||||||
current,
|
xcp.current,
|
||||||
equipment_type equipmentType
|
xcp.equipment_type equipmentType,
|
||||||
from xhpc_charging_pile
|
xcs.name as charging_station_name
|
||||||
where charging_pile_id = #{chargingPileId}
|
from xhpc_charging_pile xcp
|
||||||
|
left join xhpc_charging_station as xcs on xcs.charging_station_id = xcp.charging_station_id
|
||||||
|
where xcp.charging_pile_id = #{chargingPileId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updaeXhpcChargingPile" parameterType="Integer">
|
<update id="updaeXhpcChargingPile" parameterType="Integer">
|
||||||
|
|||||||
@ -20,5 +20,5 @@ public interface UserTypeService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping("/common/getUser")
|
@GetMapping("/common/getUser")
|
||||||
R getUser(@RequestParam(value = "phone")String phone,@RequestParam(value = "userId")Long userId,@RequestParam(value = "userType")Integer userType,@RequestParam(value = "serialNumber")String serialNumber);
|
R getUser(@RequestParam(value = "phone")String phone,@RequestParam(value = "userId")Long userId,@RequestParam(value = "userType")Integer userType,@RequestParam(value = "serialNumber")String serialNumber,@RequestParam(value = "tenantId")String tenantId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public class UserTypeFallbackFactory implements FallbackFactory<UserTypeService>
|
|||||||
logger.error("用户服务调用失败:{} //fallback", cause.getMessage());
|
logger.error("用户服务调用失败:{} //fallback", cause.getMessage());
|
||||||
return new UserTypeService() {
|
return new UserTypeService() {
|
||||||
@Override
|
@Override
|
||||||
public R getUser(String phone, Long userId, Integer userType,String serialNumber) {
|
public R getUser(String phone, Long userId, Integer userType,String serialNumber,String tenantId) {
|
||||||
return R.fail("用户信息获取失败:" + cause.getMessage());
|
return R.fail("用户信息获取失败:" + cause.getMessage());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public class XhpcSmsController extends BaseController {
|
|||||||
* 注册获取手机号验证码
|
* 注册获取手机号验证码
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getLogonPhoneCode")
|
@GetMapping(value = "/getLogonPhoneCode")
|
||||||
public AjaxResult getLogonPhoneCode(@RequestParam("phone") String phone) {
|
public AjaxResult getLogonPhoneCode(@RequestParam("phone") String phone,@RequestParam("tenantId")String tenantId) {
|
||||||
|
|
||||||
String signatureName = null;
|
String signatureName = null;
|
||||||
String templateId = null;
|
String templateId = null;
|
||||||
@ -42,7 +42,7 @@ public class XhpcSmsController extends BaseController {
|
|||||||
//C端用户
|
//C端用户
|
||||||
return xhpcSmsService.getLogonPhoneCode(phone, signatureName, templateId,null);
|
return xhpcSmsService.getLogonPhoneCode(phone, signatureName, templateId,null);
|
||||||
}else if (UserTypeUtil.COMMUNIT.equals(phone.substring(0,2)) || UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
}else if (UserTypeUtil.COMMUNIT.equals(phone.substring(0,2)) || UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
||||||
R user = userTypeService.getUser(phone, null, null, null);
|
R user = userTypeService.getUser(phone, null, null, null,tenantId);
|
||||||
if(user !=null && user.getData() !=null){
|
if(user !=null && user.getData() !=null){
|
||||||
Map<String, Object> map = (Map<String, Object>)user.getData();
|
Map<String, Object> map = (Map<String, Object>)user.getData();
|
||||||
return xhpcSmsService.getLogonPhoneCode(map.get("phone").toString(), signatureName, templateId,map.get("account").toString());
|
return xhpcSmsService.getLogonPhoneCode(map.get("phone").toString(), signatureName, templateId,map.get("account").toString());
|
||||||
|
|||||||
@ -98,7 +98,7 @@ public class XhpcChargeOrderServiceImpl implements IXhpcChargeOrderService {
|
|||||||
Integer userType = loginUser.getUserType();
|
Integer userType = loginUser.getUserType();
|
||||||
Long userid = loginUser.getUserid();
|
Long userid = loginUser.getUserid();
|
||||||
String openId = loginUser.getOpenId();
|
String openId = loginUser.getOpenId();
|
||||||
R user = userTypeService.getUser(null, userid, userType, terminalSerialNumber);
|
R user = userTypeService.getUser(null, userid, userType, terminalSerialNumber,loginUser.getTenantId());
|
||||||
if(userId !=userid || user ==null || user.getData() ==null){
|
if(userId !=userid || user ==null || user.getData() ==null){
|
||||||
return AjaxResult.error(UserTypeUtil.LOGIN_TYPE, "请重新登录");
|
return AjaxResult.error(UserTypeUtil.LOGIN_TYPE, "请重新登录");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,7 +113,7 @@ public class XhpcHistoryOrderServiceImpl implements IXhpcHistoryOrderService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderMapper.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderMapper.getLandUser(logUserId);
|
||||||
if (landUser != null) {
|
if (landUser != null) {
|
||||||
if (landUser.get("userType") != null) {
|
if (landUser.get("userType") != null) {
|
||||||
if ("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())) {
|
if ("01".equals(landUser.get("userType").toString())) {
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
list = xhpcHistoryOrderMapper.getListPage(phone, transactionNumber, 1, chargingStationName, operatorId, source, beginStartTime, beginEndTime, logOperatorId, type, number,affiliationOrganization,evcsOrderNo,plateNum,internetId,internetSerialNumber,terminalName,vinCode,overStartTime,overEndTime,personnelId);
|
list = xhpcHistoryOrderMapper.getListPage(phone, transactionNumber, 1, chargingStationName, operatorId, source, beginStartTime, beginEndTime, logOperatorId, type, number,affiliationOrganization,evcsOrderNo,plateNum,internetId,internetSerialNumber,terminalName,vinCode,overStartTime,overEndTime,personnelId);
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public class XhpcRealTimeOrderServiceImpl implements IXhpcRealTimeOrderService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
list = xhpcRealTimeOrderMapper.list(phone,transactionNumber,source,chargingStationName,terminalName,operatorId,startTime,endTime,number,status,logOperatorId,1,affiliationOrganization,plateNum,internetId,internetSerialNumber);
|
list = xhpcRealTimeOrderMapper.list(phone,transactionNumber,source,chargingStationName,terminalName,operatorId,startTime,endTime,number,status,logOperatorId,1,affiliationOrganization,plateNum,internetId,internetSerialNumber);
|
||||||
|
|||||||
@ -172,7 +172,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
list = xhpcStatisticsServiceMapper.getDateIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 1,logOperatorId);
|
list = xhpcStatisticsServiceMapper.getDateIntervalPage(chargingStationId, internetUserId, operatorId, startTime, endTime, 1,logOperatorId);
|
||||||
@ -287,7 +287,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
list = xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, 1,logOperatorId);
|
list = xhpcStatisticsServiceMapper.getTerminalIntervalPage(chargingStationId, terminalId, operatorId, startTime, endTime, 1,logOperatorId);
|
||||||
@ -314,7 +314,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getChargingStationList(operatorId, logOperatorId, 1));
|
return AjaxResult.success(xhpcStatisticsServiceMapper.getChargingStationList(operatorId, logOperatorId, 1));
|
||||||
@ -338,7 +338,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getOperatorList(operatorId, logOperatorId, 1));
|
return AjaxResult.success(xhpcStatisticsServiceMapper.getOperatorList(operatorId, logOperatorId, 1));
|
||||||
@ -368,7 +368,7 @@ public class XhpcStatisticsServiceImpl implements IXhpcStatisticsService {
|
|||||||
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
Map<String, Object> landUser = xhpcHistoryOrderService.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
//运营商看自己的场站
|
//运营商看自己的场站
|
||||||
return AjaxResult.success(xhpcStatisticsServiceMapper.getTerminalList(chargingStationId, logOperatorId, 1));
|
return AjaxResult.success(xhpcStatisticsServiceMapper.getTerminalList(chargingStationId, logOperatorId, 1));
|
||||||
|
|||||||
@ -87,6 +87,10 @@
|
|||||||
<artifactId>shiro-core</artifactId>
|
<artifactId>shiro-core</artifactId>
|
||||||
<version>1.4.2</version>
|
<version>1.4.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common-log</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,8 @@ import com.xhpc.common.core.utils.sign.Base64;
|
|||||||
import com.xhpc.common.core.web.controller.BaseController;
|
import com.xhpc.common.core.web.controller.BaseController;
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||||
|
import com.xhpc.common.log.annotation.Log;
|
||||||
|
import com.xhpc.common.log.enums.BusinessType;
|
||||||
import com.xhpc.user.service.IXhpcAppUserUserService;
|
import com.xhpc.user.service.IXhpcAppUserUserService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
import org.bouncycastle.jce.provider.BouncyCastleProvider;
|
||||||
@ -70,15 +72,16 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
//@PreAuthorize(hasPermi = "app:user:page")
|
//@PreAuthorize(hasPermi = "app:user:page")
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
public TableDataInfo page(String phone) {
|
public TableDataInfo page(HttpServletRequest request,String phone) {
|
||||||
startPage();
|
startPage();
|
||||||
List<Map<String, Object>> list = iXhpcAppUserUserService.selectAppUserList(phone);
|
List<Map<String, Object>> list = iXhpcAppUserUserService.selectAppUserList(request,phone);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 禁用/启用C端用户
|
* 禁用/启用C端用户
|
||||||
*/
|
*/
|
||||||
|
@Log(title = "C端用户--(禁用/启用)", businessType = BusinessType.UPDATE)
|
||||||
@ApiOperation("禁用/启用C端用户")
|
@ApiOperation("禁用/启用C端用户")
|
||||||
//@PreAuthorize(hasPermi = "app:user:status")
|
//@PreAuthorize(hasPermi = "app:user:status")
|
||||||
@PostMapping("/status")
|
@PostMapping("/status")
|
||||||
@ -110,6 +113,7 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
/**
|
/**
|
||||||
* C端用户注册
|
* C端用户注册
|
||||||
*/
|
*/
|
||||||
|
@Log(title = "C端用户--注册", businessType = BusinessType.INSERT)
|
||||||
@ApiOperation("注册")
|
@ApiOperation("注册")
|
||||||
@PostMapping("/register")
|
@PostMapping("/register")
|
||||||
public R<?> register(@RequestBody Map<String, Object> map) {
|
public R<?> register(@RequestBody Map<String, Object> map) {
|
||||||
@ -304,16 +308,4 @@ public class XhpcAppUserController extends BaseController {
|
|||||||
return R.fail(HttpStatus.ERROR_STATUS, "修改失败");
|
return R.fail(HttpStatus.ERROR_STATUS, "修改失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
try {
|
|
||||||
|
|
||||||
}catch (Exception e){
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,16 +3,12 @@ package com.xhpc.user.controller;
|
|||||||
import com.xhpc.common.core.web.controller.BaseController;
|
import com.xhpc.common.core.web.controller.BaseController;
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.common.util.UserTypeUtil;
|
import com.xhpc.common.util.UserTypeUtil;
|
||||||
import com.xhpc.user.dto.MechanismDto;
|
|
||||||
import com.xhpc.user.service.IXhpcCommonService;
|
import com.xhpc.user.service.IXhpcCommonService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公共的内
|
* 公共的内
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
@ -34,21 +30,21 @@ public class XhpcCommonController extends BaseController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@GetMapping(value = "/getUser")
|
@GetMapping(value = "/getUser")
|
||||||
public AjaxResult getMechanism(String phone,Long userId,Integer userType,String serialNumber) {
|
public AjaxResult getMechanism(String phone,Long userId,Integer userType,String serialNumber,String tenantId) {
|
||||||
|
|
||||||
if(phone !=null || "".equals(phone)){
|
if(phone !=null || "".equals(phone)){
|
||||||
if(!UserTypeUtil.COMMUNIT.equals(phone.substring(0,2)) && !UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
if(!UserTypeUtil.COMMUNIT.equals(phone.substring(0,2)) && !UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
||||||
//C端用户
|
//C端用户
|
||||||
return AjaxResult.success(xhpcCommonService.getLandUser(phone,null,0,serialNumber));
|
return AjaxResult.success(xhpcCommonService.getLandUser(phone,null,0,serialNumber,tenantId));
|
||||||
}else if (UserTypeUtil.COMMUNIT.equals(phone.substring(0,2))){
|
}else if (UserTypeUtil.COMMUNIT.equals(phone.substring(0,2))){
|
||||||
//社区用户
|
//社区用户
|
||||||
return AjaxResult.success(xhpcCommonService.getLandUser(phone,null,2,serialNumber));
|
return AjaxResult.success(xhpcCommonService.getLandUser(phone,null,2,serialNumber,tenantId));
|
||||||
}else if (UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
}else if (UserTypeUtil.CUSTOMERS.equals(phone.substring(0,2))){
|
||||||
//大客户用户
|
//大客户用户
|
||||||
return AjaxResult.success(xhpcCommonService.getLandUser(phone,null,3,serialNumber));
|
return AjaxResult.success(xhpcCommonService.getLandUser(phone,null,3,serialNumber,tenantId));
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
return AjaxResult.success(xhpcCommonService.getLandUser(null,userId,userType,serialNumber));
|
return AjaxResult.success(xhpcCommonService.getLandUser(null,userId,userType,serialNumber,tenantId));
|
||||||
}
|
}
|
||||||
return AjaxResult.error();
|
return AjaxResult.error();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,8 @@ package com.xhpc.user.controller;
|
|||||||
import com.xhpc.common.core.web.controller.BaseController;
|
import com.xhpc.common.core.web.controller.BaseController;
|
||||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||||
|
import com.xhpc.common.log.annotation.Log;
|
||||||
|
import com.xhpc.common.log.enums.BusinessType;
|
||||||
import com.xhpc.user.domain.XhpcCommunity;
|
import com.xhpc.user.domain.XhpcCommunity;
|
||||||
import com.xhpc.user.domain.XhpcCommunityPersonnel;
|
import com.xhpc.user.domain.XhpcCommunityPersonnel;
|
||||||
import com.xhpc.user.service.IXhpcCommunityService;
|
import com.xhpc.user.service.IXhpcCommunityService;
|
||||||
@ -38,6 +40,7 @@ public class XhpcCommunityController extends BaseController {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@Log(title = "社区", businessType = BusinessType.INSERT)
|
||||||
@PostMapping(value = "/addCommunity")
|
@PostMapping(value = "/addCommunity")
|
||||||
public AjaxResult addCommunity(@RequestBody XhpcCommunity xhpcCommunity) {
|
public AjaxResult addCommunity(@RequestBody XhpcCommunity xhpcCommunity) {
|
||||||
return xhpcCommunityService.addCommunity(xhpcCommunity);
|
return xhpcCommunityService.addCommunity(xhpcCommunity);
|
||||||
|
|||||||
@ -68,7 +68,7 @@ public class XhpcCommunity extends BaseEntity {
|
|||||||
* 数据维度 0 地区 1.运营商 2. 运营商地区
|
* 数据维度 0 地区 1.运营商 2. 运营商地区
|
||||||
*/
|
*/
|
||||||
@NotEmpty(message = "数据维度不能为空")
|
@NotEmpty(message = "数据维度不能为空")
|
||||||
private Integer dimension;
|
private String dimension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否有不参与合作的场站 (0 没有 1有)
|
* 是否有不参与合作的场站 (0 没有 1有)
|
||||||
|
|||||||
@ -67,7 +67,7 @@ public class XhpcCustomers extends BaseEntity {
|
|||||||
* 数据维度 0 地区 1.运营商 2. 运营商地区
|
* 数据维度 0 地区 1.运营商 2. 运营商地区
|
||||||
*/
|
*/
|
||||||
@NotEmpty(message = "数据维度不能为空")
|
@NotEmpty(message = "数据维度不能为空")
|
||||||
private Integer dimension;
|
private String dimension;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否有不参与合作的场站 (0 没有 1有)
|
* 是否有不参与合作的场站 (0 没有 1有)
|
||||||
|
|||||||
@ -61,7 +61,7 @@ public interface MechanismMapper {
|
|||||||
/**
|
/**
|
||||||
* 添加数据维度
|
* 添加数据维度
|
||||||
*/
|
*/
|
||||||
int addMechanism(@Param("chargingStationIds") List<String> chargingStationIds,@Param("mechanismId")Long mechanismId,@Param("source")Integer source);
|
int insertMechanism(@Param("chargingStationIds") List<String> chargingStationIds,@Param("mechanismId")Long mechanismId,@Param("source")Integer source);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 增加一条平台充值记录
|
* 增加一条平台充值记录
|
||||||
|
|||||||
@ -52,7 +52,7 @@ public interface XhpcAppUserMapper {
|
|||||||
* @param phone 手机号
|
* @param phone 手机号
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> selectAppUserList(@Param("phone") String phone);
|
public List<Map<String, Object>> selectAppUserList(@Param("phone") String phone,@Param("tenantId") String tenantId);
|
||||||
|
|
||||||
|
|
||||||
public Map<String, Object> userSum(@Param("phone")String phone,@Param("time")String time);
|
public Map<String, Object> userSum(@Param("phone")String phone,@Param("time")String time);
|
||||||
@ -80,7 +80,7 @@ public interface XhpcAppUserMapper {
|
|||||||
/**
|
/**
|
||||||
* 记录登录用户的最后一次数据
|
* 记录登录用户的最后一次数据
|
||||||
*/
|
*/
|
||||||
int addUserLoginTime(@Param("appUserId")Long appUserId, @Param("account")String account, @Param("userType")Integer userType, @Param("openId")String openId,@Param("type")Integer type,@Param("status")Integer status);
|
int addUserLoginTime(@Param("appUserId")Long appUserId, @Param("account")String account, @Param("userType")Integer userType, @Param("openId")String openId,@Param("type")Integer type,@Param("status")Integer status,@Param("tenantId")String tenantId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改社区用户信息
|
* 修改社区用户信息
|
||||||
|
|||||||
@ -14,15 +14,15 @@ public interface XhpcCommonMapper {
|
|||||||
/**
|
/**
|
||||||
* C端用户信息
|
* C端用户信息
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getAppUser(@Param("phone") String phone,@Param("userId")Long userId);
|
Map<String, Object> getAppUser(@Param("phone") String phone,@Param("userId")Long userId,@Param("tenantId") String tenantId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 社区端用户信息
|
* 社区端用户信息
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getCommunityUser(@Param("phone") String phone,@Param("userId")Long userId,@Param("serialNumber")String serialNumber);
|
Map<String, Object> getCommunityUser(@Param("phone") String phone,@Param("userId")Long userId,@Param("serialNumber")String serialNumber,@Param("tenantId") String tenantId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* B端用户信息
|
* B端用户信息
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getCustomersUser(@Param("phone") String phone,@Param("userId")Long userId,@Param("serialNumber")String serialNumber);
|
Map<String, Object> getCustomersUser(@Param("phone") String phone,@Param("userId")Long userId,@Param("serialNumber")String serialNumber,@Param("tenantId") String tenantId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public interface IXhpcAppUserUserService {
|
|||||||
* @param phone 手机号
|
* @param phone 手机号
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public List<Map<String, Object>> selectAppUserList(String phone);
|
public List<Map<String, Object>> selectAppUserList(HttpServletRequest request,String phone);
|
||||||
|
|
||||||
|
|
||||||
public Map<String, Object> userSum(String phone);
|
public Map<String, Object> userSum(String phone);
|
||||||
|
|||||||
@ -11,5 +11,5 @@ public interface IXhpcCommonService {
|
|||||||
/**
|
/**
|
||||||
* 根据用户手机号获取用户信息
|
* 根据用户手机号获取用户信息
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getLandUser(String phone,Long userId,Integer type,String serialNumber);
|
Map<String, Object> getLandUser(String phone,Long userId,Integer type,String serialNumber,String tenantId);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class IMechanismServiceImpl implements IMechanismService {
|
|||||||
Map<String, Object> landUser = mechanismMapper.getLandUser(logUserId);
|
Map<String, Object> landUser = mechanismMapper.getLandUser(logUserId);
|
||||||
if(landUser !=null){
|
if(landUser !=null){
|
||||||
if(landUser.get("userType") !=null){
|
if(landUser.get("userType") !=null){
|
||||||
if("01".equals(landUser.get("userType").toString()) || "03".equals(landUser.get("userType").toString())){
|
if("01".equals(landUser.get("userType").toString())){
|
||||||
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
Long logOperatorId = Long.valueOf(landUser.get("operatorId").toString());
|
||||||
logUserId=logOperatorId;
|
logUserId=logOperatorId;
|
||||||
type =1;
|
type =1;
|
||||||
@ -65,7 +65,7 @@ public class IMechanismServiceImpl implements IMechanismService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int addMechanism(List<String> chargingStationIds, Long mechanismId, Integer source) {
|
public int addMechanism(List<String> chargingStationIds, Long mechanismId, Integer source) {
|
||||||
return mechanismMapper.addMechanism(chargingStationIds, mechanismId, source);
|
return mechanismMapper.insertMechanism(chargingStationIds, mechanismId, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -86,8 +86,10 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> selectAppUserList(String phone) {
|
public List<Map<String, Object>> selectAppUserList(HttpServletRequest request,String phone) {
|
||||||
return xhpcAppUserMapper.selectAppUserList(phone);
|
LoginUser logUser = logUserUtils.getLogUser(request);
|
||||||
|
|
||||||
|
return xhpcAppUserMapper.selectAppUserList(phone,logUser.getTenantId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -166,6 +168,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
String password = phone.substring(phone.length() - 6);
|
String password = phone.substring(phone.length() - 6);
|
||||||
xhpcAppUser.setPassword(SecurityUtils.encryptPassword(password));
|
xhpcAppUser.setPassword(SecurityUtils.encryptPassword(password));
|
||||||
xhpcAppUser.setCreateTime(new Date());
|
xhpcAppUser.setCreateTime(new Date());
|
||||||
|
xhpcAppUser.setTenantId(tenantId);
|
||||||
xhpcAppUserMapper.insert(xhpcAppUser);
|
xhpcAppUserMapper.insert(xhpcAppUser);
|
||||||
redisService.deleteObject("pvToken:"+phone);
|
redisService.deleteObject("pvToken:"+phone);
|
||||||
return appLogin(phone, type, openid, tenantId);
|
return appLogin(phone, type, openid, tenantId);
|
||||||
@ -221,7 +224,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
//判断账号
|
//判断账号
|
||||||
String sub = username.substring(0, 2);
|
String sub = username.substring(0, 2);
|
||||||
if (UserTypeUtil.COMMUNIT.equals(sub) || UserTypeUtil.CUSTOMERS.equals(sub)){
|
if (UserTypeUtil.COMMUNIT.equals(sub) || UserTypeUtil.CUSTOMERS.equals(sub)){
|
||||||
R user = userTypeService.getUser(username, null, null, null);
|
R user = userTypeService.getUser(username, null, null, null,tenantId);
|
||||||
if(user !=null && user.getData() !=null){
|
if(user !=null && user.getData() !=null){
|
||||||
Map<String, Object> map = (Map<String, Object>)user.getData();
|
Map<String, Object> map = (Map<String, Object>)user.getData();
|
||||||
LoginUser userInfo = new LoginUser();
|
LoginUser userInfo = new LoginUser();
|
||||||
@ -252,7 +255,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//添加最后一次登录数据
|
//添加最后一次登录数据
|
||||||
xhpcAppUserMapper.addUserLoginTime(appUserId,username,userInfo.getUserType(),openid,Integer.valueOf(type),null);
|
xhpcAppUserMapper.addUserLoginTime(appUserId,username,userInfo.getUserType(),openid,Integer.valueOf(type),null,tenantId);
|
||||||
|
|
||||||
redisService.deleteObject("pvToken:" + username);
|
redisService.deleteObject("pvToken:" + username);
|
||||||
// 获取登录token
|
// 获取登录token
|
||||||
@ -315,7 +318,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
redisService.deleteObject("pvToken:" + user.getPhone());
|
redisService.deleteObject("pvToken:" + user.getPhone());
|
||||||
|
|
||||||
//添加最后一次登录数据
|
//添加最后一次登录数据
|
||||||
xhpcAppUserMapper.addUserLoginTime(user.getAppUserId(),username,userInfo.getUserType(),openid,Integer.valueOf(type),UserConstants.LOGIN);
|
xhpcAppUserMapper.addUserLoginTime(user.getAppUserId(),username,userInfo.getUserType(),openid,Integer.valueOf(type),UserConstants.LOGIN,tenantId);
|
||||||
// 获取登录token
|
// 获取登录token
|
||||||
return R.ok(tokenService.createToken(userInfo));
|
return R.ok(tokenService.createToken(userInfo));
|
||||||
}
|
}
|
||||||
@ -335,7 +338,8 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
Integer userType = loginUser.getUserType();
|
Integer userType = loginUser.getUserType();
|
||||||
Long userid = loginUser.getUserid();
|
Long userid = loginUser.getUserid();
|
||||||
String openId = loginUser.getOpenId();
|
String openId = loginUser.getOpenId();
|
||||||
R user = userTypeService.getUser(null, userid, userType, null);
|
String tenantId = loginUser.getTenantId();
|
||||||
|
R user = userTypeService.getUser(null, userid, userType, null,tenantId);
|
||||||
if(user !=null && user.getData() !=null){
|
if(user !=null && user.getData() !=null){
|
||||||
if(UserTypeUtil.USER_TYPE==userType){
|
if(UserTypeUtil.USER_TYPE==userType){
|
||||||
XhpcAppUser appUser = xhpcAppUserMapper.getAppUserByPhone(username);
|
XhpcAppUser appUser = xhpcAppUserMapper.getAppUserByPhone(username);
|
||||||
@ -347,7 +351,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
}
|
}
|
||||||
xhpcAppUserMapper.update(appUser);
|
xhpcAppUserMapper.update(appUser);
|
||||||
//添加最后一次登录数据
|
//添加最后一次登录数据
|
||||||
xhpcAppUserMapper.addUserLoginTime(appUser.getAppUserId(),username,userType,openId,Integer.valueOf(type),UserConstants.NO_LOGIN);
|
xhpcAppUserMapper.addUserLoginTime(appUser.getAppUserId(),username,userType,openId,Integer.valueOf(type),UserConstants.NO_LOGIN,tenantId);
|
||||||
}
|
}
|
||||||
}else if(UserTypeUtil.COMMUNIT_TYPE==userType){
|
}else if(UserTypeUtil.COMMUNIT_TYPE==userType){
|
||||||
if (StatusConstants.OPERATION_WX_TYPE.equals(type)) {
|
if (StatusConstants.OPERATION_WX_TYPE.equals(type)) {
|
||||||
@ -356,7 +360,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
xhpcAppUserMapper.updateCommunityPersonnel(userid,null,null,null,UserConstants.NO_LOGIN);
|
xhpcAppUserMapper.updateCommunityPersonnel(userid,null,null,null,UserConstants.NO_LOGIN);
|
||||||
}
|
}
|
||||||
//添加最后一次登录数据
|
//添加最后一次登录数据
|
||||||
xhpcAppUserMapper.addUserLoginTime(userid,username,userType,openId,Integer.valueOf(type),UserConstants.NO_LOGIN);
|
xhpcAppUserMapper.addUserLoginTime(userid,username,userType,openId,Integer.valueOf(type),UserConstants.NO_LOGIN,tenantId);
|
||||||
}else if(UserTypeUtil.CUSTOMERS_TYPE==userType){
|
}else if(UserTypeUtil.CUSTOMERS_TYPE==userType){
|
||||||
if (StatusConstants.OPERATION_WX_TYPE.equals(type)) {
|
if (StatusConstants.OPERATION_WX_TYPE.equals(type)) {
|
||||||
xhpcAppUserMapper.updateCustomersPersonnel(userid,null,null,UserConstants.NO_LOGIN,null);
|
xhpcAppUserMapper.updateCustomersPersonnel(userid,null,null,UserConstants.NO_LOGIN,null);
|
||||||
@ -364,7 +368,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
xhpcAppUserMapper.updateCustomersPersonnel(userid,null,null,null,UserConstants.NO_LOGIN);
|
xhpcAppUserMapper.updateCustomersPersonnel(userid,null,null,null,UserConstants.NO_LOGIN);
|
||||||
}
|
}
|
||||||
//添加最后一次登录数据
|
//添加最后一次登录数据
|
||||||
xhpcAppUserMapper.addUserLoginTime(userid,username,userType,openId,Integer.valueOf(type),UserConstants.NO_LOGIN);
|
xhpcAppUserMapper.addUserLoginTime(userid,username,userType,openId,Integer.valueOf(type),UserConstants.NO_LOGIN,tenantId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 删除用户缓存记录
|
// 删除用户缓存记录
|
||||||
@ -407,7 +411,7 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
//根据不同的用户类型查询不同的信息
|
//根据不同的用户类型查询不同的信息
|
||||||
Long userid = loginUser.getUserid();
|
Long userid = loginUser.getUserid();
|
||||||
Integer userType = loginUser.getUserType();
|
Integer userType = loginUser.getUserType();
|
||||||
R user = userTypeService.getUser(null, loginUser.getUserid(), loginUser.getUserType(), null);
|
R user = userTypeService.getUser(null, loginUser.getUserid(), loginUser.getUserType(), null,loginUser.getTenantId());
|
||||||
if(user !=null && user.getData() !=null){
|
if(user !=null && user.getData() !=null){
|
||||||
Map<String, Object> map = (Map<String, Object>)user.getData();
|
Map<String, Object> map = (Map<String, Object>)user.getData();
|
||||||
//发票、留言板、版本、客服电话
|
//发票、留言板、版本、客服电话
|
||||||
|
|||||||
@ -20,13 +20,13 @@ public class XhpcCommonServiceImpl implements IXhpcCommonService {
|
|||||||
private XhpcCommonMapper xhpcCommonMapper;
|
private XhpcCommonMapper xhpcCommonMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getLandUser(String phone,Long userId, Integer type,String serialNumber) {
|
public Map<String, Object> getLandUser(String phone,Long userId, Integer type,String serialNumber,String tenantId) {
|
||||||
if(type==0){
|
if(type==0){
|
||||||
return xhpcCommonMapper.getAppUser(phone,userId);
|
return xhpcCommonMapper.getAppUser(phone,userId,tenantId);
|
||||||
}else if(type==2){
|
}else if(type==2){
|
||||||
return xhpcCommonMapper.getCommunityUser(phone,userId,serialNumber);
|
return xhpcCommonMapper.getCommunityUser(phone,userId,serialNumber,tenantId);
|
||||||
}else if(type==3){
|
}else if(type==3){
|
||||||
return xhpcCommonMapper.getCustomersUser(phone,userId,serialNumber);
|
return xhpcCommonMapper.getCustomersUser(phone,userId,serialNumber,tenantId);
|
||||||
}
|
}
|
||||||
return new HashMap<>();
|
return new HashMap<>();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -132,7 +132,7 @@
|
|||||||
<update id="updateMechanism">
|
<update id="updateMechanism">
|
||||||
update xhpc_mechanism set del_flag =1 where mechanism_id=#{mechanismId} and source=#{source }
|
update xhpc_mechanism set del_flag =1 where mechanism_id=#{mechanismId} and source=#{source }
|
||||||
</update>
|
</update>
|
||||||
<insert id="addMechanism">
|
<insert id="insertMechanism">
|
||||||
insert into xhpc_mechanism (charging_station_id,mechanism_id,source) VALUES
|
insert into xhpc_mechanism (charging_station_id,mechanism_id,source) VALUES
|
||||||
<foreach collection="chargingStationIds" item="item" open="(" separator="),(" close=")">
|
<foreach collection="chargingStationIds" item="item" open="(" separator="),(" close=")">
|
||||||
#{item},#{mechanismId},#{source}
|
#{item},#{mechanismId},#{source}
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
<if test="null != avatar and '' != avatar">
|
<if test="null != avatar and '' != avatar">
|
||||||
avatar,
|
avatar,
|
||||||
</if>
|
</if>
|
||||||
<if test="null != tenantId ">
|
<if test="null != tenantId and tenantId !=''">
|
||||||
tenant_id,
|
tenant_id,
|
||||||
</if>
|
</if>
|
||||||
<if test="null != balance and '' != balance">
|
<if test="null != balance and '' != balance">
|
||||||
@ -181,7 +181,7 @@
|
|||||||
weixin_login weixinlogin,alipay_login alipayLogin,is_refund_application isRefundApplication,
|
weixin_login weixinlogin,alipay_login alipayLogin,is_refund_application isRefundApplication,
|
||||||
alipay_open_id alipayOpenId, avatar, balance, password,
|
alipay_open_id alipayOpenId, avatar, balance, password,
|
||||||
`status`,create_by createBy ,create_time createTime,
|
`status`,create_by createBy ,create_time createTime,
|
||||||
update_time updateTime, update_by updateBy,
|
update_time updateTime, update_by updateBy,tenant_id tenantId,
|
||||||
del_flag delflag, remark,soc,
|
del_flag delflag, remark,soc,
|
||||||
CASE WHEN `status` = 0 THEN '正常' else '禁用' end statusName
|
CASE WHEN `status` = 0 THEN '正常' else '禁用' end statusName
|
||||||
from xhpc_app_user
|
from xhpc_app_user
|
||||||
@ -200,6 +200,9 @@
|
|||||||
<if test="phone != null and phone != ''">
|
<if test="phone != null and phone != ''">
|
||||||
and xau.phone like concat('%', #{phone}, '%')
|
and xau.phone like concat('%', #{phone}, '%')
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
and xau.tenant_id=#{tenantId}
|
||||||
|
</if>
|
||||||
ORDER BY xau.create_time DESC
|
ORDER BY xau.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -259,6 +262,9 @@
|
|||||||
<if test="null != status">
|
<if test="null != status">
|
||||||
status,
|
status,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
tenant_id
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="null != appUserId">
|
<if test="null != appUserId">
|
||||||
@ -279,6 +285,9 @@
|
|||||||
<if test="null != status">
|
<if test="null != status">
|
||||||
#{status},
|
#{status},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
#{tenantId},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,9 @@
|
|||||||
<if test="userId !=null">
|
<if test="userId !=null">
|
||||||
and app_user_id =#{userId}
|
and app_user_id =#{userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
and tenant_id =#{tenantId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCommunityUser" resultType="map">
|
<select id="getCommunityUser" resultType="map">
|
||||||
@ -64,6 +67,9 @@
|
|||||||
<if test="userId !=null">
|
<if test="userId !=null">
|
||||||
and community_personnel_id =#{userId}
|
and community_personnel_id =#{userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
and tenant_id =#{tenantId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getCustomersUser" resultType="map">
|
<select id="getCustomersUser" resultType="map">
|
||||||
@ -96,5 +102,8 @@
|
|||||||
<if test="userId !=null">
|
<if test="userId !=null">
|
||||||
and customers_personnel_id =#{userId}
|
and customers_personnel_id =#{userId}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="tenantId !=null and tenantId !=''">
|
||||||
|
and tenant_id =#{tenantId}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user