测试2
This commit is contained in:
parent
1434a536ef
commit
c305d7f9b4
|
@ -95,6 +95,7 @@ public class BusAgentInfoController extends BaseController {
|
|||
}
|
||||
SysLogininfor sysLogininfor = new SysLogininfor();
|
||||
sysLogininfor.setUserName(bean.getAgentAccount());
|
||||
sysLogininfor.setStatus("0");
|
||||
sysLogininfor.setMsg("登录成功");
|
||||
List<SysLogininfor> llll = iSysLogininforService.selectLogininforList(sysLogininfor);
|
||||
bean.setLoginNum(llll.size());
|
||||
|
|
|
@ -56,6 +56,9 @@ public class BusSaleInfoController extends BaseController
|
|||
public TableDataInfo list(BusSaleInfo busSaleInfo)
|
||||
{
|
||||
startPage();
|
||||
if(!"admin".equals(SecurityUtils.getUsername())){
|
||||
busSaleInfo.setCreateId(SecurityUtils.getUserId());
|
||||
}
|
||||
List<BusSaleInfo> list = busSaleInfoService.selectBusSaleInfoList(busSaleInfo);
|
||||
List<BusSaleInfo> tableList = list.stream()
|
||||
.map(info -> {
|
||||
|
|
|
@ -109,7 +109,7 @@ public class BusStoreInfoController extends BaseController {
|
|||
BusStoreInfo busStoreInfo = new BusStoreInfo();
|
||||
BeanUtils.copyProperties(reqBusStoreInfo, busStoreInfo);
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
if (!"OK777".equals(user.getUsername())) {
|
||||
if (!"admin".equals(user.getUsername())) {
|
||||
busStoreInfo.setBindUser(user.getUsername());
|
||||
}
|
||||
List<BusStoreInfo> list = busStoreInfoService.selectBusStoreInfoList(busStoreInfo);
|
||||
|
|
|
@ -2,6 +2,9 @@ package com.ruoyi.business.controller;
|
|||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -27,6 +30,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||
* @author ruoyi
|
||||
* @date 2024-07-16
|
||||
*/
|
||||
@Api(tags = "模版")
|
||||
@RestController
|
||||
@RequestMapping("/business/template")
|
||||
public class BusTemplateInfoController extends BaseController
|
||||
|
@ -37,7 +41,7 @@ public class BusTemplateInfoController extends BaseController
|
|||
/**
|
||||
* 查询模版列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:template:list')")
|
||||
// @PreAuthorize("@ss.hasPermi('business:template:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BusTemplateInfo busTemplateInfo)
|
||||
{
|
||||
|
@ -62,17 +66,24 @@ public class BusTemplateInfoController extends BaseController
|
|||
/**
|
||||
* 获取模版详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:template:query')")
|
||||
// @PreAuthorize("@ss.hasPermi('business:template:query')")
|
||||
@ApiOperation("根据模版id获取模版详情")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(busTemplateInfoService.selectBusTemplateInfoById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据单前登录人获取模版详情")
|
||||
@GetMapping(value = "/getTemplateInfo")
|
||||
public AjaxResult getTemplateInfo()
|
||||
{
|
||||
return success(busTemplateInfoService.getTemplateInfo());
|
||||
}
|
||||
/**
|
||||
* 新增模版
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:template:add')")
|
||||
// @PreAuthorize("@ss.hasPermi('business:template:add')")
|
||||
@Log(title = "模版", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BusTemplateInfo busTemplateInfo)
|
||||
|
@ -83,7 +94,7 @@ public class BusTemplateInfoController extends BaseController
|
|||
/**
|
||||
* 修改模版
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('business:template:edit')")
|
||||
// @PreAuthorize("@ss.hasPermi('business:template:edit')")
|
||||
@Log(title = "模版", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BusTemplateInfo busTemplateInfo)
|
||||
|
|
|
@ -5,6 +5,8 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 模版对象 bus_template_info
|
||||
*
|
||||
|
@ -54,6 +56,16 @@ public class BusTemplateInfo extends BaseEntity
|
|||
@Excel(name = "排序")
|
||||
private Long sort;
|
||||
|
||||
private List<BusTemplateAttrInfo> attrInfoList;
|
||||
|
||||
public List<BusTemplateAttrInfo> getAttrInfoList() {
|
||||
return attrInfoList;
|
||||
}
|
||||
|
||||
public void setAttrInfoList(List<BusTemplateAttrInfo> attrInfoList) {
|
||||
this.attrInfoList = attrInfoList;
|
||||
}
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
|
@ -58,4 +58,6 @@ public interface IBusTemplateInfoService
|
|||
* @return 结果
|
||||
*/
|
||||
public int deleteBusTemplateInfoById(Long id);
|
||||
|
||||
public BusTemplateInfo getTemplateInfo();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,13 @@
|
|||
package com.ruoyi.business.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.business.domain.BusTemplateAttrInfo;
|
||||
import com.ruoyi.business.mapper.BusTemplateAttrInfoMapper;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.business.mapper.BusTemplateInfoMapper;
|
||||
|
@ -20,6 +26,9 @@ public class BusTemplateInfoServiceImpl implements IBusTemplateInfoService
|
|||
@Autowired
|
||||
private BusTemplateInfoMapper busTemplateInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private BusTemplateAttrInfoMapper busTemplateAttrInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询模版
|
||||
*
|
||||
|
@ -29,7 +38,12 @@ public class BusTemplateInfoServiceImpl implements IBusTemplateInfoService
|
|||
@Override
|
||||
public BusTemplateInfo selectBusTemplateInfoById(Long id)
|
||||
{
|
||||
return busTemplateInfoMapper.selectBusTemplateInfoById(id);
|
||||
BusTemplateInfo busTemplateInfo = busTemplateInfoMapper.selectBusTemplateInfoById(id);
|
||||
BusTemplateAttrInfo busTemplateAttrInfo = new BusTemplateAttrInfo();
|
||||
busTemplateAttrInfo.setTemplateId(id);
|
||||
List<BusTemplateAttrInfo> list1 = busTemplateAttrInfoMapper.selectBusTemplateAttrInfoList(busTemplateAttrInfo);
|
||||
busTemplateInfo.setAttrInfoList(list1);
|
||||
return busTemplateInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -93,4 +107,22 @@ public class BusTemplateInfoServiceImpl implements IBusTemplateInfoService
|
|||
{
|
||||
return busTemplateInfoMapper.deleteBusTemplateInfoById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BusTemplateInfo getTemplateInfo() {
|
||||
LoginUser user = SecurityUtils.getLoginUser();
|
||||
BusTemplateInfo busTemplateInfo = new BusTemplateInfo();
|
||||
busTemplateInfo.setCreateId(user.getUserId());
|
||||
busTemplateInfo.setTemplateStatus("1");
|
||||
List<BusTemplateInfo> list = busTemplateInfoMapper.selectBusTemplateInfoList(busTemplateInfo);
|
||||
if(list.size() == 1){
|
||||
BusTemplateInfo busTemplateInfo1 = list.get(0);
|
||||
BusTemplateAttrInfo busTemplateAttrInfo = new BusTemplateAttrInfo();
|
||||
busTemplateAttrInfo.setTemplateId(busTemplateInfo1.getId());
|
||||
List<BusTemplateAttrInfo> list1 = busTemplateAttrInfoMapper.selectBusTemplateAttrInfoList(busTemplateAttrInfo);
|
||||
busTemplateInfo1.setAttrInfoList(list1);
|
||||
return busTemplateInfo1;
|
||||
}
|
||||
throw new ServiceException("模版信息异常!");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="userName != null and userName != ''">
|
||||
AND user_name like concat('%', #{userName}, '%')
|
||||
</if>
|
||||
<if test="msg != null and msg != ''">
|
||||
AND msg like concat('%', #{msg}, '%')
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
||||
AND login_time >= #{params.beginTime}
|
||||
</if>
|
||||
|
|
|
@ -186,13 +186,13 @@
|
|||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width =120>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="userAccount !='OK777' && scope.row.returnVisitStatus !== '1'"
|
||||
<el-button v-if="userAccount !='admin' && scope.row.returnVisitStatus !== '1'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>配置</el-button>
|
||||
<el-button v-if="userAccount !='OK777' && scope.row.returnVisitStatus !== '1'"
|
||||
<el-button v-if="userAccount !='admin' && scope.row.returnVisitStatus !== '1'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
|
@ -453,7 +453,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.userAccount = this.$store.state.user.name;
|
||||
if(this.$store.state.user.name == 'OK777'){
|
||||
if(this.$store.state.user.name == 'admin'){
|
||||
this.isDisabled = true;
|
||||
}
|
||||
this.getListSale();
|
||||
|
|
|
@ -106,9 +106,12 @@
|
|||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-col :span="2">
|
||||
<el-form-item label="开启数量:"><span>{{map.openCount}}</span></el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="2">
|
||||
<el-form-item label="当前账分:"><span>{{nowIntegral}}</span></el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-form>
|
||||
|
@ -147,7 +150,7 @@
|
|||
@click="handleExport"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5" class="top-right-btn"><el-button size="mini" type="error">当前账分:{{nowIntegral}}</el-button></el-col>
|
||||
<!-- <el-col :span="1.5" class="top-right-btn"><el-button size="mini" type="error">当前账分:{{nowIntegral}}</el-button></el-col> -->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
|
@ -194,19 +197,19 @@
|
|||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width =120>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="userAccount !='OK777' "
|
||||
<el-button v-if="userAccount !='admin' "
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>配置</el-button>
|
||||
<el-button v-if="userAccount !='OK777' && scope.row.selfDeliveryStatus == '1' "
|
||||
<el-button v-if="userAccount !='admin' && scope.row.selfDeliveryStatus == '1' "
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-bicycle"
|
||||
@click="handleSelfDelivery(scope.row)"
|
||||
>自配送</el-button>
|
||||
<el-button v-if="userAccount !='OK777' "
|
||||
<el-button v-if="userAccount !='admin' "
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
|
@ -466,7 +469,7 @@ export default {
|
|||
},
|
||||
created() {
|
||||
this.userAccount = this.$store.state.user.name;
|
||||
if(this.$store.state.user.name == 'OK777'){
|
||||
if(this.$store.state.user.name == 'admin'){
|
||||
this.isDisabled = true;
|
||||
}
|
||||
this.getListSale();
|
||||
|
|
Loading…
Reference in New Issue