运营商停用同步停用所有旗下门店
This commit is contained in:
@ -202,15 +202,6 @@ public class CompanyController extends BaseController
|
|||||||
@ResponseBody
|
@ResponseBody
|
||||||
public AjaxResult changeStatus(Company company)
|
public AjaxResult changeStatus(Company company)
|
||||||
{
|
{
|
||||||
int flag = companyService.changeStatus(company);
|
return toAjax(companyService.changeStatus(company));
|
||||||
if(flag >0) {
|
|
||||||
// 运营商启用停用,同时启用停用用户信息
|
|
||||||
SysUser user = userService.selectUserByPhoneNumber(company.getPhone());
|
|
||||||
if(user != null) {
|
|
||||||
user.setStatus(company.getStatus());
|
|
||||||
userService.changeStatus(user);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return toAjax(flag);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,4 +58,6 @@ public interface CompanyStoreMapper
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteCompanyStoreByIds(String[] ids);
|
public int deleteCompanyStoreByIds(String[] ids);
|
||||||
|
|
||||||
|
public int updateStatusByCompany(CompanyStore companyStore);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -61,4 +61,6 @@ public interface ICompanyStoreService
|
|||||||
|
|
||||||
public int changeStatus(CompanyStore companyStore);
|
public int changeStatus(CompanyStore companyStore);
|
||||||
|
|
||||||
|
public int changeStatusByCompany(CompanyStore companyStore);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,8 @@ import com.ruoyi.common.constant.UserConstants;
|
|||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.common.utils.StringUtils;
|
||||||
|
import com.ruoyi.operation.domain.CompanyStore;
|
||||||
|
import com.ruoyi.operation.service.ICompanyStoreService;
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@ -26,7 +28,10 @@ public class CompanyServiceImpl implements ICompanyService
|
|||||||
{
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private CompanyMapper companyMapper;
|
private CompanyMapper companyMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService userService;
|
||||||
|
@Autowired
|
||||||
|
private ICompanyStoreService companyStoreService;
|
||||||
/**
|
/**
|
||||||
* 查询运营商
|
* 查询运营商
|
||||||
*
|
*
|
||||||
@ -127,6 +132,21 @@ public class CompanyServiceImpl implements ICompanyService
|
|||||||
public int changeStatus(Company company)
|
public int changeStatus(Company company)
|
||||||
{
|
{
|
||||||
company.setUpdateTime(DateUtils.getNowDate());
|
company.setUpdateTime(DateUtils.getNowDate());
|
||||||
return companyMapper.updateCompany(company);
|
int flag = companyMapper.updateCompany(company);
|
||||||
|
if(flag >0) {
|
||||||
|
// 运营商启用停用,同时启用停用用户信息
|
||||||
|
SysUser user = userService.selectUserByPhoneNumber(company.getPhone());
|
||||||
|
if(user != null) {
|
||||||
|
user.setStatus(company.getStatus());
|
||||||
|
userService.changeStatus(user);
|
||||||
|
}
|
||||||
|
// 运营商启用停用,同时启用停用旗下门店
|
||||||
|
CompanyStore companyStore = new CompanyStore();
|
||||||
|
companyStore.setStatus(company.getStatus());
|
||||||
|
companyStore.setOperatingCompanyId(company.getId());
|
||||||
|
companyStoreService.changeStatusByCompany(companyStore);
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -111,4 +111,8 @@ public class CompanyStoreServiceImpl implements ICompanyStoreService
|
|||||||
companyStore.setUpdateTime(DateUtils.getNowDate());
|
companyStore.setUpdateTime(DateUtils.getNowDate());
|
||||||
return companyStoreMapper.updateCompanyStore(companyStore);
|
return companyStoreMapper.updateCompanyStore(companyStore);
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public int changeStatusByCompany(CompanyStore companyStore){
|
||||||
|
return companyStoreMapper.updateStatusByCompany(companyStore);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -284,7 +284,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
<update id="updateStatusByCompany" parameterType="CompanyStore">
|
||||||
|
update zc_company_store SET status = #{status}
|
||||||
|
where operating_company_id = #{operatingCompanyId}
|
||||||
|
</update>
|
||||||
<delete id="deleteCompanyStoreById" parameterType="Long">
|
<delete id="deleteCompanyStoreById" parameterType="Long">
|
||||||
delete from zc_company_store where id = #{id}
|
delete from zc_company_store where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 100 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 8.4 KiB |
@ -10,7 +10,7 @@
|
|||||||
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
<link href="../static/css/font-awesome.min.css" th:href="@{/css/font-awesome.min.css}" rel="stylesheet"/>
|
||||||
<style>.lockscreen{background:#d2d6de;height:auto;}.lockscreen .lockscreen-name{text-align:center;font-weight:600;margin-top:50px;margin-bottom:30px;}.lockscreen-wrapper{max-width:400px;margin:10% auto;z-index:800;position:relative;}.lockscreen .lockscreen-name{text-align:center;font-weight:600;margin-top:50px;margin-bottom:30px;}.lockscreen-item{border-radius:4px;padding:0;background:#fff;position:relative;margin:10px auto 30px auto;width:290px}.lockscreen-image{border-radius:50%;position:absolute;left:-10px;top:-25px;background:#fff;padding:5px;z-index:10}.lockscreen-image>img{border-radius:50%;width:70px;height:70px}.lockscreen-credentials{margin-left:70px}.lockscreen-credentials .form-control{border:0}.lockscreen-credentials .btn{background-color:#fff;border:0;padding:0 10px}.lockscreen-footer{margin-top:150px}.lockscreen-time{width:100%;color:#fff;font-size:60px;display:inline-block;text-align:center;font-family:'Open Sans',sans-serif;font-weight:300;}</style>
|
<style>.lockscreen{background:#d2d6de;height:auto;}.lockscreen .lockscreen-name{text-align:center;font-weight:600;margin-top:50px;margin-bottom:30px;}.lockscreen-wrapper{max-width:400px;margin:10% auto;z-index:800;position:relative;}.lockscreen .lockscreen-name{text-align:center;font-weight:600;margin-top:50px;margin-bottom:30px;}.lockscreen-item{border-radius:4px;padding:0;background:#fff;position:relative;margin:10px auto 30px auto;width:290px}.lockscreen-image{border-radius:50%;position:absolute;left:-10px;top:-25px;background:#fff;padding:5px;z-index:10}.lockscreen-image>img{border-radius:50%;width:70px;height:70px}.lockscreen-credentials{margin-left:70px}.lockscreen-credentials .form-control{border:0}.lockscreen-credentials .btn{background-color:#fff;border:0;padding:0 10px}.lockscreen-footer{margin-top:150px}.lockscreen-time{width:100%;color:#fff;font-size:60px;display:inline-block;text-align:center;font-family:'Open Sans',sans-serif;font-weight:300;}</style>
|
||||||
</head>
|
</head>
|
||||||
<body class="lockscreen">
|
<body class="lockscreen signin">
|
||||||
<div class="lockscreen-wrapper">
|
<div class="lockscreen-wrapper">
|
||||||
<div style="font-size: 30px;font-weight: bold;padding: 20px;text-align: center;color: #3c8dbc">闪充智行</div>
|
<div style="font-size: 30px;font-weight: bold;padding: 20px;text-align: center;color: #3c8dbc">闪充智行</div>
|
||||||
<div class="lockscreen-time"></div>
|
<div class="lockscreen-time"></div>
|
||||||
@ -71,8 +71,8 @@
|
|||||||
setInterval(function() {
|
setInterval(function() {
|
||||||
$('.lockscreen-time').text((new Date()).format('hh:mm:ss'));
|
$('.lockscreen-time').text((new Date()).format('hh:mm:ss'));
|
||||||
}, 500);
|
}, 500);
|
||||||
init();
|
//init();
|
||||||
animate();
|
//animate();
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).keydown(function(event) {
|
$(document).keydown(function(event) {
|
||||||
|
|||||||
@ -142,10 +142,7 @@
|
|||||||
return $.table.selectDictLabel(rentalTypeDatas, value);
|
return $.table.selectDictLabel(rentalTypeDatas, value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'rentalDays',
|
|
||||||
title: '租赁天数'
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
field: 'rentalPrice',
|
field: 'rentalPrice',
|
||||||
title: '租车价格(元)'
|
title: '租车价格(元)'
|
||||||
|
|||||||
Reference in New Issue
Block a user