|
|
@@ -9,9 +9,11 @@ import com.alibaba.excel.context.AnalysisContext;
|
|
|
import com.alibaba.excel.event.AnalysisEventListener;
|
|
|
import com.alibaba.excel.support.ExcelTypeEnum;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
+import com.cyksj.common.annotation.Log;
|
|
|
import com.cyksj.common.annotation.NoSubmit;
|
|
|
import com.cyksj.common.exception.BusinessRuntimeException;
|
|
|
import com.cyksj.dto.Result;
|
|
|
+import com.cyksj.enums.BusinessType;
|
|
|
import com.cyksj.enums.GatewayResponse;
|
|
|
import com.cyksj.mapper.GroupsMapper;
|
|
|
import com.cyksj.mapper.HomeGroupMapper;
|
|
|
@@ -106,6 +108,7 @@ public class CmsAccountController {
|
|
|
*/
|
|
|
@GetMapping("/export/account")
|
|
|
@SaCheckPermission("account:export")
|
|
|
+ @Log(module = "平台管理/导出账号", businessType = BusinessType.EXPORT, isSaveRequestData = true)
|
|
|
public void exportAccount(Long userId, String nickName, String submitAccount, String expiryStartTime, String expiryEndTime, HttpServletResponse response) {
|
|
|
MapBuilder mapBuilder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
if (StrUtil.isNotEmpty(expiryStartTime) || StrUtil.isNotEmpty(expiryEndTime)) {
|
|
|
@@ -183,6 +186,7 @@ public class CmsAccountController {
|
|
|
@NoSubmit
|
|
|
@Transactional(rollbackFor = Throwable.class)
|
|
|
@SaCheckPermission("account:add")
|
|
|
+ @Log(module = "平台管理/新增账号", businessType = BusinessType.POST, isSaveRequestData = true)
|
|
|
public Result<String> add(@RequestBody Account account){
|
|
|
account.setAccount(account.getAccount().trim());
|
|
|
account.setPassword(account.getPassword().trim());
|
|
|
@@ -206,6 +210,7 @@ public class CmsAccountController {
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@SaCheckPermission("account:update")
|
|
|
+ @Log(module = "平台管理/编辑账号", businessType = BusinessType.PUT, isSaveRequestData = true)
|
|
|
public Result<String> update(@RequestBody Account account){
|
|
|
if (StrUtil.isNotBlank(account.getAccount())){
|
|
|
account.setAccount(account.getAccount().trim());
|
|
|
@@ -221,6 +226,7 @@ public class CmsAccountController {
|
|
|
* 修改密码并发送模板消息
|
|
|
*/
|
|
|
@PutMapping("/update/pwd")
|
|
|
+ @Log(module = "平台管理/批量修改密码", businessType = BusinessType.PUT, isSaveRequestData = true)
|
|
|
public Result<String> updatePwdAndSendMsg(@RequestBody List<Account> accounts) throws Exception {
|
|
|
accounts.forEach(account -> {
|
|
|
Account db = accountService.getById(account.getId());
|
|
|
@@ -265,7 +271,8 @@ public class CmsAccountController {
|
|
|
|
|
|
@DeleteMapping("/delete/{id}")
|
|
|
@SaCheckPermission("account:delete")
|
|
|
- public Result<String> update(@PathVariable Long id){
|
|
|
+ @Log(module = "平台管理/删除账号", businessType = BusinessType.DELETE, isSaveRequestData = true)
|
|
|
+ public Result<String> update(@PathVariable Long id){
|
|
|
//是否关联了车队
|
|
|
Integer count = groupsMapper.selectCount(Wrappers.lambdaQuery(GroupsTrips.class).eq(GroupsTrips::getAccountId, id));
|
|
|
if (count > 0) {
|