This commit is contained in:
cun-nan 2024-03-04 14:25:20 +08:00
parent 2acc8efe2c
commit 6e2e6830ed
19 changed files with 120 additions and 31 deletions

View File

@ -775,8 +775,17 @@ export default {
} }
if (this.ids && this.ids.length>0){ if (this.ids && this.ids.length>0){
editStatus({ids:this.ids.toString(),status:val}).then(res => { editStatus({ids:this.ids.toString(),status:val}).then(res => {
if (val=='qy') {
if (res.data > 0) {
this.$message.success(name + "成功") this.$message.success(name + "成功")
this.getList(); this.getList();
} else {
this.$message.error("请确保上架的商品库存大于0且为商品设置零售价和会员价")
}
}else {
this.$message.success(name + "成功")
this.getList();
}
}) })
}else { }else {
this.$message.error("请选择需要"+name+"的商品") this.$message.error("请选择需要"+name+"的商品")

View File

@ -1171,6 +1171,10 @@ export default {
}, },
// //
handleAddMembers() { handleAddMembers() {
if (this.fixingLevelList.length==0){
this.$message.error("请先设置企业会员等级")
return;
}
this.openMembers = true; this.openMembers = true;
this.title = "批量用户认证"; this.title = "批量用户认证";
}, },

View File

@ -788,6 +788,7 @@ export default {
this.openUser = false; this.openUser = false;
this.getList(); this.getList();
this.getUserList(); this.getUserList();
}); });
} }
}) })

View File

@ -4,7 +4,7 @@
<el-alert <el-alert
title="说明" title="说明"
type="error" type="error"
description="为了保证加油站商户日常在线支付业务的稳定性油客里里目前支持多通道支付 description="为了保证加油站商户日常在线支付业务的稳定性来个油惠目前支持多通道支付
可以有效的避免单支付通道带来不稳定性从而造成油站不能正常支付问题 可以有效的避免单支付通道带来不稳定性从而造成油站不能正常支付问题
加油站一旦出现不能正常支付的情况可以随时手工切换支付通道来保证加油站支付收款业务" 加油站一旦出现不能正常支付的情况可以随时手工切换支付通道来保证加油站支付收款业务"
:closable="false" :closable="false"

View File

