运营商停用同步停用所有旗下门店

This commit is contained in:
19173159168
2025-07-31 23:09:01 +08:00
parent f43a88ca59
commit 3a62761a40
10 changed files with 39 additions and 20 deletions

View File

@ -202,15 +202,6 @@ public class CompanyController extends BaseController
@ResponseBody
public AjaxResult changeStatus(Company company)
{
int flag = 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);
return toAjax(companyService.changeStatus(company));
}
}

View File

@ -58,4 +58,6 @@ public interface CompanyStoreMapper
* @return 结果
*/
public int deleteCompanyStoreByIds(String[] ids);
public int updateStatusByCompany(CompanyStore companyStore);
}

View File

@ -61,4 +61,6 @@ public interface ICompanyStoreService
public int changeStatus(CompanyStore companyStore);
public int changeStatusByCompany(CompanyStore companyStore);
}

View File

@ -7,6 +7,8 @@ import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.utils.DateUtils;
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 org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -26,7 +28,10 @@ public class CompanyServiceImpl implements ICompanyService
{
@Autowired
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)
{
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;
}
}

View File

@ -111,4 +111,8 @@ public class CompanyStoreServiceImpl implements ICompanyStoreService
companyStore.setUpdateTime(DateUtils.getNowDate());
return companyStoreMapper.updateCompanyStore(companyStore);
}
@Override
public int changeStatusByCompany(CompanyStore companyStore){
return companyStoreMapper.updateStatusByCompany(companyStore);
}
}

View File

@ -284,7 +284,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where id = #{id}
</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 from zc_company_store where id = #{id}
</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

View File

@ -10,7 +10,7 @@
<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>
</head>
<body class="lockscreen">
<body class="lockscreen signin">
<div class="lockscreen-wrapper">
<div style="font-size: 30px;font-weight: bold;padding: 20px;text-align: center;color: #3c8dbc">闪充智行</div>
<div class="lockscreen-time"></div>
@ -71,8 +71,8 @@
setInterval(function() {
$('.lockscreen-time').text((new Date()).format('hh:mm:ss'));
}, 500);
init();
animate();
//init();
//animate();
});
$(document).keydown(function(event) {

View File

@ -142,10 +142,7 @@
return $.table.selectDictLabel(rentalTypeDatas, value);
}
},
{
field: 'rentalDays',
title: '租赁天数'
},
{
field: 'rentalPrice',
title: '租车价格(元)'