Commit 40b43fcd by 邹磊浩

修改代码

parent 478190dc
...@@ -110,4 +110,11 @@ public interface ICompanyService { ...@@ -110,4 +110,11 @@ public interface ICompanyService {
DataViewVo dataCompany(DataViewBo dataViewBo); DataViewVo dataCompany(DataViewBo dataViewBo);
int selectCompanyById(Long userId); int selectCompanyById(Long userId);
/**
* 重新提交
* @param companyBo
* @return
*/
Boolean reloadSubmit(CompanyBo companyBo);
} }
...@@ -105,6 +105,7 @@ public class CompanyServiceImpl implements ICompanyService { ...@@ -105,6 +105,7 @@ public class CompanyServiceImpl implements ICompanyService {
/** /**
* pc查询商户列表 * pc查询商户列表
*
* @param bo * @param bo
* @return * @return
*/ */
...@@ -117,9 +118,9 @@ public class CompanyServiceImpl implements ICompanyService { ...@@ -117,9 +118,9 @@ public class CompanyServiceImpl implements ICompanyService {
private LambdaQueryWrapper<Company> buildQueryWrapper(CompanyBo bo) { private LambdaQueryWrapper<Company> buildQueryWrapper(CompanyBo bo) {
Map<String, Object> params = bo.getParams(); Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<Company> lqw = Wrappers.lambdaQuery(); LambdaQueryWrapper<Company> lqw = Wrappers.lambdaQuery();
lqw.eq(null != bo.getStatus(), Company::getStatus,1); lqw.eq(null != bo.getStatus(), Company::getStatus, 1);
lqw.eq(null != bo.getUid(), Company::getUid,bo.getUid()); lqw.eq(null != bo.getUid(), Company::getUid, bo.getUid());
lqw.eq(null != bo.getCityId(),Company::getCityId,bo.getCityId()); lqw.eq(null != bo.getCityId(), Company::getCityId, bo.getCityId());
lqw.like(StringUtils.isNotBlank(bo.getName()), Company::getName, bo.getName()); lqw.like(StringUtils.isNotBlank(bo.getName()), Company::getName, bo.getName());
return lqw; return lqw;
} }
...@@ -147,11 +148,11 @@ public class CompanyServiceImpl implements ICompanyService { ...@@ -147,11 +148,11 @@ public class CompanyServiceImpl implements ICompanyService {
validEntityBeforeSave(update); validEntityBeforeSave(update);
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
sysUser.setUserId(update.getUid().longValue()); sysUser.setUserId(update.getUid().longValue());
if(update.getStatus() == 0 || update.getStatus() == 2){ if (update.getStatus() == 0 || update.getStatus() == 2) {
sysUser.setUserType(UserType.XCX_USER.getUserType()); sysUser.setUserType(UserType.XCX_USER.getUserType());
sysUserMapper.updateById(sysUser); sysUserMapper.updateById(sysUser);
userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, sysUser.getUserId())); userRoleMapper.delete(new LambdaQueryWrapper<SysUserRole>().eq(SysUserRole::getUserId, sysUser.getUserId()));
}else if(update.getStatus() == 1){ } else if (update.getStatus() == 1) {
sysUser.setUserType(UserType.AMERCHANT_USER.getUserType()); sysUser.setUserType(UserType.AMERCHANT_USER.getUserType());
sysUserMapper.updateById(sysUser); sysUserMapper.updateById(sysUser);
// 新增用户与角色管理 // 新增用户与角色管理
...@@ -308,4 +309,11 @@ public class CompanyServiceImpl implements ICompanyService { ...@@ -308,4 +309,11 @@ public class CompanyServiceImpl implements ICompanyService {
public int selectCompanyById(Long userId) { public int selectCompanyById(Long userId) {
return baseMapper.selectVoOne(new LambdaQueryWrapper<Company>().eq(Company::getUid, userId)).getId(); return baseMapper.selectVoOne(new LambdaQueryWrapper<Company>().eq(Company::getUid, userId)).getId();
} }
@Override
public Boolean reloadSubmit(CompanyBo companyBo) {
Company company = BeanUtil.toBean(companyBo, Company.class);
company.setStatus(0);
return baseMapper.updateById(company) > 0;
}
} }
...@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectFinanceStatistic" resultType="java.math.BigDecimal"> <select id="selectFinanceStatistic" resultType="java.math.BigDecimal">
select ifnull(sum(ifnull(divide_price, 0)),0) select ifnull(sum(ifnull(divide_price, 0)),0)
from employees_divide from employees_divide
where company_id = #{id} and to_days(current_date) = to_days(create_time); where company_id = #{id}
</select> </select>
<select id="selectAllOrder" resultType="com.pz.merchant.domain.vo.FinanceOrderInfoVo"> <select id="selectAllOrder" resultType="com.pz.merchant.domain.vo.FinanceOrderInfoVo">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment