fix
This commit is contained in:
@@ -6,6 +6,7 @@ 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.*;
|
||||
|
||||
@@ -27,6 +28,7 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 查询余额明细列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayBalanceDetailsQueryVo vo) {
|
||||
return R.ok(playBalanceDetailsInfoService.selectByPage(vo));
|
||||
@@ -35,6 +37,7 @@ 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));
|
||||
@@ -44,6 +47,7 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 修改余额明细
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:update')")
|
||||
@Log(title = "余额明细", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayBalanceDetailsInfoEntity playBalanceDetailsInfo) {
|
||||
@@ -58,6 +62,7 @@ public class PlayBalanceDetailsInfoController {
|
||||
/**
|
||||
* 删除余额明细
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('balance:details:delete')")
|
||||
@Log(title = "余额明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -11,6 +11,7 @@ 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.*;
|
||||
|
||||
@@ -34,6 +35,7 @@ public class PlayClerkArticleInfoController {
|
||||
/**
|
||||
* 查询店员动态信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:article:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkArticleQueryVo vo) {
|
||||
IPage<PlayClerkArticleReturnVo> list = playClerkArticleInfoService.selectByPage(vo);
|
||||
@@ -44,6 +46,7 @@ public class PlayClerkArticleInfoController {
|
||||
/**
|
||||
* 修改店员动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:article:update')")
|
||||
@Log(title = "店员动态信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@RequestBody PlayClerkArticleReviewStateEditVo vo) {
|
||||
@@ -58,6 +61,7 @@ public class PlayClerkArticleInfoController {
|
||||
/**
|
||||
* 删除店员动态信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:article:delete')")
|
||||
@Log(title = "店员动态信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.*;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class PlayClerkDataReviewInfoController {
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:dataReview:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkDataReviewQueryVo vo) {
|
||||
IPage<PlayClerkDataReviewReturnVo> list = playClerkDataReviewInfoService.selectByPage(vo);
|
||||
@@ -39,6 +41,7 @@ public class PlayClerkDataReviewInfoController {
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:dataReview:update')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkDataReviewStateEditVo vo) {
|
||||
@@ -49,6 +52,7 @@ public class PlayClerkDataReviewInfoController {
|
||||
/**
|
||||
* 删除店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:dataReview:delete')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.*;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 查询店员排行列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody IPlayClerkRankingInfoQueryVo vo) {
|
||||
IPage<IPlayClerkRankingInfoReturnVo> list = playClerkRankingInfoService.selectByPage(vo);
|
||||
@@ -37,6 +39,7 @@ 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));
|
||||
@@ -45,6 +48,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 新增店员排行
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:add')")
|
||||
@Log(title = "店员排行", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
@@ -58,6 +62,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 修改店员排行
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:update')")
|
||||
@Log(title = "店员排行", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayClerkRankingInfoEntity playClerkRankingInfo) {
|
||||
@@ -72,6 +77,7 @@ public class PlayClerkRankingInfoController {
|
||||
/**
|
||||
* 删除店员排行
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:ranking:delete')")
|
||||
@Log(title = "店员排行", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -18,6 +18,7 @@ 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.*;
|
||||
|
||||
@@ -47,6 +48,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:list')")
|
||||
@PostMapping("listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayClerkUserQueryVo vo) {
|
||||
IPage<PlayClerkUserReturnVo> list = playClerkUserInfoService.selectByPage(vo);
|
||||
@@ -64,6 +66,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 查询店员列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:list')")
|
||||
@GetMapping("/list")
|
||||
public R list(PlayClerkUserInfoQueryVo vo) {
|
||||
IPage<PlayClerkUserInfoResultVo> list = playClerkUserInfoService.selectPlayClerkUserInfoByPage(vo);
|
||||
@@ -73,6 +76,7 @@ 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));
|
||||
@@ -119,6 +123,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 修改店员
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkUserEditVo vo) {
|
||||
@@ -134,6 +139,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 修改店员状态
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:update')")
|
||||
@Log(title = "店员", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateState")
|
||||
public R updateState(@Validated @RequestBody PlayClerkUserStateEditVo vo) {
|
||||
@@ -148,6 +154,7 @@ public class PlayClerkUserInfoController {
|
||||
/**
|
||||
* 删除店员
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:user:delete')")
|
||||
@Log(title = "店员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.*;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class PlayClerkUserReviewInfoController {
|
||||
/**
|
||||
* 查询店员资料审核列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:userReview:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayClerkUserReviewQueryVo vo) {
|
||||
IPage<PlayClerkUserReviewReturnVo> list = playClerkUserReviewInfoService.selectByPage(vo);
|
||||
@@ -37,6 +39,7 @@ public class PlayClerkUserReviewInfoController {
|
||||
/**
|
||||
* 修改店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:userReview:update')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayClerkUserReviewStateEditVo vo) {
|
||||
@@ -47,6 +50,7 @@ public class PlayClerkUserReviewInfoController {
|
||||
/**
|
||||
* 删除店员资料审核
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:userReview:delete')")
|
||||
@Log(title = "店员资料审核", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -14,6 +14,7 @@ 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.*;
|
||||
|
||||
@@ -43,6 +44,7 @@ public class PlayClerkWagesInfoController {
|
||||
/**
|
||||
* 查询店员工资结算信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:wages:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkWagesInfoQueryVo vo) {
|
||||
return R.ok(playClerkWagesInfoService.selectHistoricalByPage(vo));
|
||||
@@ -51,6 +53,7 @@ public class PlayClerkWagesInfoController {
|
||||
/**
|
||||
* 查询店员工未结算工资
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:wages:list')")
|
||||
@PostMapping("/listUnsettledWagesByPage")
|
||||
public R list(@Validated @RequestBody PlayClerkUnsettledWagesInfoQueryVo vo) {
|
||||
IPage<PlayClerkUnsettledWagesInfoReturnVo> page = playClerkUserInfoService.listUnsettledWagesByPage(vo);
|
||||
@@ -90,6 +93,7 @@ public class PlayClerkWagesInfoController {
|
||||
}
|
||||
|
||||
|
||||
@PreAuthorize("@customSs.hasPermission('clerk:wages:list')")
|
||||
@GetMapping("queryWagesDetailsById")
|
||||
public R clerkQueryWagesDetails(@RequestParam("id") String id) {
|
||||
if (StrUtil.isBlankIfStr(id)) {
|
||||
|
||||
@@ -25,6 +25,13 @@ import java.util.List;
|
||||
public interface IPlayClerkUserInfoService extends IService<PlayClerkUserInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前租户店员总数
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @return 店员总数
|
||||
*/
|
||||
Long getTotalClerkUser(String tenantId);
|
||||
/**
|
||||
* 获取当前店员抽成信息
|
||||
*
|
||||
|
||||
@@ -63,6 +63,13 @@ public class PlayClerkUserInfoServiceImpl extends ServiceImpl<PlayClerkUserInfoM
|
||||
private IPlayOrderInfoService playOrderInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public Long getTotalClerkUser(String tenantId) {
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaWrapper.eq(PlayClerkUserInfoEntity::getTenantId, tenantId);
|
||||
return this.baseMapper.selectCount(lambdaWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayClerkLevelInfoEntity queryLevelCommission(String clerkId) {
|
||||
MPJLambdaWrapper<PlayClerkUserInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.*;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 分页查询顾客留言列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayCustomLeaveMsgQueryVo vo) {
|
||||
IPage<PlayCustomLeaveMsgReturnVo> list = playCustomLeaveMsgService.selectByPage(vo);
|
||||
@@ -37,6 +39,7 @@ 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));
|
||||
@@ -45,6 +48,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 新增顾客留言
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:add')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
@@ -58,6 +62,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 修改顾客留言
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:update')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomLeaveMsgEntity playCustomLeaveMsg) {
|
||||
@@ -72,6 +77,7 @@ public class PlayCustomLeaveMsgController {
|
||||
/**
|
||||
* 删除顾客留言
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:leave:delete')")
|
||||
@Log(title = "顾客留言", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -10,6 +10,7 @@ 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;
|
||||
@@ -30,6 +31,7 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 查询顾客等级列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:list')")
|
||||
@PostMapping("/listAll")
|
||||
public R listAll() {
|
||||
List<PlayCustomLevelInfoEntity> list = playCustomLevelInfoService.selectPlayCustomLevelInfoByPage();
|
||||
@@ -39,6 +41,7 @@ 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));
|
||||
@@ -48,6 +51,7 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 新增顾客等级
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:add')")
|
||||
@Log(title = "店员等级", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomLevelAddVo vo) {
|
||||
@@ -65,6 +69,7 @@ public class PlayCustomLevelInfoController {
|
||||
/**
|
||||
* 修改顾客等级
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:level:update')")
|
||||
@Log(title = "顾客等级", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@RequestBody PlayCustomLevelEditVo vo) {
|
||||
|
||||
@@ -10,6 +10,7 @@ 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.*;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class PlayCustomUserInfoController {
|
||||
/**
|
||||
* 查询顾客列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:user:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayCustomUserQueryVo vo) {
|
||||
IPage<PlayCustomUserReturnVo> list = playCustomUserInfoService.selectByPage(vo);
|
||||
@@ -39,6 +41,7 @@ public class PlayCustomUserInfoController {
|
||||
/**
|
||||
* 获取顾客详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:user:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playCustomUserInfoService.selectById(id));
|
||||
@@ -47,6 +50,7 @@ public class PlayCustomUserInfoController {
|
||||
/**
|
||||
* 新增顾客
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:user:add')")
|
||||
@Log(title = "顾客", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
|
||||
@@ -60,6 +64,7 @@ public class PlayCustomUserInfoController {
|
||||
/**
|
||||
* 修改顾客状态
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:user:update')")
|
||||
@Log(title = "顾客", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateState")
|
||||
public R updateState(@Validated @RequestBody PlayCustomUserStateEditVo vo) {
|
||||
@@ -74,6 +79,7 @@ public class PlayCustomUserInfoController {
|
||||
/**
|
||||
* 修改顾客
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:user:update')")
|
||||
@Log(title = "顾客", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayCustomUserInfoEntity playCustomUserInfo) {
|
||||
@@ -88,6 +94,7 @@ public class PlayCustomUserInfoController {
|
||||
/**
|
||||
* 删除顾客
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('custom:user:delete')")
|
||||
@Log(title = "顾客", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -8,6 +8,7 @@ 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.*;
|
||||
|
||||
@@ -28,6 +29,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 查询订单投诉信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayOrderComplaintQueryVo vo) {
|
||||
IPage<PlayOrderComplaintReturnVo> list = playOrderComplaintInfoService.selectByPage(vo);
|
||||
@@ -37,6 +39,7 @@ 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));
|
||||
@@ -45,6 +48,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 新增订单投诉信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:add')")
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@RequestBody PlayOrderComplaintInfoEntity playOrderComplaintInfo) {
|
||||
@@ -58,6 +62,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 修改订单投诉信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:update')")
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayOrderComplaintInfoEntity playOrderComplaintInfo) {
|
||||
@@ -72,6 +77,7 @@ public class PlayOrderComplaintInfoController {
|
||||
/**
|
||||
* 删除订单投诉信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:complaint:delete')")
|
||||
@Log(title = "订单投诉信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -6,6 +6,7 @@ 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;
|
||||
@@ -29,6 +30,7 @@ public class PlayOrderContinueInfoController {
|
||||
/**
|
||||
* 查询订单续单信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:continue:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayOrderContinueQueryVo vo) {
|
||||
IPage<PlayOrderContinueReturnVo> list = playOrderContinueInfoService.selectPlayByPage(vo);
|
||||
@@ -38,6 +40,7 @@ public class PlayOrderContinueInfoController {
|
||||
/**
|
||||
* 审批续单申申请
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:continue:update')")
|
||||
@PostMapping("/updateReviewState")
|
||||
public R updateReviewState(@Validated @RequestBody PlayOrderReviewStateEditVo vo) {
|
||||
playOrderContinueInfoService.updateReviewState(vo);
|
||||
|
||||
@@ -10,6 +10,7 @@ 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.*;
|
||||
|
||||
@@ -30,6 +31,7 @@ public class PlayOrderEvaluateInfoController {
|
||||
/**
|
||||
* 查询订单评价信息列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:evaluate:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R list(@Validated @RequestBody PlayOrderEvaluateQueryVo vo) {
|
||||
IPage<PlayOrderEvaluateReturnVo> list = playOrderEvaluateInfoService.selectByPage(vo);
|
||||
@@ -41,6 +43,7 @@ public class PlayOrderEvaluateInfoController {
|
||||
/**
|
||||
* 修改订单评价信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:evaluate:update')")
|
||||
@Log(title = "修改订单评价状态", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/updateStatus")
|
||||
public R update(@Validated @RequestBody PlayOrderEvaluateEditStateVo vo) {
|
||||
@@ -55,6 +58,7 @@ public class PlayOrderEvaluateInfoController {
|
||||
/**
|
||||
* 删除订单评价信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:evaluate:delete')")
|
||||
@Log(title = "订单评价信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -10,6 +10,7 @@ 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.*;
|
||||
|
||||
@@ -36,6 +37,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 分页查询订单列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(@Validated @RequestBody PlayOrderInfoQueryVo vo) {
|
||||
return R.ok(orderInfoService.selectOrderInfoPage(vo));
|
||||
@@ -45,6 +47,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderRefund")
|
||||
public R orderRefund(@Validated @RequestBody PlayOrderRefundAddVo vo) {
|
||||
PlayOrderInfoEntity orderInfo = orderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
@@ -65,6 +68,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 跟换店员
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderEditAcceptBy")
|
||||
public R orderEditAcceptBy(@Validated @RequestBody PlayOrderEditAcceptByVo vo) {
|
||||
orderInfoService.updateStateTo1("2", CustomSecurityContextHolder.getUserId(), vo.getAcceptBy(), vo.getOrderId());
|
||||
@@ -75,6 +79,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 后台备注
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderEditBackendRemark")
|
||||
public R orderEditBackendRemark(@Validated @RequestBody PlayOrderEditBackendRemarkByVo vo) {
|
||||
PlayOrderInfoEntity orderInfo = orderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
@@ -88,6 +93,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 重新抢单
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@PostMapping("/orderEditRandomSingle")
|
||||
public R orderEditRandomSingle(@Validated @RequestBody PlayOrderEditRandomSingleVo vo) {
|
||||
PlayOrderInfoEntity orderInfo = orderInfoService.selectOrderInfoById(vo.getOrderId());
|
||||
@@ -115,6 +121,7 @@ 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));
|
||||
@@ -124,6 +131,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 根据ID修改订单信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:update')")
|
||||
@Log(title = "修改普通订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update/{id}")
|
||||
public R update(@PathVariable String id, @RequestBody PlayOrderInfoEntity orderInfoEntity) {
|
||||
@@ -139,6 +147,7 @@ public class PlayOrderInfoController {
|
||||
/**
|
||||
* 删除订单
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('order:order:delete')")
|
||||
@Log(title = "删除订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -7,6 +7,7 @@ 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;
|
||||
@@ -32,6 +33,7 @@ public class PlayOrderRewardInfoController {
|
||||
private IPlayOrderInfoService orderInfoService;
|
||||
|
||||
|
||||
@PreAuthorize("@customSs.hasPermission('order:reward:list')")
|
||||
@Log(title = "查询打赏订单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/listByPage")
|
||||
public R queryRewardOrder(@Validated @RequestBody PlayOrderRewardQueryVo vo) {
|
||||
|
||||
@@ -21,6 +21,14 @@ import java.util.List;
|
||||
public interface IPlayOrderInfoService extends IService<PlayOrderInfoEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 查询当前租户店员总数
|
||||
*
|
||||
* @param tenantId 租户ID
|
||||
* @return 店员总数
|
||||
*/
|
||||
List<PlayOrderInfoEntity> getTotalOrderInfo(String tenantId);
|
||||
|
||||
/**
|
||||
* 新增充值单
|
||||
*
|
||||
|
||||
@@ -74,6 +74,13 @@ public class PlayOrderInfoServiceImpl extends ServiceImpl<PlayOrderInfoMapper, P
|
||||
private IPlayOrderComplaintInfoService playOrderComplaintInfoService;
|
||||
|
||||
|
||||
@Override
|
||||
public List<PlayOrderInfoEntity> getTotalOrderInfo(String tenantId) {
|
||||
MPJLambdaWrapper<PlayOrderInfoEntity> lambdaWrapper = new MPJLambdaWrapper<>();
|
||||
lambdaWrapper.eq(PlayOrderInfoEntity::getTenantId, tenantId);
|
||||
return this.baseMapper.selectList(lambdaWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createOrderInfo(String orderId, String orderNo, String orderState, String orderType, String placeType, String rewardType, String firstOrder, String commodityId, String commodityType, BigDecimal commodityPrice, String serviceDuration, String commodityName, String commodityNumber, BigDecimal orderMoney, BigDecimal finalAmount, BigDecimal discountAmount, String purchaserBy, String acceptBy, String weiChatCode, String remark) {
|
||||
PlayOrderInfoEntity entity = new PlayOrderInfoEntity();
|
||||
@@ -201,7 +208,6 @@ public class PlayOrderInfoServiceImpl extends ServiceImpl<PlayOrderInfoMapper, P
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增充值订单
|
||||
*
|
||||
|
||||
@@ -1,18 +1,26 @@
|
||||
package com.starry.admin.modules.platform.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.starry.admin.modules.clerk.service.IPlayClerkUserInfoService;
|
||||
import com.starry.admin.modules.order.module.entity.PlayOrderInfoEntity;
|
||||
import com.starry.admin.modules.order.service.IPlayOrderInfoService;
|
||||
import com.starry.admin.modules.platform.entity.SysTenantEntity;
|
||||
import com.starry.admin.modules.platform.service.ISysTenantService;
|
||||
import com.starry.admin.modules.platform.vo.SysTenantAddVo;
|
||||
import com.starry.admin.modules.platform.vo.SysTenantQueryVo;
|
||||
import com.starry.admin.modules.platform.vo.SysTenantReturnVo;
|
||||
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.beans.BeanUtils;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -26,6 +34,12 @@ public class SysTenantController {
|
||||
@Resource
|
||||
private ISysTenantService sysTenantService;
|
||||
|
||||
@Resource
|
||||
private IPlayClerkUserInfoService playClerkUserInfoService;
|
||||
|
||||
@Resource
|
||||
private IPlayOrderInfoService playOrderInfoService;
|
||||
|
||||
|
||||
/**
|
||||
* 新增租户表
|
||||
@@ -43,9 +57,28 @@ public class SysTenantController {
|
||||
* 查询租户表列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('platform:tenant:list')")
|
||||
@GetMapping("/list")
|
||||
public R list(SysTenantQueryVo vo) {
|
||||
return R.ok(sysTenantService.selectSysTenantList(vo));
|
||||
@PostMapping("/listByPage")
|
||||
public R listByPage(SysTenantQueryVo vo) {
|
||||
IPage<SysTenantEntity> page = sysTenantService.selectSysTenantList(vo);
|
||||
IPage<SysTenantReturnVo> voPage = page.convert(u -> {
|
||||
SysTenantReturnVo returnVo = new SysTenantReturnVo();
|
||||
List<PlayOrderInfoEntity> orderInfoEntities = playOrderInfoService.getTotalOrderInfo(u.getTenantId());
|
||||
BigDecimal rechargeAmount = BigDecimal.ZERO;
|
||||
for (PlayOrderInfoEntity orderInfoEntity : orderInfoEntities) {
|
||||
if ("0".equals(orderInfoEntity.getOrderType())) {
|
||||
rechargeAmount = rechargeAmount.add(orderInfoEntity.getFinalAmount());
|
||||
}
|
||||
}
|
||||
|
||||
BeanUtils.copyProperties(u, returnVo);
|
||||
returnVo.setClerkNumber(playClerkUserInfoService.getTotalClerkUser(u.getTenantId()));
|
||||
returnVo.setOrderNumber((long) orderInfoEntities.size());
|
||||
returnVo.setRechargeAmount(rechargeAmount);
|
||||
return returnVo;
|
||||
});
|
||||
|
||||
|
||||
return R.ok(voPage);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -108,9 +108,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
public IPage<SysTenantEntity> selectSysTenantList(SysTenantQueryVo vo) {
|
||||
LambdaQueryWrapper<SysTenantEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.orderByDesc(SysTenantEntity::getTenantId);
|
||||
// if (StrUtil.isNotBlank(vo.getTenantStatus())) {
|
||||
// wrapper.eq(SysTenantEntity::getTenantStatus, vo.getTenantStatus());
|
||||
//}
|
||||
|
||||
if (StrUtil.isNotBlank(vo.getTenantName())) {
|
||||
wrapper.like(SysTenantEntity::getTenantName, vo.getTenantName());
|
||||
}
|
||||
@@ -120,8 +118,7 @@ public class SysTenantServiceImpl extends ServiceImpl<SysTenantMapper, SysTenant
|
||||
// if (StrUtil.isNotBlank(vo.getEndTime())) {
|
||||
// wrapper.le(SysTenantEntity::getTenantTime, vo.getEndTime());
|
||||
//}
|
||||
Page<SysTenantEntity> page = new Page<>(vo.getPageNum(), vo.getPageSize());
|
||||
return this.baseMapper.selectPage(page, wrapper);
|
||||
return this.baseMapper.selectPage(new Page<>(vo.getPageNum(), vo.getPageSize()), wrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,146 @@
|
||||
package com.starry.admin.modules.platform.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 租户表对象 sys_tenant
|
||||
*
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
public class SysTenantReturnVo {
|
||||
|
||||
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 租户类型;0:公司;1:部门;2:个人;3:其他
|
||||
*/
|
||||
private String tenantType;
|
||||
|
||||
/**
|
||||
* 用户状态;0:正常,1:停用
|
||||
*/
|
||||
private String tenantStatus;
|
||||
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private String tenantCode;
|
||||
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String tenantName;
|
||||
|
||||
/**
|
||||
* logo图
|
||||
*/
|
||||
private String tenantLogo;
|
||||
|
||||
/**
|
||||
* 显示顺序
|
||||
*/
|
||||
private Long sortOrder;
|
||||
|
||||
/**
|
||||
* 官方地址
|
||||
*/
|
||||
private String homeUrl;
|
||||
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 传真
|
||||
*/
|
||||
private String fax;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 管理员密码
|
||||
*/
|
||||
private String userPwd;
|
||||
|
||||
/**
|
||||
* 租户套餐
|
||||
*/
|
||||
private String packageId;
|
||||
|
||||
/**
|
||||
* 租赁到期时间
|
||||
*/
|
||||
private Date tenantTime;
|
||||
|
||||
/**
|
||||
* 租户权限标识
|
||||
*/
|
||||
private String tenantKey;
|
||||
|
||||
/**
|
||||
* 微信公众号ID
|
||||
*/
|
||||
private String appId;
|
||||
|
||||
|
||||
/**
|
||||
* 微信公众号的app secret
|
||||
*/
|
||||
private String secret;
|
||||
|
||||
|
||||
/**
|
||||
* 微信商户ID
|
||||
*/
|
||||
private String mchId;
|
||||
|
||||
/**
|
||||
* 设置微信公众号的token
|
||||
*/
|
||||
private String mchKey;
|
||||
|
||||
/**
|
||||
* 商户秘钥
|
||||
*/
|
||||
private String certificatePath;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 店员数
|
||||
*/
|
||||
private Long clerkNumber;
|
||||
|
||||
/**
|
||||
* 订单总数
|
||||
*/
|
||||
private Long orderNumber;
|
||||
|
||||
/**
|
||||
* 总充值金额
|
||||
*/
|
||||
private BigDecimal rechargeAmount;
|
||||
|
||||
}
|
||||
@@ -31,9 +31,9 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 查询账号列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:list')")
|
||||
@GetMapping("/list")
|
||||
public R list(PlayUserInfoQueryVo vo) {
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:list')")
|
||||
@PostMapping("/listByPage")
|
||||
public R listAll(@Validated @RequestBody PlayUserInfoQueryVo vo) {
|
||||
IPage<PlayUserInfoEntity> list = playUserInfoService.selectPlayUserInfoByPage(vo);
|
||||
return R.ok(list);
|
||||
}
|
||||
@@ -41,7 +41,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 获取账号详细信息
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:query')")
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:list')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R getInfo(@PathVariable("id") String id) {
|
||||
return R.ok(playUserInfoService.selectPlayUserInfoById(id));
|
||||
@@ -50,7 +50,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 新增账号
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:create')")
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:add')")
|
||||
@Log(title = "账号", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody PlayUserInfoAddVo vo) {
|
||||
@@ -65,7 +65,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 修改账号
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:edit')")
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:update')")
|
||||
@Log(title = "账号", businessType = BusinessType.UPDATE)
|
||||
@PostMapping(value = "/update")
|
||||
public R update(@Validated @RequestBody PlayUserInfoUpEditVo vo) {
|
||||
@@ -80,7 +80,7 @@ public class PlayUserInfoController {
|
||||
/**
|
||||
* 删除账号
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('play:info:remove')")
|
||||
@PreAuthorize("@customSs.hasPermission('play:user:delete')")
|
||||
@Log(title = "账号", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
@@ -4,18 +4,37 @@ import com.starry.common.domain.BasePageEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
public class PlayUserInfoQueryVo extends BasePageEntity {
|
||||
|
||||
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
private String id;
|
||||
|
||||
|
||||
private String username;
|
||||
|
||||
|
||||
private String areaCode;
|
||||
/**
|
||||
* UUID
|
||||
*/
|
||||
|
||||
private String userCode;
|
||||
|
||||
|
||||
/**
|
||||
* 角色ID
|
||||
*/
|
||||
private String ruleId;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private List<String> addTime;
|
||||
}
|
||||
|
||||
@@ -51,11 +51,8 @@ public class PlayUserInfoServiceImpl extends ServiceImpl<PlayUserInfoMapper, Pla
|
||||
if (StrUtil.isNotBlank(vo.getId())) {
|
||||
lambdaQueryWrapper.eq(PlayUserInfoEntity::getId, vo.getId());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getUsername())) {
|
||||
lambdaQueryWrapper.eq(PlayUserInfoEntity::getUsername, vo.getUsername());
|
||||
}
|
||||
if (StrUtil.isNotBlank(vo.getAreaCode())) {
|
||||
lambdaQueryWrapper.eq(PlayUserInfoEntity::getAreaCode, vo.getAreaCode());
|
||||
if (StrUtil.isNotBlank(vo.getUserCode())) {
|
||||
lambdaQueryWrapper.eq(PlayUserInfoEntity::getAreaCode, vo.getUserCode());
|
||||
}
|
||||
Page<PlayUserInfoEntity> page = new Page<>(vo.getPageNum(), vo.getPageSize());
|
||||
return this.baseMapper.selectPage(page, lambdaQueryWrapper);
|
||||
|
||||
@@ -12,6 +12,7 @@ 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;
|
||||
@@ -37,12 +38,14 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 查询店铺首页轮播列表
|
||||
*/
|
||||
@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')")
|
||||
@PostMapping("/uploadFile")
|
||||
public R uploadFile(@RequestParam("file") MultipartFile file) throws IOException {
|
||||
String fileAddress = ossFileService.upload(file.getInputStream(), SecurityUtils.getTenantId(), file.getOriginalFilename());
|
||||
@@ -53,6 +56,7 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 新增页轮播列表
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:add')")
|
||||
@PostMapping("/create")
|
||||
public R create(@Validated @RequestBody PlayShopCarouselInfoAddVo vo) {
|
||||
PlayShopCarouselInfoEntity entity = ConvertUtil.entityToVo(vo, PlayShopCarouselInfoEntity.class);
|
||||
@@ -64,6 +68,7 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 修改页轮播状态
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:update')")
|
||||
@PostMapping("/handleUpdateState")
|
||||
public R listByPage(@Validated @RequestBody PlayShopCarouselInfoUpdateStateVo vo) {
|
||||
PlayShopCarouselInfoEntity entity = ConvertUtil.entityToVo(vo, PlayShopCarouselInfoEntity.class);
|
||||
@@ -74,6 +79,7 @@ public class PlayShopCarouselInfoController {
|
||||
/**
|
||||
* 删除店铺首页轮播
|
||||
*/
|
||||
@PreAuthorize("@customSs.hasPermission('shop:carousel:delete')")
|
||||
@Log(title = "店铺首页轮播", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R remove(@PathVariable String[] ids) {
|
||||
|
||||
Reference in New Issue
Block a user