Commit 10c00fa6 by 张新旗

改不完得代码,直接够够得了

parent 74d1c0f1
package com.soss;
import com.soss.framework.web.domain.server.Sys;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
......@@ -18,6 +19,7 @@ public class RuoYiApplication
{
public static void main(String[] args)
{
SpringApplication.run(RuoYiApplication.class, args);
}
......
......@@ -281,6 +281,7 @@ public class OrderServiceImpl implements IOrderService
}
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddHH");
String format = simpleDateFormat.format(new Date());
format = format.substring(2);
String key = "orderNo";
RedisAtomicInteger redisAtomicInteger = new RedisAtomicInteger(key,SpringUtils.getBean(StringRedisTemplate.class).getConnectionFactory());
int andIncrement = redisAtomicInteger.getAndIncrement();
......
......@@ -242,6 +242,7 @@ public class SysRoleServiceImpl implements ISysRoleService
public int insertRole(SysRole role)
{
// 新增角色信息
role.setRoleKey(role.getRoleName());
roleMapper.insertRole(role);
return insertRoleMenu(role);
}
......@@ -257,6 +258,7 @@ public class SysRoleServiceImpl implements ISysRoleService
public int updateRole(SysRole role)
{
// 修改角色信息
role.setRoleKey(role.getRoleName());
roleMapper.updateRole(role);
// 删除角色与菜单关联
roleMenuMapper.deleteRoleMenuByRoleId(role.getRoleId());
......
......@@ -277,6 +277,9 @@ public class SysUserServiceImpl implements ISysUserService
@Transactional
public int updateUser(SysUser user)
{
if(user.getRoles() ==null||user.getRoles().isEmpty()){
return userMapper.updateUser(user);
}
Long userId = user.getUserId();
// 删除用户与角色关联
userRoleMapper.deleteUserRoleByUserId(userId);
......
......@@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
</where>
order by turn
</select>
<select id="selectShopGoodsById" parameterType="String" resultMap="ShopGoodsResult">
......@@ -89,8 +90,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
g.pics,
g.`desc`,
g.remarks,
sg.state,
g.code
g.shelf_at as shelfAt,
g.code,
'1' as state
from shop_goods sg ,goods g where sg.goods_id =g.id and g.state ='3' and g.is_deleted =0
and shop_id =#{shopId} and category =#{categoryId}
order by sg.turn
......
......@@ -42,8 +42,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createdAt != null "> and created_at = #{createdAt}</if>
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
<if test="name != null "> and name = #{updatedAt}</if>
</where>
order by turn
</select>
<select id="selectShopRecommendById" parameterType="String" resultMap="ShopRecommendResult">
......
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