fix
This commit is contained in:
@@ -6,7 +6,6 @@ import com.starry.admin.modules.balance.service.IPlayBalanceDetailsInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -28,7 +27,6 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayBalanceDetailsQueryVo vo) {
|
||||
return R.ok(playBalanceDetailsInfoService.selectByPage(vo));
|
||||
@@ -37,7 +35,6 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 获取余额明细详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playBalanceDetailsInfoService.selectPlayBalanceDetailsInfoById(id));
|
||||
@@ -47,7 +44,7 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 修改余额明细
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('balance:details:update')")
|
||||
@Log(title = "余额明细", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayBalanceDetailsInfoEntity playBalanceDetailsInfo) {
|
||||
@@ -62,7 +59,7 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 删除余额明细
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('balance:details:delete')")
|
||||
@Log(title = "余额明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -35,7 +34,6 @@ public class PlayClerkArticleInfoController {
|
||||
/**
|
||||
* 查询店员动态信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:article:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkArticleQueryVo vo) {
|
||||
IPage<PlayClerkArticleReturnVo> list = playClerkArticleInfoService.selectByPage(vo);
|
||||
@@ -46,7 +44,7 @@ public class PlayClerkArticleInfoController {
|
||||
/**
|
||||
* 修改店员动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:article:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:article:update')")
|
||||
@Log(title = "店员动态信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@RequestBody PlayClerkArticleReviewStateEditVo vo) {
|
||||
@@ -61,7 +59,7 @@ public class PlayClerkArticleInfoController {
|
||||
/**
|
||||
* 删除店员动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
|
||||
@Log(title = "店员动态信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.starry.admin.modules.clerk.service.IPlayClerkDataReviewInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -31,7 +30,6 @@ public class PlayClerkDataReviewInfoController {
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:dataReview:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkDataReviewQueryVo vo) {
|
||||
IPage<PlayClerkDataReviewReturnVo> list = playClerkDataReviewInfoService.selectByPage(vo);
|
||||
@@ -41,7 +39,7 @@ public class PlayClerkDataReviewInfoController {
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkDataReviewStateEditVo vo) {
|
||||
@@ -52,7 +50,7 @@ public class PlayClerkDataReviewInfoController {
|
||||
/**
|
||||
* 删除店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.starry.admin.modules.clerk.service.IPlayClerkRankingInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -29,7 +28,6 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 查询店员排行列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody IPlayClerkRankingInfoQueryVo vo) {
|
||||
IPage<IPlayClerkRankingInfoReturnVo> list = playClerkRankingInfoService.selectByPage(vo);
|
||||
@@ -39,7 +37,6 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 获取店员排行详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkRankingInfoService.selectPlayClerkRankingInfoById(id));
|
||||
@@ -48,7 +45,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 新增店员排行
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
|
||||
@Log(title = "店员排行", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
@@ -62,7 +59,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 修改店员排行
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
|
||||
@Log(title = "店员排行", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
@@ -77,7 +74,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 删除店员排行
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
|
||||
@Log(title = "店员排行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -18,7 +18,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -48,7 +47,6 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:list')")
|
||||
@PostMapping("listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayClerkUserQueryVo vo) {
|
||||
IPage<PlayClerkUserReturnVo> list = playClerkUserInfoService.selectByPage(vo);
|
||||
@@ -66,7 +64,6 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:list')")
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserInfoResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
@@ -76,7 +73,6 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 获取店员详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playClerkUserInfoService.selectById(id));
|
||||
@@ -123,7 +119,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 修改店员
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkUserEditVo vo) {
|
||||
@@ -139,7 +135,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 修改店员状态
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateState")
|
||||
public R updateState(@Validated @RequestBody PlayClerkUserStateEditVo vo) {
|
||||
@@ -154,7 +150,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 删除店员
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:user:delete')")
|
||||
@Log(title = "店员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.starry.admin.modules.clerk.service.IPlayClerkUserReviewInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -29,7 +28,6 @@ public class PlayClerkUserReviewInfoController {
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:userReview:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayClerkUserReviewQueryVo vo) {
|
||||
IPage<PlayClerkUserReviewReturnVo> list = playClerkUserReviewInfoService.selectByPage(vo);
|
||||
@@ -39,7 +37,7 @@ public class PlayClerkUserReviewInfoController {
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkUserReviewStateEditVo vo) {
|
||||
@@ -50,7 +48,7 @@ public class PlayClerkUserReviewInfoController {
|
||||
/**
|
||||
* 删除店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.weichat.entity.wages.ClerkWagesDetailsReturnVo;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -44,7 +43,6 @@ public class PlayClerkWagesInfoController {
|
||||
/**
|
||||
* 查询店员工资结算信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:wages:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkWagesInfoQueryVo vo) {
|
||||
return R.ok(playClerkWagesInfoService.selectHistoricalByPage(vo));
|
||||
@@ -53,7 +51,6 @@ public class PlayClerkWagesInfoController {
|
||||
/**
|
||||
* 查询店员工未结算工资
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:wages:list')")
|
||||
@PostMapping("/listUnsettledWagesByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkUnsettledWagesInfoQueryVo vo) {
|
||||
IPage<PlayClerkUnsettledWagesInfoReturnVo> page = playClerkUserInfoService.listUnsettledWagesByPage(vo);
|
||||
@@ -93,7 +90,6 @@ public class PlayClerkWagesInfoController {
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:wages:list')")
|
||||
@GetMapping("queryWagesDetailsById")
|
||||
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
|
||||
if (StrUtil.isBlankIfStr(id)) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.starry.admin.modules.custom.service.IPlayCustomLeaveMsgService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -29,7 +28,6 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 分页查询顾客留言列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayCustomLeaveMsgQueryVo vo) {
|
||||
IPage<PlayCustomLeaveMsgReturnVo> list = playCustomLeaveMsgService.selectByPage(vo);
|
||||
@@ -39,7 +37,6 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 获取顾客留言详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomLeaveMsgService.selectPlayCustomLeaveMsgById(id));
|
||||
@@ -48,7 +45,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:leave:add')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
@@ -62,7 +59,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:leave:update')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
@@ -77,7 +74,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 删除顾客留言
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:leave:delete')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -31,7 +30,6 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 查询顾客等级列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:list')")
|
||||
@PostMapping("/listAll")
|
||||
public R listAll() {
|
||||
List<PlayCustomLevelInfoEntity> list = playCustomLevelInfoService.selectPlayCustomLevelInfoByPage();
|
||||
@@ -41,7 +39,6 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 获取顾客等级详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomLevelInfoService.selectPlayCustomLevelInfoById(id));
|
||||
@@ -51,7 +48,7 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 新增顾客等级
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:level:add')")
|
||||
@Log(title = "店员等级", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomLevelAddVo vo) {
|
||||
@@ -69,7 +66,7 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 修改顾客等级
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('custom:level:update')")
|
||||
@Log(title = "顾客等级", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@RequestBody PlayCustomLevelEditVo vo) {
|
||||
|
||||
@@ -8,7 +8,6 @@ import com.starry.admin.modules.order.service.IPlayOrderComplaintInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -29,7 +28,6 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 查询订单投诉信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayOrderComplaintQueryVo vo) {
|
||||
IPage<PlayOrderComplaintReturnVo> list = playOrderComplaintInfoService.selectByPage(vo);
|
||||
@@ -39,7 +37,6 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 获取订单投诉信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playOrderComplaintInfoService.selectPlayOrderComplaintInfoById(id));
|
||||
@@ -48,7 +45,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 新增订单投诉信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:complaint:add')")
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayOrderComplaintInfoEntity playOrderComplaintInfo) {
|
||||
@@ -62,7 +59,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 修改订单投诉信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:complaint:update')")
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayOrderComplaintInfoEntity playOrderComplaintInfo) {
|
||||
@@ -77,7 +74,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 删除订单投诉信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:complaint:delete')")
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.starry.admin.modules.order.module.vo.PlayOrderContinueReturnVo;
|
||||
import com.starry.admin.modules.order.module.vo.PlayOrderReviewStateEditVo;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderContinueInfoService;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -30,7 +29,6 @@ public class PlayOrderContinueInfoController {
|
||||
/**
|
||||
* 查询订单续单信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:continue:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayOrderContinueQueryVo vo) {
|
||||
IPage<PlayOrderContinueReturnVo> list = playOrderContinueInfoService.selectPlayByPage(vo);
|
||||
@@ -40,7 +38,7 @@ public class PlayOrderContinueInfoController {
|
||||
/**
|
||||
* 审批续单申申请
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:continue:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:continue:update')")
|
||||
@PostMapping("/updateReviewState")
|
||||
public R updateReviewState(@Validated @RequestBody PlayOrderReviewStateEditVo vo) {
|
||||
playOrderContinueInfoService.updateReviewState(vo);
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -31,7 +30,6 @@ public class PlayOrderEvaluateInfoController {
|
||||
/**
|
||||
* 查询订单评价信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:evaluate:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayOrderEvaluateQueryVo vo) {
|
||||
IPage<PlayOrderEvaluateReturnVo> list = playOrderEvaluateInfoService.selectByPage(vo);
|
||||
@@ -43,7 +41,7 @@ public class PlayOrderEvaluateInfoController {
|
||||
/**
|
||||
* 修改订单评价信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:evaluate:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:evaluate:update')")
|
||||
@Log(title = "修改订单评价状态", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateStatus")
|
||||
public R update(@Validated @RequestBody PlayOrderEvaluateEditStateVo vo) {
|
||||
@@ -58,7 +56,7 @@ public class PlayOrderEvaluateInfoController {
|
||||
/**
|
||||
* 删除订单评价信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:evaluate:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:evaluate:delete')")
|
||||
@Log(title = "订单评价信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.context.CustomSecurityContextHolder;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -37,7 +36,6 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 分页查询订单列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayOrderInfoQueryVo vo) {
|
||||
return R.ok(orderInfoService.selectOrderInfoPage(vo));
|
||||
@@ -47,7 +45,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderRefund")
|
||||
public R orderRefund(@Validated @RequestBody PlayOrderRefundAddVo vo) {
|
||||
PlayOrderInfoEntity orderInfo = orderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
@@ -68,7 +66,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 跟换店员
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderEditAcceptBy")
|
||||
public R orderEditAcceptBy(@Validated @RequestBody PlayOrderEditAcceptByVo vo) {
|
||||
orderInfoService.updateStateTo1("2", CustomSecurityContextHolder.getUserId(), vo.getAcceptBy(), vo.getOrderId());
|
||||
@@ -79,7 +77,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 后台备注
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderEditBackendRemark")
|
||||
public R orderEditBackendRemark(@Validated @RequestBody PlayOrderEditBackendRemarkByVo vo) {
|
||||
PlayOrderInfoEntity orderInfo = orderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
@@ -93,7 +91,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 重新抢单
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderEditRandomSingle")
|
||||
public R orderEditRandomSingle(@Validated @RequestBody PlayOrderEditRandomSingleVo vo) {
|
||||
PlayOrderInfoEntity orderInfo = orderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
@@ -121,7 +119,6 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 根据ID查询订单
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(orderInfoService.selectById(id));
|
||||
@@ -131,7 +128,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 根据ID修改订单信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@Log(title = "修改普通订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayOrderInfoEntity orderInfoEntity) {
|
||||
@@ -147,7 +144,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:order:delete')")
|
||||
@Log(title = "删除订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -7,7 +7,6 @@ import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -33,7 +32,7 @@ public class PlayOrderRewardInfoController {
|
||||
private IPlayOrderInfoService orderInfoService;
|
||||
|
||||
|
||||
@PreAuthorize("@customSs.hasPermission('order:reward:list')")
|
||||
//@PreAuthorize("@customSs.hasPermission('order:reward:list')")
|
||||
@Log(title = "查询打赏订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/listByPage")
|
||||
public R queryRewardOrder(@Validated @RequestBody PlayOrderRewardQueryVo vo) {
|
||||
|
||||
@@ -44,7 +44,7 @@ public class SysTenantController {
|
||||
/**
|
||||
* 新增租户表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('platform:tenant:create')")
|
||||
//@PreAuthorize("@customSs.hasPermission('platform:tenant:create')")
|
||||
@Log(title = "租户表", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody SysTenantAddVo vo) {
|
||||
|
||||
@@ -16,7 +16,10 @@ import com.starry.admin.modules.platform.mapper.SysTenantMapper;
|
||||
import com.starry.admin.modules.platform.mapper.SysTenantPackageMapper;
|
||||
import com.starry.admin.modules.platform.service.ISysTenantService;
|
||||
import com.starry.admin.modules.platform.vo.SysTenantQueryVo;
|
||||
import com.starry.admin.modules.system.entity.*;
|
||||
import com.starry.admin.modules.system.entity.SysRoleEntity;
|
||||
import com.starry.admin.modules.system.entity.SysRoleMenuEntity;
|
||||
import com.starry.admin.modules.system.entity.SysUserEntity;
|
||||
import com.starry.admin.modules.system.entity.SysUserRoleEntity;
|
||||
import com.starry.admin.modules.system.mapper.*;
|
||||
import com.starry.admin.modules.system.service.SysRoleMenuService;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
@@ -198,117 +201,14 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
// 创建租户
|
||||
sysTenantEntity.setCreatedTime(new Date());
|
||||
sysTenantMapper.insert(sysTenantEntity);
|
||||
// 创建默认部门--部门默认名称以租户名称
|
||||
//Long deptId = createDept(sysTenantEntity);
|
||||
// 创建默认角色--角色默认为租户名称+管理员
|
||||
//Long roleId = createRole(sysTenantEntity);
|
||||
// 创建默认账号
|
||||
createUser(sysTenantEntity);
|
||||
// 创建域名
|
||||
this.createDomainAndDns(sysTenantEntity.getTenantKey());
|
||||
// 新增客服和组长
|
||||
this.initRole(sysTenantEntity);
|
||||
//initOtherRule(sysTenantEntity, "waiter", "客服");
|
||||
//initOtherRule(sysTenantEntity, "leader", "组长");
|
||||
//initOtherRule(sysTenantEntity, "operator", "管理员");
|
||||
return R.ok("租户创建成功!");
|
||||
}
|
||||
|
||||
private void initRole(SysTenantEntity sysTenantEntity) {
|
||||
|
||||
SysRoleEntity waiter = new SysRoleEntity();
|
||||
waiter.setRoleName("客服");
|
||||
waiter.setRoleKey("waiter");
|
||||
waiter.setDataScope("1");
|
||||
waiter.setMenuCheckStrictly(true);
|
||||
waiter.setDeptCheckStrictly(true);
|
||||
waiter.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(waiter);
|
||||
|
||||
SysRoleEntity leader = new SysRoleEntity();
|
||||
leader.setRoleName("组长");
|
||||
leader.setRoleKey("leader");
|
||||
leader.setDataScope("3");
|
||||
leader.setMenuCheckStrictly(true);
|
||||
leader.setDeptCheckStrictly(true);
|
||||
leader.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(leader);
|
||||
|
||||
SysRoleEntity operator = new SysRoleEntity();
|
||||
operator.setRoleName("管理员");
|
||||
operator.setRoleKey("operator");
|
||||
operator.setDataScope("1");
|
||||
operator.setMenuCheckStrictly(true);
|
||||
operator.setDeptCheckStrictly(true);
|
||||
operator.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(operator);
|
||||
|
||||
|
||||
//List<SysMenuEntity> menuList = menuMapper.selectMenuList(new SysMenuEntity());
|
||||
SysTenantPackageEntity sysTenantPackage = tenantPackageMapper.selectById(sysTenantEntity.getPackageId());
|
||||
List<String> subMeuns = Arrays.asList(sysTenantPackage.getMenuIds().split(","));
|
||||
if (CollectionUtil.isNotEmpty(subMeuns)) {
|
||||
List<SysRoleMenuEntity> roleMenuEntityList = subMeuns.stream().map(menu -> {
|
||||
SysRoleMenuEntity rm = new SysRoleMenuEntity();
|
||||
rm.setRoleId(operator.getRoleId());
|
||||
rm.setMenuId(Long.valueOf(menu));
|
||||
return rm;
|
||||
}).collect(Collectors.toList());
|
||||
roleMenuService.saveBatch(roleMenuEntityList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private Long createDept(SysTenantEntity sysTenantEntity) {
|
||||
// 创建部门
|
||||
SysDeptEntity dept = new SysDeptEntity();
|
||||
dept.setParentId(0L);
|
||||
dept.setAncestors("0");
|
||||
dept.setDeptName(sysTenantEntity.getTenantName());
|
||||
dept.setSort(0);
|
||||
dept.setLeader(sysTenantEntity.getTenantName() + "管理员");
|
||||
dept.setPhone(sysTenantEntity.getPhone());
|
||||
dept.setEmail(sysTenantEntity.getEmail());
|
||||
dept.setTenantId(sysTenantEntity.getTenantId());
|
||||
deptMapper.insert(dept);
|
||||
return dept.getDeptId();
|
||||
}
|
||||
|
||||
|
||||
private Long createRole(SysTenantEntity sysTenantEntity) {
|
||||
// 创建角色
|
||||
SysRoleEntity role = new SysRoleEntity();
|
||||
role.setRoleName(sysTenantEntity.getTenantName() + "管理员");
|
||||
role.setRoleKey("admin");
|
||||
role.setDataScope("1");
|
||||
role.setMenuCheckStrictly(true);
|
||||
role.setDeptCheckStrictly(true);
|
||||
role.setDescription("租户管理员");
|
||||
role.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(role);
|
||||
// 根据租户套餐ids查出套餐编码塞入角色-菜单表
|
||||
createRoleMenu(sysTenantEntity, role);
|
||||
return role.getRoleId();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param sysTenantEntity 租户对象
|
||||
* @param roleKey 角色权限标识
|
||||
* @param ruleName 角色名称
|
||||
* @author 杭州世平信息科技有限公司-xuhq
|
||||
* @since 2024/6/13 16:20
|
||||
**/
|
||||
public void initOtherRule(SysTenantEntity sysTenantEntity, String roleKey, String ruleName) {
|
||||
SysRoleEntity role = new SysRoleEntity();
|
||||
role.setRoleName(sysTenantEntity.getTenantName() + ruleName);
|
||||
role.setRoleKey(roleKey);
|
||||
role.setDataScope("3");
|
||||
role.setMenuCheckStrictly(true);
|
||||
role.setDeptCheckStrictly(true);
|
||||
role.setDescription(ruleName);
|
||||
role.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(role);
|
||||
}
|
||||
|
||||
/**
|
||||
* 目前为单套餐,跟租户绑定,解耦防止套餐变动影响多个租户
|
||||
@@ -407,4 +307,47 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
}
|
||||
log.info("腾讯云域名映射结果:{}", JSONObject.toJSONString(createRecordResponse));
|
||||
}
|
||||
|
||||
private void initRole(SysTenantEntity sysTenantEntity) {
|
||||
|
||||
SysRoleEntity operator = new SysRoleEntity();
|
||||
operator.setRoleName("管理员");
|
||||
operator.setRoleKey("operator");
|
||||
operator.setDataScope("1");
|
||||
operator.setMenuCheckStrictly(true);
|
||||
operator.setDeptCheckStrictly(true);
|
||||
operator.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(operator);
|
||||
|
||||
|
||||
SysTenantPackageEntity sysTenantPackage = tenantPackageMapper.selectById(sysTenantEntity.getPackageId());
|
||||
List<String> subMeuns = Arrays.asList(sysTenantPackage.getMenuIds().split(","));
|
||||
if (CollectionUtil.isNotEmpty(subMeuns)) {
|
||||
List<SysRoleMenuEntity> roleMenuEntityList = subMeuns.stream().map(menu -> {
|
||||
SysRoleMenuEntity rm = new SysRoleMenuEntity();
|
||||
rm.setRoleId(operator.getRoleId());
|
||||
rm.setMenuId(Long.valueOf(menu));
|
||||
return rm;
|
||||
}).collect(Collectors.toList());
|
||||
roleMenuService.saveBatch(roleMenuEntityList);
|
||||
}
|
||||
|
||||
SysRoleEntity waiter = new SysRoleEntity();
|
||||
waiter.setRoleName("客服");
|
||||
waiter.setRoleKey("waiter");
|
||||
waiter.setDataScope("1");
|
||||
waiter.setMenuCheckStrictly(true);
|
||||
waiter.setDeptCheckStrictly(true);
|
||||
waiter.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(waiter);
|
||||
|
||||
SysRoleEntity leader = new SysRoleEntity();
|
||||
leader.setRoleName("组长");
|
||||
leader.setRoleKey("leader");
|
||||
leader.setDataScope("3");
|
||||
leader.setMenuCheckStrictly(true);
|
||||
leader.setDeptCheckStrictly(true);
|
||||
leader.setTenantId(sysTenantEntity.getTenantId());
|
||||
roleMapper.insert(leader);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -31,7 +30,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 查询账号列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:list')")
|
||||
//@PreAuthorize("@customSs.hasPermission('play:user:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listAll(@Validated @RequestBody PlayUserInfoQueryVo vo) {
|
||||
IPage<PlayUserInfoEntity> list = playUserInfoService.selectPlayUserInfoByPage(vo);
|
||||
@@ -41,7 +40,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 获取账号详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:list')")
|
||||
//@PreAuthorize("@customSs.hasPermission('play:user:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playUserInfoService.selectPlayUserInfoById(id));
|
||||
@@ -50,7 +49,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 新增账号
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('play:user:add')")
|
||||
@Log(title = "账号", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody PlayUserInfoAddVo vo) {
|
||||
@@ -65,7 +64,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 修改账号
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('play:user:update')")
|
||||
@Log(title = "账号", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayUserInfoUpEditVo vo) {
|
||||
@@ -80,7 +79,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 删除账号
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('play:user:delete')")
|
||||
@Log(title = "账号", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.starry.common.annotation.Log;
|
||||
import com.starry.common.enums.BusinessType;
|
||||
import com.starry.common.result.R;
|
||||
import com.starry.common.utils.ConvertUtil;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -38,14 +37,14 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 查询店铺首页轮播列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:list')")
|
||||
//@PreAuthorize("@customSs.hasPermission('shop:carousel:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayShopCarouselInfoQueryVo vo) {
|
||||
IPage<PlayShopCarouselInfoEntity> list = playCarouselInfoService.selectByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('shop:carousel:add')")
|
||||
@PostMapping("/uploadFile")
|
||||
public R uploadFile(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(), file.getOriginalFilename());
|
||||
@@ -56,7 +55,7 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 新增页轮播列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:add')")
|
||||
//@PreAuthorize("@customSs.hasPermission('shop:carousel:add')")
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody PlayShopCarouselInfoAddVo vo) {
|
||||
PlayShopCarouselInfoEntity entity = ConvertUtil.entityToVo(vo, PlayShopCarouselInfoEntity.class);
|
||||
@@ -68,7 +67,7 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 修改页轮播状态
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:update')")
|
||||
//@PreAuthorize("@customSs.hasPermission('shop:carousel:update')")
|
||||
@PostMapping("/handleUpdateState")
|
||||
public R listByPage(@Validated @RequestBody PlayShopCarouselInfoUpdateStateVo vo) {
|
||||
PlayShopCarouselInfoEntity entity = ConvertUtil.entityToVo(vo, PlayShopCarouselInfoEntity.class);
|
||||
@@ -79,7 +78,7 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 删除店铺首页轮播
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:delete')")
|
||||
//@PreAuthorize("@customSs.hasPermission('shop:carousel:delete')")
|
||||
@Log(title = "店铺首页轮播", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -80,6 +80,19 @@ public class SysUserController {
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加用户")
|
||||
@PostMapping(value = "add/v1")
|
||||
public R addV1(@RequestBody SysUserEntity user) {
|
||||
if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserCode()))) {
|
||||
return R.error("新增用户'" + user.getUserCode() + "'失败,登录账号已存在");
|
||||
}
|
||||
boolean success = userService.create(user);
|
||||
if (success) {
|
||||
return R.ok();
|
||||
}
|
||||
return R.error("添加失败");
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改用户")
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable("id") String id, @RequestBody SysUserEntity user) {
|
||||
|
||||
@@ -25,6 +25,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.LongStream;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
@@ -66,6 +67,17 @@ public class SysMenuServiceImpl extends ServiceImpl<SysMenuMapper, SysMenuEntity
|
||||
// 超级管理员显示所有菜单信息
|
||||
if (SecurityUtils.isAdmin(userService.selectUserById(userId))) {
|
||||
menuList = baseMapper.selectMenuList(menu);
|
||||
List<Long> menuIds = LongStream.rangeClosed(1, 56).boxed().collect(Collectors.toList());
|
||||
menuIds.remove(1L);
|
||||
menuIds.remove(6L);
|
||||
menuIds.remove(17L);
|
||||
menuIds.remove(42L);
|
||||
menuIds.remove(43L);
|
||||
menuIds.remove(44L);
|
||||
menuIds.remove(45L);
|
||||
menuIds.remove(46L);
|
||||
menuList = menuList.stream().filter(ca -> !menuIds.contains(ca.getMenuId())).collect(Collectors.toList());
|
||||
|
||||
} else {
|
||||
menuList = baseMapper.selectMenuListByUserId(menu, userId);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.starry.admin.modules.system.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.starry.admin.utils.SecurityUtils;
|
||||
import com.starry.common.utils.IdUtils;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
@@ -144,6 +145,9 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUserEntity
|
||||
|
||||
@Override
|
||||
public SysUserEntity selectUserById(String userId) {
|
||||
if(StringUtils.isEmpty(userId)){
|
||||
userId = SecurityUtils.getUserId();
|
||||
}
|
||||
SysUserEntity data = baseMapper.selectUserById(userId);
|
||||
if(Objects.isNull(data)){
|
||||
throw new RuntimeException("未查询到指定用户");
|
||||
|
||||
Reference in New Issue
Block a user