This commit is contained in:
cun-nan 2024-01-12 18:03:02 +08:00
parent 873825c669
commit 686a0d2e03
8 changed files with 76 additions and 5 deletions

View File

@ -291,6 +291,8 @@ export default {
this.$modal.msgSuccess("添加成功"); this.$modal.msgSuccess("添加成功");
this.getList() this.getList()
this.dialogVisible = false this.dialogVisible = false
}else {
this.$modal.msgError("添加失败,此通道暂未配置");
} }
}) })
} }

View File

@ -26,6 +26,15 @@ export function getInfo() {
}) })
} }
// 获取手机验证码
export function gettelcode(data) {
return request({
url: 'backendApi/login/sendMsg',
method: 'post',
data:data
})
}
// 退出方法 // 退出方法
export function logout() { export function logout() {
return request({ return request({

View File

@ -28,6 +28,15 @@ export function editMerchant(data) {
}) })
} }
// 修改商户备注信息
export function editMerchantRemark(data) {
return request({
url: '/api/merchantConfig/edit',
method: 'post',
data: data,
})
}
// 添加商户使用状态 // 添加商户使用状态
export function addMerchantApi(data) { export function addMerchantApi(data) {

View File

@ -38,7 +38,23 @@
<el-tag v-else effect="dark" type="success" style="float: right">当前使用中</el-tag> <el-tag v-else effect="dark" type="success" style="float: right">当前使用中</el-tag>
</div> </div>
<div>商户编号: {{ item.mchntCd }}</div> <div>商户编号: {{ item.mchntCd }}</div>
<div>备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span></div> <div style="margin-top: 5px">
备注: <span style="color: #00afff;margin-left: 3px" @click="editRemark(item.id)">{{ item.remark ? item.remark : "--" }}</span>
<span style="margin-left: 150px">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(item)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(item)"
>删除</el-button>
</span>
</div>
</el-card> </el-card>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
@ -268,6 +284,16 @@ export default {
this.getList(); this.getList();
}, },
methods:{ methods:{
handleUpdate(data){
merchantInfo(data.id).then(res => {
this.title = "商户信息"
this.dialogVisible = true
this.form1 = res.data
})
},
handleDelete(data){
},
// //
submitRemark(){ submitRemark(){
editMerchantRemark(this.merchantConfig).then(res => { editMerchantRemark(this.merchantConfig).then(res => {

View File

@ -66,8 +66,9 @@ public class MerchantConfigController extends BaseController {
public ResponseObject selectMerchant(@PathVariable Integer id){ public ResponseObject selectMerchant(@PathVariable Integer id){
return getSuccessResult(merchantConfigService.selectMerchById(id)); return getSuccessResult(merchantConfigService.selectMerchById(id));
} }
/** /**
* 修改商户备注信息 * 修改商户信息
* @param merchantConfig * @param merchantConfig
* @return * @return
*/ */
@ -75,4 +76,14 @@ public class MerchantConfigController extends BaseController {
public ResponseObject editMerchantRemark(@RequestBody MerchantConfig merchantConfig){ public ResponseObject editMerchantRemark(@RequestBody MerchantConfig merchantConfig){
return getSuccessResult(merchantConfigService.updateMerchRemark(merchantConfig)); return getSuccessResult(merchantConfigService.updateMerchRemark(merchantConfig));
} }
/**
* 删除商户信息
* @param id
* @return
*/
@DeleteMapping("{id}")
public ResponseObject delete(@PathVariable Integer id){
return getSuccessResult(merchantConfigService.deleteMerch(id));
}
} }

View File

@ -90,4 +90,11 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
* @return * @return
*/ */
public int insertMerch(MerchantConfig merchantConfig); public int insertMerch(MerchantConfig merchantConfig);
/**
* 根据id删除配置信息
* @param id
* @return
*/
public int deleteMerch(Integer id);
} }

View File

@ -99,10 +99,9 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
@Override @Override
public int updateMerchStatus(MerchantConfig merchantConfig) { public int updateMerchStatus(MerchantConfig merchantConfig) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper<>(); QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("is_use",1); queryWrapper.eq("is_use",1);
queryWrapper.eq("store_id",nowAccountInfo.getStoreId()); queryWrapper.eq("store_id",merchantConfig.getStoreId());
List<MerchantConfig> list = baseMapper.selectList(queryWrapper); List<MerchantConfig> list = baseMapper.selectList(queryWrapper);
for (MerchantConfig config : list) { for (MerchantConfig config : list) {
config.setIsUse("0"); config.setIsUse("0");
@ -149,6 +148,7 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
merchantConfig.setPrivateKey(FuYouPublicMerchant.privateKey); merchantConfig.setPrivateKey(FuYouPublicMerchant.privateKey);
}else { }else {
row = 0; row = 0;
return row;
} }
merchantConfig.setAppid(FuYouPublicMerchant.appid); merchantConfig.setAppid(FuYouPublicMerchant.appid);
merchantConfig.setAlipayAppid(FuYouPublicMerchant.alipayAppid); merchantConfig.setAlipayAppid(FuYouPublicMerchant.alipayAppid);
@ -163,4 +163,9 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
row = baseMapper.insert(merchantConfig); row = baseMapper.insert(merchantConfig);
return row; return row;
} }
@Override
public int deleteMerch(Integer id) {
return baseMapper.deleteById(id);
}
} }

View File

@ -35,6 +35,8 @@ public class ShiroConfig {
filterMap.put("/clientApi/captcha/getCode","anon"); filterMap.put("/clientApi/captcha/getCode","anon");
filterMap.put("/clientApi/sign/**","anon"); filterMap.put("/clientApi/sign/**","anon");
filterMap.put("/backendApi/login/loginByPhone","anon"); filterMap.put("/backendApi/login/loginByPhone","anon");
filterMap.put("/backendApi/login/getInfo","anon");
filterMap.put("/backendApi/login/logout","anon");
/*filterMap.put("/business/largeSscreen","anon"); /*filterMap.put("/business/largeSscreen","anon");
filterMap.put("/business/largeSscreen/goods","anon"); filterMap.put("/business/largeSscreen/goods","anon");
filterMap.put("/business/largeSscreen/staff","anon"); filterMap.put("/business/largeSscreen/staff","anon");