@ -685,7 +685,7 @@ export default {
} }
if (!this.form.id) { if (!this.form.id) {
queryStaff({mobile:this.form.mobile}).then( response => { queryStaff({mobile:this.form.mobile}).then( response => {
if(response.data!=null){ if(response.data){
this.$modal.msgError("手机号已存在"); this.$modal.msgError("手机号已存在");
}else { }else {
this.form.posPrem = JSON.stringify(this.form.posPrem); this.form.posPrem = JSON.stringify(this.form.posPrem);
@ -696,6 +696,8 @@ export default {
this.open = false; this.open = false;
this.checked = false; this.checked = false;
this.getList(); this.getList();
}else {
this.$modal.msgError("新增失败");
} }
}); });
} }

View File

@ -4,7 +4,7 @@
<el-alert <el-alert
title="说明" title="说明"
type="error" type="error"
description="为了保证加油站商户日常在线支付业务的稳定性油客里里目前支持多通道支付 description="为了保证加油站商户日常在线支付业务的稳定性来个油惠目前支持多通道支付
可以有效的避免单支付通道带来不稳定性从而造成油站不能正常支付问题 可以有效的避免单支付通道带来不稳定性从而造成油站不能正常支付问题
加油站一旦出现不能正常支付的情况可以随时手工切换支付通道来保证加油站支付收款业务" 加油站一旦出现不能正常支付的情况可以随时手工切换支付通道来保证加油站支付收款业务"
:closable="false" :closable="false"

View File

@ -146,8 +146,7 @@ public class LJGoodsController extends BaseController {
public ResponseObject updateStatus(@RequestBody Map<String,String> map){ public ResponseObject updateStatus(@RequestBody Map<String,String> map){
String ids = map.get("ids"); String ids = map.get("ids");
String status = map.get("status"); String status = map.get("status");
goodsService.batchGrounding(ids,status); return getSuccessResult(goodsService.batchGrounding(ids,status));
return getSuccessResult("OK");
} }
/** /**

View File

@ -86,7 +86,7 @@ public interface LJGoodsService extends IService<LJGoods> {
* 批量上架下架商品信息 * 批量上架下架商品信息
* @param ids * @param ids
*/ */
void batchGrounding(String ids,String status); int batchGrounding(String ids,String status);
/** /**
* 查询可兑换商品品类下的商品信息 * 查询可兑换商品品类下的商品信息

View File

@ -212,8 +212,9 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
} }
@Override @Override
public void batchGrounding(String ids,String status) { public int batchGrounding(String ids,String status) {
String[] split = ids.split(","); String[] split = ids.split(",");
int row = 0;
for (String s : split) { for (String s : split) {
LJGoods ljGoods = this.selectLJGoodsById(Integer.parseInt(s)); LJGoods ljGoods = this.selectLJGoodsById(Integer.parseInt(s));
if (ObjectUtil.isNotEmpty(ljGoods)){ if (ObjectUtil.isNotEmpty(ljGoods)){
@ -224,8 +225,10 @@ public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> impl
ljGoods.setStatus(status); ljGoods.setStatus(status);
} }
this.updateLJGoods(ljGoods); this.updateLJGoods(ljGoods);
if (ljGoods.getStatus().equals("qy")) row += 1;
} }
} }
return row;
} }
@Override @Override

View File

@ -276,9 +276,9 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
@Autowired @Autowired
private RedisLock redisLock; private RedisLock redisLock;
//
@Autowired // @Autowired
private StaffCommissionService staffCommissionService; // private StaffCommissionService staffCommissionService;
private static String beforeLitres = new String("0"); private static String beforeLitres = new String("0");
/** /**
* 查询支付状态 修改相关关联表 * 查询支付状态 修改相关关联表

View File

@ -176,6 +176,8 @@ public class LJStaffServiceImpl extends ServiceImpl<LJStaffMapper, LJStaff> impl
*/ */
@Override @Override
public int insertStaff(LJStaff staff) { public int insertStaff(LJStaff staff) {
LJStaff staff2 = this.selectStaffByMobile(staff.getMobile());
if (ObjectUtil.isNotEmpty(staff2)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo(); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId(); Integer storeId = nowAccountInfo.getStoreId();
if (ObjectUtil.isNotEmpty(staff.getStoreId())) { if (ObjectUtil.isNotEmpty(staff.getStoreId())) {

View File

@ -10,6 +10,7 @@ import com.fuint.business.storeInformation.entity.LJStore;
import com.fuint.business.storeInformation.service.ILJStoreService; import com.fuint.business.storeInformation.service.ILJStoreService;
import com.fuint.business.storeInformation.service.impl.LJStoreServiceImpl; import com.fuint.business.storeInformation.service.impl.LJStoreServiceImpl;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
@ -29,6 +30,7 @@ import java.io.*;
* @Version 1.0 * @Version 1.0
*/ */
@Component @Component
@Slf4j
public class QrCodeUtils { public class QrCodeUtils {
@Autowired @Autowired
private ILJStoreService storeService; private ILJStoreService storeService;
@ -67,7 +69,8 @@ public class QrCodeUtils {
//将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置 //将小图片绘到大图片上,500,300 .表示你的小图片在大图片上的位置
g.drawImage(image, (bufImg.getWidth()-360)/2, 320, null); g.drawImage(image, (bufImg.getWidth()-360)/2, 320, null);
// 设置字体样式字体大小 // 设置字体样式字体大小
g.setFont(new Font("TimesRoman", Font.BOLD, 40)); // g.setFont(new Font("TimesRoman", Font.BOLD, 40));
g.setFont(chineseFont());
//设置颜色 //设置颜色
g.setColor(Color.BLACK); g.setColor(Color.BLACK);
@ -108,11 +111,40 @@ public class QrCodeUtils {
ImageIO.write(bufImg, "jpg", outImgStream); ImageIO.write(bufImg, "jpg", outImgStream);
outImgStream.flush(); outImgStream.flush();
outImgStream.close(); outImgStream.close();
} catch (IOException e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
public Font chineseFont() throws Exception {
// 设置中文
Font b = null;
//获取系统字体的路径
String prefixFont = "";
String os = System.getProperties().getProperty("os.name");//获取系统类型
if (os.startsWith("win") || os.startsWith("Win")) {//win下获取字体的路径
prefixFont = "C:\\Windows\\Fonts" + File.separator + "STSONG.TTF";
// Font font = Font.createFont(Font.TRUETYPE_FONT, new ClassPathResource("classpath:font/msyh.ttc").getFile());
// b = font.deriveFont(Font.BOLD, 40);
b = new Font("TimesRoman", Font.BOLD, 40);
} else {
prefixFont = "/usr/share/fonts" + File.separator + "msyh.ttc";
try {
Font font = Font.createFont(Font.TRUETYPE_FONT, new File(prefixFont));
b = font.deriveFont(Font.BOLD, 40);
// b = new Font("msyh", Font.BOLD, 40);
} catch (Exception e) {
//如果发生异常执行默认的字体
b = new Font("msyh", Font.BOLD, 40);
log.error(e.getMessage(),"找不到字体");
}
}
return b;
}
public int returnX(Graphics2D g,Integer bufImgWidth,String name){ public int returnX(Graphics2D g,Integer bufImgWidth,String name){
FontMetrics fm = g.getFontMetrics(); FontMetrics fm = g.getFontMetrics();
Rectangle2D stringBounds = fm.getStringBounds(name, g); Rectangle2D stringBounds = fm.getStringBounds(name, g);

View File

@ -5,12 +5,15 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.userManager.entity.LJUser; import com.fuint.business.userManager.entity.LJUser;
import com.fuint.business.userManager.vo.LJUserVo; import com.fuint.business.userManager.vo.LJUserVo;
import org.springframework.transaction.annotation.Transactional;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
/** /**
* 会员信息 业务层 * 会员信息 业务层
*/ */
@Transactional
public interface LJUserService extends IService<LJUser> { public interface LJUserService extends IService<LJUser> {
/** /**
* 根据条件分页查询会员信息 * 根据条件分页查询会员信息

View File

@ -43,6 +43,15 @@ export function getUserMobile(data) {
}) })
} }
// 根据手机号查询会员详细
export function getUserPhone(data) {
return request({
url: '/business/userManager/user/phone' ,
method: 'post',
data: data
})
}
// 新增会员 // 新增会员
export function addUser(data) { export function addUser(data) {
return request({ return request({

View File

@ -28,17 +28,30 @@
/> />
</el-form-item> </el-form-item>
<el-form-item label="时间"> <el-form-item label="时间">
<!-- <el-date-picker-->
<!-- v-model="dateRange"-->
<!-- style="width: 240px"-->
<!-- size="medium"-->
<!-- value-format="yyyy-MM-dd"-->
<!-- type="daterange"-->
<!-- range-separator="-"-->
<!-- clearable-->
<!-- start-placeholder="开始日期"-->
<!-- end-placeholder="结束日期"-->
<!-- ></el-date-picker>-->
<el-date-picker <el-date-picker
v-model="dateRange" v-model="beginTime"
style="width: 240px" style="width: 160px"
size="medium" type="date"
value-format="yyyy-MM-dd" placeholder="开始日期">
type="daterange" </el-date-picker>
range-separator="-"
clearable <el-date-picker
start-placeholder="开始日期" v-model="endTime"
end-placeholder="结束日期" style="width: 160px"
></el-date-picker> type="date"
placeholder="结束日期">
</el-date-picker>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -61,13 +74,13 @@
<el-col :span="2.5"> <el-col :span="2.5">
<div class="box"> <div class="box">
<span class="font-chinese">商品数量</span> <span class="font-chinese">商品数量</span>
<span class="font-number">{{statisticsForm.exchangeQuantity}}</span> <span class="font-number">{{statisticsForm.exchangeQuantity || 0}}</span>
</div> </div>
</el-col> </el-col>
<el-col :span="2.5"> <el-col :span="2.5">
<div class="box"> <div class="box">
<span class="font-chinese">积分</span> <span class="font-chinese">积分</span>
<span class="font-number">{{statisticsForm.integral}}</span> <span class="font-number">{{statisticsForm.integral || 0}}</span>
</div> </div>
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
@ -78,7 +91,7 @@
<i class="el-icon-info"></i> <i class="el-icon-info"></i>
</el-tooltip> </el-tooltip>
</span> </span>
<span class="font-number">{{statisticsForm.amount}}</span> <span class="font-number">{{statisticsForm.amount || 0}}</span>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
@ -168,6 +181,8 @@ export default {
}, },
loading: false, loading: false,
dateRange: [], dateRange: [],
beginTime:"",
endTime:"",
defaultSort: {prop: 'createTime', order: 'descending'}, defaultSort: {prop: 'createTime', order: 'descending'},
total: 0, total: 0,
@ -187,6 +202,11 @@ export default {
}, },
methods: { methods: {
getList(){ getList(){
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ getOrderApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
this.dataList = res.data.records this.dataList = res.data.records
this.total = res.data.total this.total = res.data.total
@ -194,6 +214,11 @@ export default {
}) })
}, },
getStatistics() { getStatistics() {
this.dateRange = []
if (this.beginTime && this.endTime) {
this.dateRange.push(this.beginTime.toLocaleDateString())
this.dateRange.push(this.endTime.toLocaleDateString())
}
getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{ getStatisticsApi(this.addDateRange(this.queryParams, this.dateRange)).then(res=>{
this.statisticsForm = res.data this.statisticsForm = res.data
}) })
@ -223,6 +248,8 @@ export default {
pageSize:10 pageSize:10
}, },
this.dateRange = [] this.dateRange = []
this.beginTime = ""
this.endTime = ""
this.getList() this.getList()
this.getStatistics(); this.getStatistics();

View File

@ -452,7 +452,7 @@
addUser, addUser,
delUser, delUser,
getUser, getUser,
getUserMobile, getUserMobile, getUserPhone,
listStatistic, listStatistic,
listUserStatistic, listUserStatistic,
updateUser updateUser
@ -763,18 +763,16 @@
} }
}); });
} else { } else {
getUserMobile({mobile:this.form.mobile}).then( response => { getUserPhone({mobile:this.form.mobile}).then( response => {
if(response.data!=null){ if(response.data!=null){
this.$modal.msgError("手机号已存在"); this.$modal.msgError("手机号已存在");
}else { }else {
addUser(this.form).then(res => { addUser(this.form).then(res => {
if (res.data==1) {
this.$modal.msgSuccess("新增会员成功"); this.$modal.msgSuccess("新增会员成功");
this.open = false; this.open = false;
this.openUser = false; this.openUser = false;
this.getList(); this.getList();
this.getUserList(); this.getUserList();
}
}); });
} }
}) })